diff --git a/DagorEngine.rev.txt b/DagorEngine.rev.txt index be3c3f415..1cb2fc8c6 100644 --- a/DagorEngine.rev.txt +++ b/DagorEngine.rev.txt @@ -1 +1 @@ -74a089e04b4efe3b67b0d61cff4b7b6d10974174 +0cee6d005970bf5594bd2849bac9ed03ef6096fa diff --git a/_docs/_static/custom.css b/_docs/_static/custom.css index 499985f1f..15b501ba4 100644 --- a/_docs/_static/custom.css +++ b/_docs/_static/custom.css @@ -24,5 +24,10 @@ max-width: 90%; } +audio, canvas, video { + display: block; + margin: auto; + margin-bottom: 12px; +} diff --git a/_docs/conf.py b/_docs/conf.py index dcffcde63..83cb7bad9 100644 --- a/_docs/conf.py +++ b/_docs/conf.py @@ -50,6 +50,7 @@ 'hoverxref.extension', 'versionwarning.extension', 'sphinx_copybutton', + 'sphinxcontrib.video', ] myst_enable_extensions = [ diff --git a/_docs/requirements.txt b/_docs/requirements.txt index d8e1abd3d..581ee742e 100644 --- a/_docs/requirements.txt +++ b/_docs/requirements.txt @@ -10,6 +10,7 @@ sphinx-design==0.6.0 sphinx-hoverxref==1.4.0 sphinx-markdown-tables==0.0.17 sphinx-version-warning==1.1.2 +sphinxcontrib-video==0.3.1 # Documentation theme diff --git a/prog/1stPartyLibs/daScript/daslib/async_boost.das b/prog/1stPartyLibs/daScript/daslib/async_boost.das index 15a5a59c8..f94c9791e 100644 --- a/prog/1stPartyLibs/daScript/daslib/async_boost.das +++ b/prog/1stPartyLibs/daScript/daslib/async_boost.das @@ -58,7 +58,7 @@ class AsyncMacro : AstFunctionAnnotation //! Generator yields bool if its a void function (coroutine), and yields the return type otherwise (async return). //! async function can wait for another async function using await(). //! use 'return false' to immediately return from the generator. - [unused_argument(group, args, errors)] def override apply(var func : FunctionPtr; var group : ModuleGroup; args : AnnotationArgumentList; var errors : das_string) : bool + [unused_argument(group, args)] def override apply(var func : FunctionPtr; var group : ModuleGroup; args : AnnotationArgumentList; var errors : das_string) : bool if func.result.baseType == Type autoinfer errors := "async function should have explicit return type" return false @@ -95,6 +95,20 @@ class AsyncMacro : AstFunctionAnnotation $e(func.body) return false + var ret = blk as ExprReturn + var gen = ret.subexpr as ExprMakeGenerator + for arg in func.arguments + if arg._type.baseType == Type.autoinfer + errors := "{errors}\nasync function argument '{arg.name}' should have explicit type" + return false + + if !arg._type.canCopy + let capturesNum = length(gen._capture) + gen._capture.resize(capturesNum + 1) + gen._capture[capturesNum].name := arg.name + let mode = arg._type.canMove ? CaptureMode.capture_by_move : CaptureMode.capture_by_clone + gen._capture[capturesNum].mode = mode + blk.at := func.at func.body |> move() <| blk func.result |> move_new() <| qmacro_type(type>) diff --git a/prog/1stPartyLibs/daScript/daslib/macro_boost.das b/prog/1stPartyLibs/daScript/daslib/macro_boost.das index a002719df..8e7dee606 100644 --- a/prog/1stPartyLibs/daScript/daslib/macro_boost.das +++ b/prog/1stPartyLibs/daScript/daslib/macro_boost.das @@ -33,13 +33,13 @@ class MacroVerifyMacro : AstFunctionAnnotation [macro] class CaptureBlock : AstVisitor [[do_not_delete]] scope : table - [[do_not_delete]] capture : table + [[do_not_delete]] captured : table def override preVisitExprVar(expr:smart_ptr) : void if !(expr.varFlags.local || expr.varFlags.argument || expr.varFlags._block) return let vptr = get_ptr(expr.variable) if !(scope |> key_exists(vptr)) - capture[vptr] = get_ptr(expr) + captured[vptr] = get_ptr(expr) def override preVisitExprLetVariable(expr:smart_ptr;arg:VariablePtr;lastArg:bool) : void scope |> insert(get_ptr(arg)) def override preVisitExprForVariable(expr:smart_ptr;svar:VariablePtr;last:bool) : void @@ -59,7 +59,7 @@ def public capture_block(expr:ExpressionPtr) : array var astVisitor = new CaptureBlock() var inscope adapter <- make_visitor(*astVisitor) visit(expr, adapter) - var res <- [{for k,v in keys(astVisitor.capture),values(astVisitor.capture); [[CapturedVariable variable=k,expression=v]] }] + var res <- [{for k,v in keys(astVisitor.captured),values(astVisitor.captured); [[CapturedVariable variable=k,expression=v]] }] unsafe delete astVisitor return <- res diff --git a/prog/1stPartyLibs/daScript/daslib/refactor.das b/prog/1stPartyLibs/daScript/daslib/refactor.das index 789cdf06f..de9b2f856 100644 --- a/prog/1stPartyLibs/daScript/daslib/refactor.das +++ b/prog/1stPartyLibs/daScript/daslib/refactor.das @@ -52,16 +52,16 @@ class ExtractMethodMacro : AstFunctionAnnotation if !(call.arguments[0] is ExprConstString) print("extract_method: first argument must be a string literal") return false - var capture <- capture_block(call.arguments[1]) - sort(capture) <| $ ( a,b ) => string(a.variable.name) < string(b.variable.name) + var captured <- capture_block(call.arguments[1]) + sort(captured) <| $ ( a,b ) => string(a.variable.name) < string(b.variable.name) var call_name = string((call.arguments[0] as ExprConstString).value) let function_declaration = build_string <| $ ( writer ) writer |> write ( "def ") writer |> write ( call_name ) - if length(capture) != 0 + if length(captured) != 0 writer |> write ( " ( " ) var first = true - for v in capture + for v in captured if first first = false else @@ -78,9 +78,9 @@ class ExtractMethodMacro : AstFunctionAnnotation let call_expression = build_string <| $ ( writer ) writer |> write ( call_name ) writer |> write ( "(" ) - if length(capture) != 0 + if length(captured) != 0 var first = true - for v in capture + for v in captured if first first = false else diff --git a/prog/1stPartyLibs/daScript/examples/profile/config.das b/prog/1stPartyLibs/daScript/examples/profile/config.das index f3c2e99b5..006c5b90e 100644 --- a/prog/1stPartyLibs/daScript/examples/profile/config.das +++ b/prog/1stPartyLibs/daScript/examples/profile/config.das @@ -7,6 +7,7 @@ let TEST_LUA = true let TEST_LUA_JIT = true let TEST_SQUIRREL = true let TEST_CSHARP = true +let TEST_MONO_INTERPRETER = false [no_jit,no_aot] def cpp_label @@ -117,7 +118,8 @@ def run_files ( tf:TestFile ) let cwd = getcwd() chdir(monoRoot) run_and_gun_silent("{monoCompiler} -optimize+ {monoRoot}/{tf.monoFile} -out:test.exe") - run_and_gun("MONO --interpreter","{monoRunner} --interpreter test.exe") + if TEST_MONO_INTERPRETER + run_and_gun("MONO --interpreter","{monoRunner} --interpreter test.exe") run_and_gun("MONO","{monoRunner} test.exe") if TEST_CSHARP && !empty(tf.dotNetFile) let cscRoot = "{get_das_root()}/examples/profile/tests/cs" diff --git a/prog/1stPartyLibs/daScript/examples/profile/main.das b/prog/1stPartyLibs/daScript/examples/profile/main.das index 2443c5c46..0ae283baf 100644 --- a/prog/1stPartyLibs/daScript/examples/profile/main.das +++ b/prog/1stPartyLibs/daScript/examples/profile/main.das @@ -5,6 +5,8 @@ require rtti require debugapi require math +var HTML_TEST_MODE = false + var LOG_TEST_COMPILATION_TIME = false var ENABLE_AOT = true var ENABLE_JIT = true @@ -64,8 +66,12 @@ def test_single_file ( fileName:string ) print("\n\n") def run_dir ( appDir : string ) + var once = false dir(appDir) <| $ ( fileName ) if (!fileName |> starts_with("_")) && fileName |> ends_with(".das") + if HTML_TEST_MODE && once + return + once = true let appfile = "{appDir}/{fileName}" test_single_file(appfile) @@ -102,44 +108,39 @@ def parse_short_profile_entry ( invocation:string; blk:block<(var res : ProfileE return <- [[ProfileEntry category=category, time=time, count=int(count)]] def make_table ( tablename:string; entries:array; languages:table ) - var categories : table + var categories : table> for e in entries if languages |> key_exists(e.language) if categories |> key_exists(e.category) - categories[e.category] = min(e.time, categories[e.category]) + let [[tmin,tmax]] = categories[e.category] + categories[e.category] = ( min(e.time,tmin), max(e.time, tmax)) else - categories[e.category] = e.time + categories[e.category] = ( e.time, e.time ) var slanguages <- [{for l in keys(languages); l}] slanguages |> sort var scategories <- [{for c in keys(categories); c}] scategories |> sort - print("

{tablename}

\n") - print("\n") - print("\n") - for l in slanguages - print("") - print("\n") + print("\n

{tablename}

\n") for c in scategories var cattime : table for e in entries if e.category==c cattime[e.language] = e.time - print("\n") + print("

{c}

\n") + print("
Test{l}
{c}
\n") for l in slanguages if cattime |> key_exists(l) let time = cattime[l] - let mintime = categories[c] - let factor = time / mintime + let [[tmin,tmax]] = categories[c] + let minfactor = time / tmin + let maxfactor = time / tmax let ts = fmt(":.4f", float(time)) - let fs = fmt(":.2f", float(factor)) - if int(factor*100.0lf) == 100 - print("") - else - print("") - else - print("") - print("\n") - print("
{fs} ({ts}){fs} ({ts})N/A
\n") + let fs = fmt(":.2f", float(minfactor)) + let featured = int(minfactor*100.0lf) == 100 + let tabclass = !featured ? "chart-bar" : "chart-bar featured" + let space = maxfactor*100.0lf // make it no less than 10%? + print("{l}
{ts}  ({fs})
\n") + print("\n") def make_entries ( extra:string = "" ) let exe = get_command_line_arguments()[0] diff --git a/prog/1stPartyLibs/daScript/examples/test/misc/async_example.das b/prog/1stPartyLibs/daScript/examples/test/misc/async_example.das index 1939cd421..64078ef19 100644 --- a/prog/1stPartyLibs/daScript/examples/test/misc/async_example.das +++ b/prog/1stPartyLibs/daScript/examples/test/misc/async_example.das @@ -14,6 +14,13 @@ struct Data b : string arr : array +[async] def timeout(time : float; var callback : lambda): void + let start_time = get_clock() + while get_clock() - start_time < double(time) + await_next_frame() + invoke(callback) + + [async] def get_plus_1(a : int) : int log("get_plus_1 1\n") await_next_frame() // frame pause @@ -48,6 +55,8 @@ struct Data yield true [async] def getall() : void + log("timeout...\n") + await <| timeout(1.0, @() { log("timeout done\n"); }) var a = await <| get_plus_1(100) debug(a, "1+100") assert(a == 101) diff --git a/prog/1stPartyLibs/daScript/examples/test/unit_tests/global_order.das b/prog/1stPartyLibs/daScript/examples/test/unit_tests/global_order.das index 66971841a..2254783a2 100644 --- a/prog/1stPartyLibs/daScript/examples/test/unit_tests/global_order.das +++ b/prog/1stPartyLibs/daScript/examples/test/unit_tests/global_order.das @@ -1,8 +1,3 @@ -def operator :=(value : auto(T)) - var res : T - res := value - return <-res - var some_a <- [{ auto[] "test"}] diff --git a/prog/1stPartyLibs/daScript/include/daScript/ast/ast_typedecl.h b/prog/1stPartyLibs/daScript/include/daScript/ast/ast_typedecl.h index 6dd101a0f..cf4e6cb67 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/ast/ast_typedecl.h +++ b/prog/1stPartyLibs/daScript/include/daScript/ast/ast_typedecl.h @@ -319,7 +319,7 @@ namespace das { template<> struct ToBasicType { enum { type = Type::tDouble }; }; template<> struct ToBasicType { enum { type = Type::tUInt16 }; }; #endif -#if !defined(_MSC_VER) && !defined(__APPLE__) && defined(ULLONG_MAX) && ULLONG_MAX == 0xffffffffffffffffULL +#if !defined(_MSC_VER) && !defined(__APPLE__) && !defined(_EMSCRIPTEN_VER) && defined(ULLONG_MAX) && ULLONG_MAX == 0xffffffffffffffffULL template<> struct ToBasicType { enum { type = Type::tInt64 }; }; template<> struct ToBasicType { enum { type = Type::tUInt64 }; }; #endif diff --git a/prog/1stPartyLibs/daScript/include/daScript/daScriptC.h b/prog/1stPartyLibs/daScript/include/daScript/daScriptC.h index 539d8ecdb..4e1d30035 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/daScriptC.h +++ b/prog/1stPartyLibs/daScript/include/daScript/daScriptC.h @@ -59,8 +59,14 @@ typedef struct dasNode das_node; typedef struct dasStructure das_structure; typedef struct dasEnumeration das_enumeration; +typedef struct { + float x, y, z, w; +} vec4f_unaligned; + typedef vec4f (das_interop_function) ( das_context * ctx, das_node * node, vec4f * arguments ); +typedef void (das_interop_function_unaligned) ( das_context * ctx, das_node * node, vec4f_unaligned * arguments, vec4f_unaligned * result ); + void das_initialize(); void das_shutdown(); @@ -94,6 +100,7 @@ das_context * das_context_make ( int stackSize ); void das_context_release ( das_context * context ); das_function * das_context_find_function ( das_context * context, char * name ); vec4f das_context_eval_with_catch ( das_context * context, das_function * fun, vec4f * arguments ); +void das_context_eval_with_catch_unaligned ( das_context * context, das_function * fun, vec4f_unaligned * arguments, int narguments, vec4f_unaligned * result ); char * das_context_get_exception ( das_context * context ); das_structure * das_structure_make ( das_module_group * lib, const char * name, const char * cppname, int sz, int al ); @@ -104,6 +111,7 @@ void das_enumeration_add_value ( das_enumeration * enu, const char * name, const das_module * das_module_create ( char * name ); void das_module_bind_interop_function ( das_module * mod, das_module_group * lib, das_interop_function * fun, char * name, char * cppName, uint32_t sideffects, char* args ); +void das_module_bind_interop_function_unaligned ( das_module * mod, das_module_group * lib, das_interop_function_unaligned * fun, char * name, char * cppName, uint32_t sideffects, char* args ); void das_module_bind_alias ( das_module * mod, das_module_group * lib, char * aname, char * tname ); void das_module_bind_structure ( das_module * mod, das_structure * st ); void das_module_bind_enumeration ( das_module * mod, das_enumeration * en ); @@ -114,6 +122,12 @@ double das_argument_double ( vec4f arg ); char * das_argument_string ( vec4f arg ); void * das_argument_ptr ( vec4f arg ); +int das_argument_int_unaligned ( vec4f_unaligned * arg ); +float das_argument_float_unaligned ( vec4f_unaligned * arg ); +double das_argument_double_unaligned ( vec4f_unaligned * arg ); +char * das_argument_string_unaligned ( vec4f_unaligned * arg ); +void * das_argument_ptr_unaligned ( vec4f_unaligned * arg ); + vec4f das_result_void (); vec4f das_result_int ( int r ); vec4f das_result_float ( float r ); @@ -121,6 +135,13 @@ vec4f das_result_double ( double r ); vec4f das_result_string ( char * r ); vec4f das_result_ptr ( void * r ); +void das_result_void_unaligned ( vec4f_unaligned * result ); +void das_result_int_unaligned ( vec4f_unaligned * result, int r ); +void das_result_float_unaligned ( vec4f_unaligned * result, float r ); +void das_result_double_unaligned ( vec4f_unaligned * result, double r ); +void das_result_string_unaligned ( vec4f_unaligned * result, char * r ); +void das_result_ptr_unaligned ( vec4f_unaligned * result, void * r ); + #ifdef __cplusplus } #endif diff --git a/prog/1stPartyLibs/daScript/include/daScript/simulate/cast.h b/prog/1stPartyLibs/daScript/include/daScript/simulate/cast.h index 4df305b2b..62d83ffbe 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/simulate/cast.h +++ b/prog/1stPartyLibs/daScript/include/daScript/simulate/cast.h @@ -276,7 +276,7 @@ namespace das static __forceinline vec4f from ( uint64_t x ) { return v_cast_vec4f(v_ldui_half(&x)); } }; -#if !defined(_MSC_VER) && !defined(__APPLE__) && defined(ULLONG_MAX) && ULLONG_MAX == 0xffffffffffffffffULL +#if !defined(_MSC_VER) && !defined(__APPLE__) && !defined(_EMSCRIPTEN_VER) && defined(ULLONG_MAX) && ULLONG_MAX == 0xffffffffffffffffULL template <> struct cast { static __forceinline long long int to ( vec4f x ) { return v_extract_xi64(v_cast_vec4i(x)); } diff --git a/prog/1stPartyLibs/daScript/modules/dasImgui/src/dasIMGUI.enum.class.inc b/prog/1stPartyLibs/daScript/modules/dasImgui/src/dasIMGUI.enum.class.inc index 5d9d017e5..36547e121 100644 --- a/prog/1stPartyLibs/daScript/modules/dasImgui/src/dasIMGUI.enum.class.inc +++ b/prog/1stPartyLibs/daScript/modules/dasImgui/src/dasIMGUI.enum.class.inc @@ -412,16 +412,16 @@ public: addIEx("RightAlt", "ImGuiKey_RightAlt", int64_t(ImGuiKey::ImGuiKey_RightAlt), das::LineInfo()); addIEx("RightSuper", "ImGuiKey_RightSuper", int64_t(ImGuiKey::ImGuiKey_RightSuper), das::LineInfo()); addIEx("Menu", "ImGuiKey_Menu", int64_t(ImGuiKey::ImGuiKey_Menu), das::LineInfo()); - addIEx("0", "ImGuiKey_0", int64_t(ImGuiKey::ImGuiKey_0), das::LineInfo()); - addIEx("1", "ImGuiKey_1", int64_t(ImGuiKey::ImGuiKey_1), das::LineInfo()); - addIEx("2", "ImGuiKey_2", int64_t(ImGuiKey::ImGuiKey_2), das::LineInfo()); - addIEx("3", "ImGuiKey_3", int64_t(ImGuiKey::ImGuiKey_3), das::LineInfo()); - addIEx("4", "ImGuiKey_4", int64_t(ImGuiKey::ImGuiKey_4), das::LineInfo()); - addIEx("5", "ImGuiKey_5", int64_t(ImGuiKey::ImGuiKey_5), das::LineInfo()); - addIEx("6", "ImGuiKey_6", int64_t(ImGuiKey::ImGuiKey_6), das::LineInfo()); - addIEx("7", "ImGuiKey_7", int64_t(ImGuiKey::ImGuiKey_7), das::LineInfo()); - addIEx("8", "ImGuiKey_8", int64_t(ImGuiKey::ImGuiKey_8), das::LineInfo()); - addIEx("9", "ImGuiKey_9", int64_t(ImGuiKey::ImGuiKey_9), das::LineInfo()); + addIEx("_0", "ImGuiKey_0", int64_t(ImGuiKey::ImGuiKey_0), das::LineInfo()); + addIEx("_1", "ImGuiKey_1", int64_t(ImGuiKey::ImGuiKey_1), das::LineInfo()); + addIEx("_2", "ImGuiKey_2", int64_t(ImGuiKey::ImGuiKey_2), das::LineInfo()); + addIEx("_3", "ImGuiKey_3", int64_t(ImGuiKey::ImGuiKey_3), das::LineInfo()); + addIEx("_4", "ImGuiKey_4", int64_t(ImGuiKey::ImGuiKey_4), das::LineInfo()); + addIEx("_5", "ImGuiKey_5", int64_t(ImGuiKey::ImGuiKey_5), das::LineInfo()); + addIEx("_6", "ImGuiKey_6", int64_t(ImGuiKey::ImGuiKey_6), das::LineInfo()); + addIEx("_7", "ImGuiKey_7", int64_t(ImGuiKey::ImGuiKey_7), das::LineInfo()); + addIEx("_8", "ImGuiKey_8", int64_t(ImGuiKey::ImGuiKey_8), das::LineInfo()); + addIEx("_9", "ImGuiKey_9", int64_t(ImGuiKey::ImGuiKey_9), das::LineInfo()); addIEx("A", "ImGuiKey_A", int64_t(ImGuiKey::ImGuiKey_A), das::LineInfo()); addIEx("B", "ImGuiKey_B", int64_t(ImGuiKey::ImGuiKey_B), das::LineInfo()); addIEx("C", "ImGuiKey_C", int64_t(ImGuiKey::ImGuiKey_C), das::LineInfo()); diff --git a/prog/1stPartyLibs/daScript/src/ast/ast_infer_type.cpp b/prog/1stPartyLibs/daScript/src/ast/ast_infer_type.cpp index 345b684e4..e24c0a9f8 100644 --- a/prog/1stPartyLibs/daScript/src/ast/ast_infer_type.cpp +++ b/prog/1stPartyLibs/daScript/src/ast/ast_infer_type.cpp @@ -3168,6 +3168,15 @@ namespace das { expr->at, CompilationError::invalid_argument_count); } } else { + auto stf = sttf->type; + if ( stf && stf->dim.size()==0 && (stf->baseType==Type::tBlock || stf->baseType==Type::tFunction || stf->baseType==Type::tLambda) ) { + reportAstChanged(); + expr->isInvokeMethod = false; // we replace invoke(foo.GetValue,cast foo,...) with invoke(foo.GetValue,...) + expr->arguments.erase(expr->arguments.begin()+1); + } else { + error("'" + stt->name + "->" + eField->name + "' expecting function", "", "", + expr->at, CompilationError::invalid_argument_count); + } error("'" + stt->name + "->" + eField->name + "' expecting function", "", "", expr->at, CompilationError::invalid_argument_count); } @@ -4508,7 +4517,7 @@ namespace das { return Visitor::visit(expr); } if ( seT->isConst() ) { - error("cannot access the constant table by index, use 'find' instead", "", "", + error("cannot access the constant table by index, use 'get' instead", "", "", expr->index->at, CompilationError::invalid_table_type); return Visitor::visit(expr); } @@ -7034,12 +7043,19 @@ namespace das { bool canRelaxAssign ( Expression * init ) const { if ( !relaxedAssign ) return false; if ( !init->type || !init->type->canMove() ) return false; // only if it can be moved - if ( init->rtti_isMakeLocal() ) return true; // a = [[...]] is always ok to transform to a <- [[...]] - if ( init->rtti_isCallFunc() ) { + if ( init->rtti_isMakeLocal() ) return true; // a = [[...]] is always ok to transform to a <- [[...]] + else if ( init->rtti_isMakeBlock() ) return true; // a = @... is always ok to transform to a <- @ + else if ( init->rtti_isAscend() ) return true; // a = new [[Foo()]] is always ok to transform to a <- new [[Foo()]] + else if ( init->rtti_isCallFunc() ) { auto call = static_cast(init); if ( call->func && call->func->result && !call->func->result->ref ) { return true; // a = f() is ok to transform to a <- f(), if its not a function which returns reference } + } else if ( init->rtti_isInvoke() ) { + auto inv = static_cast(init); + if ( inv->isCopyOrMove() ) { + return true; // a = invoke(f,...) is ok to transform to a <- invoke(f,...), if it does not return reference + } } return false; } @@ -8180,6 +8196,50 @@ namespace das { fieldName->type = conststring; return inferGenericOperator(opN, expr_at, arg0, fieldName, err); } + + + Variable * findMatchingBlockOrLambdaVariable ( const string & name ) { + // local (that on the stack) + for ( auto it = local.rbegin(); it!=local.rend(); ++it ) { + auto var = (*it).get(); + if ( var->name==name || var->aka==name ) { + return var; + } + } + // block arguments + for ( auto it = blocks.rbegin(); it!=blocks.rend(); ++it ) { + ExprBlock * block = *it; + for ( auto & arg : block->arguments ) { + if ( arg->name==name || arg->aka==name ) { + return arg.get(); + } + } + } + // function argument + if ( func ) { + for ( auto & arg : func->arguments ) { + if ( arg->name==name || arg->aka==name ) { + return arg.get(); + } + } + } + // static class method accessing static variables + if ( func && func->isStaticClassMethod && func->classParent->hasStaticMembers ) { + auto staticVarName = func->classParent->name + "`" + name; + if ( auto var = func->classParent->module->findVariable(staticVarName) ) { + return var.get(); + } + } + // global + auto vars = findMatchingVar(name, false); + if ( vars.size()==1 ) { + auto var = vars.back(); + return var.get(); + } + // and nada + return nullptr; + } + virtual ExpressionPtr visit ( ExprCall * expr ) override { if (expr->argumentsFailedToInfer) return Visitor::visit(expr); expr->func = inferFunctionCall(expr).get(); @@ -8214,20 +8274,49 @@ namespace das { } } } + if ( !expr->func ) { + auto var = findMatchingBlockOrLambdaVariable(expr->name); // if this is lambda_var(args...) or such + if ( var && var->type && var->type->dim.size()==0 ) { // we promote to vname(args...) to invoke(vname,args...) + auto bt = var->type->baseType; + if ( bt==Type::tBlock || bt==Type::tLambda || bt==Type::tFunction ) { + reportAstChanged(); + auto varExpr = make_smart(expr->at, var->name); + auto invokeExpr = make_smart(expr->at, expr->name); + invokeExpr->arguments.push_back(varExpr); + for ( auto & arg : expr->arguments ) { + invokeExpr->arguments.push_back(arg->clone()); + } + return invokeExpr; + } + } + } if ( func && !expr->func && func->isClassMethod && func->arguments.size()>=1 ) { auto bt = func->arguments[0]->type; if ( bt && bt->isClass() ) { if ( expr->name.find("::") == string::npos ) { // we only promote to self->call() if its not blah::call, _::call, or __::call auto memFn = bt->structType->findField(expr->name); - if ( memFn && memFn->type && memFn->type->isFunction() ) { - auto self = new ExprVar(expr->at, "self"); - auto pInvoke = makeInvokeMethod(expr->at, self, expr->name); - for ( auto & arg : expr->arguments ) { - pInvoke->arguments.push_back(arg->clone()); + if ( memFn && memFn->type ) { + if ( memFn->type->dim.size()==0 && (memFn->type->baseType==Type::tBlock || memFn->type->baseType==Type::tLambda || memFn->type->baseType==Type::tFunction) ) { + reportAstChanged(); + if ( memFn->classMethod ) { + auto self = new ExprVar(expr->at, "self"); + auto pInvoke = makeInvokeMethod(expr->at, self, expr->name); + for ( auto & arg : expr->arguments ) { + pInvoke->arguments.push_back(arg->clone()); + } + pInvoke->alwaysSafe = expr->alwaysSafe; + return pInvoke; + } else { + auto invokeExpr = make_smart(expr->at, expr->name); + auto self = make_smart(expr->at, "self"); + auto that = make_smart(expr->at, self, expr->name); + invokeExpr->arguments.push_back(that); + for ( auto & arg : expr->arguments ) { + invokeExpr->arguments.push_back(arg->clone()); + } + return invokeExpr; + } } - pInvoke->alwaysSafe = expr->alwaysSafe; - reportAstChanged(); - return pInvoke; } } } diff --git a/prog/1stPartyLibs/daScript/src/ast/ast_module.cpp b/prog/1stPartyLibs/daScript/src/ast/ast_module.cpp index bbadc3c36..7979b12f3 100644 --- a/prog/1stPartyLibs/daScript/src/ast/ast_module.cpp +++ b/prog/1stPartyLibs/daScript/src/ast/ast_module.cpp @@ -554,7 +554,7 @@ namespace das { access->setFileInfo(modName, das::move(fileInfo)); ModuleGroup dummyLibGroup; CodeOfPolicies builtinPolicies; - // builtinPolicies.version_2_syntax = false; // NOTE: no version 2 syntax in builtin modules (yet) + builtinPolicies.version_2_syntax = false; // NOTE: no version 2 syntax in builtin modules (yet) auto program = parseDaScript(modName, "", access, issues, dummyLibGroup, true); ownFileInfo = access->letGoOfFileInfo(modName); DAS_ASSERTF(ownFileInfo,"something went wrong and FileInfo for builtin module can not be obtained"); diff --git a/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp b/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp index 29d5d1ba6..8215a3189 100644 --- a/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp +++ b/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp @@ -628,10 +628,12 @@ namespace das { } if ( !hasModule && !modFile.empty() ) { vector chain; + TextWriter tw; if ( !getPrerequisits(modFile, access, req, missing, circular, notAllowed, chain, - dependencies, libGroup, nullptr, 1, !policies.ignore_shared_modules) ) { + dependencies, libGroup, &tw, 1, !policies.ignore_shared_modules) ) { if ( log ) { *log << "failed to add extra dependency " << modName << " from " << modFile << "\n"; + *log << "module dependency graph:\n" << tw.str(); } return false; } diff --git a/prog/1stPartyLibs/daScript/src/builtin/builtin.das b/prog/1stPartyLibs/daScript/src/builtin/builtin.das index 546598f14..7d92797c4 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/builtin.das +++ b/prog/1stPartyLibs/daScript/src/builtin/builtin.das @@ -339,7 +339,7 @@ def find(Tab:table;at:keyT|#;blk:block<(p:void?):void>) // one table lookup with block to rule them all 'get' -def get(Tab:table ==const #;at:keyT-#;blk:block<(p:valT#&):void>) +def get(Tab:table ==const #;at:keyT|#;blk:block<(p:valT#&):void>) var val = __builtin_table_find(Tab,at) if val != null __builtin_table_lock(Tab) @@ -350,7 +350,7 @@ def get(Tab:table ==const #;at:keyT-#;blk:block<(p:valT#& else return false -def get(Tab:table ==const;at:keyT-#;blk:block<(p:valT&):void>) +def get(Tab:table ==const;at:keyT|#;blk:block<(p:valT&):void>) var val = __builtin_table_find(Tab,at) if val != null __builtin_table_lock(Tab) @@ -361,7 +361,7 @@ def get(Tab:table ==const;at:keyT-#;blk:block<(p:valT&):v else return false -def get(var Tab:table ==const #;at:keyT-#;blk:block<(var p:valT#&):void>) +def get(var Tab:table ==const #;at:keyT|#;blk:block<(var p:valT#&):void>) var val = __builtin_table_find(Tab,at) if val != null __builtin_table_lock(Tab) @@ -372,7 +372,7 @@ def get(var Tab:table ==const #;at:keyT-#;blk:block<(var else return false -def get(var Tab:table ==const;at:keyT-#;blk:block<(var p:valT&):void>) +def get(var Tab:table ==const;at:keyT|#;blk:block<(var p:valT&):void>) var val = __builtin_table_find(Tab,at) if val != null __builtin_table_lock(Tab) @@ -518,6 +518,13 @@ def move_to_local ( var a : auto(TT)& ) : TT -const -& else concept_assert(false,"can't move this type") +[skip_lock_check] +def clone(clone_src:auto(TT)|#) : TT -const -# + unsafe + var clone_dest : TT - # + clone_dest := clone_src + return <- clone_dest + [skip_lock_check] def clone_to_move(clone_src:auto(TT)|#) : TT -const -# unsafe diff --git a/prog/1stPartyLibs/daScript/src/builtin/debugger.das b/prog/1stPartyLibs/daScript/src/builtin/debugger.das index ceb205f30..a6259db40 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/debugger.das +++ b/prog/1stPartyLibs/daScript/src/builtin/debugger.das @@ -82,7 +82,7 @@ struct DapiFunc // das::Lambda struct DapiLambda - capture : void? + captured : void? // das::Sequence struct DapiSequence diff --git a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_annotations_3.cpp b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_annotations_3.cpp index cdfba2bf9..cf42dddf2 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_annotations_3.cpp +++ b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_annotations_3.cpp @@ -224,7 +224,7 @@ namespace das { : AstExpressionAnnotation ("ExprMakeBlock", ml) { addField("_block","block"); addField("stackTop"); - addField("capture"); + addField("_capture"); addFieldEx ( "mmFlags", "mmFlags", offsetof(ExprMakeBlock, mmFlags), makeExprMakeBlockFlags() ); } }; @@ -233,7 +233,7 @@ namespace das { AstExprMakeGeneratorAnnotation(ModuleLibrary & ml) : AstExprLooksLikeCallAnnotation ("ExprMakeGenerator", ml) { addField("iterType"); - addField("capture"); + addField("_capture"); } }; diff --git a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp index 4cea251c5..cd981f9e6 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp +++ b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp @@ -2195,7 +2195,7 @@ namespace das { } uint32_t AstSerializer::getVersion () { - static constexpr uint32_t currentVersion = 50; + static constexpr uint32_t currentVersion = 51; return currentVersion; } diff --git a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_math.cpp b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_math.cpp index 645522fbc..8595576bc 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_math.cpp +++ b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_math.cpp @@ -517,11 +517,11 @@ namespace das { } float4 quat_from_euler_vec(float3 v) { - return v_quat_from_euler(v_ldu(&v.x)); + return v_quat_from_euler_yzx(v_make_vec3f(v.z, v.x, v.y)); } float4 quat_from_euler(float x, float y, float z) { - return v_quat_from_euler(v_make_vec4f(x, y, z, 0.f)); + return v_quat_from_euler_yzx(v_make_vec3f(z, x, y)); } float3 euler_from_quat_vec(float4 v) { diff --git a/prog/1stPartyLibs/daScript/src/misc/daScriptC.cpp b/prog/1stPartyLibs/daScript/src/misc/daScriptC.cpp index 8cfc17635..fe3f27e02 100644 --- a/prog/1stPartyLibs/daScript/src/misc/daScriptC.cpp +++ b/prog/1stPartyLibs/daScript/src/misc/daScriptC.cpp @@ -33,6 +33,35 @@ namespace das { das_interop_function * fn; }; + struct SimNode_CFuncCall_Unaligned : SimNode_ExtFuncCallBase { + SimNode_CFuncCall_Unaligned ( const LineInfo & at, const char * fnName, das_interop_function_unaligned * FN ) + : SimNode_ExtFuncCallBase(at,fnName) { fn = FN; } + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + vec4f * args = (vec4f *)(alloca(nArguments * sizeof(vec4f))); + evalArgs(context, args); + vec4f result; + (*fn)((das_context *)&context,(das_node *)this,(vec4f_unaligned *)args,(vec4f_unaligned *)&result); + return result; + } + das_interop_function_unaligned * fn; + }; + + class CFunction_Unaligned : public BuiltInFunction { + public: + __forceinline CFunction_Unaligned(const char * name, const ModuleLibrary &, const char * cppName, das_interop_function_unaligned * FN ) + : BuiltInFunction(name,cppName) { + this->callBased = true; + this->interopFn = true; + fn = FN; + } + virtual SimNode * makeSimNode ( Context & context, const vector & ) override { + const char * fnName = context.code->allocateName(this->name); + return context.code->makeNode(BuiltInFunction::at,fnName,fn); + } + das_interop_function_unaligned * fn; + }; + struct CStructureAnnotation : BasicStructureAnnotation { uint32_t sizeOf = 0; uint32_t alignOf = 0; @@ -186,6 +215,23 @@ das_function * das_context_find_function ( das_context * context, char * name ) return (das_function *) ((Context *)context)->findFunction(name); } +void das_context_eval_with_catch_unaligned ( das_context * context, das_function * fun, vec4f_unaligned * arguments, int narguments, vec4f_unaligned * result ) { + vec4f * args = nullptr; + if ( narguments ) { + if ( intptr_t(arguments) & 0xf ) { + args = (vec4f *) alloca(narguments * sizeof(vec4f)); + DAS_ASSERT((intptr_t(args) & 0xf) == 0); + for ( int i=0; i!=narguments; ++i ) { + args[i] = v_ldu((const float *)(arguments + i)); + } + } else { + args = (vec4f *) arguments; + } + } + vec4f res = ((Context *)context)->evalWithCatch((SimFunction *)fun,args); + v_stu((float *)result, res); +} + vec4f das_context_eval_with_catch ( das_context * context, das_function * fun, vec4f * arguments ) { return ((Context *)context)->evalWithCatch((SimFunction *)fun,(vec4f *)arguments); } @@ -224,6 +270,21 @@ void das_module_bind_interop_function ( das_module * mod, das_module_group * lib ((Module *)mod)->addFunction(fn, false); } +void das_module_bind_interop_function_unaligned ( das_module * mod, das_module_group * lib, das_interop_function_unaligned * fun, char * name, char * cppName, uint32_t sideffects, char* args ) { + auto fn = make_smart(name, *(ModuleLibrary *)lib, cppName, fun); + fn->setSideEffects((das::SideEffects) sideffects); + vector arguments; + MangledNameParser parser; + const char * arg = args; + while ( *arg ) { + auto tt = parser.parseTypeFromMangledName(arg, *(ModuleLibrary*)lib,(Module *)mod); + arguments.push_back(tt); + while (*arg==' ') arg ++; + } + fn->constructInterop(arguments); + ((Module *)mod)->addFunction(fn, false); +} + void das_module_bind_alias ( das_module * mod, das_module_group * lib, char * aname, char * tname ) { MangledNameParser parser; auto tt = (const char *) tname; @@ -279,4 +340,18 @@ vec4f das_result_double ( double r ) { return cast::from(r); } vec4f das_result_string ( char * r ) { return cast::from(r); } vec4f das_result_ptr ( void * r ) { return cast::from(r); } +int das_argument_int_unaligned ( vec4f_unaligned * arg ) { return cast::to(v_ldu((const float *)arg)); } +float das_argument_float_unaligned ( vec4f_unaligned * arg ) { return cast::to(v_ldu((const float *)arg)); } +double das_argument_double_unaligned ( vec4f_unaligned * arg ) { return cast::to(v_ldu((const float *)arg)); } +char * das_argument_string_unaligned ( vec4f_unaligned * arg ) { char * a = cast::to(v_ldu((const float *)arg)); return a ? a : ((char *)""); } +void * das_argument_ptr_unaligned ( vec4f_unaligned * arg ) { return cast::to(v_ldu((const float *)arg)); } + +void das_result_void_unaligned ( vec4f_unaligned * result ) { v_stu((float *)result, v_zero()); } +void das_result_int_unaligned ( vec4f_unaligned * result, int r ) { v_stu((float *)result, cast::from(r)); } +void das_result_float_unaligned ( vec4f_unaligned * result, float r ) { v_stu((float *)result, cast::from(r)); } +void das_result_double_unaligned ( vec4f_unaligned * result, double r ) { v_stu((float *)result, cast::from(r)); } +void das_result_string_unaligned ( vec4f_unaligned * result, char * r ) { v_stu((float *)result, cast::from(r)); } +void das_result_ptr_unaligned ( vec4f_unaligned * result, void * r ) { v_stu((float *)result, cast::from(r)); } + + } diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp index 13601f85b..58c398188 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp @@ -936,16 +936,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 10702 +#define YYLAST 11071 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 210 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 261 /* YYNRULES -- Number of rules. */ -#define YYNRULES 778 +#define YYNRULES 782 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 1426 +#define YYNSTATES 1436 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 437 @@ -1014,17 +1014,17 @@ static const yytype_int16 yyrline[] = { 0, 533, 533, 534, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 555, 561, 562, - 563, 567, 568, 572, 590, 591, 592, 593, 597, 601, - 606, 615, 623, 639, 644, 652, 652, 691, 709, 713, - 716, 720, 726, 735, 738, 744, 745, 749, 753, 754, - 758, 761, 767, 773, 776, 782, 783, 787, 788, 789, - 798, 799, 803, 804, 810, 811, 812, 813, 814, 818, - 824, 830, 836, 844, 854, 863, 870, 871, 872, 873, - 874, 875, 879, 884, 892, 893, 894, 898, 899, 900, - 901, 902, 903, 904, 905, 911, 914, 920, 923, 929, - 930, 931, 935, 948, 966, 969, 977, 988, 999, 1010, - 1013, 1020, 1024, 1031, 1032, 1036, 1037, 1038, 1042, 1045, - 1052, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, + 563, 567, 568, 572, 590, 591, 592, 593, 597, 598, + 602, 607, 616, 624, 640, 645, 653, 653, 692, 710, + 714, 717, 721, 727, 736, 739, 745, 746, 750, 754, + 755, 759, 762, 768, 774, 777, 783, 784, 788, 789, + 790, 799, 800, 804, 805, 811, 812, 813, 814, 815, + 819, 825, 831, 837, 845, 855, 864, 871, 872, 873, + 874, 875, 876, 880, 885, 893, 894, 895, 899, 900, + 901, 902, 903, 904, 905, 906, 912, 915, 921, 924, + 930, 931, 932, 936, 949, 967, 970, 978, 989, 1000, + 1011, 1014, 1021, 1025, 1032, 1033, 1037, 1038, 1039, 1043, + 1046, 1053, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, @@ -1032,64 +1032,65 @@ static const yytype_int16 yyrline[] = 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, - 1135, 1136, 1137, 1138, 1139, 1144, 1162, 1163, 1164, 1168, - 1174, 1174, 1191, 1195, 1206, 1219, 1220, 1221, 1222, 1223, + 1135, 1136, 1137, 1138, 1139, 1140, 1145, 1163, 1164, 1165, + 1169, 1175, 1175, 1192, 1196, 1207, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, - 1234, 1235, 1236, 1240, 1245, 1251, 1257, 1258, 1262, 1263, - 1267, 1271, 1278, 1279, 1290, 1294, 1297, 1305, 1305, 1305, - 1311, 1314, 1318, 1322, 1329, 1335, 1339, 1343, 1346, 1349, - 1357, 1360, 1368, 1374, 1375, 1376, 1380, 1381, 1385, 1386, - 1390, 1395, 1403, 1409, 1421, 1424, 1430, 1430, 1430, 1433, - 1433, 1433, 1438, 1438, 1438, 1446, 1446, 1446, 1452, 1462, - 1473, 1488, 1491, 1497, 1498, 1505, 1516, 1517, 1518, 1522, - 1523, 1524, 1525, 1529, 1534, 1542, 1543, 1547, 1554, 1558, - 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1574, 1575, 1576, + 1234, 1235, 1236, 1237, 1241, 1246, 1252, 1258, 1259, 1263, + 1264, 1268, 1272, 1279, 1280, 1291, 1295, 1298, 1306, 1306, + 1306, 1312, 1315, 1319, 1323, 1330, 1336, 1340, 1344, 1347, + 1350, 1358, 1361, 1369, 1375, 1376, 1377, 1381, 1382, 1386, + 1387, 1391, 1396, 1404, 1410, 1422, 1425, 1431, 1431, 1431, + 1434, 1434, 1434, 1439, 1439, 1439, 1447, 1447, 1447, 1453, + 1463, 1474, 1489, 1492, 1498, 1499, 1506, 1517, 1518, 1519, + 1523, 1524, 1525, 1526, 1527, 1531, 1536, 1544, 1545, 1549, + 1556, 1560, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, - 1587, 1588, 1589, 1590, 1591, 1592, 1596, 1603, 1615, 1620, - 1630, 1634, 1641, 1644, 1644, 1644, 1649, 1649, 1649, 1662, - 1666, 1670, 1675, 1682, 1682, 1682, 1689, 1693, 1703, 1712, - 1721, 1725, 1728, 1734, 1735, 1736, 1737, 1738, 1739, 1740, - 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, + 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1598, 1605, + 1617, 1622, 1632, 1636, 1643, 1646, 1646, 1646, 1651, 1651, + 1651, 1664, 1668, 1672, 1677, 1684, 1689, 1696, 1696, 1696, + 1703, 1707, 1717, 1726, 1735, 1739, 1742, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, - 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1775, - 1776, 1777, 1778, 1779, 1792, 1793, 1794, 1795, 1796, 1797, - 1798, 1799, 1800, 1801, 1802, 1803, 1806, 1809, 1814, 1815, - 1818, 1818, 1818, 1821, 1826, 1830, 1834, 1834, 1834, 1839, - 1842, 1846, 1846, 1846, 1851, 1854, 1855, 1856, 1857, 1858, - 1859, 1860, 1861, 1862, 1864, 1868, 1869, 1877, 1878, 1879, - 1880, 1881, 1882, 1883, 1887, 1891, 1895, 1899, 1903, 1907, - 1911, 1915, 1919, 1926, 1927, 1931, 1932, 1933, 1937, 1938, - 1942, 1943, 1944, 1948, 1949, 1953, 1964, 1967, 1967, 1986, - 1985, 1999, 1998, 2014, 2023, 2033, 2034, 2038, 2041, 2050, - 2051, 2055, 2058, 2061, 2077, 2086, 2087, 2091, 2094, 2097, - 2111, 2112, 2116, 2122, 2128, 2131, 2135, 2144, 2145, 2146, - 2150, 2151, 2155, 2162, 2167, 2176, 2182, 2193, 2200, 2210, - 2213, 2218, 2229, 2232, 2237, 2249, 2250, 2254, 2255, 2256, - 2260, 2260, 2278, 2282, 2289, 2292, 2305, 2322, 2323, 2324, - 2329, 2329, 2355, 2359, 2360, 2361, 2365, 2375, 2378, 2384, - 2389, 2384, 2404, 2405, 2409, 2410, 2414, 2420, 2421, 2425, - 2426, 2427, 2431, 2434, 2440, 2445, 2440, 2459, 2466, 2471, - 2480, 2486, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, - 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, - 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2527, - 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2538, 2549, 2553, - 2560, 2572, 2579, 2588, 2593, 2603, 2616, 2616, 2616, 2629, - 2630, 2634, 2638, 2645, 2649, 2653, 2657, 2664, 2667, 2685, - 2686, 2687, 2688, 2689, 2689, 2689, 2693, 2698, 2705, 2705, - 2712, 2716, 2720, 2725, 2730, 2735, 2740, 2744, 2748, 2753, - 2757, 2761, 2766, 2766, 2766, 2772, 2779, 2779, 2779, 2784, - 2784, 2784, 2790, 2790, 2790, 2795, 2799, 2799, 2799, 2804, - 2804, 2804, 2813, 2817, 2817, 2817, 2822, 2822, 2822, 2831, - 2835, 2835, 2835, 2840, 2840, 2840, 2849, 2849, 2849, 2855, - 2855, 2855, 2864, 2867, 2878, 2894, 2899, 2904, 2894, 2929, - 2934, 2940, 2929, 2965, 2970, 2975, 2965, 3005, 3006, 3007, - 3008, 3009, 3013, 3020, 3027, 3033, 3039, 3046, 3053, 3059, - 3068, 3074, 3082, 3087, 3094, 3099, 3105, 3106, 3110, 3111, - 3115, 3115, 3115, 3123, 3123, 3123, 3130, 3130, 3130, 3137, - 3137, 3137, 3148, 3154, 3160, 3166, 3166, 3166, 3176, 3184, - 3184, 3184, 3194, 3194, 3194, 3204, 3204, 3204, 3214, 3222, - 3222, 3222, 3241, 3248, 3248, 3248, 3258, 3261, 3267, 3275, - 3283, 3303, 3328, 3329, 3333, 3334, 3339, 3342, 3345 + 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, + 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, + 1781, 1782, 1783, 1789, 1790, 1791, 1792, 1793, 1806, 1807, + 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, + 1820, 1823, 1828, 1829, 1832, 1832, 1832, 1835, 1840, 1844, + 1848, 1848, 1848, 1853, 1856, 1860, 1860, 1860, 1865, 1868, + 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1878, 1882, + 1883, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1901, 1905, + 1909, 1913, 1917, 1921, 1925, 1929, 1933, 1940, 1941, 1945, + 1946, 1947, 1951, 1952, 1956, 1957, 1958, 1962, 1963, 1967, + 1978, 1981, 1981, 2000, 1999, 2013, 2012, 2028, 2037, 2047, + 2048, 2052, 2055, 2064, 2065, 2069, 2072, 2075, 2091, 2100, + 2101, 2105, 2108, 2111, 2125, 2126, 2130, 2136, 2142, 2145, + 2149, 2158, 2159, 2160, 2164, 2165, 2169, 2176, 2181, 2190, + 2196, 2207, 2214, 2224, 2227, 2232, 2243, 2246, 2251, 2263, + 2264, 2268, 2269, 2270, 2274, 2274, 2292, 2296, 2303, 2306, + 2319, 2336, 2337, 2338, 2343, 2343, 2369, 2373, 2374, 2375, + 2379, 2389, 2392, 2398, 2403, 2398, 2418, 2419, 2423, 2424, + 2428, 2434, 2435, 2439, 2440, 2441, 2445, 2448, 2454, 2459, + 2454, 2473, 2480, 2485, 2494, 2500, 2511, 2512, 2513, 2514, + 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, + 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, + 2535, 2536, 2537, 2541, 2542, 2543, 2544, 2545, 2546, 2547, + 2548, 2552, 2563, 2567, 2574, 2586, 2593, 2602, 2607, 2617, + 2630, 2630, 2630, 2643, 2644, 2648, 2652, 2659, 2663, 2667, + 2671, 2678, 2681, 2699, 2700, 2701, 2702, 2703, 2703, 2703, + 2707, 2712, 2719, 2719, 2726, 2730, 2734, 2739, 2744, 2749, + 2754, 2758, 2762, 2767, 2771, 2775, 2780, 2780, 2780, 2786, + 2793, 2793, 2793, 2798, 2798, 2798, 2804, 2804, 2804, 2809, + 2813, 2813, 2813, 2818, 2818, 2818, 2827, 2831, 2831, 2831, + 2836, 2836, 2836, 2845, 2849, 2849, 2849, 2854, 2854, 2854, + 2863, 2863, 2863, 2869, 2869, 2869, 2878, 2881, 2892, 2908, + 2913, 2918, 2908, 2943, 2948, 2954, 2943, 2979, 2984, 2989, + 2979, 3019, 3020, 3021, 3022, 3023, 3027, 3034, 3041, 3047, + 3053, 3060, 3067, 3073, 3082, 3088, 3096, 3101, 3108, 3113, + 3119, 3120, 3124, 3125, 3129, 3129, 3129, 3137, 3137, 3137, + 3144, 3144, 3144, 3151, 3151, 3151, 3162, 3168, 3174, 3180, + 3180, 3180, 3190, 3198, 3198, 3198, 3208, 3208, 3208, 3218, + 3218, 3218, 3228, 3236, 3236, 3236, 3255, 3262, 3262, 3262, + 3272, 3275, 3281, 3289, 3297, 3317, 3342, 3343, 3347, 3348, + 3353, 3356, 3359 }; #endif @@ -1229,12 +1230,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-1274) +#define YYPACT_NINF (-1260) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-684) +#define YYTABLE_NINF (-688) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -1243,149 +1244,150 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - -1274, 28, -1274, -1274, 53, -63, -98, 109, -1274, -103, - 109, 109, 109, -1274, 22, 153, -1274, -1274, -96, -4, - -1274, -1274, 291, -1274, 108, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, 87, -1274, 86, 96, 156, - -1274, -1274, -98, 12, -1274, -1274, -1274, 139, 175, -1274, - -1274, 108, 216, 226, 245, 250, 214, -1274, -1274, -1274, - 153, 153, 153, 217, -1274, 517, 50, -1274, -1274, -1274, - -1274, -1274, 354, 388, 419, -1274, 458, 41, 53, 283, - -63, 286, 355, -1274, 358, 370, -1274, -1274, -1274, 516, - -1274, -1274, -1274, -1274, 397, 392, -1274, -1274, -43, 53, - 153, 153, 153, 153, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, 409, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, 316, 123, -1274, -1274, -1274, -1274, 526, - -1274, -1274, 395, -1274, -1274, -1274, 428, 480, 493, -1274, - -1274, 467, -1274, 54, -1274, 521, 527, 517, 852, -1274, - 484, 568, 468, -1274, -1274, 504, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, 61, -1274, 1662, -1274, -1274, -1274, -1274, - -1274, 9350, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, 642, 643, -1274, - 474, 510, 430, 511, -1274, 520, -1274, 53, 475, 523, - -1274, -1274, -1274, 123, -1274, 501, 503, 507, 489, 508, - 512, -1274, -1274, -1274, 490, -1274, -1274, -1274, -1274, -1274, - 513, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, 514, -1274, -1274, -1274, 515, 518, -1274, -1274, - -1274, -1274, 519, 522, 491, 22, -1274, -1274, -1274, -1274, - -1274, -1274, 276, 524, 540, -1274, -1274, 546, 548, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, 549, - 485, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, 690, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, 552, 525, -1274, -1274, - -79, 534, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, 537, 550, -1274, 53, -1274, 335, - -1274, -1274, -1274, -1274, -1274, 6068, -1274, -1274, 557, -1274, - 232, 235, 253, -1274, -1274, 6068, 113, -1274, -1274, -1274, - -2, -1274, -1274, -1274, 72, 3350, -1274, 528, 1381, -1274, - 543, 1481, 228, -1274, -1274, -1274, -1274, 560, 592, -1274, - 530, -1274, 130, -1274, 16, 1662, -1274, 1966, 563, 22, - -1274, -1274, -1274, -1274, 574, 1662, -1274, 45, 1662, 1662, - 1662, 545, 553, -1274, -1274, 89, 22, 554, 20, -1274, - 239, 532, 555, 556, 538, 559, 541, 279, 562, -1274, - 292, 564, 565, 6068, 6068, 547, 558, 561, 566, 567, - 570, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - 3546, 6068, 6068, 6068, 6068, 6068, 3156, 6068, -1274, 569, - -1274, -1274, -1274, 577, -1274, -1274, -1274, -1274, 539, -1274, - -1274, -1274, -1274, -1274, -1274, -105, 893, -1274, 585, -1274, - -1274, -1274, -1274, -1274, -1274, 1662, 1662, 542, 591, 1662, - 474, 1662, 474, 1662, 474, 6411, 593, 6405, -1274, 6068, - -1274, -1274, -1274, -1274, 575, -1274, -1274, 8862, 3740, -1274, - -1274, 598, -1274, 14, -1274, -1274, 410, -1274, 524, 583, - 580, 410, -1274, 594, -1274, -1274, 6068, -1274, -1274, 257, - -99, -1274, 524, -1274, 588, -1274, -1274, 590, 3934, -1274, - 510, 4128, 596, 607, -1274, 632, 615, 4322, -36, 4516, - 769, -1274, 635, 636, 604, 800, -1274, -1274, -1274, -1274, - -1274, 639, -1274, 644, 645, 647, 648, 654, -1274, 749, - -1274, 655, 9234, 659, -1274, 663, -1274, 18, -1274, 161, - -1274, -1274, -1274, 6068, 264, 411, 656, 363, -1274, -1274, - -1274, 638, 657, -1274, 302, -1274, 664, 665, 667, -1274, - 6068, 1662, 6068, 6068, -1274, -1274, 6068, -1274, 6068, -1274, - 6068, -1274, -1274, 6068, -1274, 1662, 140, 140, 6068, 6068, - 6068, 6068, 6068, 6068, 488, 257, 9381, -1274, 666, 140, - 140, -38, 140, 140, 257, 835, 675, 10038, 675, 321, - 2764, 857, -1274, 658, 539, -1274, 10419, 10507, 6068, 6068, - -1274, -1274, 6068, 6068, 6068, 6068, 701, 6068, 380, 6068, - 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 4710, 6068, - 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, -47, - 6068, -1274, 4904, 420, 421, -1274, -1274, 306, 452, 534, - 454, 534, 455, 534, -1274, 336, -1274, 362, -1274, 1662, - 662, 675, -1274, -1274, -1274, 8893, -1274, 693, 1662, -1274, - -1274, 1662, -1274, -1274, 6441, 660, 824, -1274, -60, -1274, - 6068, 257, 6068, 10038, 855, 6068, 10038, 6068, 694, -1274, - 695, 722, 10038, -1274, 6068, 10038, 708, -1274, -1274, 6068, - 674, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -92, -1274, - 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, - 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 6068, 563, - -1274, -1274, 872, 468, -1274, 6068, 9480, -1274, -1274, -1274, - 1662, 1662, 1662, 1662, 811, 6068, 721, 6068, 1662, -1274, - -1274, -1274, 1662, 675, 379, 666, 6533, 1662, 1662, 6632, - 1662, 6663, 1662, 675, 1662, 1662, 675, 1662, 698, 6762, - 6854, 6887, 6979, 7078, 7109, -1274, 6068, 440, 7, 6068, - 6068, 714, 29, 257, 6068, 696, 692, 697, 699, 261, - -1274, -1274, 82, 700, 218, 2960, -1274, 74, 723, 704, - 707, 474, 2171, -1274, 857, 718, 711, -1274, -1274, 726, - 712, -1274, -1274, 177, 177, 1579, 1579, 669, 669, 715, - 15, 716, -1274, 8983, -86, -86, 585, 177, 177, 1122, - 10159, 10241, 10127, 10540, 9569, 10273, 10355, 1487, 1579, 1579, - 373, 373, 15, 15, 15, 384, 6068, 717, 719, 391, - 6068, 912, 9014, -1274, 84, -1274, -1274, 757, -1274, -1274, - 746, -1274, 758, -1274, 762, -1274, 6411, -1274, 593, 382, - 524, -1274, -1274, -1274, -1274, 524, 524, -1274, 6068, 787, - -1274, 792, -1274, 1662, -1274, 6068, 7208, 33, 10038, 510, - 10038, 7300, 6068, -1274, -1274, 10038, -1274, 7333, 6068, 750, - 913, 795, -1274, 403, -1274, 10038, 10038, 10038, 10038, 10038, - 10038, 10038, 10038, 10038, 10038, 10038, 10038, 10038, 10038, 10038, - 10038, 10038, 10038, 10038, -1274, 788, 529, 891, 791, 9601, - -1274, -1274, -1274, -1274, 524, 779, 781, 460, -1274, 120, - 765, 394, 7425, 461, 1662, 1662, 1662, 782, 766, 768, - 1662, 770, -1274, 789, 793, -1274, 794, -1274, 796, 771, - 797, 799, 772, 801, 857, -1274, -1274, -1274, -1274, -1274, - 776, 9683, 6068, 10038, -1274, -1274, 6068, 34, 10038, -1274, - -1274, 6068, 6068, 1662, 474, 203, -1274, 780, 6068, 6068, - 6068, 85, 6262, -1274, 408, -1274, -25, 534, -1274, 474, - -1274, 6068, -1274, 6068, 5098, 6068, -1274, 803, 785, -1274, - -1274, 6068, 790, -1274, 9104, 6068, 5292, 798, -1274, 9135, - -1274, -1274, 6068, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, 802, 1662, - 7524, -1274, 949, -1, 10038, 510, 6068, -1274, 510, 10038, - 2376, 510, 7555, 6068, 831, -1274, 94, 832, 1662, 45, - -1274, -1274, -1274, 100, -1274, 6, -1274, -1274, -1274, -1274, - -1274, -1274, 807, -1274, 814, 834, -1274, -1274, 812, 815, - 818, -1274, -1274, 6068, 819, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, 56, 5486, -1274, 418, 422, - 6068, 7654, 7746, 839, 534, -1274, 7779, 10038, 10038, 822, - 2960, 825, 219, 838, 867, 869, 873, -1274, 125, -70, - 534, 1662, 7871, 1662, 7970, -1274, 132, 8001, -1274, 6068, - 706, 6068, -1274, 8100, -1274, 133, 6068, -1274, -1274, -1274, - -1274, -1274, 6068, 524, -1274, 874, 6068, -1274, 171, -1274, - -1274, 487, 985, 8192, -1274, 875, -107, 996, 190, 6068, - 1007, 6, -1274, -1274, 529, 836, 840, -1274, -1274, 6068, - 858, -1274, -1274, -1274, -1274, 841, 842, 666, 844, 6068, - 6068, 6068, 845, 811, 846, 847, 5680, -1274, -1274, 181, - 6068, 6068, 423, -1274, -1274, -1274, 861, 244, -1274, 142, - 6068, 6068, 6068, -1274, -1274, -1274, -1274, -25, -1274, 5874, - -1274, -1274, 510, 868, -1274, 462, -1274, -1274, -1274, 1662, - 8225, 8317, -1274, -1274, 8416, 850, -1274, 10038, 510, 510, - -1274, -1274, 848, -1274, 2570, 885, -1274, -1274, 1662, 45, - 896, -1274, 6068, 9715, -1274, -1274, 1007, 257, 811, 811, - 8447, 860, 862, 863, 864, 6068, -1274, -1274, 6068, 1579, - 1579, 1579, 6068, -1274, 811, 416, -1274, 8546, -1274, 894, - 9797, 6068, 310, -1274, 6068, 6068, 865, 8638, 10038, 10038, - -1274, 6068, 10127, -1274, -1274, -1274, 463, -1274, -1274, -1274, - -1274, -1274, -1274, 6068, -1274, -1274, -1274, -1274, -1274, 10038, - -1274, 45, 6068, -1274, 9831, -1274, 852, -1274, -1274, -12, - -12, -1274, 6068, 811, 811, 416, 866, 879, 675, -12, - 723, 880, -1274, 1017, 917, 886, 9797, -1274, 310, 10038, - 10038, -1274, 270, 706, -1274, -1274, -1274, 8671, 6068, 9913, - -1274, 919, 852, 416, 723, 911, -1274, 887, 888, 8763, - -12, -12, 895, -1274, -1274, 897, 898, -1274, 6068, -1274, - -1274, 901, -1274, 6068, 6068, -1274, 510, 10002, -1274, -1274, - 510, 183, 892, -1274, -1274, -1274, -1274, 902, 903, -1274, - -1274, -1274, 10038, -1274, 10038, 10038, 487, -1274, -1274, -1274, - 416, -1274, -1274, -1274, 195, -1274 + -1260, 26, -1260, -1260, 77, -65, 78, 2, -1260, -108, + 2, 2, 2, -1260, -28, 16, -1260, -1260, -94, 20, + -1260, -1260, 145, -1260, 33, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, 121, -1260, 93, 111, 132, + -1260, -1260, 78, 10, -1260, -1260, -1260, 140, 171, -1260, + -1260, 33, 235, 238, 286, 287, 224, -1260, -1260, -1260, + 16, 16, 16, 212, -1260, 533, 126, -1260, -1260, -1260, + -1260, -1260, 347, 500, 527, -1260, 536, 13, 77, 279, + -65, 244, 302, -1260, 303, 319, -1260, -1260, -1260, 538, + -1260, -1260, -1260, -1260, 321, 341, -1260, -1260, -71, 77, + 16, 16, 16, 16, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, 358, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, 513, 98, -1260, -1260, -1260, -1260, 473, + -1260, -1260, 343, -1260, -1260, -1260, 361, 375, 412, -1260, + -1260, 421, -1260, 95, -1260, 113, 464, 533, 10900, -1260, + 430, 507, 414, -1260, -1260, -1260, 518, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, 105, -1260, 1518, -1260, -1260, -1260, + -1260, -1260, 9476, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, 588, 600, + -1260, 431, 491, 396, 505, -1260, 485, -1260, 77, 472, + 508, -1260, -1260, -1260, 98, -1260, 453, 501, 509, 482, + 510, 516, -1260, -1260, -1260, 487, -1260, -1260, -1260, -1260, + -1260, 517, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, 520, -1260, -1260, -1260, 522, 523, -1260, + -1260, -1260, -1260, 524, 525, 488, -28, -1260, -1260, -1260, + -1260, -1260, -1260, 519, 529, 542, -1260, -1260, 550, 551, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + 552, 494, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, 693, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, 554, 514, -1260, + -1260, -97, 539, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, 546, 547, -1260, 77, -1260, + 405, -1260, -1260, -1260, -1260, -1260, 6104, -1260, -1260, 557, + -1260, 254, 255, 264, -1260, -1260, 6104, -26, -1260, -1260, + -1260, -2, -1260, -1260, -1260, 42, 3192, -1260, 526, 1234, + -1260, 545, 1335, 320, -1260, -1260, -1260, -1260, 568, 599, + -1260, 528, -1260, 55, -1260, 92, 1518, -1260, 1808, 574, + -28, -1260, -1260, -1260, -1260, 575, 1518, -1260, 37, 1518, + 1518, 1518, 553, 555, -1260, -1260, 87, -28, 556, 22, + -1260, -25, 534, 560, 561, 537, 565, 558, 58, 567, + -1260, 129, 569, 570, 6104, 6104, 559, 562, 563, 566, + 571, 573, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, 3388, 6104, 6104, 6104, 6104, 6104, 2998, 6104, -1260, + 548, -1260, -1260, -1260, 578, -1260, -1260, -1260, -1260, 577, + -1260, -1260, -1260, -1260, -1260, -1260, -85, 6441, -1260, 580, + -1260, -1260, -1260, -1260, -1260, -1260, 1518, 1518, 564, 604, + 1518, 431, 1518, 431, 1518, 431, 6447, 610, 6477, -1260, + 6104, -1260, -1260, -1260, -1260, 584, -1260, -1260, 8929, 3582, + -1260, -1260, 611, -1260, -61, -1260, -1260, 249, -1260, 529, + 618, 609, 249, -1260, 620, -1260, -1260, 6104, -1260, -1260, + 108, -89, -1260, 529, -1260, 589, -1260, -1260, 590, 3776, + -1260, 491, 3970, 591, 635, -1260, 626, 644, 4164, -44, + 4358, 770, -1260, 637, 638, 606, 805, -1260, -1260, -1260, + -1260, -1260, 647, -1260, 648, 649, 650, 651, 652, -1260, + 750, -1260, 653, 9360, 654, -1260, 656, -1260, 17, -1260, + 5, -1260, -1260, -1260, 6104, 298, 395, 640, 369, -1260, + -1260, -1260, 623, 625, -1260, 174, -1260, 646, 655, 657, + -1260, 6104, 1518, 6104, 6104, -1260, -1260, 6104, -1260, 6104, + -1260, 6104, -1260, -1260, 6104, -1260, 1518, 326, 326, 6104, + 6104, 6104, 6104, 6104, 6104, 502, 108, 9507, -1260, 658, + 326, 326, -86, 326, 326, 108, 819, 660, 10164, 660, + 147, 2606, 831, -1260, 631, 577, -1260, 10659, 10747, 6104, + 6104, -1260, -1260, 6104, 6104, 6104, 6104, 681, 6104, 134, + 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 4552, + 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, + 10868, 6104, -1260, 4746, 416, 462, -1260, -1260, 251, 467, + 539, 468, 539, 469, 539, -1260, 247, -1260, 313, -1260, + 1518, 639, 660, -1260, -1260, -1260, 9019, -1260, 670, 1518, + -1260, -1260, 1518, -1260, -1260, 6569, 641, 801, -1260, -77, + -1260, 6104, 108, 6104, 10164, 833, 6104, 10164, 6104, 671, + -1260, 672, 697, 10164, -1260, 6104, 10164, 684, -1260, -1260, + 6104, 662, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -90, + -1260, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, + 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, 6104, + 574, -1260, -1260, 847, 414, -1260, 6104, 9606, -1260, -1260, + -1260, 1518, 1518, 1518, 1518, 786, 6104, 695, 6104, 1518, + -1260, -1260, -1260, 1518, 660, 339, 658, 6668, 1518, 1518, + 6699, 1518, 6798, 1518, 660, 1518, 1518, 660, 1518, 674, + 6890, 6923, 7015, 7114, 7145, 7244, -1260, 6104, 200, 21, + 6104, 6104, 687, 24, 108, 6104, 659, 663, 665, 666, + 272, -1260, -1260, -62, 667, 65, 2802, -1260, 155, 683, + 668, 676, 431, 2013, -1260, 831, 688, 677, -1260, -1260, + 690, 680, -1260, -1260, 149, 149, 1045, 1045, 827, 827, + 685, 284, 686, -1260, 9050, -45, -45, 580, 149, 149, + 10481, 10367, 10399, 10253, 10780, 9695, 10513, 10595, 385, 1045, + 1045, 675, 675, 284, 284, 284, 285, 6104, 689, 692, + 299, 6104, 867, 694, 9140, -1260, 167, -1260, -1260, 714, + -1260, -1260, 700, -1260, 702, -1260, 703, -1260, 6447, -1260, + 610, 362, 529, -1260, -1260, -1260, -1260, 529, 529, -1260, + 6104, 717, -1260, 718, -1260, 1518, -1260, 6104, 7336, 32, + 10164, 491, 10164, 7369, 6104, -1260, -1260, 10164, -1260, 7461, + 6104, 698, 850, 736, -1260, 413, -1260, 10164, 10164, 10164, + 10164, 10164, 10164, 10164, 10164, 10164, 10164, 10164, 10164, 10164, + 10164, 10164, 10164, 10164, 10164, 10164, -1260, 729, 549, 835, + 732, 9727, -1260, -1260, -1260, -1260, 529, 719, 720, 470, + -1260, -20, 701, 364, 7560, 476, 1518, 1518, 1518, 723, + 704, 706, 1518, 712, -1260, 734, 735, -1260, 737, -1260, + 738, 716, 739, 742, 724, 743, 831, -1260, -1260, -1260, + -1260, -1260, 726, 9809, 6104, 10164, -1260, -1260, 6104, 35, + 10164, -1260, -1260, 6104, 6104, 1518, 431, 40, -1260, 727, + 6104, 6104, 6104, 176, 6298, -1260, 371, -1260, 124, 539, + -1260, 431, -1260, 6104, -1260, 6104, 4940, 6104, -1260, 747, + 730, -1260, -1260, 6104, 731, -1260, 9171, 6104, 5134, 733, + -1260, 9261, -1260, 5328, -1260, 6104, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, 745, 1518, 7591, -1260, 891, -52, 10164, 491, 6104, + -1260, 491, 10164, 2218, 491, 7690, 6104, 775, -1260, 168, + 777, 1518, 37, -1260, -1260, -1260, 274, -1260, -8, -1260, + -1260, -1260, -1260, -1260, -1260, 741, -1260, 746, 778, -1260, + -1260, 755, 762, 767, -1260, -1260, 6104, 773, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, 54, 5522, + -1260, 442, 461, 6104, 7782, 7815, 779, 539, -1260, 7907, + 10164, 10164, 760, 2802, 764, 136, 809, 810, 768, 812, + 813, -1260, 172, 4, 539, 1518, 8006, 1518, 8037, -1260, + 175, 8136, -1260, 6104, 10285, 6104, -1260, 8228, -1260, 178, + 6104, -1260, -1260, -1260, 182, -1260, -1260, -1260, 6104, 529, + -1260, 814, 6104, -1260, 188, -1260, -1260, 455, 955, 8261, + -1260, 815, -19, 935, 156, 6104, 946, -8, -1260, -1260, + 549, 776, 780, -1260, -1260, 6104, 794, -1260, -1260, -1260, + -1260, 781, 783, 658, 782, 6104, 6104, 6104, 785, 786, + 787, 789, 5716, -1260, -1260, 189, 6104, 6104, 465, -1260, + -1260, -1260, 796, 163, -1260, 179, 6104, 6104, 6104, -1260, + -1260, 821, -1260, -1260, 124, -1260, 5910, -1260, -1260, 491, + 798, -1260, 477, -1260, -1260, -1260, 1518, 8353, 8452, -1260, + -1260, 8483, -1260, 790, -1260, 10164, 491, 491, -1260, -1260, + 792, -1260, 2412, 823, -1260, -1260, 1518, 37, 836, -1260, + 6104, 9841, -1260, -1260, 946, 108, 786, 786, 8582, 797, + 800, 802, 803, 6104, -1260, -1260, 6104, 1045, 1045, 1045, + 6104, -1260, 786, 403, -1260, 8674, -1260, 834, 9923, 6104, + 258, -1260, 6104, 6104, 793, 8707, 10164, 10164, 804, -1260, + 6104, 10253, -1260, -1260, -1260, 478, -1260, -1260, -1260, -1260, + -1260, -1260, 6104, -1260, -1260, -1260, -1260, -1260, 10164, -1260, + 37, 6104, -1260, 9957, -1260, 10900, -1260, -1260, -59, -59, + -1260, 6104, 786, 786, 403, 816, 817, 660, -59, 683, + 818, -1260, 966, 849, 822, 9923, -1260, 258, 10164, 10164, + -1260, 165, -1260, 10285, -1260, -1260, -1260, 8799, 6104, 10039, + -1260, 853, 10900, 403, 683, 843, -1260, 825, 826, 8898, + -59, -59, 828, -1260, -1260, 829, 830, -1260, 6104, -1260, + -1260, 824, -1260, 6104, 6104, -1260, 491, 10128, -1260, -1260, + 491, 193, 832, -1260, -1260, -1260, -1260, 837, 838, -1260, + -1260, -1260, 10164, -1260, 10164, 10164, 455, -1260, -1260, -1260, + 403, -1260, -1260, -1260, 197, -1260 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1393,213 +1395,214 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 2, 113, 1, 266, 0, 0, 0, 537, 267, 0, - 537, 537, 537, 16, 0, 0, 15, 3, 0, 0, - 9, 8, 0, 7, 525, 6, 11, 5, 4, 13, - 12, 14, 85, 86, 84, 93, 95, 37, 50, 47, - 48, 39, 0, 45, 38, 539, 538, 0, 0, 22, - 21, 525, 0, 0, 0, 0, 242, 35, 100, 101, - 0, 0, 0, 102, 104, 111, 0, 99, 17, 10, - 558, 557, 206, 543, 559, 526, 527, 0, 0, 0, - 0, 40, 0, 46, 0, 0, 43, 540, 542, 18, - 703, 695, 699, 244, 0, 0, 110, 105, 0, 0, - 0, 0, 0, 0, 114, 208, 207, 210, 205, 545, - 544, 0, 561, 560, 564, 529, 528, 530, 91, 92, - 89, 90, 88, 0, 0, 87, 96, 51, 49, 45, - 42, 41, 0, 19, 20, 23, 0, 0, 0, 243, - 33, 36, 109, 0, 106, 107, 108, 112, 0, 546, - 547, 554, 463, 24, 25, 0, 80, 81, 78, 79, - 77, 76, 82, 0, 44, 0, 704, 696, 700, 34, - 103, 0, 180, 181, 182, 183, 184, 185, 186, 187, + 2, 114, 1, 267, 0, 0, 0, 541, 268, 0, + 541, 541, 541, 16, 0, 0, 15, 3, 0, 0, + 9, 8, 0, 7, 529, 6, 11, 5, 4, 13, + 12, 14, 86, 87, 85, 94, 96, 38, 51, 48, + 49, 40, 0, 46, 39, 543, 542, 0, 0, 22, + 21, 529, 0, 0, 0, 0, 243, 36, 101, 102, + 0, 0, 0, 103, 105, 112, 0, 100, 17, 10, + 562, 561, 207, 547, 563, 530, 531, 0, 0, 0, + 0, 41, 0, 47, 0, 0, 44, 544, 546, 18, + 707, 699, 703, 245, 0, 0, 111, 106, 0, 0, + 0, 0, 0, 0, 115, 209, 208, 211, 206, 549, + 548, 0, 565, 564, 568, 533, 532, 534, 92, 93, + 90, 91, 89, 0, 0, 88, 97, 52, 50, 46, + 43, 42, 0, 19, 20, 23, 0, 0, 0, 244, + 34, 37, 110, 0, 107, 108, 109, 113, 0, 550, + 551, 558, 467, 24, 25, 29, 0, 81, 82, 79, + 80, 78, 77, 83, 0, 45, 0, 708, 700, 704, + 35, 104, 0, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 0, 0, 120, - 115, 0, 0, 0, 555, 0, 565, 0, 464, 0, - 26, 27, 28, 0, 94, 0, 0, 0, 0, 0, - 0, 572, 592, 573, 608, 574, 578, 579, 580, 581, - 598, 585, 586, 587, 588, 589, 590, 591, 593, 594, - 595, 596, 665, 577, 584, 597, 672, 679, 575, 582, - 576, 583, 0, 0, 0, 0, 607, 629, 632, 630, - 631, 692, 627, 541, 613, 491, 497, 174, 175, 172, - 123, 124, 126, 125, 127, 128, 129, 130, 156, 157, - 154, 155, 147, 158, 159, 148, 145, 146, 173, 167, - 0, 171, 160, 161, 162, 163, 134, 135, 136, 131, - 132, 133, 144, 0, 150, 151, 149, 142, 143, 138, - 137, 139, 140, 141, 122, 121, 166, 0, 152, 153, - 463, 118, 233, 211, 599, 602, 605, 606, 600, 603, - 601, 604, 548, 549, 552, 562, 97, 0, 517, 510, - 531, 83, 633, 656, 659, 0, 662, 652, 0, 616, - 666, 673, 680, 686, 689, 0, 0, 642, 647, 641, - 0, 655, 651, 644, 0, 0, 646, 628, 0, 614, - 774, 697, 701, 176, 177, 170, 165, 178, 168, 164, - 0, 116, 265, 485, 0, 0, 209, 0, 534, 0, - 556, 476, 566, 98, 0, 0, 511, 0, 0, 0, - 0, 0, 0, 369, 370, 0, 0, 0, 0, 363, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 598, + 198, 199, 200, 201, 202, 203, 204, 205, 0, 0, + 121, 116, 0, 0, 0, 559, 0, 569, 0, 468, + 0, 26, 27, 28, 0, 95, 0, 0, 0, 0, + 0, 0, 576, 596, 577, 612, 578, 582, 583, 584, + 585, 602, 589, 590, 591, 592, 593, 594, 595, 597, + 598, 599, 600, 669, 581, 588, 601, 676, 683, 579, + 586, 580, 587, 0, 0, 0, 0, 611, 633, 636, + 634, 635, 696, 631, 545, 617, 495, 501, 175, 176, + 173, 124, 125, 127, 126, 128, 129, 130, 131, 157, + 158, 155, 156, 148, 159, 160, 149, 146, 147, 174, + 168, 0, 172, 161, 162, 163, 164, 135, 136, 137, + 132, 133, 134, 145, 0, 151, 152, 150, 143, 144, + 139, 138, 140, 141, 142, 123, 122, 167, 0, 153, + 154, 467, 119, 234, 212, 603, 606, 609, 610, 604, + 607, 605, 608, 552, 553, 556, 566, 98, 0, 521, + 514, 535, 84, 637, 660, 663, 0, 666, 656, 0, + 620, 670, 677, 684, 690, 693, 0, 0, 646, 651, + 645, 0, 659, 655, 648, 0, 0, 650, 632, 0, + 618, 778, 701, 705, 177, 178, 171, 166, 179, 169, + 165, 0, 117, 266, 489, 0, 0, 210, 0, 538, + 0, 560, 480, 570, 99, 0, 0, 515, 0, 0, + 0, 0, 0, 0, 373, 374, 0, 0, 0, 0, + 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 456, 312, 314, 313, 315, 316, 317, 318, + 30, 0, 0, 0, 0, 0, 0, 0, 0, 297, + 298, 371, 370, 449, 368, 442, 441, 440, 439, 114, + 445, 369, 444, 443, 414, 375, 415, 0, 376, 0, + 372, 711, 715, 712, 713, 714, 0, 0, 0, 0, + 0, 116, 0, 116, 0, 116, 0, 0, 0, 642, + 237, 653, 654, 647, 649, 0, 652, 628, 0, 0, + 698, 697, 779, 709, 243, 624, 623, 0, 496, 491, + 0, 0, 0, 502, 0, 180, 170, 0, 264, 265, + 0, 467, 118, 120, 236, 0, 61, 62, 0, 258, + 256, 0, 0, 0, 0, 257, 0, 0, 0, 0, + 0, 213, 216, 0, 0, 0, 0, 229, 224, 221, + 220, 222, 0, 235, 0, 68, 69, 66, 67, 230, + 270, 219, 0, 65, 536, 539, 778, 557, 481, 522, + 0, 512, 513, 511, 0, 0, 0, 0, 625, 734, + 737, 248, 0, 251, 255, 0, 286, 0, 0, 0, + 763, 0, 0, 0, 0, 277, 280, 0, 283, 0, + 767, 0, 743, 749, 0, 740, 0, 403, 404, 0, + 0, 0, 0, 0, 0, 0, 0, 747, 770, 778, + 380, 379, 416, 378, 377, 0, 0, 778, 292, 778, + 299, 0, 307, 234, 298, 114, 215, 0, 0, 0, + 0, 405, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 452, 310, 312, 311, 313, 314, 315, 316, 29, - 0, 0, 0, 0, 0, 0, 0, 0, 296, 297, - 367, 366, 445, 364, 438, 437, 436, 435, 113, 441, - 365, 440, 439, 410, 371, 411, 0, 372, 0, 368, - 707, 711, 708, 709, 710, 0, 0, 0, 0, 0, - 115, 0, 115, 0, 115, 0, 0, 0, 638, 236, - 649, 650, 643, 645, 0, 648, 624, 0, 0, 694, - 693, 775, 705, 242, 620, 619, 0, 492, 487, 0, - 0, 0, 498, 0, 179, 169, 0, 263, 264, 0, - 463, 117, 119, 235, 0, 60, 61, 0, 257, 255, - 0, 0, 0, 0, 256, 0, 0, 0, 0, 0, - 212, 215, 0, 0, 0, 0, 228, 223, 220, 219, - 221, 0, 234, 0, 67, 68, 65, 66, 229, 269, - 218, 0, 64, 532, 535, 774, 553, 477, 518, 0, - 508, 509, 507, 0, 0, 0, 0, 621, 730, 733, - 247, 0, 250, 254, 0, 285, 0, 0, 0, 759, - 0, 0, 0, 0, 276, 279, 0, 282, 0, 763, - 0, 739, 745, 0, 736, 0, 399, 400, 0, 0, - 0, 0, 0, 0, 0, 0, 743, 766, 774, 376, - 375, 412, 374, 373, 0, 0, 774, 291, 774, 298, - 0, 305, 233, 297, 113, 214, 0, 0, 0, 0, - 401, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, - 0, 636, 0, 0, 0, 609, 611, 0, 0, 118, - 0, 118, 0, 118, 489, 0, 495, 0, 610, 0, - 0, 774, 640, 623, 626, 0, 615, 0, 0, 493, - 698, 0, 499, 702, 0, 0, 567, 483, 502, 486, - 0, 0, 0, 258, 0, 0, 245, 0, 0, 232, - 0, 0, 54, 72, 0, 260, 0, 230, 231, 0, - 0, 222, 217, 224, 225, 226, 227, 268, 0, 216, + 357, 0, 640, 0, 0, 0, 613, 615, 0, 0, + 119, 0, 119, 0, 119, 493, 0, 499, 0, 614, + 0, 0, 778, 644, 627, 630, 0, 619, 0, 0, + 497, 702, 0, 503, 706, 0, 0, 571, 487, 506, + 490, 0, 0, 0, 259, 0, 0, 246, 0, 0, + 233, 0, 0, 55, 73, 0, 261, 0, 231, 232, + 0, 0, 223, 218, 225, 226, 227, 228, 269, 0, + 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 775, - 550, 563, 0, 463, 522, 0, 0, 634, 657, 660, - 0, 0, 0, 0, 728, 236, 0, 0, 0, 749, - 752, 755, 0, 774, 0, 774, 0, 0, 0, 0, - 0, 0, 0, 774, 0, 0, 774, 0, 0, 0, - 0, 0, 0, 0, 0, 32, 0, 30, 0, 0, - 775, 0, 0, 0, 775, 0, 0, 0, 0, 343, - 340, 342, 0, 0, 242, 0, 356, 0, 721, 0, - 0, 115, 0, 298, 305, 0, 0, 424, 423, 0, - 0, 425, 429, 377, 378, 390, 391, 388, 389, 0, - 418, 0, 408, 0, 442, 443, 444, 379, 380, 395, - 396, 397, 398, 0, 0, 393, 394, 392, 386, 387, - 382, 381, 383, 384, 385, 0, 0, 0, 349, 0, - 0, 0, 0, 361, 0, 663, 653, 0, 617, 667, - 0, 674, 0, 681, 0, 687, 0, 690, 0, 0, - 240, 637, 237, 625, 706, 488, 494, 484, 0, 0, - 501, 0, 500, 0, 503, 0, 0, 0, 259, 0, - 246, 0, 0, 52, 53, 261, 233, 0, 0, 0, - 512, 0, 275, 510, 274, 327, 328, 330, 329, 331, - 321, 322, 323, 332, 333, 319, 320, 334, 335, 324, - 325, 326, 318, 533, 536, 0, 470, 473, 0, 0, - 524, 635, 658, 661, 622, 0, 0, 0, 729, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 413, 0, 0, 414, 0, 446, 0, 0, - 0, 0, 0, 0, 305, 447, 448, 449, 450, 451, - 0, 0, 0, 742, 767, 768, 0, 0, 292, 748, - 403, 0, 0, 0, 115, 0, 357, 0, 0, 0, - 0, 0, 0, 360, 0, 358, 0, 118, 309, 115, - 420, 0, 426, 0, 0, 0, 406, 0, 0, 430, - 434, 0, 0, 409, 0, 0, 0, 0, 350, 0, - 354, 404, 0, 362, 664, 654, 612, 618, 668, 670, - 675, 677, 682, 684, 688, 490, 691, 496, 0, 0, - 0, 569, 570, 504, 506, 0, 0, 262, 0, 75, - 0, 0, 0, 0, 0, 270, 0, 0, 0, 0, - 551, 471, 472, 473, 474, 465, 478, 523, 731, 734, - 248, 252, 0, 251, 0, 0, 288, 286, 0, 0, - 0, 760, 758, 238, 0, 769, 277, 280, 283, 764, - 762, 740, 746, 744, 737, 0, 0, 31, 0, 0, - 0, 0, 0, 0, 118, 359, 0, 713, 712, 0, - 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, - 118, 0, 0, 0, 0, 338, 0, 0, 431, 0, - 419, 0, 407, 0, 351, 0, 0, 405, 355, 671, - 678, 685, 236, 241, 568, 0, 0, 73, 0, 74, - 213, 57, 62, 0, 514, 0, 510, 515, 0, 0, - 468, 465, 466, 467, 470, 0, 0, 249, 253, 0, - 0, 287, 750, 753, 756, 0, 0, 774, 0, 0, - 0, 0, 0, 728, 0, 0, 0, 417, 453, 0, - 0, 0, 0, 341, 462, 344, 0, 0, 336, 0, - 0, 0, 0, 301, 302, 300, 299, 0, 306, 0, - 293, 307, 0, 0, 461, 0, 459, 339, 456, 0, - 0, 0, 455, 352, 0, 0, 571, 505, 0, 0, - 55, 56, 0, 69, 0, 0, 513, 271, 0, 0, - 0, 519, 0, 0, 469, 479, 468, 0, 728, 728, - 0, 0, 0, 0, 0, 236, 770, 239, 238, 278, - 281, 284, 0, 741, 728, 0, 415, 0, 454, 772, - 772, 0, 0, 347, 0, 0, 0, 0, 715, 714, - 304, 0, 294, 308, 421, 427, 0, 460, 458, 457, - 639, 71, 58, 0, 63, 67, 68, 65, 66, 64, - 70, 0, 0, 516, 0, 521, 0, 481, 475, 727, - 727, 289, 0, 728, 728, 0, 0, 0, 774, 727, - 720, 0, 416, 0, 0, 0, 772, 345, 0, 717, - 716, 337, 0, 295, 422, 428, 432, 0, 0, 0, - 520, 0, 0, 0, 724, 774, 726, 0, 0, 0, - 727, 727, 0, 761, 771, 0, 0, 738, 0, 778, - 776, 0, 348, 0, 0, 433, 0, 0, 273, 480, - 0, 0, 775, 725, 732, 735, 290, 0, 0, 757, - 765, 747, 773, 777, 719, 718, 57, 272, 482, 722, - 0, 751, 754, 59, 0, 723 + 779, 554, 567, 0, 467, 526, 0, 0, 638, 661, + 664, 0, 0, 0, 0, 732, 237, 0, 0, 0, + 753, 756, 759, 0, 778, 0, 778, 0, 0, 0, + 0, 0, 0, 0, 778, 0, 0, 778, 0, 0, + 0, 0, 0, 0, 0, 0, 33, 0, 31, 0, + 0, 779, 0, 0, 0, 779, 0, 0, 0, 0, + 345, 342, 344, 0, 0, 243, 0, 360, 0, 725, + 0, 0, 116, 0, 299, 307, 0, 0, 428, 427, + 0, 0, 429, 433, 381, 382, 394, 395, 392, 393, + 0, 422, 0, 412, 0, 446, 447, 448, 383, 384, + 399, 400, 401, 402, 0, 0, 397, 398, 396, 390, + 391, 386, 385, 387, 388, 389, 0, 0, 0, 351, + 0, 0, 0, 0, 0, 365, 0, 667, 657, 0, + 621, 671, 0, 678, 0, 685, 0, 691, 0, 694, + 0, 0, 241, 641, 238, 629, 710, 492, 498, 488, + 0, 0, 505, 0, 504, 0, 507, 0, 0, 0, + 260, 0, 247, 0, 0, 53, 54, 262, 234, 0, + 0, 0, 516, 0, 276, 514, 275, 329, 330, 332, + 331, 333, 323, 324, 325, 334, 335, 321, 322, 336, + 337, 326, 327, 328, 320, 537, 540, 0, 474, 477, + 0, 0, 528, 639, 662, 665, 626, 0, 0, 0, + 733, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 417, 0, 0, 418, 0, 450, + 0, 0, 0, 0, 0, 0, 307, 451, 452, 453, + 454, 455, 0, 0, 0, 746, 771, 772, 0, 0, + 293, 752, 407, 0, 0, 0, 116, 0, 361, 0, + 0, 0, 0, 0, 0, 364, 0, 362, 0, 119, + 311, 116, 424, 0, 430, 0, 0, 0, 410, 0, + 0, 434, 438, 0, 0, 413, 0, 0, 0, 0, + 352, 0, 358, 0, 408, 0, 366, 668, 658, 616, + 622, 672, 674, 679, 681, 686, 688, 692, 494, 695, + 500, 0, 0, 0, 573, 574, 508, 510, 0, 0, + 263, 0, 76, 0, 0, 0, 0, 0, 271, 0, + 0, 0, 0, 555, 475, 476, 477, 478, 469, 482, + 527, 735, 738, 249, 253, 0, 252, 0, 0, 289, + 287, 0, 0, 0, 764, 762, 239, 0, 773, 278, + 281, 284, 768, 766, 744, 750, 748, 741, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 119, 363, 0, + 717, 716, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 305, 0, 0, 119, 0, 0, 0, 0, 340, + 0, 0, 435, 0, 423, 0, 411, 0, 353, 0, + 0, 409, 359, 355, 0, 675, 682, 689, 237, 242, + 572, 0, 0, 74, 0, 75, 214, 58, 63, 0, + 518, 0, 514, 519, 0, 0, 472, 469, 470, 471, + 474, 0, 0, 250, 254, 0, 0, 288, 754, 757, + 760, 0, 0, 778, 0, 0, 0, 0, 0, 732, + 0, 0, 0, 421, 457, 0, 0, 0, 0, 343, + 466, 346, 0, 0, 338, 0, 0, 0, 0, 302, + 303, 0, 301, 300, 0, 308, 0, 294, 309, 0, + 0, 465, 0, 463, 341, 460, 0, 0, 0, 459, + 354, 0, 356, 0, 575, 509, 0, 0, 56, 57, + 0, 70, 0, 0, 517, 272, 0, 0, 0, 523, + 0, 0, 473, 483, 472, 0, 732, 732, 0, 0, + 0, 0, 0, 237, 774, 240, 239, 279, 282, 285, + 0, 745, 732, 0, 419, 0, 458, 776, 776, 0, + 0, 349, 0, 0, 0, 0, 719, 718, 0, 306, + 0, 295, 310, 425, 431, 0, 464, 462, 461, 643, + 72, 59, 0, 64, 68, 69, 66, 67, 65, 71, + 0, 0, 520, 0, 525, 0, 485, 479, 731, 731, + 290, 0, 732, 732, 0, 0, 0, 778, 731, 724, + 0, 420, 0, 0, 0, 776, 347, 0, 721, 720, + 339, 0, 304, 296, 426, 432, 436, 0, 0, 0, + 524, 0, 0, 0, 728, 778, 730, 0, 0, 0, + 731, 731, 0, 765, 775, 0, 0, 742, 0, 782, + 780, 0, 350, 0, 0, 437, 0, 0, 274, 484, + 0, 0, 779, 729, 736, 739, 291, 0, 0, 761, + 769, 751, 777, 781, 723, 722, 58, 273, 486, 726, + 0, 755, 758, 60, 0, 727 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -1274, -1274, -1274, -1274, -1274, -1274, 478, 1023, -1274, -1274, - -1274, 1101, -1274, -1274, -1274, 1065, -1274, 981, -1274, -1274, - 1031, -1274, -1274, -1274, -304, -1274, -1274, -150, -1274, -1274, - -1274, -1274, -1274, -1274, 900, -1274, -1274, -58, 1016, -1274, - -1274, -1274, 393, -1274, -414, -471, -664, -1274, -1274, -1274, - -1273, -1274, -1274, -526, -1274, -1274, -614, -767, -172, -1274, - -14, -1274, -1274, -1274, -1274, -1274, -146, -145, -144, -143, - -1274, -1274, 1121, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -417, -1274, - 668, -114, -1274, -784, -1274, -1274, -1274, -1274, -1274, -1274, - -1223, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - 619, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -142, -67, - -149, -69, 35, -1274, -1274, -1274, -1274, -1274, 606, -1274, - -469, -1274, -1274, -462, -1274, -1274, -701, -148, -564, -910, - -1274, -1274, -1274, -1274, 1079, -1274, -1274, -1274, 372, -1274, - 661, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -583, - -162, -1274, 727, -1274, -1274, -1274, -1274, -1274, -1274, -332, - -1274, -1274, -362, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -151, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, 729, -628, -209, -761, -1274, -1274, - -966, -1168, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -789, -1274, -1274, -1274, -1274, -1274, -1274, -1274, -1274, - -1274, -1274, -1274, -1274, -1274, -1274, -402, -1274, -1220, -543, - -1274 + -1260, -1260, -1260, -1260, -1260, -1260, 418, 950, -1260, -1260, + -1260, 1037, -1260, -1260, -1260, 997, -1260, 911, -1260, -1260, + 961, -1260, -1260, -1260, -384, -1260, -1260, -226, -1260, -1260, + -1260, -1260, -1260, -1260, 839, -1260, -1260, -63, 949, -1260, + -1260, -1260, 329, -1260, -429, -463, -661, -1260, -1260, -1260, + -1151, -1260, -1260, -523, -1260, -1260, -621, -770, -247, -1260, + -14, -1260, -1260, -1260, -1260, -1260, -222, -221, -220, -218, + -1260, -1260, 1054, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -408, -1260, + 593, -188, -1260, -801, -1260, -1260, -1260, -1260, -1260, -1260, + -1259, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + 471, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -147, -140, + -224, -139, -34, -1260, -1260, -1260, -1260, -1260, 572, -1260, + -472, -1260, -1260, -476, -1260, -1260, -706, -216, -553, -911, + -1260, -1260, -1260, -1260, 1012, -1260, -1260, -1260, 311, -1260, + 679, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -580, + -164, -1260, 669, -1260, -1260, -1260, -1260, -1260, -1260, -369, + -1260, -1260, -229, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -153, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, 673, -622, -282, -786, -1260, -1260, + -1065, -1138, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -804, -1260, -1260, -1260, -1260, -1260, -1260, -1260, -1260, + -1260, -1260, -1260, -1260, -1260, -1260, -406, -1260, -1244, -556, + -1260 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 16, 135, 51, 17, 155, 161, 614, 450, - 141, 451, 95, 19, 20, 43, 44, 86, 21, 39, - 40, 542, 543, 1262, 1263, 544, 1265, 545, 546, 547, - 548, 549, 550, 551, 162, 163, 35, 36, 37, 208, - 63, 64, 65, 66, 22, 321, 386, 200, 23, 107, - 201, 108, 148, 323, 452, 552, 387, 690, 1206, 899, - 453, 553, 581, 773, 1197, 454, 554, 555, 556, 557, - 558, 519, 559, 738, 1086, 932, 560, 455, 787, 1209, - 788, 1210, 790, 1211, 456, 778, 1201, 457, 691, 1241, - 458, 1147, 1148, 831, 459, 635, 460, 561, 461, 462, - 821, 463, 1013, 1302, 1014, 1358, 464, 881, 1168, 465, - 627, 1151, 1364, 1153, 1365, 1249, 1395, 467, 382, 1194, - 1275, 1093, 1095, 958, 567, 763, 1336, 1372, 383, 384, - 506, 685, 371, 511, 687, 372, 1020, 707, 573, 397, - 933, 339, 934, 340, 76, 117, 25, 152, 564, 565, - 47, 48, 132, 26, 111, 150, 203, 27, 388, 955, - 390, 205, 206, 74, 114, 392, 28, 151, 335, 708, - 468, 332, 258, 259, 677, 370, 260, 478, 1057, 507, - 576, 367, 261, 262, 398, 961, 689, 476, 1055, 399, - 962, 400, 963, 475, 1054, 479, 1058, 480, 1169, 481, - 1060, 482, 1170, 483, 1062, 484, 1171, 485, 1064, 486, - 1066, 508, 29, 137, 265, 509, 30, 138, 266, 513, - 31, 136, 264, 697, 469, 1374, 1351, 829, 1375, 1376, - 1377, 969, 470, 771, 1195, 772, 1196, 797, 1215, 794, - 1213, 617, 471, 795, 1214, 472, 974, 1282, 975, 1283, - 976, 1284, 782, 1205, 792, 1212, 1207, 473, 1354, 502, - 474 + 0, 1, 16, 135, 51, 17, 156, 162, 615, 451, + 141, 452, 95, 19, 20, 43, 44, 86, 21, 39, + 40, 543, 544, 1270, 1271, 545, 1273, 546, 547, 548, + 549, 550, 551, 552, 163, 164, 35, 36, 37, 209, + 63, 64, 65, 66, 22, 322, 387, 201, 23, 107, + 202, 108, 148, 324, 453, 553, 388, 691, 1212, 901, + 454, 554, 582, 774, 1203, 455, 555, 556, 557, 558, + 559, 520, 560, 739, 1089, 934, 561, 456, 788, 1215, + 789, 1216, 791, 1217, 457, 779, 1207, 458, 692, 1248, + 459, 1151, 1152, 832, 460, 636, 461, 562, 462, 463, + 822, 464, 1015, 1310, 1016, 1367, 465, 882, 1172, 466, + 628, 1155, 1374, 1157, 1375, 1256, 1405, 468, 383, 1200, + 1283, 1096, 1098, 960, 568, 764, 1345, 1382, 384, 385, + 507, 686, 372, 512, 688, 373, 1022, 708, 574, 398, + 935, 340, 936, 341, 76, 117, 25, 152, 565, 566, + 47, 48, 132, 26, 111, 150, 204, 27, 389, 957, + 391, 206, 207, 74, 114, 393, 28, 151, 336, 709, + 469, 333, 259, 260, 678, 371, 261, 479, 1060, 508, + 577, 368, 262, 263, 399, 963, 690, 477, 1058, 400, + 964, 401, 965, 476, 1057, 480, 1061, 481, 1175, 482, + 1063, 483, 1176, 484, 1065, 485, 1177, 486, 1067, 487, + 1069, 509, 29, 137, 266, 510, 30, 138, 267, 514, + 31, 136, 265, 698, 470, 1384, 1360, 830, 1385, 1386, + 1387, 971, 471, 772, 1201, 773, 1202, 798, 1221, 795, + 1219, 618, 472, 796, 1220, 473, 976, 1290, 977, 1291, + 978, 1292, 783, 1211, 793, 1218, 1213, 474, 1363, 503, + 475 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1607,1404 +1610,1386 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 57, 67, 828, 257, 714, 765, 500, 915, 970, 679, - 209, 681, 723, 683, 263, 890, 684, 892, 832, 894, - 126, 1004, 760, 1089, 686, 586, -113, 1002, 2, 626, - 628, 490, 808, 569, 82, 3, 636, 637, 618, 646, - 512, 812, 648, 649, 631, 1293, 67, 67, 67, 1006, - 1029, 380, 1192, 1076, 1130, 929, 118, 119, 4, 49, - 5, 1017, 6, 1371, 41, 632, 910, 1239, 7, 83, - 930, 380, 32, 33, 1268, 811, 68, 396, 8, 1357, - 1355, 875, 876, 815, 9, 816, 67, 67, 67, 67, - 648, 649, 38, 42, 401, 402, 100, 101, 102, 1400, - 322, 1143, 448, 633, 50, 492, 877, 1144, 10, 207, - 1339, 1340, 1193, 931, 408, 878, 669, 670, 911, 912, - 410, 913, 587, 588, 914, 910, 1349, 381, 917, 207, - 11, 12, 640, 641, 322, 1392, 1391, 517, 156, 157, - 646, 823, 647, 648, 649, 650, 651, 1190, 902, 336, - 1015, 256, 94, 762, 1145, 879, 880, 417, 418, 1146, - 55, 636, 637, 142, 669, 670, 45, 1094, 69, 598, - 75, 570, 46, 783, 699, 1380, 1381, 571, 912, 702, - 518, 368, 491, 793, 56, 911, 796, 58, 520, 761, - 785, 420, 421, 1373, 828, 698, 120, 1021, 636, 637, - 13, 121, 84, 122, 123, 589, 257, 911, 1102, 257, - 1125, 911, 911, 827, 85, 34, 59, 669, 670, 14, - 834, 15, 521, 257, 572, 590, 322, 55, 103, 784, - 1007, 15, 78, 257, 522, 823, 257, 257, 257, 213, - 978, 356, 981, 798, 1015, 770, 124, 574, 575, 577, - 989, 56, 1022, 992, 104, 884, 493, 640, 641, 440, - 170, 1216, 1052, 1024, 78, 646, 77, 214, 648, 649, - 650, 651, 1185, 823, 580, 494, 1269, 79, 158, 393, - 1023, 495, 1015, 159, 60, 160, 123, 570, 1016, 1139, - 1053, 55, 446, 571, 640, 641, 70, 71, 488, 72, - 1186, 87, 646, 1237, 647, 648, 649, 650, 651, 357, - 1052, 1052, 1080, 257, 257, 56, 570, 257, 489, 257, - 1024, 257, 571, 257, 673, 674, 1101, 73, 678, 910, - 680, 1238, 682, 764, 80, 1019, 358, 359, 1247, 1253, - 572, 828, 669, 670, 910, 910, 1306, 88, 61, 1052, - 1019, 1231, 94, 896, 256, 898, 94, 256, 62, 1052, - 1027, 1024, 1271, 1149, 664, 665, 666, 667, 668, 572, - 910, 256, 1176, 1024, 1378, 566, 1304, 1258, 90, 669, - 670, 256, 912, 1386, 256, 256, 256, 1298, 91, 1419, - 510, 256, 584, 1077, 636, 637, 910, 912, 912, 360, - 504, 1425, 1393, 361, 705, 1255, 505, 92, 626, 965, - 966, 105, 93, -669, 1407, 1408, -676, 106, -669, 706, - 977, -676, 99, 912, 591, 983, 984, 1065, 986, 257, - 988, 1299, 990, 991, -683, 993, 1067, -669, 127, -683, - -676, 1232, -346, 257, 592, 109, 368, -346, 55, 912, - 767, 110, 980, 96, 97, 98, 362, 817, -683, 55, - 363, 256, 256, 364, 599, 256, -346, 256, 817, 256, - 1226, 256, 56, 818, 838, 842, 112, 602, 887, 365, - 153, 154, 113, 56, 600, 366, 1242, 776, 85, 856, - 640, 641, 888, 144, 145, 146, 147, 603, 646, 1259, - 647, 648, 649, 650, 651, 324, 819, 777, 504, 325, - 1260, 1261, 1229, 394, 505, 115, 395, 129, 1346, 396, - 130, 116, 895, 326, 327, 1189, 1305, 257, 328, 329, - 330, 331, 131, 851, 504, 504, 257, 1042, 900, 257, - 505, 505, 852, 1134, 1047, 368, 1043, 905, 897, 1177, - 906, 504, 1179, 1048, 504, 1181, 140, 505, 1150, 139, - 505, 1141, 666, 667, 668, 979, 504, 1069, 1068, 823, - 1142, 149, 505, 133, 165, 669, 670, 256, 1015, 134, - 1104, 1087, 504, 83, 1088, 1128, 1091, 396, 505, 1129, - 1220, 256, 1092, 368, 1221, 1301, 1052, 768, 166, 1217, - 1052, 1052, 368, 368, 210, 211, 885, 886, 257, 257, - 257, 257, 1108, 1109, 1110, 820, 257, 1156, 1114, 964, - 257, 957, 967, 1240, 1272, 257, 257, 973, 257, 1165, - 257, 169, 257, 257, 368, 257, 368, 368, 889, 1105, - 891, 893, 368, 368, 368, 368, 1100, 1107, 1315, 1366, - 167, 1133, 153, 154, 805, 806, 100, 101, 102, 1178, - 100, 1394, 102, 168, 1287, 202, 100, 1350, 210, 211, - 212, 52, 53, 54, 204, 256, 207, 318, 319, 320, - 322, 333, 334, 337, 256, 338, 342, 256, 343, 376, - 636, 637, 344, 346, 345, 348, 355, 347, 349, 350, - 351, 1040, 369, 352, 353, 1332, 368, 354, 373, 1219, - 374, 375, 377, 1222, 378, 385, 1313, 1350, 389, 477, - 391, 501, 514, 626, 515, 563, 1188, 636, 637, 379, - 578, 498, 1321, 1322, 257, 516, 568, 593, 579, 585, - 594, 595, 15, 596, 597, 1401, 598, 601, 675, 604, - 605, 257, 608, 676, 700, 510, 256, 256, 256, 256, - 696, 701, 1073, 609, 256, 703, 610, 1368, 256, 718, - 720, 611, 612, 256, 256, 613, 256, 629, 256, 692, - 256, 256, 630, 256, 638, 639, 640, 641, 642, 1243, - 672, 643, 1424, 710, 646, 711, 647, 648, 649, 650, - 651, 717, 652, 653, 719, 1385, 726, 727, 728, 729, - 730, 731, 257, 257, 257, 737, 732, 733, 257, 734, - 735, 638, 639, 640, 641, 642, 736, 739, 643, 644, - 645, 646, 1403, 647, 648, 649, 650, 651, 758, 652, - 653, 759, 769, 774, 810, 654, 655, 656, 813, 779, - 780, 257, 781, 814, 662, 663, 664, 665, 666, 667, - 668, 830, 775, 849, 904, 908, 833, 909, 901, 919, - 1416, 669, 670, 922, 1418, 1348, 923, 924, 926, 928, - 956, 968, 256, 971, 994, 1005, 658, 171, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 1010, 256, - 1009, 1024, 1011, 1030, 1012, 1018, 1331, 257, 669, 670, - 1025, 1032, 1026, 1050, 636, 637, 1031, 1033, 1173, 1056, - 1034, 1035, 1045, 172, 1046, 173, 257, 174, 175, 176, - 177, 178, 1059, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 1061, 190, 191, 192, 1063, 1071, - 193, 194, 195, 196, 1072, 1083, 1084, 1085, 1094, 1090, - 256, 256, 256, 1096, 466, 1098, 256, 1099, 1111, 197, - 198, 1103, 1112, 1113, 487, 1116, 1115, 1120, 1123, 1117, - 1118, 1126, 1119, 1121, 497, 1122, 1135, 1124, 1158, 257, - 1159, 257, 1175, 1184, 1187, 1161, 1200, 1264, 1202, 256, - 1233, 1203, 1245, 1166, 1204, 1208, 562, 1172, 638, 639, - 640, 641, 642, 1198, 199, 643, 644, 645, 646, 1199, - 647, 648, 649, 650, 651, 1225, 652, 653, 1228, 1234, - 1230, 1235, 654, 655, 656, 1236, 1256, 1267, 657, 1270, - 1274, 1278, 606, 607, 1281, 1279, 1285, 1303, 1286, 1288, - 1292, 1294, 1295, 1323, 1314, 256, 1320, 1330, 1333, 616, - 619, 620, 621, 622, 623, 1342, 1353, 1343, 1344, 1345, - 1388, 1361, 1383, 658, 256, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 1384, 1387, 257, 1389, 1402, - 1390, 1399, 807, 1404, 1405, 669, 670, 1420, 1316, 671, - 125, 1409, 18, 1410, 1411, 1413, 257, 81, 1421, 1422, - 164, 128, 1423, 341, 1324, 143, 1347, 695, 1325, 1326, - 1327, 1328, 24, 1310, 1276, 1277, 709, 1337, 1191, 1338, - 89, 954, 582, 634, 583, 704, 1382, 256, 0, 256, - 0, 0, 0, 636, 637, 0, 0, 713, 0, 0, - 716, 0, 0, 0, 0, 0, 722, 0, 725, 0, + 57, 67, 258, 917, 513, 210, 972, 1006, 715, 829, + 761, 687, 833, 264, 685, 126, 724, 766, 680, 892, + 682, 894, 684, 896, 1092, -114, 2, 587, 118, 119, + 632, 491, 82, 3, 1031, 619, 809, 1019, 1198, 627, + 629, 1004, 649, 650, 1008, 813, 67, 67, 67, 912, + 58, 1366, 1079, 381, 49, 1133, 4, 931, 5, 45, + 6, 381, 518, 812, 1364, 46, 7, 83, 100, 101, + 102, 816, 932, 817, 912, 493, 8, 94, 68, 59, + 647, 1301, 9, 649, 650, 633, 67, 67, 67, 67, + 38, 824, 402, 403, 824, 75, 32, 33, 1199, 50, + 1017, 913, 914, 1017, 915, 519, 10, 916, 1402, 382, + 55, 208, 409, 157, 158, 933, 670, 671, 411, 208, + 699, 1401, 449, 634, 588, 589, 323, 914, 11, 12, + 369, 571, 919, 824, 56, 142, 904, 572, 700, 763, + 501, 1246, 1017, 703, 1018, 337, 1383, 60, 1348, 1349, + 70, 71, 257, 72, 55, 418, 419, 670, 671, 489, + 592, 599, 1276, 571, 1358, 397, 912, 570, 120, 572, + 637, 638, 1021, 121, 323, 122, 123, 765, 56, 490, + 593, 73, 492, 784, 573, 1105, 1104, 786, 762, 421, + 422, 912, 69, 794, 1381, 1128, 797, 1021, 13, 913, + 84, 829, 913, 94, 1023, 258, 835, 590, 258, 771, + 913, 61, 85, 913, 1390, 1391, 573, 14, 124, 914, + 15, 62, 258, 828, 323, 55, 494, 591, 980, 15, + 983, 1410, 258, 523, 1009, 258, 258, 258, 991, 34, + 41, 994, 357, 600, 914, 495, 575, 576, 578, 56, + 1146, 496, 100, 159, 102, 706, 1147, 441, 160, 1222, + 161, 123, 912, 601, 521, 886, 641, 642, 1237, 42, + 707, 78, 581, 78, 647, 394, 648, 649, 650, 651, + 652, 1277, 571, 214, 1388, 55, 1148, 852, 572, 912, + 447, 912, 79, 1396, 818, 1312, 853, 1403, 522, 819, + 77, 171, 87, 1149, 103, 637, 638, 1083, 1150, 56, + 80, 215, 258, 258, 603, 914, 258, 898, 258, 900, + 258, 1196, 258, 674, 675, 1417, 1418, 679, 1279, 681, + 104, 683, 820, 1024, 604, 573, 665, 666, 667, 668, + 669, 1097, 914, 88, 914, 1055, 1191, 637, 638, 829, + 1244, 670, 671, 1055, 1026, 257, 1055, 1026, 257, 777, + 1055, 1025, 94, 785, 211, 212, 1055, 1055, 1153, 1029, + 1182, 1026, 257, 1056, 1192, 1026, 567, 799, 1245, 778, + 1142, 1254, 257, 1314, 1260, 257, 257, 257, 1262, 96, + 97, 98, 257, 585, 1266, 1306, 55, 90, 1080, 1429, + 91, 641, 642, 1435, 105, 818, 637, 638, 1263, 647, + 106, 648, 649, 650, 651, 652, 982, 99, 627, 505, + 56, 505, 1307, 889, 1070, 506, 1068, 506, 258, 144, + 145, 146, 147, 897, 127, -673, -680, 890, 1044, 1238, + -673, -680, 258, 641, 642, -687, 85, 1045, 92, 93, + -687, 647, 1049, -348, 649, 650, 651, 652, -348, -673, + -680, 1050, 257, 257, 129, 130, 257, 1267, 257, -687, + 257, 325, 257, 839, 843, 326, 1232, -348, 1268, 1269, + 369, 131, 511, 139, 768, 505, 670, 671, 857, 327, + 328, 506, 505, 1249, 329, 330, 331, 332, 506, 899, + 639, 640, 641, 642, 643, 140, 883, 644, 645, 646, + 647, 505, 648, 649, 650, 651, 652, 506, 653, 654, + 149, 1235, 166, 1355, 1144, 981, 258, 1313, 670, 671, + 83, 167, 1072, 1145, 505, 258, 505, 902, 258, 1195, + 506, 505, 506, 967, 968, 168, 907, 506, 1071, 908, + 1107, 369, 358, 1137, 979, 1183, 824, 109, 1185, 985, + 986, 1187, 988, 110, 990, 1017, 992, 993, 1154, 995, + 663, 664, 665, 666, 667, 668, 669, 369, 257, 359, + 360, 769, 169, 395, 112, 170, 396, 670, 671, 397, + 113, 1090, 257, 115, 1091, 133, 1131, 397, 369, 116, + 1132, 134, 887, 100, 1108, 1223, 1094, 258, 258, 258, + 258, 203, 1095, 205, 1226, 258, 821, 959, 966, 258, + 1055, 969, 208, 319, 258, 258, 975, 258, 1160, 258, + 1247, 258, 258, 1227, 258, 320, 321, 1309, 343, 1055, + 1169, 1280, 361, 1055, 369, 1174, 362, 335, 888, 369, + 369, 369, 369, 891, 893, 895, 1103, 1295, 369, 369, + 369, 323, 1110, 1324, 1376, 1404, 153, 154, 806, 807, + 339, 1184, 100, 101, 102, 334, 257, 153, 154, 155, + 338, 1359, 211, 212, 213, 257, 344, 346, 257, 52, + 53, 54, 349, 356, 345, 347, 637, 638, 377, 363, + 1042, 348, 350, 364, 370, 351, 365, 352, 353, 354, + 355, 369, 374, 375, 376, 378, 379, 392, 380, 478, + 386, 1225, 366, 502, 1341, 1228, 1322, 390, 367, 499, + 515, 516, 1359, 517, 258, 627, 564, 569, 579, 594, + 580, 586, 597, 1330, 1331, 595, 596, 1111, 1112, 1113, + 598, 258, 602, 1117, 605, 606, 630, 257, 257, 257, + 257, 1411, 1076, 599, 609, 257, 677, 610, 611, 257, + 676, 612, 511, 697, 257, 257, 613, 257, 614, 257, + 15, 257, 257, 631, 257, 673, 1136, 1378, 693, 701, + 702, 704, 641, 642, 711, 712, 718, 719, 720, 721, + 647, 1395, 648, 649, 650, 651, 652, 727, 1434, 728, + 729, 730, 258, 258, 258, 731, 738, 467, 258, 732, + 733, 734, 735, 736, 737, 740, 770, 488, 775, 1413, + 776, 780, 814, 759, 760, 831, 811, 498, 815, 834, + 781, 906, 782, 850, 911, 903, 910, 921, 637, 638, + 924, 258, 926, 925, 928, 958, 970, 973, 1007, 563, + 996, 1026, 1194, 1011, 667, 668, 669, 930, 1052, 1012, + 1013, 1014, 1020, 1032, 1027, 1034, 1059, 670, 671, 1074, + 1075, 1028, 1033, 1426, 257, 1035, 1062, 1428, 1064, 1066, + 1036, 1037, 1357, 1087, 1047, 607, 608, 1048, 1088, 1053, + 1093, 257, 1097, 1086, 1099, 1101, 1102, 1106, 258, 1114, + 1115, 1116, 617, 620, 621, 622, 623, 624, 1118, 1179, + 1119, 1120, 1123, 1121, 1122, 1124, 1250, 258, 1125, 1127, + 1126, 1129, 1162, 1138, 1181, 1163, 1165, 1190, 1170, 1193, + 1206, 1208, 639, 640, 641, 642, 643, 1204, 1209, 644, + 1178, 1205, 647, 1210, 648, 649, 650, 651, 652, 1214, + 653, 654, 257, 257, 257, 1231, 1234, 1272, 257, 1236, + 696, 1239, 1240, 1241, 1242, 1243, 1264, 1275, 1278, 1282, + 1289, 1286, 1311, 1318, 1323, 1287, 1293, 1296, 705, 1294, + 1300, 258, 1302, 258, 1303, 1339, 1329, 1332, 1342, 1370, + 714, 257, 1351, 717, 1252, 1352, 1362, 1353, 1354, 723, + 1372, 726, 663, 664, 665, 666, 667, 668, 669, 1398, + 1399, 1412, 1393, 1394, 1397, 1409, 1400, 125, 1423, 670, + 671, 1414, 1415, 808, 1419, 1420, 1421, 1430, 18, 81, + 165, 128, 1433, 1431, 1432, 767, 1333, 1340, 143, 1356, + 1334, 1335, 1336, 342, 1337, 24, 1319, 1284, 257, 635, + 1346, 1285, 1197, 89, 617, 787, 637, 638, 790, 1347, + 792, 956, 1392, 0, 0, 583, 0, 257, 0, 584, + 800, 801, 802, 803, 804, 805, 0, 0, 0, 0, + 0, 0, 258, 710, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1325, 0, 0, 0, 0, 0, 0, + 844, 845, 258, 0, 846, 847, 848, 849, 0, 851, + 0, 854, 855, 856, 858, 859, 860, 861, 862, 863, + 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, + 875, 257, 884, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 639, 640, 641, 642, 0, 0, 0, 0, 0, 0, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 0, 0, 918, 0, 920, 0, 0, 922, 0, 923, + 0, 0, 0, 0, 0, 0, 927, 0, 0, 0, + 0, 929, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 937, 938, 939, 940, 941, 942, 943, 944, + 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, + 955, 0, 665, 666, 667, 668, 669, 961, 0, 0, + 0, 0, 257, 0, 0, 0, 0, 670, 671, 974, + 0, 0, 0, 216, 0, 0, 0, 0, 0, 217, + 0, 0, 257, 0, 0, 218, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 219, 0, 0, 1003, 0, + 0, 1005, 617, 220, 0, 0, 1010, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 821, 0, 221, 0, + 0, 0, 0, 0, 563, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1046, 0, + 0, 0, 1051, 821, 216, 0, 0, 0, 0, 0, + 217, 0, 0, 0, 0, 0, 218, 0, 0, 0, + 0, 0, 55, 0, 0, 0, 219, 0, 0, 0, + 0, 1073, 0, 0, 220, 255, 0, 0, 1077, 0, + 0, 0, 0, 0, 0, 1082, 56, 0, 0, 221, + 0, 1085, 0, 0, 0, 0, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 0, + 0, 256, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 766, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1134, 1135, 255, 0, 0, 0, + 0, 1139, 1140, 1141, 0, 1010, 0, 504, 0, 0, + 0, 0, 0, 0, 1156, 0, 1158, 505, 1161, 0, + 0, 0, 0, 506, 1164, 0, 0, 0, 1167, 0, + 0, 0, 0, 0, 0, 0, 1010, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 216, 0, 0, + 0, 0, 256, 217, 0, 0, 0, 0, 0, 218, + 0, 0, 0, 0, 563, 0, 0, 1189, 0, 219, + 0, 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 616, 786, 0, 0, 789, 0, 791, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 799, 800, 801, - 802, 803, 804, 0, 0, 256, 0, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 256, 652, 653, 843, 844, 0, - 0, 845, 846, 847, 848, 0, 850, 0, 853, 854, - 855, 857, 858, 859, 860, 861, 862, 864, 865, 866, - 867, 868, 869, 870, 871, 872, 873, 874, 820, 882, + 0, 0, 221, 0, 0, 0, 0, 617, 0, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1257, 0, 1258, 0, 0, 0, + 0, 1261, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1265, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1281, 0, 0, 255, + 0, 0, 0, 0, 0, 0, 1288, 0, 0, 0, + 56, 0, 0, 0, 0, 0, 1297, 1298, 1299, 0, + 0, 0, 0, 1305, 0, 0, 0, 617, 1308, 0, + 0, 0, 0, 0, 0, 0, 0, 1315, 1316, 1317, + 0, 0, 0, 0, 0, 0, 0, 1321, 0, 0, + 0, 0, 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 0, 0, 0, 916, - 0, 918, 0, 0, 920, 0, 921, 0, 0, 0, - 0, 0, 0, 925, 820, 0, 0, 0, 927, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 935, - 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, - 946, 947, 948, 949, 950, 951, 952, 953, 0, 0, - 0, 0, 0, 0, 959, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 972, 0, 0, 0, - 215, 0, 0, 0, 0, 0, 216, 0, 0, 0, - 0, 0, 217, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 218, 0, 0, 1001, 0, 0, 1003, 616, - 219, 0, 0, 1008, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, - 0, 562, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1044, 0, 0, 0, 1049, - 215, 0, 0, 0, 0, 0, 216, 0, 636, 637, - 0, 0, 217, 0, 0, 0, 0, 0, 0, 55, - 0, 0, 218, 0, 0, 0, 0, 1070, 0, 0, - 219, 0, 254, 0, 1074, 0, 0, 0, 0, 0, - 0, 1079, 0, 56, 0, 220, 0, 1082, 0, 0, - 0, 0, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 0, 0, 0, 255, 0, - 499, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 636, 637, 638, 639, 640, 641, 642, 0, 0, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 55, - 652, 653, 0, 0, 0, 0, 0, 0, 0, 0, - 1131, 1132, 254, 0, 0, 0, 0, 1136, 1137, 1138, - 0, 1008, 0, 503, 0, 0, 0, 0, 0, 0, - 1152, 0, 1154, 504, 1157, 0, 0, 0, 0, 505, - 1160, 0, 0, 0, 1163, 0, 0, 0, 0, 0, - 0, 1008, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 215, 0, 0, 0, 0, 0, 216, 255, 669, - 670, 0, 0, 217, 638, 639, 640, 641, 0, 562, - 0, 0, 1183, 218, 646, 0, 647, 648, 649, 650, - 651, 219, 652, 653, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 220, 0, 0, 0, - 0, 0, 616, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 0, 0, 1250, 0, - 1251, 669, 670, 0, 0, 1254, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 1273, 0, - 0, 0, 0, 254, 0, 0, 0, 0, 1280, 0, - 0, 0, 0, 0, 56, 0, 0, 0, 1289, 1290, - 1291, 0, 0, 0, 0, 1297, 0, 0, 0, 616, - 1300, 0, 0, 0, 0, 0, 0, 0, 0, 1307, - 1308, 1309, 0, 0, 0, 0, 0, 0, 1312, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, + 0, 0, 0, 1338, 0, 0, 0, 0, 0, 0, + 0, 1343, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1329, 0, 0, 0, 0, 0, 0, - 0, 1334, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, + 1365, 0, 0, 1368, 1369, 0, 0, 0, 0, 0, + 0, 1373, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1377, 0, 0, 0, 0, 0, 524, + 0, 0, 1379, 402, 403, 3, 0, 525, 526, 527, + 0, 528, 1389, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 529, 410, 530, 531, 0, 411, + 0, 0, 0, 0, 0, 0, 532, 412, 0, 1407, + 533, 0, 534, 413, 0, 0, 414, 0, 8, 415, + 535, 0, 536, 416, 0, 0, 537, 538, 0, 1422, + 0, 0, 0, 539, 1424, 1425, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 540, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1356, 0, 0, 1359, 1360, 0, 0, 0, 0, 0, - 1363, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1367, 0, 0, 0, 0, 0, 0, 0, - 0, 1369, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1379, 0, 0, 0, 0, 0, 523, 0, 0, - 0, 401, 402, 3, 0, 524, 525, 526, 0, 527, - 0, 403, 404, 405, 406, 407, 0, 1397, 0, 0, - 0, 408, 528, 409, 529, 530, 0, 410, 0, 0, - 0, 0, 0, 0, 531, 411, 0, 1412, 532, 0, - 533, 412, 1414, 1415, 413, 0, 8, 414, 534, 0, - 535, 415, 0, 0, 536, 537, 0, 0, 0, 0, - 0, 538, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 539, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 541, + 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 0, 0, 0, + 0, 447, 0, 448, 524, 449, 450, 0, 402, 403, + 3, 0, 525, 526, 527, 0, 528, 0, 404, 405, + 406, 407, 408, 0, 0, 0, 0, 0, 409, 529, + 410, 530, 531, 0, 411, 0, 0, 0, 0, 0, + 0, 532, 412, 0, 0, 533, 0, 534, 413, 0, + 0, 414, 0, 8, 415, 535, 0, 536, 416, 0, + 0, 537, 538, 0, 0, 0, 0, 0, 539, 0, + 0, 418, 419, 0, 222, 223, 224, 0, 226, 227, + 228, 229, 230, 420, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 0, 244, 245, 246, 0, + 0, 249, 250, 251, 252, 421, 422, 423, 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 540, 541, 0, + 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 447, 523, 448, 449, 0, 401, 402, 3, 0, - 524, 525, 526, 0, 527, 0, 403, 404, 405, 406, - 407, 0, 0, 0, 0, 0, 408, 528, 409, 529, - 530, 0, 410, 0, 0, 0, 0, 0, 0, 531, - 411, 0, 0, 532, 0, 533, 412, 0, 0, 413, - 0, 8, 414, 534, 0, 535, 415, 0, 0, 536, - 537, 0, 0, 0, 0, 0, 538, 0, 0, 417, - 418, 0, 221, 222, 223, 0, 225, 226, 227, 228, - 229, 419, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, - 249, 250, 251, 420, 421, 422, 539, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 423, 424, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 426, + 427, 428, 429, 430, 0, 431, 0, 432, 433, 434, + 435, 436, 437, 438, 439, 56, 440, 0, 0, 0, + 0, 0, 0, 441, 1030, 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - 0, 0, 0, 0, 0, 0, 0, 425, 426, 427, - 428, 429, 0, 430, 0, 431, 432, 433, 434, 435, - 436, 437, 438, 56, 439, 0, 0, 0, 0, 0, - 0, 440, 1028, 541, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 441, 442, - 443, 0, 14, 0, 0, 444, 445, 0, 0, 0, - 0, 0, 0, 0, 446, 0, 447, 523, 448, 449, - 0, 401, 402, 3, 0, 524, 525, 526, 0, 527, - 0, 403, 404, 405, 406, 407, 0, 0, 0, 0, - 0, 408, 528, 409, 529, 530, 0, 410, 0, 0, - 0, 0, 0, 0, 531, 411, 0, 0, 532, 0, - 533, 412, 0, 0, 413, 0, 8, 414, 534, 0, - 535, 415, 0, 0, 536, 537, 0, 0, 0, 0, - 0, 538, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 539, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, + 442, 443, 444, 0, 14, 0, 0, 445, 446, 0, + 0, 0, 0, 0, 0, 0, 447, 0, 448, 524, + 449, 450, 0, 402, 403, 3, 0, 525, 526, 527, + 0, 528, 0, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 529, 410, 530, 531, 0, 411, + 0, 0, 0, 0, 0, 0, 532, 412, 0, 0, + 533, 0, 534, 413, 0, 0, 414, 0, 8, 415, + 535, 0, 536, 416, 0, 0, 537, 538, 0, 0, + 0, 0, 0, 539, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 540, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 1180, 541, 0, + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 1186, + 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 402, 403, 0, + 0, 447, 0, 448, 0, 449, 450, 404, 405, 406, + 407, 408, 0, 0, 0, 0, 0, 409, 529, 410, + 530, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 0, 0, 415, 535, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 540, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 401, 402, 0, 0, 446, - 0, 447, 0, 448, 449, 403, 404, 405, 406, 407, - 0, 0, 0, 0, 0, 408, 528, 409, 529, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 0, - 0, 414, 534, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 539, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 0, 432, 433, 434, 435, + 436, 437, 438, 439, 56, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 402, 403, 0, 0, 447, 0, 448, 0, 449, + 450, 404, 405, 406, 407, 408, 0, 0, 0, 0, + 0, 409, 0, 410, 0, 0, 0, 411, 0, 0, + 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, + 0, 413, 0, 0, 414, 0, 0, 415, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 417, 0, 0, 418, 419, 823, 222, 223, 224, + 0, 226, 227, 228, 229, 230, 420, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 0, 244, + 245, 246, 0, 0, 249, 250, 251, 252, 421, 422, + 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 0, 431, 432, 433, 434, 435, 436, - 437, 438, 56, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 401, - 402, 0, 0, 446, 0, 447, 0, 448, 449, 403, - 404, 405, 406, 407, 0, 0, 0, 0, 0, 408, - 0, 409, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 0, 412, - 0, 0, 413, 0, 0, 414, 0, 0, 0, 415, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, - 0, 0, 417, 418, 822, 221, 222, 223, 0, 225, - 226, 227, 228, 229, 419, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 0, 243, 244, 245, - 0, 0, 248, 249, 250, 251, 420, 421, 422, 0, + 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, + 0, 0, 426, 427, 428, 429, 430, 0, 431, 824, + 432, 433, 434, 435, 436, 437, 438, 439, 825, 440, + 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 424, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 442, 443, 444, 0, 14, 0, 0, + 445, 446, 0, 0, 0, 0, 0, 402, 403, 826, + 0, 448, 827, 449, 450, 625, 0, 404, 405, 406, + 407, 408, 0, 0, 0, 0, 0, 409, 0, 410, + 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 626, 0, 415, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 425, 426, 427, 428, 429, 0, 430, 823, 431, 432, - 433, 434, 435, 436, 437, 438, 824, 439, 0, 0, - 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 824, 432, 433, 434, 435, + 436, 437, 438, 439, 825, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 0, 0, 402, 403, 447, 0, 448, 0, 449, + 450, 625, 0, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 0, 410, 0, 0, 0, 411, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, + 0, 0, 0, 413, 0, 0, 414, 626, 0, 415, + 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 417, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 441, 442, 443, 0, 14, 0, 0, 444, 445, - 0, 0, 0, 0, 0, 401, 402, 825, 0, 447, - 826, 448, 449, 624, 0, 403, 404, 405, 406, 407, - 0, 0, 0, 0, 0, 408, 0, 409, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 625, - 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 823, 431, 432, 433, 434, 435, 436, - 437, 438, 824, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 0, - 0, 401, 402, 446, 0, 447, 0, 448, 449, 624, - 0, 403, 404, 405, 406, 407, 0, 0, 0, 0, - 0, 408, 0, 409, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, - 0, 412, 0, 0, 413, 625, 0, 414, 0, 0, - 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 416, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 402, 403, 0, + 0, 447, 0, 448, 0, 449, 450, 404, 405, 406, + 407, 408, 0, 0, 0, 0, 0, 409, 0, 410, + 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 0, 0, 415, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 0, 432, 433, 434, 435, + 436, 437, 438, 439, 56, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 0, 0, 402, 403, 447, 497, 448, 0, 449, + 450, 616, 0, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 0, 410, 0, 0, 0, 411, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, + 0, 0, 0, 413, 0, 0, 414, 0, 0, 415, + 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 417, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 401, 402, 0, 0, 446, - 0, 447, 0, 448, 449, 403, 404, 405, 406, 407, - 0, 0, 0, 0, 0, 408, 0, 409, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 0, - 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 0, 431, 432, 433, 434, 435, 436, - 437, 438, 56, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 0, - 0, 401, 402, 446, 496, 447, 0, 448, 449, 615, - 0, 403, 404, 405, 406, 407, 0, 0, 0, 0, - 0, 408, 0, 409, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, - 0, 412, 0, 0, 413, 0, 0, 414, 0, 0, - 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 416, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 402, 403, 0, + 0, 447, 0, 448, 0, 449, 450, 404, 405, 406, + 407, 408, 0, 0, 0, 0, 0, 409, 0, 410, + 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 0, 0, 415, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 0, 432, 433, 434, 435, + 436, 437, 438, 439, 56, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 402, 403, 0, 0, 447, 695, 448, 0, 449, + 450, 404, 405, 406, 407, 408, 0, 0, 0, 0, + 0, 409, 0, 410, 0, 0, 0, 411, 0, 0, + 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, + 0, 413, 0, 0, 414, 0, 0, 415, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 417, 0, 0, 418, 419, 0, 222, 223, 224, + 0, 226, 227, 228, 229, 230, 420, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 0, 244, + 245, 246, 0, 0, 249, 250, 251, 252, 421, 422, + 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, + 0, 0, 713, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, + 0, 0, 426, 427, 428, 429, 430, 0, 431, 0, + 432, 433, 434, 435, 436, 437, 438, 439, 56, 440, + 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 401, 402, 0, 0, 446, - 0, 447, 0, 448, 449, 403, 404, 405, 406, 407, - 0, 0, 0, 0, 0, 408, 0, 409, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 0, - 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 0, 0, 0, 442, 443, 444, 0, 14, 0, 0, + 445, 446, 0, 0, 0, 402, 403, 0, 0, 447, + 0, 448, 0, 449, 450, 404, 405, 406, 407, 408, + 0, 0, 0, 0, 0, 409, 0, 410, 0, 0, + 0, 411, 0, 0, 0, 0, 0, 0, 0, 412, + 0, 0, 0, 0, 0, 413, 0, 0, 414, 0, + 0, 415, 0, 0, 0, 416, 0, 0, 0, 0, + 0, 716, 0, 0, 0, 417, 0, 0, 418, 419, + 0, 222, 223, 224, 0, 226, 227, 228, 229, 230, + 420, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 0, 244, 245, 246, 0, 0, 249, 250, + 251, 252, 421, 422, 423, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 0, 431, 432, 433, 434, 435, 436, - 437, 438, 56, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 401, - 402, 0, 0, 446, 694, 447, 0, 448, 449, 403, - 404, 405, 406, 407, 0, 0, 0, 0, 0, 408, - 0, 409, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 0, 412, - 0, 0, 413, 0, 0, 414, 0, 0, 0, 415, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, - 0, 0, 417, 418, 0, 221, 222, 223, 0, 225, - 226, 227, 228, 229, 419, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 0, 243, 244, 245, - 0, 0, 248, 249, 250, 251, 420, 421, 422, 0, + 0, 0, 0, 0, 0, 0, 426, 427, 428, 429, + 430, 0, 431, 0, 432, 433, 434, 435, 436, 437, + 438, 439, 56, 440, 0, 0, 0, 0, 0, 0, + 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 442, 443, 444, + 0, 14, 0, 0, 445, 446, 0, 0, 0, 402, + 403, 0, 0, 447, 0, 448, 0, 449, 450, 404, + 405, 406, 407, 408, 0, 0, 0, 0, 0, 409, + 0, 410, 0, 0, 0, 411, 0, 0, 0, 0, + 0, 0, 0, 412, 0, 0, 0, 0, 0, 413, + 0, 0, 414, 0, 0, 415, 0, 0, 0, 416, + 0, 0, 722, 0, 0, 0, 0, 0, 0, 417, + 0, 0, 418, 419, 0, 222, 223, 224, 0, 226, + 227, 228, 229, 230, 420, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 0, 244, 245, 246, + 0, 0, 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 424, 0, 0, 0, 0, 0, 0, 0, - 712, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 425, 426, 427, 428, 429, 0, 430, 0, 431, 432, - 433, 434, 435, 436, 437, 438, 56, 439, 0, 0, - 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, + 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 441, 442, 443, 0, 14, 0, 0, 444, 445, - 0, 0, 0, 401, 402, 0, 0, 446, 0, 447, - 0, 448, 449, 403, 404, 405, 406, 407, 0, 0, - 0, 0, 0, 408, 0, 409, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, - 0, 0, 0, 412, 0, 0, 413, 0, 0, 414, - 0, 0, 0, 415, 0, 0, 0, 0, 0, 715, - 0, 0, 0, 416, 0, 0, 417, 418, 0, 221, - 222, 223, 0, 225, 226, 227, 228, 229, 419, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 0, 243, 244, 245, 0, 0, 248, 249, 250, 251, - 420, 421, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 423, 424, 0, 0, 0, + 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, + 426, 427, 428, 429, 430, 0, 431, 0, 432, 433, + 434, 435, 436, 437, 438, 439, 56, 440, 0, 0, + 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 442, 443, 444, 0, 14, 0, 0, 445, 446, + 0, 0, 0, 402, 403, 0, 0, 447, 0, 448, + 0, 449, 450, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 0, 410, 0, 0, 0, 411, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, + 0, 0, 0, 413, 0, 0, 414, 0, 0, 415, + 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 417, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, + 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 425, 426, 427, 428, 429, 0, - 430, 0, 431, 432, 433, 434, 435, 436, 437, 438, - 56, 439, 0, 0, 0, 0, 0, 0, 440, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 402, 403, 0, + 0, 447, 0, 448, 0, 449, 450, 404, 405, 406, + 407, 408, 0, 0, 864, 0, 0, 409, 0, 410, + 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 0, 0, 415, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 441, 442, 443, 0, 14, - 0, 0, 444, 445, 0, 0, 0, 401, 402, 0, - 0, 446, 0, 447, 0, 448, 449, 403, 404, 405, - 406, 407, 0, 0, 0, 0, 0, 408, 0, 409, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 0, - 0, 411, 0, 0, 0, 0, 0, 412, 0, 0, - 413, 0, 0, 414, 0, 0, 0, 415, 0, 0, - 721, 0, 0, 0, 0, 0, 0, 416, 0, 0, - 417, 418, 0, 221, 222, 223, 0, 225, 226, 227, - 228, 229, 419, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 0, 243, 244, 245, 0, 0, - 248, 249, 250, 251, 420, 421, 422, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, - 424, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 0, 432, 433, 434, 435, + 436, 437, 438, 439, 56, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 402, 403, 0, 0, 447, 0, 448, 0, 449, + 450, 404, 405, 406, 407, 408, 0, 0, 0, 0, + 0, 409, 0, 410, 0, 0, 0, 411, 0, 0, + 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, + 0, 413, 0, 0, 414, 0, 0, 415, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 417, 0, 0, 418, 419, 0, 222, 223, 224, + 0, 226, 227, 228, 229, 230, 420, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 0, 244, + 245, 246, 0, 0, 249, 250, 251, 252, 421, 422, + 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 425, 426, - 427, 428, 429, 0, 430, 0, 431, 432, 433, 434, - 435, 436, 437, 438, 56, 439, 0, 0, 0, 0, - 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 441, - 442, 443, 0, 14, 0, 0, 444, 445, 0, 0, - 0, 401, 402, 0, 0, 446, 0, 447, 0, 448, - 449, 403, 404, 405, 406, 407, 0, 0, 0, 0, - 0, 408, 0, 409, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, - 0, 412, 0, 0, 413, 0, 0, 414, 0, 0, - 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 416, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, - 0, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, + 0, 0, 426, 427, 428, 429, 430, 0, 431, 0, + 432, 433, 434, 435, 436, 437, 438, 439, 56, 440, + 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 401, 402, 0, 0, 446, - 0, 447, 0, 448, 449, 403, 404, 405, 406, 407, - 0, 0, 863, 0, 0, 408, 0, 409, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 0, - 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 0, 0, 0, 442, 443, 444, 0, 14, 0, 0, + 445, 446, 0, 0, 0, 402, 403, 0, 0, 447, + 0, 448, 885, 449, 450, 404, 405, 406, 407, 408, + 0, 0, 0, 0, 0, 409, 0, 410, 0, 0, + 0, 411, 0, 0, 0, 0, 0, 0, 0, 412, + 0, 0, 0, 0, 0, 413, 0, 0, 414, 0, + 0, 415, 0, 0, 0, 416, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 417, 0, 0, 418, 419, + 0, 222, 223, 224, 0, 226, 227, 228, 229, 230, + 420, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 0, 244, 245, 246, 0, 0, 249, 250, + 251, 252, 421, 422, 423, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 0, 431, 432, 433, 434, 435, 436, - 437, 438, 56, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 401, - 402, 0, 0, 446, 0, 447, 0, 448, 449, 403, - 404, 405, 406, 407, 0, 0, 0, 0, 0, 408, - 0, 409, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 0, 412, - 0, 0, 413, 0, 0, 414, 0, 0, 0, 415, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, - 0, 0, 417, 418, 0, 221, 222, 223, 0, 225, - 226, 227, 228, 229, 419, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 0, 243, 244, 245, - 0, 0, 248, 249, 250, 251, 420, 421, 422, 0, + 0, 0, 0, 0, 0, 0, 426, 427, 428, 429, + 430, 0, 431, 0, 432, 433, 434, 435, 436, 437, + 438, 439, 56, 440, 0, 0, 0, 0, 0, 0, + 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 442, 443, 444, + 0, 14, 0, 0, 445, 446, 0, 0, 0, 402, + 403, 0, 0, 447, 0, 448, 1159, 449, 450, 404, + 405, 406, 407, 408, 0, 0, 0, 0, 0, 409, + 0, 410, 0, 0, 0, 411, 0, 0, 0, 0, + 0, 0, 0, 412, 0, 0, 0, 0, 0, 413, + 0, 0, 414, 0, 0, 415, 0, 0, 0, 416, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 417, + 0, 0, 418, 419, 0, 222, 223, 224, 0, 226, + 227, 228, 229, 230, 420, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 0, 244, 245, 246, + 0, 0, 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 424, 0, 0, 0, 0, 0, 0, 0, + 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 425, 426, 427, 428, 429, 0, 430, 0, 431, 432, - 433, 434, 435, 436, 437, 438, 56, 439, 0, 0, - 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, + 426, 427, 428, 429, 430, 0, 431, 0, 432, 433, + 434, 435, 436, 437, 438, 439, 56, 440, 0, 0, + 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 441, 442, 443, 0, 14, 0, 0, 444, 445, - 0, 0, 0, 401, 402, 0, 0, 446, 0, 447, - 883, 448, 449, 403, 404, 405, 406, 407, 0, 0, - 0, 0, 0, 408, 0, 409, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, - 0, 0, 0, 412, 0, 0, 413, 0, 0, 414, - 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 416, 0, 0, 417, 418, 0, 221, - 222, 223, 0, 225, 226, 227, 228, 229, 419, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 0, 243, 244, 245, 0, 0, 248, 249, 250, 251, - 420, 421, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 423, 424, 0, 0, 0, + 0, 442, 443, 444, 0, 14, 0, 0, 445, 446, + 0, 0, 0, 402, 403, 0, 0, 447, 0, 448, + 1168, 449, 450, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 0, 410, 0, 0, 0, 411, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, + 0, 0, 0, 413, 0, 0, 414, 0, 0, 415, + 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 417, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 425, 426, 427, 428, 429, 0, - 430, 0, 431, 432, 433, 434, 435, 436, 437, 438, - 56, 439, 0, 0, 0, 0, 0, 0, 440, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 441, 442, 443, 0, 14, - 0, 0, 444, 445, 0, 0, 0, 401, 402, 0, - 0, 446, 0, 447, 1155, 448, 449, 403, 404, 405, - 406, 407, 0, 0, 0, 0, 0, 408, 0, 409, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 0, - 0, 411, 0, 0, 0, 0, 0, 412, 0, 0, - 413, 0, 0, 414, 0, 0, 0, 415, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, - 417, 418, 0, 221, 222, 223, 0, 225, 226, 227, - 228, 229, 419, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 0, 243, 244, 245, 0, 0, - 248, 249, 250, 251, 420, 421, 422, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, - 424, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 0, 14, + 0, 0, 445, 446, 0, 0, 0, 402, 403, 0, + 0, 447, 0, 448, 1173, 449, 450, 404, 405, 406, + 407, 408, 0, 0, 0, 0, 0, 409, 0, 410, + 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, + 0, 412, 0, 0, 0, 0, 0, 413, 0, 0, + 414, 0, 0, 415, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, + 418, 419, 0, 222, 223, 224, 0, 226, 227, 228, + 229, 230, 420, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 0, 244, 245, 246, 0, 0, + 249, 250, 251, 252, 421, 422, 423, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 425, 426, - 427, 428, 429, 0, 430, 0, 431, 432, 433, 434, - 435, 436, 437, 438, 56, 439, 0, 0, 0, 0, - 0, 0, 440, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 441, - 442, 443, 0, 14, 0, 0, 444, 445, 0, 0, - 0, 401, 402, 0, 0, 446, 0, 447, 1164, 448, - 449, 403, 404, 405, 406, 407, 0, 0, 0, 0, - 0, 408, 0, 409, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, - 0, 412, 0, 0, 413, 0, 0, 414, 0, 0, - 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 416, 0, 0, 417, 418, 0, 221, 222, 223, - 0, 225, 226, 227, 228, 229, 419, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 0, 243, - 244, 245, 0, 0, 248, 249, 250, 251, 420, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 423, 424, 0, 0, 0, 0, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 426, 427, + 428, 429, 430, 0, 431, 0, 432, 433, 434, 435, + 436, 437, 438, 439, 56, 440, 0, 0, 0, 0, + 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 442, + 443, 444, 0, 14, 0, 0, 445, 446, 0, 0, + 0, 402, 403, 0, 0, 447, 0, 448, 1224, 449, + 450, 404, 405, 406, 407, 408, 0, 0, 0, 0, + 0, 409, 0, 410, 0, 0, 0, 411, 0, 0, + 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, + 0, 413, 0, 0, 414, 0, 0, 415, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 417, 0, 0, 418, 419, 0, 222, 223, 224, + 0, 226, 227, 228, 229, 230, 420, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 0, 244, + 245, 246, 0, 0, 249, 250, 251, 252, 421, 422, + 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 425, 426, 427, 428, 429, 0, 430, 0, - 431, 432, 433, 434, 435, 436, 437, 438, 56, 439, - 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 441, 442, 443, 0, 14, 0, 0, - 444, 445, 0, 0, 0, 401, 402, 0, 0, 446, - 0, 447, 1218, 448, 449, 403, 404, 405, 406, 407, - 0, 0, 0, 0, 0, 408, 0, 409, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 0, 0, 411, - 0, 0, 0, 0, 0, 412, 0, 0, 413, 0, - 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 416, 0, 0, 417, 418, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 420, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 0, + 0, 0, 426, 427, 428, 429, 430, 0, 431, 0, + 432, 433, 434, 435, 436, 437, 438, 439, 56, 440, + 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 442, 443, 444, 0, 14, 0, 0, + 445, 446, 0, 0, 0, 402, 403, 0, 0, 447, + 0, 448, 1304, 449, 450, 404, 405, 406, 407, 408, + 0, 0, 0, 0, 0, 409, 0, 410, 0, 0, + 0, 411, 0, 0, 0, 0, 0, 0, 0, 412, + 0, 0, 0, 0, 0, 413, 0, 0, 414, 0, + 0, 415, 0, 0, 0, 416, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 417, 0, 0, 418, 419, + 0, 222, 223, 224, 0, 226, 227, 228, 229, 230, + 420, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 0, 244, 245, 246, 0, 0, 249, 250, + 251, 252, 421, 422, 423, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 0, + 0, 0, 0, 0, 0, 0, 1320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 425, 426, 427, 428, - 429, 0, 430, 0, 431, 432, 433, 434, 435, 436, - 437, 438, 56, 439, 0, 0, 0, 0, 0, 0, - 440, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 441, 442, 443, - 0, 14, 0, 0, 444, 445, 0, 0, 0, 401, - 402, 0, 0, 446, 0, 447, 1296, 448, 449, 403, - 404, 405, 406, 407, 0, 0, 0, 0, 0, 408, - 0, 409, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 0, 412, - 0, 0, 413, 0, 0, 414, 0, 0, 0, 415, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, - 0, 0, 417, 418, 0, 221, 222, 223, 0, 225, - 226, 227, 228, 229, 419, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 0, 243, 244, 245, - 0, 0, 248, 249, 250, 251, 420, 421, 422, 0, + 0, 0, 0, 0, 0, 0, 426, 427, 428, 429, + 430, 0, 431, 0, 432, 433, 434, 435, 436, 437, + 438, 439, 56, 440, 0, 0, 0, 0, 0, 0, + 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 442, 443, 444, + 0, 14, 0, 0, 445, 446, 0, 0, 0, 402, + 403, 0, 0, 447, 0, 448, 0, 449, 450, 404, + 405, 406, 407, 408, 0, 0, 0, 0, 0, 409, + 0, 410, 0, 0, 0, 411, 0, 0, 0, 0, + 0, 0, 0, 412, 0, 0, 0, 0, 0, 413, + 0, 0, 414, 0, 0, 415, 0, 0, 0, 416, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 417, + 0, 0, 418, 419, 0, 222, 223, 224, 0, 226, + 227, 228, 229, 230, 420, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 0, 244, 245, 246, + 0, 0, 249, 250, 251, 252, 421, 422, 423, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 424, 0, 0, 0, 0, 0, 0, 0, - 1311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 425, 426, 427, 428, 429, 0, 430, 0, 431, 432, - 433, 434, 435, 436, 437, 438, 56, 439, 0, 0, - 0, 0, 0, 0, 440, 0, 0, 0, 0, 0, + 426, 427, 428, 429, 430, 0, 431, 0, 432, 433, + 434, 435, 436, 437, 438, 439, 56, 440, 0, 0, + 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 441, 442, 443, 0, 14, 0, 0, 444, 445, - 0, 0, 0, 401, 402, 0, 0, 446, 0, 447, - 0, 448, 449, 403, 404, 405, 406, 407, 0, 0, - 0, 0, 0, 408, 0, 409, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, - 0, 0, 0, 412, 0, 0, 413, 0, 0, 414, - 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 416, 0, 0, 417, 418, 0, 221, - 222, 223, 0, 225, 226, 227, 228, 229, 419, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 0, 243, 244, 245, 0, 0, 248, 249, 250, 251, - 420, 421, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 423, 424, 0, 0, 0, + 0, 442, 443, 444, 0, 14, 0, 0, 445, 446, + 0, 0, 0, 402, 403, 0, 0, 447, 0, 448, + 0, 449, 450, 404, 405, 406, 407, 408, 0, 0, + 0, 0, 0, 409, 0, 410, 0, 0, 0, 411, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, + 0, 0, 0, 413, 0, 0, 414, 0, 0, 415, + 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 417, 0, 0, 418, 419, 0, 222, + 223, 224, 0, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 421, 422, 423, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 425, 426, 427, 428, 429, 0, - 430, 0, 431, 432, 433, 434, 435, 436, 437, 438, - 56, 439, 0, 0, 0, 0, 0, 0, 440, 0, + 0, 0, 0, 0, 426, 427, 428, 429, 430, 0, + 431, 0, 432, 433, 434, 435, 436, 437, 438, 439, + 56, 440, 637, 638, 0, 0, 216, 0, 441, 0, + 0, 0, 217, 0, 0, 0, 0, 0, 218, 0, + 0, 0, 0, 0, 0, 442, 443, 444, 219, 14, + 0, 0, 445, 446, 0, 0, 220, 0, 637, 638, + 0, 1143, 0, 448, 0, 449, 450, 0, 0, 0, + 0, 221, 0, 0, 0, 0, 0, 0, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 0, 0, 0, 0, 0, 639, 640, 641, 642, + 643, 0, 0, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 55, 658, 0, 0, 0, + 637, 638, 639, 640, 641, 642, 643, 0, 255, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 504, + 653, 654, 0, 0, 0, 0, 655, 656, 657, 0, + 0, 659, 658, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 0, 0, 672, 0, 0, + 0, 0, 0, 0, 256, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 689, 639, 640, 641, 642, 643, 637, + 638, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 0, 0, 0, 0, 0, + 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 441, 442, 443, 0, 14, - 0, 0, 444, 445, 0, 0, 0, 401, 402, 0, - 0, 446, 0, 447, 0, 448, 449, 403, 404, 405, - 406, 407, 0, 0, 0, 0, 0, 408, 0, 409, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 0, - 0, 411, 0, 0, 0, 0, 0, 412, 0, 0, - 413, 0, 0, 414, 0, 0, 0, 415, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, - 417, 418, 0, 221, 222, 223, 0, 225, 226, 227, - 228, 229, 419, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 0, 243, 244, 245, 0, 0, - 248, 249, 250, 251, 420, 421, 422, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, - 424, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 0, 0, 909, 0, 0, 0, 0, + 0, 0, 0, 639, 640, 641, 642, 643, 0, 0, + 644, 645, 646, 647, 0, 648, 649, 650, 651, 652, + 0, 653, 654, 0, 0, 0, 0, 655, 656, 657, + 0, 0, 0, 658, 639, 640, 641, 642, 643, 637, + 638, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 0, 0, 0, 659, 0, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 425, 426, - 427, 428, 429, 0, 430, 0, 431, 432, 433, 434, - 435, 436, 437, 438, 56, 439, 636, 637, 0, 0, - 215, 0, 440, 0, 0, 0, 216, 0, 0, 0, - 0, 0, 217, 0, 0, 0, 0, 0, 0, 441, - 442, 443, 218, 14, 0, 0, 444, 445, 0, 0, - 219, 0, 636, 637, 0, 1140, 0, 447, 0, 448, - 449, 0, 0, 0, 0, 220, 0, 0, 0, 0, - 0, 0, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 0, 0, 0, 0, 0, - 638, 639, 640, 641, 642, 0, 0, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 0, 0, 0, 654, 655, 656, 0, 0, 55, - 657, 0, 0, 0, 636, 637, 638, 639, 640, 641, - 642, 0, 254, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 503, 652, 653, 0, 0, 0, 0, - 654, 655, 656, 0, 0, 658, 657, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 0, - 0, 688, 0, 0, 0, 0, 0, 0, 255, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 669, 670, 0, 0, 907, 638, 639, - 640, 641, 642, 636, 637, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 0, - 0, 0, 0, 0, 636, 637, 0, 0, 0, 0, + 670, 671, 0, 0, 984, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 0, 0, 987, 0, 0, 0, 0, + 0, 637, 638, 639, 640, 641, 642, 643, 0, 0, + 644, 645, 646, 647, 0, 648, 649, 650, 651, 652, + 0, 653, 654, 0, 0, 0, 0, 655, 656, 657, + 0, 0, 0, 658, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 0, 0, 982, - 0, 0, 0, 0, 0, 0, 0, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 0, 652, 653, 0, 0, 0, - 0, 654, 655, 656, 0, 0, 0, 657, 638, 639, - 640, 641, 642, 636, 637, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 0, - 0, 0, 658, 0, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 0, 0, 985, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 0, 0, 987, - 0, 0, 0, 0, 0, 636, 637, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 0, 652, 653, 0, 0, 0, - 0, 654, 655, 656, 0, 0, 0, 657, 636, 637, + 0, 0, 0, 0, 0, 0, 0, 0, 659, 0, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 670, 671, 0, 0, 989, 639, 640, 641, 642, 643, + 0, 0, 644, 645, 646, 647, 0, 648, 649, 650, + 651, 652, 0, 653, 654, 0, 0, 0, 0, 655, + 656, 657, 0, 0, 0, 658, 637, 638, 639, 640, + 641, 642, 643, 0, 0, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 0, 0, + 0, 0, 655, 656, 657, 0, 0, 0, 658, 0, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 0, 0, 997, 0, 0, 0, + 0, 0, 0, 659, 0, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 670, 671, 0, 0, 998, + 639, 640, 641, 642, 643, 637, 638, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 0, 0, 0, 0, 655, 656, 657, 0, 0, 0, + 658, 0, 0, 0, 0, 0, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 658, 0, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 0, 0, 995, 638, - 639, 640, 641, 642, 0, 0, 643, 644, 645, 646, - 0, 647, 648, 649, 650, 651, 0, 652, 653, 0, - 0, 0, 0, 654, 655, 656, 0, 0, 0, 657, - 636, 637, 638, 639, 640, 641, 642, 0, 0, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 0, - 652, 653, 0, 0, 0, 0, 654, 655, 656, 0, - 0, 0, 657, 0, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 0, 0, - 996, 0, 0, 0, 0, 0, 0, 658, 0, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, - 670, 0, 0, 997, 638, 639, 640, 641, 642, 636, - 637, 643, 644, 645, 646, 0, 647, 648, 649, 650, - 651, 0, 652, 653, 0, 0, 0, 0, 654, 655, - 656, 0, 0, 0, 657, 0, 0, 0, 0, 0, - 636, 637, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 659, 0, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 670, 671, 0, + 0, 999, 0, 0, 0, 0, 0, 0, 0, 639, + 640, 641, 642, 643, 0, 0, 644, 645, 646, 647, + 0, 648, 649, 650, 651, 652, 0, 653, 654, 0, + 0, 0, 0, 655, 656, 657, 0, 0, 0, 658, + 639, 640, 641, 642, 643, 637, 638, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 0, 0, 0, 0, 655, 656, 657, 0, 0, 0, + 658, 0, 0, 0, 659, 0, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 670, 671, 0, 0, + 1000, 0, 0, 0, 0, 659, 0, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 670, 671, 0, + 0, 1001, 0, 0, 0, 0, 0, 637, 638, 639, + 640, 641, 642, 643, 0, 0, 644, 645, 646, 647, + 0, 648, 649, 650, 651, 652, 0, 653, 654, 0, + 0, 0, 0, 655, 656, 657, 0, 0, 0, 658, + 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 658, - 0, 659, 660, 661, 662, 663, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 669, 670, 0, 0, 998, 0, 0, 0, 0, - 0, 0, 0, 638, 639, 640, 641, 642, 0, 0, - 643, 644, 645, 646, 0, 647, 648, 649, 650, 651, - 0, 652, 653, 0, 0, 0, 0, 654, 655, 656, - 0, 0, 0, 657, 638, 639, 640, 641, 642, 636, - 637, 643, 644, 645, 646, 0, 647, 648, 649, 650, - 651, 0, 652, 653, 0, 0, 0, 0, 654, 655, - 656, 0, 0, 0, 657, 0, 0, 0, 658, 0, - 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 669, 670, 0, 0, 999, 0, 0, 0, 0, 658, - 0, 659, 660, 661, 662, 663, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 669, 670, 0, 0, 1000, 0, 0, 0, 0, - 0, 636, 637, 638, 639, 640, 641, 642, 0, 0, - 643, 644, 645, 646, 0, 647, 648, 649, 650, 651, - 0, 652, 653, 0, 0, 0, 0, 654, 655, 656, - 0, 0, 0, 657, 636, 637, 0, 0, 0, 0, + 0, 0, 0, 0, 659, 0, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 670, 671, 0, 0, + 1002, 639, 640, 641, 642, 643, 0, 0, 644, 645, + 646, 647, 0, 648, 649, 650, 651, 652, 0, 653, + 654, 0, 0, 0, 0, 655, 656, 657, 0, 0, + 0, 658, 637, 638, 639, 640, 641, 642, 643, 0, + 0, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 0, 659, 0, 660, 661, + 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, + 0, 0, 1078, 0, 0, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 0, 0, 1081, 639, 640, 641, 642, + 643, 637, 638, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 0, 658, 0, 0, 0, + 0, 0, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, - 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 0, 0, 1084, 0, 0, + 0, 0, 0, 0, 0, 639, 640, 641, 642, 643, + 0, 0, 644, 645, 646, 647, 0, 648, 649, 650, + 651, 652, 0, 653, 654, 0, 0, 0, 0, 655, + 656, 657, 0, 0, 0, 658, 639, 640, 641, 642, + 643, 637, 638, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 0, 658, 0, 0, 0, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 0, 0, 1109, 0, 0, 0, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 0, 0, 1180, 0, 0, + 0, 0, 0, 637, 638, 639, 640, 641, 642, 643, + 0, 0, 644, 645, 646, 647, 0, 648, 649, 650, + 651, 652, 0, 653, 654, 0, 0, 0, 0, 655, + 656, 657, 0, 0, 0, 658, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 669, 670, 0, 0, 1075, 638, 639, 640, 641, 642, - 0, 0, 643, 644, 645, 646, 0, 647, 648, 649, - 650, 651, 0, 652, 653, 0, 0, 0, 0, 654, - 655, 656, 0, 0, 0, 657, 636, 637, 638, 639, - 640, 641, 642, 0, 0, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 0, - 658, 0, 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 669, 670, 0, 0, 1078, 0, 0, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 0, 0, 1081, - 638, 639, 640, 641, 642, 636, 637, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 0, 0, 0, 654, 655, 656, 0, 0, 0, - 657, 0, 0, 0, 0, 0, 636, 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 658, 0, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 0, - 0, 1106, 0, 0, 0, 0, 0, 0, 0, 638, - 639, 640, 641, 642, 0, 0, 643, 644, 645, 646, - 0, 647, 648, 649, 650, 651, 0, 652, 653, 0, - 0, 0, 0, 654, 655, 656, 0, 0, 0, 657, - 638, 639, 640, 641, 642, 636, 637, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 0, 0, 0, 654, 655, 656, 0, 0, 0, - 657, 0, 0, 0, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 0, 0, - 1174, 0, 0, 0, 0, 658, 0, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 0, - 0, 1182, 0, 0, 0, 0, 0, 636, 637, 638, - 639, 640, 641, 642, 0, 0, 643, 644, 645, 646, - 0, 647, 648, 649, 650, 651, 0, 652, 653, 0, - 0, 0, 0, 654, 655, 656, 0, 0, 0, 657, - 636, 637, 0, 0, 0, 0, 0, 0, 0, 0, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 0, 0, 1188, 639, 640, 641, + 642, 643, 0, 0, 644, 645, 646, 647, 0, 648, + 649, 650, 651, 652, 0, 653, 654, 0, 0, 0, + 0, 655, 656, 657, 0, 0, 0, 658, 637, 638, + 639, 640, 641, 642, 643, 0, 0, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 0, 0, 0, 0, 655, 656, 657, 0, 0, 0, + 658, 0, 659, 0, 660, 661, 662, 663, 664, 665, + 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 670, 671, 0, 0, 1229, 0, + 0, 0, 0, 0, 0, 659, 0, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 670, 671, 0, + 0, 1230, 639, 640, 641, 642, 643, 637, 638, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 0, 0, 0, 0, 655, 656, 657, 0, + 0, 0, 658, 0, 0, 0, 0, 0, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 0, 0, - 1223, 638, 639, 640, 641, 642, 0, 0, 643, 644, - 645, 646, 0, 647, 648, 649, 650, 651, 0, 652, - 653, 0, 0, 0, 0, 654, 655, 656, 0, 0, - 0, 657, 636, 637, 638, 639, 640, 641, 642, 0, - 0, 643, 644, 645, 646, 0, 647, 648, 649, 650, - 651, 0, 652, 653, 0, 0, 0, 0, 654, 655, - 656, 0, 0, 0, 657, 0, 658, 0, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 669, 670, - 0, 0, 1224, 0, 0, 0, 0, 0, 0, 658, - 0, 659, 660, 661, 662, 663, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 669, 670, 0, 0, 1227, 638, 639, 640, 641, - 642, 636, 637, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 0, 0, 0, 0, - 654, 655, 656, 0, 0, 0, 657, 0, 0, 0, - 0, 0, 636, 637, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 1233, 0, 0, 0, 0, 0, 0, + 0, 639, 640, 641, 642, 643, 0, 0, 644, 645, + 646, 647, 0, 648, 649, 650, 651, 652, 0, 653, + 654, 0, 0, 0, 0, 655, 656, 657, 0, 0, + 0, 658, 639, 640, 641, 642, 643, 637, 638, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 0, 0, 0, 0, 655, 656, 657, 0, + 0, 0, 658, 0, 0, 0, 659, 0, 660, 661, + 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, + 0, 0, 1251, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 1253, 0, 0, 0, 0, 0, 637, + 638, 639, 640, 641, 642, 643, 0, 0, 644, 645, + 646, 647, 0, 648, 649, 650, 651, 652, 0, 653, + 654, 0, 0, 0, 0, 655, 656, 657, 0, 0, + 0, 658, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 669, 670, 0, 0, 1244, 0, 0, - 0, 0, 0, 0, 0, 638, 639, 640, 641, 642, - 0, 0, 643, 644, 645, 646, 0, 647, 648, 649, - 650, 651, 0, 652, 653, 0, 0, 0, 0, 654, - 655, 656, 0, 0, 0, 657, 638, 639, 640, 641, - 642, 636, 637, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 0, 0, 0, 0, - 654, 655, 656, 0, 0, 0, 657, 0, 0, 0, - 658, 0, 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 669, 670, 0, 0, 1246, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 669, 670, 0, 0, 1248, 0, 0, - 0, 0, 0, 636, 637, 638, 639, 640, 641, 642, - 0, 0, 643, 644, 645, 646, 0, 647, 648, 649, - 650, 651, 0, 652, 653, 0, 0, 0, 0, 654, - 655, 656, 0, 0, 0, 657, 636, 637, 0, 0, + 0, 0, 0, 0, 0, 0, 659, 0, 660, 661, + 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, + 0, 0, 1255, 639, 640, 641, 642, 643, 0, 0, + 644, 645, 646, 647, 0, 648, 649, 650, 651, 652, + 0, 653, 654, 0, 0, 0, 0, 655, 656, 657, + 0, 0, 0, 658, 637, 638, 639, 640, 641, 642, + 643, 0, 0, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 0, 658, 0, 659, 0, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 670, 671, 0, 0, 1259, 0, 0, 0, 0, 0, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 0, 0, 1274, 639, 640, + 641, 642, 643, 637, 638, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 0, 0, + 0, 0, 655, 656, 657, 0, 0, 0, 658, 0, + 0, 0, 0, 0, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 658, 0, 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 669, 670, 0, 0, 1252, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 0, 652, 653, 0, 0, 0, - 0, 654, 655, 656, 0, 0, 0, 657, 636, 637, - 638, 639, 640, 641, 642, 0, 0, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 0, 0, 0, 654, 655, 656, 0, 0, 0, - 657, 0, 658, 0, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 0, 0, 1266, 0, - 0, 0, 0, 0, 0, 658, 0, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 0, - 0, 1317, 638, 639, 640, 641, 642, 636, 637, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 0, - 652, 653, 0, 0, 0, 0, 654, 655, 656, 0, - 0, 0, 657, 0, 0, 0, 0, 0, 636, 637, + 0, 0, 0, 659, 0, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 670, 671, 0, 0, 1326, + 0, 0, 0, 0, 0, 0, 0, 639, 640, 641, + 642, 643, 0, 0, 644, 645, 646, 647, 0, 648, + 649, 650, 651, 652, 0, 653, 654, 0, 0, 0, + 0, 655, 656, 657, 0, 0, 0, 658, 639, 640, + 641, 642, 643, 637, 638, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 0, 0, + 0, 0, 655, 656, 657, 0, 0, 0, 658, 0, + 0, 0, 659, 0, 660, 661, 662, 663, 664, 665, + 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 670, 671, 0, 0, 1327, 0, + 0, 0, 0, 659, 0, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 670, 671, 0, 0, 1328, + 0, 0, 0, 0, 0, 637, 638, 639, 640, 641, + 642, 643, 0, 0, 644, 645, 646, 647, 0, 648, + 649, 650, 651, 652, 0, 653, 654, 0, 0, 0, + 0, 655, 656, 657, 0, 0, 0, 658, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 658, 0, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, - 670, 0, 0, 1318, 0, 0, 0, 0, 0, 0, - 0, 638, 639, 640, 641, 642, 0, 0, 643, 644, - 645, 646, 0, 647, 648, 649, 650, 651, 0, 652, - 653, 0, 0, 0, 0, 654, 655, 656, 0, 0, - 0, 657, 638, 639, 640, 641, 642, 636, 637, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 0, - 652, 653, 0, 0, 0, 0, 654, 655, 656, 0, - 0, 0, 657, 0, 0, 0, 658, 0, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 669, 670, - 0, 0, 1319, 0, 0, 0, 0, 658, 0, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, - 670, 0, 0, 1341, 0, 0, 0, 0, 0, 636, - 637, 638, 639, 640, 641, 642, 0, 0, 643, 644, - 645, 646, 0, 647, 648, 649, 650, 651, 0, 652, - 653, 0, 0, 0, 0, 654, 655, 656, 0, 0, - 0, 657, 636, 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 659, 0, 660, 661, 662, 663, 664, 665, + 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 670, 671, 0, 0, 1350, 639, + 640, 641, 642, 643, 0, 0, 644, 645, 646, 647, + 0, 648, 649, 650, 651, 652, 0, 653, 654, 0, + 0, 0, 0, 655, 656, 657, 0, 0, 0, 658, + 637, 638, 639, 640, 641, 642, 643, 0, 0, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 0, 0, 0, 0, 655, 656, 657, 0, + 0, 0, 658, 0, 659, 0, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 670, 671, 0, 0, + 1361, 0, 0, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 1371, 639, 640, 641, 642, 643, 637, + 638, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 0, 0, 0, 0, 0, + 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 658, 0, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 669, 670, - 0, 0, 1352, 638, 639, 640, 641, 642, 0, 0, - 643, 644, 645, 646, 0, 647, 648, 649, 650, 651, - 0, 652, 653, 0, 0, 0, 0, 654, 655, 656, - 0, 0, 0, 657, 636, 637, 638, 639, 640, 641, - 642, 0, 0, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 0, 0, 0, 0, - 654, 655, 656, 0, 0, 0, 657, 0, 658, 0, - 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 0, 0, 1406, 0, 0, 0, 0, + 0, 0, 0, 639, 640, 641, 642, 643, 0, 0, + 644, 645, 646, 647, 0, 648, 649, 650, 651, 652, + 0, 653, 654, 0, 0, 0, 0, 655, 656, 657, + 637, 638, 0, 658, 639, 640, 641, 642, 643, 0, + 0, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 637, 638, 0, 658, 0, 0, 0, 659, 0, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 669, 670, 0, 0, 1362, 0, 0, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 669, 670, 0, 0, 1396, 638, 639, - 640, 641, 642, 636, 637, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 0, - 0, 0, 0, 0, 636, 637, 0, 0, 0, 0, + 670, 671, 0, 0, 1416, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 694, 639, 640, 641, 642, 643, 0, + 0, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 637, 638, 0, 658, 639, 640, 641, 642, 643, + 0, 0, 644, 645, 646, 647, 0, 648, 649, 650, + 651, 652, 0, 653, 654, 0, 0, 0, 0, 655, + 656, 657, 637, 638, 0, 658, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 905, 0, 0, 0, 0, 0, 0, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 1038, 639, 640, 641, 642, 643, + 0, 0, 644, 645, 646, 647, 0, 648, 649, 650, + 651, 652, 0, 653, 654, 0, 0, 0, 0, 655, + 656, 657, 637, 638, 0, 658, 639, 640, 641, 642, + 643, 0, 0, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 0, 658, 0, 0, 0, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 1054, 0, 0, 0, 0, 0, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 1166, 639, 640, 641, 642, + 643, 637, 638, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, + 655, 656, 657, 0, 0, 0, 658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 0, 0, 1406, - 0, 0, 0, 0, 0, 0, 0, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 0, 652, 653, 0, 0, 0, - 0, 654, 655, 656, 636, 637, 0, 657, 638, 639, - 640, 641, 642, 0, 0, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 636, 637, 0, 657, 0, - 0, 0, 658, 0, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 693, 0, 0, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 903, 638, 639, - 640, 641, 642, 0, 0, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 636, 637, 0, 657, 638, - 639, 640, 641, 642, 0, 0, 643, 644, 645, 646, - 0, 647, 648, 649, 650, 651, 0, 652, 653, 0, - 0, 0, 0, 654, 655, 656, 636, 637, 0, 657, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 1036, 0, 0, - 0, 0, 0, 0, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 1051, 638, - 639, 640, 641, 642, 0, 0, 643, 644, 645, 646, - 0, 647, 648, 649, 650, 651, 0, 652, 653, 0, - 0, 0, 0, 654, 655, 656, 0, 0, 0, 657, - 638, 639, 640, 641, 642, 636, 637, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 0, 0, 0, 654, 655, 656, 0, 0, 0, - 657, 0, 0, 0, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 1162, 0, - 0, 0, 0, 0, 0, 658, 0, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 1167, - 0, 740, 741, 742, 743, 744, 745, 746, 747, 638, - 639, 640, 641, 642, 748, 749, 643, 644, 645, 646, - 750, 647, 648, 649, 650, 651, 751, 652, 653, 752, - 753, 267, 268, 654, 655, 656, 754, 755, 756, 657, - 0, 0, 0, 0, 0, 0, 0, 0, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 636, 637, 0, 0, -317, 0, 0, 0, - 0, 0, 0, 757, 658, 0, 659, 660, 661, 662, - 663, 664, 665, 666, 667, 668, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 669, 670, 0, 0, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 670, 671, 1171, 0, 741, 742, 743, + 744, 745, 746, 747, 748, 639, 640, 641, 642, 643, + 749, 750, 644, 645, 646, 647, 751, 648, 649, 650, + 651, 652, 752, 653, 654, 753, 754, 268, 269, 655, + 656, 657, 755, 756, 757, 658, 0, 0, 0, 0, + 0, 0, 0, 0, 270, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 637, 638, + 0, 0, -319, 0, 0, 0, 0, 0, 0, 758, + 659, 0, 660, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 670, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 0, 0, 288, 289, 290, - 0, 0, 291, 292, 293, 294, 295, 0, 0, 296, - 297, 298, 299, 300, 301, 302, 638, 639, 640, 641, - 642, 636, 637, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 0, 0, 809, 0, - 654, 655, 656, 0, 0, 0, 657, 0, 0, 0, - 303, 0, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 0, 0, 314, 315, 0, 0, 0, 0, - 0, 0, 316, 317, 0, 0, 0, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 669, 670, 0, 0, 0, 0, 0, - 636, 637, 0, 0, 0, 638, 639, 640, 641, 642, - 0, 0, 643, 644, 645, 646, 0, 647, 648, 649, - 650, 651, 0, 652, 653, 0, 0, 0, 0, 654, - 655, 656, 636, 637, 0, 657, 0, 0, 0, 0, + 0, 0, 0, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 0, 0, 289, 290, 291, 0, 0, 292, 293, + 294, 295, 296, 0, 0, 297, 298, 299, 300, 301, + 302, 303, 639, 640, 641, 642, 643, 637, 638, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 0, 0, 810, 0, 655, 656, 657, 0, + 0, 0, 658, 0, 0, 0, 304, 0, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, + 315, 316, 0, 0, 0, 0, 0, 0, 317, 318, + 0, 0, 0, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 0, 0, 0, 637, 638, 0, 0, + 0, 639, 640, 641, 642, 643, 0, 0, 644, 645, + 646, 647, 0, 648, 649, 650, 651, 652, 0, 653, + 654, 0, 0, 0, 0, 655, 656, 657, 637, 638, + 0, 658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 962, 0, + 0, 0, 0, 0, 0, 0, 659, 0, 660, 661, + 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 670, 671, + 639, 640, 641, 642, 643, 0, 0, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 637, 638, 0, 0, 655, 656, 657, 0, 0, 0, + 658, 0, 639, 640, 641, 642, 643, 0, 0, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 637, 638, 0, 0, 655, 656, 657, 0, + 0, 0, 658, 0, 0, 659, 1043, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 670, 671, 1100, + 0, 0, 0, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 639, 640, 641, 642, 643, 670, + 671, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 637, 638, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 0, 639, 640, 641, 642, + 643, 0, 0, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 0, 1130, 637, 638, + 655, 656, 657, 0, 0, 0, 658, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 1344, 0, 0, 0, 0, 0, 0, + 0, 659, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 639, 640, + 641, 642, 643, 670, 671, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 0, 0, + 637, 638, 655, 656, 657, 0, 0, 0, 658, 0, + 0, 0, 639, 640, 641, 642, 643, 0, 0, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 0, 0, 0, 1362, 655, 656, 657, 0, + 0, 0, 658, 659, 0, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 670, 671, 0, 0, 1380, + 0, 0, 0, 0, 0, 0, 0, 659, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 637, + 638, 0, 0, 0, 639, 640, 641, 642, 643, 670, + 671, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 0, 0, 0, 0, 655, 656, + 657, 0, 0, 0, 658, 637, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 960, 0, 0, 0, 0, 0, 0, 0, - 658, 0, 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 669, 670, 638, 639, 640, 641, 642, 0, - 0, 643, 644, 645, 646, 0, 647, 648, 649, 650, - 651, 0, 652, 653, 636, 637, 0, 0, 654, 655, - 656, 0, 0, 0, 657, 0, 638, 639, 640, 641, - 642, 0, 0, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 636, 637, 0, 0, - 654, 655, 656, 0, 0, 0, 657, 0, 0, 658, - 1041, 659, 660, 661, 662, 663, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 669, 670, 1097, 0, 0, 0, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 638, 639, - 640, 641, 642, 669, 670, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 636, 637, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 0, - 638, 639, 640, 641, 642, 0, 0, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 0, 1127, 636, 637, 654, 655, 656, 0, 0, 0, - 657, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 1335, 0, 0, - 0, 0, 0, 0, 0, 658, 0, 659, 660, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 638, 639, 640, 641, 642, 669, 670, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 0, - 652, 653, 0, 0, 636, 637, 654, 655, 656, 0, - 0, 0, 657, 0, 0, 0, 638, 639, 640, 641, - 642, 0, 0, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 0, 0, 0, 1353, - 654, 655, 656, 0, 0, 0, 657, 658, 0, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, - 670, 0, 0, 1370, 0, 0, 0, 0, 0, 0, - 0, 658, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 636, 637, 0, 0, 0, 638, 639, - 640, 641, 642, 669, 670, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, - 0, 0, 654, 655, 656, 0, 0, 0, 657, 636, - 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1398, 0, 0, 0, 0, - 0, 0, 0, 658, 0, 659, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 669, 670, 638, 639, 640, - 641, 642, 0, 0, 643, 644, 645, 646, 0, 647, - 648, 649, 650, 651, 0, 652, 653, 0, 0, 0, - 0, 654, 655, 656, 0, 0, 0, 657, 636, 637, - 0, 0, 0, 638, 639, 640, 641, 642, 0, 0, - 643, 644, 645, 646, 0, 647, 648, 649, 650, 651, - 0, 652, 653, 0, 1417, 0, 0, 654, 655, 656, - 636, 637, 658, 657, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 669, 670, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, - 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 0, 1408, 0, 0, 0, 0, 0, 0, 0, 659, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 670, 671, 639, 640, 641, 642, 643, 0, 0, + 644, 645, 646, 647, 0, 648, 649, 650, 651, 652, + 0, 653, 654, 0, 0, 0, 0, 655, 656, 657, + 0, 0, 0, 658, 637, 638, 0, 0, 0, 639, + 640, 641, 642, 643, 0, 0, 644, 645, 646, 647, + 0, 648, 649, 650, 651, 652, 0, 653, 654, 0, + 1427, 0, 0, 655, 656, 657, 637, 638, 659, 658, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 669, 670, 638, 639, 640, 641, 642, 0, 0, 643, - 644, 645, 646, 0, 647, 648, 649, 650, 651, 0, - 652, 653, 636, 637, 0, 0, 654, 655, 656, 0, - 0, 0, -684, 0, 638, 639, 640, 641, 642, 0, - 0, 643, 644, 645, 646, 0, 647, 648, 649, 650, - 651, 0, 652, 653, 636, 637, 0, 0, 654, 0, - 656, 0, 0, 0, 0, 0, 0, 658, 0, 659, - 660, 661, 662, 663, 664, 665, 666, 667, 668, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 669, - 670, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 659, 660, 661, 662, 663, 664, 665, 666, 667, - 668, 0, 0, 0, 0, 0, 638, 639, 640, 641, - 642, 669, 670, 643, 644, 645, 646, 0, 647, 648, - 649, 650, 651, 0, 652, 653, 636, 637, 0, 0, - 654, 0, 0, 0, 0, 0, 0, 0, 638, 639, - 640, 641, 642, 0, 0, 643, 644, 645, 646, 0, - 647, 648, 649, 650, 651, 0, 652, 653, 0, 0, + 670, 671, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 659, 0, 660, 661, 662, 663, + 664, 665, 666, 667, 668, 669, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 670, 671, 639, 640, + 641, 642, 643, 0, 0, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 637, 638, + 0, 0, 655, 656, 657, 0, 0, 0, -688, 0, + 639, 640, 641, 642, 643, 0, 0, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 637, 638, 0, 0, 655, 656, 657, 0, 0, 0, + 0, 0, 0, 659, 0, 660, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 670, 671, 0, 0, 0, + 0, 0, 0, 0, 0, 659, 0, 660, 661, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 639, 640, 641, 642, 643, 670, 671, 644, + 645, 646, 647, 0, 648, 649, 650, 651, 652, 0, + 653, 654, 637, 638, 0, 0, 655, 0, 657, 0, + 0, 0, 0, 0, 639, 640, 641, 642, 643, 0, + 0, 644, 645, 646, 647, 0, 648, 649, 650, 651, + 652, 0, 653, 654, 637, 638, 0, 0, 655, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 660, + 661, 662, 663, 664, 665, 666, 667, 668, 669, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, + 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 0, 0, 0, 0, 0, 639, 640, 641, 642, + 643, 670, 671, 644, 645, 646, 647, 0, 648, 649, + 650, 651, 652, 0, 653, 654, 637, 638, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 639, 640, + 641, 642, 643, 0, 0, 644, 645, 646, 647, 0, + 648, 649, 650, 651, 652, 0, 653, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 659, 660, 661, 662, 663, 664, 665, - 666, 667, 668, 0, 0, 0, 0, 0, 835, 0, - 0, 0, 0, 669, 670, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 660, 661, 662, 663, - 664, 665, 666, 667, 668, 0, 0, 0, 0, 0, - 638, 639, 640, 641, 642, 669, 670, 643, 644, 645, - 646, 0, 647, 648, 649, 650, 651, 0, 652, 653, - 221, 222, 223, 0, 225, 226, 227, 228, 229, 419, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 0, 243, 244, 245, 0, 0, 248, 249, 250, - 251, 0, 0, 0, 0, 0, 839, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, - 662, 663, 664, 665, 666, 667, 668, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 669, 670, 1037, + 0, 0, 0, 660, 661, 662, 663, 664, 665, 666, + 667, 668, 669, 0, 0, 0, 0, 0, 836, 0, + 0, 0, 0, 670, 671, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 661, 662, 663, 664, + 665, 666, 667, 668, 669, 0, 0, 0, 0, 0, + 639, 640, 641, 642, 643, 670, 671, 644, 645, 646, + 647, 0, 648, 649, 650, 651, 652, 0, 653, 654, + 222, 223, 224, 0, 226, 227, 228, 229, 230, 420, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 0, 244, 245, 246, 0, 0, 249, 250, 251, + 252, 0, 0, 0, 0, 0, 840, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, + 663, 664, 665, 666, 667, 668, 669, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 670, 671, 1039, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 836, 0, 0, 0, 0, 0, 221, 222, - 223, 837, 225, 226, 227, 228, 229, 419, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, - 243, 244, 245, 0, 0, 248, 249, 250, 251, 0, - 0, 221, 222, 223, 0, 225, 226, 227, 228, 229, - 419, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 0, 243, 244, 245, 0, 0, 248, 249, - 250, 251, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 837, 0, 0, 0, 0, 0, 222, 223, + 224, 838, 226, 227, 228, 229, 230, 420, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 0, + 244, 245, 246, 0, 0, 249, 250, 251, 252, 0, + 0, 222, 223, 224, 0, 226, 227, 228, 229, 230, + 420, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 242, 0, 244, 245, 246, 0, 0, 249, 250, + 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 840, 0, 0, 0, 0, 0, 0, 0, 0, 841, + 841, 0, 0, 0, 0, 0, 0, 0, 0, 842, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1038, 0, 0, 0, 0, 0, 0, - 0, 0, 1039 + 0, 0, 0, 1040, 0, 172, 0, 0, 0, 222, + 223, 224, 1041, 226, 227, 228, 229, 230, 420, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 0, 244, 245, 246, 0, 0, 249, 250, 251, 252, + 0, 173, 0, 174, 0, 175, 176, 177, 178, 179, + 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 0, 191, 192, 193, 876, 877, 194, 195, + 196, 197, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 198, 199, 0, + 0, 878, 0, 0, 0, 0, 0, 0, 0, 0, + 879, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, + 880, 881 }; static const yytype_int16 yycheck[] = { - 14, 15, 630, 165, 530, 569, 368, 708, 775, 480, - 152, 482, 538, 484, 165, 679, 485, 681, 632, 683, - 78, 810, 565, 933, 486, 5, 8, 20, 0, 446, - 447, 33, 615, 395, 22, 7, 21, 22, 440, 125, - 372, 624, 128, 129, 458, 1213, 60, 61, 62, 20, - 834, 150, 46, 20, 20, 147, 15, 16, 30, 162, - 32, 822, 34, 1336, 162, 170, 126, 137, 40, 57, - 162, 150, 19, 20, 181, 618, 172, 184, 50, 1302, - 1300, 128, 129, 626, 56, 628, 100, 101, 102, 103, - 128, 129, 155, 191, 5, 6, 139, 140, 141, 1372, - 170, 126, 207, 208, 207, 33, 153, 132, 80, 208, - 1278, 1279, 106, 205, 25, 162, 202, 203, 178, 179, - 31, 181, 102, 103, 184, 126, 1294, 206, 711, 208, - 102, 103, 117, 118, 170, 1358, 1356, 7, 15, 16, - 125, 153, 127, 128, 129, 130, 131, 47, 691, 207, - 162, 165, 138, 567, 179, 202, 203, 68, 69, 184, - 138, 21, 22, 206, 202, 203, 57, 67, 172, 205, - 62, 126, 63, 590, 506, 1343, 1344, 132, 179, 511, - 50, 182, 184, 600, 162, 178, 603, 34, 172, 171, - 592, 102, 103, 205, 822, 181, 155, 825, 21, 22, - 172, 160, 190, 162, 163, 185, 368, 178, 969, 371, - 994, 178, 178, 630, 202, 162, 63, 202, 203, 191, - 634, 203, 206, 385, 179, 205, 170, 138, 178, 591, - 813, 203, 178, 395, 385, 153, 398, 399, 400, 178, - 783, 255, 785, 605, 162, 577, 205, 398, 399, 400, - 793, 162, 178, 796, 204, 672, 184, 117, 118, 170, - 206, 205, 178, 178, 178, 125, 179, 206, 128, 129, - 130, 131, 178, 153, 185, 203, 1186, 181, 155, 337, - 206, 209, 162, 160, 131, 162, 163, 126, 206, 204, - 206, 138, 203, 132, 117, 118, 5, 6, 185, 8, - 206, 162, 125, 178, 127, 128, 129, 130, 131, 33, - 178, 178, 926, 475, 476, 162, 126, 479, 205, 481, - 178, 483, 132, 485, 475, 476, 206, 36, 479, 126, - 481, 206, 483, 172, 178, 132, 60, 61, 206, 206, - 179, 969, 202, 203, 126, 126, 204, 172, 195, 178, - 132, 132, 138, 685, 368, 687, 138, 371, 205, 178, - 831, 178, 172, 1027, 187, 188, 189, 190, 191, 179, - 126, 385, 1073, 178, 1340, 389, 132, 206, 162, 202, - 203, 395, 179, 1349, 398, 399, 400, 206, 162, 206, - 162, 405, 406, 919, 21, 22, 126, 179, 179, 123, - 172, 206, 132, 127, 147, 1172, 178, 162, 825, 771, - 772, 57, 162, 181, 1380, 1381, 181, 63, 186, 162, - 782, 186, 205, 179, 185, 787, 788, 896, 790, 591, - 792, 1220, 794, 795, 181, 797, 898, 205, 155, 186, - 205, 1142, 181, 605, 205, 57, 182, 186, 138, 179, - 186, 63, 784, 60, 61, 62, 180, 147, 205, 138, - 184, 475, 476, 187, 185, 479, 205, 481, 147, 483, - 1134, 485, 162, 152, 636, 637, 57, 185, 172, 203, - 164, 165, 63, 162, 205, 209, 1150, 185, 202, 651, - 117, 118, 186, 100, 101, 102, 103, 205, 125, 12, - 127, 128, 129, 130, 131, 75, 185, 205, 172, 79, - 23, 24, 1140, 178, 178, 57, 181, 162, 1285, 184, - 162, 63, 186, 93, 94, 1089, 1227, 689, 98, 99, - 100, 101, 162, 153, 172, 172, 698, 153, 689, 701, - 178, 178, 162, 1014, 153, 182, 162, 698, 186, 1075, - 701, 172, 1078, 162, 172, 1081, 164, 178, 1029, 162, - 178, 153, 189, 190, 191, 186, 172, 899, 186, 153, - 162, 162, 178, 57, 179, 202, 203, 591, 162, 63, - 186, 178, 172, 57, 181, 1002, 57, 184, 178, 1006, - 172, 605, 63, 182, 172, 172, 178, 186, 170, 1125, - 178, 178, 182, 182, 164, 165, 186, 186, 770, 771, - 772, 773, 974, 975, 976, 629, 778, 1034, 980, 770, - 782, 763, 773, 1149, 1188, 787, 788, 778, 790, 1046, - 792, 164, 794, 795, 182, 797, 182, 182, 186, 971, - 186, 186, 182, 182, 182, 182, 186, 186, 186, 186, - 170, 1013, 164, 165, 166, 167, 139, 140, 141, 1076, - 139, 1362, 141, 170, 1207, 181, 139, 1295, 164, 165, - 166, 10, 11, 12, 106, 689, 208, 35, 35, 205, - 170, 170, 162, 208, 698, 162, 185, 701, 185, 204, - 21, 22, 185, 185, 205, 205, 205, 185, 185, 185, - 185, 863, 162, 185, 185, 1269, 182, 185, 162, 1126, - 162, 162, 22, 1130, 162, 181, 1242, 1345, 181, 162, - 170, 178, 162, 1140, 132, 162, 1088, 21, 22, 204, - 185, 203, 1258, 1259, 896, 205, 162, 205, 185, 185, - 185, 185, 203, 205, 185, 1373, 205, 185, 206, 185, - 185, 913, 205, 162, 171, 162, 770, 771, 772, 773, - 162, 181, 913, 205, 778, 171, 205, 1331, 782, 162, - 155, 205, 205, 787, 788, 205, 790, 208, 792, 204, - 794, 795, 205, 797, 115, 116, 117, 118, 119, 1151, - 205, 122, 1420, 205, 125, 205, 127, 128, 129, 130, - 131, 205, 133, 134, 172, 1348, 37, 172, 172, 205, - 10, 172, 974, 975, 976, 66, 172, 172, 980, 172, - 172, 115, 116, 117, 118, 119, 172, 172, 122, 123, - 124, 125, 1375, 127, 128, 129, 130, 131, 179, 133, - 134, 178, 186, 205, 178, 139, 140, 141, 13, 185, - 185, 1013, 185, 178, 185, 186, 187, 188, 189, 190, - 191, 4, 205, 162, 171, 205, 208, 43, 206, 14, - 1396, 202, 203, 179, 1400, 1292, 181, 155, 170, 205, - 8, 70, 896, 162, 186, 171, 180, 35, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 206, 913, - 204, 178, 205, 185, 205, 205, 1268, 1069, 202, 203, - 206, 185, 205, 1, 21, 22, 205, 205, 1069, 162, - 205, 205, 205, 71, 205, 73, 1088, 75, 76, 77, - 78, 79, 186, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 186, 93, 94, 95, 186, 162, - 98, 99, 100, 101, 162, 205, 43, 162, 67, 171, - 974, 975, 976, 172, 345, 186, 980, 186, 186, 117, - 118, 206, 206, 205, 355, 186, 206, 206, 206, 186, - 186, 205, 186, 186, 365, 186, 206, 186, 185, 1151, - 205, 1153, 43, 162, 162, 205, 162, 12, 186, 1013, - 162, 186, 1153, 205, 186, 186, 387, 205, 115, 116, - 117, 118, 119, 206, 162, 122, 123, 124, 125, 205, - 127, 128, 129, 130, 131, 186, 133, 134, 206, 162, - 205, 162, 139, 140, 141, 162, 162, 162, 145, 43, - 33, 205, 423, 424, 186, 205, 205, 186, 206, 205, - 205, 205, 205, 205, 186, 1069, 206, 172, 162, 440, - 441, 442, 443, 444, 445, 205, 172, 205, 205, 205, - 53, 206, 206, 180, 1088, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 206, 206, 1249, 171, 178, - 204, 172, 614, 206, 206, 202, 203, 205, 1249, 206, - 77, 206, 1, 206, 206, 204, 1268, 42, 206, 206, - 129, 80, 1416, 213, 1264, 99, 1288, 498, 1264, 1264, - 1264, 1264, 1, 1237, 1191, 1194, 520, 1276, 1093, 1277, - 51, 759, 405, 465, 405, 516, 1345, 1151, -1, 1153, - -1, -1, -1, 21, 22, -1, -1, 528, -1, -1, - 531, -1, -1, -1, -1, -1, 537, -1, 539, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 573, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 592, 593, -1, -1, 596, -1, 598, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 608, 609, 610, - 611, 612, 613, -1, -1, 1249, -1, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, 1268, 133, 134, 638, 639, -1, - -1, 642, 643, 644, 645, -1, 647, -1, 649, 650, - 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 664, 665, 666, 667, 668, 1302, 670, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, -1, 710, - -1, 712, -1, -1, 715, -1, 717, -1, -1, -1, - -1, -1, -1, 724, 1358, -1, -1, -1, 729, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 740, - 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, - 751, 752, 753, 754, 755, 756, 757, 758, -1, -1, - -1, -1, -1, -1, 765, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 777, -1, -1, -1, - 19, -1, -1, -1, -1, -1, 25, -1, -1, -1, - -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 806, -1, -1, 809, 810, - 49, -1, -1, 814, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, - -1, 832, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 876, -1, -1, -1, 880, - 19, -1, -1, -1, -1, -1, 25, -1, 21, 22, - -1, -1, 31, -1, -1, -1, -1, -1, -1, 138, - -1, -1, 41, -1, -1, -1, -1, 908, -1, -1, - 49, -1, 151, -1, 915, -1, -1, -1, -1, -1, - -1, 922, -1, 162, -1, 64, -1, 928, -1, -1, - -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, 207, -1, - 209, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, 138, - 133, 134, -1, -1, -1, -1, -1, -1, -1, -1, - 1011, 1012, 151, -1, -1, -1, -1, 1018, 1019, 1020, - -1, 1022, -1, 162, -1, -1, -1, -1, -1, -1, - 1031, -1, 1033, 172, 1035, -1, -1, -1, -1, 178, - 1041, -1, -1, -1, 1045, -1, -1, -1, -1, -1, - -1, 1052, 185, 186, 187, 188, 189, 190, 191, -1, - -1, 19, -1, -1, -1, -1, -1, 25, 207, 202, - 203, -1, -1, 31, 115, 116, 117, 118, -1, 1080, - -1, -1, 1083, 41, 125, -1, 127, 128, 129, 130, - 131, 49, 133, 134, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, - -1, -1, 1113, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, 1159, -1, - 1161, 202, 203, -1, -1, 1166, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 1176, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 1189, -1, - -1, -1, -1, 151, -1, -1, -1, -1, 1199, -1, - -1, -1, -1, -1, 162, -1, -1, -1, 1209, 1210, - 1211, -1, -1, -1, -1, 1216, -1, -1, -1, 1220, - 1221, -1, -1, -1, -1, -1, -1, -1, -1, 1230, - 1231, 1232, -1, -1, -1, -1, -1, -1, 1239, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 207, + 14, 15, 166, 709, 373, 152, 776, 811, 531, 631, + 566, 487, 633, 166, 486, 78, 539, 570, 481, 680, + 483, 682, 485, 684, 935, 8, 0, 5, 15, 16, + 459, 33, 22, 7, 835, 441, 616, 823, 46, 447, + 448, 20, 128, 129, 20, 625, 60, 61, 62, 126, + 34, 1310, 20, 150, 162, 20, 30, 147, 32, 57, + 34, 150, 7, 619, 1308, 63, 40, 57, 139, 140, + 141, 627, 162, 629, 126, 33, 50, 138, 172, 63, + 125, 1219, 56, 128, 129, 170, 100, 101, 102, 103, + 155, 153, 5, 6, 153, 62, 19, 20, 106, 207, + 162, 178, 179, 162, 181, 50, 80, 184, 1367, 206, + 138, 208, 25, 15, 16, 205, 202, 203, 31, 208, + 181, 1365, 207, 208, 102, 103, 170, 179, 102, 103, + 182, 126, 712, 153, 162, 206, 692, 132, 507, 568, + 369, 137, 162, 512, 206, 208, 205, 131, 1286, 1287, + 5, 6, 166, 8, 138, 68, 69, 202, 203, 185, + 185, 205, 181, 126, 1302, 184, 126, 396, 155, 132, + 21, 22, 132, 160, 170, 162, 163, 172, 162, 205, + 205, 36, 184, 591, 179, 971, 206, 593, 171, 102, + 103, 126, 172, 601, 1345, 996, 604, 132, 172, 178, + 190, 823, 178, 138, 826, 369, 635, 185, 372, 578, + 178, 195, 202, 178, 1352, 1353, 179, 191, 205, 179, + 203, 205, 386, 631, 170, 138, 184, 205, 784, 203, + 786, 1382, 396, 386, 814, 399, 400, 401, 794, 162, + 162, 797, 256, 185, 179, 203, 399, 400, 401, 162, + 126, 209, 139, 155, 141, 147, 132, 170, 160, 205, + 162, 163, 126, 205, 172, 673, 117, 118, 132, 191, + 162, 178, 185, 178, 125, 338, 127, 128, 129, 130, + 131, 1192, 126, 178, 1349, 138, 162, 153, 132, 126, + 203, 126, 181, 1358, 147, 132, 162, 132, 206, 152, + 179, 206, 162, 179, 178, 21, 22, 928, 184, 162, + 178, 206, 476, 477, 185, 179, 480, 686, 482, 688, + 484, 47, 486, 476, 477, 1390, 1391, 480, 172, 482, + 204, 484, 185, 178, 205, 179, 187, 188, 189, 190, + 191, 67, 179, 172, 179, 178, 178, 21, 22, 971, + 178, 202, 203, 178, 178, 369, 178, 178, 372, 185, + 178, 206, 138, 592, 164, 165, 178, 178, 1029, 832, + 1076, 178, 386, 206, 206, 178, 390, 606, 206, 205, + 204, 206, 396, 204, 206, 399, 400, 401, 206, 60, + 61, 62, 406, 407, 206, 206, 138, 162, 921, 206, + 162, 117, 118, 206, 57, 147, 21, 22, 1178, 125, + 63, 127, 128, 129, 130, 131, 785, 205, 826, 172, + 162, 172, 1226, 172, 900, 178, 898, 178, 592, 100, + 101, 102, 103, 186, 155, 181, 181, 186, 153, 1145, + 186, 186, 606, 117, 118, 181, 202, 162, 162, 162, + 186, 125, 153, 181, 128, 129, 130, 131, 186, 205, + 205, 162, 476, 477, 162, 162, 480, 12, 482, 205, + 484, 75, 486, 637, 638, 79, 1137, 205, 23, 24, + 182, 162, 162, 162, 186, 172, 202, 203, 652, 93, + 94, 178, 172, 1154, 98, 99, 100, 101, 178, 186, + 115, 116, 117, 118, 119, 164, 670, 122, 123, 124, + 125, 172, 127, 128, 129, 130, 131, 178, 133, 134, + 162, 1143, 179, 1293, 153, 186, 690, 1233, 202, 203, + 57, 170, 901, 162, 172, 699, 172, 690, 702, 1092, + 178, 172, 178, 772, 773, 170, 699, 178, 186, 702, + 186, 182, 33, 1016, 783, 1078, 153, 57, 1081, 788, + 789, 1084, 791, 63, 793, 162, 795, 796, 1031, 798, + 185, 186, 187, 188, 189, 190, 191, 182, 592, 60, + 61, 186, 170, 178, 57, 164, 181, 202, 203, 184, + 63, 178, 606, 57, 181, 57, 1004, 184, 182, 63, + 1008, 63, 186, 139, 973, 1128, 57, 771, 772, 773, + 774, 181, 63, 106, 172, 779, 630, 764, 771, 783, + 178, 774, 208, 35, 788, 789, 779, 791, 1036, 793, + 1153, 795, 796, 172, 798, 35, 205, 172, 185, 178, + 1048, 1194, 123, 178, 182, 1053, 127, 162, 186, 182, + 182, 182, 182, 186, 186, 186, 186, 1213, 182, 182, + 182, 170, 186, 186, 186, 1371, 164, 165, 166, 167, + 162, 1079, 139, 140, 141, 170, 690, 164, 165, 166, + 208, 1303, 164, 165, 166, 699, 185, 205, 702, 10, + 11, 12, 205, 205, 185, 185, 21, 22, 204, 180, + 864, 185, 185, 184, 162, 185, 187, 185, 185, 185, + 185, 182, 162, 162, 162, 22, 162, 170, 204, 162, + 181, 1129, 203, 178, 1277, 1133, 1249, 181, 209, 203, + 162, 132, 1354, 205, 898, 1143, 162, 162, 185, 205, + 185, 185, 205, 1266, 1267, 185, 185, 976, 977, 978, + 185, 915, 185, 982, 185, 185, 208, 771, 772, 773, + 774, 1383, 915, 205, 205, 779, 162, 205, 205, 783, + 206, 205, 162, 162, 788, 789, 205, 791, 205, 793, + 203, 795, 796, 205, 798, 205, 1015, 1340, 204, 171, + 181, 171, 117, 118, 205, 205, 205, 162, 172, 155, + 125, 1357, 127, 128, 129, 130, 131, 37, 1430, 172, + 172, 205, 976, 977, 978, 10, 66, 346, 982, 172, + 172, 172, 172, 172, 172, 172, 186, 356, 205, 1385, + 205, 185, 13, 179, 178, 4, 178, 366, 178, 208, + 185, 171, 185, 162, 43, 206, 205, 14, 21, 22, + 179, 1015, 155, 181, 170, 8, 70, 162, 171, 388, + 186, 178, 1091, 204, 189, 190, 191, 205, 1, 206, + 205, 205, 205, 185, 206, 185, 162, 202, 203, 162, + 162, 205, 205, 1406, 898, 205, 186, 1410, 186, 186, + 205, 205, 1300, 43, 205, 424, 425, 205, 162, 205, + 171, 915, 67, 205, 172, 186, 186, 206, 1072, 186, + 206, 205, 441, 442, 443, 444, 445, 446, 206, 1072, + 186, 186, 206, 186, 186, 186, 1155, 1091, 186, 186, + 206, 205, 185, 206, 43, 205, 205, 162, 205, 162, + 162, 186, 115, 116, 117, 118, 119, 206, 186, 122, + 205, 205, 125, 186, 127, 128, 129, 130, 131, 186, + 133, 134, 976, 977, 978, 186, 206, 12, 982, 205, + 499, 162, 162, 205, 162, 162, 162, 162, 43, 33, + 186, 205, 186, 162, 186, 205, 205, 205, 517, 206, + 205, 1155, 205, 1157, 205, 172, 206, 205, 162, 206, + 529, 1015, 205, 532, 1157, 205, 172, 205, 205, 538, + 206, 540, 185, 186, 187, 188, 189, 190, 191, 53, + 171, 178, 206, 206, 206, 172, 204, 77, 204, 202, + 203, 206, 206, 615, 206, 206, 206, 205, 1, 42, + 129, 80, 1426, 206, 206, 574, 1272, 1276, 99, 1296, + 1272, 1272, 1272, 214, 1272, 1, 1244, 1197, 1072, 466, + 1284, 1200, 1096, 51, 593, 594, 21, 22, 597, 1285, + 599, 760, 1354, -1, -1, 406, -1, 1091, -1, 406, + 609, 610, 611, 612, 613, 614, -1, -1, -1, -1, + -1, -1, 1256, 521, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1256, -1, -1, -1, -1, -1, -1, + 639, 640, 1276, -1, 643, 644, 645, 646, -1, 648, + -1, 650, 651, 652, 653, 654, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 1155, 671, 1157, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1264, -1, -1, -1, -1, -1, -1, - -1, 1272, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 1288, -1, -1, + 115, 116, 117, 118, -1, -1, -1, -1, -1, -1, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + -1, -1, 711, -1, 713, -1, -1, 716, -1, 718, + -1, -1, -1, -1, -1, -1, 725, -1, -1, -1, + -1, 730, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 741, 742, 743, 744, 745, 746, 747, 748, + 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, + 759, -1, 187, 188, 189, 190, 191, 766, -1, -1, + -1, -1, 1256, -1, -1, -1, -1, 202, 203, 778, + -1, -1, -1, 19, -1, -1, -1, -1, -1, 25, + -1, -1, 1276, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 41, -1, -1, 807, -1, + -1, 810, 811, 49, -1, -1, 815, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1310, -1, 64, -1, + -1, -1, -1, -1, 833, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 877, -1, + -1, -1, 881, 1367, 19, -1, -1, -1, -1, -1, + 25, -1, -1, -1, -1, -1, 31, -1, -1, -1, + -1, -1, 138, -1, -1, -1, 41, -1, -1, -1, + -1, 910, -1, -1, 49, 151, -1, -1, 917, -1, + -1, -1, -1, -1, -1, 924, 162, -1, -1, 64, + -1, 930, -1, -1, -1, -1, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, -1, + -1, 207, -1, 209, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 1301, -1, -1, 1304, 1305, -1, -1, -1, -1, -1, - 1311, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 1323, -1, -1, -1, -1, -1, -1, -1, - -1, 1332, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 1342, -1, -1, -1, -1, -1, 1, -1, -1, - -1, 5, 6, 7, -1, 9, 10, 11, -1, 13, - -1, 15, 16, 17, 18, 19, -1, 1368, -1, -1, - -1, 25, 26, 27, 28, 29, -1, 31, -1, -1, - -1, -1, -1, -1, 38, 39, -1, 1388, 42, -1, - 44, 45, 1393, 1394, 48, -1, 50, 51, 52, -1, - 54, 55, -1, -1, 58, 59, -1, -1, -1, -1, - -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, 105, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, 171, 172, -1, + -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1013, 1014, 151, -1, -1, -1, + -1, 1020, 1021, 1022, -1, 1024, -1, 162, -1, -1, + -1, -1, -1, -1, 1033, -1, 1035, 172, 1037, -1, + -1, -1, -1, 178, 1043, -1, -1, -1, 1047, -1, + -1, -1, -1, -1, -1, -1, 1055, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 19, -1, -1, + -1, -1, 207, 25, -1, -1, -1, -1, -1, 31, + -1, -1, -1, -1, 1083, -1, -1, 1086, -1, 41, + -1, -1, -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, -1, -1, -1, -1, 203, - -1, 205, 1, 207, 208, -1, 5, 6, 7, -1, - 9, 10, 11, -1, 13, -1, 15, 16, 17, 18, - 19, -1, -1, -1, -1, -1, 25, 26, 27, 28, - 29, -1, 31, -1, -1, -1, -1, -1, -1, 38, - 39, -1, -1, 42, -1, 44, 45, -1, -1, 48, - -1, 50, 51, 52, -1, 54, 55, -1, -1, 58, - 59, -1, -1, -1, -1, -1, 65, -1, -1, 68, - 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, - 99, 100, 101, 102, 103, 104, 105, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, + -1, -1, 64, -1, -1, -1, -1, 1116, -1, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 1163, -1, 1165, -1, -1, -1, + -1, 1170, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1182, -1, -1, 138, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1195, -1, -1, 151, + -1, -1, -1, -1, -1, -1, 1205, -1, -1, -1, + 162, -1, -1, -1, -1, -1, 1215, 1216, 1217, -1, + -1, -1, -1, 1222, -1, -1, -1, 1226, 1227, -1, + -1, -1, -1, -1, -1, -1, -1, 1236, 1237, 1238, + -1, -1, -1, -1, -1, -1, -1, 1246, -1, -1, + -1, -1, -1, -1, -1, 207, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, - -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, - 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, - -1, 170, 171, 172, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, - 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, - -1, -1, -1, -1, 203, -1, 205, 1, 207, 208, - -1, 5, 6, 7, -1, 9, 10, 11, -1, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, 26, 27, 28, 29, -1, 31, -1, -1, - -1, -1, -1, -1, 38, 39, -1, -1, 42, -1, - 44, 45, -1, -1, 48, -1, 50, 51, 52, -1, - 54, 55, -1, -1, 58, 59, -1, -1, -1, -1, - -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, 105, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + -1, -1, -1, 1272, -1, -1, -1, -1, -1, -1, + -1, 1280, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1296, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, 171, 172, -1, + 1309, -1, -1, 1312, 1313, -1, -1, -1, -1, -1, + -1, 1320, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1332, -1, -1, -1, -1, -1, 1, + -1, -1, 1341, 5, 6, 7, -1, 9, 10, 11, + -1, 13, 1351, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, 26, 27, 28, 29, -1, 31, + -1, -1, -1, -1, -1, -1, 38, 39, -1, 1378, + 42, -1, 44, 45, -1, -1, 48, -1, 50, 51, + 52, -1, 54, 55, -1, -1, 58, 59, -1, 1398, + -1, -1, -1, 65, 1403, 1404, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, 105, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, 26, 27, 28, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, 52, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, 105, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, + -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, + 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, -1, -1, -1, -1, -1, -1, 170, 171, + 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, + -1, -1, 194, 195, -1, -1, -1, -1, -1, -1, + -1, 203, -1, 205, 1, 207, 208, -1, 5, 6, + 7, -1, 9, 10, 11, -1, 13, -1, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, 26, + 27, 28, 29, -1, 31, -1, -1, -1, -1, -1, + -1, 38, 39, -1, -1, 42, -1, 44, 45, -1, + -1, 48, -1, 50, 51, 52, -1, 54, 55, -1, + -1, 58, 59, -1, -1, -1, -1, -1, 65, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, - 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, - -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, - -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, - -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, - -1, -1, 68, 69, 70, 71, 72, 73, -1, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, - -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, + -1, -1, -1, 170, 171, 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, - 146, 147, 148, 149, 150, -1, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, - -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, + 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, + -1, -1, -1, -1, -1, -1, 203, -1, 205, 1, + 207, 208, -1, 5, 6, 7, -1, 9, 10, 11, + -1, 13, -1, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, 26, 27, 28, 29, -1, 31, + -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, + 42, -1, 44, 45, -1, -1, 48, -1, 50, 51, + 52, -1, 54, 55, -1, -1, 58, 59, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, 105, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, - -1, -1, -1, -1, -1, 5, 6, 203, -1, 205, - 206, 207, 208, 13, -1, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, 49, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, + -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, + 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, -1, -1, -1, -1, -1, -1, 170, 171, + 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, + -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, + -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, 26, 27, + 28, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, 52, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, 105, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, -1, - -1, 5, 6, 203, -1, 205, -1, 207, 208, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, + 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, + 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, + -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, + 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, + -1, 5, 6, -1, -1, 203, -1, 205, -1, 207, + 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, 49, -1, 51, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, @@ -3012,33 +2997,111 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, + -1, -1, 146, 147, 148, 149, 150, -1, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + 194, 195, -1, -1, -1, -1, -1, 5, 6, 203, + -1, 205, 206, 207, 208, 13, -1, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, 49, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, -1, - -1, 5, 6, 203, 204, 205, -1, 207, 208, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, + 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, + 148, 149, 150, -1, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, + -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, + 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, + -1, -1, -1, 5, 6, 203, -1, 205, -1, 207, + 208, 13, -1, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, 49, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, + -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, + 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, + -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, + -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, + 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, + -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, + 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, + -1, -1, -1, 5, 6, 203, 204, 205, -1, 207, + 208, 13, -1, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, + -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, + 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, + -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, + -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, + 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, + -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, + 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, + -1, 5, 6, -1, -1, 203, 204, 205, -1, 207, + 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, @@ -3049,7 +3112,7 @@ static const yytype_int16 yycheck[] = 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, @@ -3062,7 +3125,7 @@ static const yytype_int16 yycheck[] = -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 61, -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, @@ -3076,19 +3139,19 @@ static const yytype_int16 yycheck[] = 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, 204, 205, -1, 207, 208, 15, + 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 58, -1, -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, - 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, @@ -3100,14 +3163,14 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, - -1, -1, -1, 55, -1, -1, -1, -1, -1, 61, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, @@ -3116,11 +3179,11 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + 18, 19, -1, -1, 22, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, - 58, -1, -1, -1, -1, -1, -1, 65, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, @@ -3146,7 +3209,7 @@ static const yytype_int16 yycheck[] = 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, - -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, @@ -3154,8 +3217,8 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, 22, -1, -1, 25, -1, 27, -1, -1, + -1, 205, 206, 207, 208, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, @@ -3173,7 +3236,7 @@ static const yytype_int16 yycheck[] = 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, + 6, -1, -1, 203, -1, 205, 206, 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, @@ -3262,7 +3325,7 @@ static const yytype_int16 yycheck[] = 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, @@ -3270,7 +3333,7 @@ static const yytype_int16 yycheck[] = 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, -1, 205, 206, 207, 208, 15, + 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, @@ -3282,7 +3345,7 @@ static const yytype_int16 yycheck[] = -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, - 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, @@ -3305,90 +3368,26 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, - -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, - -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, - 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, - 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, - 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 21, 22, -1, -1, - 19, -1, 170, -1, -1, -1, 25, -1, -1, -1, - -1, -1, 31, -1, -1, -1, -1, -1, -1, 187, - 188, 189, 41, 191, -1, -1, 194, 195, -1, -1, - 49, -1, 21, 22, -1, 203, -1, 205, -1, 207, - 208, -1, -1, -1, -1, 64, -1, -1, -1, -1, - -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, - 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, 138, - 145, -1, -1, -1, 21, 22, 115, 116, 117, 118, - 119, -1, 151, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, 162, 133, 134, -1, -1, -1, -1, - 139, 140, 141, -1, -1, 180, 145, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, - -1, 206, -1, -1, -1, -1, -1, -1, 207, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, - 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, - -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, - -1, -1, -1, -1, -1, -1, -1, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 115, 116, - 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, - -1, -1, -1, -1, -1, 21, 22, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, - 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, - -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 162, 163, 21, 22, -1, -1, 19, -1, 170, -1, + -1, -1, 25, -1, -1, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, 187, 188, 189, 41, 191, + -1, -1, 194, 195, -1, -1, 49, -1, 21, 22, + -1, 203, -1, 205, -1, 207, 208, -1, -1, -1, + -1, 64, -1, -1, -1, -1, -1, -1, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, + 139, 140, 141, -1, -1, 138, 145, -1, -1, -1, + 21, 22, 115, 116, 117, 118, 119, -1, 151, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, 162, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, - -1, -1, 145, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, - 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, + -1, 180, 145, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, + -1, -1, -1, -1, 207, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, 117, 118, 119, 21, @@ -3582,137 +3581,202 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, 21, 22, -1, 145, 115, 116, - 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + -1, 139, 140, 141, -1, -1, -1, 145, 115, 116, + 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, 21, 22, -1, 145, -1, + -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, 204, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, 204, 115, 116, - 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, 21, 22, -1, 145, 115, - 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, - -1, -1, -1, 139, 140, 141, 21, 22, -1, 145, + -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, 204, -1, -1, - -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, 204, 115, + -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, + -1, -1, -1, -1, -1, 21, 22, 115, 116, 117, + 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, + 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, + -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 115, 116, 117, 118, 119, 21, 22, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, - 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, 204, -1, - -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, 204, - -1, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 21, 22, 139, 140, 141, 142, 143, 144, 145, - -1, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 21, 22, -1, -1, 172, -1, -1, -1, - -1, -1, -1, 179, 180, -1, 182, 183, 184, 185, + 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, + 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, 206, 115, 116, 117, 118, 119, 21, + 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, -1, -1, -1, 145, -1, -1, -1, -1, -1, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, -1, -1, 127, 128, 129, - -1, -1, 132, 133, 134, 135, 136, -1, -1, 139, - 140, 141, 142, 143, 144, 145, 115, 116, 117, 118, - 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, 137, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, + -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, + 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, + -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, + 21, 22, -1, 145, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, 21, 22, -1, 145, -1, -1, -1, 180, -1, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 202, 203, -1, -1, 206, -1, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, 204, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, 21, 22, -1, 145, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, + 140, 141, 21, 22, -1, 145, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, 204, -1, -1, -1, -1, -1, -1, + 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 202, 203, 204, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, + 140, 141, 21, 22, -1, 145, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, 194, 195, -1, -1, -1, -1, - -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, + 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 202, 203, 204, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, - 21, 22, -1, -1, -1, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, - 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, - 140, 141, 21, 22, -1, 145, -1, -1, -1, -1, + -1, -1, -1, 202, 203, 204, 115, 116, 117, 118, + 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, + 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 172, -1, -1, -1, -1, -1, -1, -1, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, 204, -1, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 21, 22, 139, + 140, 141, 142, 143, 144, 145, -1, -1, -1, -1, + -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 21, 22, + -1, -1, 172, -1, -1, -1, -1, -1, -1, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 202, 203, 115, 116, 117, 118, 119, -1, - -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, -1, -1, 127, 128, 129, -1, -1, 132, 133, + 134, 135, 136, -1, -1, 139, 140, 141, 142, 143, + 144, 145, 115, 116, 117, 118, 119, 21, 22, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, 137, -1, 139, 140, 141, -1, + -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, + 194, 195, -1, -1, -1, -1, -1, -1, 202, 203, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, -1, -1, -1, 21, 22, -1, -1, + -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, + 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, + 134, -1, -1, -1, -1, 139, 140, 141, 21, 22, + -1, 145, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 172, -1, + -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + 21, 22, -1, -1, 139, 140, 141, -1, -1, -1, + 145, -1, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, 21, 22, -1, -1, 139, 140, 141, -1, + -1, -1, 145, -1, -1, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, 172, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, 202, + 203, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, + 129, 130, 131, -1, 133, 134, -1, 168, 21, 22, 139, 140, 141, -1, -1, -1, 145, -1, -1, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, 172, -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, 202, 203, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + 21, 22, 139, 140, 141, -1, -1, -1, 145, -1, + -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, 172, 139, 140, 141, -1, + -1, -1, 145, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, 172, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 21, + 22, -1, -1, -1, 115, 116, 117, 118, 119, 202, + 203, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, -1, -1, -1, 145, 21, 22, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 172, -1, -1, -1, -1, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, 115, 116, 117, 118, 119, -1, -1, + 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, + -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, + -1, -1, -1, 145, 21, 22, -1, -1, -1, 115, + 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, + -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, + 172, -1, -1, 139, 140, 141, 21, 22, 180, 145, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 202, 203, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, 168, 21, 22, 139, 140, 141, -1, -1, -1, - 145, -1, -1, 180, -1, 182, 183, 184, 185, 186, + 21, 22, -1, -1, 139, 140, 141, -1, -1, -1, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, 172, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, 202, 203, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, - 133, 134, -1, -1, 21, 22, 139, 140, 141, -1, - -1, -1, 145, -1, -1, -1, 115, 116, 117, 118, - 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, -1, 172, - 139, 140, 141, -1, -1, -1, 145, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 203, -1, -1, 172, -1, -1, -1, -1, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 21, 22, -1, -1, -1, 115, 116, - 117, 118, 119, 202, 203, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, 21, - 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 172, -1, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, - -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, - 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, - -1, 133, 134, -1, 172, -1, -1, 139, 140, 141, - 21, 22, 180, 145, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 180, -1, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 202, 203, 115, 116, 117, 118, 119, -1, -1, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, - 133, 134, 21, 22, -1, -1, 139, 140, 141, -1, - -1, -1, 145, -1, 115, 116, 117, 118, 119, -1, + 133, 134, 21, 22, -1, -1, 139, -1, 141, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, 139, -1, - 141, -1, -1, -1, -1, -1, -1, 180, -1, 182, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3720,7 +3784,7 @@ static const yytype_int16 yycheck[] = 191, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, 202, 203, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, - 139, -1, -1, -1, -1, -1, -1, -1, 115, 116, + -1, -1, -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -3751,8 +3815,21 @@ static const yytype_int16 yycheck[] = 153, -1, -1, -1, -1, -1, -1, -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 153, -1, -1, -1, -1, -1, -1, - -1, -1, 162 + -1, -1, -1, 153, -1, 35, -1, -1, -1, 71, + 72, 73, 162, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + -1, 71, -1, 73, -1, 75, 76, 77, 78, 79, + -1, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, -1, 93, 94, 95, 128, 129, 98, 99, + 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, 153, -1, -1, -1, -1, -1, -1, -1, -1, + 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, + 202, 203 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -3774,128 +3851,129 @@ static const yytype_int16 yystos[] = 155, 160, 162, 163, 205, 217, 247, 155, 230, 162, 162, 162, 362, 57, 63, 213, 431, 423, 427, 162, 164, 220, 206, 248, 252, 252, 252, 252, 262, 162, - 365, 377, 357, 164, 165, 216, 15, 16, 155, 160, - 162, 217, 244, 245, 227, 179, 170, 170, 170, 164, - 206, 35, 71, 73, 75, 76, 77, 78, 79, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 93, 94, 95, 98, 99, 100, 101, 117, 118, 162, - 257, 260, 181, 366, 106, 371, 372, 208, 249, 328, - 164, 165, 166, 178, 206, 19, 25, 31, 41, 49, - 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 151, 207, 270, 380, 382, 383, - 386, 392, 393, 421, 432, 424, 428, 21, 22, 38, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 127, 128, - 129, 132, 133, 134, 135, 136, 139, 140, 141, 142, - 143, 144, 145, 180, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 194, 195, 202, 203, 35, 35, - 205, 255, 170, 263, 75, 79, 93, 94, 98, 99, - 100, 101, 381, 170, 162, 378, 247, 208, 162, 351, - 353, 244, 185, 185, 185, 205, 185, 185, 205, 185, - 185, 185, 185, 185, 185, 205, 270, 33, 60, 61, - 123, 127, 180, 184, 187, 203, 209, 391, 182, 162, - 385, 342, 345, 162, 162, 162, 204, 22, 162, 204, - 150, 206, 328, 338, 339, 181, 256, 266, 368, 181, - 370, 170, 375, 247, 178, 181, 184, 349, 394, 399, - 401, 5, 6, 15, 16, 17, 18, 19, 25, 27, - 31, 39, 45, 48, 51, 55, 65, 68, 69, 80, - 102, 103, 104, 117, 118, 146, 147, 148, 149, 150, - 152, 154, 155, 156, 157, 158, 159, 160, 161, 163, - 170, 187, 188, 189, 194, 195, 203, 205, 207, 208, - 219, 221, 264, 270, 275, 287, 294, 297, 300, 304, - 306, 308, 309, 311, 316, 319, 320, 327, 380, 434, - 442, 452, 455, 467, 470, 403, 397, 162, 387, 405, - 407, 409, 411, 413, 415, 417, 419, 320, 185, 205, - 33, 184, 33, 184, 203, 209, 204, 320, 203, 209, - 392, 178, 469, 162, 172, 178, 340, 389, 421, 425, - 162, 343, 389, 429, 162, 132, 205, 7, 50, 281, - 172, 206, 421, 1, 9, 10, 11, 13, 26, 28, - 29, 38, 42, 44, 52, 54, 58, 59, 65, 105, - 171, 172, 231, 232, 235, 237, 238, 239, 240, 241, - 242, 243, 265, 271, 276, 277, 278, 279, 280, 282, - 286, 307, 320, 162, 358, 359, 270, 334, 162, 392, - 126, 132, 179, 348, 421, 421, 390, 421, 185, 185, - 185, 272, 382, 434, 270, 185, 5, 102, 103, 185, - 205, 185, 205, 205, 185, 185, 205, 185, 205, 185, - 205, 185, 185, 205, 185, 185, 320, 320, 205, 205, - 205, 205, 205, 205, 218, 13, 320, 451, 466, 320, - 320, 320, 320, 320, 13, 49, 298, 320, 298, 208, - 205, 254, 170, 208, 300, 305, 21, 22, 115, 116, - 117, 118, 119, 122, 123, 124, 125, 127, 128, 129, - 130, 131, 133, 134, 139, 140, 141, 145, 180, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 202, - 203, 206, 205, 421, 421, 206, 162, 384, 421, 255, - 421, 255, 421, 255, 340, 341, 343, 344, 206, 396, - 267, 298, 204, 204, 204, 320, 162, 433, 181, 389, - 171, 181, 389, 171, 320, 147, 162, 347, 379, 338, - 205, 205, 126, 320, 263, 61, 320, 205, 162, 172, - 155, 58, 320, 263, 126, 320, 37, 172, 172, 205, - 10, 172, 172, 172, 172, 172, 172, 66, 283, 172, - 107, 108, 109, 110, 111, 112, 113, 114, 120, 121, - 126, 132, 135, 136, 142, 143, 144, 179, 179, 178, - 469, 171, 254, 335, 172, 348, 320, 186, 186, 186, - 389, 443, 445, 273, 205, 205, 185, 205, 295, 185, - 185, 185, 462, 298, 392, 466, 320, 288, 290, 320, - 292, 320, 464, 298, 449, 453, 298, 447, 392, 320, - 320, 320, 320, 320, 320, 166, 167, 216, 379, 137, - 178, 469, 379, 13, 178, 469, 469, 147, 152, 185, - 270, 310, 70, 153, 162, 203, 206, 298, 435, 437, - 4, 303, 266, 208, 254, 19, 153, 162, 380, 19, - 153, 162, 380, 320, 320, 320, 320, 320, 320, 162, - 320, 153, 162, 320, 320, 320, 380, 320, 320, 320, - 320, 320, 320, 22, 320, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 128, 129, 153, 162, 202, - 203, 317, 320, 206, 298, 186, 186, 172, 186, 186, - 256, 186, 256, 186, 256, 186, 389, 186, 389, 269, - 421, 206, 469, 204, 171, 421, 421, 206, 205, 43, - 126, 178, 179, 181, 184, 346, 320, 379, 320, 14, - 320, 320, 179, 181, 155, 320, 170, 320, 205, 147, - 162, 205, 285, 350, 352, 320, 320, 320, 320, 320, + 365, 377, 357, 164, 165, 166, 216, 15, 16, 155, + 160, 162, 217, 244, 245, 227, 179, 170, 170, 170, + 164, 206, 35, 71, 73, 75, 76, 77, 78, 79, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 93, 94, 95, 98, 99, 100, 101, 117, 118, + 162, 257, 260, 181, 366, 106, 371, 372, 208, 249, + 328, 164, 165, 166, 178, 206, 19, 25, 31, 41, + 49, 64, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 151, 207, 270, 380, 382, + 383, 386, 392, 393, 421, 432, 424, 428, 21, 22, + 38, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 127, + 128, 129, 132, 133, 134, 135, 136, 139, 140, 141, + 142, 143, 144, 145, 180, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 194, 195, 202, 203, 35, + 35, 205, 255, 170, 263, 75, 79, 93, 94, 98, + 99, 100, 101, 381, 170, 162, 378, 247, 208, 162, + 351, 353, 244, 185, 185, 185, 205, 185, 185, 205, + 185, 185, 185, 185, 185, 185, 205, 270, 33, 60, + 61, 123, 127, 180, 184, 187, 203, 209, 391, 182, + 162, 385, 342, 345, 162, 162, 162, 204, 22, 162, + 204, 150, 206, 328, 338, 339, 181, 256, 266, 368, + 181, 370, 170, 375, 247, 178, 181, 184, 349, 394, + 399, 401, 5, 6, 15, 16, 17, 18, 19, 25, + 27, 31, 39, 45, 48, 51, 55, 65, 68, 69, + 80, 102, 103, 104, 117, 118, 146, 147, 148, 149, + 150, 152, 154, 155, 156, 157, 158, 159, 160, 161, + 163, 170, 187, 188, 189, 194, 195, 203, 205, 207, + 208, 219, 221, 264, 270, 275, 287, 294, 297, 300, + 304, 306, 308, 309, 311, 316, 319, 320, 327, 380, + 434, 442, 452, 455, 467, 470, 403, 397, 162, 387, + 405, 407, 409, 411, 413, 415, 417, 419, 320, 185, + 205, 33, 184, 33, 184, 203, 209, 204, 320, 203, + 209, 392, 178, 469, 162, 172, 178, 340, 389, 421, + 425, 162, 343, 389, 429, 162, 132, 205, 7, 50, + 281, 172, 206, 421, 1, 9, 10, 11, 13, 26, + 28, 29, 38, 42, 44, 52, 54, 58, 59, 65, + 105, 171, 172, 231, 232, 235, 237, 238, 239, 240, + 241, 242, 243, 265, 271, 276, 277, 278, 279, 280, + 282, 286, 307, 320, 162, 358, 359, 270, 334, 162, + 392, 126, 132, 179, 348, 421, 421, 390, 421, 185, + 185, 185, 272, 382, 434, 270, 185, 5, 102, 103, + 185, 205, 185, 205, 205, 185, 185, 205, 185, 205, + 185, 205, 185, 185, 205, 185, 185, 320, 320, 205, + 205, 205, 205, 205, 205, 218, 13, 320, 451, 466, + 320, 320, 320, 320, 320, 13, 49, 298, 320, 298, + 208, 205, 254, 170, 208, 300, 305, 21, 22, 115, + 116, 117, 118, 119, 122, 123, 124, 125, 127, 128, + 129, 130, 131, 133, 134, 139, 140, 141, 145, 180, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 202, 203, 206, 205, 421, 421, 206, 162, 384, 421, + 255, 421, 255, 421, 255, 340, 341, 343, 344, 206, + 396, 267, 298, 204, 204, 204, 320, 162, 433, 181, + 389, 171, 181, 389, 171, 320, 147, 162, 347, 379, + 338, 205, 205, 126, 320, 263, 61, 320, 205, 162, + 172, 155, 58, 320, 263, 126, 320, 37, 172, 172, + 205, 10, 172, 172, 172, 172, 172, 172, 66, 283, + 172, 107, 108, 109, 110, 111, 112, 113, 114, 120, + 121, 126, 132, 135, 136, 142, 143, 144, 179, 179, + 178, 469, 171, 254, 335, 172, 348, 320, 186, 186, + 186, 389, 443, 445, 273, 205, 205, 185, 205, 295, + 185, 185, 185, 462, 298, 392, 466, 320, 288, 290, + 320, 292, 320, 464, 298, 449, 453, 298, 447, 392, + 320, 320, 320, 320, 320, 320, 166, 167, 216, 379, + 137, 178, 469, 379, 13, 178, 469, 469, 147, 152, + 185, 270, 310, 70, 153, 162, 203, 206, 298, 435, + 437, 4, 303, 266, 208, 254, 19, 153, 162, 380, + 19, 153, 162, 380, 320, 320, 320, 320, 320, 320, + 162, 320, 153, 162, 320, 320, 320, 380, 320, 320, + 320, 320, 320, 320, 22, 320, 320, 320, 320, 320, + 320, 320, 320, 320, 320, 320, 128, 129, 153, 162, + 202, 203, 317, 380, 320, 206, 298, 186, 186, 172, + 186, 186, 256, 186, 256, 186, 256, 186, 389, 186, + 389, 269, 421, 206, 469, 204, 171, 421, 421, 206, + 205, 43, 126, 178, 179, 181, 184, 346, 320, 379, + 320, 14, 320, 320, 179, 181, 155, 320, 170, 320, + 205, 147, 162, 205, 285, 350, 352, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 358, 369, 8, 328, 333, 320, - 172, 395, 400, 402, 421, 392, 392, 421, 70, 441, - 267, 162, 320, 421, 456, 458, 460, 392, 469, 186, - 389, 469, 206, 392, 392, 206, 392, 206, 392, 469, - 392, 392, 469, 392, 186, 206, 206, 206, 206, 206, - 206, 320, 20, 320, 451, 171, 20, 379, 320, 204, - 206, 205, 205, 312, 314, 162, 206, 437, 205, 132, - 346, 435, 178, 206, 178, 206, 205, 255, 171, 303, - 185, 205, 185, 205, 205, 205, 204, 19, 153, 162, - 380, 181, 153, 162, 320, 205, 205, 153, 162, 320, - 1, 204, 178, 206, 404, 398, 162, 388, 406, 186, - 410, 186, 414, 186, 418, 340, 420, 343, 186, 389, - 320, 162, 162, 421, 320, 206, 20, 263, 206, 320, - 266, 206, 320, 205, 43, 162, 284, 178, 181, 349, - 171, 57, 63, 331, 67, 332, 172, 172, 186, 186, - 186, 206, 437, 206, 186, 389, 206, 186, 392, 392, - 392, 186, 206, 205, 392, 206, 186, 186, 186, 186, - 206, 186, 186, 206, 186, 303, 205, 168, 298, 298, - 20, 320, 320, 392, 255, 206, 320, 320, 320, 204, - 203, 153, 162, 126, 132, 179, 184, 301, 302, 256, - 255, 321, 320, 323, 320, 206, 298, 320, 185, 205, - 320, 205, 204, 320, 206, 298, 205, 204, 318, 408, - 412, 416, 205, 421, 206, 43, 346, 263, 298, 263, - 171, 263, 206, 320, 162, 178, 206, 162, 392, 348, - 47, 332, 46, 106, 329, 444, 446, 274, 206, 205, - 162, 296, 186, 186, 186, 463, 268, 466, 186, 289, - 291, 293, 465, 450, 454, 448, 205, 263, 206, 298, - 172, 172, 298, 206, 206, 186, 256, 206, 206, 435, - 205, 132, 346, 162, 162, 162, 162, 178, 206, 137, - 263, 299, 256, 392, 206, 421, 206, 206, 206, 325, - 320, 320, 206, 206, 320, 267, 162, 320, 206, 12, - 23, 24, 233, 234, 12, 236, 206, 162, 181, 349, - 43, 172, 348, 320, 33, 330, 329, 331, 205, 205, - 320, 186, 457, 459, 461, 205, 206, 469, 205, 320, - 320, 320, 205, 441, 205, 205, 206, 320, 206, 451, - 320, 172, 313, 186, 132, 346, 204, 320, 320, 320, - 301, 126, 320, 263, 186, 186, 421, 206, 206, 206, - 206, 263, 263, 205, 237, 276, 277, 278, 279, 320, - 172, 392, 348, 162, 320, 172, 336, 330, 347, 441, - 441, 206, 205, 205, 205, 205, 267, 268, 298, 441, - 435, 436, 206, 172, 468, 468, 320, 310, 315, 320, - 320, 206, 206, 320, 322, 324, 186, 320, 348, 320, + 320, 320, 320, 320, 320, 320, 358, 369, 8, 328, + 333, 320, 172, 395, 400, 402, 421, 392, 392, 421, + 70, 441, 267, 162, 320, 421, 456, 458, 460, 392, + 469, 186, 389, 469, 206, 392, 392, 206, 392, 206, + 392, 469, 392, 392, 469, 392, 186, 206, 206, 206, + 206, 206, 206, 320, 20, 320, 451, 171, 20, 379, + 320, 204, 206, 205, 205, 312, 314, 162, 206, 437, + 205, 132, 346, 435, 178, 206, 178, 206, 205, 255, + 171, 303, 185, 205, 185, 205, 205, 205, 204, 19, + 153, 162, 380, 181, 153, 162, 320, 205, 205, 153, + 162, 320, 1, 205, 204, 178, 206, 404, 398, 162, + 388, 406, 186, 410, 186, 414, 186, 418, 340, 420, + 343, 186, 389, 320, 162, 162, 421, 320, 206, 20, + 263, 206, 320, 266, 206, 320, 205, 43, 162, 284, + 178, 181, 349, 171, 57, 63, 331, 67, 332, 172, + 172, 186, 186, 186, 206, 437, 206, 186, 389, 206, + 186, 392, 392, 392, 186, 206, 205, 392, 206, 186, + 186, 186, 186, 206, 186, 186, 206, 186, 303, 205, + 168, 298, 298, 20, 320, 320, 392, 255, 206, 320, + 320, 320, 204, 203, 153, 162, 126, 132, 162, 179, + 184, 301, 302, 256, 255, 321, 320, 323, 320, 206, + 298, 320, 185, 205, 320, 205, 204, 320, 206, 298, + 205, 204, 318, 206, 298, 408, 412, 416, 205, 421, + 206, 43, 346, 263, 298, 263, 171, 263, 206, 320, + 162, 178, 206, 162, 392, 348, 47, 332, 46, 106, + 329, 444, 446, 274, 206, 205, 162, 296, 186, 186, + 186, 463, 268, 466, 186, 289, 291, 293, 465, 450, + 454, 448, 205, 263, 206, 298, 172, 172, 298, 206, + 206, 186, 256, 206, 206, 435, 205, 132, 346, 162, + 162, 205, 162, 162, 178, 206, 137, 263, 299, 256, + 392, 206, 421, 206, 206, 206, 325, 320, 320, 206, + 206, 320, 206, 267, 162, 320, 206, 12, 23, 24, + 233, 234, 12, 236, 206, 162, 181, 349, 43, 172, + 348, 320, 33, 330, 329, 331, 205, 205, 320, 186, + 457, 459, 461, 205, 206, 469, 205, 320, 320, 320, + 205, 441, 205, 205, 206, 320, 206, 451, 320, 172, + 313, 186, 132, 346, 204, 320, 320, 320, 162, 301, + 126, 320, 263, 186, 186, 421, 206, 206, 206, 206, + 263, 263, 205, 237, 276, 277, 278, 279, 320, 172, + 392, 348, 162, 320, 172, 336, 330, 347, 441, 441, + 206, 205, 205, 205, 205, 267, 268, 298, 441, 435, + 436, 206, 172, 468, 468, 320, 310, 315, 320, 320, + 206, 206, 206, 320, 322, 324, 186, 320, 348, 320, 172, 260, 337, 205, 435, 438, 439, 440, 440, 320, 441, 441, 436, 206, 206, 469, 440, 206, 53, 171, 204, 468, 310, 132, 346, 326, 206, 320, 172, 172, @@ -3909,16 +3987,17 @@ static const yytype_int16 yyr1[] = { 0, 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 212, 213, 213, - 213, 214, 214, 215, 216, 216, 216, 216, 217, 218, - 218, 218, 219, 220, 220, 222, 221, 223, 224, 225, - 225, 225, 225, 226, 226, 227, 227, 228, 229, 229, - 230, 230, 231, 232, 232, 233, 233, 234, 234, 234, - 235, 235, 236, 236, 237, 237, 237, 237, 237, 238, - 238, 239, 240, 241, 242, 243, 244, 244, 244, 244, - 244, 244, 245, 245, 246, 246, 246, 247, 247, 247, - 247, 247, 247, 247, 247, 248, 248, 249, 249, 250, - 250, 250, 251, 251, 252, 252, 252, 252, 252, 252, - 252, 253, 253, 254, 254, 255, 255, 255, 256, 256, + 213, 214, 214, 215, 216, 216, 216, 216, 217, 217, + 218, 218, 218, 219, 220, 220, 222, 221, 223, 224, + 225, 225, 225, 225, 226, 226, 227, 227, 228, 229, + 229, 230, 230, 231, 232, 232, 233, 233, 234, 234, + 234, 235, 235, 236, 236, 237, 237, 237, 237, 237, + 238, 238, 239, 240, 241, 242, 243, 244, 244, 244, + 244, 244, 244, 245, 245, 246, 246, 246, 247, 247, + 247, 247, 247, 247, 247, 247, 248, 248, 249, 249, + 250, 250, 250, 251, 251, 252, 252, 252, 252, 252, + 252, 252, 253, 253, 254, 254, 255, 255, 255, 256, + 256, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, @@ -3926,65 +4005,65 @@ static const yytype_int16 yyr1[] = 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 258, 259, 259, 259, 260, - 262, 261, 263, 263, 264, 265, 265, 265, 265, 265, + 257, 257, 257, 257, 257, 257, 258, 259, 259, 259, + 260, 262, 261, 263, 263, 264, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, - 265, 265, 265, 266, 266, 266, 267, 267, 268, 268, - 269, 269, 270, 270, 270, 271, 271, 273, 274, 272, - 275, 275, 275, 275, 275, 276, 277, 278, 278, 278, - 279, 279, 280, 281, 281, 281, 282, 282, 283, 283, - 284, 284, 285, 285, 286, 286, 288, 289, 287, 290, - 291, 287, 292, 293, 287, 295, 296, 294, 297, 297, - 297, 298, 298, 299, 299, 299, 300, 300, 300, 301, - 301, 301, 301, 302, 302, 303, 303, 304, 305, 305, - 306, 306, 306, 306, 306, 306, 306, 307, 307, 307, + 265, 265, 265, 265, 266, 266, 266, 267, 267, 268, + 268, 269, 269, 270, 270, 270, 271, 271, 273, 274, + 272, 275, 275, 275, 275, 275, 276, 277, 278, 278, + 278, 279, 279, 280, 281, 281, 281, 282, 282, 283, + 283, 284, 284, 285, 285, 286, 286, 288, 289, 287, + 290, 291, 287, 292, 293, 287, 295, 296, 294, 297, + 297, 297, 298, 298, 299, 299, 299, 300, 300, 300, + 301, 301, 301, 301, 301, 302, 302, 303, 303, 304, + 305, 305, 306, 306, 306, 306, 306, 306, 306, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 308, 308, 309, 309, - 310, 310, 311, 312, 313, 311, 314, 315, 311, 316, - 316, 316, 316, 317, 318, 316, 319, 319, 319, 319, - 319, 319, 319, 320, 320, 320, 320, 320, 320, 320, + 307, 307, 307, 307, 307, 307, 307, 307, 308, 308, + 309, 309, 310, 310, 311, 312, 313, 311, 314, 315, + 311, 316, 316, 316, 316, 316, 316, 317, 318, 316, + 319, 319, 319, 319, 319, 319, 319, 320, 320, 320, + 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, + 320, 320, 320, 320, 321, 322, 320, 320, 320, 320, + 323, 324, 320, 320, 320, 325, 326, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, - 321, 322, 320, 320, 320, 320, 323, 324, 320, 320, - 320, 325, 326, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 327, 327, 327, - 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, - 327, 327, 327, 328, 328, 329, 329, 329, 330, 330, - 331, 331, 331, 332, 332, 333, 334, 335, 334, 336, - 334, 337, 334, 338, 338, 339, 339, 340, 340, 341, - 341, 342, 342, 342, 343, 344, 344, 345, 345, 345, - 346, 346, 347, 347, 347, 347, 347, 348, 348, 348, - 349, 349, 350, 350, 350, 350, 350, 351, 351, 352, - 352, 352, 353, 353, 353, 354, 354, 355, 355, 355, - 357, 356, 358, 358, 359, 359, 359, 360, 360, 360, - 362, 361, 363, 364, 364, 364, 365, 366, 366, 368, - 369, 367, 370, 370, 371, 371, 372, 373, 373, 374, - 374, 374, 375, 375, 377, 378, 376, 379, 379, 379, - 379, 379, 380, 380, 380, 380, 380, 380, 380, 380, + 320, 327, 327, 327, 327, 327, 327, 327, 327, 327, + 327, 327, 327, 327, 327, 327, 327, 328, 328, 329, + 329, 329, 330, 330, 331, 331, 331, 332, 332, 333, + 334, 335, 334, 336, 334, 337, 334, 338, 338, 339, + 339, 340, 340, 341, 341, 342, 342, 342, 343, 344, + 344, 345, 345, 345, 346, 346, 347, 347, 347, 347, + 347, 348, 348, 348, 349, 349, 350, 350, 350, 350, + 350, 351, 351, 352, 352, 352, 353, 353, 353, 354, + 354, 355, 355, 355, 357, 356, 358, 358, 359, 359, + 359, 360, 360, 360, 362, 361, 363, 364, 364, 364, + 365, 366, 366, 368, 369, 367, 370, 370, 371, 371, + 372, 373, 373, 374, 374, 374, 375, 375, 377, 378, + 376, 379, 379, 379, 379, 379, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, - 380, 380, 380, 380, 380, 380, 380, 380, 380, 381, - 381, 381, 381, 381, 381, 381, 381, 382, 383, 383, - 383, 384, 384, 385, 385, 385, 387, 388, 386, 389, - 389, 390, 390, 391, 391, 391, 391, 392, 392, 393, - 393, 393, 393, 394, 395, 393, 393, 393, 396, 393, - 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, - 393, 393, 397, 398, 393, 393, 399, 400, 393, 401, - 402, 393, 403, 404, 393, 393, 405, 406, 393, 407, - 408, 393, 393, 409, 410, 393, 411, 412, 393, 393, - 413, 414, 393, 415, 416, 393, 417, 418, 393, 419, - 420, 393, 421, 421, 421, 423, 424, 425, 422, 427, - 428, 429, 426, 431, 432, 433, 430, 434, 434, 434, - 434, 434, 435, 435, 435, 435, 435, 435, 435, 435, - 436, 437, 438, 438, 439, 439, 440, 440, 441, 441, - 443, 444, 442, 445, 446, 442, 447, 448, 442, 449, - 450, 442, 451, 451, 452, 453, 454, 452, 455, 456, - 457, 455, 458, 459, 455, 460, 461, 455, 455, 462, - 463, 455, 455, 464, 465, 455, 466, 466, 467, 467, - 467, 467, 468, 468, 469, 469, 470, 470, 470 + 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, + 380, 380, 380, 381, 381, 381, 381, 381, 381, 381, + 381, 382, 383, 383, 383, 384, 384, 385, 385, 385, + 387, 388, 386, 389, 389, 390, 390, 391, 391, 391, + 391, 392, 392, 393, 393, 393, 393, 394, 395, 393, + 393, 393, 396, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 397, 398, 393, 393, + 399, 400, 393, 401, 402, 393, 403, 404, 393, 393, + 405, 406, 393, 407, 408, 393, 393, 409, 410, 393, + 411, 412, 393, 393, 413, 414, 393, 415, 416, 393, + 417, 418, 393, 419, 420, 393, 421, 421, 421, 423, + 424, 425, 422, 427, 428, 429, 426, 431, 432, 433, + 430, 434, 434, 434, 434, 434, 435, 435, 435, 435, + 435, 435, 435, 435, 436, 437, 438, 438, 439, 439, + 440, 440, 441, 441, 443, 444, 442, 445, 446, 442, + 447, 448, 442, 449, 450, 442, 451, 451, 452, 453, + 454, 452, 455, 456, 457, 455, 458, 459, 455, 460, + 461, 455, 455, 462, 463, 455, 455, 464, 465, 455, + 466, 466, 467, 467, 467, 467, 468, 468, 469, 469, + 470, 470, 470 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -3992,82 +4071,83 @@ static const yytype_int8 yyr2[] = { 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 0, 1, - 1, 1, 1, 4, 1, 1, 2, 2, 3, 0, - 2, 4, 3, 1, 2, 0, 4, 2, 2, 1, - 2, 3, 3, 2, 4, 0, 1, 2, 1, 3, - 1, 3, 3, 3, 2, 1, 1, 0, 2, 6, - 1, 1, 0, 2, 1, 1, 1, 1, 1, 6, - 7, 7, 2, 5, 5, 4, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 1, 5, 1, 3, 2, 3, 1, - 1, 1, 1, 4, 1, 2, 3, 3, 3, 3, - 2, 1, 3, 0, 3, 0, 2, 3, 0, 2, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 4, 1, 1, 2, 2, 3, 2, + 0, 2, 4, 3, 1, 2, 0, 4, 2, 2, + 1, 2, 3, 3, 2, 4, 0, 1, 2, 1, + 3, 1, 3, 3, 3, 2, 1, 1, 0, 2, + 6, 1, 1, 0, 2, 1, 1, 1, 1, 1, + 6, 7, 7, 2, 5, 5, 4, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 3, 3, + 3, 3, 3, 3, 1, 5, 1, 3, 2, 3, + 1, 1, 1, 1, 4, 1, 2, 3, 3, 3, + 3, 2, 1, 3, 0, 3, 0, 2, 3, 0, + 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 3, 3, 2, 2, 3, 4, - 3, 2, 2, 2, 2, 2, 3, 3, 3, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, + 4, 3, 2, 2, 2, 2, 2, 3, 3, 3, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 0, 1, 1, 3, - 0, 4, 3, 7, 2, 1, 2, 2, 1, 1, - 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, - 2, 2, 2, 0, 2, 2, 0, 2, 0, 2, - 1, 3, 1, 3, 2, 2, 3, 0, 0, 5, - 2, 5, 5, 6, 2, 1, 1, 1, 2, 3, - 2, 3, 4, 1, 1, 0, 1, 1, 1, 0, - 1, 3, 8, 7, 3, 3, 0, 0, 7, 0, - 0, 7, 0, 0, 7, 0, 0, 6, 5, 8, - 10, 1, 3, 1, 2, 3, 1, 1, 2, 2, - 2, 2, 2, 1, 3, 0, 4, 6, 6, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 1, 1, 1, 1, 1, 1, 3, 0, 1, 1, + 3, 0, 4, 3, 7, 2, 1, 2, 2, 1, + 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, + 1, 2, 2, 2, 0, 2, 2, 0, 2, 0, + 2, 1, 3, 1, 3, 2, 2, 3, 0, 0, + 5, 2, 5, 5, 6, 2, 1, 1, 1, 2, + 3, 2, 3, 4, 1, 1, 0, 1, 1, 1, + 0, 1, 3, 8, 7, 3, 3, 0, 0, 7, + 0, 0, 7, 0, 0, 7, 0, 0, 6, 5, + 8, 10, 1, 3, 1, 2, 3, 1, 1, 2, + 2, 2, 2, 2, 4, 1, 3, 0, 4, 6, + 6, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 6, 8, 5, 6, - 1, 4, 3, 0, 0, 8, 0, 0, 9, 3, - 4, 5, 6, 0, 0, 5, 3, 4, 4, 5, - 4, 3, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 6, 8, + 5, 6, 1, 4, 3, 0, 0, 8, 0, 0, + 9, 3, 4, 5, 6, 5, 6, 0, 0, 5, + 3, 4, 4, 5, 4, 3, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 4, 4, 5, 4, 5, 3, 4, - 1, 1, 2, 4, 4, 7, 8, 6, 3, 5, - 0, 0, 8, 3, 3, 3, 0, 0, 8, 3, - 4, 0, 0, 9, 4, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 1, 4, 4, 4, 4, - 4, 4, 1, 6, 7, 6, 6, 7, 7, 6, - 7, 6, 6, 0, 1, 0, 1, 1, 0, 1, - 0, 1, 1, 0, 1, 5, 0, 0, 4, 0, - 9, 0, 10, 3, 4, 1, 3, 1, 3, 1, - 3, 0, 2, 3, 3, 1, 3, 0, 2, 3, - 1, 1, 1, 2, 3, 5, 3, 1, 1, 1, - 0, 1, 1, 4, 3, 3, 5, 1, 3, 4, - 6, 5, 4, 6, 5, 0, 1, 0, 1, 1, - 0, 6, 1, 3, 0, 1, 3, 0, 1, 1, - 0, 5, 3, 0, 1, 1, 1, 0, 2, 0, - 0, 11, 0, 2, 0, 1, 3, 1, 1, 0, - 1, 1, 0, 3, 0, 0, 7, 1, 4, 3, - 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 2, 2, 2, 2, 4, 4, 5, + 4, 5, 3, 4, 1, 1, 2, 4, 4, 7, + 8, 6, 3, 5, 0, 0, 8, 3, 3, 3, + 0, 0, 8, 3, 4, 0, 0, 9, 4, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, + 4, 4, 4, 4, 4, 4, 1, 6, 7, 6, + 6, 7, 7, 6, 7, 6, 6, 0, 1, 0, + 1, 1, 0, 1, 0, 1, 1, 0, 1, 5, + 0, 0, 4, 0, 9, 0, 10, 3, 4, 1, + 3, 1, 3, 1, 3, 0, 2, 3, 3, 1, + 3, 0, 2, 3, 1, 1, 1, 2, 3, 5, + 3, 1, 1, 1, 0, 1, 1, 4, 3, 3, + 5, 1, 3, 4, 6, 5, 4, 6, 5, 0, + 1, 0, 1, 1, 0, 6, 1, 3, 0, 1, + 3, 0, 1, 1, 0, 5, 3, 0, 1, 1, + 1, 0, 2, 0, 0, 11, 0, 2, 0, 1, + 3, 1, 1, 0, 1, 1, 0, 3, 0, 0, + 7, 1, 4, 3, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 1, 3, 0, 1, 3, 0, 0, 6, 1, - 1, 1, 3, 3, 2, 4, 3, 1, 2, 1, - 1, 1, 1, 0, 0, 6, 4, 5, 0, 9, - 4, 2, 2, 3, 2, 3, 2, 2, 3, 3, - 3, 2, 0, 0, 6, 2, 0, 0, 6, 0, - 0, 6, 0, 0, 6, 1, 0, 0, 6, 0, - 0, 7, 1, 0, 0, 6, 0, 0, 7, 1, - 0, 0, 6, 0, 0, 7, 0, 0, 6, 0, - 0, 6, 1, 3, 3, 0, 0, 0, 9, 0, - 0, 0, 9, 0, 0, 0, 10, 1, 1, 1, - 1, 1, 3, 3, 5, 5, 6, 6, 8, 8, - 1, 1, 3, 5, 1, 2, 1, 0, 0, 1, - 0, 0, 10, 0, 0, 10, 0, 0, 9, 0, - 0, 7, 3, 1, 5, 0, 0, 10, 4, 0, - 0, 11, 0, 0, 11, 0, 0, 10, 5, 0, - 0, 9, 5, 0, 0, 10, 1, 3, 4, 5, - 7, 9, 0, 3, 0, 1, 9, 10, 9 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 4, 4, 1, 3, 0, 1, 3, + 0, 0, 6, 1, 1, 1, 3, 3, 2, 4, + 3, 1, 2, 1, 1, 1, 1, 0, 0, 6, + 4, 5, 0, 9, 4, 2, 2, 3, 2, 3, + 2, 2, 3, 3, 3, 2, 0, 0, 6, 2, + 0, 0, 6, 0, 0, 6, 0, 0, 6, 1, + 0, 0, 6, 0, 0, 7, 1, 0, 0, 6, + 0, 0, 7, 1, 0, 0, 6, 0, 0, 7, + 0, 0, 6, 0, 0, 6, 1, 3, 3, 0, + 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, + 10, 1, 1, 1, 1, 1, 3, 3, 5, 5, + 6, 6, 8, 8, 1, 1, 3, 5, 1, 2, + 1, 0, 0, 1, 0, 0, 10, 0, 0, 10, + 0, 0, 9, 0, 0, 7, 3, 1, 5, 0, + 0, 10, 4, 0, 0, 11, 0, 0, 11, 0, + 0, 10, 5, 0, 0, 9, 5, 0, 0, 10, + 1, 3, 4, 5, 7, 9, 0, 3, 0, 1, + 9, 10, 9 }; @@ -5516,7 +5596,11 @@ YYLTYPE yylloc = yyloc_default; { (yyval.s) = (yyvsp[-1].s); } break; - case 29: /* string_builder_body: %empty */ + case 29: /* string_constant: "start of the string" "end of the string" */ + { (yyval.s) = new string(); } + break; + + case 30: /* string_builder_body: %empty */ { (yyval.pExpression) = new ExprStringBuilder(); (yyval.pExpression)->at = LineInfo(yyextra->g_FileAccessStack.back(), @@ -5524,7 +5608,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 30: /* string_builder_body: string_builder_body character_sequence */ + case 31: /* string_builder_body: string_builder_body character_sequence */ { bool err; auto esconst = unescapeString(*(yyvsp[0].s),&err); @@ -5536,7 +5620,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 31: /* string_builder_body: string_builder_body "{" expr "}" */ + case 32: /* string_builder_body: string_builder_body "{" expr "}" */ { auto se = ExpressionPtr((yyvsp[-1].pExpression)); static_cast((yyvsp[-3].pExpression))->elements.push_back(se); @@ -5544,7 +5628,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 32: /* string_builder: "start of the string" string_builder_body "end of the string" */ + case 33: /* string_builder: "start of the string" string_builder_body "end of the string" */ { auto strb = static_cast((yyvsp[-1].pExpression)); if ( strb->elements.size()==0 ) { @@ -5560,7 +5644,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 33: /* reader_character_sequence: STRING_CHARACTER */ + case 34: /* reader_character_sequence: STRING_CHARACTER */ { if ( !yyextra->g_ReaderMacro->accept(yyextra->g_Program.get(), yyextra->g_Program->thisModule.get(), yyextra->g_ReaderExpr, (yyvsp[0].ch), tokAt(scanner,(yylsp[0]))) ) { das2_yyend_reader(scanner); @@ -5568,7 +5652,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 34: /* reader_character_sequence: reader_character_sequence STRING_CHARACTER */ + case 35: /* reader_character_sequence: reader_character_sequence STRING_CHARACTER */ { if ( !yyextra->g_ReaderMacro->accept(yyextra->g_Program.get(), yyextra->g_Program->thisModule.get(), yyextra->g_ReaderExpr, (yyvsp[0].ch), tokAt(scanner,(yylsp[0]))) ) { das2_yyend_reader(scanner); @@ -5576,7 +5660,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 35: /* $@1: %empty */ + case 36: /* $@1: %empty */ { auto macros = yyextra->g_Program->getReaderMacro(*(yyvsp[0].s)); if ( macros.size()==0 ) { @@ -5601,7 +5685,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 36: /* expr_reader: '%' name_in_namespace $@1 reader_character_sequence */ + case 37: /* expr_reader: '%' name_in_namespace $@1 reader_character_sequence */ { yyextra->g_ReaderExpr->at = tokRangeAt(scanner,(yylsp[-3]),(yylsp[0])); (yyval.pExpression) = yyextra->g_ReaderExpr; @@ -5620,7 +5704,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 37: /* options_declaration: "options" annotation_argument_list */ + case 38: /* options_declaration: "options" annotation_argument_list */ { if ( yyextra->g_Program->options.size() ) { for ( auto & opt : *(yyvsp[0].aaList) ) { @@ -5638,20 +5722,20 @@ YYLTYPE yylloc = yyloc_default; } break; - case 39: /* require_module_name: "name" */ + case 40: /* require_module_name: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 40: /* require_module_name: '%' require_module_name */ + case 41: /* require_module_name: '%' require_module_name */ { *(yyvsp[0].s) = "%" + *(yyvsp[0].s); (yyval.s) = (yyvsp[0].s); } break; - case 41: /* require_module_name: require_module_name '.' "name" */ + case 42: /* require_module_name: require_module_name '.' "name" */ { *(yyvsp[-2].s) += "."; *(yyvsp[-2].s) += *(yyvsp[0].s); @@ -5660,7 +5744,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 42: /* require_module_name: require_module_name '/' "name" */ + case 43: /* require_module_name: require_module_name '/' "name" */ { *(yyvsp[-2].s) += "/"; *(yyvsp[-2].s) += *(yyvsp[0].s); @@ -5669,73 +5753,73 @@ YYLTYPE yylloc = yyloc_default; } break; - case 43: /* require_module: require_module_name is_public_module */ + case 44: /* require_module: require_module_name is_public_module */ { ast_requireModule(scanner,(yyvsp[-1].s),nullptr,(yyvsp[0].b),tokAt(scanner,(yylsp[-1]))); } break; - case 44: /* require_module: require_module_name "as" "name" is_public_module */ + case 45: /* require_module: require_module_name "as" "name" is_public_module */ { ast_requireModule(scanner,(yyvsp[-3].s),(yyvsp[-1].s),(yyvsp[0].b),tokAt(scanner,(yylsp[-3]))); } break; - case 45: /* is_public_module: %empty */ + case 46: /* is_public_module: %empty */ { (yyval.b) = false; } break; - case 46: /* is_public_module: "public" */ + case 47: /* is_public_module: "public" */ { (yyval.b) = true; } break; - case 50: /* expect_error: "integer constant" */ + case 51: /* expect_error: "integer constant" */ { yyextra->g_Program->expectErrors[CompilationError((yyvsp[0].i))] ++; } break; - case 51: /* expect_error: "integer constant" ':' "integer constant" */ + case 52: /* expect_error: "integer constant" ':' "integer constant" */ { yyextra->g_Program->expectErrors[CompilationError((yyvsp[-2].i))] += (yyvsp[0].i); } break; - case 52: /* expression_label: "label" "integer constant" ':' */ + case 53: /* expression_label: "label" "integer constant" ':' */ { (yyval.pExpression) = new ExprLabel(tokAt(scanner,(yylsp[-2])),(yyvsp[-1].i)); } break; - case 53: /* expression_goto: "goto" "label" "integer constant" */ + case 54: /* expression_goto: "goto" "label" "integer constant" */ { (yyval.pExpression) = new ExprGoto(tokAt(scanner,(yylsp[-2])),(yyvsp[0].i)); } break; - case 54: /* expression_goto: "goto" expr */ + case 55: /* expression_goto: "goto" expr */ { (yyval.pExpression) = new ExprGoto(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 55: /* elif_or_static_elif: "elif" */ + case 56: /* elif_or_static_elif: "elif" */ { (yyval.b) = false; } break; - case 56: /* elif_or_static_elif: "static_elif" */ + case 57: /* elif_or_static_elif: "static_elif" */ { (yyval.b) = true; } break; - case 57: /* expression_else: %empty */ + case 58: /* expression_else: %empty */ { (yyval.pExpression) = nullptr; } break; - case 58: /* expression_else: "else" expression_block */ + case 59: /* expression_else: "else" expression_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 59: /* expression_else: elif_or_static_elif '(' expr ')' expression_block expression_else */ + case 60: /* expression_else: elif_or_static_elif '(' expr ')' expression_block expression_else */ { auto eite = new ExprIfThenElse(tokAt(scanner,(yylsp[-5])),ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); @@ -5744,45 +5828,45 @@ YYLTYPE yylloc = yyloc_default; } break; - case 60: /* if_or_static_if: "if" */ + case 61: /* if_or_static_if: "if" */ { (yyval.b) = false; } break; - case 61: /* if_or_static_if: "static_if" */ + case 62: /* if_or_static_if: "static_if" */ { (yyval.b) = true; } break; - case 62: /* expression_else_one_liner: %empty */ + case 63: /* expression_else_one_liner: %empty */ { (yyval.pExpression) = nullptr; } break; - case 63: /* expression_else_one_liner: "else" expression_if_one_liner */ + case 64: /* expression_else_one_liner: "else" expression_if_one_liner */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 64: /* expression_if_one_liner: expr */ + case 65: /* expression_if_one_liner: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 65: /* expression_if_one_liner: expression_return */ + case 66: /* expression_if_one_liner: expression_return */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 66: /* expression_if_one_liner: expression_yield */ + case 67: /* expression_if_one_liner: expression_yield */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 67: /* expression_if_one_liner: expression_break */ + case 68: /* expression_if_one_liner: expression_break */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 68: /* expression_if_one_liner: expression_continue */ + case 69: /* expression_if_one_liner: expression_continue */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 69: /* expression_if_then_else: if_or_static_if '(' expr ')' expression_block expression_else */ + case 70: /* expression_if_then_else: if_or_static_if '(' expr ')' expression_block expression_else */ { auto eite = new ExprIfThenElse(tokAt(scanner,(yylsp[-5])),ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); @@ -5791,19 +5875,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 70: /* expression_if_then_else: expression_if_one_liner "if" '(' expr ')' expression_else_one_liner "end of expression" */ + case 71: /* expression_if_then_else: expression_if_one_liner "if" '(' expr ')' expression_else_one_liner "end of expression" */ { (yyval.pExpression) = new ExprIfThenElse(tokAt(scanner,(yylsp[-5])),ExpressionPtr((yyvsp[-3].pExpression)),ExpressionPtr(ast_wrapInBlock((yyvsp[-6].pExpression))),(yyvsp[-1].pExpression) ? ExpressionPtr(ast_wrapInBlock((yyvsp[-1].pExpression))) : nullptr); } break; - case 71: /* expression_for_loop: "for" '(' variable_name_with_pos_list "in" expr_list ')' expression_block */ + case 72: /* expression_for_loop: "for" '(' variable_name_with_pos_list "in" expr_list ')' expression_block */ { (yyval.pExpression) = ast_forLoop(scanner,(yyvsp[-4].pNameWithPosList),(yyvsp[-2].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-6])),tokAt(scanner,(yylsp[0]))); } break; - case 72: /* expression_unsafe: "unsafe" expression_block */ + case 73: /* expression_unsafe: "unsafe" expression_block */ { auto pUnsafe = new ExprUnsafe(tokAt(scanner,(yylsp[-1]))); pUnsafe->body = ExpressionPtr((yyvsp[0].pExpression)); @@ -5811,7 +5895,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 73: /* expression_while_loop: "while" '(' expr ')' expression_block */ + case 74: /* expression_while_loop: "while" '(' expr ')' expression_block */ { auto pWhile = new ExprWhile(tokAt(scanner,(yylsp[-4]))); pWhile->cond = ExpressionPtr((yyvsp[-2].pExpression)); @@ -5821,7 +5905,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 74: /* expression_with: "with" '(' expr ')' expression_block */ + case 75: /* expression_with: "with" '(' expr ')' expression_block */ { auto pWith = new ExprWith(tokAt(scanner,(yylsp[-4]))); pWith->with = ExpressionPtr((yyvsp[-2].pExpression)); @@ -5830,38 +5914,38 @@ YYLTYPE yylloc = yyloc_default; } break; - case 75: /* expression_with_alias: "assume" "name" '=' expr */ + case 76: /* expression_with_alias: "assume" "name" '=' expr */ { (yyval.pExpression) = new ExprAssume(tokAt(scanner,(yylsp[-3])), *(yyvsp[-2].s), (yyvsp[0].pExpression) ); delete (yyvsp[-2].s); } break; - case 76: /* annotation_argument_value: string_constant */ + case 77: /* annotation_argument_value: string_constant */ { (yyval.aa) = new AnnotationArgument("",*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 77: /* annotation_argument_value: "name" */ + case 78: /* annotation_argument_value: "name" */ { (yyval.aa) = new AnnotationArgument("",*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 78: /* annotation_argument_value: "integer constant" */ + case 79: /* annotation_argument_value: "integer constant" */ { (yyval.aa) = new AnnotationArgument("",(yyvsp[0].i)); } break; - case 79: /* annotation_argument_value: "floating point constant" */ + case 80: /* annotation_argument_value: "floating point constant" */ { (yyval.aa) = new AnnotationArgument("",float((yyvsp[0].fd))); } break; - case 80: /* annotation_argument_value: "true" */ + case 81: /* annotation_argument_value: "true" */ { (yyval.aa) = new AnnotationArgument("",true); } break; - case 81: /* annotation_argument_value: "false" */ + case 82: /* annotation_argument_value: "false" */ { (yyval.aa) = new AnnotationArgument("",false); } break; - case 82: /* annotation_argument_value_list: annotation_argument_value */ + case 83: /* annotation_argument_value_list: annotation_argument_value */ { (yyval.aaList) = new AnnotationArgumentList(); (yyval.aaList)->push_back(*(yyvsp[0].aa)); @@ -5869,7 +5953,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 83: /* annotation_argument_value_list: annotation_argument_value_list ',' annotation_argument_value */ + case 84: /* annotation_argument_value_list: annotation_argument_value_list ',' annotation_argument_value */ { (yyval.aaList) = (yyvsp[-2].aaList); (yyval.aaList)->push_back(*(yyvsp[0].aa)); @@ -5877,89 +5961,89 @@ YYLTYPE yylloc = yyloc_default; } break; - case 84: /* annotation_argument_name: "name" */ + case 85: /* annotation_argument_name: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 85: /* annotation_argument_name: "type" */ + case 86: /* annotation_argument_name: "type" */ { (yyval.s) = new string("type"); } break; - case 86: /* annotation_argument_name: "in" */ + case 87: /* annotation_argument_name: "in" */ { (yyval.s) = new string("in"); } break; - case 87: /* annotation_argument: annotation_argument_name '=' string_constant */ + case 88: /* annotation_argument: annotation_argument_name '=' string_constant */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),*(yyvsp[0].s),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[0].s); delete (yyvsp[-2].s); } break; - case 88: /* annotation_argument: annotation_argument_name '=' "name" */ + case 89: /* annotation_argument: annotation_argument_name '=' "name" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),*(yyvsp[0].s),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[0].s); delete (yyvsp[-2].s); } break; - case 89: /* annotation_argument: annotation_argument_name '=' "integer constant" */ + case 90: /* annotation_argument: annotation_argument_name '=' "integer constant" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),(yyvsp[0].i),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 90: /* annotation_argument: annotation_argument_name '=' "floating point constant" */ + case 91: /* annotation_argument: annotation_argument_name '=' "floating point constant" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),float((yyvsp[0].fd)),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 91: /* annotation_argument: annotation_argument_name '=' "true" */ + case 92: /* annotation_argument: annotation_argument_name '=' "true" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),true,tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 92: /* annotation_argument: annotation_argument_name '=' "false" */ + case 93: /* annotation_argument: annotation_argument_name '=' "false" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),false,tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 93: /* annotation_argument: annotation_argument_name */ + case 94: /* annotation_argument: annotation_argument_name */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[0].s),true,tokAt(scanner,(yylsp[0]))); delete (yyvsp[0].s); } break; - case 94: /* annotation_argument: annotation_argument_name '=' '(' annotation_argument_value_list ')' */ + case 95: /* annotation_argument: annotation_argument_name '=' '(' annotation_argument_value_list ')' */ { { (yyval.aa) = new AnnotationArgument(*(yyvsp[-4].s),(yyvsp[-1].aaList),tokAt(scanner,(yylsp[-4]))); delete (yyvsp[-4].s); } } break; - case 95: /* annotation_argument_list: annotation_argument */ + case 96: /* annotation_argument_list: annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,new AnnotationArgumentList(),(yyvsp[0].aa)); } break; - case 96: /* annotation_argument_list: annotation_argument_list ',' annotation_argument */ + case 97: /* annotation_argument_list: annotation_argument_list ',' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,(yyvsp[-2].aaList),(yyvsp[0].aa)); } break; - case 97: /* metadata_argument_list: '@' annotation_argument */ + case 98: /* metadata_argument_list: '@' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,new AnnotationArgumentList(),(yyvsp[0].aa)); } break; - case 98: /* metadata_argument_list: metadata_argument_list '@' annotation_argument */ + case 99: /* metadata_argument_list: metadata_argument_list '@' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,(yyvsp[-2].aaList),(yyvsp[0].aa)); } break; - case 99: /* annotation_declaration_name: name_in_namespace */ + case 100: /* annotation_declaration_name: name_in_namespace */ { (yyval.s) = (yyvsp[0].s); } break; - case 100: /* annotation_declaration_name: "require" */ + case 101: /* annotation_declaration_name: "require" */ { (yyval.s) = new string("require"); } break; - case 101: /* annotation_declaration_name: "private" */ + case 102: /* annotation_declaration_name: "private" */ { (yyval.s) = new string("private"); } break; - case 102: /* annotation_declaration_basic: annotation_declaration_name */ + case 103: /* annotation_declaration_basic: annotation_declaration_name */ { (yyval.fa) = new AnnotationDeclaration(); (yyval.fa)->at = tokAt(scanner,(yylsp[0])); @@ -5975,7 +6059,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 103: /* annotation_declaration_basic: annotation_declaration_name '(' annotation_argument_list ')' */ + case 104: /* annotation_declaration_basic: annotation_declaration_name '(' annotation_argument_list ')' */ { (yyval.fa) = new AnnotationDeclaration(); (yyval.fa)->at = tokAt(scanner,(yylsp[-3])); @@ -5993,13 +6077,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 104: /* annotation_declaration: annotation_declaration_basic */ + case 105: /* annotation_declaration: annotation_declaration_basic */ { (yyval.fa) = (yyvsp[0].fa); } break; - case 105: /* annotation_declaration: '!' annotation_declaration */ + case 106: /* annotation_declaration: '!' annotation_declaration */ { if ( !(yyvsp[0].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[0].fa)->annotation.get()))->isSpecialized() ) { das2_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[0])), @@ -6010,7 +6094,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 106: /* annotation_declaration: annotation_declaration "&&" annotation_declaration */ + case 107: /* annotation_declaration: annotation_declaration "&&" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das2_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -6024,7 +6108,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 107: /* annotation_declaration: annotation_declaration "||" annotation_declaration */ + case 108: /* annotation_declaration: annotation_declaration "||" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation || !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das2_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -6038,7 +6122,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 108: /* annotation_declaration: annotation_declaration "^^" annotation_declaration */ + case 109: /* annotation_declaration: annotation_declaration "^^" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das2_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -6052,410 +6136,410 @@ YYLTYPE yylloc = yyloc_default; } break; - case 109: /* annotation_declaration: '(' annotation_declaration ')' */ + case 110: /* annotation_declaration: '(' annotation_declaration ')' */ { (yyval.fa) = (yyvsp[-1].fa); } break; - case 110: /* annotation_declaration: "|>" annotation_declaration */ + case 111: /* annotation_declaration: "|>" annotation_declaration */ { (yyval.fa) = (yyvsp[0].fa); (yyvsp[0].fa)->inherited = true; } break; - case 111: /* annotation_list: annotation_declaration */ + case 112: /* annotation_list: annotation_declaration */ { (yyval.faList) = new AnnotationList(); (yyval.faList)->push_back(AnnotationDeclarationPtr((yyvsp[0].fa))); } break; - case 112: /* annotation_list: annotation_list ',' annotation_declaration */ + case 113: /* annotation_list: annotation_list ',' annotation_declaration */ { (yyval.faList) = (yyvsp[-2].faList); (yyval.faList)->push_back(AnnotationDeclarationPtr((yyvsp[0].fa))); } break; - case 113: /* optional_annotation_list: %empty */ + case 114: /* optional_annotation_list: %empty */ { (yyval.faList) = nullptr; } break; - case 114: /* optional_annotation_list: '[' annotation_list ']' */ + case 115: /* optional_annotation_list: '[' annotation_list ']' */ { (yyval.faList) = (yyvsp[-1].faList); } break; - case 115: /* optional_function_argument_list: %empty */ + case 116: /* optional_function_argument_list: %empty */ { (yyval.pVarDeclList) = nullptr; } break; - case 116: /* optional_function_argument_list: '(' ')' */ + case 117: /* optional_function_argument_list: '(' ')' */ { (yyval.pVarDeclList) = nullptr; } break; - case 117: /* optional_function_argument_list: '(' function_argument_list ')' */ + case 118: /* optional_function_argument_list: '(' function_argument_list ')' */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 118: /* optional_function_type: %empty */ + case 119: /* optional_function_type: %empty */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); } break; - case 119: /* optional_function_type: ':' type_declaration */ + case 120: /* optional_function_type: ':' type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 120: /* function_name: "name" */ + case 121: /* function_name: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyval.s) = (yyvsp[0].s); } break; - case 121: /* function_name: "operator" '!' */ + case 122: /* function_name: "operator" '!' */ { (yyval.s) = new string("!"); } break; - case 122: /* function_name: "operator" '~' */ + case 123: /* function_name: "operator" '~' */ { (yyval.s) = new string("~"); } break; - case 123: /* function_name: "operator" "+=" */ + case 124: /* function_name: "operator" "+=" */ { (yyval.s) = new string("+="); } break; - case 124: /* function_name: "operator" "-=" */ + case 125: /* function_name: "operator" "-=" */ { (yyval.s) = new string("-="); } break; - case 125: /* function_name: "operator" "*=" */ + case 126: /* function_name: "operator" "*=" */ { (yyval.s) = new string("*="); } break; - case 126: /* function_name: "operator" "/=" */ + case 127: /* function_name: "operator" "/=" */ { (yyval.s) = new string("/="); } break; - case 127: /* function_name: "operator" "%=" */ + case 128: /* function_name: "operator" "%=" */ { (yyval.s) = new string("%="); } break; - case 128: /* function_name: "operator" "&=" */ + case 129: /* function_name: "operator" "&=" */ { (yyval.s) = new string("&="); } break; - case 129: /* function_name: "operator" "|=" */ + case 130: /* function_name: "operator" "|=" */ { (yyval.s) = new string("|="); } break; - case 130: /* function_name: "operator" "^=" */ + case 131: /* function_name: "operator" "^=" */ { (yyval.s) = new string("^="); } break; - case 131: /* function_name: "operator" "&&=" */ + case 132: /* function_name: "operator" "&&=" */ { (yyval.s) = new string("&&="); } break; - case 132: /* function_name: "operator" "||=" */ + case 133: /* function_name: "operator" "||=" */ { (yyval.s) = new string("||="); } break; - case 133: /* function_name: "operator" "^^=" */ + case 134: /* function_name: "operator" "^^=" */ { (yyval.s) = new string("^^="); } break; - case 134: /* function_name: "operator" "&&" */ + case 135: /* function_name: "operator" "&&" */ { (yyval.s) = new string("&&"); } break; - case 135: /* function_name: "operator" "||" */ + case 136: /* function_name: "operator" "||" */ { (yyval.s) = new string("||"); } break; - case 136: /* function_name: "operator" "^^" */ + case 137: /* function_name: "operator" "^^" */ { (yyval.s) = new string("^^"); } break; - case 137: /* function_name: "operator" '+' */ + case 138: /* function_name: "operator" '+' */ { (yyval.s) = new string("+"); } break; - case 138: /* function_name: "operator" '-' */ + case 139: /* function_name: "operator" '-' */ { (yyval.s) = new string("-"); } break; - case 139: /* function_name: "operator" '*' */ + case 140: /* function_name: "operator" '*' */ { (yyval.s) = new string("*"); } break; - case 140: /* function_name: "operator" '/' */ + case 141: /* function_name: "operator" '/' */ { (yyval.s) = new string("/"); } break; - case 141: /* function_name: "operator" '%' */ + case 142: /* function_name: "operator" '%' */ { (yyval.s) = new string("%"); } break; - case 142: /* function_name: "operator" '<' */ + case 143: /* function_name: "operator" '<' */ { (yyval.s) = new string("<"); } break; - case 143: /* function_name: "operator" '>' */ + case 144: /* function_name: "operator" '>' */ { (yyval.s) = new string(">"); } break; - case 144: /* function_name: "operator" ".." */ + case 145: /* function_name: "operator" ".." */ { (yyval.s) = new string("interval"); } break; - case 145: /* function_name: "operator" "==" */ + case 146: /* function_name: "operator" "==" */ { (yyval.s) = new string("=="); } break; - case 146: /* function_name: "operator" "!=" */ + case 147: /* function_name: "operator" "!=" */ { (yyval.s) = new string("!="); } break; - case 147: /* function_name: "operator" "<=" */ + case 148: /* function_name: "operator" "<=" */ { (yyval.s) = new string("<="); } break; - case 148: /* function_name: "operator" ">=" */ + case 149: /* function_name: "operator" ">=" */ { (yyval.s) = new string(">="); } break; - case 149: /* function_name: "operator" '&' */ + case 150: /* function_name: "operator" '&' */ { (yyval.s) = new string("&"); } break; - case 150: /* function_name: "operator" '|' */ + case 151: /* function_name: "operator" '|' */ { (yyval.s) = new string("|"); } break; - case 151: /* function_name: "operator" '^' */ + case 152: /* function_name: "operator" '^' */ { (yyval.s) = new string("^"); } break; - case 152: /* function_name: "++" "operator" */ + case 153: /* function_name: "++" "operator" */ { (yyval.s) = new string("++"); } break; - case 153: /* function_name: "--" "operator" */ + case 154: /* function_name: "--" "operator" */ { (yyval.s) = new string("--"); } break; - case 154: /* function_name: "operator" "++" */ + case 155: /* function_name: "operator" "++" */ { (yyval.s) = new string("+++"); } break; - case 155: /* function_name: "operator" "--" */ + case 156: /* function_name: "operator" "--" */ { (yyval.s) = new string("---"); } break; - case 156: /* function_name: "operator" "<<" */ + case 157: /* function_name: "operator" "<<" */ { (yyval.s) = new string("<<"); } break; - case 157: /* function_name: "operator" ">>" */ + case 158: /* function_name: "operator" ">>" */ { (yyval.s) = new string(">>"); } break; - case 158: /* function_name: "operator" "<<=" */ + case 159: /* function_name: "operator" "<<=" */ { (yyval.s) = new string("<<="); } break; - case 159: /* function_name: "operator" ">>=" */ + case 160: /* function_name: "operator" ">>=" */ { (yyval.s) = new string(">>="); } break; - case 160: /* function_name: "operator" "<<<" */ + case 161: /* function_name: "operator" "<<<" */ { (yyval.s) = new string("<<<"); } break; - case 161: /* function_name: "operator" ">>>" */ + case 162: /* function_name: "operator" ">>>" */ { (yyval.s) = new string(">>>"); } break; - case 162: /* function_name: "operator" "<<<=" */ + case 163: /* function_name: "operator" "<<<=" */ { (yyval.s) = new string("<<<="); } break; - case 163: /* function_name: "operator" ">>>=" */ + case 164: /* function_name: "operator" ">>>=" */ { (yyval.s) = new string(">>>="); } break; - case 164: /* function_name: "operator" '[' ']' */ + case 165: /* function_name: "operator" '[' ']' */ { (yyval.s) = new string("[]"); } break; - case 165: /* function_name: "operator" "?[" ']' */ + case 166: /* function_name: "operator" "?[" ']' */ { (yyval.s) = new string("?[]"); } break; - case 166: /* function_name: "operator" '.' */ + case 167: /* function_name: "operator" '.' */ { (yyval.s) = new string("."); } break; - case 167: /* function_name: "operator" "?." */ + case 168: /* function_name: "operator" "?." */ { (yyval.s) = new string("?."); } break; - case 168: /* function_name: "operator" '.' "name" */ + case 169: /* function_name: "operator" '.' "name" */ { (yyval.s) = new string(".`"+*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 169: /* function_name: "operator" '.' "name" ":=" */ + case 170: /* function_name: "operator" '.' "name" ":=" */ { (yyval.s) = new string(".`"+*(yyvsp[-1].s)+"`clone"); delete (yyvsp[-1].s); } break; - case 170: /* function_name: "operator" "?." "name" */ + case 171: /* function_name: "operator" "?." "name" */ { (yyval.s) = new string("?.`"+*(yyvsp[0].s)); delete (yyvsp[0].s);} break; - case 171: /* function_name: "operator" ":=" */ + case 172: /* function_name: "operator" ":=" */ { (yyval.s) = new string("clone"); } break; - case 172: /* function_name: "operator" "delete" */ + case 173: /* function_name: "operator" "delete" */ { (yyval.s) = new string("finalize"); } break; - case 173: /* function_name: "operator" "??" */ + case 174: /* function_name: "operator" "??" */ { (yyval.s) = new string("??"); } break; - case 174: /* function_name: "operator" "is" */ + case 175: /* function_name: "operator" "is" */ { (yyval.s) = new string("`is"); } break; - case 175: /* function_name: "operator" "as" */ + case 176: /* function_name: "operator" "as" */ { (yyval.s) = new string("`as"); } break; - case 176: /* function_name: "operator" "is" "name" */ + case 177: /* function_name: "operator" "is" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "`is`" + *(yyvsp[0].s); } break; - case 177: /* function_name: "operator" "as" "name" */ + case 178: /* function_name: "operator" "as" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "`as`" + *(yyvsp[0].s); } break; - case 178: /* function_name: "operator" '?' "as" */ + case 179: /* function_name: "operator" '?' "as" */ { (yyval.s) = new string("?as"); } break; - case 179: /* function_name: "operator" '?' "as" "name" */ + case 180: /* function_name: "operator" '?' "as" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "?as`" + *(yyvsp[0].s); } break; - case 180: /* function_name: "bool" */ + case 181: /* function_name: "bool" */ { (yyval.s) = new string("bool"); } break; - case 181: /* function_name: "string" */ + case 182: /* function_name: "string" */ { (yyval.s) = new string("string"); } break; - case 182: /* function_name: "int" */ + case 183: /* function_name: "int" */ { (yyval.s) = new string("int"); } break; - case 183: /* function_name: "int2" */ + case 184: /* function_name: "int2" */ { (yyval.s) = new string("int2"); } break; - case 184: /* function_name: "int3" */ + case 185: /* function_name: "int3" */ { (yyval.s) = new string("int3"); } break; - case 185: /* function_name: "int4" */ + case 186: /* function_name: "int4" */ { (yyval.s) = new string("int4"); } break; - case 186: /* function_name: "uint" */ + case 187: /* function_name: "uint" */ { (yyval.s) = new string("uint"); } break; - case 187: /* function_name: "uint2" */ + case 188: /* function_name: "uint2" */ { (yyval.s) = new string("uint2"); } break; - case 188: /* function_name: "uint3" */ + case 189: /* function_name: "uint3" */ { (yyval.s) = new string("uint3"); } break; - case 189: /* function_name: "uint4" */ + case 190: /* function_name: "uint4" */ { (yyval.s) = new string("uint4"); } break; - case 190: /* function_name: "float" */ + case 191: /* function_name: "float" */ { (yyval.s) = new string("float"); } break; - case 191: /* function_name: "float2" */ + case 192: /* function_name: "float2" */ { (yyval.s) = new string("float2"); } break; - case 192: /* function_name: "float3" */ + case 193: /* function_name: "float3" */ { (yyval.s) = new string("float3"); } break; - case 193: /* function_name: "float4" */ + case 194: /* function_name: "float4" */ { (yyval.s) = new string("float4"); } break; - case 194: /* function_name: "range" */ + case 195: /* function_name: "range" */ { (yyval.s) = new string("range"); } break; - case 195: /* function_name: "urange" */ + case 196: /* function_name: "urange" */ { (yyval.s) = new string("urange"); } break; - case 196: /* function_name: "range64" */ + case 197: /* function_name: "range64" */ { (yyval.s) = new string("range64"); } break; - case 197: /* function_name: "urange64" */ + case 198: /* function_name: "urange64" */ { (yyval.s) = new string("urange64"); } break; - case 198: /* function_name: "int64" */ + case 199: /* function_name: "int64" */ { (yyval.s) = new string("int64"); } break; - case 199: /* function_name: "uint64" */ + case 200: /* function_name: "uint64" */ { (yyval.s) = new string("uint64"); } break; - case 200: /* function_name: "double" */ + case 201: /* function_name: "double" */ { (yyval.s) = new string("double"); } break; - case 201: /* function_name: "int8" */ + case 202: /* function_name: "int8" */ { (yyval.s) = new string("int8"); } break; - case 202: /* function_name: "uint8" */ + case 203: /* function_name: "uint8" */ { (yyval.s) = new string("uint8"); } break; - case 203: /* function_name: "int16" */ + case 204: /* function_name: "int16" */ { (yyval.s) = new string("int16"); } break; - case 204: /* function_name: "uint16" */ + case 205: /* function_name: "uint16" */ { (yyval.s) = new string("uint16"); } break; - case 205: /* global_function_declaration: optional_annotation_list "def" function_declaration */ + case 206: /* global_function_declaration: optional_annotation_list "def" function_declaration */ { (yyvsp[0].pFuncDecl)->atDecl = tokRangeAt(scanner,(yylsp[-1]),(yylsp[0])); assignDefaultArguments((yyvsp[0].pFuncDecl)); @@ -6473,25 +6557,25 @@ YYLTYPE yylloc = yyloc_default; } break; - case 206: /* optional_public_or_private_function: %empty */ + case 207: /* optional_public_or_private_function: %empty */ { (yyval.b) = yyextra->g_thisStructure ? !yyextra->g_thisStructure->privateStructure : yyextra->g_Program->thisModule->isPublic; } break; - case 207: /* optional_public_or_private_function: "private" */ + case 208: /* optional_public_or_private_function: "private" */ { (yyval.b) = false; } break; - case 208: /* optional_public_or_private_function: "public" */ + case 209: /* optional_public_or_private_function: "public" */ { (yyval.b) = true; } break; - case 209: /* function_declaration_header: function_name optional_function_argument_list optional_function_type */ + case 210: /* function_declaration_header: function_name optional_function_argument_list optional_function_type */ { (yyval.pFuncDecl) = ast_functionDeclarationHeader(scanner,(yyvsp[-2].s),(yyvsp[-1].pVarDeclList),(yyvsp[0].pTypeDecl),tokAt(scanner,(yylsp[-2]))); } break; - case 210: /* $@2: %empty */ + case 211: /* $@2: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -6500,7 +6584,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 211: /* function_declaration: optional_public_or_private_function $@2 function_declaration_header expression_block */ + case 212: /* function_declaration: optional_public_or_private_function $@2 function_declaration_header expression_block */ { (yyvsp[-1].pFuncDecl)->body = ExpressionPtr((yyvsp[0].pExpression)); (yyvsp[-1].pFuncDecl)->privateFunction = !(yyvsp[-3].b); @@ -6512,14 +6596,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 212: /* expression_block: "begin of code block" expressions "end of code block" */ + case 213: /* expression_block: "begin of code block" expressions "end of code block" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); (yyval.pExpression)->at = tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])); } break; - case 213: /* expression_block: "begin of code block" expressions "end of code block" "finally" "begin of code block" expressions "end of code block" */ + case 214: /* expression_block: "begin of code block" expressions "end of code block" "finally" "begin of code block" expressions "end of code block" */ { auto pB = (ExprBlock *) (yyvsp[-5].pExpression); auto pF = (ExprBlock *) (yyvsp[-1].pExpression); @@ -6530,7 +6614,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 214: /* expr_call_pipe: expr_call expr_full_block_assumed_piped */ + case 215: /* expr_call_pipe: expr_call expr_full_block_assumed_piped */ { if ( (yyvsp[-1].pExpression)->rtti_isCallLikeExpr() ) { ((ExprLooksLikeCall *)(yyvsp[-1].pExpression))->arguments.push_back(ExpressionPtr((yyvsp[0].pExpression))); @@ -6542,79 +6626,79 @@ YYLTYPE yylloc = yyloc_default; } break; - case 215: /* expression_any: "end of expression" */ + case 216: /* expression_any: "end of expression" */ { (yyval.pExpression) = nullptr; } break; - case 216: /* expression_any: expr_assign "end of expression" */ + case 217: /* expression_any: expr_assign "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 217: /* expression_any: expression_delete "end of expression" */ + case 218: /* expression_any: expression_delete "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 218: /* expression_any: expression_let */ + case 219: /* expression_any: expression_let */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 219: /* expression_any: expression_while_loop */ + case 220: /* expression_any: expression_while_loop */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 220: /* expression_any: expression_unsafe */ + case 221: /* expression_any: expression_unsafe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 221: /* expression_any: expression_with */ + case 222: /* expression_any: expression_with */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 222: /* expression_any: expression_with_alias "end of expression" */ + case 223: /* expression_any: expression_with_alias "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 223: /* expression_any: expression_for_loop */ + case 224: /* expression_any: expression_for_loop */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 224: /* expression_any: expression_break "end of expression" */ + case 225: /* expression_any: expression_break "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 225: /* expression_any: expression_continue "end of expression" */ + case 226: /* expression_any: expression_continue "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 226: /* expression_any: expression_return "end of expression" */ + case 227: /* expression_any: expression_return "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 227: /* expression_any: expression_yield "end of expression" */ + case 228: /* expression_any: expression_yield "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 228: /* expression_any: expression_if_then_else */ + case 229: /* expression_any: expression_if_then_else */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 229: /* expression_any: expression_try_catch */ + case 230: /* expression_any: expression_try_catch */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 230: /* expression_any: expression_label "end of expression" */ + case 231: /* expression_any: expression_label "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 231: /* expression_any: expression_goto "end of expression" */ + case 232: /* expression_any: expression_goto "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 232: /* expression_any: "pass" "end of expression" */ + case 233: /* expression_any: "pass" "end of expression" */ { (yyval.pExpression) = nullptr; } break; - case 233: /* expressions: %empty */ + case 234: /* expressions: %empty */ { (yyval.pExpression) = new ExprBlock(); (yyval.pExpression)->at = LineInfo(yyextra->g_FileAccessStack.back(), @@ -6622,7 +6706,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 234: /* expressions: expressions expression_any */ + case 235: /* expressions: expressions expression_any */ { (yyval.pExpression) = (yyvsp[-1].pExpression); if ( (yyvsp[0].pExpression) ) { @@ -6631,47 +6715,47 @@ YYLTYPE yylloc = yyloc_default; } break; - case 235: /* expressions: expressions error */ + case 236: /* expressions: expressions error */ { delete (yyvsp[-1].pExpression); (yyval.pExpression) = nullptr; YYABORT; } break; - case 236: /* optional_expr_list: %empty */ + case 237: /* optional_expr_list: %empty */ { (yyval.pExpression) = nullptr; } break; - case 237: /* optional_expr_list: expr_list optional_comma */ + case 238: /* optional_expr_list: expr_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 238: /* optional_expr_map_tuple_list: %empty */ + case 239: /* optional_expr_map_tuple_list: %empty */ { (yyval.pExpression) = nullptr; } break; - case 239: /* optional_expr_map_tuple_list: expr_map_tuple_list optional_comma */ + case 240: /* optional_expr_map_tuple_list: expr_map_tuple_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 240: /* type_declaration_no_options_list: type_declaration */ + case 241: /* type_declaration_no_options_list: type_declaration */ { (yyval.pTypeDeclList) = new vector(); (yyval.pTypeDeclList)->push_back(new ExprTypeDecl(tokAt(scanner,(yylsp[0])),(yyvsp[0].pTypeDecl))); } break; - case 241: /* type_declaration_no_options_list: type_declaration_no_options_list c_or_s type_declaration */ + case 242: /* type_declaration_no_options_list: type_declaration_no_options_list c_or_s type_declaration */ { (yyval.pTypeDeclList) = (yyvsp[-2].pTypeDeclList); (yyval.pTypeDeclList)->push_back(new ExprTypeDecl(tokAt(scanner,(yylsp[0])),(yyvsp[0].pTypeDecl))); } break; - case 242: /* name_in_namespace: "name" */ + case 243: /* name_in_namespace: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 243: /* name_in_namespace: "name" "::" "name" */ + case 244: /* name_in_namespace: "name" "::" "name" */ { auto ita = yyextra->das_module_alias.find(*(yyvsp[-2].s)); if ( ita == yyextra->das_module_alias.end() ) { @@ -6685,17 +6769,17 @@ YYLTYPE yylloc = yyloc_default; } break; - case 244: /* name_in_namespace: "::" "name" */ + case 245: /* name_in_namespace: "::" "name" */ { *(yyvsp[0].s) = "::" + *(yyvsp[0].s); (yyval.s) = (yyvsp[0].s); } break; - case 245: /* expression_delete: "delete" expr */ + case 246: /* expression_delete: "delete" expr */ { (yyval.pExpression) = new ExprDelete(tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 246: /* expression_delete: "delete" "explicit" expr */ + case 247: /* expression_delete: "delete" "explicit" expr */ { auto delExpr = new ExprDelete(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[0].pExpression))); delExpr->native = true; @@ -6703,41 +6787,41 @@ YYLTYPE yylloc = yyloc_default; } break; - case 247: /* $@3: %empty */ + case 248: /* $@3: %empty */ { yyextra->das_arrow_depth ++; } break; - case 248: /* $@4: %empty */ + case 249: /* $@4: %empty */ { yyextra->das_arrow_depth --; } break; - case 249: /* new_type_declaration: '<' $@3 type_declaration '>' $@4 */ + case 250: /* new_type_declaration: '<' $@3 type_declaration '>' $@4 */ { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 250: /* expr_new: "new" structure_type_declaration */ + case 251: /* expr_new: "new" structure_type_declaration */ { (yyval.pExpression) = new ExprNew(tokAt(scanner,(yylsp[-1])),TypeDeclPtr((yyvsp[0].pTypeDecl)),true); } break; - case 251: /* expr_new: "new" structure_type_declaration '(' optional_expr_list ')' */ + case 252: /* expr_new: "new" structure_type_declaration '(' optional_expr_list ')' */ { auto pNew = new ExprNew(tokAt(scanner,(yylsp[-4])),TypeDeclPtr((yyvsp[-3].pTypeDecl)),true); (yyval.pExpression) = parseFunctionArguments(pNew,(yyvsp[-1].pExpression)); } break; - case 252: /* expr_new: "new" new_type_declaration '(' use_initializer ')' */ + case 253: /* expr_new: "new" new_type_declaration '(' use_initializer ')' */ { (yyval.pExpression) = new ExprNew(tokAt(scanner,(yylsp[-4])),TypeDeclPtr((yyvsp[-3].pTypeDecl)),true); ((ExprNew *)(yyval.pExpression))->initializer = (yyvsp[-1].b); } break; - case 253: /* expr_new: "new" new_type_declaration '(' use_initializer make_struct_single ')' */ + case 254: /* expr_new: "new" new_type_declaration '(' use_initializer make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-4])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = (yyvsp[-4].pTypeDecl); @@ -6747,33 +6831,33 @@ YYLTYPE yylloc = yyloc_default; } break; - case 254: /* expr_new: "new" make_decl */ + case 255: /* expr_new: "new" make_decl */ { (yyval.pExpression) = new ExprAscend(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 255: /* expression_break: "break" */ + case 256: /* expression_break: "break" */ { (yyval.pExpression) = new ExprBreak(tokAt(scanner,(yylsp[0]))); } break; - case 256: /* expression_continue: "continue" */ + case 257: /* expression_continue: "continue" */ { (yyval.pExpression) = new ExprContinue(tokAt(scanner,(yylsp[0]))); } break; - case 257: /* expression_return: "return" */ + case 258: /* expression_return: "return" */ { (yyval.pExpression) = new ExprReturn(tokAt(scanner,(yylsp[0])),nullptr); } break; - case 258: /* expression_return: "return" expr */ + case 259: /* expression_return: "return" expr */ { (yyval.pExpression) = new ExprReturn(tokAt(scanner,(yylsp[-1])),(yyvsp[0].pExpression)); } break; - case 259: /* expression_return: "return" "<-" expr */ + case 260: /* expression_return: "return" "<-" expr */ { auto pRet = new ExprReturn(tokAt(scanner,(yylsp[-2])),(yyvsp[0].pExpression)); pRet->moveSemantics = true; @@ -6781,13 +6865,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 260: /* expression_yield: "yield" expr */ + case 261: /* expression_yield: "yield" expr */ { (yyval.pExpression) = new ExprYield(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 261: /* expression_yield: "yield" "<-" expr */ + case 262: /* expression_yield: "yield" "<-" expr */ { auto pRet = new ExprYield(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[0].pExpression))); pRet->moveSemantics = true; @@ -6795,41 +6879,41 @@ YYLTYPE yylloc = yyloc_default; } break; - case 262: /* expression_try_catch: "try" expression_block "recover" expression_block */ + case 263: /* expression_try_catch: "try" expression_block "recover" expression_block */ { (yyval.pExpression) = new ExprTryCatch(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 263: /* kwd_let_var_or_nothing: "let" */ + case 264: /* kwd_let_var_or_nothing: "let" */ { (yyval.b) = true; } break; - case 264: /* kwd_let_var_or_nothing: "var" */ + case 265: /* kwd_let_var_or_nothing: "var" */ { (yyval.b) = false; } break; - case 265: /* kwd_let_var_or_nothing: %empty */ + case 266: /* kwd_let_var_or_nothing: %empty */ { (yyval.b) = true; } break; - case 266: /* kwd_let: "let" */ + case 267: /* kwd_let: "let" */ { (yyval.b) = true; } break; - case 267: /* kwd_let: "var" */ + case 268: /* kwd_let: "var" */ { (yyval.b) = false; } break; - case 268: /* optional_in_scope: "inscope" */ + case 269: /* optional_in_scope: "inscope" */ { (yyval.b) = true; } break; - case 269: /* optional_in_scope: %empty */ + case 270: /* optional_in_scope: %empty */ { (yyval.b) = false; } break; - case 270: /* tuple_expansion: "name" */ + case 271: /* tuple_expansion: "name" */ { (yyval.pNameList) = new vector(); (yyval.pNameList)->push_back(*(yyvsp[0].s)); @@ -6837,7 +6921,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 271: /* tuple_expansion: tuple_expansion ',' "name" */ + case 272: /* tuple_expansion: tuple_expansion ',' "name" */ { (yyvsp[-2].pNameList)->push_back(*(yyvsp[0].s)); delete (yyvsp[0].s); @@ -6845,7 +6929,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 272: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 273: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-6].pNameList),tokAt(scanner,(yylsp[-6])),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -6854,7 +6938,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 273: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' optional_ref copy_or_move_or_clone expr "end of expression" */ + case 274: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-5])); @@ -6866,41 +6950,41 @@ YYLTYPE yylloc = yyloc_default; } break; - case 274: /* expression_let: kwd_let optional_in_scope let_variable_declaration */ + case 275: /* expression_let: kwd_let optional_in_scope let_variable_declaration */ { (yyval.pExpression) = ast_Let(scanner,(yyvsp[-2].b),(yyvsp[-1].b),(yyvsp[0].pVarDecl),tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0]))); } break; - case 275: /* expression_let: kwd_let optional_in_scope tuple_expansion_variable_declaration */ + case 276: /* expression_let: kwd_let optional_in_scope tuple_expansion_variable_declaration */ { (yyval.pExpression) = ast_Let(scanner,(yyvsp[-2].b),(yyvsp[-1].b),(yyvsp[0].pVarDecl),tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0]))); } break; - case 276: /* $@5: %empty */ + case 277: /* $@5: %empty */ { yyextra->das_arrow_depth ++; } break; - case 277: /* $@6: %empty */ + case 278: /* $@6: %empty */ { yyextra->das_arrow_depth --; } break; - case 278: /* expr_cast: "cast" '<' $@5 type_declaration_no_options '>' $@6 expr */ + case 279: /* expr_cast: "cast" '<' $@5 type_declaration_no_options '>' $@6 expr */ { (yyval.pExpression) = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); } break; - case 279: /* $@7: %empty */ + case 280: /* $@7: %empty */ { yyextra->das_arrow_depth ++; } break; - case 280: /* $@8: %empty */ + case 281: /* $@8: %empty */ { yyextra->das_arrow_depth --; } break; - case 281: /* expr_cast: "upcast" '<' $@7 type_declaration_no_options '>' $@8 expr */ + case 282: /* expr_cast: "upcast" '<' $@7 type_declaration_no_options '>' $@8 expr */ { auto pCast = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); pCast->upcast = true; @@ -6908,15 +6992,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 282: /* $@9: %empty */ + case 283: /* $@9: %empty */ { yyextra->das_arrow_depth ++; } break; - case 283: /* $@10: %empty */ + case 284: /* $@10: %empty */ { yyextra->das_arrow_depth --; } break; - case 284: /* expr_cast: "reinterpret" '<' $@9 type_declaration_no_options '>' $@10 expr */ + case 285: /* expr_cast: "reinterpret" '<' $@9 type_declaration_no_options '>' $@10 expr */ { auto pCast = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); pCast->reinterpret = true; @@ -6924,21 +7008,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 285: /* $@11: %empty */ + case 286: /* $@11: %empty */ { yyextra->das_arrow_depth ++; } break; - case 286: /* $@12: %empty */ + case 287: /* $@12: %empty */ { yyextra->das_arrow_depth --; } break; - case 287: /* expr_type_decl: "type" '<' $@11 type_declaration '>' $@12 */ + case 288: /* expr_type_decl: "type" '<' $@11 type_declaration '>' $@12 */ { (yyval.pExpression) = new ExprTypeDecl(tokAt(scanner,(yylsp[-5])),TypeDeclPtr((yyvsp[-2].pTypeDecl))); } break; - case 288: /* expr_type_info: "typeinfo" name_in_namespace '(' expr ')' */ + case 289: /* expr_type_info: "typeinfo" name_in_namespace '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -6951,7 +7035,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 289: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" '>' '(' expr ')' */ + case 290: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" '>' '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -6965,7 +7049,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 290: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" c_or_s "name" '>' '(' expr ')' */ + case 291: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" c_or_s "name" '>' '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -6980,23 +7064,23 @@ YYLTYPE yylloc = yyloc_default; } break; - case 291: /* expr_list: expr */ + case 292: /* expr_list: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 292: /* expr_list: expr_list ',' expr */ + case 293: /* expr_list: expr_list ',' expr */ { (yyval.pExpression) = new ExprSequence(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 293: /* block_or_simple_block: expression_block */ + case 294: /* block_or_simple_block: expression_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 294: /* block_or_simple_block: "=>" expr */ + case 295: /* block_or_simple_block: "=>" expr */ { auto retE = make_smart(tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[0].pExpression))); auto blkE = new ExprBlock(); @@ -7006,7 +7090,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 295: /* block_or_simple_block: "=>" "<-" expr */ + case 296: /* block_or_simple_block: "=>" "<-" expr */ { auto retE = make_smart(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[0].pExpression))); retE->moveSemantics = true; @@ -7017,35 +7101,39 @@ YYLTYPE yylloc = yyloc_default; } break; - case 296: /* block_or_lambda: '$' */ + case 297: /* block_or_lambda: '$' */ { (yyval.i) = 0; /* block */ } break; - case 297: /* block_or_lambda: '@' */ + case 298: /* block_or_lambda: '@' */ { (yyval.i) = 1; /* lambda */ } break; - case 298: /* block_or_lambda: '@' '@' */ + case 299: /* block_or_lambda: '@' '@' */ { (yyval.i) = 2; /* local function */ } break; - case 299: /* capture_entry: '&' "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_reference); delete (yyvsp[0].s); } + case 300: /* capture_entry: '&' "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_reference); delete (yyvsp[0].s); } + break; + + case 301: /* capture_entry: '=' "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_copy); delete (yyvsp[0].s); } break; - case 300: /* capture_entry: '=' "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_copy); delete (yyvsp[0].s); } + case 302: /* capture_entry: "<-" "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_move); delete (yyvsp[0].s); } break; - case 301: /* capture_entry: "<-" "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_move); delete (yyvsp[0].s); } + case 303: /* capture_entry: ":=" "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_clone); delete (yyvsp[0].s); } break; - case 302: /* capture_entry: ":=" "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_clone); delete (yyvsp[0].s); } + case 304: /* capture_entry: "name" '(' "name" ')' */ + { (yyval.pCapt) = ast_makeCaptureEntry(scanner,tokAt(scanner,(yylsp[-3])),*(yyvsp[-3].s),*(yyvsp[-1].s)); delete (yyvsp[-3].s); delete (yyvsp[-1].s); } break; - case 303: /* capture_list: capture_entry */ + case 305: /* capture_list: capture_entry */ { (yyval.pCaptList) = new vector(); (yyval.pCaptList)->push_back(*(yyvsp[0].pCapt)); @@ -7053,7 +7141,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 304: /* capture_list: capture_list ',' capture_entry */ + case 306: /* capture_list: capture_list ',' capture_entry */ { (yyvsp[-2].pCaptList)->push_back(*(yyvsp[0].pCapt)); delete (yyvsp[0].pCapt); @@ -7061,137 +7149,137 @@ YYLTYPE yylloc = yyloc_default; } break; - case 305: /* optional_capture_list: %empty */ + case 307: /* optional_capture_list: %empty */ { (yyval.pCaptList) = nullptr; } break; - case 306: /* optional_capture_list: "capture" '(' capture_list ')' */ + case 308: /* optional_capture_list: "capture" '(' capture_list ')' */ { (yyval.pCaptList) = (yyvsp[-1].pCaptList); } break; - case 307: /* expr_full_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ + case 309: /* expr_full_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ { (yyval.pExpression) = ast_makeBlock(scanner,(yyvsp[-5].i),(yyvsp[-4].faList),(yyvsp[-3].pCaptList),(yyvsp[-2].pVarDeclList),(yyvsp[-1].pTypeDecl),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[-4]))); } break; - case 308: /* expr_full_block_assumed_piped: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type expression_block */ + case 310: /* expr_full_block_assumed_piped: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type expression_block */ { (yyval.pExpression) = ast_makeBlock(scanner,(yyvsp[-5].i),(yyvsp[-4].faList),(yyvsp[-3].pCaptList),(yyvsp[-2].pVarDeclList),(yyvsp[-1].pTypeDecl),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[-4]))); } break; - case 309: /* expr_full_block_assumed_piped: "begin of code block" expressions "end of code block" */ + case 311: /* expr_full_block_assumed_piped: "begin of code block" expressions "end of code block" */ { (yyval.pExpression) = ast_makeBlock(scanner,0,nullptr,nullptr,nullptr,new TypeDecl(Type::autoinfer),(yyvsp[-1].pExpression),tokAt(scanner,(yylsp[-1])),tokAt(scanner,(yylsp[-1]))); } break; - case 310: /* expr_numeric_const: "integer constant" */ + case 312: /* expr_numeric_const: "integer constant" */ { (yyval.pExpression) = new ExprConstInt(tokAt(scanner,(yylsp[0])),(int32_t)(yyvsp[0].i)); } break; - case 311: /* expr_numeric_const: "unsigned integer constant" */ + case 313: /* expr_numeric_const: "unsigned integer constant" */ { (yyval.pExpression) = new ExprConstUInt(tokAt(scanner,(yylsp[0])),(uint32_t)(yyvsp[0].ui)); } break; - case 312: /* expr_numeric_const: "long integer constant" */ + case 314: /* expr_numeric_const: "long integer constant" */ { (yyval.pExpression) = new ExprConstInt64(tokAt(scanner,(yylsp[0])),(int64_t)(yyvsp[0].i64)); } break; - case 313: /* expr_numeric_const: "unsigned long integer constant" */ + case 315: /* expr_numeric_const: "unsigned long integer constant" */ { (yyval.pExpression) = new ExprConstUInt64(tokAt(scanner,(yylsp[0])),(uint64_t)(yyvsp[0].ui64)); } break; - case 314: /* expr_numeric_const: "unsigned int8 constant" */ + case 316: /* expr_numeric_const: "unsigned int8 constant" */ { (yyval.pExpression) = new ExprConstUInt8(tokAt(scanner,(yylsp[0])),(uint8_t)(yyvsp[0].ui)); } break; - case 315: /* expr_numeric_const: "floating point constant" */ + case 317: /* expr_numeric_const: "floating point constant" */ { (yyval.pExpression) = new ExprConstFloat(tokAt(scanner,(yylsp[0])),(float)(yyvsp[0].fd)); } break; - case 316: /* expr_numeric_const: "double constant" */ + case 318: /* expr_numeric_const: "double constant" */ { (yyval.pExpression) = new ExprConstDouble(tokAt(scanner,(yylsp[0])),(double)(yyvsp[0].d)); } break; - case 317: /* expr_assign: expr */ + case 319: /* expr_assign: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 318: /* expr_assign: expr '=' expr */ + case 320: /* expr_assign: expr '=' expr */ { (yyval.pExpression) = new ExprCopy(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 319: /* expr_assign: expr "<-" expr */ + case 321: /* expr_assign: expr "<-" expr */ { (yyval.pExpression) = new ExprMove(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 320: /* expr_assign: expr ":=" expr */ + case 322: /* expr_assign: expr ":=" expr */ { (yyval.pExpression) = new ExprClone(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 321: /* expr_assign: expr "&=" expr */ + case 323: /* expr_assign: expr "&=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 322: /* expr_assign: expr "|=" expr */ + case 324: /* expr_assign: expr "|=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"|=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 323: /* expr_assign: expr "^=" expr */ + case 325: /* expr_assign: expr "^=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 324: /* expr_assign: expr "&&=" expr */ + case 326: /* expr_assign: expr "&&=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 325: /* expr_assign: expr "||=" expr */ + case 327: /* expr_assign: expr "||=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"||=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 326: /* expr_assign: expr "^^=" expr */ + case 328: /* expr_assign: expr "^^=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 327: /* expr_assign: expr "+=" expr */ + case 329: /* expr_assign: expr "+=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"+=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 328: /* expr_assign: expr "-=" expr */ + case 330: /* expr_assign: expr "-=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"-=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 329: /* expr_assign: expr "*=" expr */ + case 331: /* expr_assign: expr "*=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"*=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 330: /* expr_assign: expr "/=" expr */ + case 332: /* expr_assign: expr "/=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"/=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 331: /* expr_assign: expr "%=" expr */ + case 333: /* expr_assign: expr "%=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"%=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 332: /* expr_assign: expr "<<=" expr */ + case 334: /* expr_assign: expr "<<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 333: /* expr_assign: expr ">>=" expr */ + case 335: /* expr_assign: expr ">>=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 334: /* expr_assign: expr "<<<=" expr */ + case 336: /* expr_assign: expr "<<<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 335: /* expr_assign: expr ">>>=" expr */ + case 337: /* expr_assign: expr ">>>=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 336: /* expr_named_call: name_in_namespace '(' '[' make_struct_fields ']' ')' */ + case 338: /* expr_named_call: name_in_namespace '(' '[' make_struct_fields ']' ')' */ { auto nc = new ExprNamedCall(tokAt(scanner,(yylsp[-5])),*(yyvsp[-5].s)); nc->arguments = *(yyvsp[-2].pMakeStruct); @@ -7201,7 +7289,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 337: /* expr_named_call: name_in_namespace '(' expr_list ',' '[' make_struct_fields ']' ')' */ + case 339: /* expr_named_call: name_in_namespace '(' expr_list ',' '[' make_struct_fields ']' ')' */ { auto nc = new ExprNamedCall(tokAt(scanner,(yylsp[-7])),*(yyvsp[-7].s)); nc->nonNamedArguments = sequenceToList((yyvsp[-5].pExpression)); @@ -7212,7 +7300,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 338: /* expr_method_call: expr "->" "name" '(' ')' */ + case 340: /* expr_method_call: expr "->" "name" '(' ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), *(yyvsp[-2].s)); delete (yyvsp[-2].s); @@ -7220,7 +7308,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 339: /* expr_method_call: expr "->" "name" '(' expr_list ')' */ + case 341: /* expr_method_call: expr "->" "name" '(' expr_list ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), *(yyvsp[-3].s)); auto callArgs = sequenceToList((yyvsp[-1].pExpression)); @@ -7230,35 +7318,35 @@ YYLTYPE yylloc = yyloc_default; } break; - case 340: /* func_addr_name: name_in_namespace */ + case 342: /* func_addr_name: name_in_namespace */ { (yyval.pExpression) = new ExprAddr(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 341: /* func_addr_name: "$i" '(' expr ')' */ + case 343: /* func_addr_name: "$i" '(' expr ')' */ { auto expr = new ExprAddr(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``ADDR``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression), expr, "i"); } break; - case 342: /* func_addr_expr: '@' '@' func_addr_name */ + case 344: /* func_addr_expr: '@' '@' func_addr_name */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 343: /* $@13: %empty */ + case 345: /* $@13: %empty */ { yyextra->das_arrow_depth ++; } break; - case 344: /* $@14: %empty */ + case 346: /* $@14: %empty */ { yyextra->das_arrow_depth --; } break; - case 345: /* func_addr_expr: '@' '@' '<' $@13 type_declaration_no_options '>' $@14 func_addr_name */ + case 347: /* func_addr_expr: '@' '@' '<' $@13 type_declaration_no_options '>' $@14 func_addr_name */ { auto expr = (ExprAddr *) ((yyvsp[0].pExpression)->rtti_isAddr() ? (yyvsp[0].pExpression) : (((ExprTag *) (yyvsp[0].pExpression))->value.get())); expr->funcType = TypeDeclPtr((yyvsp[-3].pTypeDecl)); @@ -7266,15 +7354,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 346: /* $@15: %empty */ + case 348: /* $@15: %empty */ { yyextra->das_arrow_depth ++; } break; - case 347: /* $@16: %empty */ + case 349: /* $@16: %empty */ { yyextra->das_arrow_depth --; } break; - case 348: /* func_addr_expr: '@' '@' '<' $@15 optional_function_argument_list optional_function_type '>' $@16 func_addr_name */ + case 350: /* func_addr_expr: '@' '@' '<' $@15 optional_function_argument_list optional_function_type '>' $@16 func_addr_name */ { auto expr = (ExprAddr *) ((yyvsp[0].pExpression)->rtti_isAddr() ? (yyvsp[0].pExpression) : (((ExprTag *) (yyvsp[0].pExpression))->value.get())); expr->funcType = make_smart(Type::tFunction); @@ -7287,21 +7375,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 349: /* expr_field: expr '.' "name" */ + case 351: /* expr_field: expr '.' "name" */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-2].pExpression)), *(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 350: /* expr_field: expr '.' '.' "name" */ + case 352: /* expr_field: expr '.' '.' "name" */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-3].pExpression)), *(yyvsp[0].s), true); delete (yyvsp[0].s); } break; - case 351: /* expr_field: expr '.' "name" '(' ')' */ + case 353: /* expr_field: expr '.' "name" '(' ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), *(yyvsp[-2].s)); delete (yyvsp[-2].s); @@ -7309,7 +7397,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 352: /* expr_field: expr '.' "name" '(' expr_list ')' */ + case 354: /* expr_field: expr '.' "name" '(' expr_list ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), *(yyvsp[-3].s)); auto callArgs = sequenceToList((yyvsp[-1].pExpression)); @@ -7319,29 +7407,47 @@ YYLTYPE yylloc = yyloc_default; } break; - case 353: /* $@17: %empty */ + case 355: /* expr_field: expr '.' basic_type_declaration '(' ')' */ + { + auto method_name = das_to_string((yyvsp[-2].type)); + auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), method_name); + (yyval.pExpression) = pInvoke; + } + break; + + case 356: /* expr_field: expr '.' basic_type_declaration '(' expr_list ')' */ + { + auto method_name = das_to_string((yyvsp[-3].type)); + auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), method_name); + auto callArgs = sequenceToList((yyvsp[-1].pExpression)); + pInvoke->arguments.insert ( pInvoke->arguments.end(), callArgs.begin(), callArgs.end() ); + (yyval.pExpression) = pInvoke; + } + break; + + case 357: /* $@17: %empty */ { yyextra->das_suppress_errors=true; } break; - case 354: /* $@18: %empty */ + case 358: /* $@18: %empty */ { yyextra->das_suppress_errors=false; } break; - case 355: /* expr_field: expr '.' $@17 error $@18 */ + case 359: /* expr_field: expr '.' $@17 error $@18 */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-3])), tokAt(scanner,(yylsp[-3])), ExpressionPtr((yyvsp[-4].pExpression)), ""); yyerrok; } break; - case 356: /* expr_call: name_in_namespace '(' ')' */ + case 360: /* expr_call: name_in_namespace '(' ')' */ { (yyval.pExpression) = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0])),*(yyvsp[-2].s)); delete (yyvsp[-2].s); } break; - case 357: /* expr_call: name_in_namespace '(' "uninitialized" ')' */ + case 361: /* expr_call: name_in_namespace '(' "uninitialized" ')' */ { auto dd = new ExprMakeStruct(tokAt(scanner,(yylsp[-3]))); dd->at = tokAt(scanner,(yylsp[-3])); @@ -7354,7 +7460,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 358: /* expr_call: name_in_namespace '(' make_struct_single ')' */ + case 362: /* expr_call: name_in_namespace '(' make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-3])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = new TypeDecl(Type::alias); @@ -7366,7 +7472,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 359: /* expr_call: name_in_namespace '(' "uninitialized" make_struct_single ')' */ + case 363: /* expr_call: name_in_namespace '(' "uninitialized" make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-4])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = new TypeDecl(Type::alias); @@ -7378,166 +7484,166 @@ YYLTYPE yylloc = yyloc_default; } break; - case 360: /* expr_call: name_in_namespace '(' expr_list ')' */ + case 364: /* expr_call: name_in_namespace '(' expr_list ')' */ { (yyval.pExpression) = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-3])),tokAt(scanner,(yylsp[0])),*(yyvsp[-3].s)),(yyvsp[-1].pExpression)); delete (yyvsp[-3].s); } break; - case 361: /* expr_call: basic_type_declaration '(' ')' */ + case 365: /* expr_call: basic_type_declaration '(' ')' */ { (yyval.pExpression) = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[-2].type))); } break; - case 362: /* expr_call: basic_type_declaration '(' expr_list ')' */ + case 366: /* expr_call: basic_type_declaration '(' expr_list ')' */ { (yyval.pExpression) = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-3])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[-3].type))),(yyvsp[-1].pExpression)); } break; - case 363: /* expr: "null" */ + case 367: /* expr: "null" */ { (yyval.pExpression) = new ExprConstPtr(tokAt(scanner,(yylsp[0])),nullptr); } break; - case 364: /* expr: name_in_namespace */ + case 368: /* expr: name_in_namespace */ { (yyval.pExpression) = new ExprVar(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 365: /* expr: expr_numeric_const */ + case 369: /* expr: expr_numeric_const */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 366: /* expr: expr_reader */ + case 370: /* expr: expr_reader */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 367: /* expr: string_builder */ + case 371: /* expr: string_builder */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 368: /* expr: make_decl */ + case 372: /* expr: make_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 369: /* expr: "true" */ + case 373: /* expr: "true" */ { (yyval.pExpression) = new ExprConstBool(tokAt(scanner,(yylsp[0])),true); } break; - case 370: /* expr: "false" */ + case 374: /* expr: "false" */ { (yyval.pExpression) = new ExprConstBool(tokAt(scanner,(yylsp[0])),false); } break; - case 371: /* expr: expr_field */ + case 375: /* expr: expr_field */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 372: /* expr: expr_mtag */ + case 376: /* expr: expr_mtag */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 373: /* expr: '!' expr */ + case 377: /* expr: '!' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"!",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 374: /* expr: '~' expr */ + case 378: /* expr: '~' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"~",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 375: /* expr: '+' expr */ + case 379: /* expr: '+' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"+",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 376: /* expr: '-' expr */ + case 380: /* expr: '-' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"-",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 377: /* expr: expr "<<" expr */ + case 381: /* expr: expr "<<" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 378: /* expr: expr ">>" expr */ + case 382: /* expr: expr ">>" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 379: /* expr: expr "<<<" expr */ + case 383: /* expr: expr "<<<" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 380: /* expr: expr ">>>" expr */ + case 384: /* expr: expr ">>>" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>>", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 381: /* expr: expr '+' expr */ + case 385: /* expr: expr '+' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"+", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 382: /* expr: expr '-' expr */ + case 386: /* expr: expr '-' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"-", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 383: /* expr: expr '*' expr */ + case 387: /* expr: expr '*' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"*", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 384: /* expr: expr '/' expr */ + case 388: /* expr: expr '/' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"/", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 385: /* expr: expr '%' expr */ + case 389: /* expr: expr '%' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"%", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 386: /* expr: expr '<' expr */ + case 390: /* expr: expr '<' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 387: /* expr: expr '>' expr */ + case 391: /* expr: expr '>' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 388: /* expr: expr "==" expr */ + case 392: /* expr: expr "==" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"==", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 389: /* expr: expr "!=" expr */ + case 393: /* expr: expr "!=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"!=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 390: /* expr: expr "<=" expr */ + case 394: /* expr: expr "<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 391: /* expr: expr ">=" expr */ + case 395: /* expr: expr ">=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 392: /* expr: expr '&' expr */ + case 396: /* expr: expr '&' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 393: /* expr: expr '|' expr */ + case 397: /* expr: expr '|' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"|", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 394: /* expr: expr '^' expr */ + case 398: /* expr: expr '^' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 395: /* expr: expr "&&" expr */ + case 399: /* expr: expr "&&" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&&", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 396: /* expr: expr "||" expr */ + case 400: /* expr: expr "||" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"||", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 397: /* expr: expr "^^" expr */ + case 401: /* expr: expr "^^" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^^", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 398: /* expr: expr ".." expr */ + case 402: /* expr: expr ".." expr */ { auto itv = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-1])),"interval"); itv->arguments.push_back(ExpressionPtr((yyvsp[-2].pExpression))); @@ -7546,23 +7652,23 @@ YYLTYPE yylloc = yyloc_default; } break; - case 399: /* expr: "++" expr */ + case 403: /* expr: "++" expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"++", ExpressionPtr((yyvsp[0].pExpression))); } break; - case 400: /* expr: "--" expr */ + case 404: /* expr: "--" expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"--", ExpressionPtr((yyvsp[0].pExpression))); } break; - case 401: /* expr: expr "++" */ + case 405: /* expr: expr "++" */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[0])),"+++", ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 402: /* expr: expr "--" */ + case 406: /* expr: expr "--" */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[0])),"---", ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 403: /* expr: '(' expr_list optional_comma ')' */ + case 407: /* expr: '(' expr_list optional_comma ')' */ { if ( (yyvsp[-2].pExpression)->rtti_isSequence() ) { auto mkt = new ExprMakeTuple(tokAt(scanner,(yylsp[-2]))); @@ -7578,63 +7684,63 @@ YYLTYPE yylloc = yyloc_default; } break; - case 404: /* expr: expr '[' expr ']' */ + case 408: /* expr: expr '[' expr ']' */ { (yyval.pExpression) = new ExprAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 405: /* expr: expr '.' '[' expr ']' */ + case 409: /* expr: expr '.' '[' expr ']' */ { (yyval.pExpression) = new ExprAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-4].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)), true); } break; - case 406: /* expr: expr "?[" expr ']' */ + case 410: /* expr: expr "?[" expr ']' */ { (yyval.pExpression) = new ExprSafeAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 407: /* expr: expr '.' "?[" expr ']' */ + case 411: /* expr: expr '.' "?[" expr ']' */ { (yyval.pExpression) = new ExprSafeAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-4].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)), true); } break; - case 408: /* expr: expr "?." "name" */ + case 412: /* expr: expr "?." "name" */ { (yyval.pExpression) = new ExprSafeField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-2].pExpression)), *(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 409: /* expr: expr '.' "?." "name" */ + case 413: /* expr: expr '.' "?." "name" */ { (yyval.pExpression) = new ExprSafeField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-3].pExpression)), *(yyvsp[0].s), true); delete (yyvsp[0].s); } break; - case 410: /* expr: func_addr_expr */ + case 414: /* expr: func_addr_expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 411: /* expr: expr_call */ + case 415: /* expr: expr_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 412: /* expr: '*' expr */ + case 416: /* expr: '*' expr */ { (yyval.pExpression) = new ExprPtr2Ref(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 413: /* expr: "deref" '(' expr ')' */ + case 417: /* expr: "deref" '(' expr ')' */ { (yyval.pExpression) = new ExprPtr2Ref(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 414: /* expr: "addr" '(' expr ')' */ + case 418: /* expr: "addr" '(' expr ')' */ { (yyval.pExpression) = new ExprRef2Ptr(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 415: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' ')' */ + case 419: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' ')' */ { (yyval.pExpression) = ast_makeGenerator(scanner,(yyvsp[-4].pTypeDecl),(yyvsp[-2].pCaptList),nullptr,tokAt(scanner,(yylsp[-6]))); } break; - case 416: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' expr ')' */ + case 420: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' expr ')' */ { (yyval.pExpression) = ast_makeGenerator(scanner,(yyvsp[-5].pTypeDecl),(yyvsp[-3].pCaptList),(yyvsp[-1].pExpression),tokAt(scanner,(yylsp[-7]))); } break; - case 417: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list expression_block */ + case 421: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list expression_block */ { auto closure = new ExprMakeBlock(tokAt(scanner,(yylsp[0])),ExpressionPtr((yyvsp[0].pExpression))); ((ExprBlock *)(yyvsp[0].pExpression))->returnType = make_smart(Type::autoinfer); @@ -7642,31 +7748,31 @@ YYLTYPE yylloc = yyloc_default; } break; - case 418: /* expr: expr "??" expr */ + case 422: /* expr: expr "??" expr */ { (yyval.pExpression) = new ExprNullCoalescing(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 419: /* expr: expr '?' expr ':' expr */ + case 423: /* expr: expr '?' expr ':' expr */ { (yyval.pExpression) = new ExprOp3(tokAt(scanner,(yylsp[-3])),"?",ExpressionPtr((yyvsp[-4].pExpression)),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 420: /* $@19: %empty */ + case 424: /* $@19: %empty */ { yyextra->das_arrow_depth ++; } break; - case 421: /* $@20: %empty */ + case 425: /* $@20: %empty */ { yyextra->das_arrow_depth --; } break; - case 422: /* expr: expr "is" "type" '<' $@19 type_declaration_no_options '>' $@20 */ + case 426: /* expr: expr "is" "type" '<' $@19 type_declaration_no_options '>' $@20 */ { (yyval.pExpression) = new ExprIs(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-7].pExpression)),TypeDeclPtr((yyvsp[-2].pTypeDecl))); } break; - case 423: /* expr: expr "is" basic_type_declaration */ + case 427: /* expr: expr "is" basic_type_declaration */ { auto vdecl = new TypeDecl((yyvsp[0].type)); vdecl->at = tokAt(scanner,(yylsp[0])); @@ -7674,29 +7780,29 @@ YYLTYPE yylloc = yyloc_default; } break; - case 424: /* expr: expr "is" "name" */ + case 428: /* expr: expr "is" "name" */ { (yyval.pExpression) = new ExprIsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 425: /* expr: expr "as" "name" */ + case 429: /* expr: expr "as" "name" */ { (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 426: /* $@21: %empty */ + case 430: /* $@21: %empty */ { yyextra->das_arrow_depth ++; } break; - case 427: /* $@22: %empty */ + case 431: /* $@22: %empty */ { yyextra->das_arrow_depth --; } break; - case 428: /* expr: expr "as" "type" '<' $@21 type_declaration '>' $@22 */ + case 432: /* expr: expr "as" "type" '<' $@21 type_declaration '>' $@22 */ { auto vname = (yyvsp[-2].pTypeDecl)->describe(); (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-7].pExpression)),vname); @@ -7704,28 +7810,28 @@ YYLTYPE yylloc = yyloc_default; } break; - case 429: /* expr: expr "as" basic_type_declaration */ + case 433: /* expr: expr "as" basic_type_declaration */ { (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),das_to_string((yyvsp[0].type))); } break; - case 430: /* expr: expr '?' "as" "name" */ + case 434: /* expr: expr '?' "as" "name" */ { (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-3].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 431: /* $@23: %empty */ + case 435: /* $@23: %empty */ { yyextra->das_arrow_depth ++; } break; - case 432: /* $@24: %empty */ + case 436: /* $@24: %empty */ { yyextra->das_arrow_depth --; } break; - case 433: /* expr: expr '?' "as" "type" '<' $@23 type_declaration '>' $@24 */ + case 437: /* expr: expr '?' "as" "type" '<' $@23 type_declaration '>' $@24 */ { auto vname = (yyvsp[-2].pTypeDecl)->describe(); (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-8].pExpression)),vname); @@ -7733,60 +7839,60 @@ YYLTYPE yylloc = yyloc_default; } break; - case 434: /* expr: expr '?' "as" basic_type_declaration */ + case 438: /* expr: expr '?' "as" basic_type_declaration */ { (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-3].pExpression)),das_to_string((yyvsp[0].type))); } break; - case 435: /* expr: expr_type_info */ + case 439: /* expr: expr_type_info */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 436: /* expr: expr_type_decl */ + case 440: /* expr: expr_type_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 437: /* expr: expr_cast */ + case 441: /* expr: expr_cast */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 438: /* expr: expr_new */ + case 442: /* expr: expr_new */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 439: /* expr: expr_method_call */ + case 443: /* expr: expr_method_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 440: /* expr: expr_named_call */ + case 444: /* expr: expr_named_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 441: /* expr: expr_full_block */ + case 445: /* expr: expr_full_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 442: /* expr: expr "<|" expr */ + case 446: /* expr: expr "<|" expr */ { (yyval.pExpression) = ast_lpipe(scanner,(yyvsp[-2].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-1]))); } break; - case 443: /* expr: expr "|>" expr */ + case 447: /* expr: expr "|>" expr */ { (yyval.pExpression) = ast_rpipe(scanner,(yyvsp[-2].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-1]))); } break; - case 444: /* expr: expr "|>" basic_type_declaration */ + case 448: /* expr: expr "|>" basic_type_declaration */ { auto fncall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[0].type))); (yyval.pExpression) = ast_rpipe(scanner,(yyvsp[-2].pExpression),fncall,tokAt(scanner,(yylsp[-1]))); } break; - case 445: /* expr: expr_call_pipe */ + case 449: /* expr: expr_call_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 446: /* expr: "unsafe" '(' expr ')' */ + case 450: /* expr: "unsafe" '(' expr ')' */ { (yyvsp[-1].pExpression)->alwaysSafe = true; (yyvsp[-1].pExpression)->userSaidItsSafe = true; @@ -7794,149 +7900,149 @@ YYLTYPE yylloc = yyloc_default; } break; - case 447: /* expr_mtag: "$$" '(' expr ')' */ + case 451: /* expr_mtag: "$$" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"e"); } break; - case 448: /* expr_mtag: "$i" '(' expr ')' */ + case 452: /* expr_mtag: "$i" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"i"); } break; - case 449: /* expr_mtag: "$v" '(' expr ')' */ + case 453: /* expr_mtag: "$v" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"v"); } break; - case 450: /* expr_mtag: "$b" '(' expr ')' */ + case 454: /* expr_mtag: "$b" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"b"); } break; - case 451: /* expr_mtag: "$a" '(' expr ')' */ + case 455: /* expr_mtag: "$a" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"a"); } break; - case 452: /* expr_mtag: "..." */ + case 456: /* expr_mtag: "..." */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[0])),nullptr,"..."); } break; - case 453: /* expr_mtag: "$c" '(' expr ')' '(' ')' */ + case 457: /* expr_mtag: "$c" '(' expr ')' '(' ')' */ { auto ccall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-5])),tokAt(scanner,(yylsp[0])),"``MACRO``TAG``CALL``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-5])),(yyvsp[-3].pExpression),ccall,"c"); } break; - case 454: /* expr_mtag: "$c" '(' expr ')' '(' expr_list ')' */ + case 458: /* expr_mtag: "$c" '(' expr ')' '(' expr_list ')' */ { auto ccall = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-6])),tokAt(scanner,(yylsp[0])),"``MACRO``TAG``CALL``"),(yyvsp[-1].pExpression)); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-6])),(yyvsp[-4].pExpression),ccall,"c"); } break; - case 455: /* expr_mtag: expr '.' "$f" '(' expr ')' */ + case 459: /* expr_mtag: expr '.' "$f" '(' expr ')' */ { auto cfield = new ExprField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-5].pExpression)), "``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 456: /* expr_mtag: expr "?." "$f" '(' expr ')' */ + case 460: /* expr_mtag: expr "?." "$f" '(' expr ')' */ { auto cfield = new ExprSafeField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-5].pExpression)), "``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 457: /* expr_mtag: expr '.' '.' "$f" '(' expr ')' */ + case 461: /* expr_mtag: expr '.' '.' "$f" '(' expr ')' */ { auto cfield = new ExprField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-6].pExpression)), "``MACRO``TAG``FIELD``", true); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 458: /* expr_mtag: expr '.' "?." "$f" '(' expr ')' */ + case 462: /* expr_mtag: expr '.' "?." "$f" '(' expr ')' */ { auto cfield = new ExprSafeField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-6].pExpression)), "``MACRO``TAG``FIELD``", true); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 459: /* expr_mtag: expr "as" "$f" '(' expr ')' */ + case 463: /* expr_mtag: expr "as" "$f" '(' expr ')' */ { auto cfield = new ExprAsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-5].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 460: /* expr_mtag: expr '?' "as" "$f" '(' expr ')' */ + case 464: /* expr_mtag: expr '?' "as" "$f" '(' expr ')' */ { auto cfield = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-6].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 461: /* expr_mtag: expr "is" "$f" '(' expr ')' */ + case 465: /* expr_mtag: expr "is" "$f" '(' expr ')' */ { auto cfield = new ExprIsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-5].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 462: /* expr_mtag: '@' '@' "$c" '(' expr ')' */ + case 466: /* expr_mtag: '@' '@' "$c" '(' expr ')' */ { auto ccall = new ExprAddr(tokAt(scanner,(yylsp[-4])),"``MACRO``TAG``ADDR``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-3])),(yyvsp[-1].pExpression),ccall,"c"); } break; - case 463: /* optional_field_annotation: %empty */ + case 467: /* optional_field_annotation: %empty */ { (yyval.aaList) = nullptr; } break; - case 464: /* optional_field_annotation: metadata_argument_list */ + case 468: /* optional_field_annotation: metadata_argument_list */ { (yyval.aaList) = (yyvsp[0].aaList); } break; - case 465: /* optional_override: %empty */ + case 469: /* optional_override: %empty */ { (yyval.i) = OVERRIDE_NONE; } break; - case 466: /* optional_override: "override" */ + case 470: /* optional_override: "override" */ { (yyval.i) = OVERRIDE_OVERRIDE; } break; - case 467: /* optional_override: "sealed" */ + case 471: /* optional_override: "sealed" */ { (yyval.i) = OVERRIDE_SEALED; } break; - case 468: /* optional_constant: %empty */ + case 472: /* optional_constant: %empty */ { (yyval.b) = false; } break; - case 469: /* optional_constant: "const" */ + case 473: /* optional_constant: "const" */ { (yyval.b) = true; } break; - case 470: /* optional_public_or_private_member_variable: %empty */ + case 474: /* optional_public_or_private_member_variable: %empty */ { (yyval.b) = false; } break; - case 471: /* optional_public_or_private_member_variable: "public" */ + case 475: /* optional_public_or_private_member_variable: "public" */ { (yyval.b) = false; } break; - case 472: /* optional_public_or_private_member_variable: "private" */ + case 476: /* optional_public_or_private_member_variable: "private" */ { (yyval.b) = true; } break; - case 473: /* optional_static_member_variable: %empty */ + case 477: /* optional_static_member_variable: %empty */ { (yyval.b) = false; } break; - case 474: /* optional_static_member_variable: "static" */ + case 478: /* optional_static_member_variable: "static" */ { (yyval.b) = true; } break; - case 475: /* structure_variable_declaration: optional_field_annotation optional_static_member_variable optional_override optional_public_or_private_member_variable variable_declaration */ + case 479: /* structure_variable_declaration: optional_field_annotation optional_static_member_variable optional_override optional_public_or_private_member_variable variable_declaration */ { (yyvsp[0].pVarDecl)->override = (yyvsp[-2].i) == OVERRIDE_OVERRIDE; (yyvsp[0].pVarDecl)->sealed = (yyvsp[-2].i) == OVERRIDE_SEALED; @@ -7947,13 +8053,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 476: /* struct_variable_declaration_list: %empty */ + case 480: /* struct_variable_declaration_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 477: /* $@25: %empty */ + case 481: /* $@25: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -7962,7 +8068,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 478: /* struct_variable_declaration_list: struct_variable_declaration_list $@25 structure_variable_declaration "end of expression" */ + case 482: /* struct_variable_declaration_list: struct_variable_declaration_list $@25 structure_variable_declaration "end of expression" */ { (yyval.pVarDeclList) = (yyvsp[-3].pVarDeclList); if ( (yyvsp[-1].pVarDecl) ) (yyvsp[-3].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); @@ -7978,7 +8084,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 479: /* $@26: %empty */ + case 483: /* $@26: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-2])); @@ -7987,7 +8093,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 480: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable "abstract" optional_constant $@26 function_declaration_header "end of expression" */ + case 484: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable "abstract" optional_constant $@26 function_declaration_header "end of expression" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -7997,7 +8103,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 481: /* $@27: %empty */ + case 485: /* $@27: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -8006,7 +8112,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 482: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable optional_static_member_variable optional_override optional_constant $@27 function_declaration_header expression_block */ + case 486: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable optional_static_member_variable optional_override optional_constant $@27 function_declaration_header expression_block */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -8016,7 +8122,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 483: /* function_argument_declaration: optional_field_annotation kwd_let_var_or_nothing variable_declaration */ + case 487: /* function_argument_declaration: optional_field_annotation kwd_let_var_or_nothing variable_declaration */ { (yyval.pVarDecl) = (yyvsp[0].pVarDecl); if ( (yyvsp[-1].b) ) { @@ -8028,7 +8134,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 484: /* function_argument_declaration: "$a" '(' expr ')' */ + case 488: /* function_argument_declaration: "$a" '(' expr ')' */ { auto na = new vector(); na->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1]))}); @@ -8038,21 +8144,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 485: /* function_argument_list: function_argument_declaration */ + case 489: /* function_argument_list: function_argument_declaration */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 486: /* function_argument_list: function_argument_list "end of expression" function_argument_declaration */ + case 490: /* function_argument_list: function_argument_list "end of expression" function_argument_declaration */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 487: /* tuple_type: type_declaration */ + case 491: /* tuple_type: type_declaration */ { (yyval.pVarDecl) = new VariableDeclaration(nullptr,(yyvsp[0].pTypeDecl),nullptr); } break; - case 488: /* tuple_type: "name" ':' type_declaration */ + case 492: /* tuple_type: "name" ':' type_declaration */ { auto na = new vector(); na->push_back(VariableNameAndPosition{*(yyvsp[-2].s),"",tokAt(scanner,(yylsp[-2]))}); @@ -8061,27 +8167,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 489: /* tuple_type_list: tuple_type */ + case 493: /* tuple_type_list: tuple_type */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 490: /* tuple_type_list: tuple_type_list c_or_s tuple_type */ + case 494: /* tuple_type_list: tuple_type_list c_or_s tuple_type */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 491: /* tuple_alias_type_list: %empty */ + case 495: /* tuple_alias_type_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 492: /* tuple_alias_type_list: tuple_alias_type_list c_or_s */ + case 496: /* tuple_alias_type_list: tuple_alias_type_list c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 493: /* tuple_alias_type_list: tuple_alias_type_list tuple_type c_or_s */ + case 497: /* tuple_alias_type_list: tuple_alias_type_list tuple_type c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); /* @@ -8097,7 +8203,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 494: /* variant_type: "name" ':' type_declaration */ + case 498: /* variant_type: "name" ':' type_declaration */ { auto na = new vector(); na->push_back(VariableNameAndPosition{*(yyvsp[-2].s),"",tokAt(scanner,(yylsp[-2]))}); @@ -8106,27 +8212,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 495: /* variant_type_list: variant_type */ + case 499: /* variant_type_list: variant_type */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 496: /* variant_type_list: variant_type_list c_or_s variant_type */ + case 500: /* variant_type_list: variant_type_list c_or_s variant_type */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 497: /* variant_alias_type_list: %empty */ + case 501: /* variant_alias_type_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 498: /* variant_alias_type_list: variant_alias_type_list c_or_s */ + case 502: /* variant_alias_type_list: variant_alias_type_list c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 499: /* variant_alias_type_list: variant_alias_type_list variant_type c_or_s */ + case 503: /* variant_alias_type_list: variant_alias_type_list variant_type c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); if ( !yyextra->g_CommentReaders.empty() ) { @@ -8140,15 +8246,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 500: /* copy_or_move: '=' */ + case 504: /* copy_or_move: '=' */ { (yyval.b) = false; } break; - case 501: /* copy_or_move: "<-" */ + case 505: /* copy_or_move: "<-" */ { (yyval.b) = true; } break; - case 502: /* variable_declaration: variable_name_with_pos_list */ + case 506: /* variable_declaration: variable_name_with_pos_list */ { auto autoT = new TypeDecl(Type::autoinfer); autoT->at = tokAt(scanner,(yylsp[0])); @@ -8157,7 +8263,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 503: /* variable_declaration: variable_name_with_pos_list '&' */ + case 507: /* variable_declaration: variable_name_with_pos_list '&' */ { auto autoT = new TypeDecl(Type::autoinfer); autoT->at = tokAt(scanner,(yylsp[-1])); @@ -8166,20 +8272,20 @@ YYLTYPE yylloc = yyloc_default; } break; - case 504: /* variable_declaration: variable_name_with_pos_list ':' type_declaration */ + case 508: /* variable_declaration: variable_name_with_pos_list ':' type_declaration */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-2].pNameWithPosList),(yyvsp[0].pTypeDecl),nullptr); } break; - case 505: /* variable_declaration: variable_name_with_pos_list ':' type_declaration copy_or_move expr */ + case 509: /* variable_declaration: variable_name_with_pos_list ':' type_declaration copy_or_move expr */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-4].pNameWithPosList),(yyvsp[-2].pTypeDecl),(yyvsp[0].pExpression)); (yyval.pVarDecl)->init_via_move = (yyvsp[-1].b); } break; - case 506: /* variable_declaration: variable_name_with_pos_list copy_or_move expr */ + case 510: /* variable_declaration: variable_name_with_pos_list copy_or_move expr */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-2])); @@ -8188,27 +8294,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 507: /* copy_or_move_or_clone: '=' */ + case 511: /* copy_or_move_or_clone: '=' */ { (yyval.i) = CorM_COPY; } break; - case 508: /* copy_or_move_or_clone: "<-" */ + case 512: /* copy_or_move_or_clone: "<-" */ { (yyval.i) = CorM_MOVE; } break; - case 509: /* copy_or_move_or_clone: ":=" */ + case 513: /* copy_or_move_or_clone: ":=" */ { (yyval.i) = CorM_CLONE; } break; - case 510: /* optional_ref: %empty */ + case 514: /* optional_ref: %empty */ { (yyval.b) = false; } break; - case 511: /* optional_ref: '&' */ + case 515: /* optional_ref: '&' */ { (yyval.b) = true; } break; - case 512: /* let_variable_name_with_pos_list: "name" */ + case 516: /* let_variable_name_with_pos_list: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -8218,7 +8324,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 513: /* let_variable_name_with_pos_list: "$i" '(' expr ')' */ + case 517: /* let_variable_name_with_pos_list: "$i" '(' expr ')' */ { auto pSL = new vector(); pSL->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-1].pExpression))}); @@ -8226,7 +8332,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 514: /* let_variable_name_with_pos_list: "name" "aka" "name" */ + case 518: /* let_variable_name_with_pos_list: "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -8238,7 +8344,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 515: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" */ + case 519: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameWithPosList)->push_back(VariableNameAndPosition{*(yyvsp[0].s),"",tokAt(scanner,(yylsp[0]))}); @@ -8247,7 +8353,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 516: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" "aka" "name" */ + case 520: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -8258,7 +8364,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 517: /* global_let_variable_name_with_pos_list: "name" */ + case 521: /* global_let_variable_name_with_pos_list: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -8268,7 +8374,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 518: /* global_let_variable_name_with_pos_list: global_let_variable_name_with_pos_list ',' "name" */ + case 522: /* global_let_variable_name_with_pos_list: global_let_variable_name_with_pos_list ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameWithPosList)->push_back(VariableNameAndPosition{*(yyvsp[0].s),"",tokAt(scanner,(yylsp[0]))}); @@ -8277,13 +8383,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 519: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ + case 523: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-3].pNameWithPosList),(yyvsp[-1].pTypeDecl),nullptr); } break; - case 520: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 524: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-5].pNameWithPosList),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -8291,7 +8397,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 521: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ + case 525: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-4])); @@ -8302,13 +8408,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 522: /* global_let_variable_declaration: global_let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ + case 526: /* global_let_variable_declaration: global_let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-3].pNameWithPosList),(yyvsp[-1].pTypeDecl),nullptr); } break; - case 523: /* global_let_variable_declaration: global_let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 527: /* global_let_variable_declaration: global_let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-5].pNameWithPosList),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -8316,7 +8422,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 524: /* global_let_variable_declaration: global_let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ + case 528: /* global_let_variable_declaration: global_let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-4])); @@ -8327,27 +8433,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 525: /* optional_shared: %empty */ + case 529: /* optional_shared: %empty */ { (yyval.b) = false; } break; - case 526: /* optional_shared: "shared" */ + case 530: /* optional_shared: "shared" */ { (yyval.b) = true; } break; - case 527: /* optional_public_or_private_variable: %empty */ + case 531: /* optional_public_or_private_variable: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 528: /* optional_public_or_private_variable: "private" */ + case 532: /* optional_public_or_private_variable: "private" */ { (yyval.b) = false; } break; - case 529: /* optional_public_or_private_variable: "public" */ + case 533: /* optional_public_or_private_variable: "public" */ { (yyval.b) = true; } break; - case 530: /* $@28: %empty */ + case 534: /* $@28: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -8356,7 +8462,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 531: /* global_let: kwd_let optional_shared optional_public_or_private_variable $@28 optional_field_annotation global_let_variable_declaration */ + case 535: /* global_let: kwd_let optional_shared optional_public_or_private_variable $@28 optional_field_annotation global_let_variable_declaration */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -8369,27 +8475,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 532: /* enum_expression: "name" */ + case 536: /* enum_expression: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyval.pEnumPair) = new EnumPair((yyvsp[0].s),tokAt(scanner,(yylsp[0]))); } break; - case 533: /* enum_expression: "name" '=' expr */ + case 537: /* enum_expression: "name" '=' expr */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); (yyval.pEnumPair) = new EnumPair((yyvsp[-2].s),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-2]))); } break; - case 534: /* enum_list: %empty */ + case 538: /* enum_list: %empty */ { (yyval.pEnum) = new Enumeration(); } break; - case 535: /* enum_list: enum_expression */ + case 539: /* enum_list: enum_expression */ { (yyval.pEnum) = new Enumeration(); if ( !(yyval.pEnum)->add((yyvsp[0].pEnumPair)->name,(yyvsp[0].pEnumPair)->expr,(yyvsp[0].pEnumPair)->at) ) { @@ -8405,7 +8511,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 536: /* enum_list: enum_list ',' enum_expression */ + case 540: /* enum_list: enum_list ',' enum_expression */ { if ( !(yyvsp[-2].pEnum)->add((yyvsp[0].pEnumPair)->name,(yyvsp[0].pEnumPair)->expr,(yyvsp[0].pEnumPair)->at) ) { das2_yyerror(scanner,"enumeration already declared " + (yyvsp[0].pEnumPair)->name, (yyvsp[0].pEnumPair)->at, @@ -8421,19 +8527,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 537: /* optional_public_or_private_alias: %empty */ + case 541: /* optional_public_or_private_alias: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 538: /* optional_public_or_private_alias: "private" */ + case 542: /* optional_public_or_private_alias: "private" */ { (yyval.b) = false; } break; - case 539: /* optional_public_or_private_alias: "public" */ + case 543: /* optional_public_or_private_alias: "public" */ { (yyval.b) = true; } break; - case 540: /* $@29: %empty */ + case 544: /* $@29: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[0])); @@ -8442,7 +8548,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 541: /* single_alias: optional_public_or_private_alias "name" $@29 '=' type_declaration */ + case 545: /* single_alias: optional_public_or_private_alias "name" $@29 '=' type_declaration */ { das_checkName(scanner,*(yyvsp[-3].s),tokAt(scanner,(yylsp[-3]))); (yyvsp[0].pTypeDecl)->isPrivateAlias = !(yyvsp[-4].b); @@ -8463,19 +8569,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 543: /* optional_public_or_private_enum: %empty */ + case 547: /* optional_public_or_private_enum: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 544: /* optional_public_or_private_enum: "private" */ + case 548: /* optional_public_or_private_enum: "private" */ { (yyval.b) = false; } break; - case 545: /* optional_public_or_private_enum: "public" */ + case 549: /* optional_public_or_private_enum: "public" */ { (yyval.b) = true; } break; - case 546: /* enum_name: "name" */ + case 550: /* enum_name: "name" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[0])); @@ -8485,19 +8591,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 547: /* optional_enum_basic_type_declaration: %empty */ + case 551: /* optional_enum_basic_type_declaration: %empty */ { (yyval.type) = Type::tInt; } break; - case 548: /* optional_enum_basic_type_declaration: ':' enum_basic_type_declaration */ + case 552: /* optional_enum_basic_type_declaration: ':' enum_basic_type_declaration */ { (yyval.type) = (yyvsp[0].type); } break; - case 549: /* $@30: %empty */ + case 553: /* $@30: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-2])); @@ -8506,7 +8612,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 550: /* $@31: %empty */ + case 554: /* $@31: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -8515,7 +8621,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 551: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name optional_enum_basic_type_declaration "begin of code block" $@30 enum_list optional_comma $@31 "end of code block" */ + case 555: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name optional_enum_basic_type_declaration "begin of code block" $@30 enum_list optional_comma $@31 "end of code block" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[-3])); @@ -8525,61 +8631,61 @@ YYLTYPE yylloc = yyloc_default; } break; - case 552: /* optional_structure_parent: %empty */ + case 556: /* optional_structure_parent: %empty */ { (yyval.s) = nullptr; } break; - case 553: /* optional_structure_parent: ':' name_in_namespace */ + case 557: /* optional_structure_parent: ':' name_in_namespace */ { (yyval.s) = (yyvsp[0].s); } break; - case 554: /* optional_sealed: %empty */ + case 558: /* optional_sealed: %empty */ { (yyval.b) = false; } break; - case 555: /* optional_sealed: "sealed" */ + case 559: /* optional_sealed: "sealed" */ { (yyval.b) = true; } break; - case 556: /* structure_name: optional_sealed "name" optional_structure_parent */ + case 560: /* structure_name: optional_sealed "name" optional_structure_parent */ { (yyval.pStructure) = ast_structureName(scanner,(yyvsp[-2].b),(yyvsp[-1].s),tokAt(scanner,(yylsp[-1])),(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); } break; - case 557: /* class_or_struct: "class" */ + case 561: /* class_or_struct: "class" */ { (yyval.b) = true; } break; - case 558: /* class_or_struct: "struct" */ + case 562: /* class_or_struct: "struct" */ { (yyval.b) = false; } break; - case 559: /* optional_public_or_private_structure: %empty */ + case 563: /* optional_public_or_private_structure: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 560: /* optional_public_or_private_structure: "private" */ + case 564: /* optional_public_or_private_structure: "private" */ { (yyval.b) = false; } break; - case 561: /* optional_public_or_private_structure: "public" */ + case 565: /* optional_public_or_private_structure: "public" */ { (yyval.b) = true; } break; - case 562: /* optional_struct_variable_declaration_list: %empty */ + case 566: /* optional_struct_variable_declaration_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 563: /* optional_struct_variable_declaration_list: "begin of code block" struct_variable_declaration_list "end of code block" */ + case 567: /* optional_struct_variable_declaration_list: "begin of code block" struct_variable_declaration_list "end of code block" */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 564: /* $@32: %empty */ + case 568: /* $@32: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -8588,11 +8694,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 565: /* $@33: %empty */ + case 569: /* $@33: %empty */ { if ( (yyvsp[0].pStructure) ) { (yyvsp[0].pStructure)->isClass = (yyvsp[-3].b); (yyvsp[0].pStructure)->privateStructure = !(yyvsp[-2].b); } } break; - case 566: /* structure_declaration: optional_annotation_list class_or_struct optional_public_or_private_structure $@32 structure_name $@33 optional_struct_variable_declaration_list */ + case 570: /* structure_declaration: optional_annotation_list class_or_struct optional_public_or_private_structure $@32 structure_name $@33 optional_struct_variable_declaration_list */ { if ( (yyvsp[-2].pStructure) ) { ast_structureDeclaration ( scanner, (yyvsp[-6].faList), tokAt(scanner,(yylsp[-5])), (yyvsp[-2].pStructure), tokAt(scanner,(yylsp[-2])), (yyvsp[0].pVarDeclList) ); @@ -8606,7 +8712,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 567: /* variable_name_with_pos_list: "name" */ + case 571: /* variable_name_with_pos_list: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -8616,7 +8722,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 568: /* variable_name_with_pos_list: "$i" '(' expr ')' */ + case 572: /* variable_name_with_pos_list: "$i" '(' expr ')' */ { auto pSL = new vector(); pSL->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression)}); @@ -8624,7 +8730,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 569: /* variable_name_with_pos_list: "name" "aka" "name" */ + case 573: /* variable_name_with_pos_list: "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -8636,7 +8742,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 570: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" */ + case 574: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameWithPosList)->push_back(VariableNameAndPosition{*(yyvsp[0].s),"",tokAt(scanner,(yylsp[0]))}); @@ -8645,7 +8751,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 571: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" "aka" "name" */ + case 575: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -8656,147 +8762,147 @@ YYLTYPE yylloc = yyloc_default; } break; - case 572: /* basic_type_declaration: "bool" */ + case 576: /* basic_type_declaration: "bool" */ { (yyval.type) = Type::tBool; } break; - case 573: /* basic_type_declaration: "string" */ + case 577: /* basic_type_declaration: "string" */ { (yyval.type) = Type::tString; } break; - case 574: /* basic_type_declaration: "int" */ + case 578: /* basic_type_declaration: "int" */ { (yyval.type) = Type::tInt; } break; - case 575: /* basic_type_declaration: "int8" */ + case 579: /* basic_type_declaration: "int8" */ { (yyval.type) = Type::tInt8; } break; - case 576: /* basic_type_declaration: "int16" */ + case 580: /* basic_type_declaration: "int16" */ { (yyval.type) = Type::tInt16; } break; - case 577: /* basic_type_declaration: "int64" */ + case 581: /* basic_type_declaration: "int64" */ { (yyval.type) = Type::tInt64; } break; - case 578: /* basic_type_declaration: "int2" */ + case 582: /* basic_type_declaration: "int2" */ { (yyval.type) = Type::tInt2; } break; - case 579: /* basic_type_declaration: "int3" */ + case 583: /* basic_type_declaration: "int3" */ { (yyval.type) = Type::tInt3; } break; - case 580: /* basic_type_declaration: "int4" */ + case 584: /* basic_type_declaration: "int4" */ { (yyval.type) = Type::tInt4; } break; - case 581: /* basic_type_declaration: "uint" */ + case 585: /* basic_type_declaration: "uint" */ { (yyval.type) = Type::tUInt; } break; - case 582: /* basic_type_declaration: "uint8" */ + case 586: /* basic_type_declaration: "uint8" */ { (yyval.type) = Type::tUInt8; } break; - case 583: /* basic_type_declaration: "uint16" */ + case 587: /* basic_type_declaration: "uint16" */ { (yyval.type) = Type::tUInt16; } break; - case 584: /* basic_type_declaration: "uint64" */ + case 588: /* basic_type_declaration: "uint64" */ { (yyval.type) = Type::tUInt64; } break; - case 585: /* basic_type_declaration: "uint2" */ + case 589: /* basic_type_declaration: "uint2" */ { (yyval.type) = Type::tUInt2; } break; - case 586: /* basic_type_declaration: "uint3" */ + case 590: /* basic_type_declaration: "uint3" */ { (yyval.type) = Type::tUInt3; } break; - case 587: /* basic_type_declaration: "uint4" */ + case 591: /* basic_type_declaration: "uint4" */ { (yyval.type) = Type::tUInt4; } break; - case 588: /* basic_type_declaration: "float" */ + case 592: /* basic_type_declaration: "float" */ { (yyval.type) = Type::tFloat; } break; - case 589: /* basic_type_declaration: "float2" */ + case 593: /* basic_type_declaration: "float2" */ { (yyval.type) = Type::tFloat2; } break; - case 590: /* basic_type_declaration: "float3" */ + case 594: /* basic_type_declaration: "float3" */ { (yyval.type) = Type::tFloat3; } break; - case 591: /* basic_type_declaration: "float4" */ + case 595: /* basic_type_declaration: "float4" */ { (yyval.type) = Type::tFloat4; } break; - case 592: /* basic_type_declaration: "void" */ + case 596: /* basic_type_declaration: "void" */ { (yyval.type) = Type::tVoid; } break; - case 593: /* basic_type_declaration: "range" */ + case 597: /* basic_type_declaration: "range" */ { (yyval.type) = Type::tRange; } break; - case 594: /* basic_type_declaration: "urange" */ + case 598: /* basic_type_declaration: "urange" */ { (yyval.type) = Type::tURange; } break; - case 595: /* basic_type_declaration: "range64" */ + case 599: /* basic_type_declaration: "range64" */ { (yyval.type) = Type::tRange64; } break; - case 596: /* basic_type_declaration: "urange64" */ + case 600: /* basic_type_declaration: "urange64" */ { (yyval.type) = Type::tURange64; } break; - case 597: /* basic_type_declaration: "double" */ + case 601: /* basic_type_declaration: "double" */ { (yyval.type) = Type::tDouble; } break; - case 598: /* basic_type_declaration: "bitfield" */ + case 602: /* basic_type_declaration: "bitfield" */ { (yyval.type) = Type::tBitfield; } break; - case 599: /* enum_basic_type_declaration: "int" */ + case 603: /* enum_basic_type_declaration: "int" */ { (yyval.type) = Type::tInt; } break; - case 600: /* enum_basic_type_declaration: "int8" */ + case 604: /* enum_basic_type_declaration: "int8" */ { (yyval.type) = Type::tInt8; } break; - case 601: /* enum_basic_type_declaration: "int16" */ + case 605: /* enum_basic_type_declaration: "int16" */ { (yyval.type) = Type::tInt16; } break; - case 602: /* enum_basic_type_declaration: "uint" */ + case 606: /* enum_basic_type_declaration: "uint" */ { (yyval.type) = Type::tUInt; } break; - case 603: /* enum_basic_type_declaration: "uint8" */ + case 607: /* enum_basic_type_declaration: "uint8" */ { (yyval.type) = Type::tUInt8; } break; - case 604: /* enum_basic_type_declaration: "uint16" */ + case 608: /* enum_basic_type_declaration: "uint16" */ { (yyval.type) = Type::tUInt16; } break; - case 605: /* enum_basic_type_declaration: "int64" */ + case 609: /* enum_basic_type_declaration: "int64" */ { (yyval.type) = Type::tInt64; } break; - case 606: /* enum_basic_type_declaration: "uint64" */ + case 610: /* enum_basic_type_declaration: "uint64" */ { (yyval.type) = Type::tUInt64; } break; - case 607: /* structure_type_declaration: name_in_namespace */ + case 611: /* structure_type_declaration: name_in_namespace */ { (yyval.pTypeDecl) = yyextra->g_Program->makeTypeDeclaration(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); if ( !(yyval.pTypeDecl) ) { @@ -8807,14 +8913,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 608: /* auto_type_declaration: "auto" */ + case 612: /* auto_type_declaration: "auto" */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 609: /* auto_type_declaration: "auto" '(' "name" ')' */ + case 613: /* auto_type_declaration: "auto" '(' "name" ')' */ { das_checkName(scanner,*(yyvsp[-1].s),tokAt(scanner,(yylsp[-1]))); (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); @@ -8824,7 +8930,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 610: /* auto_type_declaration: "$t" '(' expr ')' */ + case 614: /* auto_type_declaration: "$t" '(' expr ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::alias); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-3])); @@ -8836,7 +8942,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 611: /* bitfield_bits: "name" */ + case 615: /* bitfield_bits: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -8846,7 +8952,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 612: /* bitfield_bits: bitfield_bits "end of expression" "name" */ + case 616: /* bitfield_bits: bitfield_bits "end of expression" "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameList)->push_back(*(yyvsp[0].s)); @@ -8855,7 +8961,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 613: /* bitfield_alias_bits: %empty */ + case 617: /* bitfield_alias_bits: %empty */ { auto pSL = new vector(); (yyval.pNameList) = pSL; @@ -8863,7 +8969,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 614: /* bitfield_alias_bits: "name" */ + case 618: /* bitfield_alias_bits: "name" */ { (yyval.pNameList) = new vector(); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -8876,7 +8982,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 615: /* bitfield_alias_bits: bitfield_alias_bits ',' "name" */ + case 619: /* bitfield_alias_bits: bitfield_alias_bits ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameList)->push_back(*(yyvsp[0].s)); @@ -8889,15 +8995,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 616: /* $@34: %empty */ + case 620: /* $@34: %empty */ { yyextra->das_arrow_depth ++; } break; - case 617: /* $@35: %empty */ + case 621: /* $@35: %empty */ { yyextra->das_arrow_depth --; } break; - case 618: /* bitfield_type_declaration: "bitfield" '<' $@34 bitfield_bits '>' $@35 */ + case 622: /* bitfield_type_declaration: "bitfield" '<' $@34 bitfield_bits '>' $@35 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBitfield); (yyval.pTypeDecl)->argNames = *(yyvsp[-2].pNameList); @@ -8910,55 +9016,55 @@ YYLTYPE yylloc = yyloc_default; } break; - case 621: /* table_type_pair: type_declaration */ + case 625: /* table_type_pair: type_declaration */ { (yyval.aTypePair).firstType = (yyvsp[0].pTypeDecl); (yyval.aTypePair).secondType = new TypeDecl(Type::tVoid); } break; - case 622: /* table_type_pair: type_declaration c_or_s type_declaration */ + case 626: /* table_type_pair: type_declaration c_or_s type_declaration */ { (yyval.aTypePair).firstType = (yyvsp[-2].pTypeDecl); (yyval.aTypePair).secondType = (yyvsp[0].pTypeDecl); } break; - case 623: /* dim_list: '[' expr ']' */ + case 627: /* dim_list: '[' expr ']' */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); appendDimExpr((yyval.pTypeDecl), (yyvsp[-1].pExpression)); } break; - case 624: /* dim_list: '[' ']' */ + case 628: /* dim_list: '[' ']' */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); appendDimExpr((yyval.pTypeDecl), nullptr); } break; - case 625: /* dim_list: dim_list '[' expr ']' */ + case 629: /* dim_list: dim_list '[' expr ']' */ { (yyval.pTypeDecl) = (yyvsp[-3].pTypeDecl); appendDimExpr((yyval.pTypeDecl), (yyvsp[-1].pExpression)); } break; - case 626: /* dim_list: dim_list '[' ']' */ + case 630: /* dim_list: dim_list '[' ']' */ { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); appendDimExpr((yyval.pTypeDecl), nullptr); } break; - case 627: /* type_declaration_no_options: type_declaration_no_options_no_dim */ + case 631: /* type_declaration_no_options: type_declaration_no_options_no_dim */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 628: /* type_declaration_no_options: type_declaration_no_options_no_dim dim_list */ + case 632: /* type_declaration_no_options: type_declaration_no_options_no_dim dim_list */ { if ( (yyvsp[-1].pTypeDecl)->baseType==Type::typeDecl ) { das2_yyerror(scanner,"type declaration can`t be used as array base type",tokAt(scanner,(yylsp[-1])), @@ -8976,38 +9082,38 @@ YYLTYPE yylloc = yyloc_default; } break; - case 629: /* type_declaration_no_options_no_dim: basic_type_declaration */ + case 633: /* type_declaration_no_options_no_dim: basic_type_declaration */ { (yyval.pTypeDecl) = new TypeDecl((yyvsp[0].type)); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 630: /* type_declaration_no_options_no_dim: auto_type_declaration */ + case 634: /* type_declaration_no_options_no_dim: auto_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 631: /* type_declaration_no_options_no_dim: bitfield_type_declaration */ + case 635: /* type_declaration_no_options_no_dim: bitfield_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 632: /* type_declaration_no_options_no_dim: structure_type_declaration */ + case 636: /* type_declaration_no_options_no_dim: structure_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 633: /* $@36: %empty */ + case 637: /* $@36: %empty */ { yyextra->das_arrow_depth ++; } break; - case 634: /* $@37: %empty */ + case 638: /* $@37: %empty */ { yyextra->das_arrow_depth --; } break; - case 635: /* type_declaration_no_options_no_dim: "type" '<' $@36 type_declaration '>' $@37 */ + case 639: /* type_declaration_no_options_no_dim: "type" '<' $@36 type_declaration '>' $@37 */ { (yyvsp[-2].pTypeDecl)->autoToAlias = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 636: /* type_declaration_no_options_no_dim: "typedecl" '(' expr ')' */ + case 640: /* type_declaration_no_options_no_dim: "typedecl" '(' expr ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeDecl); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-3]),(yylsp[-1])); @@ -9015,7 +9121,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 637: /* type_declaration_no_options_no_dim: '$' name_in_namespace '(' optional_expr_list ')' */ + case 641: /* type_declaration_no_options_no_dim: '$' name_in_namespace '(' optional_expr_list ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeMacro); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-3]), (yylsp[-1])); @@ -9025,11 +9131,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 638: /* $@38: %empty */ + case 642: /* $@38: %empty */ { yyextra->das_arrow_depth ++; } break; - case 639: /* type_declaration_no_options_no_dim: '$' name_in_namespace '<' $@38 type_declaration_no_options_list '>' '(' optional_expr_list ')' */ + case 643: /* type_declaration_no_options_no_dim: '$' name_in_namespace '<' $@38 type_declaration_no_options_list '>' '(' optional_expr_list ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeMacro); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-7]), (yylsp[-1])); @@ -9039,21 +9145,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 640: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '[' ']' */ + case 644: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '[' ']' */ { (yyvsp[-3].pTypeDecl)->removeDim = true; (yyval.pTypeDecl) = (yyvsp[-3].pTypeDecl); } break; - case 641: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "explicit" */ + case 645: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "explicit" */ { (yyvsp[-1].pTypeDecl)->isExplicit = true; (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); } break; - case 642: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "const" */ + case 646: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "const" */ { (yyvsp[-1].pTypeDecl)->constant = true; (yyvsp[-1].pTypeDecl)->removeConstant = false; @@ -9061,7 +9167,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 643: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' "const" */ + case 647: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' "const" */ { (yyvsp[-2].pTypeDecl)->constant = false; (yyvsp[-2].pTypeDecl)->removeConstant = true; @@ -9069,7 +9175,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 644: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '&' */ + case 648: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '&' */ { (yyvsp[-1].pTypeDecl)->ref = true; (yyvsp[-1].pTypeDecl)->removeRef = false; @@ -9077,7 +9183,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 645: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '&' */ + case 649: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '&' */ { (yyvsp[-2].pTypeDecl)->ref = false; (yyvsp[-2].pTypeDecl)->removeRef = true; @@ -9085,21 +9191,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 646: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '#' */ + case 650: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '#' */ { (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); (yyval.pTypeDecl)->temporary = true; } break; - case 647: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "implicit" */ + case 651: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "implicit" */ { (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); (yyval.pTypeDecl)->implicit = true; } break; - case 648: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '#' */ + case 652: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '-' '#' */ { (yyvsp[-2].pTypeDecl)->temporary = false; (yyvsp[-2].pTypeDecl)->removeTemporary = true; @@ -9107,21 +9213,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 649: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "==" "const" */ + case 653: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "==" "const" */ { (yyvsp[-2].pTypeDecl)->explicitConst = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 650: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "==" '&' */ + case 654: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "==" '&' */ { (yyvsp[-2].pTypeDecl)->explicitRef = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 651: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '?' */ + case 655: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim '?' */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-1])); @@ -9129,15 +9235,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 652: /* $@39: %empty */ + case 656: /* $@39: %empty */ { yyextra->das_arrow_depth ++; } break; - case 653: /* $@40: %empty */ + case 657: /* $@40: %empty */ { yyextra->das_arrow_depth --; } break; - case 654: /* type_declaration_no_options_no_dim: "smart_ptr" '<' $@39 type_declaration '>' $@40 */ + case 658: /* type_declaration_no_options_no_dim: "smart_ptr" '<' $@39 type_declaration '>' $@40 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9146,7 +9252,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 655: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "??" */ + case 659: /* type_declaration_no_options_no_dim: type_declaration_no_options_no_dim "??" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-1])); @@ -9156,15 +9262,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 656: /* $@41: %empty */ + case 660: /* $@41: %empty */ { yyextra->das_arrow_depth ++; } break; - case 657: /* $@42: %empty */ + case 661: /* $@42: %empty */ { yyextra->das_arrow_depth --; } break; - case 658: /* type_declaration_no_options_no_dim: "array" '<' $@41 type_declaration '>' $@42 */ + case 662: /* type_declaration_no_options_no_dim: "array" '<' $@41 type_declaration '>' $@42 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tArray); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9172,15 +9278,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 659: /* $@43: %empty */ + case 663: /* $@43: %empty */ { yyextra->das_arrow_depth ++; } break; - case 660: /* $@44: %empty */ + case 664: /* $@44: %empty */ { yyextra->das_arrow_depth --; } break; - case 661: /* type_declaration_no_options_no_dim: "table" '<' $@43 table_type_pair '>' $@44 */ + case 665: /* type_declaration_no_options_no_dim: "table" '<' $@43 table_type_pair '>' $@44 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tTable); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9189,15 +9295,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 662: /* $@45: %empty */ + case 666: /* $@45: %empty */ { yyextra->das_arrow_depth ++; } break; - case 663: /* $@46: %empty */ + case 667: /* $@46: %empty */ { yyextra->das_arrow_depth --; } break; - case 664: /* type_declaration_no_options_no_dim: "iterator" '<' $@45 type_declaration '>' $@46 */ + case 668: /* type_declaration_no_options_no_dim: "iterator" '<' $@45 type_declaration '>' $@46 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tIterator); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9205,22 +9311,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 665: /* type_declaration_no_options_no_dim: "block" */ + case 669: /* type_declaration_no_options_no_dim: "block" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 666: /* $@47: %empty */ + case 670: /* $@47: %empty */ { yyextra->das_arrow_depth ++; } break; - case 667: /* $@48: %empty */ + case 671: /* $@48: %empty */ { yyextra->das_arrow_depth --; } break; - case 668: /* type_declaration_no_options_no_dim: "block" '<' $@47 type_declaration '>' $@48 */ + case 672: /* type_declaration_no_options_no_dim: "block" '<' $@47 type_declaration '>' $@48 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9228,15 +9334,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 669: /* $@49: %empty */ + case 673: /* $@49: %empty */ { yyextra->das_arrow_depth ++; } break; - case 670: /* $@50: %empty */ + case 674: /* $@50: %empty */ { yyextra->das_arrow_depth --; } break; - case 671: /* type_declaration_no_options_no_dim: "block" '<' $@49 optional_function_argument_list optional_function_type '>' $@50 */ + case 675: /* type_declaration_no_options_no_dim: "block" '<' $@49 optional_function_argument_list optional_function_type '>' $@50 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -9248,22 +9354,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 672: /* type_declaration_no_options_no_dim: "function" */ + case 676: /* type_declaration_no_options_no_dim: "function" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 673: /* $@51: %empty */ + case 677: /* $@51: %empty */ { yyextra->das_arrow_depth ++; } break; - case 674: /* $@52: %empty */ + case 678: /* $@52: %empty */ { yyextra->das_arrow_depth --; } break; - case 675: /* type_declaration_no_options_no_dim: "function" '<' $@51 type_declaration '>' $@52 */ + case 679: /* type_declaration_no_options_no_dim: "function" '<' $@51 type_declaration '>' $@52 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9271,15 +9377,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 676: /* $@53: %empty */ + case 680: /* $@53: %empty */ { yyextra->das_arrow_depth ++; } break; - case 677: /* $@54: %empty */ + case 681: /* $@54: %empty */ { yyextra->das_arrow_depth --; } break; - case 678: /* type_declaration_no_options_no_dim: "function" '<' $@53 optional_function_argument_list optional_function_type '>' $@54 */ + case 682: /* type_declaration_no_options_no_dim: "function" '<' $@53 optional_function_argument_list optional_function_type '>' $@54 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -9291,22 +9397,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 679: /* type_declaration_no_options_no_dim: "lambda" */ + case 683: /* type_declaration_no_options_no_dim: "lambda" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 680: /* $@55: %empty */ + case 684: /* $@55: %empty */ { yyextra->das_arrow_depth ++; } break; - case 681: /* $@56: %empty */ + case 685: /* $@56: %empty */ { yyextra->das_arrow_depth --; } break; - case 682: /* type_declaration_no_options_no_dim: "lambda" '<' $@55 type_declaration '>' $@56 */ + case 686: /* type_declaration_no_options_no_dim: "lambda" '<' $@55 type_declaration '>' $@56 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9314,15 +9420,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 683: /* $@57: %empty */ + case 687: /* $@57: %empty */ { yyextra->das_arrow_depth ++; } break; - case 684: /* $@58: %empty */ + case 688: /* $@58: %empty */ { yyextra->das_arrow_depth --; } break; - case 685: /* type_declaration_no_options_no_dim: "lambda" '<' $@57 optional_function_argument_list optional_function_type '>' $@58 */ + case 689: /* type_declaration_no_options_no_dim: "lambda" '<' $@57 optional_function_argument_list optional_function_type '>' $@58 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -9334,15 +9440,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 686: /* $@59: %empty */ + case 690: /* $@59: %empty */ { yyextra->das_arrow_depth ++; } break; - case 687: /* $@60: %empty */ + case 691: /* $@60: %empty */ { yyextra->das_arrow_depth --; } break; - case 688: /* type_declaration_no_options_no_dim: "tuple" '<' $@59 tuple_type_list '>' $@60 */ + case 692: /* type_declaration_no_options_no_dim: "tuple" '<' $@59 tuple_type_list '>' $@60 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tTuple); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9351,15 +9457,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 689: /* $@61: %empty */ + case 693: /* $@61: %empty */ { yyextra->das_arrow_depth ++; } break; - case 690: /* $@62: %empty */ + case 694: /* $@62: %empty */ { yyextra->das_arrow_depth --; } break; - case 691: /* type_declaration_no_options_no_dim: "variant" '<' $@61 variant_type_list '>' $@62 */ + case 695: /* type_declaration_no_options_no_dim: "variant" '<' $@61 variant_type_list '>' $@62 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tVariant); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -9368,13 +9474,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 692: /* type_declaration: type_declaration_no_options */ + case 696: /* type_declaration: type_declaration_no_options */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 693: /* type_declaration: type_declaration '|' type_declaration_no_options */ + case 697: /* type_declaration: type_declaration '|' type_declaration_no_options */ { if ( (yyvsp[-2].pTypeDecl)->baseType==Type::option ) { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); @@ -9388,7 +9494,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 694: /* type_declaration: type_declaration '|' '#' */ + case 698: /* type_declaration: type_declaration '|' '#' */ { if ( (yyvsp[-2].pTypeDecl)->baseType==Type::option ) { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); @@ -9404,7 +9510,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 695: /* $@63: %empty */ + case 699: /* $@63: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -9413,7 +9519,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 696: /* $@64: %empty */ + case 700: /* $@64: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -9422,7 +9528,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 697: /* $@65: %empty */ + case 701: /* $@65: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-4])); @@ -9431,7 +9537,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 698: /* tuple_alias_declaration: "tuple" optional_public_or_private_alias "name" $@63 "begin of code block" $@64 tuple_alias_type_list $@65 "end of code block" */ + case 702: /* tuple_alias_declaration: "tuple" optional_public_or_private_alias "name" $@63 "begin of code block" $@64 tuple_alias_type_list $@65 "end of code block" */ { auto vtype = make_smart(Type::tTuple); vtype->alias = *(yyvsp[-6].s); @@ -9451,7 +9557,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 699: /* $@66: %empty */ + case 703: /* $@66: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -9460,7 +9566,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 700: /* $@67: %empty */ + case 704: /* $@67: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -9470,7 +9576,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 701: /* $@68: %empty */ + case 705: /* $@68: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-4])); @@ -9479,7 +9585,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 702: /* variant_alias_declaration: "variant" optional_public_or_private_alias "name" $@66 "begin of code block" $@67 variant_alias_type_list $@68 "end of code block" */ + case 706: /* variant_alias_declaration: "variant" optional_public_or_private_alias "name" $@66 "begin of code block" $@67 variant_alias_type_list $@68 "end of code block" */ { auto vtype = make_smart(Type::tVariant); vtype->alias = *(yyvsp[-6].s); @@ -9499,7 +9605,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 703: /* $@69: %empty */ + case 707: /* $@69: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -9508,7 +9614,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 704: /* $@70: %empty */ + case 708: /* $@70: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -9517,7 +9623,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 705: /* $@71: %empty */ + case 709: /* $@71: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-5])); @@ -9526,7 +9632,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 706: /* bitfield_alias_declaration: "bitfield" optional_public_or_private_alias "name" $@69 "begin of code block" $@70 bitfield_alias_bits optional_comma $@71 "end of code block" */ + case 710: /* bitfield_alias_declaration: "bitfield" optional_public_or_private_alias "name" $@69 "begin of code block" $@70 bitfield_alias_bits optional_comma $@71 "end of code block" */ { auto btype = make_smart(Type::tBitfield); btype->alias = *(yyvsp[-7].s); @@ -9550,27 +9656,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 707: /* make_decl: make_struct_decl */ + case 711: /* make_decl: make_struct_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 708: /* make_decl: make_dim_decl */ + case 712: /* make_decl: make_dim_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 709: /* make_decl: make_table_decl */ + case 713: /* make_decl: make_table_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 710: /* make_decl: array_comprehension */ + case 714: /* make_decl: array_comprehension */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 711: /* make_decl: make_tuple_call */ + case 715: /* make_decl: make_tuple_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 712: /* make_struct_fields: "name" copy_or_move expr */ + case 716: /* make_struct_fields: "name" copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); delete (yyvsp[-2].s); @@ -9580,7 +9686,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 713: /* make_struct_fields: "name" ":=" expr */ + case 717: /* make_struct_fields: "name" ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),false,true); delete (yyvsp[-2].s); @@ -9590,7 +9696,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 714: /* make_struct_fields: make_struct_fields ',' "name" copy_or_move expr */ + case 718: /* make_struct_fields: make_struct_fields ',' "name" copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); delete (yyvsp[-2].s); @@ -9599,7 +9705,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 715: /* make_struct_fields: make_struct_fields ',' "name" ":=" expr */ + case 719: /* make_struct_fields: make_struct_fields ',' "name" ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),false,true); delete (yyvsp[-2].s); @@ -9608,7 +9714,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 716: /* make_struct_fields: "$f" '(' expr ')' copy_or_move expr */ + case 720: /* make_struct_fields: "$f" '(' expr ')' copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -9618,7 +9724,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 717: /* make_struct_fields: "$f" '(' expr ')' ":=" expr */ + case 721: /* make_struct_fields: "$f" '(' expr ')' ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),false,true); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -9628,7 +9734,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 718: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' copy_or_move expr */ + case 722: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -9637,7 +9743,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 719: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' ":=" expr */ + case 723: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),false,true); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -9646,13 +9752,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 720: /* make_variant_dim: make_struct_fields */ + case 724: /* make_variant_dim: make_struct_fields */ { (yyval.pExpression) = ast_makeStructToMakeVariant((yyvsp[0].pMakeStruct), tokAt(scanner,(yylsp[0]))); } break; - case 721: /* make_struct_single: make_struct_fields */ + case 725: /* make_struct_single: make_struct_fields */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); @@ -9660,7 +9766,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 722: /* make_struct_dim_list: '(' make_struct_fields ')' */ + case 726: /* make_struct_dim_list: '(' make_struct_fields ')' */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[-1].pMakeStruct))); @@ -9668,14 +9774,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 723: /* make_struct_dim_list: make_struct_dim_list ',' '(' make_struct_fields ')' */ + case 727: /* make_struct_dim_list: make_struct_dim_list ',' '(' make_struct_fields ')' */ { ((ExprMakeStruct *) (yyvsp[-4].pExpression))->structs.push_back(MakeStructPtr((yyvsp[-1].pMakeStruct))); (yyval.pExpression) = (yyvsp[-4].pExpression); } break; - case 724: /* make_struct_dim_decl: make_struct_fields */ + case 728: /* make_struct_dim_decl: make_struct_fields */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); @@ -9683,37 +9789,37 @@ YYLTYPE yylloc = yyloc_default; } break; - case 725: /* make_struct_dim_decl: make_struct_dim_list optional_comma */ + case 729: /* make_struct_dim_decl: make_struct_dim_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 726: /* optional_make_struct_dim_decl: make_struct_dim_decl */ + case 730: /* optional_make_struct_dim_decl: make_struct_dim_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 727: /* optional_make_struct_dim_decl: %empty */ + case 731: /* optional_make_struct_dim_decl: %empty */ { (yyval.pExpression) = new ExprMakeStruct(); } break; - case 728: /* use_initializer: %empty */ + case 732: /* use_initializer: %empty */ { (yyval.b) = true; } break; - case 729: /* use_initializer: "uninitialized" */ + case 733: /* use_initializer: "uninitialized" */ { (yyval.b) = false; } break; - case 730: /* $@72: %empty */ + case 734: /* $@72: %empty */ { yyextra->das_arrow_depth ++; } break; - case 731: /* $@73: %empty */ + case 735: /* $@73: %empty */ { yyextra->das_arrow_depth --; } break; - case 732: /* make_struct_decl: "struct" '<' $@72 type_declaration_no_options '>' $@73 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 736: /* make_struct_decl: "struct" '<' $@72 type_declaration_no_options '>' $@73 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -9724,15 +9830,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 733: /* $@74: %empty */ + case 737: /* $@74: %empty */ { yyextra->das_arrow_depth ++; } break; - case 734: /* $@75: %empty */ + case 738: /* $@75: %empty */ { yyextra->das_arrow_depth --; } break; - case 735: /* make_struct_decl: "class" '<' $@74 type_declaration_no_options '>' $@75 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 739: /* make_struct_decl: "class" '<' $@74 type_declaration_no_options '>' $@75 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -9742,15 +9848,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 736: /* $@76: %empty */ + case 740: /* $@76: %empty */ { yyextra->das_arrow_depth ++; } break; - case 737: /* $@77: %empty */ + case 741: /* $@77: %empty */ { yyextra->das_arrow_depth --; } break; - case 738: /* make_struct_decl: "variant" '<' $@76 type_declaration_no_options '>' $@77 '(' make_variant_dim ')' */ + case 742: /* make_struct_decl: "variant" '<' $@76 type_declaration_no_options '>' $@77 '(' make_variant_dim ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-8])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); @@ -9760,15 +9866,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 739: /* $@78: %empty */ + case 743: /* $@78: %empty */ { yyextra->das_arrow_depth ++; } break; - case 740: /* $@79: %empty */ + case 744: /* $@79: %empty */ { yyextra->das_arrow_depth --; } break; - case 741: /* make_struct_decl: "default" '<' $@78 type_declaration_no_options '>' $@79 use_initializer */ + case 745: /* make_struct_decl: "default" '<' $@78 type_declaration_no_options '>' $@79 use_initializer */ { auto msd = new ExprMakeStruct(); msd->at = tokAt(scanner,(yylsp[-6])); @@ -9779,7 +9885,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 742: /* make_map_tuple: expr "=>" expr */ + case 746: /* make_map_tuple: expr "=>" expr */ { ExprMakeTuple * mt = new ExprMakeTuple(tokAt(scanner,(yylsp[-1]))); mt->values.push_back(ExpressionPtr((yyvsp[-2].pExpression))); @@ -9788,13 +9894,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 743: /* make_map_tuple: expr */ + case 747: /* make_map_tuple: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 744: /* make_tuple_call: "tuple" '(' expr_list optional_comma ')' */ + case 748: /* make_tuple_call: "tuple" '(' expr_list optional_comma ')' */ { auto mkt = new ExprMakeTuple(tokAt(scanner,(yylsp[-4]))); mkt->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9803,15 +9909,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 745: /* $@80: %empty */ + case 749: /* $@80: %empty */ { yyextra->das_arrow_depth ++; } break; - case 746: /* $@81: %empty */ + case 750: /* $@81: %empty */ { yyextra->das_arrow_depth --; } break; - case 747: /* make_tuple_call: "tuple" '<' $@80 type_declaration_no_options '>' $@81 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 751: /* make_tuple_call: "tuple" '<' $@80 type_declaration_no_options '>' $@81 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -9821,7 +9927,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 748: /* make_dim_decl: '[' expr_list optional_comma ']' */ + case 752: /* make_dim_decl: '[' expr_list optional_comma ']' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-3]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9832,15 +9938,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 749: /* $@82: %empty */ + case 753: /* $@82: %empty */ { yyextra->das_arrow_depth ++; } break; - case 750: /* $@83: %empty */ + case 754: /* $@83: %empty */ { yyextra->das_arrow_depth --; } break; - case 751: /* make_dim_decl: "array" "struct" '<' $@82 type_declaration_no_options '>' $@83 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 755: /* make_dim_decl: "array" "struct" '<' $@82 type_declaration_no_options '>' $@83 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-10])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -9853,15 +9959,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 752: /* $@84: %empty */ + case 756: /* $@84: %empty */ { yyextra->das_arrow_depth ++; } break; - case 753: /* $@85: %empty */ + case 757: /* $@85: %empty */ { yyextra->das_arrow_depth --; } break; - case 754: /* make_dim_decl: "array" "tuple" '<' $@84 type_declaration_no_options '>' $@85 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 758: /* make_dim_decl: "array" "tuple" '<' $@84 type_declaration_no_options '>' $@85 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-10])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -9874,15 +9980,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 755: /* $@86: %empty */ + case 759: /* $@86: %empty */ { yyextra->das_arrow_depth ++; } break; - case 756: /* $@87: %empty */ + case 760: /* $@87: %empty */ { yyextra->das_arrow_depth --; } break; - case 757: /* make_dim_decl: "array" "variant" '<' $@86 type_declaration_no_options '>' $@87 '(' make_variant_dim ')' */ + case 761: /* make_dim_decl: "array" "variant" '<' $@86 type_declaration_no_options '>' $@87 '(' make_variant_dim ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); @@ -9895,7 +10001,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 758: /* make_dim_decl: "array" '(' expr_list optional_comma ')' */ + case 762: /* make_dim_decl: "array" '(' expr_list optional_comma ')' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-4]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9906,15 +10012,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 759: /* $@88: %empty */ + case 763: /* $@88: %empty */ { yyextra->das_arrow_depth ++; } break; - case 760: /* $@89: %empty */ + case 764: /* $@89: %empty */ { yyextra->das_arrow_depth --; } break; - case 761: /* make_dim_decl: "array" '<' $@88 type_declaration_no_options '>' $@89 '(' optional_expr_list ')' */ + case 765: /* make_dim_decl: "array" '<' $@88 type_declaration_no_options '>' $@89 '(' optional_expr_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-8]))); @@ -9936,7 +10042,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 762: /* make_dim_decl: "fixed_array" '(' expr_list optional_comma ')' */ + case 766: /* make_dim_decl: "fixed_array" '(' expr_list optional_comma ')' */ { auto mka = new ExprMakeArray(tokAt(scanner,(yylsp[-4]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9946,15 +10052,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 763: /* $@90: %empty */ + case 767: /* $@90: %empty */ { yyextra->das_arrow_depth ++; } break; - case 764: /* $@91: %empty */ + case 768: /* $@91: %empty */ { yyextra->das_arrow_depth --; } break; - case 765: /* make_dim_decl: "fixed_array" '<' $@90 type_declaration_no_options '>' $@91 '(' expr_list optional_comma ')' */ + case 769: /* make_dim_decl: "fixed_array" '<' $@90 type_declaration_no_options '>' $@91 '(' expr_list optional_comma ')' */ { auto mka = new ExprMakeArray(tokAt(scanner,(yylsp[-9]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9964,19 +10070,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 766: /* expr_map_tuple_list: make_map_tuple */ + case 770: /* expr_map_tuple_list: make_map_tuple */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 767: /* expr_map_tuple_list: expr_map_tuple_list ',' make_map_tuple */ + case 771: /* expr_map_tuple_list: expr_map_tuple_list ',' make_map_tuple */ { (yyval.pExpression) = new ExprSequence(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 768: /* make_table_decl: "begin of code block" expr_map_tuple_list optional_comma "end of code block" */ + case 772: /* make_table_decl: "begin of code block" expr_map_tuple_list optional_comma "end of code block" */ { auto mka = make_smart(tokAt(scanner,(yylsp[-3]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9987,7 +10093,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 769: /* make_table_decl: "table" '(' expr_map_tuple_list optional_comma ')' */ + case 773: /* make_table_decl: "table" '(' expr_map_tuple_list optional_comma ')' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-4]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -9998,7 +10104,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 770: /* make_table_decl: "table" '<' type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ + case 774: /* make_table_decl: "table" '<' type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-6]))); @@ -10021,7 +10127,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 771: /* make_table_decl: "table" '<' type_declaration_no_options c_or_s type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ + case 775: /* make_table_decl: "table" '<' type_declaration_no_options c_or_s type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-8]))); @@ -10046,35 +10152,35 @@ YYLTYPE yylloc = yyloc_default; } break; - case 772: /* array_comprehension_where: %empty */ + case 776: /* array_comprehension_where: %empty */ { (yyval.pExpression) = nullptr; } break; - case 773: /* array_comprehension_where: "end of expression" "where" expr */ + case 777: /* array_comprehension_where: "end of expression" "where" expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 774: /* optional_comma: %empty */ + case 778: /* optional_comma: %empty */ { (yyval.b) = false; } break; - case 775: /* optional_comma: ',' */ + case 779: /* optional_comma: ',' */ { (yyval.b) = true; } break; - case 776: /* array_comprehension: '[' "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ + case 780: /* array_comprehension: '[' "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),false,false); } break; - case 777: /* array_comprehension: '[' "iterator" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ + case 781: /* array_comprehension: '[' "iterator" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),true,false); } break; - case 778: /* array_comprehension: "begin of code block" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" */ + case 782: /* array_comprehension: "begin of code block" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),false,true); } diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp index 0e9500bdc..c1b6f667a 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp @@ -595,6 +595,7 @@ character_sequence string_constant : BEGIN_STRING character_sequence[seq] END_STRING { $$ = $seq; } + | BEGIN_STRING END_STRING { $$ = new string(); } ; string_builder_body @@ -1519,10 +1520,11 @@ block_or_lambda ; capture_entry - : '&' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_reference); delete $name; } - | '=' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_copy); delete $name; } - | LARROW NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_move); delete $name; } - | CLONEEQU NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_clone); delete $name; } + : '&' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_reference); delete $name; } + | '=' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_copy); delete $name; } + | LARROW NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_move); delete $name; } + | CLONEEQU NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_clone); delete $name; } + | NAME[op] '(' NAME[name] ')' { $$ = ast_makeCaptureEntry(scanner,tokAt(scanner,@op),*$op,*$name); delete $op; delete $name; } ; capture_list @@ -1679,6 +1681,18 @@ expr_field delete $method_name; $$ = pInvoke; } + | expr[left] '.'[loc] basic_type_declaration[method_type] '(' ')' { + auto method_name = das_to_string($method_type); + auto pInvoke = makeInvokeMethod(tokAt(scanner,@loc), $left, method_name); + $$ = pInvoke; + } + | expr[left] '.'[loc] basic_type_declaration[method_type] '(' expr_list[arguments] ')' { + auto method_name = das_to_string($method_type); + auto pInvoke = makeInvokeMethod(tokAt(scanner,@loc), $left, method_name); + auto callArgs = sequenceToList($arguments); + pInvoke->arguments.insert ( pInvoke->arguments.end(), callArgs.begin(), callArgs.end() ); + $$ = pInvoke; + } | expr[subexpr] '.'[loc] { yyextra->das_suppress_errors=true; } error { yyextra->das_suppress_errors=false; } { $$ = new ExprField(tokAt(scanner,@loc), tokAt(scanner,@loc), ExpressionPtr($subexpr), ""); yyerrok; diff --git a/prog/1stPartyLibs/daScript/src/parser/ds_lexer.cpp b/prog/1stPartyLibs/daScript/src/parser/ds_lexer.cpp index 6bab673a8..de3900b01 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds_lexer.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds_lexer.cpp @@ -580,8 +580,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 254 -#define YY_END_OF_BUFFER 255 +#define YY_NUM_RULES 255 +#define YY_END_OF_BUFFER 256 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -589,88 +589,88 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[723] = +static const flex_int16_t yy_accept[728] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 29, 29, 0, 0, 0, 0, 255, 254, 28, 26, + 29, 29, 0, 0, 0, 0, 256, 255, 28, 26, 24, 28, 25, 28, 28, 28, 23, 22, 21, 20, 16, 23, 17, 12, 13, 12, 12, 12, 9, 8, - 31, 30, 29, 253, 245, 252, 244, 253, 139, 253, - 253, 253, 253, 253, 180, 179, 253, 253, 253, 253, - 253, 253, 166, 166, 253, 253, 253, 253, 253, 253, - 253, 138, 182, 253, 181, 253, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 184, 253, 183, 15, + 31, 30, 29, 254, 246, 253, 245, 254, 140, 254, + 254, 254, 254, 254, 181, 180, 254, 254, 254, 254, + 254, 254, 167, 167, 254, 254, 254, 254, 254, 254, + 254, 139, 183, 254, 182, 254, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 185, 254, 184, 15, 14, 0, 24, 0, 2, 3, 6, 19, 18, 11, - 10, 31, 29, 231, 0, 197, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 216, 220, 223, 0, 0, - 4, 215, 226, 212, 0, 0, 0, 0, 227, 213, - 210, 187, 171, 5, 7, 214, 172, 166, 0, 173, - 162, 164, 0, 166, 177, 162, 164, 185, 209, 0, - 0, 0, 0, 211, 235, 228, 196, 230, 240, 229, - 233, 208, 206, 207, 0, 0, 0, 138, 241, 242, - 0, 251, 225, 222, 138, 138, 138, 138, 96, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - - 138, 138, 138, 138, 138, 138, 138, 138, 138, 35, - 138, 86, 97, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 243, 224, 188, 221, 0, 0, 27, - 0, 195, 202, 201, 204, 198, 205, 199, 203, 200, - 217, 160, 0, 0, 0, 0, 0, 0, 0, 0, - 250, 248, 186, 0, 171, 175, 0, 0, 252, 0, - 165, 171, 0, 172, 176, 0, 0, 174, 163, 161, - 170, 0, 0, 0, 249, 247, 246, 234, 237, 0, - - 190, 0, 0, 236, 232, 194, 0, 0, 219, 138, - 138, 43, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 41, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 33, 138, 138, 138, 138, 138, - 138, 118, 138, 138, 138, 46, 138, 106, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 53, 138, 138, - 138, 138, 138, 138, 138, 48, 138, 138, 138, 138, - 138, 218, 0, 0, 153, 153, 159, 154, 157, 156, - 158, 155, 0, 0, 0, 0, 0, 171, 0, 0, - - 171, 175, 0, 0, 172, 174, 178, 0, 170, 168, - 169, 169, 0, 0, 0, 0, 239, 191, 192, 0, - 238, 193, 138, 99, 138, 138, 110, 138, 138, 111, - 138, 73, 138, 138, 138, 138, 138, 138, 138, 37, - 39, 52, 138, 138, 138, 138, 138, 138, 138, 138, - 58, 138, 138, 138, 138, 122, 123, 124, 138, 119, - 138, 138, 138, 0, 0, 138, 100, 138, 138, 138, - 75, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 108, 138, 105, 125, 138, - 138, 138, 138, 0, 0, 138, 112, 138, 138, 42, - - 138, 0, 146, 152, 152, 147, 147, 150, 150, 149, - 149, 151, 151, 148, 148, 0, 0, 171, 169, 167, - 0, 0, 189, 138, 82, 138, 138, 64, 103, 51, - 70, 138, 138, 138, 98, 138, 138, 138, 109, 138, - 138, 134, 138, 138, 138, 138, 138, 120, 121, 138, - 57, 138, 0, 138, 138, 138, 138, 138, 138, 116, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 81, 68, 138, 138, 138, 130, 131, 132, 138, 127, - 138, 138, 138, 138, 0, 138, 72, 34, 102, 0, - 145, 140, 143, 142, 144, 141, 0, 0, 0, 0, - - 138, 44, 138, 138, 138, 107, 133, 80, 138, 138, - 138, 135, 136, 137, 138, 138, 138, 138, 138, 138, - 66, 0, 45, 59, 138, 138, 138, 138, 60, 138, - 138, 138, 138, 101, 78, 89, 138, 95, 113, 50, - 138, 138, 128, 129, 138, 93, 74, 117, 0, 47, - 138, 0, 138, 138, 138, 84, 138, 40, 138, 138, - 138, 138, 32, 94, 138, 138, 61, 138, 90, 114, - 54, 138, 63, 138, 138, 138, 55, 138, 138, 0, - 92, 138, 69, 0, 79, 126, 71, 88, 138, 65, - 138, 87, 85, 62, 77, 138, 138, 138, 138, 56, - - 104, 138, 115, 1, 138, 67, 138, 91, 138, 36, - 138, 138, 138, 138, 138, 83, 76, 38, 138, 138, - 49, 0 + 10, 31, 29, 232, 0, 198, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 217, 221, 224, 0, 0, + 4, 216, 227, 213, 0, 0, 0, 0, 228, 214, + 211, 188, 172, 5, 7, 215, 173, 167, 0, 174, + 163, 165, 0, 167, 178, 163, 165, 186, 210, 0, + 0, 0, 0, 212, 236, 229, 197, 231, 241, 230, + 234, 209, 207, 208, 0, 0, 0, 139, 242, 243, + 0, 252, 226, 223, 139, 139, 139, 139, 97, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + + 139, 139, 139, 139, 139, 139, 139, 139, 139, 36, + 139, 87, 98, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 244, 225, 189, 222, 0, 0, 27, + 0, 196, 203, 202, 205, 199, 206, 200, 204, 201, + 218, 161, 0, 0, 0, 0, 0, 0, 0, 0, + 251, 249, 187, 0, 172, 176, 0, 0, 253, 0, + 166, 172, 0, 173, 177, 0, 0, 175, 164, 162, + 171, 0, 0, 0, 250, 248, 247, 235, 238, 0, + + 191, 0, 0, 237, 233, 195, 0, 0, 220, 139, + 139, 44, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 42, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 34, 139, 139, 139, 139, + 139, 139, 119, 139, 139, 139, 47, 139, 107, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 54, 139, + 139, 139, 139, 139, 139, 139, 49, 139, 139, 139, + 139, 139, 219, 0, 0, 154, 154, 160, 155, 158, + 157, 159, 156, 0, 0, 0, 0, 0, 172, 0, + + 0, 172, 176, 0, 0, 173, 175, 179, 0, 171, + 169, 170, 170, 0, 0, 0, 0, 240, 192, 193, + 0, 239, 194, 139, 100, 139, 139, 111, 139, 139, + 112, 139, 139, 74, 139, 139, 139, 139, 139, 139, + 139, 38, 40, 53, 139, 139, 139, 139, 139, 139, + 139, 139, 59, 139, 139, 139, 139, 123, 124, 125, + 139, 120, 139, 139, 139, 0, 0, 139, 101, 139, + 139, 139, 76, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 109, 139, 106, + 126, 139, 139, 139, 139, 0, 0, 139, 113, 139, + + 139, 43, 139, 0, 147, 153, 153, 148, 148, 151, + 151, 150, 150, 152, 152, 149, 149, 0, 0, 172, + 170, 168, 0, 0, 190, 139, 83, 139, 139, 65, + 104, 139, 52, 71, 139, 139, 139, 99, 139, 139, + 139, 110, 139, 139, 135, 139, 139, 139, 139, 139, + 121, 122, 139, 58, 139, 0, 139, 139, 139, 139, + 139, 139, 117, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 82, 69, 139, 139, 139, 131, 132, + 133, 139, 128, 139, 139, 139, 139, 0, 139, 73, + 35, 103, 0, 146, 141, 144, 143, 145, 142, 0, + + 0, 0, 0, 139, 45, 139, 139, 139, 139, 108, + 134, 81, 139, 139, 139, 136, 137, 138, 139, 139, + 139, 139, 139, 139, 67, 0, 46, 60, 139, 139, + 139, 139, 61, 139, 139, 139, 139, 102, 79, 90, + 139, 96, 114, 51, 139, 139, 129, 130, 139, 94, + 75, 118, 0, 48, 139, 0, 139, 139, 33, 139, + 85, 139, 41, 139, 139, 139, 139, 32, 95, 139, + 139, 62, 139, 91, 115, 55, 139, 64, 139, 139, + 139, 56, 139, 139, 0, 93, 139, 70, 0, 80, + 127, 72, 89, 139, 66, 139, 88, 86, 63, 78, + + 139, 139, 139, 139, 57, 105, 139, 116, 1, 139, + 68, 139, 92, 139, 37, 139, 139, 139, 139, 139, + 84, 77, 39, 139, 139, 50, 0 } ; static const YY_CHAR yy_ec[256] = @@ -717,193 +717,193 @@ static const YY_CHAR yy_meta[77] = 9, 9, 9, 1, 1, 1 } ; -static const flex_int16_t yy_base[762] = +static const flex_int16_t yy_base[767] = { 0, - 0, 0, 0, 8, 15, 22, 27, 29, 1385, 1384, - 32, 36, 96, 0, 1383, 1382, 1384, 1389, 1389, 48, - 1389, 52, 58, 46, 1363, 28, 1389, 1389, 1389, 1389, - 1389, 2, 1389, 1389, 1389, 1389, 1362, 1366, 1389, 1389, - 0, 1389, 1375, 1389, 1389, 1389, 1389, 1347, 1389, 58, - 171, 1346, 163, 1333, 1389, 1389, 45, 59, 181, 157, + 0, 0, 0, 8, 15, 22, 27, 29, 1390, 1389, + 32, 36, 96, 0, 1388, 1387, 1389, 1394, 1394, 48, + 1394, 52, 58, 46, 1368, 28, 1394, 1394, 1394, 1394, + 1394, 2, 1394, 1394, 1394, 1394, 1367, 1371, 1394, 1394, + 0, 1394, 1380, 1394, 1394, 1394, 1394, 1352, 1394, 58, + 171, 1351, 163, 1338, 1394, 1394, 45, 59, 181, 157, 184, 162, 239, 16, 61, 194, 160, 62, 155, 198, - 211, 0, 157, 245, 1389, 147, 237, 194, 174, 165, - 184, 226, 216, 252, 39, 1314, 151, 205, 252, 181, - 244, 259, 265, 222, 216, 1318, 1300, 282, 1389, 1389, - - 1389, 330, 1389, 319, 1389, 1389, 234, 1389, 1389, 1389, - 1389, 0, 1368, 1389, 294, 1389, 1297, 0, 0, 0, - 0, 0, 0, 0, 0, 1389, 1339, 1389, 1358, 304, - 1389, 1389, 1389, 1389, 347, 340, 1324, 1323, 1389, 1389, - 1389, 1348, 403, 1389, 318, 1389, 444, 173, 352, 1389, - 1389, 344, 0, 342, 1389, 1312, 353, 1389, 1389, 402, - 344, 1320, 311, 1389, 331, 1389, 393, 1389, 1389, 1389, - 353, 1389, 1389, 1389, 386, 1289, 406, 0, 1389, 1389, - 416, 1389, 1389, 1331, 1296, 1309, 1311, 1294, 1292, 1290, - 1289, 1293, 1292, 1300, 1286, 1302, 1289, 335, 1281, 333, - - 1280, 1284, 1287, 268, 1283, 1279, 1282, 1281, 1274, 0, - 1277, 382, 0, 1286, 382, 1271, 1285, 1266, 1276, 256, - 1281, 1267, 1275, 1281, 1269, 387, 1280, 1279, 1278, 288, - 1276, 367, 1262, 1261, 1262, 377, 1271, 1272, 1255, 1262, - 393, 1251, 1264, 1389, 1389, 1389, 1284, 462, 433, 1389, - 455, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, - 1389, 411, 1303, 1302, 1301, 1300, 1299, 1298, 1294, 1305, - 1389, 1389, 1389, 483, 1389, 1389, 1253, 456, 1389, 457, - 1389, 475, 498, 1389, 1389, 1252, 514, 492, 1389, 1389, - 491, 1286, 1289, 1300, 1389, 1389, 1389, 1270, 1389, 551, - - 1389, 559, 1281, 1389, 1268, 1389, 543, 1224, 1389, 1231, - 1232, 0, 1247, 1227, 1232, 1239, 1241, 1232, 1241, 1222, - 1222, 348, 1238, 1233, 1232, 1234, 1229, 1229, 1221, 421, - 1214, 1230, 1225, 1228, 0, 1225, 1222, 1212, 1214, 1213, - 1220, 545, 1205, 1216, 1218, 513, 1199, 0, 1207, 1200, - 1207, 1198, 1196, 1192, 1201, 1204, 1196, 1196, 1188, 1187, - 1195, 1188, 1187, 1184, 434, 1191, 1196, 0, 1189, 1194, - 1179, 1184, 1195, 1194, 1181, 573, 1189, 1175, 1180, 1182, - 1178, 1389, 573, 546, 1208, 1207, 432, 516, 517, 524, - 535, 539, 1219, 532, 1230, 606, 591, 568, 584, 613, - - 1389, 1389, 1178, 621, 612, 1389, 1389, 1177, 613, 1389, - 593, 627, 1215, 568, 1226, 654, 1389, 1389, 1389, 1225, - 1389, 1389, 1162, 0, 1154, 1165, 0, 1167, 1165, 0, - 1164, 0, 1155, 1153, 1162, 1150, 1150, 1162, 1156, 0, - 0, 0, 1163, 1156, 1159, 1152, 1158, 1142, 1141, 1142, - 0, 1149, 1137, 1142, 1176, 0, 0, 0, 1177, 0, - 1152, 1141, 1147, 658, 1178, 1138, 0, 1147, 1133, 1129, - 0, 1144, 1135, 1138, 1121, 1122, 1131, 1122, 1133, 1132, - 1117, 1126, 1121, 1130, 1127, 0, 1126, 571, 665, 1121, - 1123, 1110, 1120, 671, 1154, 1124, 0, 1119, 1118, 0, - - 1118, 1162, 1389, 1140, 1139, 1138, 1137, 1136, 1135, 1134, - 1133, 1132, 1131, 1130, 1129, 1141, 679, 656, 1389, 1389, - 1140, 1151, 1389, 1104, 0, 1099, 1098, 0, 0, 0, - 0, 1089, 1090, 1095, 0, 1086, 1031, 1046, 0, 1037, - 1047, 645, 998, 1005, 1002, 999, 985, 0, 0, 980, - 0, 997, 1041, 952, 936, 937, 940, 929, 943, 940, - 912, 911, 898, 883, 891, 890, 894, 889, 878, 865, - 0, 0, 878, 869, 902, 0, 0, 0, 897, 0, - 854, 867, 852, 865, 908, 849, 0, 0, 0, 0, - 1389, 1389, 1389, 1389, 1389, 1389, 894, 664, 893, 665, - - 856, 0, 841, 831, 831, 0, 0, 0, 840, 824, - 840, 0, 0, 0, 826, 820, 829, 832, 825, 815, - 0, 873, 1389, 0, 813, 808, 815, 813, 0, 840, - 799, 798, 776, 0, 0, 0, 754, 769, 0, 0, - 410, 675, 0, 0, 671, 707, 0, 700, 723, 1389, - 657, 716, 655, 669, 666, 0, 651, 0, 648, 637, - 635, 629, 0, 0, 630, 618, 0, 624, 0, 0, - 0, 569, 0, 558, 608, 565, 0, 543, 553, 712, - 1389, 566, 0, 581, 0, 0, 0, 0, 517, 0, - 516, 0, 0, 0, 0, 478, 430, 434, 438, 0, - - 0, 386, 0, 1389, 367, 0, 356, 0, 345, 0, - 309, 218, 215, 198, 156, 0, 0, 0, 128, 12, - 0, 1389, 730, 742, 754, 766, 778, 790, 802, 814, - 826, 833, 845, 857, 868, 879, 890, 901, 912, 923, - 934, 945, 952, 956, 968, 980, 987, 994, 1006, 1018, - 1030, 1037, 1044, 1056, 1068, 1080, 1087, 1099, 1111, 1123, - 1135 + 211, 0, 157, 245, 1394, 147, 237, 194, 174, 165, + 184, 226, 216, 252, 39, 1319, 151, 205, 252, 181, + 244, 259, 265, 222, 216, 1323, 1305, 282, 1394, 1394, + + 1394, 330, 1394, 319, 1394, 1394, 234, 1394, 1394, 1394, + 1394, 0, 1373, 1394, 294, 1394, 1302, 0, 0, 0, + 0, 0, 0, 0, 0, 1394, 1344, 1394, 1363, 304, + 1394, 1394, 1394, 1394, 347, 340, 1329, 1328, 1394, 1394, + 1394, 1353, 403, 1394, 318, 1394, 444, 173, 352, 1394, + 1394, 344, 0, 342, 1394, 1317, 353, 1394, 1394, 402, + 344, 1325, 311, 1394, 331, 1394, 393, 1394, 1394, 1394, + 353, 1394, 1394, 1394, 386, 1294, 406, 0, 1394, 1394, + 416, 1394, 1394, 1336, 1301, 1314, 1316, 1299, 1297, 1295, + 1294, 1298, 1297, 1305, 336, 1308, 1295, 335, 1287, 376, + + 1286, 1290, 1293, 268, 1289, 1285, 1288, 1287, 1280, 0, + 1283, 383, 0, 1292, 385, 1277, 1291, 1272, 1282, 256, + 1287, 1273, 1281, 1287, 1275, 387, 1286, 1285, 1284, 288, + 1282, 364, 1268, 1267, 1268, 382, 1277, 1278, 1261, 1268, + 407, 1257, 1270, 1394, 1394, 1394, 1290, 462, 455, 1394, + 456, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, + 1394, 375, 1309, 1308, 1307, 1306, 1305, 1304, 1300, 1311, + 1394, 1394, 1394, 483, 1394, 1394, 1259, 471, 1394, 474, + 1394, 476, 499, 1394, 1394, 1258, 515, 493, 1394, 1394, + 492, 1292, 1295, 1306, 1394, 1394, 1394, 1276, 1394, 552, + + 1394, 560, 1287, 1394, 1274, 1394, 544, 1230, 1394, 1237, + 1238, 0, 1253, 1233, 1238, 1245, 1247, 1238, 1247, 1228, + 1227, 1227, 348, 1243, 1238, 1237, 1239, 1234, 1234, 1226, + 393, 1219, 1235, 1230, 1233, 0, 1230, 1227, 1217, 1219, + 1218, 1225, 546, 1210, 1221, 1223, 514, 1204, 0, 1212, + 1205, 1212, 1203, 1201, 1197, 1206, 1209, 1201, 1201, 1193, + 1192, 1200, 1193, 1192, 1189, 491, 1196, 1201, 0, 1194, + 1199, 1184, 1189, 1200, 1199, 1186, 574, 1194, 1180, 1185, + 1187, 1183, 1394, 574, 547, 1213, 1212, 412, 432, 517, + 525, 536, 540, 1224, 568, 1235, 607, 592, 569, 583, + + 614, 1394, 1394, 1183, 622, 613, 1394, 1394, 1182, 565, + 1394, 594, 626, 1220, 569, 1231, 653, 1394, 1394, 1394, + 1230, 1394, 1394, 1167, 0, 1159, 1170, 0, 1172, 1170, + 0, 1169, 1158, 0, 1159, 1157, 1166, 1154, 1154, 1166, + 1160, 0, 0, 0, 1167, 1160, 1163, 1156, 1162, 1146, + 1145, 1146, 0, 1153, 1141, 1146, 1180, 0, 0, 0, + 1181, 0, 1156, 1145, 1151, 657, 1182, 1142, 0, 1151, + 1137, 1133, 0, 1148, 1139, 1142, 1125, 1126, 1135, 1126, + 1137, 1136, 1121, 1130, 1125, 1134, 1131, 0, 1130, 611, + 664, 1125, 1127, 1114, 1124, 674, 1158, 1128, 0, 1123, + + 1122, 0, 1122, 1166, 1394, 1144, 1143, 1142, 1141, 1140, + 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1145, 678, 655, + 1394, 1394, 1144, 1155, 1394, 1108, 0, 1103, 1102, 0, + 0, 1089, 0, 0, 1092, 1093, 1098, 0, 1097, 1082, + 1097, 0, 1088, 1091, 646, 1040, 1047, 1044, 1041, 991, + 0, 0, 986, 0, 1003, 1047, 994, 979, 984, 986, + 937, 951, 970, 943, 942, 928, 905, 912, 911, 915, + 892, 887, 874, 0, 0, 887, 878, 905, 0, 0, + 0, 906, 0, 863, 876, 861, 868, 917, 858, 0, + 0, 0, 0, 1394, 1394, 1394, 1394, 1394, 1394, 903, + + 660, 902, 675, 859, 0, 850, 855, 839, 839, 0, + 0, 0, 842, 826, 848, 0, 0, 0, 834, 828, + 831, 834, 833, 823, 0, 881, 1394, 0, 815, 810, + 823, 821, 0, 848, 801, 800, 811, 0, 0, 0, + 800, 815, 0, 0, 575, 774, 0, 0, 759, 706, + 0, 788, 725, 1394, 660, 719, 658, 671, 0, 669, + 0, 654, 0, 655, 657, 655, 645, 0, 0, 632, + 631, 0, 631, 0, 0, 0, 619, 0, 614, 607, + 615, 0, 563, 543, 711, 1394, 565, 0, 574, 0, + 0, 0, 0, 488, 0, 479, 0, 0, 0, 0, + + 447, 437, 434, 438, 0, 0, 420, 0, 1394, 412, + 0, 356, 0, 333, 0, 309, 218, 215, 198, 156, + 0, 0, 0, 128, 12, 0, 1394, 729, 741, 753, + 765, 777, 789, 801, 813, 825, 832, 844, 856, 867, + 878, 889, 900, 911, 922, 933, 944, 951, 955, 967, + 979, 986, 993, 1005, 1017, 1029, 1036, 1043, 1055, 1067, + 1079, 1086, 1098, 1110, 1122, 1134 } ; -static const flex_int16_t yy_def[762] = +static const flex_int16_t yy_def[767] = { 0, - 723, 723, 724, 724, 725, 725, 726, 726, 727, 727, - 728, 728, 722, 13, 729, 729, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 730, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 731, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 63, 722, 722, 722, 722, 722, 722, - 722, 732, 722, 722, 722, 722, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 722, 722, 722, 722, - - 722, 722, 722, 722, 722, 722, 733, 722, 722, 722, - 722, 730, 722, 722, 722, 722, 722, 734, 735, 736, - 737, 738, 739, 740, 741, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 742, 722, 722, 63, 722, 722, - 722, 722, 743, 744, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 732, 722, 722, - 722, 722, 722, 722, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 722, 722, 722, 722, 722, 733, 722, - 733, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 745, 746, - 722, 722, 722, 722, 722, 722, 722, 742, 722, 742, - 722, 147, 722, 722, 722, 722, 722, 747, 722, 722, - 748, 722, 749, 750, 722, 722, 722, 722, 722, 722, - - 722, 722, 722, 722, 722, 722, 722, 722, 722, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 722, 722, 733, 722, 722, 722, 722, 722, 722, - 722, 722, 745, 751, 746, 722, 722, 752, 742, 722, - - 722, 722, 722, 722, 753, 722, 722, 722, 748, 722, - 722, 722, 749, 754, 750, 722, 722, 722, 722, 755, - 722, 722, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 722, 722, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 722, 722, 732, 732, 732, 732, 732, - - 732, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 756, 722, 757, 722, 722, - 758, 755, 722, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 759, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 760, 732, 732, 732, 732, 761, - 722, 722, 722, 722, 722, 722, 756, 751, 758, 754, - - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 759, 722, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 760, 722, - 732, 761, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 722, - 722, 732, 732, 722, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - - 732, 732, 732, 722, 732, 732, 732, 732, 732, 732, - 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, - 732, 0, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722 + 728, 728, 729, 729, 730, 730, 731, 731, 732, 732, + 733, 733, 727, 13, 734, 734, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 735, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 736, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 63, 727, 727, 727, 727, 727, 727, + 727, 737, 727, 727, 727, 727, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 727, 727, 727, 727, + + 727, 727, 727, 727, 727, 727, 738, 727, 727, 727, + 727, 735, 727, 727, 727, 727, 727, 739, 740, 741, + 742, 743, 744, 745, 746, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 747, 727, 727, 63, 727, 727, + 727, 727, 748, 749, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 737, 727, 727, + 727, 727, 727, 727, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 727, 727, 727, 727, 727, 738, 727, + 738, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 750, 751, + 727, 727, 727, 727, 727, 727, 727, 747, 727, 747, + 727, 147, 727, 727, 727, 727, 727, 752, 727, 727, + 753, 727, 754, 755, 727, 727, 727, 727, 727, 727, + + 727, 727, 727, 727, 727, 727, 727, 727, 727, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 727, 727, 738, 727, 727, 727, 727, 727, + 727, 727, 727, 750, 756, 751, 727, 727, 757, 747, + + 727, 727, 727, 727, 727, 758, 727, 727, 727, 753, + 727, 727, 727, 754, 759, 755, 727, 727, 727, 727, + 760, 727, 727, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 727, 727, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 727, 727, 737, 737, 737, + + 737, 737, 737, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 761, 727, 762, + 727, 727, 763, 760, 727, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 764, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 765, 737, 737, + 737, 737, 766, 727, 727, 727, 727, 727, 727, 761, + + 756, 763, 759, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 764, 727, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 765, 727, 737, 766, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 727, 727, 737, 737, 727, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + + 737, 737, 737, 737, 737, 737, 737, 737, 727, 737, + 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, + 737, 737, 737, 737, 737, 737, 0, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727 } ; -static const flex_int16_t yy_nxt[1466] = +static const flex_int16_t yy_nxt[1471] = { 0, - 722, 20, 21, 22, 23, 722, 722, 24, 108, 20, - 21, 22, 23, 722, 25, 24, 28, 29, 30, 26, - 722, 31, 25, 28, 29, 30, 722, 26, 31, 35, + 727, 20, 21, 22, 23, 727, 727, 24, 108, 20, + 21, 22, 23, 727, 25, 24, 28, 29, 30, 26, + 727, 31, 25, 28, 29, 30, 727, 26, 31, 35, 36, 35, 36, 42, 18, 18, 43, 42, 18, 18, - 43, 37, 106, 37, 722, 109, 38, 107, 38, 102, - 103, 102, 102, 102, 103, 102, 102, 722, 32, 102, - 103, 102, 102, 721, 131, 32, 104, 104, 104, 104, + 43, 37, 106, 37, 727, 109, 38, 107, 38, 102, + 103, 102, 102, 102, 103, 102, 102, 727, 32, 102, + 103, 102, 102, 726, 131, 32, 104, 104, 104, 104, 104, 104, 104, 104, 133, 108, 132, 108, 104, 104, - 104, 104, 104, 104, 104, 104, 722, 215, 33, 158, + 104, 104, 104, 104, 104, 104, 727, 215, 33, 158, 134, 216, 159, 168, 169, 33, 44, 45, 46, 47, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, @@ -914,151 +914,151 @@ static const flex_int16_t yy_nxt[1466] = 83, 72, 84, 72, 85, 86, 87, 88, 89, 72, 90, 91, 92, 93, 94, 95, 72, 96, 72, 97, 98, 99, 115, 127, 139, 115, 144, 164, 183, 116, - 720, 145, 135, 135, 135, 135, 170, 171, 140, 141, + 725, 145, 135, 135, 135, 135, 170, 171, 140, 141, 165, 166, 184, 146, 128, 160, 160, 160, 160, 179, 136, 117, 142, 218, 143, 143, 143, 143, 143, 143, - 143, 143, 175, 161, 722, 175, 172, 198, 219, 118, - 119, 120, 195, 121, 122, 137, 199, 123, 719, 225, + 143, 143, 175, 161, 727, 175, 172, 198, 219, 118, + 119, 120, 195, 121, 122, 137, 199, 123, 724, 225, 180, 173, 196, 226, 167, 197, 250, 124, 162, 125, - 174, 176, 200, 722, 201, 177, 181, 182, 181, 181, - 191, 718, 192, 251, 202, 193, 138, 147, 194, 148, + 174, 176, 200, 727, 201, 177, 181, 182, 181, 181, + 191, 723, 192, 251, 202, 193, 138, 147, 194, 148, 148, 148, 148, 148, 148, 148, 148, 220, 208, 163, 239, 241, 242, 221, 203, 149, 150, 209, 151, 152, - 153, 717, 204, 240, 205, 154, 185, 206, 186, 716, + 153, 722, 204, 240, 205, 154, 185, 206, 186, 721, 155, 149, 150, 207, 187, 115, 227, 156, 115, 228, - 222, 188, 189, 229, 190, 210, 157, 231, 350, 153, + 222, 188, 189, 229, 190, 210, 157, 231, 351, 153, 230, 211, 212, 245, 246, 262, 223, 213, 214, 224, - 279, 235, 351, 232, 117, 236, 233, 237, 332, 238, - 234, 102, 103, 102, 102, 248, 364, 280, 333, 104, + 279, 235, 352, 232, 117, 236, 233, 237, 333, 238, + 234, 102, 103, 102, 102, 248, 365, 280, 334, 104, 104, 104, 104, 104, 104, 104, 104, 263, 135, 135, - 135, 135, 365, 264, 269, 296, 247, 265, 293, 270, - 292, 298, 299, 294, 266, 715, 136, 287, 267, 287, + 135, 135, 366, 264, 269, 296, 247, 265, 293, 270, + 292, 298, 299, 294, 266, 720, 136, 287, 267, 287, 268, 289, 288, 288, 288, 288, 288, 288, 288, 288, - 289, 151, 152, 290, 304, 305, 297, 175, 323, 327, - 175, 137, 290, 324, 300, 301, 302, 300, 328, 325, + 289, 151, 152, 290, 304, 305, 297, 175, 324, 719, + 175, 137, 290, 325, 300, 301, 302, 300, 320, 326, - 151, 714, 290, 160, 160, 160, 160, 307, 713, 157, - 307, 290, 303, 434, 435, 712, 176, 181, 182, 181, + 151, 321, 290, 160, 160, 160, 160, 307, 718, 157, + 307, 290, 303, 436, 437, 386, 176, 181, 182, 181, 181, 161, 138, 143, 143, 143, 143, 143, 143, 143, - 143, 344, 340, 372, 367, 250, 308, 357, 368, 274, - 275, 345, 373, 358, 711, 378, 162, 341, 342, 379, - 359, 385, 251, 360, 276, 274, 275, 250, 279, 279, - 676, 277, 281, 677, 282, 282, 282, 282, 282, 282, - 282, 282, 504, 443, 384, 280, 399, 163, 386, 444, - 283, 284, 383, 383, 383, 383, 383, 383, 383, 383, - 483, 710, 709, 722, 708, 285, 283, 284, 397, 505, - - 397, 484, 286, 398, 398, 398, 398, 398, 398, 398, - 398, 400, 401, 404, 464, 404, 464, 464, 405, 405, - 405, 405, 405, 405, 405, 405, 402, 400, 401, 406, - 410, 411, 465, 403, 288, 288, 288, 288, 288, 288, - 288, 288, 707, 407, 307, 406, 394, 307, 250, 410, - 408, 396, 302, 301, 302, 302, 506, 508, 412, 418, - 302, 301, 302, 302, 510, 384, 455, 456, 457, 458, - 303, 459, 460, 308, 494, 512, 494, 494, 303, 514, - 706, 705, 414, 507, 509, 419, 279, 416, 704, 502, - 703, 511, 495, 383, 383, 383, 383, 383, 383, 383, - - 383, 702, 513, 399, 701, 275, 515, 135, 135, 135, - 135, 398, 398, 398, 398, 398, 398, 398, 398, 276, - 519, 275, 573, 700, 697, 136, 277, 574, 517, 496, - 517, 696, 520, 518, 518, 518, 518, 518, 518, 518, - 518, 405, 405, 405, 405, 405, 405, 405, 405, 284, - 137, 520, 410, 411, 519, 160, 160, 160, 160, 464, - 698, 464, 464, 285, 699, 284, 520, 612, 613, 614, - 286, 410, 494, 161, 494, 494, 695, 465, 598, 600, - 412, 138, 694, 396, 416, 520, 575, 576, 577, 578, - 495, 579, 580, 401, 693, 692, 691, 690, 162, 518, - - 518, 518, 518, 518, 518, 518, 518, 402, 680, 401, - 680, 680, 689, 680, 403, 680, 680, 688, 687, 681, - 686, 685, 684, 683, 681, 650, 682, 679, 678, 163, + 143, 368, 328, 341, 345, 369, 308, 358, 373, 274, + 275, 329, 387, 359, 346, 445, 162, 374, 342, 343, + 360, 446, 506, 361, 276, 274, 275, 250, 250, 379, + 717, 277, 281, 380, 282, 282, 282, 282, 282, 282, + 282, 282, 508, 279, 251, 385, 279, 163, 716, 507, + 283, 284, 384, 384, 384, 384, 384, 384, 384, 384, + 280, 715, 714, 400, 727, 285, 283, 284, 398, 509, + + 398, 713, 286, 399, 399, 399, 399, 399, 399, 399, + 399, 712, 401, 402, 405, 466, 405, 466, 466, 406, + 406, 406, 406, 406, 406, 406, 406, 403, 401, 402, + 407, 411, 412, 467, 404, 288, 288, 288, 288, 288, + 288, 288, 288, 711, 408, 307, 407, 485, 307, 250, + 411, 409, 710, 302, 301, 302, 302, 510, 486, 413, + 419, 302, 301, 302, 302, 512, 385, 457, 458, 459, + 460, 303, 461, 462, 308, 496, 514, 496, 496, 303, + 516, 709, 395, 415, 511, 279, 420, 397, 417, 708, + 504, 707, 513, 497, 384, 384, 384, 384, 384, 384, + + 384, 384, 400, 515, 411, 412, 275, 517, 135, 135, + 135, 135, 399, 399, 399, 399, 399, 399, 399, 399, + 276, 521, 275, 411, 706, 681, 136, 277, 682, 519, + 498, 519, 413, 522, 520, 520, 520, 520, 520, 520, + 520, 520, 406, 406, 406, 406, 406, 406, 406, 406, + 284, 137, 522, 521, 160, 160, 160, 160, 466, 703, + 466, 466, 576, 704, 285, 522, 284, 577, 616, 617, + 618, 286, 161, 705, 601, 496, 467, 496, 496, 397, + 702, 701, 138, 700, 522, 578, 579, 580, 581, 603, + 582, 583, 402, 497, 417, 699, 698, 162, 520, 520, + + 520, 520, 520, 520, 520, 520, 403, 685, 402, 685, + 685, 697, 685, 404, 685, 685, 696, 695, 686, 694, + 693, 692, 691, 686, 690, 689, 688, 654, 163, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 39, 39, - 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 100, 100, 100, 100, 100, 100, 100, 100, - 100, 100, 100, 100, 112, 675, 674, 112, 112, 112, - 112, 112, 112, 112, 112, 112, 129, 129, 673, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 178, 178, - 178, 178, 178, 178, 178, 249, 249, 249, 249, 249, - 249, 249, 249, 249, 249, 249, 249, 253, 253, 253, - 253, 253, 672, 671, 670, 669, 668, 253, 254, 254, - 254, 254, 254, 667, 666, 623, 665, 664, 254, 255, - 255, 255, 255, 255, 663, 662, 661, 660, 659, 255, - 256, 256, 256, 256, 256, 658, 657, 656, 655, 654, - - 256, 257, 257, 257, 257, 257, 653, 600, 598, 651, - 650, 257, 258, 258, 258, 258, 258, 648, 647, 646, - 645, 644, 258, 259, 259, 259, 259, 259, 643, 642, - 641, 640, 639, 259, 260, 260, 260, 260, 260, 638, - 637, 636, 635, 634, 260, 278, 278, 278, 278, 278, - 278, 278, 278, 278, 278, 278, 278, 291, 291, 291, - 154, 154, 633, 632, 631, 154, 630, 154, 393, 393, - 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, - 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, - 395, 395, 288, 629, 288, 628, 627, 626, 288, 409, - - 409, 409, 625, 409, 624, 409, 413, 413, 413, 413, - 413, 413, 413, 413, 413, 413, 413, 413, 415, 415, - 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, - 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, - 516, 516, 398, 623, 398, 621, 620, 619, 398, 405, - 618, 405, 617, 616, 615, 405, 521, 521, 521, 521, - 521, 521, 521, 521, 521, 521, 521, 521, 522, 522, - 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, - 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, - 597, 597, 518, 611, 518, 610, 609, 608, 518, 599, - - 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 622, 622, 622, 622, 622, 622, 622, 622, 622, - 622, 622, 622, 649, 649, 649, 649, 649, 649, 649, - 649, 649, 649, 649, 649, 652, 652, 652, 607, 652, - 652, 652, 652, 652, 652, 652, 652, 606, 605, 604, - 603, 602, 601, 523, 600, 598, 596, 596, 595, 595, - 594, 594, 593, 593, 592, 592, 591, 591, 590, 589, - 588, 587, 586, 585, 584, 583, 582, 581, 572, 571, - 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, - 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, - - 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, - 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, - 530, 529, 528, 527, 526, 525, 524, 523, 416, 414, - 407, 402, 396, 394, 503, 503, 501, 500, 499, 498, - 497, 493, 492, 491, 490, 489, 488, 487, 486, 485, - 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, - 472, 471, 470, 469, 468, 467, 466, 463, 462, 461, - 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, - 442, 441, 440, 439, 438, 437, 436, 433, 432, 431, - 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, - - 420, 417, 416, 414, 281, 285, 276, 396, 394, 392, - 391, 390, 389, 388, 387, 382, 381, 380, 377, 376, - 375, 374, 371, 370, 369, 366, 363, 362, 361, 356, - 355, 354, 353, 352, 349, 348, 347, 346, 343, 339, - 338, 337, 336, 335, 334, 331, 330, 329, 326, 322, - 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, - 311, 310, 309, 306, 295, 155, 273, 272, 271, 262, - 261, 252, 113, 244, 243, 217, 130, 126, 114, 113, - 111, 110, 105, 722, 101, 101, 40, 40, 17, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722 + 41, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 112, 687, 684, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 129, 129, 683, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 178, 178, 178, + 178, 178, 178, 178, 249, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 249, 249, 253, 253, 253, 253, + 253, 680, 679, 678, 677, 676, 253, 254, 254, 254, + 254, 254, 675, 674, 673, 672, 671, 254, 255, 255, + 255, 255, 255, 627, 670, 669, 668, 667, 255, 256, + 256, 256, 256, 256, 666, 665, 664, 663, 662, 256, + + 257, 257, 257, 257, 257, 661, 660, 659, 658, 657, + 257, 258, 258, 258, 258, 258, 603, 601, 655, 654, + 652, 258, 259, 259, 259, 259, 259, 651, 650, 649, + 648, 647, 259, 260, 260, 260, 260, 260, 646, 645, + 644, 643, 642, 260, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 291, 291, 291, 154, + 154, 641, 640, 639, 154, 638, 154, 394, 394, 394, + 394, 394, 394, 394, 394, 394, 394, 394, 394, 396, + 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, + 396, 288, 637, 288, 636, 635, 634, 288, 410, 410, + + 410, 633, 410, 632, 410, 414, 414, 414, 414, 414, + 414, 414, 414, 414, 414, 414, 414, 416, 416, 416, + 416, 416, 416, 416, 416, 416, 416, 416, 416, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 399, 631, 399, 630, 629, 628, 399, 406, 627, + 406, 625, 624, 623, 406, 523, 523, 523, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 524, 524, 600, + 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, + 600, 520, 622, 520, 621, 620, 619, 520, 602, 602, + + 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, + 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, + 626, 626, 653, 653, 653, 653, 653, 653, 653, 653, + 653, 653, 653, 653, 656, 656, 656, 615, 656, 656, + 656, 656, 656, 656, 656, 656, 614, 613, 612, 611, + 610, 609, 608, 607, 606, 605, 604, 525, 603, 601, + 599, 599, 598, 598, 597, 597, 596, 596, 595, 595, + 594, 594, 593, 592, 591, 590, 589, 588, 587, 586, + 585, 584, 575, 574, 573, 572, 571, 570, 569, 568, + 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, + + 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, + 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, + 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, + 527, 526, 525, 417, 415, 408, 403, 397, 395, 505, + 505, 503, 502, 501, 500, 499, 495, 494, 493, 492, + 491, 490, 489, 488, 487, 484, 483, 482, 481, 480, + 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, + 469, 468, 465, 464, 463, 456, 455, 454, 453, 452, + 451, 450, 449, 448, 447, 444, 443, 442, 441, 440, + 439, 438, 435, 434, 433, 432, 431, 430, 429, 428, + + 427, 426, 425, 424, 423, 422, 421, 418, 417, 415, + 281, 285, 276, 397, 395, 393, 392, 391, 390, 389, + 388, 383, 382, 381, 378, 377, 376, 375, 372, 371, + 370, 367, 364, 363, 362, 357, 356, 355, 354, 353, + 350, 349, 348, 347, 344, 340, 339, 338, 337, 336, + 335, 332, 331, 330, 327, 323, 322, 319, 318, 317, + 316, 315, 314, 313, 312, 311, 310, 309, 306, 295, + 155, 273, 272, 271, 262, 261, 252, 113, 244, 243, + 217, 130, 126, 114, 113, 111, 110, 105, 727, 101, + 101, 40, 40, 17, 727, 727, 727, 727, 727, 727, + + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727 } ; -static const flex_int16_t yy_chk[1466] = +static const flex_int16_t yy_chk[1471] = { 0, 0, 3, 3, 3, 3, 0, 0, 3, 32, 4, 4, 4, 4, 0, 3, 4, 5, 5, 5, 3, @@ -1066,7 +1066,7 @@ static const flex_int16_t yy_chk[1466] = 7, 8, 8, 11, 11, 11, 11, 12, 12, 12, 12, 7, 26, 8, 0, 32, 7, 26, 8, 20, 20, 20, 20, 22, 22, 22, 22, 64, 5, 23, - 23, 23, 23, 720, 57, 6, 24, 24, 24, 24, + 23, 23, 23, 725, 57, 6, 24, 24, 24, 24, 24, 24, 24, 24, 58, 32, 57, 32, 50, 50, 50, 50, 50, 50, 50, 50, 64, 85, 5, 65, 58, 85, 65, 68, 68, 6, 13, 13, 13, 13, @@ -1079,18 +1079,18 @@ static const flex_int16_t yy_chk[1466] = 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 51, 53, 60, 51, 62, 67, 76, 51, - 719, 62, 59, 59, 59, 59, 69, 69, 60, 60, + 724, 62, 59, 59, 59, 59, 69, 69, 60, 60, 67, 67, 76, 62, 53, 66, 66, 66, 66, 73, 59, 51, 61, 87, 61, 61, 61, 61, 61, 61, 61, 61, 71, 66, 148, 71, 70, 80, 87, 51, - 51, 51, 79, 51, 51, 59, 80, 51, 715, 90, + 51, 51, 79, 51, 51, 59, 80, 51, 720, 90, 73, 70, 79, 90, 67, 79, 107, 51, 66, 51, 70, 71, 81, 148, 81, 71, 74, 74, 74, 74, - 78, 714, 78, 107, 81, 78, 59, 63, 78, 63, + 78, 719, 78, 107, 81, 78, 59, 63, 78, 63, 63, 63, 63, 63, 63, 63, 63, 88, 83, 66, 94, 95, 95, 88, 82, 63, 63, 83, 63, 63, - 63, 713, 82, 94, 82, 63, 77, 82, 77, 712, + 63, 718, 82, 94, 82, 63, 77, 82, 77, 717, 63, 63, 63, 82, 77, 115, 91, 63, 115, 91, 89, 77, 77, 91, 77, 84, 63, 92, 220, 63, @@ -1099,146 +1099,146 @@ static const flex_int16_t yy_chk[1466] = 92, 102, 102, 102, 102, 104, 230, 145, 204, 104, 104, 104, 104, 104, 104, 104, 104, 130, 135, 135, 135, 135, 230, 130, 136, 163, 98, 130, 161, 136, - 154, 165, 165, 161, 130, 711, 135, 149, 130, 149, + 154, 165, 165, 161, 130, 716, 135, 149, 130, 149, 130, 152, 149, 149, 149, 149, 149, 149, 149, 149, - 157, 154, 154, 152, 171, 171, 163, 175, 198, 200, - 175, 135, 157, 198, 167, 167, 167, 167, 200, 198, + 157, 154, 154, 152, 171, 171, 163, 175, 198, 714, + 175, 135, 157, 198, 167, 167, 167, 167, 195, 198, - 154, 709, 152, 160, 160, 160, 160, 177, 707, 154, - 177, 157, 167, 322, 322, 705, 175, 181, 181, 181, + 154, 195, 152, 160, 160, 160, 160, 177, 712, 154, + 177, 157, 167, 323, 323, 262, 175, 181, 181, 181, 181, 160, 135, 143, 143, 143, 143, 143, 143, 143, - 143, 215, 212, 236, 232, 249, 177, 226, 232, 143, - 143, 215, 236, 226, 702, 241, 160, 212, 212, 241, - 226, 262, 249, 226, 143, 143, 143, 251, 278, 280, - 641, 143, 147, 641, 147, 147, 147, 147, 147, 147, - 147, 147, 387, 330, 251, 278, 280, 160, 262, 330, + 143, 232, 200, 212, 215, 232, 177, 226, 236, 143, + 143, 200, 262, 226, 215, 331, 160, 236, 212, 212, + 226, 331, 388, 226, 143, 143, 143, 249, 251, 241, + 710, 143, 147, 241, 147, 147, 147, 147, 147, 147, + 147, 147, 389, 278, 249, 251, 280, 160, 707, 388, 147, 147, 248, 248, 248, 248, 248, 248, 248, 248, - 365, 699, 698, 282, 697, 147, 147, 147, 274, 387, - - 274, 365, 147, 274, 274, 274, 274, 274, 274, 274, - 274, 282, 282, 283, 346, 283, 346, 346, 283, 283, - 283, 283, 283, 283, 283, 283, 282, 282, 282, 288, - 291, 291, 346, 282, 287, 287, 287, 287, 287, 287, - 287, 287, 696, 288, 307, 288, 394, 307, 384, 291, - 288, 394, 300, 300, 300, 300, 388, 389, 291, 300, - 302, 302, 302, 302, 390, 384, 342, 342, 342, 342, - 300, 342, 342, 307, 376, 391, 376, 376, 302, 392, - 691, 689, 414, 388, 389, 300, 399, 414, 684, 383, - 682, 390, 376, 383, 383, 383, 383, 383, 383, 383, - - 383, 679, 391, 399, 678, 398, 392, 396, 396, 396, - 396, 397, 397, 397, 397, 397, 397, 397, 397, 398, - 411, 398, 488, 676, 674, 396, 398, 488, 400, 376, - 400, 672, 411, 400, 400, 400, 400, 400, 400, 400, - 400, 404, 404, 404, 404, 404, 404, 404, 404, 405, - 396, 411, 409, 409, 412, 416, 416, 416, 416, 464, - 675, 464, 464, 405, 675, 405, 412, 542, 542, 542, - 405, 409, 494, 416, 494, 494, 668, 464, 598, 600, - 409, 396, 666, 598, 600, 412, 489, 489, 489, 489, - 494, 489, 489, 518, 665, 662, 661, 660, 416, 517, - - 517, 517, 517, 517, 517, 517, 517, 518, 646, 518, - 646, 646, 659, 680, 518, 680, 680, 657, 655, 646, - 654, 653, 652, 651, 680, 649, 648, 645, 642, 416, - 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, - 723, 723, 724, 724, 724, 724, 724, 724, 724, 724, - 724, 724, 724, 724, 725, 725, 725, 725, 725, 725, - 725, 725, 725, 725, 725, 725, 726, 726, 726, 726, - 726, 726, 726, 726, 726, 726, 726, 726, 727, 727, - 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 278, 704, 703, 280, 282, 147, 147, 147, 274, 389, + + 274, 702, 147, 274, 274, 274, 274, 274, 274, 274, + 274, 701, 282, 282, 283, 347, 283, 347, 347, 283, + 283, 283, 283, 283, 283, 283, 283, 282, 282, 282, + 288, 291, 291, 347, 282, 287, 287, 287, 287, 287, + 287, 287, 287, 696, 288, 307, 288, 366, 307, 385, + 291, 288, 694, 300, 300, 300, 300, 390, 366, 291, + 300, 302, 302, 302, 302, 391, 385, 343, 343, 343, + 343, 300, 343, 343, 307, 377, 392, 377, 377, 302, + 393, 689, 395, 415, 390, 400, 300, 395, 415, 687, + 384, 684, 391, 377, 384, 384, 384, 384, 384, 384, + + 384, 384, 400, 392, 410, 410, 399, 393, 397, 397, + 397, 397, 398, 398, 398, 398, 398, 398, 398, 398, + 399, 412, 399, 410, 683, 645, 397, 399, 645, 401, + 377, 401, 410, 412, 401, 401, 401, 401, 401, 401, + 401, 401, 405, 405, 405, 405, 405, 405, 405, 405, + 406, 397, 412, 413, 417, 417, 417, 417, 466, 680, + 466, 466, 490, 680, 406, 413, 406, 490, 545, 545, + 545, 406, 417, 681, 601, 496, 466, 496, 496, 601, + 679, 677, 397, 673, 413, 491, 491, 491, 491, 603, + 491, 491, 520, 496, 603, 671, 670, 417, 519, 519, + + 519, 519, 519, 519, 519, 519, 520, 650, 520, 650, + 650, 667, 685, 520, 685, 685, 666, 665, 650, 664, + 662, 660, 658, 685, 657, 656, 655, 653, 417, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, 728, - - 728, 728, 729, 729, 729, 729, 729, 729, 729, 729, - 729, 729, 729, 729, 730, 638, 637, 730, 730, 730, - 730, 730, 730, 730, 730, 730, 731, 731, 633, 731, - 731, 731, 731, 731, 731, 731, 731, 731, 732, 732, - 732, 732, 732, 732, 732, 733, 733, 733, 733, 733, - 733, 733, 733, 733, 733, 733, 733, 734, 734, 734, - 734, 734, 632, 631, 630, 628, 627, 734, 735, 735, - 735, 735, 735, 626, 625, 622, 620, 619, 735, 736, - 736, 736, 736, 736, 618, 617, 616, 615, 611, 736, - 737, 737, 737, 737, 737, 610, 609, 605, 604, 603, - - 737, 738, 738, 738, 738, 738, 601, 599, 597, 586, - 585, 738, 739, 739, 739, 739, 739, 584, 583, 582, - 581, 579, 739, 740, 740, 740, 740, 740, 575, 574, - 573, 570, 569, 740, 741, 741, 741, 741, 741, 568, - 567, 566, 565, 564, 741, 742, 742, 742, 742, 742, - 742, 742, 742, 742, 742, 742, 742, 743, 743, 743, - 744, 744, 563, 562, 561, 744, 560, 744, 745, 745, - 745, 745, 745, 745, 745, 745, 745, 745, 745, 745, - 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, - 746, 746, 747, 559, 747, 558, 557, 556, 747, 748, - - 748, 748, 555, 748, 554, 748, 749, 749, 749, 749, - 749, 749, 749, 749, 749, 749, 749, 749, 750, 750, - 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, + 728, 729, 729, 729, 729, 729, 729, 729, 729, 729, + 729, 729, 729, 730, 730, 730, 730, 730, 730, 730, + 730, 730, 730, 730, 730, 731, 731, 731, 731, 731, + 731, 731, 731, 731, 731, 731, 731, 732, 732, 732, + 732, 732, 732, 732, 732, 732, 732, 732, 732, 733, + 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, + + 733, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 734, 735, 652, 649, 735, 735, 735, 735, + 735, 735, 735, 735, 735, 736, 736, 646, 736, 736, + 736, 736, 736, 736, 736, 736, 736, 737, 737, 737, + 737, 737, 737, 737, 738, 738, 738, 738, 738, 738, + 738, 738, 738, 738, 738, 738, 739, 739, 739, 739, + 739, 642, 641, 637, 636, 635, 739, 740, 740, 740, + 740, 740, 634, 632, 631, 630, 629, 740, 741, 741, + 741, 741, 741, 626, 624, 623, 622, 621, 741, 742, + 742, 742, 742, 742, 620, 619, 615, 614, 613, 742, + + 743, 743, 743, 743, 743, 609, 608, 607, 606, 604, + 743, 744, 744, 744, 744, 744, 602, 600, 589, 588, + 587, 744, 745, 745, 745, 745, 745, 586, 585, 584, + 582, 578, 745, 746, 746, 746, 746, 746, 577, 576, + 573, 572, 571, 746, 747, 747, 747, 747, 747, 747, + 747, 747, 747, 747, 747, 747, 748, 748, 748, 749, + 749, 570, 569, 568, 749, 567, 749, 750, 750, 750, + 750, 750, 750, 750, 750, 750, 750, 750, 750, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, - 751, 751, 752, 553, 752, 552, 550, 547, 752, 753, - 546, 753, 545, 544, 543, 753, 754, 754, 754, 754, - 754, 754, 754, 754, 754, 754, 754, 754, 755, 755, - 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, + 751, 752, 566, 752, 565, 564, 563, 752, 753, 753, + + 753, 562, 753, 561, 753, 754, 754, 754, 754, 754, + 754, 754, 754, 754, 754, 754, 754, 755, 755, 755, + 755, 755, 755, 755, 755, 755, 755, 755, 755, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, - 756, 756, 757, 541, 757, 540, 538, 537, 757, 758, - - 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, - 758, 759, 759, 759, 759, 759, 759, 759, 759, 759, - 759, 759, 759, 760, 760, 760, 760, 760, 760, 760, - 760, 760, 760, 760, 760, 761, 761, 761, 536, 761, - 761, 761, 761, 761, 761, 761, 761, 534, 533, 532, - 527, 526, 524, 522, 521, 516, 515, 514, 513, 512, - 511, 510, 509, 508, 507, 506, 505, 504, 502, 501, - 499, 498, 496, 495, 493, 492, 491, 490, 487, 485, - 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, - 474, 473, 472, 470, 469, 468, 466, 465, 463, 462, - - 461, 459, 455, 454, 453, 452, 450, 449, 448, 447, - 446, 445, 444, 443, 439, 438, 437, 436, 435, 434, - 433, 431, 429, 428, 426, 425, 423, 420, 415, 413, - 408, 403, 395, 393, 386, 385, 381, 380, 379, 378, - 377, 375, 374, 373, 372, 371, 370, 369, 367, 366, - 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, - 354, 353, 352, 351, 350, 349, 347, 345, 344, 343, - 341, 340, 339, 338, 337, 336, 334, 333, 332, 331, - 329, 328, 327, 326, 325, 324, 323, 321, 320, 319, - 318, 317, 316, 315, 314, 313, 311, 310, 308, 305, - - 303, 298, 294, 293, 292, 286, 277, 270, 269, 268, - 267, 266, 265, 264, 263, 247, 243, 242, 240, 239, - 238, 237, 235, 234, 233, 231, 229, 228, 227, 225, - 224, 223, 222, 221, 219, 218, 217, 216, 214, 211, - 209, 208, 207, 206, 205, 203, 202, 201, 199, 197, - 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, - 186, 185, 184, 176, 162, 156, 142, 138, 137, 129, - 127, 117, 113, 97, 96, 86, 54, 52, 48, 43, - 38, 37, 25, 17, 16, 15, 10, 9, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, - 722, 722, 722, 722, 722 + 756, 757, 560, 757, 559, 558, 557, 757, 758, 556, + 758, 555, 553, 550, 758, 759, 759, 759, 759, 759, + 759, 759, 759, 759, 759, 759, 759, 760, 760, 760, + 760, 760, 760, 760, 760, 760, 760, 760, 760, 761, + 761, 761, 761, 761, 761, 761, 761, 761, 761, 761, + 761, 762, 549, 762, 548, 547, 546, 762, 763, 763, + + 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, + 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, + 764, 764, 765, 765, 765, 765, 765, 765, 765, 765, + 765, 765, 765, 765, 766, 766, 766, 544, 766, 766, + 766, 766, 766, 766, 766, 766, 543, 541, 540, 539, + 537, 536, 535, 532, 529, 528, 526, 524, 523, 518, + 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, + 507, 506, 504, 503, 501, 500, 498, 497, 495, 494, + 493, 492, 489, 487, 486, 485, 484, 483, 482, 481, + 480, 479, 478, 477, 476, 475, 474, 472, 471, 470, + + 468, 467, 465, 464, 463, 461, 457, 456, 455, 454, + 452, 451, 450, 449, 448, 447, 446, 445, 441, 440, + 439, 438, 437, 436, 435, 433, 432, 430, 429, 427, + 426, 424, 421, 416, 414, 409, 404, 396, 394, 387, + 386, 382, 381, 380, 379, 378, 376, 375, 374, 373, + 372, 371, 370, 368, 367, 365, 364, 363, 362, 361, + 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, + 350, 348, 346, 345, 344, 342, 341, 340, 339, 338, + 337, 335, 334, 333, 332, 330, 329, 328, 327, 326, + 325, 324, 322, 321, 320, 319, 318, 317, 316, 315, + + 314, 313, 311, 310, 308, 305, 303, 298, 294, 293, + 292, 286, 277, 270, 269, 268, 267, 266, 265, 264, + 263, 247, 243, 242, 240, 239, 238, 237, 235, 234, + 233, 231, 229, 228, 227, 225, 224, 223, 222, 221, + 219, 218, 217, 216, 214, 211, 209, 208, 207, 206, + 205, 203, 202, 201, 199, 197, 196, 194, 193, 192, + 191, 190, 189, 188, 187, 186, 185, 184, 176, 162, + 156, 142, 138, 137, 129, 127, 117, 113, 97, 96, + 86, 54, 52, 48, 43, 38, 37, 25, 17, 16, + 15, 10, 9, 727, 727, 727, 727, 727, 727, 727, + + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 727, 727, 727, 727 } ; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[255] = +static const flex_int32_t yy_rule_can_match_eol[256] = { 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1617,13 +1617,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 723 ) + if ( yy_current_state >= 728 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 722 ); + while ( yy_current_state != 727 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -2069,67 +2069,72 @@ BEGIN(include); case 33: YY_RULE_SETUP #line 341 "ds_lexer.lpp" -/* yyextra->das_need_oxford_comma = false; */ return DAS_FOR; +return DAS_CAPTURE; YY_BREAK case 34: YY_RULE_SETUP #line 342 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_WHILE; +/* yyextra->das_need_oxford_comma = false; */ return DAS_FOR; YY_BREAK case 35: YY_RULE_SETUP #line 343 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_IF; +yyextra->das_need_oxford_comma = false; return DAS_WHILE; YY_BREAK case 36: YY_RULE_SETUP #line 344 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_STATIC_IF; +yyextra->das_need_oxford_comma = false; return DAS_IF; YY_BREAK case 37: YY_RULE_SETUP #line 345 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_ELIF; +yyextra->das_need_oxford_comma = false; return DAS_STATIC_IF; YY_BREAK case 38: YY_RULE_SETUP #line 346 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_STATIC_ELIF; +yyextra->das_need_oxford_comma = false; return DAS_ELIF; YY_BREAK case 39: YY_RULE_SETUP #line 347 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_ELSE; +yyextra->das_need_oxford_comma = false; return DAS_STATIC_ELIF; YY_BREAK case 40: YY_RULE_SETUP #line 348 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_FINALLY; +yyextra->das_need_oxford_comma = false; return DAS_ELSE; YY_BREAK case 41: YY_RULE_SETUP #line 349 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_DEF; +yyextra->das_need_oxford_comma = false; return DAS_FINALLY; YY_BREAK case 42: YY_RULE_SETUP #line 350 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_WITH; +yyextra->das_need_oxford_comma = false; return DAS_DEF; YY_BREAK case 43: YY_RULE_SETUP #line 351 "ds_lexer.lpp" -return DAS_AKA; +yyextra->das_need_oxford_comma = false; return DAS_WITH; YY_BREAK case 44: YY_RULE_SETUP #line 352 "ds_lexer.lpp" -return DAS_ASSUME; +return DAS_AKA; YY_BREAK case 45: -/* rule 45 can match eol */ YY_RULE_SETUP #line 353 "ds_lexer.lpp" +return DAS_ASSUME; + YY_BREAK +case 46: +/* rule 46 can match eol */ +YY_RULE_SETUP +#line 354 "ds_lexer.lpp" { yyextra->das_need_oxford_comma = false; unput('\n'); @@ -2137,15 +2142,15 @@ YY_RULE_SETUP return DAS_LET; } YY_BREAK -case 46: +case 47: YY_RULE_SETUP -#line 359 "ds_lexer.lpp" +#line 360 "ds_lexer.lpp" return DAS_LET; YY_BREAK -case 47: -/* rule 47 can match eol */ +case 48: +/* rule 48 can match eol */ YY_RULE_SETUP -#line 360 "ds_lexer.lpp" +#line 361 "ds_lexer.lpp" { yyextra->das_need_oxford_comma = false; unput('\n'); @@ -2153,463 +2158,463 @@ YY_RULE_SETUP return DAS_VAR; } YY_BREAK -case 48: -YY_RULE_SETUP -#line 366 "ds_lexer.lpp" -return DAS_VAR; - YY_BREAK case 49: YY_RULE_SETUP #line 367 "ds_lexer.lpp" -return DAS_UNINITIALIZED; +return DAS_VAR; YY_BREAK case 50: YY_RULE_SETUP #line 368 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_STRUCT; +return DAS_UNINITIALIZED; YY_BREAK case 51: YY_RULE_SETUP #line 369 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_CLASS; +yyextra->das_need_oxford_comma = false; return DAS_STRUCT; YY_BREAK case 52: YY_RULE_SETUP #line 370 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_ENUM; +yyextra->das_need_oxford_comma = false; return DAS_CLASS; YY_BREAK case 53: YY_RULE_SETUP #line 371 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_TRY; +yyextra->das_need_oxford_comma = false; return DAS_ENUM; YY_BREAK case 54: YY_RULE_SETUP #line 372 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_CATCH; +yyextra->das_need_oxford_comma = false; return DAS_TRY; YY_BREAK case 55: YY_RULE_SETUP #line 373 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_TYPEDEF; +yyextra->das_need_oxford_comma = false; return DAS_CATCH; YY_BREAK case 56: YY_RULE_SETUP #line 374 "ds_lexer.lpp" -return DAS_TYPEDECL; +yyextra->das_need_oxford_comma = false; return DAS_TYPEDEF; YY_BREAK case 57: YY_RULE_SETUP #line 375 "ds_lexer.lpp" -return DAS_LABEL; +return DAS_TYPEDECL; YY_BREAK case 58: YY_RULE_SETUP #line 376 "ds_lexer.lpp" -return DAS_GOTO; +return DAS_LABEL; YY_BREAK case 59: YY_RULE_SETUP #line 377 "ds_lexer.lpp" -return DAS_MODULE; +return DAS_GOTO; YY_BREAK case 60: YY_RULE_SETUP #line 378 "ds_lexer.lpp" -return DAS_PUBLIC; +return DAS_MODULE; YY_BREAK case 61: YY_RULE_SETUP #line 379 "ds_lexer.lpp" -return DAS_OPTIONS; +return DAS_PUBLIC; YY_BREAK case 62: YY_RULE_SETUP #line 380 "ds_lexer.lpp" -return DAS_OPERATOR; +return DAS_OPTIONS; YY_BREAK case 63: YY_RULE_SETUP #line 381 "ds_lexer.lpp" -return DAS_REQUIRE; +return DAS_OPERATOR; YY_BREAK case 64: YY_RULE_SETUP #line 382 "ds_lexer.lpp" -return DAS_TBLOCK; +return DAS_REQUIRE; YY_BREAK case 65: YY_RULE_SETUP #line 383 "ds_lexer.lpp" -return DAS_TFUNCTION; +return DAS_TBLOCK; YY_BREAK case 66: YY_RULE_SETUP #line 384 "ds_lexer.lpp" -return DAS_TLAMBDA; +return DAS_TFUNCTION; YY_BREAK case 67: YY_RULE_SETUP #line 385 "ds_lexer.lpp" -return DAS_GENERATOR; +return DAS_TLAMBDA; YY_BREAK case 68: YY_RULE_SETUP #line 386 "ds_lexer.lpp" -return DAS_TTUPLE; +return DAS_GENERATOR; YY_BREAK case 69: YY_RULE_SETUP #line 387 "ds_lexer.lpp" -return DAS_TVARIANT; +return DAS_TTUPLE; YY_BREAK case 70: YY_RULE_SETUP #line 388 "ds_lexer.lpp" -return DAS_CONST; +return DAS_TVARIANT; YY_BREAK case 71: YY_RULE_SETUP #line 389 "ds_lexer.lpp" -return DAS_CONTINUE; +return DAS_CONST; YY_BREAK case 72: YY_RULE_SETUP #line 390 "ds_lexer.lpp" -return DAS_WHERE; +return DAS_CONTINUE; YY_BREAK case 73: YY_RULE_SETUP #line 391 "ds_lexer.lpp" -return DAS_CAST; +return DAS_WHERE; YY_BREAK case 74: YY_RULE_SETUP #line 392 "ds_lexer.lpp" -return DAS_UPCAST; +return DAS_CAST; YY_BREAK case 75: YY_RULE_SETUP #line 393 "ds_lexer.lpp" -return DAS_PASS; +return DAS_UPCAST; YY_BREAK case 76: YY_RULE_SETUP #line 394 "ds_lexer.lpp" -return DAS_REINTERPRET; +return DAS_PASS; YY_BREAK case 77: YY_RULE_SETUP #line 395 "ds_lexer.lpp" -return DAS_OVERRIDE; +return DAS_REINTERPRET; YY_BREAK case 78: YY_RULE_SETUP #line 396 "ds_lexer.lpp" -return DAS_SEALED; +return DAS_OVERRIDE; YY_BREAK case 79: YY_RULE_SETUP #line 397 "ds_lexer.lpp" -return DAS_ABSTRACT; +return DAS_SEALED; YY_BREAK case 80: YY_RULE_SETUP #line 398 "ds_lexer.lpp" -return DAS_EXPECT; +return DAS_ABSTRACT; YY_BREAK case 81: YY_RULE_SETUP #line 399 "ds_lexer.lpp" -return DAS_TABLE; +return DAS_EXPECT; YY_BREAK case 82: YY_RULE_SETUP #line 400 "ds_lexer.lpp" -return DAS_ARRAY; +return DAS_TABLE; YY_BREAK case 83: YY_RULE_SETUP #line 401 "ds_lexer.lpp" -return DAS_FIXED_ARRAY; +return DAS_ARRAY; YY_BREAK case 84: YY_RULE_SETUP #line 402 "ds_lexer.lpp" -return DAS_DEFAULT; +return DAS_FIXED_ARRAY; YY_BREAK case 85: YY_RULE_SETUP #line 403 "ds_lexer.lpp" -return DAS_ITERATOR; +return DAS_DEFAULT; YY_BREAK case 86: YY_RULE_SETUP #line 404 "ds_lexer.lpp" -return DAS_IN; +return DAS_ITERATOR; YY_BREAK case 87: YY_RULE_SETUP #line 405 "ds_lexer.lpp" -return DAS_IMPLICIT; +return DAS_IN; YY_BREAK case 88: YY_RULE_SETUP #line 406 "ds_lexer.lpp" -return DAS_EXPLICIT; +return DAS_IMPLICIT; YY_BREAK case 89: YY_RULE_SETUP #line 407 "ds_lexer.lpp" -return DAS_SHARED; +return DAS_EXPLICIT; YY_BREAK case 90: YY_RULE_SETUP #line 408 "ds_lexer.lpp" -return DAS_PRIVATE; +return DAS_SHARED; YY_BREAK case 91: YY_RULE_SETUP #line 409 "ds_lexer.lpp" -return DAS_SMART_PTR; +return DAS_PRIVATE; YY_BREAK case 92: YY_RULE_SETUP #line 410 "ds_lexer.lpp" +return DAS_SMART_PTR; + YY_BREAK +case 93: +YY_RULE_SETUP +#line 411 "ds_lexer.lpp" { unput('('); YYCOLUMN(yyextra->das_yycolumn--, "UNPUT ("); return DAS_UNSAFE; } YY_BREAK -case 93: -YY_RULE_SETUP -#line 415 "ds_lexer.lpp" -yyextra->das_need_oxford_comma = false; return DAS_UNSAFE; - YY_BREAK case 94: YY_RULE_SETUP #line 416 "ds_lexer.lpp" -return DAS_INSCOPE; +yyextra->das_need_oxford_comma = false; return DAS_UNSAFE; YY_BREAK case 95: YY_RULE_SETUP #line 417 "ds_lexer.lpp" -return DAS_STATIC; +return DAS_INSCOPE; YY_BREAK case 96: YY_RULE_SETUP #line 418 "ds_lexer.lpp" -return DAS_AS; +return DAS_STATIC; YY_BREAK case 97: YY_RULE_SETUP #line 419 "ds_lexer.lpp" -return DAS_IS; +return DAS_AS; YY_BREAK case 98: YY_RULE_SETUP #line 420 "ds_lexer.lpp" -return DAS_DEREF; +return DAS_IS; YY_BREAK case 99: YY_RULE_SETUP #line 421 "ds_lexer.lpp" -return DAS_ADDR; +return DAS_DEREF; YY_BREAK case 100: YY_RULE_SETUP #line 422 "ds_lexer.lpp" -return DAS_NULL; +return DAS_ADDR; YY_BREAK case 101: YY_RULE_SETUP #line 423 "ds_lexer.lpp" -return DAS_RETURN; +return DAS_NULL; YY_BREAK case 102: YY_RULE_SETUP #line 424 "ds_lexer.lpp" -return DAS_YIELD; +return DAS_RETURN; YY_BREAK case 103: YY_RULE_SETUP #line 425 "ds_lexer.lpp" -return DAS_BREAK; +return DAS_YIELD; YY_BREAK case 104: YY_RULE_SETUP #line 426 "ds_lexer.lpp" -return DAS_TYPEINFO; +return DAS_BREAK; YY_BREAK case 105: YY_RULE_SETUP #line 427 "ds_lexer.lpp" -return DAS_TYPE; +return DAS_TYPEINFO; YY_BREAK case 106: YY_RULE_SETUP #line 428 "ds_lexer.lpp" -return DAS_NEWT; +return DAS_TYPE; YY_BREAK case 107: YY_RULE_SETUP #line 429 "ds_lexer.lpp" -return DAS_DELETE; +return DAS_NEWT; YY_BREAK case 108: YY_RULE_SETUP #line 430 "ds_lexer.lpp" -return DAS_TRUE; +return DAS_DELETE; YY_BREAK case 109: YY_RULE_SETUP #line 431 "ds_lexer.lpp" -return DAS_FALSE; +return DAS_TRUE; YY_BREAK case 110: YY_RULE_SETUP #line 432 "ds_lexer.lpp" -return DAS_TAUTO; +return DAS_FALSE; YY_BREAK case 111: YY_RULE_SETUP #line 433 "ds_lexer.lpp" -return DAS_TBOOL; +return DAS_TAUTO; YY_BREAK case 112: YY_RULE_SETUP #line 434 "ds_lexer.lpp" -return DAS_TVOID; +return DAS_TBOOL; YY_BREAK case 113: YY_RULE_SETUP #line 435 "ds_lexer.lpp" -return DAS_TSTRING; +return DAS_TVOID; YY_BREAK case 114: YY_RULE_SETUP #line 436 "ds_lexer.lpp" -return DAS_TRANGE64; +return DAS_TSTRING; YY_BREAK case 115: YY_RULE_SETUP #line 437 "ds_lexer.lpp" -return DAS_TURANGE64; +return DAS_TRANGE64; YY_BREAK case 116: YY_RULE_SETUP #line 438 "ds_lexer.lpp" -return DAS_TRANGE; +return DAS_TURANGE64; YY_BREAK case 117: YY_RULE_SETUP #line 439 "ds_lexer.lpp" -return DAS_TURANGE; +return DAS_TRANGE; YY_BREAK case 118: YY_RULE_SETUP #line 440 "ds_lexer.lpp" -return DAS_TINT; +return DAS_TURANGE; YY_BREAK case 119: YY_RULE_SETUP #line 441 "ds_lexer.lpp" -return DAS_TINT8; +return DAS_TINT; YY_BREAK case 120: YY_RULE_SETUP #line 442 "ds_lexer.lpp" -return DAS_TINT16; +return DAS_TINT8; YY_BREAK case 121: YY_RULE_SETUP #line 443 "ds_lexer.lpp" -return DAS_TINT64; +return DAS_TINT16; YY_BREAK case 122: YY_RULE_SETUP #line 444 "ds_lexer.lpp" -return DAS_TINT2; +return DAS_TINT64; YY_BREAK case 123: YY_RULE_SETUP #line 445 "ds_lexer.lpp" -return DAS_TINT3; +return DAS_TINT2; YY_BREAK case 124: YY_RULE_SETUP #line 446 "ds_lexer.lpp" -return DAS_TINT4; +return DAS_TINT3; YY_BREAK case 125: YY_RULE_SETUP #line 447 "ds_lexer.lpp" -return DAS_TUINT; +return DAS_TINT4; YY_BREAK case 126: YY_RULE_SETUP #line 448 "ds_lexer.lpp" -return DAS_TBITFIELD; +return DAS_TUINT; YY_BREAK case 127: YY_RULE_SETUP #line 449 "ds_lexer.lpp" -return DAS_TUINT8; +return DAS_TBITFIELD; YY_BREAK case 128: YY_RULE_SETUP #line 450 "ds_lexer.lpp" -return DAS_TUINT16; +return DAS_TUINT8; YY_BREAK case 129: YY_RULE_SETUP #line 451 "ds_lexer.lpp" -return DAS_TUINT64; +return DAS_TUINT16; YY_BREAK case 130: YY_RULE_SETUP #line 452 "ds_lexer.lpp" -return DAS_TUINT2; +return DAS_TUINT64; YY_BREAK case 131: YY_RULE_SETUP #line 453 "ds_lexer.lpp" -return DAS_TUINT3; +return DAS_TUINT2; YY_BREAK case 132: YY_RULE_SETUP #line 454 "ds_lexer.lpp" -return DAS_TUINT4; +return DAS_TUINT3; YY_BREAK case 133: YY_RULE_SETUP #line 455 "ds_lexer.lpp" -return DAS_TDOUBLE; +return DAS_TUINT4; YY_BREAK case 134: YY_RULE_SETUP #line 456 "ds_lexer.lpp" -return DAS_TFLOAT; +return DAS_TDOUBLE; YY_BREAK case 135: YY_RULE_SETUP #line 457 "ds_lexer.lpp" -return DAS_TFLOAT2; +return DAS_TFLOAT; YY_BREAK case 136: YY_RULE_SETUP #line 458 "ds_lexer.lpp" -return DAS_TFLOAT3; +return DAS_TFLOAT2; YY_BREAK case 137: YY_RULE_SETUP #line 459 "ds_lexer.lpp" -return DAS_TFLOAT4; +return DAS_TFLOAT3; YY_BREAK case 138: YY_RULE_SETUP #line 460 "ds_lexer.lpp" +return DAS_TFLOAT4; + YY_BREAK +case 139: +YY_RULE_SETUP +#line 461 "ds_lexer.lpp" { auto it = yyextra->das_keywords.find(yytext); if ( it != yyextra->das_keywords.end() ) { @@ -2623,122 +2628,122 @@ YY_RULE_SETUP return NAME; } YY_BREAK -case 139: +case 140: YY_RULE_SETUP -#line 472 "ds_lexer.lpp" +#line 473 "ds_lexer.lpp" { BEGIN(strb); return BEGIN_STRING; } YY_BREAK -case 140: -YY_RULE_SETUP -#line 476 "ds_lexer.lpp" -yylval_param->ui = 8; return UNSIGNED_INT8; - YY_BREAK case 141: YY_RULE_SETUP #line 477 "ds_lexer.lpp" -yylval_param->ui = 9; return UNSIGNED_INT8; +yylval_param->ui = 8; return UNSIGNED_INT8; YY_BREAK case 142: YY_RULE_SETUP #line 478 "ds_lexer.lpp" -yylval_param->ui = 10; return UNSIGNED_INT8; +yylval_param->ui = 9; return UNSIGNED_INT8; YY_BREAK case 143: YY_RULE_SETUP #line 479 "ds_lexer.lpp" -yylval_param->ui = 12; return UNSIGNED_INT8; +yylval_param->ui = 10; return UNSIGNED_INT8; YY_BREAK case 144: YY_RULE_SETUP #line 480 "ds_lexer.lpp" -yylval_param->ui = 13; return UNSIGNED_INT8; +yylval_param->ui = 12; return UNSIGNED_INT8; YY_BREAK case 145: YY_RULE_SETUP #line 481 "ds_lexer.lpp" -yylval_param->ui = '\\'; return UNSIGNED_INT8; +yylval_param->ui = 13; return UNSIGNED_INT8; YY_BREAK case 146: YY_RULE_SETUP #line 482 "ds_lexer.lpp" -yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INT8; +yylval_param->ui = '\\'; return UNSIGNED_INT8; YY_BREAK case 147: YY_RULE_SETUP -#line 484 "ds_lexer.lpp" -yylval_param->ui = 8; return UNSIGNED_INTEGER; +#line 483 "ds_lexer.lpp" +yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INT8; YY_BREAK case 148: YY_RULE_SETUP #line 485 "ds_lexer.lpp" -yylval_param->ui = 9; return UNSIGNED_INTEGER; +yylval_param->ui = 8; return UNSIGNED_INTEGER; YY_BREAK case 149: YY_RULE_SETUP #line 486 "ds_lexer.lpp" -yylval_param->ui = 10; return UNSIGNED_INTEGER; +yylval_param->ui = 9; return UNSIGNED_INTEGER; YY_BREAK case 150: YY_RULE_SETUP #line 487 "ds_lexer.lpp" -yylval_param->ui = 12; return UNSIGNED_INTEGER; +yylval_param->ui = 10; return UNSIGNED_INTEGER; YY_BREAK case 151: YY_RULE_SETUP #line 488 "ds_lexer.lpp" -yylval_param->ui = 13; return UNSIGNED_INTEGER; +yylval_param->ui = 12; return UNSIGNED_INTEGER; YY_BREAK case 152: YY_RULE_SETUP #line 489 "ds_lexer.lpp" -yylval_param->ui = '\\'; return UNSIGNED_INTEGER; +yylval_param->ui = 13; return UNSIGNED_INTEGER; YY_BREAK case 153: YY_RULE_SETUP #line 490 "ds_lexer.lpp" -yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INTEGER; +yylval_param->ui = '\\'; return UNSIGNED_INTEGER; YY_BREAK case 154: YY_RULE_SETUP -#line 492 "ds_lexer.lpp" -yylval_param->i = 8; return INTEGER; +#line 491 "ds_lexer.lpp" +yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INTEGER; YY_BREAK case 155: YY_RULE_SETUP #line 493 "ds_lexer.lpp" -yylval_param->i = 9; return INTEGER; +yylval_param->i = 8; return INTEGER; YY_BREAK case 156: YY_RULE_SETUP #line 494 "ds_lexer.lpp" -yylval_param->i = 10; return INTEGER; +yylval_param->i = 9; return INTEGER; YY_BREAK case 157: YY_RULE_SETUP #line 495 "ds_lexer.lpp" -yylval_param->i = 12; return INTEGER; +yylval_param->i = 10; return INTEGER; YY_BREAK case 158: YY_RULE_SETUP #line 496 "ds_lexer.lpp" -yylval_param->i = 13; return INTEGER; +yylval_param->i = 12; return INTEGER; YY_BREAK case 159: YY_RULE_SETUP #line 497 "ds_lexer.lpp" -yylval_param->i = '\\'; return INTEGER; +yylval_param->i = 13; return INTEGER; YY_BREAK case 160: YY_RULE_SETUP -#line 499 "ds_lexer.lpp" -yylval_param->i = int32_t(yytext[1]); return INTEGER; +#line 498 "ds_lexer.lpp" +yylval_param->i = '\\'; return INTEGER; YY_BREAK case 161: YY_RULE_SETUP #line 500 "ds_lexer.lpp" +yylval_param->i = int32_t(yytext[1]); return INTEGER; + YY_BREAK +case 162: +YY_RULE_SETUP +#line 501 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2751,9 +2756,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 162: +case 163: YY_RULE_SETUP -#line 511 "ds_lexer.lpp" +#line 512 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2766,9 +2771,9 @@ YY_RULE_SETUP return LONG_INTEGER; } YY_BREAK -case 163: +case 164: YY_RULE_SETUP -#line 522 "ds_lexer.lpp" +#line 523 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2783,9 +2788,9 @@ YY_RULE_SETUP return UNSIGNED_INT8; } YY_BREAK -case 164: +case 165: YY_RULE_SETUP -#line 535 "ds_lexer.lpp" +#line 536 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2798,9 +2803,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 165: +case 166: YY_RULE_SETUP -#line 546 "ds_lexer.lpp" +#line 547 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2817,9 +2822,9 @@ YY_RULE_SETUP return INTEGER; } YY_BREAK -case 166: +case 167: YY_RULE_SETUP -#line 561 "ds_lexer.lpp" +#line 562 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2832,9 +2837,9 @@ YY_RULE_SETUP return INTEGER; } YY_BREAK -case 167: +case 168: YY_RULE_SETUP -#line 572 "ds_lexer.lpp" +#line 573 "ds_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2847,9 +2852,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 168: +case 169: YY_RULE_SETUP -#line 583 "ds_lexer.lpp" +#line 584 "ds_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2862,9 +2867,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 169: +case 170: YY_RULE_SETUP -#line 594 "ds_lexer.lpp" +#line 595 "ds_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2889,9 +2894,9 @@ YY_RULE_SETUP } } YY_BREAK -case 170: +case 171: YY_RULE_SETUP -#line 617 "ds_lexer.lpp" +#line 618 "ds_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2904,9 +2909,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 171: +case 172: YY_RULE_SETUP -#line 628 "ds_lexer.lpp" +#line 629 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2917,9 +2922,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 172: +case 173: YY_RULE_SETUP -#line 637 "ds_lexer.lpp" +#line 638 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2931,9 +2936,9 @@ YY_RULE_SETUP } YY_BREAK -case 173: +case 174: YY_RULE_SETUP -#line 647 "ds_lexer.lpp" +#line 648 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2944,9 +2949,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 174: +case 175: YY_RULE_SETUP -#line 656 "ds_lexer.lpp" +#line 657 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2957,9 +2962,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 175: +case 176: YY_RULE_SETUP -#line 665 "ds_lexer.lpp" +#line 666 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2970,9 +2975,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 176: +case 177: YY_RULE_SETUP -#line 674 "ds_lexer.lpp" +#line 675 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2983,9 +2988,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 177: +case 178: YY_RULE_SETUP -#line 683 "ds_lexer.lpp" +#line 684 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2996,9 +3001,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 178: +case 179: YY_RULE_SETUP -#line 692 "ds_lexer.lpp" +#line 693 "ds_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -3009,9 +3014,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 179: +case 180: YY_RULE_SETUP -#line 701 "ds_lexer.lpp" +#line 702 "ds_lexer.lpp" { if ( !yyextra->das_nested_parentheses ) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching parentheses", CompilationError::mismatching_parentheses); @@ -3021,17 +3026,17 @@ YY_RULE_SETUP return ')'; } YY_BREAK -case 180: +case 181: YY_RULE_SETUP -#line 709 "ds_lexer.lpp" +#line 710 "ds_lexer.lpp" { yyextra->das_nested_parentheses ++; return '('; } YY_BREAK -case 181: +case 182: YY_RULE_SETUP -#line 713 "ds_lexer.lpp" +#line 714 "ds_lexer.lpp" { if ( !yyextra->das_nested_square_braces ) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -3041,17 +3046,17 @@ YY_RULE_SETUP return ']'; } YY_BREAK -case 182: +case 183: YY_RULE_SETUP -#line 721 "ds_lexer.lpp" +#line 722 "ds_lexer.lpp" { yyextra->das_nested_square_braces ++; return '['; } YY_BREAK -case 183: +case 184: YY_RULE_SETUP -#line 725 "ds_lexer.lpp" +#line 726 "ds_lexer.lpp" { if ( yyextra->das_nested_sb ) { yyextra->das_nested_sb --; @@ -3071,9 +3076,9 @@ YY_RULE_SETUP } } YY_BREAK -case 184: +case 185: YY_RULE_SETUP -#line 743 "ds_lexer.lpp" +#line 744 "ds_lexer.lpp" { if ( yyextra->das_nested_sb ) { yyextra->das_nested_sb ++; @@ -3083,30 +3088,30 @@ YY_RULE_SETUP return '{'; } YY_BREAK -case 185: -YY_RULE_SETUP -#line 751 "ds_lexer.lpp" -return COLCOL; - YY_BREAK case 186: YY_RULE_SETUP #line 752 "ds_lexer.lpp" -return MTAG_DOTDOTDOT; +return COLCOL; YY_BREAK case 187: YY_RULE_SETUP #line 753 "ds_lexer.lpp" -return DOTDOT; +return MTAG_DOTDOTDOT; YY_BREAK case 188: YY_RULE_SETUP #line 754 "ds_lexer.lpp" -return RPIPE; +return DOTDOT; YY_BREAK case 189: -/* rule 189 can match eol */ YY_RULE_SETUP #line 755 "ds_lexer.lpp" +return RPIPE; + YY_BREAK +case 190: +/* rule 190 can match eol */ +YY_RULE_SETUP +#line 756 "ds_lexer.lpp" { yyextra->das_need_oxford_comma = false; unput('\n'); @@ -3114,15 +3119,15 @@ YY_RULE_SETUP return LBPIPE; } YY_BREAK -case 190: -/* rule 190 can match eol */ +case 191: +/* rule 191 can match eol */ YY_RULE_SETUP -#line 761 "ds_lexer.lpp" +#line 762 "ds_lexer.lpp" yyextra->das_need_oxford_comma = false; unput('\n'); return LBPIPE; YY_BREAK -case 191: +case 192: YY_RULE_SETUP -#line 762 "ds_lexer.lpp" +#line 763 "ds_lexer.lpp" { unput('$'); YYCOLUMN(yyextra->das_yycolumn--, "UNPUT $"); @@ -3134,9 +3139,9 @@ YY_RULE_SETUP } } YY_BREAK -case 192: +case 193: YY_RULE_SETUP -#line 772 "ds_lexer.lpp" +#line 773 "ds_lexer.lpp" { unput('@'); YYCOLUMN(yyextra->das_yycolumn--, "UNPUT @"); @@ -3148,9 +3153,9 @@ YY_RULE_SETUP } } YY_BREAK -case 193: +case 194: YY_RULE_SETUP -#line 782 "ds_lexer.lpp" +#line 783 "ds_lexer.lpp" { unput('@'); unput('@'); @@ -3163,9 +3168,9 @@ YY_RULE_SETUP } } YY_BREAK -case 194: +case 195: YY_RULE_SETUP -#line 793 "ds_lexer.lpp" +#line 794 "ds_lexer.lpp" { unput('@'); YYCOLUMN(yyextra->das_yycolumn--, "UNPUT @"); @@ -3177,9 +3182,9 @@ YY_RULE_SETUP } } YY_BREAK -case 195: +case 196: YY_RULE_SETUP -#line 803 "ds_lexer.lpp" +#line 804 "ds_lexer.lpp" { unput('$'); YYCOLUMN(yyextra->das_yycolumn--, "UNPUT $"); @@ -3191,200 +3196,200 @@ YY_RULE_SETUP } } YY_BREAK -case 196: -YY_RULE_SETUP -#line 813 "ds_lexer.lpp" -return LPIPE; - YY_BREAK case 197: YY_RULE_SETUP #line 814 "ds_lexer.lpp" -return MTAG_E; +return LPIPE; YY_BREAK case 198: -/* rule 198 can match eol */ YY_RULE_SETUP #line 815 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_E; +return MTAG_E; YY_BREAK case 199: /* rule 199 can match eol */ YY_RULE_SETUP #line 816 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_I; +unput(yytext[yyleng-1]); return MTAG_E; YY_BREAK case 200: /* rule 200 can match eol */ YY_RULE_SETUP #line 817 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_V; +unput(yytext[yyleng-1]); return MTAG_I; YY_BREAK case 201: /* rule 201 can match eol */ YY_RULE_SETUP #line 818 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_B; +unput(yytext[yyleng-1]); return MTAG_V; YY_BREAK case 202: /* rule 202 can match eol */ YY_RULE_SETUP #line 819 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_A; +unput(yytext[yyleng-1]); return MTAG_B; YY_BREAK case 203: /* rule 203 can match eol */ YY_RULE_SETUP #line 820 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_T; +unput(yytext[yyleng-1]); return MTAG_A; YY_BREAK case 204: /* rule 204 can match eol */ YY_RULE_SETUP #line 821 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_C; +unput(yytext[yyleng-1]); return MTAG_T; YY_BREAK case 205: /* rule 205 can match eol */ YY_RULE_SETUP #line 822 "ds_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_F; +unput(yytext[yyleng-1]); return MTAG_C; YY_BREAK case 206: +/* rule 206 can match eol */ YY_RULE_SETUP #line 823 "ds_lexer.lpp" -return QQ; +unput(yytext[yyleng-1]); return MTAG_F; YY_BREAK case 207: YY_RULE_SETUP #line 824 "ds_lexer.lpp" +return QQ; + YY_BREAK +case 208: +YY_RULE_SETUP +#line 825 "ds_lexer.lpp" { yyextra->das_nested_square_braces ++; return QBRA; } YY_BREAK -case 208: -YY_RULE_SETUP -#line 828 "ds_lexer.lpp" -return QDOT; - YY_BREAK case 209: YY_RULE_SETUP #line 829 "ds_lexer.lpp" -return CLONEEQU; +return QDOT; YY_BREAK case 210: YY_RULE_SETUP #line 830 "ds_lexer.lpp" -return RARROW; +return CLONEEQU; YY_BREAK case 211: YY_RULE_SETUP #line 831 "ds_lexer.lpp" -return LARROW; +return RARROW; YY_BREAK case 212: YY_RULE_SETUP #line 832 "ds_lexer.lpp" -return ADDEQU; +return LARROW; YY_BREAK case 213: YY_RULE_SETUP #line 833 "ds_lexer.lpp" -return SUBEQU; +return ADDEQU; YY_BREAK case 214: YY_RULE_SETUP #line 834 "ds_lexer.lpp" -return DIVEQU; +return SUBEQU; YY_BREAK case 215: YY_RULE_SETUP #line 835 "ds_lexer.lpp" -return MULEQU; +return DIVEQU; YY_BREAK case 216: YY_RULE_SETUP #line 836 "ds_lexer.lpp" -return MODEQU; +return MULEQU; YY_BREAK case 217: YY_RULE_SETUP #line 837 "ds_lexer.lpp" -return ANDANDEQU; +return MODEQU; YY_BREAK case 218: YY_RULE_SETUP #line 838 "ds_lexer.lpp" -return OROREQU; +return ANDANDEQU; YY_BREAK case 219: YY_RULE_SETUP #line 839 "ds_lexer.lpp" -return XORXOREQU; +return OROREQU; YY_BREAK case 220: YY_RULE_SETUP #line 840 "ds_lexer.lpp" -return ANDAND; +return XORXOREQU; YY_BREAK case 221: YY_RULE_SETUP #line 841 "ds_lexer.lpp" -return OROR; +return ANDAND; YY_BREAK case 222: YY_RULE_SETUP #line 842 "ds_lexer.lpp" -return XORXOR; +return OROR; YY_BREAK case 223: YY_RULE_SETUP #line 843 "ds_lexer.lpp" -return ANDEQU; +return XORXOR; YY_BREAK case 224: YY_RULE_SETUP #line 844 "ds_lexer.lpp" -return OREQU; +return ANDEQU; YY_BREAK case 225: YY_RULE_SETUP #line 845 "ds_lexer.lpp" -return XOREQU; +return OREQU; YY_BREAK case 226: YY_RULE_SETUP #line 846 "ds_lexer.lpp" -return ADDADD; +return XOREQU; YY_BREAK case 227: YY_RULE_SETUP #line 847 "ds_lexer.lpp" -return SUBSUB; +return ADDADD; YY_BREAK case 228: YY_RULE_SETUP #line 848 "ds_lexer.lpp" -return LEEQU; +return SUBSUB; YY_BREAK case 229: YY_RULE_SETUP #line 849 "ds_lexer.lpp" -return GREQU; +return LEEQU; YY_BREAK case 230: YY_RULE_SETUP #line 850 "ds_lexer.lpp" -return EQUEQU; +return GREQU; YY_BREAK case 231: YY_RULE_SETUP #line 851 "ds_lexer.lpp" -return NOTEQU; +return EQUEQU; YY_BREAK case 232: YY_RULE_SETUP #line 852 "ds_lexer.lpp" +return NOTEQU; + YY_BREAK +case 233: +YY_RULE_SETUP +#line 853 "ds_lexer.lpp" { if ( yyextra->das_arrow_depth ) { unput('>'); @@ -3396,9 +3401,9 @@ YY_RULE_SETUP } } YY_BREAK -case 233: +case 234: YY_RULE_SETUP -#line 862 "ds_lexer.lpp" +#line 863 "ds_lexer.lpp" { if ( yyextra->das_arrow_depth ) { unput('>'); @@ -3409,44 +3414,44 @@ YY_RULE_SETUP } } YY_BREAK -case 234: -YY_RULE_SETUP -#line 871 "ds_lexer.lpp" -return ROTL; - YY_BREAK case 235: YY_RULE_SETUP #line 872 "ds_lexer.lpp" -return SHL; +return ROTL; YY_BREAK case 236: YY_RULE_SETUP #line 873 "ds_lexer.lpp" -return SHREQU; +return SHL; YY_BREAK case 237: YY_RULE_SETUP #line 874 "ds_lexer.lpp" -return SHLEQU; +return SHREQU; YY_BREAK case 238: YY_RULE_SETUP #line 875 "ds_lexer.lpp" -return ROTREQU; +return SHLEQU; YY_BREAK case 239: YY_RULE_SETUP #line 876 "ds_lexer.lpp" -return ROTLEQU; +return ROTREQU; YY_BREAK case 240: YY_RULE_SETUP #line 877 "ds_lexer.lpp" -return MAPTO; +return ROTLEQU; YY_BREAK case 241: YY_RULE_SETUP #line 878 "ds_lexer.lpp" +return MAPTO; + YY_BREAK +case 242: +YY_RULE_SETUP +#line 879 "ds_lexer.lpp" { if ( yyextra->das_gen2_make_syntax ) { yyextra->das_nested_square_braces ++; @@ -3459,9 +3464,9 @@ YY_RULE_SETUP } } YY_BREAK -case 242: +case 243: YY_RULE_SETUP -#line 889 "ds_lexer.lpp" +#line 890 "ds_lexer.lpp" { if ( yyextra->das_gen2_make_syntax ) { yyextra->das_nested_square_braces ++; @@ -3474,9 +3479,9 @@ YY_RULE_SETUP } } YY_BREAK -case 243: +case 244: YY_RULE_SETUP -#line 900 "ds_lexer.lpp" +#line 901 "ds_lexer.lpp" { if ( yyextra->das_gen2_make_syntax ) { yyextra->das_nested_curly_braces ++; @@ -3489,22 +3494,22 @@ YY_RULE_SETUP } } YY_BREAK -case 244: +case 245: YY_RULE_SETUP -#line 911 "ds_lexer.lpp" +#line 912 "ds_lexer.lpp" /* skip white space */ YY_BREAK -case 245: +case 246: YY_RULE_SETUP -#line 912 "ds_lexer.lpp" +#line 913 "ds_lexer.lpp" { YYTAB(); } YY_BREAK -case 246: -/* rule 246 can match eol */ +case 247: +/* rule 247 can match eol */ YY_RULE_SETUP -#line 916 "ds_lexer.lpp" +#line 917 "ds_lexer.lpp" { if ( yyextra->das_nested_curly_braces < 2 ) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3514,10 +3519,10 @@ YY_RULE_SETUP return SEMICOLON_CUR_CUR; } YY_BREAK -case 247: -/* rule 247 can match eol */ +case 248: +/* rule 248 can match eol */ YY_RULE_SETUP -#line 925 "ds_lexer.lpp" +#line 926 "ds_lexer.lpp" { if ( !yyextra->das_nested_curly_braces ) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3532,10 +3537,10 @@ YY_RULE_SETUP return SEMICOLON_CUR_SQR; } YY_BREAK -case 248: -/* rule 248 can match eol */ +case 249: +/* rule 249 can match eol */ YY_RULE_SETUP -#line 939 "ds_lexer.lpp" +#line 940 "ds_lexer.lpp" { if ( !yyextra->das_nested_curly_braces ) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3550,10 +3555,10 @@ YY_RULE_SETUP return COMMA_CUR_SQR; } YY_BREAK -case 249: -/* rule 249 can match eol */ +case 250: +/* rule 250 can match eol */ YY_RULE_SETUP -#line 953 "ds_lexer.lpp" +#line 954 "ds_lexer.lpp" { if ( yyextra->das_nested_square_braces < 2) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -3563,10 +3568,10 @@ YY_RULE_SETUP return SEMICOLON_SQR_SQR; } YY_BREAK -case 250: -/* rule 250 can match eol */ +case 251: +/* rule 251 can match eol */ YY_RULE_SETUP -#line 962 "ds_lexer.lpp" +#line 963 "ds_lexer.lpp" { if ( yyextra->das_nested_square_braces < 2) { das_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -3576,18 +3581,18 @@ YY_RULE_SETUP return COMMA_SQR_SQR; } YY_BREAK -case 251: -/* rule 251 can match eol */ +case 252: +/* rule 252 can match eol */ YY_RULE_SETUP -#line 970 "ds_lexer.lpp" +#line 971 "ds_lexer.lpp" { YYCOLUMN(yyextra->das_yycolumn = 0, "NEW LINE"); } YY_BREAK -case 252: -/* rule 252 can match eol */ +case 253: +/* rule 253 can match eol */ YY_RULE_SETUP -#line 973 "ds_lexer.lpp" +#line 974 "ds_lexer.lpp" { YYCOLUMN(yyextra->das_yycolumn = 0, "NEW LINE"); das_accept_cpp_comment(yyextra->g_CommentReaders, yyscanner, *yylloc_param, yytext); @@ -3610,7 +3615,7 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(normal): -#line 993 "ds_lexer.lpp" +#line 994 "ds_lexer.lpp" { if ( yyextra->g_FileAccessStack.size()==1 ) { YYCOLUMN(yyextra->das_yycolumn = 0,"EOF"); @@ -3636,17 +3641,17 @@ case YY_STATE_EOF(normal): } } YY_BREAK -case 253: +case 254: YY_RULE_SETUP -#line 1017 "ds_lexer.lpp" +#line 1018 "ds_lexer.lpp" return *yytext; YY_BREAK -case 254: +case 255: YY_RULE_SETUP -#line 1019 "ds_lexer.lpp" +#line 1020 "ds_lexer.lpp" ECHO; YY_BREAK -#line 3649 "ds_lexer.cpp" +#line 3654 "ds_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(include): yyterminate(); @@ -3947,7 +3952,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 723 ) + if ( yy_current_state >= 728 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3976,11 +3981,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 723 ) + if ( yy_current_state >= 728 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 722); + yy_is_jam = (yy_current_state == 727); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4840,7 +4845,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 1019 "ds_lexer.lpp" +#line 1020 "ds_lexer.lpp" void das_accept_sequence ( yyscan_t yyscanner, const char * seq, size_t seqLen, int lineNo, FileInfo * info ) { diff --git a/prog/1stPartyLibs/daScript/src/parser/ds_lexer.lpp b/prog/1stPartyLibs/daScript/src/parser/ds_lexer.lpp index 522165ad9..818f9a5bd 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds_lexer.lpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds_lexer.lpp @@ -338,6 +338,7 @@ void das_accept_cpp_comment ( vector & crdi, yyscan_t scanner, } "include" BEGIN(include); +"capture" return DAS_CAPTURE; "for" /* yyextra->das_need_oxford_comma = false; */ return DAS_FOR; "while" yyextra->das_need_oxford_comma = false; return DAS_WHILE; "if" yyextra->das_need_oxford_comma = false; return DAS_IF; diff --git a/prog/1stPartyLibs/daScript/src/parser/ds_parser.cpp b/prog/1stPartyLibs/daScript/src/parser/ds_parser.cpp index 5541fdb79..4abe58352 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds_parser.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds_parser.cpp @@ -139,513 +139,514 @@ enum yysymbol_kind_t YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_LEXER_ERROR = 3, /* "lexer error" */ - YYSYMBOL_DAS_STRUCT = 4, /* "struct" */ - YYSYMBOL_DAS_CLASS = 5, /* "class" */ - YYSYMBOL_DAS_LET = 6, /* "let" */ - YYSYMBOL_DAS_DEF = 7, /* "def" */ - YYSYMBOL_DAS_WHILE = 8, /* "while" */ - YYSYMBOL_DAS_IF = 9, /* "if" */ - YYSYMBOL_DAS_STATIC_IF = 10, /* "static_if" */ - YYSYMBOL_DAS_ELSE = 11, /* "else" */ - YYSYMBOL_DAS_FOR = 12, /* "for" */ - YYSYMBOL_DAS_CATCH = 13, /* "recover" */ - YYSYMBOL_DAS_TRUE = 14, /* "true" */ - YYSYMBOL_DAS_FALSE = 15, /* "false" */ - YYSYMBOL_DAS_NEWT = 16, /* "new" */ - YYSYMBOL_DAS_TYPEINFO = 17, /* "typeinfo" */ - YYSYMBOL_DAS_TYPE = 18, /* "type" */ - YYSYMBOL_DAS_IN = 19, /* "in" */ - YYSYMBOL_DAS_IS = 20, /* "is" */ - YYSYMBOL_DAS_AS = 21, /* "as" */ - YYSYMBOL_DAS_ELIF = 22, /* "elif" */ - YYSYMBOL_DAS_STATIC_ELIF = 23, /* "static_elif" */ - YYSYMBOL_DAS_ARRAY = 24, /* "array" */ - YYSYMBOL_DAS_RETURN = 25, /* "return" */ - YYSYMBOL_DAS_NULL = 26, /* "null" */ - YYSYMBOL_DAS_BREAK = 27, /* "break" */ - YYSYMBOL_DAS_TRY = 28, /* "try" */ - YYSYMBOL_DAS_OPTIONS = 29, /* "options" */ - YYSYMBOL_DAS_TABLE = 30, /* "table" */ - YYSYMBOL_DAS_EXPECT = 31, /* "expect" */ - YYSYMBOL_DAS_CONST = 32, /* "const" */ - YYSYMBOL_DAS_REQUIRE = 33, /* "require" */ - YYSYMBOL_DAS_OPERATOR = 34, /* "operator" */ - YYSYMBOL_DAS_ENUM = 35, /* "enum" */ - YYSYMBOL_DAS_FINALLY = 36, /* "finally" */ - YYSYMBOL_DAS_DELETE = 37, /* "delete" */ - YYSYMBOL_DAS_DEREF = 38, /* "deref" */ - YYSYMBOL_DAS_TYPEDEF = 39, /* "typedef" */ - YYSYMBOL_DAS_TYPEDECL = 40, /* "typedecl" */ - YYSYMBOL_DAS_WITH = 41, /* "with" */ - YYSYMBOL_DAS_AKA = 42, /* "aka" */ - YYSYMBOL_DAS_ASSUME = 43, /* "assume" */ - YYSYMBOL_DAS_CAST = 44, /* "cast" */ - YYSYMBOL_DAS_OVERRIDE = 45, /* "override" */ - YYSYMBOL_DAS_ABSTRACT = 46, /* "abstract" */ - YYSYMBOL_DAS_UPCAST = 47, /* "upcast" */ - YYSYMBOL_DAS_ITERATOR = 48, /* "iterator" */ - YYSYMBOL_DAS_VAR = 49, /* "var" */ - YYSYMBOL_DAS_ADDR = 50, /* "addr" */ - YYSYMBOL_DAS_CONTINUE = 51, /* "continue" */ - YYSYMBOL_DAS_WHERE = 52, /* "where" */ - YYSYMBOL_DAS_PASS = 53, /* "pass" */ - YYSYMBOL_DAS_REINTERPRET = 54, /* "reinterpret" */ - YYSYMBOL_DAS_MODULE = 55, /* "module" */ - YYSYMBOL_DAS_PUBLIC = 56, /* "public" */ - YYSYMBOL_DAS_LABEL = 57, /* "label" */ - YYSYMBOL_DAS_GOTO = 58, /* "goto" */ - YYSYMBOL_DAS_IMPLICIT = 59, /* "implicit" */ - YYSYMBOL_DAS_EXPLICIT = 60, /* "explicit" */ - YYSYMBOL_DAS_SHARED = 61, /* "shared" */ - YYSYMBOL_DAS_PRIVATE = 62, /* "private" */ - YYSYMBOL_DAS_SMART_PTR = 63, /* "smart_ptr" */ - YYSYMBOL_DAS_UNSAFE = 64, /* "unsafe" */ - YYSYMBOL_DAS_INSCOPE = 65, /* "inscope" */ - YYSYMBOL_DAS_STATIC = 66, /* "static" */ - YYSYMBOL_DAS_FIXED_ARRAY = 67, /* "fixed_array" */ - YYSYMBOL_DAS_DEFAULT = 68, /* "default" */ - YYSYMBOL_DAS_UNINITIALIZED = 69, /* "uninitialized" */ - YYSYMBOL_DAS_TBOOL = 70, /* "bool" */ - YYSYMBOL_DAS_TVOID = 71, /* "void" */ - YYSYMBOL_DAS_TSTRING = 72, /* "string" */ - YYSYMBOL_DAS_TAUTO = 73, /* "auto" */ - YYSYMBOL_DAS_TINT = 74, /* "int" */ - YYSYMBOL_DAS_TINT2 = 75, /* "int2" */ - YYSYMBOL_DAS_TINT3 = 76, /* "int3" */ - YYSYMBOL_DAS_TINT4 = 77, /* "int4" */ - YYSYMBOL_DAS_TUINT = 78, /* "uint" */ - YYSYMBOL_DAS_TBITFIELD = 79, /* "bitfield" */ - YYSYMBOL_DAS_TUINT2 = 80, /* "uint2" */ - YYSYMBOL_DAS_TUINT3 = 81, /* "uint3" */ - YYSYMBOL_DAS_TUINT4 = 82, /* "uint4" */ - YYSYMBOL_DAS_TFLOAT = 83, /* "float" */ - YYSYMBOL_DAS_TFLOAT2 = 84, /* "float2" */ - YYSYMBOL_DAS_TFLOAT3 = 85, /* "float3" */ - YYSYMBOL_DAS_TFLOAT4 = 86, /* "float4" */ - YYSYMBOL_DAS_TRANGE = 87, /* "range" */ - YYSYMBOL_DAS_TURANGE = 88, /* "urange" */ - YYSYMBOL_DAS_TRANGE64 = 89, /* "range64" */ - YYSYMBOL_DAS_TURANGE64 = 90, /* "urange64" */ - YYSYMBOL_DAS_TBLOCK = 91, /* "block" */ - YYSYMBOL_DAS_TINT64 = 92, /* "int64" */ - YYSYMBOL_DAS_TUINT64 = 93, /* "uint64" */ - YYSYMBOL_DAS_TDOUBLE = 94, /* "double" */ - YYSYMBOL_DAS_TFUNCTION = 95, /* "function" */ - YYSYMBOL_DAS_TLAMBDA = 96, /* "lambda" */ - YYSYMBOL_DAS_TINT8 = 97, /* "int8" */ - YYSYMBOL_DAS_TUINT8 = 98, /* "uint8" */ - YYSYMBOL_DAS_TINT16 = 99, /* "int16" */ - YYSYMBOL_DAS_TUINT16 = 100, /* "uint16" */ - YYSYMBOL_DAS_TTUPLE = 101, /* "tuple" */ - YYSYMBOL_DAS_TVARIANT = 102, /* "variant" */ - YYSYMBOL_DAS_GENERATOR = 103, /* "generator" */ - YYSYMBOL_DAS_YIELD = 104, /* "yield" */ - YYSYMBOL_DAS_SEALED = 105, /* "sealed" */ - YYSYMBOL_ADDEQU = 106, /* "+=" */ - YYSYMBOL_SUBEQU = 107, /* "-=" */ - YYSYMBOL_DIVEQU = 108, /* "/=" */ - YYSYMBOL_MULEQU = 109, /* "*=" */ - YYSYMBOL_MODEQU = 110, /* "%=" */ - YYSYMBOL_ANDEQU = 111, /* "&=" */ - YYSYMBOL_OREQU = 112, /* "|=" */ - YYSYMBOL_XOREQU = 113, /* "^=" */ - YYSYMBOL_SHL = 114, /* "<<" */ - YYSYMBOL_SHR = 115, /* ">>" */ - YYSYMBOL_ADDADD = 116, /* "++" */ - YYSYMBOL_SUBSUB = 117, /* "--" */ - YYSYMBOL_LEEQU = 118, /* "<=" */ - YYSYMBOL_SHLEQU = 119, /* "<<=" */ - YYSYMBOL_SHREQU = 120, /* ">>=" */ - YYSYMBOL_GREQU = 121, /* ">=" */ - YYSYMBOL_EQUEQU = 122, /* "==" */ - YYSYMBOL_NOTEQU = 123, /* "!=" */ - YYSYMBOL_RARROW = 124, /* "->" */ - YYSYMBOL_LARROW = 125, /* "<-" */ - YYSYMBOL_QQ = 126, /* "??" */ - YYSYMBOL_QDOT = 127, /* "?." */ - YYSYMBOL_QBRA = 128, /* "?[" */ - YYSYMBOL_LPIPE = 129, /* "<|" */ - YYSYMBOL_LBPIPE = 130, /* " <|" */ - YYSYMBOL_LLPIPE = 131, /* "$ <|" */ - YYSYMBOL_LAPIPE = 132, /* "@ <|" */ - YYSYMBOL_LFPIPE = 133, /* "@@ <|" */ - YYSYMBOL_RPIPE = 134, /* "|>" */ - YYSYMBOL_CLONEEQU = 135, /* ":=" */ - YYSYMBOL_ROTL = 136, /* "<<<" */ - YYSYMBOL_ROTR = 137, /* ">>>" */ - YYSYMBOL_ROTLEQU = 138, /* "<<<=" */ - YYSYMBOL_ROTREQU = 139, /* ">>>=" */ - YYSYMBOL_MAPTO = 140, /* "=>" */ - YYSYMBOL_COLCOL = 141, /* "::" */ - YYSYMBOL_ANDAND = 142, /* "&&" */ - YYSYMBOL_OROR = 143, /* "||" */ - YYSYMBOL_XORXOR = 144, /* "^^" */ - YYSYMBOL_ANDANDEQU = 145, /* "&&=" */ - YYSYMBOL_OROREQU = 146, /* "||=" */ - YYSYMBOL_XORXOREQU = 147, /* "^^=" */ - YYSYMBOL_DOTDOT = 148, /* ".." */ - YYSYMBOL_MTAG_E = 149, /* "$$" */ - YYSYMBOL_MTAG_I = 150, /* "$i" */ - YYSYMBOL_MTAG_V = 151, /* "$v" */ - YYSYMBOL_MTAG_B = 152, /* "$b" */ - YYSYMBOL_MTAG_A = 153, /* "$a" */ - YYSYMBOL_MTAG_T = 154, /* "$t" */ - YYSYMBOL_MTAG_C = 155, /* "$c" */ - YYSYMBOL_MTAG_F = 156, /* "$f" */ - YYSYMBOL_MTAG_DOTDOTDOT = 157, /* "..." */ - YYSYMBOL_BRABRAB = 158, /* "[[" */ - YYSYMBOL_BRACBRB = 159, /* "[{" */ - YYSYMBOL_CBRCBRB = 160, /* "{{" */ - YYSYMBOL_INTEGER = 161, /* "integer constant" */ - YYSYMBOL_LONG_INTEGER = 162, /* "long integer constant" */ - YYSYMBOL_UNSIGNED_INTEGER = 163, /* "unsigned integer constant" */ - YYSYMBOL_UNSIGNED_LONG_INTEGER = 164, /* "unsigned long integer constant" */ - YYSYMBOL_UNSIGNED_INT8 = 165, /* "unsigned int8 constant" */ - YYSYMBOL_FLOAT = 166, /* "floating point constant" */ - YYSYMBOL_DOUBLE = 167, /* "double constant" */ - YYSYMBOL_NAME = 168, /* "name" */ - YYSYMBOL_KEYWORD = 169, /* "keyword" */ - YYSYMBOL_TYPE_FUNCTION = 170, /* "type function" */ - YYSYMBOL_BEGIN_STRING = 171, /* "start of the string" */ - YYSYMBOL_STRING_CHARACTER = 172, /* STRING_CHARACTER */ - YYSYMBOL_STRING_CHARACTER_ESC = 173, /* STRING_CHARACTER_ESC */ - YYSYMBOL_END_STRING = 174, /* "end of the string" */ - YYSYMBOL_BEGIN_STRING_EXPR = 175, /* "{" */ - YYSYMBOL_END_STRING_EXPR = 176, /* "}" */ - YYSYMBOL_END_OF_READ = 177, /* "end of failed eader macro" */ - YYSYMBOL_178_begin_of_code_block_ = 178, /* "begin of code block" */ - YYSYMBOL_179_end_of_code_block_ = 179, /* "end of code block" */ - YYSYMBOL_180_end_of_expression_ = 180, /* "end of expression" */ - YYSYMBOL_SEMICOLON_CUR_CUR = 181, /* ";}}" */ - YYSYMBOL_SEMICOLON_CUR_SQR = 182, /* ";}]" */ - YYSYMBOL_SEMICOLON_SQR_SQR = 183, /* ";]]" */ - YYSYMBOL_COMMA_SQR_SQR = 184, /* ",]]" */ - YYSYMBOL_COMMA_CUR_SQR = 185, /* ",}]" */ - YYSYMBOL_186_ = 186, /* ',' */ - YYSYMBOL_187_ = 187, /* '=' */ - YYSYMBOL_188_ = 188, /* '?' */ - YYSYMBOL_189_ = 189, /* ':' */ - YYSYMBOL_190_ = 190, /* '|' */ - YYSYMBOL_191_ = 191, /* '^' */ - YYSYMBOL_192_ = 192, /* '&' */ - YYSYMBOL_193_ = 193, /* '<' */ - YYSYMBOL_194_ = 194, /* '>' */ - YYSYMBOL_195_ = 195, /* '-' */ - YYSYMBOL_196_ = 196, /* '+' */ - YYSYMBOL_197_ = 197, /* '*' */ - YYSYMBOL_198_ = 198, /* '/' */ - YYSYMBOL_199_ = 199, /* '%' */ - YYSYMBOL_UNARY_MINUS = 200, /* UNARY_MINUS */ - YYSYMBOL_UNARY_PLUS = 201, /* UNARY_PLUS */ - YYSYMBOL_202_ = 202, /* '~' */ - YYSYMBOL_203_ = 203, /* '!' */ - YYSYMBOL_PRE_INC = 204, /* PRE_INC */ - YYSYMBOL_PRE_DEC = 205, /* PRE_DEC */ - YYSYMBOL_POST_INC = 206, /* POST_INC */ - YYSYMBOL_POST_DEC = 207, /* POST_DEC */ - YYSYMBOL_DEREF = 208, /* DEREF */ - YYSYMBOL_209_ = 209, /* '.' */ - YYSYMBOL_210_ = 210, /* '[' */ - YYSYMBOL_211_ = 211, /* ']' */ - YYSYMBOL_212_ = 212, /* '(' */ - YYSYMBOL_213_ = 213, /* ')' */ - YYSYMBOL_214_ = 214, /* '$' */ - YYSYMBOL_215_ = 215, /* '@' */ - YYSYMBOL_216_ = 216, /* '#' */ - YYSYMBOL_YYACCEPT = 217, /* $accept */ - YYSYMBOL_program = 218, /* program */ - YYSYMBOL_top_level_reader_macro = 219, /* top_level_reader_macro */ - YYSYMBOL_optional_public_or_private_module = 220, /* optional_public_or_private_module */ - YYSYMBOL_module_name = 221, /* module_name */ - YYSYMBOL_module_declaration = 222, /* module_declaration */ - YYSYMBOL_character_sequence = 223, /* character_sequence */ - YYSYMBOL_string_constant = 224, /* string_constant */ - YYSYMBOL_string_builder_body = 225, /* string_builder_body */ - YYSYMBOL_string_builder = 226, /* string_builder */ - YYSYMBOL_reader_character_sequence = 227, /* reader_character_sequence */ - YYSYMBOL_expr_reader = 228, /* expr_reader */ - YYSYMBOL_229_1 = 229, /* $@1 */ - YYSYMBOL_options_declaration = 230, /* options_declaration */ - YYSYMBOL_require_declaration = 231, /* require_declaration */ - YYSYMBOL_keyword_or_name = 232, /* keyword_or_name */ - YYSYMBOL_require_module_name = 233, /* require_module_name */ - YYSYMBOL_require_module = 234, /* require_module */ - YYSYMBOL_is_public_module = 235, /* is_public_module */ - YYSYMBOL_expect_declaration = 236, /* expect_declaration */ - YYSYMBOL_expect_list = 237, /* expect_list */ - YYSYMBOL_expect_error = 238, /* expect_error */ - YYSYMBOL_expression_label = 239, /* expression_label */ - YYSYMBOL_expression_goto = 240, /* expression_goto */ - YYSYMBOL_elif_or_static_elif = 241, /* elif_or_static_elif */ - YYSYMBOL_expression_else = 242, /* expression_else */ - YYSYMBOL_if_or_static_if = 243, /* if_or_static_if */ - YYSYMBOL_expression_else_one_liner = 244, /* expression_else_one_liner */ - YYSYMBOL_245_2 = 245, /* $@2 */ - YYSYMBOL_expression_if_one_liner = 246, /* expression_if_one_liner */ - YYSYMBOL_expression_if_then_else = 247, /* expression_if_then_else */ - YYSYMBOL_248_3 = 248, /* $@3 */ - YYSYMBOL_expression_for_loop = 249, /* expression_for_loop */ - YYSYMBOL_250_4 = 250, /* $@4 */ - YYSYMBOL_expression_unsafe = 251, /* expression_unsafe */ - YYSYMBOL_expression_while_loop = 252, /* expression_while_loop */ - YYSYMBOL_expression_with = 253, /* expression_with */ - YYSYMBOL_expression_with_alias = 254, /* expression_with_alias */ - YYSYMBOL_255_5 = 255, /* $@5 */ - YYSYMBOL_annotation_argument_value = 256, /* annotation_argument_value */ - YYSYMBOL_annotation_argument_value_list = 257, /* annotation_argument_value_list */ - YYSYMBOL_annotation_argument_name = 258, /* annotation_argument_name */ - YYSYMBOL_annotation_argument = 259, /* annotation_argument */ - YYSYMBOL_annotation_argument_list = 260, /* annotation_argument_list */ - YYSYMBOL_metadata_argument_list = 261, /* metadata_argument_list */ - YYSYMBOL_annotation_declaration_name = 262, /* annotation_declaration_name */ - YYSYMBOL_annotation_declaration_basic = 263, /* annotation_declaration_basic */ - YYSYMBOL_annotation_declaration = 264, /* annotation_declaration */ - YYSYMBOL_annotation_list = 265, /* annotation_list */ - YYSYMBOL_optional_annotation_list = 266, /* optional_annotation_list */ - YYSYMBOL_optional_function_argument_list = 267, /* optional_function_argument_list */ - YYSYMBOL_optional_function_type = 268, /* optional_function_type */ - YYSYMBOL_function_name = 269, /* function_name */ - YYSYMBOL_global_function_declaration = 270, /* global_function_declaration */ - YYSYMBOL_optional_public_or_private_function = 271, /* optional_public_or_private_function */ - YYSYMBOL_function_declaration_header = 272, /* function_declaration_header */ - YYSYMBOL_function_declaration = 273, /* function_declaration */ - YYSYMBOL_274_6 = 274, /* $@6 */ - YYSYMBOL_expression_block = 275, /* expression_block */ - YYSYMBOL_expr_call_pipe = 276, /* expr_call_pipe */ - YYSYMBOL_expression_any = 277, /* expression_any */ - YYSYMBOL_expressions = 278, /* expressions */ - YYSYMBOL_expr_keyword = 279, /* expr_keyword */ - YYSYMBOL_optional_expr_list = 280, /* optional_expr_list */ - YYSYMBOL_optional_expr_list_in_braces = 281, /* optional_expr_list_in_braces */ - YYSYMBOL_optional_expr_map_tuple_list = 282, /* optional_expr_map_tuple_list */ - YYSYMBOL_type_declaration_no_options_list = 283, /* type_declaration_no_options_list */ - YYSYMBOL_expression_keyword = 284, /* expression_keyword */ - YYSYMBOL_285_7 = 285, /* $@7 */ - YYSYMBOL_286_8 = 286, /* $@8 */ - YYSYMBOL_287_9 = 287, /* $@9 */ - YYSYMBOL_288_10 = 288, /* $@10 */ - YYSYMBOL_expr_pipe = 289, /* expr_pipe */ - YYSYMBOL_name_in_namespace = 290, /* name_in_namespace */ - YYSYMBOL_expression_delete = 291, /* expression_delete */ - YYSYMBOL_new_type_declaration = 292, /* new_type_declaration */ - YYSYMBOL_293_11 = 293, /* $@11 */ - YYSYMBOL_294_12 = 294, /* $@12 */ - YYSYMBOL_expr_new = 295, /* expr_new */ - YYSYMBOL_expression_break = 296, /* expression_break */ - YYSYMBOL_expression_continue = 297, /* expression_continue */ - YYSYMBOL_expression_return_no_pipe = 298, /* expression_return_no_pipe */ - YYSYMBOL_expression_return = 299, /* expression_return */ - YYSYMBOL_expression_yield_no_pipe = 300, /* expression_yield_no_pipe */ - YYSYMBOL_expression_yield = 301, /* expression_yield */ - YYSYMBOL_expression_try_catch = 302, /* expression_try_catch */ - YYSYMBOL_kwd_let_var_or_nothing = 303, /* kwd_let_var_or_nothing */ - YYSYMBOL_kwd_let = 304, /* kwd_let */ - YYSYMBOL_optional_in_scope = 305, /* optional_in_scope */ - YYSYMBOL_tuple_expansion = 306, /* tuple_expansion */ - YYSYMBOL_tuple_expansion_variable_declaration = 307, /* tuple_expansion_variable_declaration */ - YYSYMBOL_expression_let = 308, /* expression_let */ - YYSYMBOL_expr_cast = 309, /* expr_cast */ - YYSYMBOL_310_13 = 310, /* $@13 */ - YYSYMBOL_311_14 = 311, /* $@14 */ - YYSYMBOL_312_15 = 312, /* $@15 */ - YYSYMBOL_313_16 = 313, /* $@16 */ - YYSYMBOL_314_17 = 314, /* $@17 */ - YYSYMBOL_315_18 = 315, /* $@18 */ - YYSYMBOL_expr_type_decl = 316, /* expr_type_decl */ - YYSYMBOL_317_19 = 317, /* $@19 */ - YYSYMBOL_318_20 = 318, /* $@20 */ - YYSYMBOL_expr_type_info = 319, /* expr_type_info */ - YYSYMBOL_expr_list = 320, /* expr_list */ - YYSYMBOL_block_or_simple_block = 321, /* block_or_simple_block */ - YYSYMBOL_block_or_lambda = 322, /* block_or_lambda */ - YYSYMBOL_capture_entry = 323, /* capture_entry */ - YYSYMBOL_capture_list = 324, /* capture_list */ - YYSYMBOL_optional_capture_list = 325, /* optional_capture_list */ - YYSYMBOL_expr_block = 326, /* expr_block */ - YYSYMBOL_expr_full_block = 327, /* expr_full_block */ - YYSYMBOL_expr_full_block_assumed_piped = 328, /* expr_full_block_assumed_piped */ - YYSYMBOL_329_21 = 329, /* $@21 */ - YYSYMBOL_expr_numeric_const = 330, /* expr_numeric_const */ - YYSYMBOL_expr_assign = 331, /* expr_assign */ - YYSYMBOL_expr_assign_pipe_right = 332, /* expr_assign_pipe_right */ - YYSYMBOL_expr_assign_pipe = 333, /* expr_assign_pipe */ - YYSYMBOL_expr_named_call = 334, /* expr_named_call */ - YYSYMBOL_expr_method_call = 335, /* expr_method_call */ - YYSYMBOL_func_addr_name = 336, /* func_addr_name */ - YYSYMBOL_func_addr_expr = 337, /* func_addr_expr */ - YYSYMBOL_338_22 = 338, /* $@22 */ - YYSYMBOL_339_23 = 339, /* $@23 */ - YYSYMBOL_340_24 = 340, /* $@24 */ - YYSYMBOL_341_25 = 341, /* $@25 */ - YYSYMBOL_expr_field = 342, /* expr_field */ - YYSYMBOL_343_26 = 343, /* $@26 */ - YYSYMBOL_344_27 = 344, /* $@27 */ - YYSYMBOL_expr_call = 345, /* expr_call */ - YYSYMBOL_expr = 346, /* expr */ - YYSYMBOL_347_28 = 347, /* $@28 */ - YYSYMBOL_348_29 = 348, /* $@29 */ - YYSYMBOL_349_30 = 349, /* $@30 */ - YYSYMBOL_350_31 = 350, /* $@31 */ - YYSYMBOL_351_32 = 351, /* $@32 */ - YYSYMBOL_352_33 = 352, /* $@33 */ - YYSYMBOL_expr_mtag = 353, /* expr_mtag */ - YYSYMBOL_optional_field_annotation = 354, /* optional_field_annotation */ - YYSYMBOL_optional_override = 355, /* optional_override */ - YYSYMBOL_optional_constant = 356, /* optional_constant */ - YYSYMBOL_optional_public_or_private_member_variable = 357, /* optional_public_or_private_member_variable */ - YYSYMBOL_optional_static_member_variable = 358, /* optional_static_member_variable */ - YYSYMBOL_structure_variable_declaration = 359, /* structure_variable_declaration */ - YYSYMBOL_struct_variable_declaration_list = 360, /* struct_variable_declaration_list */ - YYSYMBOL_361_34 = 361, /* $@34 */ - YYSYMBOL_362_35 = 362, /* $@35 */ - YYSYMBOL_363_36 = 363, /* $@36 */ - YYSYMBOL_function_argument_declaration = 364, /* function_argument_declaration */ - YYSYMBOL_function_argument_list = 365, /* function_argument_list */ - YYSYMBOL_tuple_type = 366, /* tuple_type */ - YYSYMBOL_tuple_type_list = 367, /* tuple_type_list */ - YYSYMBOL_tuple_alias_type_list = 368, /* tuple_alias_type_list */ - YYSYMBOL_variant_type = 369, /* variant_type */ - YYSYMBOL_variant_type_list = 370, /* variant_type_list */ - YYSYMBOL_variant_alias_type_list = 371, /* variant_alias_type_list */ - YYSYMBOL_copy_or_move = 372, /* copy_or_move */ - YYSYMBOL_variable_declaration = 373, /* variable_declaration */ - YYSYMBOL_copy_or_move_or_clone = 374, /* copy_or_move_or_clone */ - YYSYMBOL_optional_ref = 375, /* optional_ref */ - YYSYMBOL_let_variable_name_with_pos_list = 376, /* let_variable_name_with_pos_list */ - YYSYMBOL_let_variable_declaration = 377, /* let_variable_declaration */ - YYSYMBOL_global_variable_declaration_list = 378, /* global_variable_declaration_list */ - YYSYMBOL_379_37 = 379, /* $@37 */ - YYSYMBOL_optional_shared = 380, /* optional_shared */ - YYSYMBOL_optional_public_or_private_variable = 381, /* optional_public_or_private_variable */ - YYSYMBOL_global_let = 382, /* global_let */ - YYSYMBOL_383_38 = 383, /* $@38 */ - YYSYMBOL_enum_list = 384, /* enum_list */ - YYSYMBOL_optional_public_or_private_alias = 385, /* optional_public_or_private_alias */ - YYSYMBOL_single_alias = 386, /* single_alias */ - YYSYMBOL_387_39 = 387, /* $@39 */ - YYSYMBOL_alias_list = 388, /* alias_list */ - YYSYMBOL_alias_declaration = 389, /* alias_declaration */ - YYSYMBOL_390_40 = 390, /* $@40 */ - YYSYMBOL_optional_public_or_private_enum = 391, /* optional_public_or_private_enum */ - YYSYMBOL_enum_name = 392, /* enum_name */ - YYSYMBOL_enum_declaration = 393, /* enum_declaration */ - YYSYMBOL_394_41 = 394, /* $@41 */ - YYSYMBOL_395_42 = 395, /* $@42 */ - YYSYMBOL_396_43 = 396, /* $@43 */ - YYSYMBOL_397_44 = 397, /* $@44 */ - YYSYMBOL_optional_structure_parent = 398, /* optional_structure_parent */ - YYSYMBOL_optional_sealed = 399, /* optional_sealed */ - YYSYMBOL_structure_name = 400, /* structure_name */ - YYSYMBOL_class_or_struct = 401, /* class_or_struct */ - YYSYMBOL_optional_public_or_private_structure = 402, /* optional_public_or_private_structure */ - YYSYMBOL_optional_struct_variable_declaration_list = 403, /* optional_struct_variable_declaration_list */ - YYSYMBOL_structure_declaration = 404, /* structure_declaration */ - YYSYMBOL_405_45 = 405, /* $@45 */ - YYSYMBOL_406_46 = 406, /* $@46 */ - YYSYMBOL_variable_name_with_pos_list = 407, /* variable_name_with_pos_list */ - YYSYMBOL_basic_type_declaration = 408, /* basic_type_declaration */ - YYSYMBOL_enum_basic_type_declaration = 409, /* enum_basic_type_declaration */ - YYSYMBOL_structure_type_declaration = 410, /* structure_type_declaration */ - YYSYMBOL_auto_type_declaration = 411, /* auto_type_declaration */ - YYSYMBOL_bitfield_bits = 412, /* bitfield_bits */ - YYSYMBOL_bitfield_alias_bits = 413, /* bitfield_alias_bits */ - YYSYMBOL_bitfield_type_declaration = 414, /* bitfield_type_declaration */ - YYSYMBOL_415_47 = 415, /* $@47 */ - YYSYMBOL_416_48 = 416, /* $@48 */ - YYSYMBOL_c_or_s = 417, /* c_or_s */ - YYSYMBOL_table_type_pair = 418, /* table_type_pair */ - YYSYMBOL_dim_list = 419, /* dim_list */ - YYSYMBOL_type_declaration_no_options = 420, /* type_declaration_no_options */ - YYSYMBOL_421_49 = 421, /* $@49 */ - YYSYMBOL_422_50 = 422, /* $@50 */ - YYSYMBOL_423_51 = 423, /* $@51 */ - YYSYMBOL_424_52 = 424, /* $@52 */ - YYSYMBOL_425_53 = 425, /* $@53 */ - YYSYMBOL_426_54 = 426, /* $@54 */ - YYSYMBOL_427_55 = 427, /* $@55 */ - YYSYMBOL_428_56 = 428, /* $@56 */ - YYSYMBOL_429_57 = 429, /* $@57 */ - YYSYMBOL_430_58 = 430, /* $@58 */ - YYSYMBOL_431_59 = 431, /* $@59 */ - YYSYMBOL_432_60 = 432, /* $@60 */ - YYSYMBOL_433_61 = 433, /* $@61 */ - YYSYMBOL_434_62 = 434, /* $@62 */ - YYSYMBOL_435_63 = 435, /* $@63 */ - YYSYMBOL_436_64 = 436, /* $@64 */ - YYSYMBOL_437_65 = 437, /* $@65 */ - YYSYMBOL_438_66 = 438, /* $@66 */ - YYSYMBOL_439_67 = 439, /* $@67 */ - YYSYMBOL_440_68 = 440, /* $@68 */ - YYSYMBOL_441_69 = 441, /* $@69 */ - YYSYMBOL_442_70 = 442, /* $@70 */ - YYSYMBOL_443_71 = 443, /* $@71 */ - YYSYMBOL_444_72 = 444, /* $@72 */ - YYSYMBOL_445_73 = 445, /* $@73 */ - YYSYMBOL_446_74 = 446, /* $@74 */ - YYSYMBOL_447_75 = 447, /* $@75 */ - YYSYMBOL_type_declaration = 448, /* type_declaration */ - YYSYMBOL_tuple_alias_declaration = 449, /* tuple_alias_declaration */ - YYSYMBOL_450_76 = 450, /* $@76 */ - YYSYMBOL_451_77 = 451, /* $@77 */ - YYSYMBOL_452_78 = 452, /* $@78 */ - YYSYMBOL_453_79 = 453, /* $@79 */ - YYSYMBOL_variant_alias_declaration = 454, /* variant_alias_declaration */ - YYSYMBOL_455_80 = 455, /* $@80 */ - YYSYMBOL_456_81 = 456, /* $@81 */ - YYSYMBOL_457_82 = 457, /* $@82 */ - YYSYMBOL_458_83 = 458, /* $@83 */ - YYSYMBOL_bitfield_alias_declaration = 459, /* bitfield_alias_declaration */ - YYSYMBOL_460_84 = 460, /* $@84 */ - YYSYMBOL_461_85 = 461, /* $@85 */ - YYSYMBOL_462_86 = 462, /* $@86 */ - YYSYMBOL_463_87 = 463, /* $@87 */ - YYSYMBOL_make_decl = 464, /* make_decl */ - YYSYMBOL_make_struct_fields = 465, /* make_struct_fields */ - YYSYMBOL_make_variant_dim = 466, /* make_variant_dim */ - YYSYMBOL_make_struct_single = 467, /* make_struct_single */ - YYSYMBOL_make_struct_dim = 468, /* make_struct_dim */ - YYSYMBOL_make_struct_dim_list = 469, /* make_struct_dim_list */ - YYSYMBOL_make_struct_dim_decl = 470, /* make_struct_dim_decl */ - YYSYMBOL_optional_make_struct_dim_decl = 471, /* optional_make_struct_dim_decl */ - YYSYMBOL_optional_block = 472, /* optional_block */ - YYSYMBOL_optional_trailing_semicolon_cur_cur = 473, /* optional_trailing_semicolon_cur_cur */ - YYSYMBOL_optional_trailing_semicolon_cur_sqr = 474, /* optional_trailing_semicolon_cur_sqr */ - YYSYMBOL_optional_trailing_semicolon_sqr_sqr = 475, /* optional_trailing_semicolon_sqr_sqr */ - YYSYMBOL_optional_trailing_delim_sqr_sqr = 476, /* optional_trailing_delim_sqr_sqr */ - YYSYMBOL_optional_trailing_delim_cur_sqr = 477, /* optional_trailing_delim_cur_sqr */ - YYSYMBOL_use_initializer = 478, /* use_initializer */ - YYSYMBOL_make_struct_decl = 479, /* make_struct_decl */ - YYSYMBOL_480_88 = 480, /* $@88 */ - YYSYMBOL_481_89 = 481, /* $@89 */ - YYSYMBOL_482_90 = 482, /* $@90 */ - YYSYMBOL_483_91 = 483, /* $@91 */ - YYSYMBOL_484_92 = 484, /* $@92 */ - YYSYMBOL_485_93 = 485, /* $@93 */ - YYSYMBOL_486_94 = 486, /* $@94 */ - YYSYMBOL_487_95 = 487, /* $@95 */ - YYSYMBOL_make_tuple = 488, /* make_tuple */ - YYSYMBOL_make_map_tuple = 489, /* make_map_tuple */ - YYSYMBOL_make_tuple_call = 490, /* make_tuple_call */ - YYSYMBOL_491_96 = 491, /* $@96 */ - YYSYMBOL_492_97 = 492, /* $@97 */ - YYSYMBOL_make_dim = 493, /* make_dim */ - YYSYMBOL_make_dim_decl = 494, /* make_dim_decl */ - YYSYMBOL_495_98 = 495, /* $@98 */ - YYSYMBOL_496_99 = 496, /* $@99 */ - YYSYMBOL_497_100 = 497, /* $@100 */ - YYSYMBOL_498_101 = 498, /* $@101 */ - YYSYMBOL_499_102 = 499, /* $@102 */ - YYSYMBOL_500_103 = 500, /* $@103 */ - YYSYMBOL_501_104 = 501, /* $@104 */ - YYSYMBOL_502_105 = 502, /* $@105 */ - YYSYMBOL_503_106 = 503, /* $@106 */ - YYSYMBOL_504_107 = 504, /* $@107 */ - YYSYMBOL_make_table = 505, /* make_table */ - YYSYMBOL_expr_map_tuple_list = 506, /* expr_map_tuple_list */ - YYSYMBOL_make_table_decl = 507, /* make_table_decl */ - YYSYMBOL_array_comprehension_where = 508, /* array_comprehension_where */ - YYSYMBOL_optional_comma = 509, /* optional_comma */ - YYSYMBOL_array_comprehension = 510 /* array_comprehension */ + YYSYMBOL_DAS_CAPTURE = 4, /* "capture" */ + YYSYMBOL_DAS_STRUCT = 5, /* "struct" */ + YYSYMBOL_DAS_CLASS = 6, /* "class" */ + YYSYMBOL_DAS_LET = 7, /* "let" */ + YYSYMBOL_DAS_DEF = 8, /* "def" */ + YYSYMBOL_DAS_WHILE = 9, /* "while" */ + YYSYMBOL_DAS_IF = 10, /* "if" */ + YYSYMBOL_DAS_STATIC_IF = 11, /* "static_if" */ + YYSYMBOL_DAS_ELSE = 12, /* "else" */ + YYSYMBOL_DAS_FOR = 13, /* "for" */ + YYSYMBOL_DAS_CATCH = 14, /* "recover" */ + YYSYMBOL_DAS_TRUE = 15, /* "true" */ + YYSYMBOL_DAS_FALSE = 16, /* "false" */ + YYSYMBOL_DAS_NEWT = 17, /* "new" */ + YYSYMBOL_DAS_TYPEINFO = 18, /* "typeinfo" */ + YYSYMBOL_DAS_TYPE = 19, /* "type" */ + YYSYMBOL_DAS_IN = 20, /* "in" */ + YYSYMBOL_DAS_IS = 21, /* "is" */ + YYSYMBOL_DAS_AS = 22, /* "as" */ + YYSYMBOL_DAS_ELIF = 23, /* "elif" */ + YYSYMBOL_DAS_STATIC_ELIF = 24, /* "static_elif" */ + YYSYMBOL_DAS_ARRAY = 25, /* "array" */ + YYSYMBOL_DAS_RETURN = 26, /* "return" */ + YYSYMBOL_DAS_NULL = 27, /* "null" */ + YYSYMBOL_DAS_BREAK = 28, /* "break" */ + YYSYMBOL_DAS_TRY = 29, /* "try" */ + YYSYMBOL_DAS_OPTIONS = 30, /* "options" */ + YYSYMBOL_DAS_TABLE = 31, /* "table" */ + YYSYMBOL_DAS_EXPECT = 32, /* "expect" */ + YYSYMBOL_DAS_CONST = 33, /* "const" */ + YYSYMBOL_DAS_REQUIRE = 34, /* "require" */ + YYSYMBOL_DAS_OPERATOR = 35, /* "operator" */ + YYSYMBOL_DAS_ENUM = 36, /* "enum" */ + YYSYMBOL_DAS_FINALLY = 37, /* "finally" */ + YYSYMBOL_DAS_DELETE = 38, /* "delete" */ + YYSYMBOL_DAS_DEREF = 39, /* "deref" */ + YYSYMBOL_DAS_TYPEDEF = 40, /* "typedef" */ + YYSYMBOL_DAS_TYPEDECL = 41, /* "typedecl" */ + YYSYMBOL_DAS_WITH = 42, /* "with" */ + YYSYMBOL_DAS_AKA = 43, /* "aka" */ + YYSYMBOL_DAS_ASSUME = 44, /* "assume" */ + YYSYMBOL_DAS_CAST = 45, /* "cast" */ + YYSYMBOL_DAS_OVERRIDE = 46, /* "override" */ + YYSYMBOL_DAS_ABSTRACT = 47, /* "abstract" */ + YYSYMBOL_DAS_UPCAST = 48, /* "upcast" */ + YYSYMBOL_DAS_ITERATOR = 49, /* "iterator" */ + YYSYMBOL_DAS_VAR = 50, /* "var" */ + YYSYMBOL_DAS_ADDR = 51, /* "addr" */ + YYSYMBOL_DAS_CONTINUE = 52, /* "continue" */ + YYSYMBOL_DAS_WHERE = 53, /* "where" */ + YYSYMBOL_DAS_PASS = 54, /* "pass" */ + YYSYMBOL_DAS_REINTERPRET = 55, /* "reinterpret" */ + YYSYMBOL_DAS_MODULE = 56, /* "module" */ + YYSYMBOL_DAS_PUBLIC = 57, /* "public" */ + YYSYMBOL_DAS_LABEL = 58, /* "label" */ + YYSYMBOL_DAS_GOTO = 59, /* "goto" */ + YYSYMBOL_DAS_IMPLICIT = 60, /* "implicit" */ + YYSYMBOL_DAS_EXPLICIT = 61, /* "explicit" */ + YYSYMBOL_DAS_SHARED = 62, /* "shared" */ + YYSYMBOL_DAS_PRIVATE = 63, /* "private" */ + YYSYMBOL_DAS_SMART_PTR = 64, /* "smart_ptr" */ + YYSYMBOL_DAS_UNSAFE = 65, /* "unsafe" */ + YYSYMBOL_DAS_INSCOPE = 66, /* "inscope" */ + YYSYMBOL_DAS_STATIC = 67, /* "static" */ + YYSYMBOL_DAS_FIXED_ARRAY = 68, /* "fixed_array" */ + YYSYMBOL_DAS_DEFAULT = 69, /* "default" */ + YYSYMBOL_DAS_UNINITIALIZED = 70, /* "uninitialized" */ + YYSYMBOL_DAS_TBOOL = 71, /* "bool" */ + YYSYMBOL_DAS_TVOID = 72, /* "void" */ + YYSYMBOL_DAS_TSTRING = 73, /* "string" */ + YYSYMBOL_DAS_TAUTO = 74, /* "auto" */ + YYSYMBOL_DAS_TINT = 75, /* "int" */ + YYSYMBOL_DAS_TINT2 = 76, /* "int2" */ + YYSYMBOL_DAS_TINT3 = 77, /* "int3" */ + YYSYMBOL_DAS_TINT4 = 78, /* "int4" */ + YYSYMBOL_DAS_TUINT = 79, /* "uint" */ + YYSYMBOL_DAS_TBITFIELD = 80, /* "bitfield" */ + YYSYMBOL_DAS_TUINT2 = 81, /* "uint2" */ + YYSYMBOL_DAS_TUINT3 = 82, /* "uint3" */ + YYSYMBOL_DAS_TUINT4 = 83, /* "uint4" */ + YYSYMBOL_DAS_TFLOAT = 84, /* "float" */ + YYSYMBOL_DAS_TFLOAT2 = 85, /* "float2" */ + YYSYMBOL_DAS_TFLOAT3 = 86, /* "float3" */ + YYSYMBOL_DAS_TFLOAT4 = 87, /* "float4" */ + YYSYMBOL_DAS_TRANGE = 88, /* "range" */ + YYSYMBOL_DAS_TURANGE = 89, /* "urange" */ + YYSYMBOL_DAS_TRANGE64 = 90, /* "range64" */ + YYSYMBOL_DAS_TURANGE64 = 91, /* "urange64" */ + YYSYMBOL_DAS_TBLOCK = 92, /* "block" */ + YYSYMBOL_DAS_TINT64 = 93, /* "int64" */ + YYSYMBOL_DAS_TUINT64 = 94, /* "uint64" */ + YYSYMBOL_DAS_TDOUBLE = 95, /* "double" */ + YYSYMBOL_DAS_TFUNCTION = 96, /* "function" */ + YYSYMBOL_DAS_TLAMBDA = 97, /* "lambda" */ + YYSYMBOL_DAS_TINT8 = 98, /* "int8" */ + YYSYMBOL_DAS_TUINT8 = 99, /* "uint8" */ + YYSYMBOL_DAS_TINT16 = 100, /* "int16" */ + YYSYMBOL_DAS_TUINT16 = 101, /* "uint16" */ + YYSYMBOL_DAS_TTUPLE = 102, /* "tuple" */ + YYSYMBOL_DAS_TVARIANT = 103, /* "variant" */ + YYSYMBOL_DAS_GENERATOR = 104, /* "generator" */ + YYSYMBOL_DAS_YIELD = 105, /* "yield" */ + YYSYMBOL_DAS_SEALED = 106, /* "sealed" */ + YYSYMBOL_ADDEQU = 107, /* "+=" */ + YYSYMBOL_SUBEQU = 108, /* "-=" */ + YYSYMBOL_DIVEQU = 109, /* "/=" */ + YYSYMBOL_MULEQU = 110, /* "*=" */ + YYSYMBOL_MODEQU = 111, /* "%=" */ + YYSYMBOL_ANDEQU = 112, /* "&=" */ + YYSYMBOL_OREQU = 113, /* "|=" */ + YYSYMBOL_XOREQU = 114, /* "^=" */ + YYSYMBOL_SHL = 115, /* "<<" */ + YYSYMBOL_SHR = 116, /* ">>" */ + YYSYMBOL_ADDADD = 117, /* "++" */ + YYSYMBOL_SUBSUB = 118, /* "--" */ + YYSYMBOL_LEEQU = 119, /* "<=" */ + YYSYMBOL_SHLEQU = 120, /* "<<=" */ + YYSYMBOL_SHREQU = 121, /* ">>=" */ + YYSYMBOL_GREQU = 122, /* ">=" */ + YYSYMBOL_EQUEQU = 123, /* "==" */ + YYSYMBOL_NOTEQU = 124, /* "!=" */ + YYSYMBOL_RARROW = 125, /* "->" */ + YYSYMBOL_LARROW = 126, /* "<-" */ + YYSYMBOL_QQ = 127, /* "??" */ + YYSYMBOL_QDOT = 128, /* "?." */ + YYSYMBOL_QBRA = 129, /* "?[" */ + YYSYMBOL_LPIPE = 130, /* "<|" */ + YYSYMBOL_LBPIPE = 131, /* " <|" */ + YYSYMBOL_LLPIPE = 132, /* "$ <|" */ + YYSYMBOL_LAPIPE = 133, /* "@ <|" */ + YYSYMBOL_LFPIPE = 134, /* "@@ <|" */ + YYSYMBOL_RPIPE = 135, /* "|>" */ + YYSYMBOL_CLONEEQU = 136, /* ":=" */ + YYSYMBOL_ROTL = 137, /* "<<<" */ + YYSYMBOL_ROTR = 138, /* ">>>" */ + YYSYMBOL_ROTLEQU = 139, /* "<<<=" */ + YYSYMBOL_ROTREQU = 140, /* ">>>=" */ + YYSYMBOL_MAPTO = 141, /* "=>" */ + YYSYMBOL_COLCOL = 142, /* "::" */ + YYSYMBOL_ANDAND = 143, /* "&&" */ + YYSYMBOL_OROR = 144, /* "||" */ + YYSYMBOL_XORXOR = 145, /* "^^" */ + YYSYMBOL_ANDANDEQU = 146, /* "&&=" */ + YYSYMBOL_OROREQU = 147, /* "||=" */ + YYSYMBOL_XORXOREQU = 148, /* "^^=" */ + YYSYMBOL_DOTDOT = 149, /* ".." */ + YYSYMBOL_MTAG_E = 150, /* "$$" */ + YYSYMBOL_MTAG_I = 151, /* "$i" */ + YYSYMBOL_MTAG_V = 152, /* "$v" */ + YYSYMBOL_MTAG_B = 153, /* "$b" */ + YYSYMBOL_MTAG_A = 154, /* "$a" */ + YYSYMBOL_MTAG_T = 155, /* "$t" */ + YYSYMBOL_MTAG_C = 156, /* "$c" */ + YYSYMBOL_MTAG_F = 157, /* "$f" */ + YYSYMBOL_MTAG_DOTDOTDOT = 158, /* "..." */ + YYSYMBOL_BRABRAB = 159, /* "[[" */ + YYSYMBOL_BRACBRB = 160, /* "[{" */ + YYSYMBOL_CBRCBRB = 161, /* "{{" */ + YYSYMBOL_INTEGER = 162, /* "integer constant" */ + YYSYMBOL_LONG_INTEGER = 163, /* "long integer constant" */ + YYSYMBOL_UNSIGNED_INTEGER = 164, /* "unsigned integer constant" */ + YYSYMBOL_UNSIGNED_LONG_INTEGER = 165, /* "unsigned long integer constant" */ + YYSYMBOL_UNSIGNED_INT8 = 166, /* "unsigned int8 constant" */ + YYSYMBOL_FLOAT = 167, /* "floating point constant" */ + YYSYMBOL_DOUBLE = 168, /* "double constant" */ + YYSYMBOL_NAME = 169, /* "name" */ + YYSYMBOL_KEYWORD = 170, /* "keyword" */ + YYSYMBOL_TYPE_FUNCTION = 171, /* "type function" */ + YYSYMBOL_BEGIN_STRING = 172, /* "start of the string" */ + YYSYMBOL_STRING_CHARACTER = 173, /* STRING_CHARACTER */ + YYSYMBOL_STRING_CHARACTER_ESC = 174, /* STRING_CHARACTER_ESC */ + YYSYMBOL_END_STRING = 175, /* "end of the string" */ + YYSYMBOL_BEGIN_STRING_EXPR = 176, /* "{" */ + YYSYMBOL_END_STRING_EXPR = 177, /* "}" */ + YYSYMBOL_END_OF_READ = 178, /* "end of failed eader macro" */ + YYSYMBOL_179_begin_of_code_block_ = 179, /* "begin of code block" */ + YYSYMBOL_180_end_of_code_block_ = 180, /* "end of code block" */ + YYSYMBOL_181_end_of_expression_ = 181, /* "end of expression" */ + YYSYMBOL_SEMICOLON_CUR_CUR = 182, /* ";}}" */ + YYSYMBOL_SEMICOLON_CUR_SQR = 183, /* ";}]" */ + YYSYMBOL_SEMICOLON_SQR_SQR = 184, /* ";]]" */ + YYSYMBOL_COMMA_SQR_SQR = 185, /* ",]]" */ + YYSYMBOL_COMMA_CUR_SQR = 186, /* ",}]" */ + YYSYMBOL_187_ = 187, /* ',' */ + YYSYMBOL_188_ = 188, /* '=' */ + YYSYMBOL_189_ = 189, /* '?' */ + YYSYMBOL_190_ = 190, /* ':' */ + YYSYMBOL_191_ = 191, /* '|' */ + YYSYMBOL_192_ = 192, /* '^' */ + YYSYMBOL_193_ = 193, /* '&' */ + YYSYMBOL_194_ = 194, /* '<' */ + YYSYMBOL_195_ = 195, /* '>' */ + YYSYMBOL_196_ = 196, /* '-' */ + YYSYMBOL_197_ = 197, /* '+' */ + YYSYMBOL_198_ = 198, /* '*' */ + YYSYMBOL_199_ = 199, /* '/' */ + YYSYMBOL_200_ = 200, /* '%' */ + YYSYMBOL_UNARY_MINUS = 201, /* UNARY_MINUS */ + YYSYMBOL_UNARY_PLUS = 202, /* UNARY_PLUS */ + YYSYMBOL_203_ = 203, /* '~' */ + YYSYMBOL_204_ = 204, /* '!' */ + YYSYMBOL_PRE_INC = 205, /* PRE_INC */ + YYSYMBOL_PRE_DEC = 206, /* PRE_DEC */ + YYSYMBOL_POST_INC = 207, /* POST_INC */ + YYSYMBOL_POST_DEC = 208, /* POST_DEC */ + YYSYMBOL_DEREF = 209, /* DEREF */ + YYSYMBOL_210_ = 210, /* '.' */ + YYSYMBOL_211_ = 211, /* '[' */ + YYSYMBOL_212_ = 212, /* ']' */ + YYSYMBOL_213_ = 213, /* '(' */ + YYSYMBOL_214_ = 214, /* ')' */ + YYSYMBOL_215_ = 215, /* '$' */ + YYSYMBOL_216_ = 216, /* '@' */ + YYSYMBOL_217_ = 217, /* '#' */ + YYSYMBOL_YYACCEPT = 218, /* $accept */ + YYSYMBOL_program = 219, /* program */ + YYSYMBOL_top_level_reader_macro = 220, /* top_level_reader_macro */ + YYSYMBOL_optional_public_or_private_module = 221, /* optional_public_or_private_module */ + YYSYMBOL_module_name = 222, /* module_name */ + YYSYMBOL_module_declaration = 223, /* module_declaration */ + YYSYMBOL_character_sequence = 224, /* character_sequence */ + YYSYMBOL_string_constant = 225, /* string_constant */ + YYSYMBOL_string_builder_body = 226, /* string_builder_body */ + YYSYMBOL_string_builder = 227, /* string_builder */ + YYSYMBOL_reader_character_sequence = 228, /* reader_character_sequence */ + YYSYMBOL_expr_reader = 229, /* expr_reader */ + YYSYMBOL_230_1 = 230, /* $@1 */ + YYSYMBOL_options_declaration = 231, /* options_declaration */ + YYSYMBOL_require_declaration = 232, /* require_declaration */ + YYSYMBOL_keyword_or_name = 233, /* keyword_or_name */ + YYSYMBOL_require_module_name = 234, /* require_module_name */ + YYSYMBOL_require_module = 235, /* require_module */ + YYSYMBOL_is_public_module = 236, /* is_public_module */ + YYSYMBOL_expect_declaration = 237, /* expect_declaration */ + YYSYMBOL_expect_list = 238, /* expect_list */ + YYSYMBOL_expect_error = 239, /* expect_error */ + YYSYMBOL_expression_label = 240, /* expression_label */ + YYSYMBOL_expression_goto = 241, /* expression_goto */ + YYSYMBOL_elif_or_static_elif = 242, /* elif_or_static_elif */ + YYSYMBOL_expression_else = 243, /* expression_else */ + YYSYMBOL_if_or_static_if = 244, /* if_or_static_if */ + YYSYMBOL_expression_else_one_liner = 245, /* expression_else_one_liner */ + YYSYMBOL_246_2 = 246, /* $@2 */ + YYSYMBOL_expression_if_one_liner = 247, /* expression_if_one_liner */ + YYSYMBOL_expression_if_then_else = 248, /* expression_if_then_else */ + YYSYMBOL_249_3 = 249, /* $@3 */ + YYSYMBOL_expression_for_loop = 250, /* expression_for_loop */ + YYSYMBOL_251_4 = 251, /* $@4 */ + YYSYMBOL_expression_unsafe = 252, /* expression_unsafe */ + YYSYMBOL_expression_while_loop = 253, /* expression_while_loop */ + YYSYMBOL_expression_with = 254, /* expression_with */ + YYSYMBOL_expression_with_alias = 255, /* expression_with_alias */ + YYSYMBOL_256_5 = 256, /* $@5 */ + YYSYMBOL_annotation_argument_value = 257, /* annotation_argument_value */ + YYSYMBOL_annotation_argument_value_list = 258, /* annotation_argument_value_list */ + YYSYMBOL_annotation_argument_name = 259, /* annotation_argument_name */ + YYSYMBOL_annotation_argument = 260, /* annotation_argument */ + YYSYMBOL_annotation_argument_list = 261, /* annotation_argument_list */ + YYSYMBOL_metadata_argument_list = 262, /* metadata_argument_list */ + YYSYMBOL_annotation_declaration_name = 263, /* annotation_declaration_name */ + YYSYMBOL_annotation_declaration_basic = 264, /* annotation_declaration_basic */ + YYSYMBOL_annotation_declaration = 265, /* annotation_declaration */ + YYSYMBOL_annotation_list = 266, /* annotation_list */ + YYSYMBOL_optional_annotation_list = 267, /* optional_annotation_list */ + YYSYMBOL_optional_function_argument_list = 268, /* optional_function_argument_list */ + YYSYMBOL_optional_function_type = 269, /* optional_function_type */ + YYSYMBOL_function_name = 270, /* function_name */ + YYSYMBOL_global_function_declaration = 271, /* global_function_declaration */ + YYSYMBOL_optional_public_or_private_function = 272, /* optional_public_or_private_function */ + YYSYMBOL_function_declaration_header = 273, /* function_declaration_header */ + YYSYMBOL_function_declaration = 274, /* function_declaration */ + YYSYMBOL_275_6 = 275, /* $@6 */ + YYSYMBOL_expression_block = 276, /* expression_block */ + YYSYMBOL_expr_call_pipe = 277, /* expr_call_pipe */ + YYSYMBOL_expression_any = 278, /* expression_any */ + YYSYMBOL_expressions = 279, /* expressions */ + YYSYMBOL_expr_keyword = 280, /* expr_keyword */ + YYSYMBOL_optional_expr_list = 281, /* optional_expr_list */ + YYSYMBOL_optional_expr_list_in_braces = 282, /* optional_expr_list_in_braces */ + YYSYMBOL_optional_expr_map_tuple_list = 283, /* optional_expr_map_tuple_list */ + YYSYMBOL_type_declaration_no_options_list = 284, /* type_declaration_no_options_list */ + YYSYMBOL_expression_keyword = 285, /* expression_keyword */ + YYSYMBOL_286_7 = 286, /* $@7 */ + YYSYMBOL_287_8 = 287, /* $@8 */ + YYSYMBOL_288_9 = 288, /* $@9 */ + YYSYMBOL_289_10 = 289, /* $@10 */ + YYSYMBOL_expr_pipe = 290, /* expr_pipe */ + YYSYMBOL_name_in_namespace = 291, /* name_in_namespace */ + YYSYMBOL_expression_delete = 292, /* expression_delete */ + YYSYMBOL_new_type_declaration = 293, /* new_type_declaration */ + YYSYMBOL_294_11 = 294, /* $@11 */ + YYSYMBOL_295_12 = 295, /* $@12 */ + YYSYMBOL_expr_new = 296, /* expr_new */ + YYSYMBOL_expression_break = 297, /* expression_break */ + YYSYMBOL_expression_continue = 298, /* expression_continue */ + YYSYMBOL_expression_return_no_pipe = 299, /* expression_return_no_pipe */ + YYSYMBOL_expression_return = 300, /* expression_return */ + YYSYMBOL_expression_yield_no_pipe = 301, /* expression_yield_no_pipe */ + YYSYMBOL_expression_yield = 302, /* expression_yield */ + YYSYMBOL_expression_try_catch = 303, /* expression_try_catch */ + YYSYMBOL_kwd_let_var_or_nothing = 304, /* kwd_let_var_or_nothing */ + YYSYMBOL_kwd_let = 305, /* kwd_let */ + YYSYMBOL_optional_in_scope = 306, /* optional_in_scope */ + YYSYMBOL_tuple_expansion = 307, /* tuple_expansion */ + YYSYMBOL_tuple_expansion_variable_declaration = 308, /* tuple_expansion_variable_declaration */ + YYSYMBOL_expression_let = 309, /* expression_let */ + YYSYMBOL_expr_cast = 310, /* expr_cast */ + YYSYMBOL_311_13 = 311, /* $@13 */ + YYSYMBOL_312_14 = 312, /* $@14 */ + YYSYMBOL_313_15 = 313, /* $@15 */ + YYSYMBOL_314_16 = 314, /* $@16 */ + YYSYMBOL_315_17 = 315, /* $@17 */ + YYSYMBOL_316_18 = 316, /* $@18 */ + YYSYMBOL_expr_type_decl = 317, /* expr_type_decl */ + YYSYMBOL_318_19 = 318, /* $@19 */ + YYSYMBOL_319_20 = 319, /* $@20 */ + YYSYMBOL_expr_type_info = 320, /* expr_type_info */ + YYSYMBOL_expr_list = 321, /* expr_list */ + YYSYMBOL_block_or_simple_block = 322, /* block_or_simple_block */ + YYSYMBOL_block_or_lambda = 323, /* block_or_lambda */ + YYSYMBOL_capture_entry = 324, /* capture_entry */ + YYSYMBOL_capture_list = 325, /* capture_list */ + YYSYMBOL_optional_capture_list = 326, /* optional_capture_list */ + YYSYMBOL_expr_block = 327, /* expr_block */ + YYSYMBOL_expr_full_block = 328, /* expr_full_block */ + YYSYMBOL_expr_full_block_assumed_piped = 329, /* expr_full_block_assumed_piped */ + YYSYMBOL_330_21 = 330, /* $@21 */ + YYSYMBOL_expr_numeric_const = 331, /* expr_numeric_const */ + YYSYMBOL_expr_assign = 332, /* expr_assign */ + YYSYMBOL_expr_assign_pipe_right = 333, /* expr_assign_pipe_right */ + YYSYMBOL_expr_assign_pipe = 334, /* expr_assign_pipe */ + YYSYMBOL_expr_named_call = 335, /* expr_named_call */ + YYSYMBOL_expr_method_call = 336, /* expr_method_call */ + YYSYMBOL_func_addr_name = 337, /* func_addr_name */ + YYSYMBOL_func_addr_expr = 338, /* func_addr_expr */ + YYSYMBOL_339_22 = 339, /* $@22 */ + YYSYMBOL_340_23 = 340, /* $@23 */ + YYSYMBOL_341_24 = 341, /* $@24 */ + YYSYMBOL_342_25 = 342, /* $@25 */ + YYSYMBOL_expr_field = 343, /* expr_field */ + YYSYMBOL_344_26 = 344, /* $@26 */ + YYSYMBOL_345_27 = 345, /* $@27 */ + YYSYMBOL_expr_call = 346, /* expr_call */ + YYSYMBOL_expr = 347, /* expr */ + YYSYMBOL_348_28 = 348, /* $@28 */ + YYSYMBOL_349_29 = 349, /* $@29 */ + YYSYMBOL_350_30 = 350, /* $@30 */ + YYSYMBOL_351_31 = 351, /* $@31 */ + YYSYMBOL_352_32 = 352, /* $@32 */ + YYSYMBOL_353_33 = 353, /* $@33 */ + YYSYMBOL_expr_mtag = 354, /* expr_mtag */ + YYSYMBOL_optional_field_annotation = 355, /* optional_field_annotation */ + YYSYMBOL_optional_override = 356, /* optional_override */ + YYSYMBOL_optional_constant = 357, /* optional_constant */ + YYSYMBOL_optional_public_or_private_member_variable = 358, /* optional_public_or_private_member_variable */ + YYSYMBOL_optional_static_member_variable = 359, /* optional_static_member_variable */ + YYSYMBOL_structure_variable_declaration = 360, /* structure_variable_declaration */ + YYSYMBOL_struct_variable_declaration_list = 361, /* struct_variable_declaration_list */ + YYSYMBOL_362_34 = 362, /* $@34 */ + YYSYMBOL_363_35 = 363, /* $@35 */ + YYSYMBOL_364_36 = 364, /* $@36 */ + YYSYMBOL_function_argument_declaration = 365, /* function_argument_declaration */ + YYSYMBOL_function_argument_list = 366, /* function_argument_list */ + YYSYMBOL_tuple_type = 367, /* tuple_type */ + YYSYMBOL_tuple_type_list = 368, /* tuple_type_list */ + YYSYMBOL_tuple_alias_type_list = 369, /* tuple_alias_type_list */ + YYSYMBOL_variant_type = 370, /* variant_type */ + YYSYMBOL_variant_type_list = 371, /* variant_type_list */ + YYSYMBOL_variant_alias_type_list = 372, /* variant_alias_type_list */ + YYSYMBOL_copy_or_move = 373, /* copy_or_move */ + YYSYMBOL_variable_declaration = 374, /* variable_declaration */ + YYSYMBOL_copy_or_move_or_clone = 375, /* copy_or_move_or_clone */ + YYSYMBOL_optional_ref = 376, /* optional_ref */ + YYSYMBOL_let_variable_name_with_pos_list = 377, /* let_variable_name_with_pos_list */ + YYSYMBOL_let_variable_declaration = 378, /* let_variable_declaration */ + YYSYMBOL_global_variable_declaration_list = 379, /* global_variable_declaration_list */ + YYSYMBOL_380_37 = 380, /* $@37 */ + YYSYMBOL_optional_shared = 381, /* optional_shared */ + YYSYMBOL_optional_public_or_private_variable = 382, /* optional_public_or_private_variable */ + YYSYMBOL_global_let = 383, /* global_let */ + YYSYMBOL_384_38 = 384, /* $@38 */ + YYSYMBOL_enum_list = 385, /* enum_list */ + YYSYMBOL_optional_public_or_private_alias = 386, /* optional_public_or_private_alias */ + YYSYMBOL_single_alias = 387, /* single_alias */ + YYSYMBOL_388_39 = 388, /* $@39 */ + YYSYMBOL_alias_list = 389, /* alias_list */ + YYSYMBOL_alias_declaration = 390, /* alias_declaration */ + YYSYMBOL_391_40 = 391, /* $@40 */ + YYSYMBOL_optional_public_or_private_enum = 392, /* optional_public_or_private_enum */ + YYSYMBOL_enum_name = 393, /* enum_name */ + YYSYMBOL_enum_declaration = 394, /* enum_declaration */ + YYSYMBOL_395_41 = 395, /* $@41 */ + YYSYMBOL_396_42 = 396, /* $@42 */ + YYSYMBOL_397_43 = 397, /* $@43 */ + YYSYMBOL_398_44 = 398, /* $@44 */ + YYSYMBOL_optional_structure_parent = 399, /* optional_structure_parent */ + YYSYMBOL_optional_sealed = 400, /* optional_sealed */ + YYSYMBOL_structure_name = 401, /* structure_name */ + YYSYMBOL_class_or_struct = 402, /* class_or_struct */ + YYSYMBOL_optional_public_or_private_structure = 403, /* optional_public_or_private_structure */ + YYSYMBOL_optional_struct_variable_declaration_list = 404, /* optional_struct_variable_declaration_list */ + YYSYMBOL_structure_declaration = 405, /* structure_declaration */ + YYSYMBOL_406_45 = 406, /* $@45 */ + YYSYMBOL_407_46 = 407, /* $@46 */ + YYSYMBOL_variable_name_with_pos_list = 408, /* variable_name_with_pos_list */ + YYSYMBOL_basic_type_declaration = 409, /* basic_type_declaration */ + YYSYMBOL_enum_basic_type_declaration = 410, /* enum_basic_type_declaration */ + YYSYMBOL_structure_type_declaration = 411, /* structure_type_declaration */ + YYSYMBOL_auto_type_declaration = 412, /* auto_type_declaration */ + YYSYMBOL_bitfield_bits = 413, /* bitfield_bits */ + YYSYMBOL_bitfield_alias_bits = 414, /* bitfield_alias_bits */ + YYSYMBOL_bitfield_type_declaration = 415, /* bitfield_type_declaration */ + YYSYMBOL_416_47 = 416, /* $@47 */ + YYSYMBOL_417_48 = 417, /* $@48 */ + YYSYMBOL_c_or_s = 418, /* c_or_s */ + YYSYMBOL_table_type_pair = 419, /* table_type_pair */ + YYSYMBOL_dim_list = 420, /* dim_list */ + YYSYMBOL_type_declaration_no_options = 421, /* type_declaration_no_options */ + YYSYMBOL_422_49 = 422, /* $@49 */ + YYSYMBOL_423_50 = 423, /* $@50 */ + YYSYMBOL_424_51 = 424, /* $@51 */ + YYSYMBOL_425_52 = 425, /* $@52 */ + YYSYMBOL_426_53 = 426, /* $@53 */ + YYSYMBOL_427_54 = 427, /* $@54 */ + YYSYMBOL_428_55 = 428, /* $@55 */ + YYSYMBOL_429_56 = 429, /* $@56 */ + YYSYMBOL_430_57 = 430, /* $@57 */ + YYSYMBOL_431_58 = 431, /* $@58 */ + YYSYMBOL_432_59 = 432, /* $@59 */ + YYSYMBOL_433_60 = 433, /* $@60 */ + YYSYMBOL_434_61 = 434, /* $@61 */ + YYSYMBOL_435_62 = 435, /* $@62 */ + YYSYMBOL_436_63 = 436, /* $@63 */ + YYSYMBOL_437_64 = 437, /* $@64 */ + YYSYMBOL_438_65 = 438, /* $@65 */ + YYSYMBOL_439_66 = 439, /* $@66 */ + YYSYMBOL_440_67 = 440, /* $@67 */ + YYSYMBOL_441_68 = 441, /* $@68 */ + YYSYMBOL_442_69 = 442, /* $@69 */ + YYSYMBOL_443_70 = 443, /* $@70 */ + YYSYMBOL_444_71 = 444, /* $@71 */ + YYSYMBOL_445_72 = 445, /* $@72 */ + YYSYMBOL_446_73 = 446, /* $@73 */ + YYSYMBOL_447_74 = 447, /* $@74 */ + YYSYMBOL_448_75 = 448, /* $@75 */ + YYSYMBOL_type_declaration = 449, /* type_declaration */ + YYSYMBOL_tuple_alias_declaration = 450, /* tuple_alias_declaration */ + YYSYMBOL_451_76 = 451, /* $@76 */ + YYSYMBOL_452_77 = 452, /* $@77 */ + YYSYMBOL_453_78 = 453, /* $@78 */ + YYSYMBOL_454_79 = 454, /* $@79 */ + YYSYMBOL_variant_alias_declaration = 455, /* variant_alias_declaration */ + YYSYMBOL_456_80 = 456, /* $@80 */ + YYSYMBOL_457_81 = 457, /* $@81 */ + YYSYMBOL_458_82 = 458, /* $@82 */ + YYSYMBOL_459_83 = 459, /* $@83 */ + YYSYMBOL_bitfield_alias_declaration = 460, /* bitfield_alias_declaration */ + YYSYMBOL_461_84 = 461, /* $@84 */ + YYSYMBOL_462_85 = 462, /* $@85 */ + YYSYMBOL_463_86 = 463, /* $@86 */ + YYSYMBOL_464_87 = 464, /* $@87 */ + YYSYMBOL_make_decl = 465, /* make_decl */ + YYSYMBOL_make_struct_fields = 466, /* make_struct_fields */ + YYSYMBOL_make_variant_dim = 467, /* make_variant_dim */ + YYSYMBOL_make_struct_single = 468, /* make_struct_single */ + YYSYMBOL_make_struct_dim = 469, /* make_struct_dim */ + YYSYMBOL_make_struct_dim_list = 470, /* make_struct_dim_list */ + YYSYMBOL_make_struct_dim_decl = 471, /* make_struct_dim_decl */ + YYSYMBOL_optional_make_struct_dim_decl = 472, /* optional_make_struct_dim_decl */ + YYSYMBOL_optional_block = 473, /* optional_block */ + YYSYMBOL_optional_trailing_semicolon_cur_cur = 474, /* optional_trailing_semicolon_cur_cur */ + YYSYMBOL_optional_trailing_semicolon_cur_sqr = 475, /* optional_trailing_semicolon_cur_sqr */ + YYSYMBOL_optional_trailing_semicolon_sqr_sqr = 476, /* optional_trailing_semicolon_sqr_sqr */ + YYSYMBOL_optional_trailing_delim_sqr_sqr = 477, /* optional_trailing_delim_sqr_sqr */ + YYSYMBOL_optional_trailing_delim_cur_sqr = 478, /* optional_trailing_delim_cur_sqr */ + YYSYMBOL_use_initializer = 479, /* use_initializer */ + YYSYMBOL_make_struct_decl = 480, /* make_struct_decl */ + YYSYMBOL_481_88 = 481, /* $@88 */ + YYSYMBOL_482_89 = 482, /* $@89 */ + YYSYMBOL_483_90 = 483, /* $@90 */ + YYSYMBOL_484_91 = 484, /* $@91 */ + YYSYMBOL_485_92 = 485, /* $@92 */ + YYSYMBOL_486_93 = 486, /* $@93 */ + YYSYMBOL_487_94 = 487, /* $@94 */ + YYSYMBOL_488_95 = 488, /* $@95 */ + YYSYMBOL_make_tuple = 489, /* make_tuple */ + YYSYMBOL_make_map_tuple = 490, /* make_map_tuple */ + YYSYMBOL_make_tuple_call = 491, /* make_tuple_call */ + YYSYMBOL_492_96 = 492, /* $@96 */ + YYSYMBOL_493_97 = 493, /* $@97 */ + YYSYMBOL_make_dim = 494, /* make_dim */ + YYSYMBOL_make_dim_decl = 495, /* make_dim_decl */ + YYSYMBOL_496_98 = 496, /* $@98 */ + YYSYMBOL_497_99 = 497, /* $@99 */ + YYSYMBOL_498_100 = 498, /* $@100 */ + YYSYMBOL_499_101 = 499, /* $@101 */ + YYSYMBOL_500_102 = 500, /* $@102 */ + YYSYMBOL_501_103 = 501, /* $@103 */ + YYSYMBOL_502_104 = 502, /* $@104 */ + YYSYMBOL_503_105 = 503, /* $@105 */ + YYSYMBOL_504_106 = 504, /* $@106 */ + YYSYMBOL_505_107 = 505, /* $@107 */ + YYSYMBOL_make_table = 506, /* make_table */ + YYSYMBOL_expr_map_tuple_list = 507, /* expr_map_tuple_list */ + YYSYMBOL_make_table_decl = 508, /* make_table_decl */ + YYSYMBOL_array_comprehension_where = 509, /* array_comprehension_where */ + YYSYMBOL_optional_comma = 510, /* optional_comma */ + YYSYMBOL_array_comprehension = 511 /* array_comprehension */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -976,19 +977,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 14786 +#define YYLAST 14980 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 217 +#define YYNTOKENS 218 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 294 /* YYNRULES -- Number of rules. */ -#define YYNRULES 885 +#define YYNRULES 890 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 1676 +#define YYNSTATES 1690 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 444 +#define YYMAXUTOK 445 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1005,16 +1006,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 203, 2, 216, 214, 199, 192, 2, - 212, 213, 197, 196, 186, 195, 209, 198, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 189, 180, - 193, 187, 194, 188, 215, 2, 2, 2, 2, 2, + 2, 2, 2, 204, 2, 217, 215, 200, 193, 2, + 213, 214, 198, 197, 187, 196, 210, 199, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 190, 181, + 194, 188, 195, 189, 216, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 210, 2, 211, 191, 2, 2, 2, 2, 2, + 2, 211, 2, 212, 192, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 178, 190, 179, 202, 2, 2, 2, + 2, 2, 2, 179, 191, 180, 203, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1045,103 +1046,104 @@ static const yytype_uint8 yytranslate[] = 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 181, 182, 183, 184, 185, 200, 201, - 204, 205, 206, 207, 208 + 175, 176, 177, 178, 182, 183, 184, 185, 186, 201, + 202, 205, 206, 207, 208, 209 }; #if DAS_YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 542, 542, 543, 548, 549, 550, 551, 552, 553, - 554, 555, 556, 557, 558, 559, 560, 564, 570, 571, - 572, 576, 577, 581, 599, 600, 601, 602, 606, 610, - 615, 624, 632, 648, 653, 661, 661, 700, 730, 734, - 735, 736, 740, 743, 747, 753, 762, 765, 771, 772, - 776, 780, 781, 785, 788, 794, 800, 803, 809, 810, - 814, 815, 816, 825, 826, 830, 831, 831, 837, 838, - 839, 840, 841, 845, 851, 851, 857, 857, 863, 871, - 881, 890, 890, 897, 898, 899, 900, 901, 902, 906, - 911, 919, 920, 921, 925, 926, 927, 928, 929, 930, - 931, 932, 938, 941, 947, 950, 953, 959, 960, 961, - 965, 978, 996, 999, 1007, 1018, 1029, 1040, 1043, 1050, - 1054, 1061, 1062, 1066, 1067, 1068, 1072, 1075, 1082, 1086, - 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, - 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, - 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, - 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, - 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, - 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, - 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, - 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, - 1167, 1168, 1169, 1174, 1192, 1193, 1194, 1198, 1204, 1204, - 1221, 1225, 1236, 1245, 1254, 1260, 1261, 1262, 1263, 1264, - 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, - 1275, 1276, 1277, 1278, 1279, 1280, 1284, 1289, 1295, 1301, - 1312, 1313, 1317, 1318, 1322, 1323, 1327, 1331, 1338, 1338, - 1338, 1344, 1344, 1344, 1353, 1387, 1390, 1393, 1396, 1402, - 1403, 1414, 1418, 1421, 1429, 1429, 1429, 1432, 1438, 1441, - 1445, 1449, 1456, 1463, 1469, 1473, 1477, 1480, 1483, 1491, - 1494, 1497, 1505, 1508, 1516, 1519, 1522, 1530, 1536, 1537, - 1538, 1542, 1543, 1547, 1548, 1552, 1557, 1565, 1571, 1577, - 1586, 1598, 1601, 1607, 1607, 1607, 1610, 1610, 1610, 1615, - 1615, 1615, 1623, 1623, 1623, 1629, 1639, 1650, 1663, 1673, - 1684, 1699, 1702, 1708, 1709, 1716, 1727, 1728, 1729, 1733, - 1734, 1735, 1736, 1740, 1745, 1753, 1754, 1758, 1763, 1770, - 1777, 1777, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1796, - 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, - 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1818, 1819, - 1820, 1821, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, - 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1847, - 1854, 1866, 1871, 1881, 1885, 1892, 1895, 1895, 1895, 1900, - 1900, 1900, 1913, 1917, 1921, 1926, 1933, 1933, 1933, 1940, - 1944, 1954, 1963, 1972, 1976, 1979, 1985, 1986, 1987, 1988, - 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, - 2019, 2020, 2026, 2027, 2028, 2029, 2030, 2043, 2044, 2045, - 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2057, - 2060, 2061, 2064, 2064, 2064, 2067, 2072, 2076, 2080, 2080, - 2080, 2085, 2088, 2092, 2092, 2092, 2097, 2100, 2101, 2102, - 2103, 2104, 2105, 2106, 2107, 2108, 2110, 2114, 2115, 2120, - 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2134, 2138, 2142, - 2146, 2150, 2154, 2158, 2162, 2166, 2173, 2174, 2175, 2179, - 2180, 2181, 2185, 2186, 2190, 2191, 2192, 2196, 2197, 2201, - 2212, 2215, 2215, 2234, 2233, 2248, 2247, 2260, 2269, 2278, - 2288, 2289, 2293, 2296, 2305, 2306, 2310, 2313, 2316, 2332, - 2341, 2342, 2346, 2349, 2352, 2366, 2367, 2371, 2377, 2383, - 2386, 2390, 2396, 2405, 2406, 2407, 2411, 2412, 2416, 2423, - 2428, 2437, 2443, 2454, 2457, 2462, 2467, 2475, 2486, 2489, - 2489, 2509, 2510, 2514, 2515, 2516, 2520, 2523, 2523, 2542, - 2545, 2548, 2563, 2582, 2583, 2584, 2589, 2589, 2615, 2616, - 2620, 2621, 2621, 2625, 2626, 2627, 2631, 2641, 2646, 2641, - 2658, 2663, 2658, 2678, 2679, 2683, 2684, 2688, 2694, 2695, - 2699, 2700, 2701, 2705, 2708, 2714, 2719, 2714, 2733, 2740, - 2745, 2754, 2760, 2771, 2772, 2773, 2774, 2775, 2776, 2777, - 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, - 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, - 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2812, 2823, - 2827, 2834, 2846, 2853, 2862, 2867, 2870, 2883, 2883, 2883, - 2896, 2897, 2901, 2905, 2912, 2916, 2923, 2924, 2925, 2926, - 2927, 2942, 2948, 2948, 2948, 2952, 2957, 2964, 2964, 2971, - 2975, 2979, 2984, 2989, 2994, 2999, 3003, 3007, 3012, 3016, - 3020, 3025, 3025, 3025, 3031, 3038, 3038, 3038, 3043, 3043, - 3043, 3049, 3049, 3049, 3054, 3058, 3058, 3058, 3063, 3063, - 3063, 3072, 3076, 3076, 3076, 3081, 3081, 3081, 3090, 3094, - 3094, 3094, 3099, 3099, 3099, 3108, 3108, 3108, 3114, 3114, - 3114, 3123, 3126, 3137, 3153, 3153, 3158, 3163, 3153, 3188, - 3188, 3193, 3199, 3188, 3224, 3224, 3229, 3234, 3224, 3264, - 3265, 3266, 3267, 3268, 3272, 3279, 3286, 3292, 3298, 3305, - 3312, 3318, 3327, 3333, 3341, 3346, 3353, 3358, 3365, 3370, - 3376, 3377, 3381, 3382, 3387, 3388, 3392, 3393, 3397, 3398, - 3402, 3403, 3404, 3408, 3409, 3410, 3414, 3415, 3419, 3425, - 3432, 3440, 3447, 3455, 3464, 3464, 3464, 3472, 3472, 3472, - 3479, 3479, 3479, 3486, 3486, 3486, 3497, 3500, 3506, 3520, - 3526, 3532, 3538, 3538, 3538, 3548, 3553, 3560, 3568, 3573, - 3580, 3580, 3580, 3590, 3590, 3590, 3600, 3600, 3600, 3610, - 3618, 3618, 3618, 3637, 3644, 3644, 3644, 3654, 3659, 3666, - 3669, 3675, 3683, 3692, 3700, 3720, 3745, 3746, 3750, 3751, - 3756, 3759, 3762, 3765, 3768, 3771 + 0, 543, 543, 544, 549, 550, 551, 552, 553, 554, + 555, 556, 557, 558, 559, 560, 561, 565, 571, 572, + 573, 577, 578, 582, 600, 601, 602, 603, 607, 608, + 612, 617, 626, 634, 650, 655, 663, 663, 702, 732, + 736, 737, 738, 742, 745, 749, 755, 764, 767, 773, + 774, 778, 782, 783, 787, 790, 796, 802, 805, 811, + 812, 816, 817, 818, 827, 828, 832, 833, 833, 839, + 840, 841, 842, 843, 847, 853, 853, 859, 859, 865, + 873, 883, 892, 892, 899, 900, 901, 902, 903, 904, + 908, 913, 921, 922, 923, 927, 928, 929, 930, 931, + 932, 933, 934, 940, 943, 949, 952, 955, 961, 962, + 963, 967, 980, 998, 1001, 1009, 1020, 1031, 1042, 1045, + 1052, 1056, 1063, 1064, 1068, 1069, 1070, 1074, 1077, 1084, + 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, + 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, + 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, + 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, + 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, + 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, + 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, + 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, + 1168, 1169, 1170, 1171, 1176, 1194, 1195, 1196, 1200, 1206, + 1206, 1223, 1227, 1238, 1247, 1256, 1262, 1263, 1264, 1265, + 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, + 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1286, 1291, 1297, + 1303, 1314, 1315, 1319, 1320, 1324, 1325, 1329, 1333, 1340, + 1340, 1340, 1346, 1346, 1346, 1355, 1389, 1392, 1395, 1398, + 1404, 1405, 1416, 1420, 1423, 1431, 1431, 1431, 1434, 1440, + 1443, 1447, 1451, 1458, 1465, 1471, 1475, 1479, 1482, 1485, + 1493, 1496, 1499, 1507, 1510, 1518, 1521, 1524, 1532, 1538, + 1539, 1540, 1544, 1545, 1549, 1550, 1554, 1559, 1567, 1573, + 1579, 1588, 1600, 1603, 1609, 1609, 1609, 1612, 1612, 1612, + 1617, 1617, 1617, 1625, 1625, 1625, 1631, 1641, 1652, 1665, + 1675, 1686, 1701, 1704, 1710, 1711, 1718, 1729, 1730, 1731, + 1735, 1736, 1737, 1738, 1739, 1743, 1748, 1756, 1757, 1758, + 1762, 1767, 1774, 1781, 1781, 1790, 1791, 1792, 1793, 1794, + 1795, 1796, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, + 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, + 1818, 1822, 1823, 1824, 1825, 1830, 1831, 1832, 1833, 1834, + 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, + 1845, 1846, 1851, 1858, 1870, 1875, 1885, 1889, 1896, 1899, + 1899, 1899, 1904, 1904, 1904, 1917, 1921, 1925, 1930, 1937, + 1942, 1949, 1949, 1949, 1956, 1960, 1970, 1979, 1988, 1992, + 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, + 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, + 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2042, 2043, 2044, + 2045, 2046, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, + 2067, 2068, 2069, 2070, 2073, 2076, 2077, 2080, 2080, 2080, + 2083, 2088, 2092, 2096, 2096, 2096, 2101, 2104, 2108, 2108, + 2108, 2113, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, + 2124, 2126, 2130, 2131, 2136, 2140, 2141, 2142, 2143, 2144, + 2145, 2146, 2150, 2154, 2158, 2162, 2166, 2170, 2174, 2178, + 2182, 2189, 2190, 2191, 2195, 2196, 2197, 2201, 2202, 2206, + 2207, 2208, 2212, 2213, 2217, 2228, 2231, 2231, 2250, 2249, + 2264, 2263, 2276, 2285, 2294, 2304, 2305, 2309, 2312, 2321, + 2322, 2326, 2329, 2332, 2348, 2357, 2358, 2362, 2365, 2368, + 2382, 2383, 2387, 2393, 2399, 2402, 2406, 2412, 2421, 2422, + 2423, 2427, 2428, 2432, 2439, 2444, 2453, 2459, 2470, 2473, + 2478, 2483, 2491, 2502, 2505, 2505, 2525, 2526, 2530, 2531, + 2532, 2536, 2539, 2539, 2558, 2561, 2564, 2579, 2598, 2599, + 2600, 2605, 2605, 2631, 2632, 2636, 2637, 2637, 2641, 2642, + 2643, 2647, 2657, 2662, 2657, 2674, 2679, 2674, 2694, 2695, + 2699, 2700, 2704, 2710, 2711, 2715, 2716, 2717, 2721, 2724, + 2730, 2735, 2730, 2749, 2756, 2761, 2770, 2776, 2787, 2788, + 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, + 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, + 2809, 2810, 2811, 2812, 2813, 2817, 2818, 2819, 2820, 2821, + 2822, 2823, 2824, 2828, 2839, 2843, 2850, 2862, 2869, 2878, + 2883, 2886, 2899, 2899, 2899, 2912, 2913, 2917, 2921, 2928, + 2932, 2939, 2940, 2941, 2942, 2943, 2958, 2964, 2964, 2964, + 2968, 2973, 2980, 2980, 2987, 2991, 2995, 3000, 3005, 3010, + 3015, 3019, 3023, 3028, 3032, 3036, 3041, 3041, 3041, 3047, + 3054, 3054, 3054, 3059, 3059, 3059, 3065, 3065, 3065, 3070, + 3074, 3074, 3074, 3079, 3079, 3079, 3088, 3092, 3092, 3092, + 3097, 3097, 3097, 3106, 3110, 3110, 3110, 3115, 3115, 3115, + 3124, 3124, 3124, 3130, 3130, 3130, 3139, 3142, 3153, 3169, + 3169, 3174, 3179, 3169, 3204, 3204, 3209, 3215, 3204, 3240, + 3240, 3245, 3250, 3240, 3280, 3281, 3282, 3283, 3284, 3288, + 3295, 3302, 3308, 3314, 3321, 3328, 3334, 3343, 3349, 3357, + 3362, 3369, 3374, 3381, 3386, 3392, 3393, 3397, 3398, 3403, + 3404, 3408, 3409, 3413, 3414, 3418, 3419, 3420, 3424, 3425, + 3426, 3430, 3431, 3435, 3441, 3448, 3456, 3463, 3471, 3480, + 3480, 3480, 3488, 3488, 3488, 3495, 3495, 3495, 3502, 3502, + 3502, 3513, 3516, 3522, 3536, 3542, 3548, 3554, 3554, 3554, + 3564, 3569, 3576, 3584, 3589, 3596, 3596, 3596, 3606, 3606, + 3606, 3616, 3616, 3616, 3626, 3634, 3634, 3634, 3653, 3660, + 3660, 3660, 3670, 3675, 3682, 3685, 3691, 3699, 3708, 3716, + 3736, 3761, 3762, 3766, 3767, 3772, 3775, 3778, 3781, 3784, + 3787 }; #endif @@ -1158,64 +1160,64 @@ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "\"lexer error\"", - "\"struct\"", "\"class\"", "\"let\"", "\"def\"", "\"while\"", "\"if\"", - "\"static_if\"", "\"else\"", "\"for\"", "\"recover\"", "\"true\"", - "\"false\"", "\"new\"", "\"typeinfo\"", "\"type\"", "\"in\"", "\"is\"", - "\"as\"", "\"elif\"", "\"static_elif\"", "\"array\"", "\"return\"", - "\"null\"", "\"break\"", "\"try\"", "\"options\"", "\"table\"", - "\"expect\"", "\"const\"", "\"require\"", "\"operator\"", "\"enum\"", - "\"finally\"", "\"delete\"", "\"deref\"", "\"typedef\"", "\"typedecl\"", - "\"with\"", "\"aka\"", "\"assume\"", "\"cast\"", "\"override\"", - "\"abstract\"", "\"upcast\"", "\"iterator\"", "\"var\"", "\"addr\"", - "\"continue\"", "\"where\"", "\"pass\"", "\"reinterpret\"", "\"module\"", - "\"public\"", "\"label\"", "\"goto\"", "\"implicit\"", "\"explicit\"", - "\"shared\"", "\"private\"", "\"smart_ptr\"", "\"unsafe\"", - "\"inscope\"", "\"static\"", "\"fixed_array\"", "\"default\"", - "\"uninitialized\"", "\"bool\"", "\"void\"", "\"string\"", "\"auto\"", - "\"int\"", "\"int2\"", "\"int3\"", "\"int4\"", "\"uint\"", - "\"bitfield\"", "\"uint2\"", "\"uint3\"", "\"uint4\"", "\"float\"", - "\"float2\"", "\"float3\"", "\"float4\"", "\"range\"", "\"urange\"", - "\"range64\"", "\"urange64\"", "\"block\"", "\"int64\"", "\"uint64\"", - "\"double\"", "\"function\"", "\"lambda\"", "\"int8\"", "\"uint8\"", - "\"int16\"", "\"uint16\"", "\"tuple\"", "\"variant\"", "\"generator\"", - "\"yield\"", "\"sealed\"", "\"+=\"", "\"-=\"", "\"/=\"", "\"*=\"", - "\"%=\"", "\"&=\"", "\"|=\"", "\"^=\"", "\"<<\"", "\">>\"", "\"++\"", - "\"--\"", "\"<=\"", "\"<<=\"", "\">>=\"", "\">=\"", "\"==\"", "\"!=\"", - "\"->\"", "\"<-\"", "\"??\"", "\"?.\"", "\"?[\"", "\"<|\"", "\" <|\"", - "\"$ <|\"", "\"@ <|\"", "\"@@ <|\"", "\"|>\"", "\":=\"", "\"<<<\"", - "\">>>\"", "\"<<<=\"", "\">>>=\"", "\"=>\"", "\"::\"", "\"&&\"", - "\"||\"", "\"^^\"", "\"&&=\"", "\"||=\"", "\"^^=\"", "\"..\"", "\"$$\"", - "\"$i\"", "\"$v\"", "\"$b\"", "\"$a\"", "\"$t\"", "\"$c\"", "\"$f\"", - "\"...\"", "\"[[\"", "\"[{\"", "\"{{\"", "\"integer constant\"", - "\"long integer constant\"", "\"unsigned integer constant\"", - "\"unsigned long integer constant\"", "\"unsigned int8 constant\"", - "\"floating point constant\"", "\"double constant\"", "\"name\"", - "\"keyword\"", "\"type function\"", "\"start of the string\"", - "STRING_CHARACTER", "STRING_CHARACTER_ESC", "\"end of the string\"", - "\"{\"", "\"}\"", "\"end of failed eader macro\"", - "\"begin of code block\"", "\"end of code block\"", - "\"end of expression\"", "\";}}\"", "\";}]\"", "\";]]\"", "\",]]\"", - "\",}]\"", "','", "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", - "'-'", "'+'", "'*'", "'/'", "'%'", "UNARY_MINUS", "UNARY_PLUS", "'~'", - "'!'", "PRE_INC", "PRE_DEC", "POST_INC", "POST_DEC", "DEREF", "'.'", - "'['", "']'", "'('", "')'", "'$'", "'@'", "'#'", "$accept", "program", - "top_level_reader_macro", "optional_public_or_private_module", - "module_name", "module_declaration", "character_sequence", - "string_constant", "string_builder_body", "string_builder", - "reader_character_sequence", "expr_reader", "$@1", "options_declaration", - "require_declaration", "keyword_or_name", "require_module_name", - "require_module", "is_public_module", "expect_declaration", - "expect_list", "expect_error", "expression_label", "expression_goto", - "elif_or_static_elif", "expression_else", "if_or_static_if", - "expression_else_one_liner", "$@2", "expression_if_one_liner", - "expression_if_then_else", "$@3", "expression_for_loop", "$@4", - "expression_unsafe", "expression_while_loop", "expression_with", - "expression_with_alias", "$@5", "annotation_argument_value", - "annotation_argument_value_list", "annotation_argument_name", - "annotation_argument", "annotation_argument_list", - "metadata_argument_list", "annotation_declaration_name", - "annotation_declaration_basic", "annotation_declaration", - "annotation_list", "optional_annotation_list", + "\"capture\"", "\"struct\"", "\"class\"", "\"let\"", "\"def\"", + "\"while\"", "\"if\"", "\"static_if\"", "\"else\"", "\"for\"", + "\"recover\"", "\"true\"", "\"false\"", "\"new\"", "\"typeinfo\"", + "\"type\"", "\"in\"", "\"is\"", "\"as\"", "\"elif\"", "\"static_elif\"", + "\"array\"", "\"return\"", "\"null\"", "\"break\"", "\"try\"", + "\"options\"", "\"table\"", "\"expect\"", "\"const\"", "\"require\"", + "\"operator\"", "\"enum\"", "\"finally\"", "\"delete\"", "\"deref\"", + "\"typedef\"", "\"typedecl\"", "\"with\"", "\"aka\"", "\"assume\"", + "\"cast\"", "\"override\"", "\"abstract\"", "\"upcast\"", "\"iterator\"", + "\"var\"", "\"addr\"", "\"continue\"", "\"where\"", "\"pass\"", + "\"reinterpret\"", "\"module\"", "\"public\"", "\"label\"", "\"goto\"", + "\"implicit\"", "\"explicit\"", "\"shared\"", "\"private\"", + "\"smart_ptr\"", "\"unsafe\"", "\"inscope\"", "\"static\"", + "\"fixed_array\"", "\"default\"", "\"uninitialized\"", "\"bool\"", + "\"void\"", "\"string\"", "\"auto\"", "\"int\"", "\"int2\"", "\"int3\"", + "\"int4\"", "\"uint\"", "\"bitfield\"", "\"uint2\"", "\"uint3\"", + "\"uint4\"", "\"float\"", "\"float2\"", "\"float3\"", "\"float4\"", + "\"range\"", "\"urange\"", "\"range64\"", "\"urange64\"", "\"block\"", + "\"int64\"", "\"uint64\"", "\"double\"", "\"function\"", "\"lambda\"", + "\"int8\"", "\"uint8\"", "\"int16\"", "\"uint16\"", "\"tuple\"", + "\"variant\"", "\"generator\"", "\"yield\"", "\"sealed\"", "\"+=\"", + "\"-=\"", "\"/=\"", "\"*=\"", "\"%=\"", "\"&=\"", "\"|=\"", "\"^=\"", + "\"<<\"", "\">>\"", "\"++\"", "\"--\"", "\"<=\"", "\"<<=\"", "\">>=\"", + "\">=\"", "\"==\"", "\"!=\"", "\"->\"", "\"<-\"", "\"??\"", "\"?.\"", + "\"?[\"", "\"<|\"", "\" <|\"", "\"$ <|\"", "\"@ <|\"", "\"@@ <|\"", + "\"|>\"", "\":=\"", "\"<<<\"", "\">>>\"", "\"<<<=\"", "\">>>=\"", + "\"=>\"", "\"::\"", "\"&&\"", "\"||\"", "\"^^\"", "\"&&=\"", "\"||=\"", + "\"^^=\"", "\"..\"", "\"$$\"", "\"$i\"", "\"$v\"", "\"$b\"", "\"$a\"", + "\"$t\"", "\"$c\"", "\"$f\"", "\"...\"", "\"[[\"", "\"[{\"", "\"{{\"", + "\"integer constant\"", "\"long integer constant\"", + "\"unsigned integer constant\"", "\"unsigned long integer constant\"", + "\"unsigned int8 constant\"", "\"floating point constant\"", + "\"double constant\"", "\"name\"", "\"keyword\"", "\"type function\"", + "\"start of the string\"", "STRING_CHARACTER", "STRING_CHARACTER_ESC", + "\"end of the string\"", "\"{\"", "\"}\"", + "\"end of failed eader macro\"", "\"begin of code block\"", + "\"end of code block\"", "\"end of expression\"", "\";}}\"", "\";}]\"", + "\";]]\"", "\",]]\"", "\",}]\"", "','", "'='", "'?'", "':'", "'|'", + "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", + "UNARY_MINUS", "UNARY_PLUS", "'~'", "'!'", "PRE_INC", "PRE_DEC", + "POST_INC", "POST_DEC", "DEREF", "'.'", "'['", "']'", "'('", "')'", + "'$'", "'@'", "'#'", "$accept", "program", "top_level_reader_macro", + "optional_public_or_private_module", "module_name", "module_declaration", + "character_sequence", "string_constant", "string_builder_body", + "string_builder", "reader_character_sequence", "expr_reader", "$@1", + "options_declaration", "require_declaration", "keyword_or_name", + "require_module_name", "require_module", "is_public_module", + "expect_declaration", "expect_list", "expect_error", "expression_label", + "expression_goto", "elif_or_static_elif", "expression_else", + "if_or_static_if", "expression_else_one_liner", "$@2", + "expression_if_one_liner", "expression_if_then_else", "$@3", + "expression_for_loop", "$@4", "expression_unsafe", + "expression_while_loop", "expression_with", "expression_with_alias", + "$@5", "annotation_argument_value", "annotation_argument_value_list", + "annotation_argument_name", "annotation_argument", + "annotation_argument_list", "metadata_argument_list", + "annotation_declaration_name", "annotation_declaration_basic", + "annotation_declaration", "annotation_list", "optional_annotation_list", "optional_function_argument_list", "optional_function_type", "function_name", "global_function_declaration", "optional_public_or_private_function", "function_declaration_header", @@ -1288,12 +1290,12 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-1453) +#define YYPACT_NINF (-1464) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-753) +#define YYTABLE_NINF (-758) #define yytable_value_is_error(Yyn) \ ((Yyn) == YYTABLE_NINF) @@ -1302,174 +1304,175 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - -1453, 99, -1453, -1453, 34, 109, 290, -8, -1453, -87, - 413, 413, 413, -1453, 150, 52, -1453, -1453, 5, -1453, - -1453, -1453, 489, -1453, 281, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, 96, -1453, 203, 302, 268, - -1453, -1453, -1453, -1453, 290, -1453, 24, -1453, 413, 413, - -1453, -1453, 281, -1453, -1453, -1453, -1453, -1453, 339, 329, - -1453, -1453, -1453, 52, 52, 52, 326, -1453, 574, -92, - -1453, -1453, -1453, -1453, 469, 665, 686, -1453, 687, 55, - 34, 342, 109, 370, 471, -1453, 677, 677, -1453, 510, - 419, 15, 503, 694, 571, 573, 594, -1453, 643, 582, - -1453, -1453, -7, 34, 52, 52, 52, 52, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, 648, -1453, -1453, -1453, -1453, - -1453, 601, -1453, -1453, -1453, -1453, -1453, 148, 128, -1453, - -1453, -1453, -1453, 749, -1453, -1453, -1453, -1453, -1453, 628, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 661, - -1453, 155, -1453, -42, 696, 574, 14618, -1453, 479, 745, - -1453, -95, -1453, -1453, 693, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, 181, -1453, 664, -1453, 681, 682, 695, -1453, - -1453, 13225, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, 842, 843, -1453, - 668, 706, -1453, 458, -1453, 718, -1453, 710, 34, 34, - -114, 179, -1453, -1453, -1453, 128, -1453, 9925, -1453, -1453, - -1453, 723, 734, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, 735, 697, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, 888, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - 742, 704, -1453, -1453, 113, 725, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, 738, 729, 741, - -1453, -95, 318, -1453, -1453, 34, 708, 882, 536, -1453, - -1453, 733, 737, 744, 716, 747, 750, -1453, -1453, -1453, - 722, -1453, -1453, -1453, -1453, -1453, 751, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 752, -1453, - -1453, -1453, 754, 759, -1453, -1453, -1453, -1453, 760, 761, - 730, 150, -1453, -1453, -1453, -1453, -1453, 397, 739, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, 767, 820, -1453, 746, - -1453, 219, -1453, 68, 9925, -1453, 2341, 0, -1453, 150, - -1453, -1453, -1453, 179, 748, -1453, 9032, 789, 792, 9925, - -1453, 116, -1453, -1453, -1453, 9032, -1453, -1453, 793, -1453, - 172, 425, 431, -1453, -1453, 9032, -105, -1453, -1453, -1453, - 51, -1453, -1453, -1453, 26, 5392, -1453, 753, 9681, 251, - 9780, 506, -1453, -1453, 9032, -1453, -1453, 260, -71, -1453, - 739, -1453, 769, 772, 9032, -1453, -1453, -1453, -1453, -1453, - 530, -79, 773, 44, 1919, -1453, -1453, 706, 340, 5594, - 755, 9032, 800, 776, 777, 763, -1453, 791, 779, 812, - 5796, -5, 347, 783, -1453, 349, 784, 785, 3364, 9032, - 9032, 62, 62, 62, 774, 775, 778, 781, 782, 790, - -1453, 1757, 9532, 6000, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, 6202, 786, -1453, 6406, 949, -1453, 9032, 9032, 9032, - 9032, 9032, 4988, 9032, -1453, 788, -1453, -1453, 809, 811, - 9032, 987, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, 575, -1453, -72, 817, -1453, 821, 827, 829, -1453, - 830, -1453, -1453, 946, -1453, -1453, -1453, -1453, 802, -1453, - -1453, -54, -1453, -1453, -1453, -1453, -1453, -1453, 9344, -1453, - 801, -1453, -1453, -1453, -1453, -1453, -1453, 533, -1453, 835, - -1453, -1453, 36, -1453, -1453, 803, 823, 831, -1453, 10364, - -1453, 980, 873, -1453, -1453, -1453, 3768, 9925, 9925, 9925, - 10474, 9925, 9925, 810, 857, 9925, 668, 9925, 668, 9925, - 668, 10024, 858, 10509, -1453, 9032, -1453, -1453, -1453, -1453, - 816, -1453, -1453, 12684, 9032, -1453, 397, 848, -1453, 850, - -17, -1453, -1453, 572, -1453, 739, 856, 847, 572, -1453, - 859, 10619, 825, 997, -1453, 138, -1453, -1453, -1453, 13260, - 260, -1453, 828, -1453, -1453, 150, 394, -1453, 851, 852, - 853, -1453, 9032, 3768, -1453, 855, 913, 10107, 1034, 9925, - 9032, 9032, 14001, 9032, 13260, 864, -1453, -1453, 9032, -1453, - -1453, 863, 894, 14001, 9032, -1453, -1453, 9032, -1453, -1453, - 9032, -1453, 9925, 3768, -1453, 10107, 229, 229, 844, -1453, - 802, -1453, -1453, -1453, 9032, 9032, 9032, 9032, 9032, 9032, - 260, 2755, 260, 2958, 260, 13359, -1453, 717, -1453, 13260, - -1453, 689, 260, -1453, 872, 884, 229, 229, -18, 229, - 229, 260, 1051, 880, 14001, 880, 280, -1453, -1453, 13260, - -1453, -1453, -1453, -1453, 3970, -1453, -1453, -1453, -1453, -1453, - -1453, -29, 911, 62, -1453, 13099, 14510, 4172, 4172, 4172, - 4172, 4172, 4172, 4172, 4172, 9032, 9032, -1453, -1453, 9032, - 4172, 4172, 9032, 9032, 9032, 902, 4172, 9032, 420, 9032, - 9032, 9032, 9032, 9032, 9032, 4172, 4172, 9032, 9032, 9032, - 4172, 4172, 4172, 9032, 4172, 6608, 9032, 9032, 9032, 9032, - 9032, 9032, 9032, 9032, 9032, 9032, 134, 9032, -1453, 6810, - -1453, 9032, -1453, 0, -1453, 52, 1064, -95, 9925, -1453, - 906, -1453, 3768, -1453, 10219, 380, 459, 881, 133, -1453, - 544, 588, -1453, -1453, 291, 609, 725, 616, 725, 623, - 725, -1453, 392, -1453, 422, -1453, 9925, 866, 880, -1453, - -1453, 12783, -1453, -1453, 9925, -1453, -1453, 9925, -1453, -1453, - -1453, 9032, 909, -1453, 912, -1453, 9925, -1453, 3768, 9925, - 9925, -1453, 38, 9925, 5190, 7012, 914, 9032, 9925, -1453, - -1453, -1453, 9925, 880, -1453, 855, 9032, 9032, 9032, 9032, - 9032, 9032, 9032, 9032, 9032, 9032, 9032, 9032, 9032, 9032, - 9032, 9032, 9032, 9032, 706, 862, 868, 872, 14001, 10654, - -1453, -1453, 9925, 9925, 10764, 9925, -1453, -1453, 10799, 9925, - 880, 9925, 9925, 880, 9925, 417, -1453, 10107, -1453, 911, - 10909, 10944, 11054, 11089, 11199, 11234, 41, 62, 875, 213, - 3161, 4376, 7214, 13458, 898, 7, 123, 899, 222, 42, - 7416, 7, 622, 45, 9032, 915, 9032, -1453, -1453, 9925, - -1453, 9925, -1453, 9032, 598, 48, 9032, 916, -1453, 49, - 260, 9032, 879, 885, 890, 891, 434, -1453, -1453, 688, - 9032, 802, -82, 4580, -1453, 227, 898, 897, 929, 929, - -1453, -1453, -13, 668, -1453, 918, 892, -1453, -1453, 920, - 903, -1453, -1453, 62, 62, 62, -1453, -1453, 2103, -1453, - 2103, -1453, 2103, -1453, 2103, -1453, 2103, -1453, 2103, -1453, - 2103, -1453, 2103, 822, 822, 467, -1453, 2103, -1453, 2103, - 467, 659, 659, 905, -1453, 2103, 35, 917, -1453, 12882, - 130, 130, 801, 14001, 822, 822, -1453, 2103, -1453, 2103, - 14341, 14216, 14251, -1453, 2103, -1453, 2103, -1453, 2103, 14091, - -1453, 2103, 14541, 13493, 9390, 1436, 14369, 467, 467, 188, - 188, 35, 35, 35, 466, 9032, 921, 922, 491, 9032, - 1113, 12917, -1453, 231, 13583, 939, 319, 703, 1055, 943, - 1060, -1453, -1453, 10329, -1453, -1453, -1453, -1453, 9925, -1453, - -1453, 956, -1453, -1453, 931, -1453, 932, -1453, 933, -1453, - 10024, -1453, 858, 450, 739, -1453, -1453, -1453, 739, 739, - 11344, -1453, 1086, 9, -1453, 10107, 1135, 1224, 9032, 624, - 541, 238, 919, 923, 967, 11379, 430, 11489, 631, 9925, - 9925, 9925, 1249, 924, 14001, 14001, 14001, 14001, 14001, 14001, - 14001, 14001, 14001, 14001, 14001, 14001, 14001, 14001, 14001, 14001, - 14001, 14001, -1453, 926, 9925, -1453, -1453, -1453, 9032, 1254, - 1529, -1453, 1606, -1453, 1677, 927, 1764, 2675, 930, 2877, - 911, 668, -1453, -1453, -1453, -1453, -1453, 935, 9032, -1453, - 9032, 9032, 9032, 4784, 12684, 21, 9032, 556, 541, 123, - -1453, -1453, 928, -1453, 9032, 9032, -1453, 934, -1453, 9032, - 541, 547, 937, -1453, -1453, 9032, 14001, -1453, -1453, 475, - 520, 13618, 9032, -1453, -1453, 2553, 9032, 53, -1453, -1453, - 9032, 9032, 9925, 668, 706, -1453, -1453, 9032, -1453, 9540, - 911, 175, -1453, 936, 335, 9234, -1453, -1453, -1453, 351, - 250, 976, 982, 984, 985, -1453, 355, 725, -1453, 9032, - -1453, 9032, -1453, -1453, -1453, 7618, 9032, -1453, 961, 945, - -1453, -1453, 9032, 947, -1453, 13016, 9032, 7820, 951, -1453, - 13115, -1453, -1453, -1453, -1453, -1453, 962, -1453, -1453, 265, - -1453, 50, -1453, 911, -1453, -1453, -1453, -1453, 739, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, 952, 9925, -1453, 1000, 9032, -1453, -1453, - 495, -1453, 942, -1453, -1453, -1453, 521, -1453, 1003, 960, - -1453, -1453, 3080, 3283, 3486, -1453, -1453, 9032, 3688, 14001, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 660, - 725, 8022, 581, 11524, 14001, 14001, 7, 123, 14001, 963, - 224, 898, -1453, -1453, 14001, 899, -1453, 583, 7, 966, - -1453, -1453, -1453, -1453, 586, -1453, -1453, -1453, 611, -1453, - 612, 9032, 11634, 11669, 3890, 725, -1453, 13260, -1453, 993, - 668, -1453, 968, 4580, 1011, 972, 163, -1453, -1453, -1453, - -1453, -13, 977, -25, 9925, 11779, 9925, 11814, -1453, 261, - 11924, -1453, 9032, 14126, 9032, -1453, 11959, -1453, 267, 9032, - -1453, -1453, -1453, 1157, 50, -1453, -1453, 703, 989, -1453, - -1453, -1453, 9032, 739, -1453, 14001, 990, 991, -1453, -1453, - -1453, 9032, 1029, 1005, 9032, -1453, -1453, -1453, -1453, 995, - 996, 1006, 9032, 9032, 9032, 1008, 1139, 1009, 1010, 8224, - -1453, -25, -1453, 293, 9032, 247, 123, -1453, 9032, 9032, - 9032, 9032, 547, -1453, 9032, 9032, 1013, 9032, 9032, 614, - -1453, -1453, -1453, 1032, 688, 3566, -1453, 725, -1453, 358, - -1453, 226, 9925, 116, -1453, -1453, 8426, -1453, -1453, 4092, - -1453, 632, -1453, -1453, -1453, 9925, 12069, 12104, -1453, -1453, - 12214, -1453, -1453, 1157, 260, 1015, 1139, 1139, 12249, 1037, - 1028, 12359, 1030, 1038, 1039, 9032, -1453, 9032, 467, 467, - 467, 9032, -1453, -1453, 1139, 541, -1453, 12394, -1453, -1453, - 13708, 9032, 9032, -1453, 12504, 14001, 14001, 13708, -1453, 1069, - 467, 9032, -1453, 1069, 13708, 9032, 119, -1453, -1453, 8628, - 8830, -1453, -1453, -1453, -1453, -1453, 14001, 706, 1040, 9925, - 116, 974, 9032, 9032, 14091, -1453, -1453, 637, -1453, -1453, - -1453, 14618, -1453, -1453, -1453, 124, 124, -1453, 9032, 9032, - -1453, 1139, 1139, 541, 1045, 1046, 880, 124, 898, 1047, - -1453, 1210, 1052, 14001, 14001, 255, 1087, 1088, 1079, 1090, - 1061, 13708, -1453, 119, 9032, 9032, 14001, -1453, -1453, 974, - 9032, 9032, 13747, 14126, -1453, -1453, -1453, 1091, 14618, 541, - 898, 1092, -1453, 1066, 1072, 12539, 12649, 124, 124, 1074, - -1453, -1453, 1075, 1076, -1453, 9032, 1062, 9032, 9032, 1063, - 1103, -1453, 1077, -1453, -1453, 1080, -1453, 14001, 9032, 13837, - 13872, -1453, -1453, -1453, 706, 309, 1089, -1453, -1453, -1453, - -1453, -1453, 1093, 1094, -1453, -1453, -1453, 14001, -1453, 14001, - 14001, -1453, -1453, -1453, -1453, 13962, -1453, -1453, -1453, -1453, - 541, -1453, -1453, -1453, 313, -1453 + -1464, 46, -1464, -1464, 54, -99, 160, -52, -1464, -17, + 636, 636, 636, -1464, 166, 291, -1464, -1464, -12, -1464, + -1464, -1464, 457, -1464, 133, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, 152, -1464, 195, 179, 200, + -1464, -1464, -1464, -1464, 160, -1464, 37, -1464, 636, 636, + -1464, -1464, 133, -1464, -1464, -1464, -1464, -1464, 432, 316, + -1464, -1464, -1464, 291, 291, 291, 455, -1464, 574, 134, + -1464, -1464, -1464, -1464, 645, 681, 709, -1464, 733, 53, + 54, 520, -99, 407, 522, -1464, 691, 691, -1464, 559, + 581, 60, 602, 734, 626, 631, 640, -1464, 648, 646, + -1464, -1464, -24, 54, 291, 291, 291, 291, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, 661, -1464, -1464, -1464, -1464, + -1464, 652, -1464, -1464, -1464, -1464, -1464, 741, 109, -1464, + -1464, -1464, -1464, 784, -1464, -1464, -1464, -1464, -1464, 662, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 678, + -1464, 12, -1464, 206, 710, 574, 14811, -1464, 155, 766, + -1464, -71, -1464, -1464, -1464, 746, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, 285, -1464, 687, -1464, 697, 708, 714, + -1464, -1464, 13412, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 849, 863, + -1464, 696, 731, -1464, 680, -1464, 743, -1464, 737, 54, + 54, 3, 137, -1464, -1464, -1464, 109, -1464, 10066, -1464, + -1464, -1464, 756, 763, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, 767, 726, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 918, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, 772, 730, -1464, -1464, 182, 753, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 765, 758, + 770, -1464, -71, 141, -1464, -1464, 54, 738, 902, 621, + -1464, -1464, 752, 759, 760, 739, 761, 768, -1464, -1464, + -1464, 744, -1464, -1464, -1464, -1464, -1464, 769, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 771, + -1464, -1464, -1464, 773, 776, -1464, -1464, -1464, -1464, 777, + 778, 747, 166, -1464, -1464, -1464, -1464, -1464, 350, 782, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, 781, 823, -1464, + 748, -1464, 92, -1464, 61, 10066, -1464, 2178, -121, -1464, + 166, -1464, -1464, -1464, 137, 762, -1464, 9274, 795, 806, + 10066, -1464, -25, -1464, -1464, -1464, 9274, -1464, -1464, 808, + -1464, 405, 412, 429, -1464, -1464, 9274, -79, -1464, -1464, + -1464, 14, -1464, -1464, -1464, 42, 5432, -1464, 775, 9822, + 331, 9921, 507, -1464, -1464, 9274, -1464, -1464, 154, -54, + -1464, 782, -1464, 786, 787, 9274, -1464, -1464, -1464, -1464, + -1464, 108, -60, 789, 35, 3202, -1464, -1464, 731, 241, + 5634, 779, 9274, 809, 794, 796, 783, -1464, 810, 803, + 827, 5836, 94, 265, 804, -1464, 328, 805, 807, 3404, + 9274, 9274, 237, 237, 237, 790, 791, 793, 800, 801, + 802, -1464, 1594, 9637, 6040, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, 6242, 814, -1464, 6446, 965, -1464, 9274, 9274, + 9274, 9274, 9274, 5028, 9274, -1464, 811, -1464, -1464, 828, + 836, 9274, 1008, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, 264, -1464, 24, 838, -1464, 839, 841, 847, + -1464, 851, -1464, -1464, 967, -1464, -1464, -1464, -1464, 824, + -1464, -1464, -50, -1464, -1464, -1464, -1464, -1464, -1464, 1721, + -1464, 821, -1464, -1464, -1464, -1464, -1464, -1464, 404, -1464, + 856, -1464, -1464, 44, -1464, -1464, 829, 843, 846, -1464, + 10615, -1464, 998, 1819, -1464, -1464, -1464, 3808, 10066, 10066, + 10066, 10650, 10066, 10066, 831, 877, 10066, 696, 10066, 696, + 10066, 696, 10165, 878, 10760, -1464, 9274, -1464, -1464, -1464, + -1464, 837, -1464, -1464, 12935, 9274, -1464, 350, 867, -1464, + 870, -39, -1464, -1464, 456, -1464, 782, 871, 864, 456, + -1464, 873, 10795, 844, 1013, -1464, -47, -1464, -1464, -1464, + 13447, 154, -1464, 850, -1464, -1464, 166, 381, -1464, 872, + 874, 875, -1464, 9274, 3808, -1464, 883, 949, 10248, 1067, + 10066, 9274, 9274, 14188, 9274, 13447, 895, -1464, -1464, 9274, + -1464, -1464, 896, 925, 14188, 9274, -1464, -1464, 9274, -1464, + -1464, 9274, -1464, 10066, 3808, -1464, 10248, 50, 50, 876, + -1464, 824, -1464, -1464, -1464, 9274, 9274, 9274, 9274, 9274, + 9274, 154, 2593, 154, 2796, 154, 13546, -1464, 742, -1464, + 13447, -1464, 732, 154, -1464, 901, 910, 50, 50, 80, + 50, 50, 154, 1077, 904, 14188, 904, 402, -1464, -1464, + 13447, -1464, -1464, -1464, -1464, 4010, -1464, -1464, -1464, -1464, + -1464, -1464, -41, 58, 237, -1464, 14590, 14685, 4212, 4212, + 4212, 4212, 4212, 4212, 4212, 4212, 9274, 9274, -1464, -1464, + 9274, 4212, 4212, 9274, 9274, 9274, 924, 4212, 9274, 555, + 9274, 9274, 9274, 9274, 9274, 9274, 4212, 4212, 9274, 9274, + 9274, 4212, 4212, 4212, 9274, 4212, 6648, 9274, 9274, 9274, + 9274, 9274, 9274, 9274, 9274, 9274, 9274, 14750, 9274, -1464, + 6850, -1464, 9274, -1464, -121, -1464, 291, 1086, -71, 10066, + -1464, 926, -1464, 3808, -1464, 10360, 48, 119, 903, 454, + -1464, 222, 482, -1464, -1464, 177, 672, 753, 673, 753, + 682, 753, -1464, 453, -1464, 511, -1464, 10066, 885, 904, + -1464, -1464, 12970, -1464, -1464, 10066, -1464, -1464, 10066, -1464, + -1464, -1464, 9274, 933, -1464, 934, -1464, 10066, -1464, 3808, + 10066, 10066, -1464, 25, 10066, 5230, 7052, 938, 9274, 10066, + -1464, -1464, -1464, 10066, 904, -1464, 883, 9274, 9274, 9274, + 9274, 9274, 9274, 9274, 9274, 9274, 9274, 9274, 9274, 9274, + 9274, 9274, 9274, 9274, 9274, 731, 122, 899, 901, 14188, + 10905, -1464, -1464, 10066, 10066, 10940, 10066, -1464, -1464, 11050, + 10066, 904, 10066, 10066, 904, 10066, 131, -1464, 10248, -1464, + 58, 11085, 11195, 11230, 11340, 11375, 11485, 34, 237, 905, + 244, 2999, 4416, 7254, 13645, 927, 8, 286, 928, 347, + 47, 7456, 8, 410, 57, 9274, 936, 9274, -1464, -1464, + 10066, -1464, 10066, -1464, 9274, 364, 69, 9274, 937, -1464, + 77, 154, 9274, 907, 908, 913, 914, 477, -1464, -1464, + 677, 9274, 824, 190, 4620, -1464, 309, 927, 909, 952, + 952, -1464, -1464, 915, 186, 696, -1464, 935, 917, -1464, + -1464, 940, 922, -1464, -1464, 237, 237, 237, -1464, -1464, + 10505, -1464, 10505, -1464, 10505, -1464, 10505, -1464, 10505, -1464, + 10505, -1464, 10505, -1464, 10505, 947, 947, 605, -1464, 10505, + -1464, 10505, 605, 1587, 1587, 923, -1464, 10505, 486, 929, + -1464, 13069, 167, 167, 821, 14188, 947, 947, -1464, 10505, + -1464, 10505, 14432, 1954, 14403, -1464, 10505, -1464, 10505, -1464, + 10505, 14278, -1464, 10505, 14716, 13680, 1922, 14522, 1266, 605, + 605, 659, 659, 486, 486, 486, 572, 9274, 939, 941, + 580, 9274, 1130, 942, 13168, -1464, 318, 13770, 958, 219, + 755, 1065, 959, 388, -1464, -1464, 10470, -1464, -1464, -1464, + -1464, 10066, -1464, -1464, 970, -1464, -1464, 946, -1464, 953, + -1464, 954, -1464, 10165, -1464, 878, 569, 782, -1464, -1464, + -1464, 782, 782, 11520, -1464, 1107, -56, -1464, 10248, 978, + 1064, 9274, 683, 588, 326, 945, 948, 982, 11630, 452, + 11665, 690, 10066, 10066, 10066, 2098, 950, 14188, 14188, 14188, + 14188, 14188, 14188, 14188, 14188, 14188, 14188, 14188, 14188, 14188, + 14188, 14188, 14188, 14188, 14188, -1464, 943, 10066, -1464, -1464, + -1464, 9274, 2513, 2715, -1464, 2918, -1464, 3121, 955, 3324, + 3526, 956, 3728, 58, 696, -1464, -1464, -1464, -1464, -1464, + 962, 9274, -1464, 9274, 9274, 9274, 4824, 12935, 147, 9274, + 606, 588, 286, -1464, -1464, 960, -1464, 9274, 9274, -1464, + 964, -1464, 9274, 588, 643, 966, -1464, -1464, 9274, 14188, + -1464, -1464, 573, 611, 13805, 9274, -1464, -1464, 2391, 9274, + 78, -1464, -1464, 9274, 9274, 10066, 696, 731, -1464, -1464, + 9274, -1464, 9639, 58, 226, -1464, 963, 238, 9476, -1464, + -1464, -1464, 254, 338, 186, 984, 991, 969, 992, 997, + -1464, 269, 753, -1464, 9274, -1464, 9274, -1464, -1464, -1464, + 7658, 9274, -1464, 986, 971, -1464, -1464, 9274, 972, -1464, + 13203, 9274, 7860, 975, -1464, 13302, -1464, 8062, -1464, -1464, + -1464, -1464, 1002, -1464, -1464, 215, -1464, 90, -1464, 58, + -1464, -1464, -1464, -1464, 782, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 977, + 10066, -1464, 1023, 9274, -1464, -1464, 355, -1464, 979, -1464, + -1464, -1464, 612, -1464, 1025, 983, -1464, -1464, 3930, 4132, + 4209, -1464, -1464, 9274, 4336, 14188, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, 686, 753, 8264, 647, 11775, + 14188, 14188, 8, 286, 14188, 985, 259, 927, -1464, -1464, + 14188, 928, -1464, 651, 8, 988, -1464, -1464, -1464, -1464, + 665, -1464, -1464, -1464, 667, -1464, 669, 9274, 11810, 11920, + 4413, 753, -1464, 13447, -1464, 1016, 696, -1464, 993, 4620, + 1033, 994, 546, 343, -1464, -1464, 1039, -1464, -1464, 186, + 1001, 158, 10066, 11955, 10066, 12065, -1464, 346, 12100, -1464, + 9274, 14313, 9274, -1464, 12210, -1464, 348, 9274, -1464, -1464, + -1464, 349, -1464, 1176, 90, -1464, -1464, 755, 1003, -1464, + -1464, -1464, 9274, 782, -1464, 14188, 1004, 1005, -1464, -1464, + -1464, 9274, 1041, 1020, 9274, -1464, -1464, -1464, -1464, 1007, + 1009, 1011, 9274, 9274, 9274, 1015, 1151, 1017, 1018, 8466, + -1464, 158, -1464, 383, 9274, 276, 286, -1464, 9274, 9274, + 9274, 9274, 643, -1464, 9274, 9274, 1019, 9274, 9274, 684, + -1464, -1464, -1464, 1027, 677, 3606, -1464, 753, -1464, 289, + -1464, 577, 10066, -25, -1464, 1012, -1464, -1464, 8668, -1464, + -1464, 4540, -1464, 699, -1464, -1464, -1464, 10066, 12245, 12355, + -1464, -1464, 12390, -1464, -1464, -1464, 1176, 154, 1021, 1151, + 1151, 12500, 1034, 1024, 12535, 1026, 1029, 1030, 9274, -1464, + 9274, 605, 605, 605, 9274, -1464, -1464, 1151, 588, -1464, + 12645, -1464, -1464, 13895, 9274, 9274, -1464, 12680, 14188, 14188, + 13895, -1464, 1052, 605, 9274, -1464, 1052, 13895, 9274, 267, + -1464, -1464, 8870, 9072, -1464, -1464, -1464, -1464, -1464, 14188, + 731, 1022, 10066, -25, 1440, 9274, -1464, 9274, 14278, -1464, + -1464, 705, -1464, -1464, -1464, 14811, -1464, -1464, -1464, 187, + 187, -1464, 9274, 9274, -1464, 1151, 1151, 588, 1037, 1042, + 904, 187, 927, 1044, -1464, 1185, 1028, 14188, 14188, 304, + 1075, 1081, 1057, 1082, 1051, 13895, -1464, 267, 9274, 9274, + 14188, -1464, -1464, 1440, 9274, 9274, 13934, 14313, -1464, -1464, + -1464, 1083, 14811, 588, 927, 1078, -1464, 1053, 1054, 12790, + 12825, 187, 187, 1055, -1464, -1464, 1056, 1058, -1464, 9274, + 1059, 9274, 9274, 1061, 1094, -1464, 1062, -1464, -1464, 1066, + -1464, 14188, 9274, 14024, 14059, -1464, -1464, -1464, 731, 392, + 1070, -1464, -1464, -1464, -1464, -1464, 1063, 1076, -1464, -1464, + -1464, 14188, -1464, 14188, 14188, -1464, -1464, -1464, -1464, 14149, + -1464, -1464, -1464, -1464, 588, -1464, -1464, -1464, 395, -1464 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1477,244 +1480,245 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_int16 yydefact[] = { - 2, 121, 1, 301, 0, 0, 0, 611, 302, 0, - 603, 603, 603, 16, 0, 0, 15, 3, 0, 10, - 9, 8, 0, 7, 591, 6, 11, 5, 4, 13, - 12, 14, 92, 93, 91, 100, 102, 37, 53, 50, - 51, 39, 40, 41, 0, 42, 48, 38, 603, 603, - 22, 21, 591, 605, 604, 774, 764, 769, 0, 269, - 35, 108, 109, 0, 0, 0, 110, 112, 119, 0, - 107, 17, 629, 628, 214, 613, 630, 592, 593, 0, - 0, 0, 0, 43, 0, 49, 0, 0, 46, 0, - 0, 603, 0, 18, 0, 0, 0, 271, 0, 0, - 118, 113, 0, 0, 0, 0, 0, 0, 122, 216, - 215, 218, 213, 615, 614, 0, 632, 631, 635, 595, - 594, 597, 98, 99, 96, 97, 95, 0, 0, 94, - 103, 54, 52, 48, 45, 44, 606, 608, 610, 0, - 612, 19, 20, 23, 775, 765, 770, 270, 33, 36, - 117, 0, 114, 115, 116, 120, 0, 616, 0, 625, - 588, 526, 24, 25, 0, 87, 88, 85, 86, 84, - 83, 89, 0, 47, 0, 609, 0, 0, 0, 34, - 111, 0, 188, 189, 190, 191, 192, 193, 194, 195, + 2, 122, 1, 302, 0, 0, 0, 616, 303, 0, + 608, 608, 608, 16, 0, 0, 15, 3, 0, 10, + 9, 8, 0, 7, 596, 6, 11, 5, 4, 13, + 12, 14, 93, 94, 92, 101, 103, 38, 54, 51, + 52, 40, 41, 42, 0, 43, 49, 39, 608, 608, + 22, 21, 596, 610, 609, 779, 769, 774, 0, 270, + 36, 109, 110, 0, 0, 0, 111, 113, 120, 0, + 108, 17, 634, 633, 215, 618, 635, 597, 598, 0, + 0, 0, 0, 44, 0, 50, 0, 0, 47, 0, + 0, 608, 0, 18, 0, 0, 0, 272, 0, 0, + 119, 114, 0, 0, 0, 0, 0, 0, 123, 217, + 216, 219, 214, 620, 619, 0, 637, 636, 640, 600, + 599, 602, 99, 100, 97, 98, 96, 0, 0, 95, + 104, 55, 53, 49, 46, 45, 611, 613, 615, 0, + 617, 19, 20, 23, 780, 770, 775, 271, 34, 37, + 118, 0, 115, 116, 117, 121, 0, 621, 0, 630, + 593, 531, 24, 25, 29, 0, 88, 89, 86, 87, + 85, 84, 90, 0, 48, 0, 614, 0, 0, 0, + 35, 112, 0, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 0, 0, 128, - 123, 0, 617, 0, 626, 0, 636, 589, 0, 0, - 528, 0, 26, 27, 28, 0, 101, 0, 776, 766, - 771, 182, 183, 180, 131, 132, 134, 133, 135, 136, - 137, 138, 164, 165, 162, 163, 155, 166, 167, 156, - 153, 154, 181, 175, 0, 179, 168, 169, 170, 171, - 142, 143, 144, 139, 140, 141, 152, 0, 158, 159, - 157, 150, 151, 146, 145, 147, 148, 149, 130, 129, - 174, 0, 160, 161, 526, 126, 246, 219, 599, 670, - 673, 676, 677, 671, 674, 672, 675, 0, 623, 633, - 596, 526, 0, 104, 106, 0, 0, 578, 576, 598, - 90, 0, 0, 0, 0, 0, 0, 643, 663, 644, - 679, 645, 649, 650, 651, 652, 669, 656, 657, 658, - 659, 660, 661, 662, 664, 665, 666, 667, 734, 648, - 655, 668, 741, 748, 646, 653, 647, 654, 0, 0, - 0, 0, 678, 696, 699, 697, 698, 761, 607, 684, - 556, 562, 184, 185, 178, 173, 186, 176, 172, 0, - 124, 300, 550, 0, 0, 217, 0, 618, 620, 0, - 627, 540, 637, 0, 0, 105, 0, 0, 0, 0, - 577, 0, 702, 725, 728, 0, 731, 721, 0, 687, - 735, 742, 749, 755, 758, 0, 0, 711, 716, 710, - 0, 724, 720, 713, 0, 0, 715, 700, 0, 777, - 767, 772, 187, 177, 0, 298, 299, 0, 526, 125, - 127, 248, 0, 0, 0, 63, 64, 76, 432, 433, - 0, 0, 0, 0, 286, 426, 284, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 285, 0, 0, 0, - 0, 0, 0, 0, 669, 0, 0, 0, 0, 0, + 206, 207, 208, 209, 210, 211, 212, 213, 0, 0, + 129, 124, 0, 622, 0, 631, 0, 641, 594, 0, + 0, 533, 0, 26, 27, 28, 0, 102, 0, 781, + 771, 776, 183, 184, 181, 132, 133, 135, 134, 136, + 137, 138, 139, 165, 166, 163, 164, 156, 167, 168, + 157, 154, 155, 182, 176, 0, 180, 169, 170, 171, + 172, 143, 144, 145, 140, 141, 142, 153, 0, 159, + 160, 158, 151, 152, 147, 146, 148, 149, 150, 131, + 130, 175, 0, 161, 162, 531, 127, 247, 220, 604, + 675, 678, 681, 682, 676, 679, 677, 680, 0, 628, + 638, 601, 531, 0, 105, 107, 0, 0, 583, 581, + 603, 91, 0, 0, 0, 0, 0, 0, 648, 668, + 649, 684, 650, 654, 655, 656, 657, 674, 661, 662, + 663, 664, 665, 666, 667, 669, 670, 671, 672, 739, + 653, 660, 673, 746, 753, 651, 658, 652, 659, 0, + 0, 0, 0, 683, 701, 704, 702, 703, 766, 612, + 689, 561, 567, 185, 186, 179, 174, 187, 177, 173, + 0, 125, 301, 555, 0, 0, 218, 0, 623, 625, + 0, 632, 545, 642, 0, 0, 106, 0, 0, 0, + 0, 582, 0, 707, 730, 733, 0, 736, 726, 0, + 692, 740, 747, 754, 760, 763, 0, 0, 716, 721, + 715, 0, 729, 725, 718, 0, 0, 720, 705, 0, + 782, 772, 777, 188, 178, 0, 299, 300, 0, 531, + 126, 128, 249, 0, 0, 0, 64, 65, 77, 437, + 438, 0, 0, 0, 0, 287, 431, 285, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 286, 0, 0, + 0, 0, 0, 0, 0, 674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 515, 0, 0, 0, 352, 354, 353, 355, 356, 357, - 358, 0, 0, 29, 0, 220, 225, 0, 0, 0, - 0, 0, 0, 0, 336, 337, 430, 429, 0, 0, - 0, 0, 241, 236, 233, 232, 234, 235, 268, 247, - 227, 509, 226, 427, 0, 500, 71, 72, 69, 239, - 70, 240, 242, 304, 231, 499, 498, 497, 121, 503, - 428, 0, 228, 502, 501, 473, 434, 474, 359, 435, - 0, 431, 779, 783, 780, 781, 782, 0, 600, 0, - 599, 624, 541, 590, 527, 0, 0, 0, 509, 0, - 580, 581, 0, 574, 575, 573, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 123, 0, 123, 0, - 123, 0, 0, 0, 707, 250, 718, 719, 712, 714, - 0, 717, 701, 0, 0, 763, 762, 0, 685, 0, - 269, 691, 690, 0, 557, 552, 0, 0, 0, 563, - 0, 0, 0, 638, 548, 567, 551, 824, 827, 0, - 0, 274, 278, 277, 283, 0, 0, 322, 0, 0, - 0, 860, 0, 0, 290, 287, 0, 331, 0, 0, - 254, 0, 272, 0, 0, 0, 313, 316, 0, 245, - 319, 0, 0, 57, 0, 78, 864, 0, 833, 842, - 0, 830, 0, 0, 295, 292, 462, 463, 337, 347, - 121, 267, 265, 266, 0, 0, 0, 0, 0, 0, - 0, 802, 0, 0, 0, 840, 867, 0, 258, 0, - 261, 0, 0, 869, 878, 0, 439, 438, 475, 437, - 436, 0, 0, 878, 331, 878, 338, 243, 244, 0, - 74, 350, 223, 507, 0, 230, 237, 238, 289, 294, - 303, 0, 345, 0, 229, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 464, 465, 0, + 0, 520, 0, 0, 0, 355, 357, 356, 358, 359, + 360, 361, 0, 0, 30, 0, 221, 226, 0, 0, + 0, 0, 0, 0, 0, 337, 338, 435, 434, 0, + 0, 0, 0, 242, 237, 234, 233, 235, 236, 269, + 248, 228, 514, 227, 432, 0, 505, 72, 73, 70, + 240, 71, 241, 243, 305, 232, 504, 503, 502, 122, + 508, 433, 0, 229, 507, 506, 478, 439, 479, 362, + 440, 0, 436, 784, 788, 785, 786, 787, 0, 605, + 0, 604, 629, 546, 595, 532, 0, 0, 0, 514, + 0, 585, 586, 0, 579, 580, 578, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 124, 0, 124, + 0, 124, 0, 0, 0, 712, 251, 723, 724, 717, + 719, 0, 722, 706, 0, 0, 768, 767, 0, 690, + 0, 270, 696, 695, 0, 562, 557, 0, 0, 0, + 568, 0, 0, 0, 643, 553, 572, 556, 829, 832, + 0, 0, 275, 279, 278, 284, 0, 0, 323, 0, + 0, 0, 865, 0, 0, 291, 288, 0, 332, 0, + 0, 255, 0, 273, 0, 0, 0, 314, 317, 0, + 246, 320, 0, 0, 58, 0, 79, 869, 0, 838, + 847, 0, 835, 0, 0, 296, 293, 467, 468, 338, + 350, 122, 268, 266, 267, 0, 0, 0, 0, 0, + 0, 0, 807, 0, 0, 0, 845, 872, 0, 259, + 0, 262, 0, 0, 874, 883, 0, 444, 443, 480, + 442, 441, 0, 0, 883, 332, 883, 339, 244, 245, + 0, 75, 353, 224, 512, 0, 231, 238, 239, 290, + 295, 304, 0, 347, 0, 230, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 416, 0, 222, 0, - 601, 0, 619, 621, 634, 0, 0, 526, 0, 579, - 0, 583, 0, 587, 359, 0, 0, 0, 692, 705, - 0, 0, 680, 682, 0, 0, 126, 0, 126, 0, - 126, 554, 0, 560, 0, 681, 0, 0, 878, 709, - 694, 0, 686, 778, 0, 558, 768, 0, 564, 773, - 549, 0, 0, 566, 0, 565, 0, 568, 0, 0, - 0, 79, 0, 0, 816, 0, 0, 0, 0, 850, - 853, 856, 0, 878, 291, 288, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 421, 0, 223, + 0, 606, 0, 624, 626, 639, 0, 0, 531, 0, + 584, 0, 588, 0, 592, 362, 0, 0, 0, 697, + 710, 0, 0, 685, 687, 0, 0, 127, 0, 127, + 0, 127, 559, 0, 565, 0, 686, 0, 0, 883, + 714, 699, 0, 691, 783, 0, 563, 773, 0, 569, + 778, 554, 0, 0, 571, 0, 570, 0, 573, 0, + 0, 0, 80, 0, 0, 821, 0, 0, 0, 0, + 855, 858, 861, 0, 883, 292, 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 878, 273, 0, - 80, 81, 0, 0, 0, 0, 55, 56, 0, 0, - 878, 0, 0, 878, 0, 0, 296, 293, 338, 345, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, - 0, 0, 0, 836, 794, 802, 0, 845, 0, 0, - 0, 802, 0, 0, 0, 0, 0, 805, 872, 0, - 249, 0, 32, 0, 30, 0, 879, 0, 246, 0, - 0, 879, 0, 0, 0, 0, 406, 403, 405, 60, - 0, 121, 0, 0, 419, 0, 793, 0, 0, 0, - 312, 311, 0, 123, 264, 0, 0, 486, 485, 0, - 0, 487, 491, 0, 0, 0, 381, 390, 369, 391, - 370, 393, 372, 392, 371, 394, 373, 384, 363, 385, - 364, 386, 365, 440, 441, 453, 395, 374, 396, 375, - 454, 451, 452, 0, 383, 361, 480, 0, 471, 0, - 504, 505, 506, 362, 442, 443, 397, 376, 398, 377, - 458, 459, 460, 387, 366, 388, 367, 389, 368, 461, - 382, 360, 0, 0, 456, 457, 455, 449, 450, 445, - 444, 446, 447, 448, 0, 0, 0, 412, 0, 0, - 0, 0, 424, 0, 0, 0, 0, 534, 537, 0, - 0, 582, 585, 359, 586, 703, 726, 729, 0, 732, - 722, 0, 688, 736, 0, 743, 0, 750, 0, 756, - 0, 759, 0, 0, 256, 706, 251, 695, 553, 559, - 0, 640, 641, 569, 572, 571, 0, 0, 0, 0, - 817, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 332, 369, 370, 372, 371, 373, - 363, 364, 365, 374, 375, 361, 376, 377, 366, 367, - 368, 360, 297, 0, 0, 873, 255, 476, 0, 0, - 0, 477, 0, 508, 0, 0, 0, 0, 0, 0, - 345, 123, 510, 511, 512, 513, 514, 0, 0, 803, - 0, 0, 0, 0, 331, 802, 0, 0, 0, 0, - 811, 812, 0, 819, 0, 0, 809, 0, 848, 0, - 0, 0, 0, 807, 849, 0, 839, 804, 868, 0, - 0, 0, 0, 870, 871, 0, 0, 0, 847, 466, - 0, 0, 0, 123, 0, 58, 59, 0, 73, 65, - 345, 0, 420, 0, 0, 0, 423, 421, 305, 0, - 0, 0, 0, 0, 0, 343, 0, 126, 482, 0, - 488, 0, 380, 378, 379, 0, 0, 469, 0, 0, - 492, 496, 0, 0, 472, 0, 0, 0, 0, 413, - 0, 417, 467, 425, 602, 622, 122, 535, 536, 537, - 538, 529, 542, 345, 584, 704, 727, 730, 693, 733, - 723, 683, 689, 737, 739, 744, 746, 751, 753, 757, - 555, 760, 561, 0, 0, 639, 0, 0, 825, 828, - 0, 275, 0, 280, 281, 279, 0, 325, 0, 0, - 328, 323, 0, 0, 0, 861, 859, 254, 0, 82, - 314, 317, 320, 865, 863, 834, 843, 841, 831, 0, - 126, 0, 0, 0, 785, 784, 802, 0, 837, 0, - 0, 795, 818, 810, 838, 846, 808, 0, 802, 0, - 814, 815, 822, 806, 0, 259, 262, 31, 0, 221, - 0, 0, 0, 0, 0, 126, 61, 0, 66, 0, - 123, 422, 0, 0, 0, 0, 576, 341, 342, 340, - 339, 0, 0, 0, 0, 0, 0, 0, 401, 0, - 0, 493, 0, 481, 0, 470, 0, 414, 0, 0, - 468, 418, 547, 532, 529, 530, 531, 534, 0, 740, - 747, 754, 250, 257, 642, 570, 0, 0, 77, 276, - 282, 0, 0, 0, 0, 324, 851, 854, 857, 0, - 0, 0, 0, 0, 0, 0, 816, 0, 0, 0, - 224, 0, 516, 0, 0, 0, 0, 820, 0, 0, - 0, 0, 0, 813, 0, 0, 252, 0, 0, 0, - 404, 525, 407, 0, 60, 0, 75, 126, 399, 0, - 306, 576, 0, 0, 344, 346, 0, 333, 349, 0, - 524, 0, 522, 402, 519, 0, 0, 0, 518, 415, - 0, 533, 543, 532, 0, 0, 816, 816, 0, 0, - 0, 0, 0, 0, 0, 250, 874, 254, 315, 318, - 321, 0, 817, 835, 816, 0, 478, 0, 348, 517, - 876, 0, 0, 821, 0, 787, 786, 876, 823, 876, - 260, 250, 263, 876, 876, 0, 0, 410, 62, 286, - 0, 67, 71, 72, 69, 70, 68, 0, 0, 0, - 0, 0, 0, 0, 334, 483, 489, 0, 523, 521, - 520, 0, 545, 539, 708, 801, 801, 326, 0, 0, - 329, 816, 816, 0, 0, 0, 878, 801, 792, 0, - 479, 0, 0, 789, 788, 0, 0, 0, 878, 0, - 0, 876, 408, 0, 0, 0, 292, 351, 400, 0, - 0, 0, 0, 335, 484, 490, 494, 0, 0, 0, - 798, 878, 800, 0, 0, 0, 0, 801, 801, 0, - 862, 875, 0, 0, 832, 0, 0, 0, 0, 0, - 0, 879, 0, 884, 880, 0, 411, 293, 0, 0, - 0, 310, 495, 544, 0, 0, 879, 799, 826, 829, - 327, 330, 0, 0, 858, 866, 844, 877, 882, 791, - 790, 883, 885, 253, 881, 0, 309, 308, 546, 796, - 0, 852, 855, 307, 0, 797 + 0, 0, 0, 0, 0, 0, 0, 0, 883, 274, + 0, 81, 82, 0, 0, 0, 0, 56, 57, 0, + 0, 883, 0, 0, 883, 0, 0, 297, 294, 339, + 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 270, 0, 0, 0, 841, 799, 807, 0, 850, 0, + 0, 0, 807, 0, 0, 0, 0, 0, 810, 877, + 0, 250, 0, 33, 0, 31, 0, 884, 0, 247, + 0, 0, 884, 0, 0, 0, 0, 409, 406, 408, + 61, 0, 122, 0, 0, 424, 0, 798, 0, 0, + 0, 313, 312, 0, 0, 124, 265, 0, 0, 491, + 490, 0, 0, 492, 496, 0, 0, 0, 384, 393, + 372, 394, 373, 396, 375, 395, 374, 397, 376, 387, + 366, 388, 367, 389, 368, 445, 446, 458, 398, 377, + 399, 378, 459, 456, 457, 0, 386, 364, 485, 0, + 476, 0, 509, 510, 511, 365, 447, 448, 400, 379, + 401, 380, 463, 464, 465, 390, 369, 391, 370, 392, + 371, 466, 385, 363, 0, 0, 461, 462, 460, 454, + 455, 450, 449, 451, 452, 453, 0, 0, 0, 415, + 0, 0, 0, 0, 0, 429, 0, 0, 0, 0, + 539, 542, 0, 0, 587, 590, 362, 591, 708, 731, + 734, 0, 737, 727, 0, 693, 741, 0, 748, 0, + 755, 0, 761, 0, 764, 0, 0, 257, 711, 252, + 700, 558, 564, 0, 645, 646, 574, 577, 576, 0, + 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 372, 373, + 375, 374, 376, 366, 367, 368, 377, 378, 364, 379, + 380, 369, 370, 371, 363, 298, 0, 0, 878, 256, + 481, 0, 0, 0, 482, 0, 513, 0, 0, 0, + 0, 0, 0, 347, 124, 515, 516, 517, 518, 519, + 0, 0, 808, 0, 0, 0, 0, 332, 807, 0, + 0, 0, 0, 816, 817, 0, 824, 0, 0, 814, + 0, 853, 0, 0, 0, 0, 812, 854, 0, 844, + 809, 873, 0, 0, 0, 0, 875, 876, 0, 0, + 0, 852, 471, 0, 0, 0, 124, 0, 59, 60, + 0, 74, 66, 347, 0, 425, 0, 0, 0, 428, + 426, 306, 0, 0, 0, 0, 0, 0, 0, 0, + 345, 0, 127, 487, 0, 493, 0, 383, 381, 382, + 0, 0, 474, 0, 0, 497, 501, 0, 0, 477, + 0, 0, 0, 0, 416, 0, 422, 0, 472, 430, + 607, 627, 123, 540, 541, 542, 543, 534, 547, 347, + 589, 709, 732, 735, 698, 738, 728, 688, 694, 742, + 744, 749, 751, 756, 758, 762, 560, 765, 566, 0, + 0, 644, 0, 0, 830, 833, 0, 276, 0, 281, + 282, 280, 0, 326, 0, 0, 329, 324, 0, 0, + 0, 866, 864, 255, 0, 83, 315, 318, 321, 870, + 868, 839, 848, 846, 836, 0, 127, 0, 0, 0, + 790, 789, 807, 0, 842, 0, 0, 800, 823, 815, + 843, 851, 813, 0, 807, 0, 819, 820, 827, 811, + 0, 260, 263, 32, 0, 222, 0, 0, 0, 0, + 0, 127, 62, 0, 67, 0, 124, 427, 0, 0, + 0, 0, 581, 0, 342, 343, 0, 341, 340, 0, + 0, 0, 0, 0, 0, 0, 404, 0, 0, 498, + 0, 486, 0, 475, 0, 417, 0, 0, 473, 423, + 419, 0, 552, 537, 534, 535, 536, 539, 0, 745, + 752, 759, 251, 258, 647, 575, 0, 0, 78, 277, + 283, 0, 0, 0, 0, 325, 856, 859, 862, 0, + 0, 0, 0, 0, 0, 0, 821, 0, 0, 0, + 225, 0, 521, 0, 0, 0, 0, 825, 0, 0, + 0, 0, 0, 818, 0, 0, 253, 0, 0, 0, + 407, 530, 410, 0, 61, 0, 76, 127, 402, 0, + 307, 581, 0, 0, 349, 0, 346, 348, 0, 334, + 352, 0, 529, 0, 527, 405, 524, 0, 0, 0, + 523, 418, 0, 420, 538, 548, 537, 0, 0, 821, + 821, 0, 0, 0, 0, 0, 0, 0, 251, 879, + 255, 316, 319, 322, 0, 822, 840, 821, 0, 483, + 0, 351, 522, 881, 0, 0, 826, 0, 792, 791, + 881, 828, 881, 261, 251, 264, 881, 881, 0, 0, + 413, 63, 287, 0, 68, 72, 73, 70, 71, 69, + 0, 0, 0, 0, 0, 0, 344, 0, 335, 488, + 494, 0, 528, 526, 525, 0, 550, 544, 713, 806, + 806, 327, 0, 0, 330, 821, 821, 0, 0, 0, + 883, 806, 797, 0, 484, 0, 0, 794, 793, 0, + 0, 0, 883, 0, 0, 881, 411, 0, 0, 0, + 293, 354, 403, 0, 0, 0, 0, 336, 489, 495, + 499, 0, 0, 0, 803, 883, 805, 0, 0, 0, + 0, 806, 806, 0, 867, 880, 0, 0, 837, 0, + 0, 0, 0, 0, 0, 884, 0, 889, 885, 0, + 414, 294, 0, 0, 0, 311, 500, 549, 0, 0, + 884, 804, 831, 834, 328, 331, 0, 0, 863, 871, + 849, 882, 887, 796, 795, 888, 890, 254, 886, 0, + 310, 309, 551, 801, 0, 857, 860, 308, 0, 802 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -1453, -1453, -1453, -1453, -1453, -1453, 599, 1223, -1453, -1453, - -1453, 1302, -1453, -1453, -1453, 743, 1267, -1453, 1182, -1453, - -1453, 1234, -1453, -1453, -1453, -147, -1453, -1453, -1453, -143, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 1106, - -1453, -1453, -52, -28, -1453, -1453, -1453, 640, 523, -515, - -561, -785, -1453, -1453, -1453, -1405, -1453, -1453, -209, -365, - -1453, 384, -1453, -1334, -1453, -1277, -324, 473, -1453, -1453, - -1453, -1453, -426, -14, -1453, -1453, -1453, -1453, -1453, -132, - -131, -130, -1453, -129, -1453, -1453, -1453, 1336, -1453, 373, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -438, -102, 720, -38, -1453, -885, -436, - -1453, -514, -1453, -1453, -364, 554, -1453, -1453, -1453, -1452, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 736, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -141, -60, -146, - -59, 80, -1453, -1453, -1453, -1453, -1453, 925, -1453, -574, - -1453, -1453, -578, -1453, -1453, -621, -142, -569, -1322, -1453, - -353, -1453, -1453, 1303, -1453, -1453, -1453, 794, 889, 210, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -586, -208, -1453, 938, -1453, -1453, -1453, -1453, -1453, -1453, - -399, -1453, -1453, -384, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -186, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, 941, -678, -217, - -815, -677, -1453, -1453, -1116, -893, -1453, -1453, -1453, -1153, - -94, -1164, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, - -1453, 174, -474, -1453, -1453, -1453, 667, -1453, -1453, -1453, - -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, -1453, 867, - -1453, -1416, -705, -1453 + -1464, -1464, -1464, -1464, -1464, -1464, 564, 1200, -1464, -1464, + -1464, 1279, -1464, -1464, -1464, 623, 1240, -1464, 1156, -1464, + -1464, 1209, -1464, -1464, -1464, -182, -1464, -1464, -1464, -181, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 1069, + -1464, -1464, -55, -46, -1464, -1464, -1464, 524, 500, -507, + -556, -791, -1464, -1464, -1464, -1463, -1464, -1464, -210, -361, + -1464, 360, -1464, -1357, -1464, -1279, -656, -88, -1464, -1464, + -1464, -1464, -411, -14, -1464, -1464, -1464, -1464, -1464, -178, + -159, -156, -1464, -128, -1464, -1464, -1464, 1348, -1464, 384, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -440, -100, 551, -36, 121, -891, -436, + -1464, -510, -1464, -1464, -366, 1133, -1464, -1464, -1464, -1405, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 560, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -132, -57, -148, + -58, 85, -1464, -1464, -1464, -1464, -1464, 932, -1464, -577, + -1464, -1464, -576, -1464, -1464, -620, -145, -570, -1327, -1464, + -348, -1464, -1464, 1312, -1464, -1464, -1464, 813, 919, 67, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -608, -189, -1464, 930, -1464, -1464, -1464, -1464, -1464, -1464, + -401, -1464, -1464, -376, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -215, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, 931, -684, -222, + -813, -672, -1464, -1464, -1077, -908, -1464, -1464, -1464, -1155, + -96, -1380, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, + -1464, 180, -480, -1464, -1464, -1464, 675, -1464, -1464, -1464, + -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, -1464, 880, + -1464, -1103, -707, -1464 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 16, 143, 52, 17, 164, 170, 701, 506, - 149, 507, 99, 19, 20, 45, 46, 47, 88, 21, - 39, 40, 508, 509, 1217, 1218, 510, 1369, 1465, 511, - 512, 960, 513, 630, 514, 515, 516, 517, 1148, 171, - 172, 35, 36, 37, 220, 66, 67, 68, 69, 22, - 285, 375, 210, 23, 111, 211, 112, 156, 679, 986, - 519, 376, 520, 827, 1532, 886, 1093, 568, 939, 1455, - 941, 1456, 522, 523, 524, 632, 853, 1419, 525, 526, - 527, 528, 529, 530, 531, 532, 427, 533, 731, 1229, - 970, 534, 535, 892, 1432, 893, 1433, 895, 1434, 536, - 858, 1425, 537, 713, 1478, 538, 1235, 1236, 973, 681, - 539, 788, 961, 540, 646, 987, 542, 543, 544, 958, - 545, 1212, 1536, 1213, 1593, 546, 1060, 1401, 547, 714, - 1384, 1604, 1386, 1605, 1485, 1642, 549, 371, 1407, 1492, - 1269, 1271, 1069, 562, 797, 1561, 1608, 372, 373, 613, - 822, 420, 618, 824, 421, 1172, 624, 576, 391, 308, - 309, 217, 301, 78, 121, 25, 161, 377, 89, 90, - 174, 91, 26, 49, 115, 158, 27, 288, 559, 560, - 1065, 380, 215, 216, 76, 118, 382, 28, 159, 299, - 625, 550, 297, 354, 355, 814, 419, 356, 584, 1282, - 1294, 807, 417, 357, 577, 1275, 826, 582, 1280, 578, - 1276, 579, 1277, 581, 1279, 585, 1283, 586, 1409, 587, - 1285, 588, 1410, 589, 1287, 590, 1411, 591, 1289, 592, - 1291, 615, 29, 95, 177, 360, 616, 30, 96, 178, - 361, 620, 31, 94, 176, 359, 609, 551, 1610, 1579, - 967, 925, 1611, 1612, 1613, 926, 938, 1194, 1188, 1183, - 1352, 1113, 552, 849, 1416, 850, 1417, 904, 1438, 901, - 1436, 927, 703, 553, 902, 1437, 928, 554, 1119, 1502, - 1120, 1503, 1121, 1504, 862, 1429, 899, 1435, 697, 887, - 555, 1582, 947, 556 + 0, 1, 16, 143, 52, 17, 165, 171, 702, 507, + 149, 508, 99, 19, 20, 45, 46, 47, 88, 21, + 39, 40, 509, 510, 1220, 1221, 511, 1375, 1475, 512, + 513, 961, 514, 631, 515, 516, 517, 518, 1151, 172, + 173, 35, 36, 37, 221, 66, 67, 68, 69, 22, + 286, 376, 211, 23, 111, 212, 112, 156, 680, 988, + 520, 377, 521, 828, 1545, 887, 1096, 569, 940, 1465, + 942, 1466, 523, 524, 525, 633, 854, 1429, 526, 527, + 528, 529, 530, 531, 532, 533, 428, 534, 732, 1232, + 971, 535, 536, 893, 1442, 894, 1443, 896, 1444, 537, + 859, 1435, 538, 714, 1490, 539, 1240, 1241, 975, 682, + 540, 789, 962, 541, 647, 989, 543, 544, 545, 959, + 546, 1215, 1549, 1216, 1607, 547, 1062, 1409, 548, 715, + 1392, 1618, 1394, 1619, 1497, 1656, 550, 372, 1417, 1505, + 1275, 1277, 1072, 563, 798, 1575, 1622, 373, 374, 614, + 823, 421, 619, 825, 422, 1175, 625, 577, 392, 309, + 310, 218, 302, 78, 121, 25, 161, 378, 89, 90, + 175, 91, 26, 49, 115, 158, 27, 289, 560, 561, + 1068, 381, 216, 217, 76, 118, 383, 28, 159, 300, + 626, 551, 298, 355, 356, 815, 420, 357, 585, 1288, + 1300, 808, 418, 358, 578, 1281, 827, 583, 1286, 579, + 1282, 580, 1283, 582, 1285, 586, 1289, 587, 1419, 588, + 1291, 589, 1420, 590, 1293, 591, 1421, 592, 1295, 593, + 1297, 616, 29, 95, 178, 361, 617, 30, 96, 179, + 362, 621, 31, 94, 177, 360, 610, 552, 1624, 1593, + 968, 926, 1625, 1626, 1627, 927, 939, 1197, 1191, 1186, + 1358, 1116, 553, 850, 1426, 851, 1427, 905, 1448, 902, + 1446, 928, 704, 554, 903, 1447, 929, 555, 1122, 1515, + 1123, 1516, 1124, 1517, 863, 1439, 900, 1445, 698, 888, + 556, 1596, 948, 557 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1722,3236 +1726,3278 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 60, 70, 287, 802, 848, 572, 645, 722, 952, 696, - 953, 518, 541, 924, 823, 924, 931, 821, 644, 353, - 221, 614, 619, 732, 1161, 816, 1342, 818, 130, 820, - 563, 1084, 1179, 1086, 606, 1088, 682, 683, 1191, 1112, - 1430, 358, 674, -121, 852, 84, 966, 796, 638, 70, - 70, 70, 32, 33, 1473, 735, 736, 1108, 598, 917, - 1168, 1189, 58, 218, 1195, 715, 304, 1202, 1206, 122, - 123, 53, 1361, 917, 918, 151, 733, 54, 1495, 518, - 85, 50, 369, 596, 1592, 61, 1221, 218, 594, 59, - 70, 70, 70, 70, 107, 1405, 723, 691, 693, 2, - 104, 305, 106, 518, 916, 3, 929, 595, 933, 758, - 759, 1586, 1231, 1587, 62, 1476, 945, 1589, 1590, 108, - 219, 306, 1232, 1096, 98, 949, 734, 51, 4, 968, - 5, 1222, 6, 635, 843, 104, 105, 106, 7, 307, - 724, 1636, 165, 166, 219, 639, 640, 1223, 8, 1550, - 803, 747, 748, 286, 9, 1406, 1607, 828, 1123, 755, - 383, 757, 758, 759, 760, 909, 353, 303, 557, 761, - 48, 1574, 834, 286, 1233, 1635, 966, 918, 10, 1234, - 558, 353, 1146, 969, 1447, 71, 63, 1178, 430, 1221, - 302, 786, 787, 58, 138, 1155, 845, 1588, 1158, 418, - 11, 12, 34, 1644, 863, 865, 150, 664, 735, 736, - 353, 518, 353, 352, 835, 794, 124, 864, 599, 838, - 59, 125, 86, 126, 844, 425, 127, 844, 844, 900, - 1575, 844, 903, 87, 844, 844, 600, 641, 648, 844, - 286, 573, 601, 597, 786, 787, 795, 906, 428, 735, - 736, 574, 665, 385, 755, 64, 642, 758, 759, 92, - 58, 1054, 1055, 843, 65, 885, 369, 128, 426, 954, - 38, 218, 1513, 353, 353, 1329, 504, 678, 518, 13, - 918, 429, 1337, 79, 966, 1224, 965, 59, 905, 167, - 1056, 58, 1221, 1523, 168, 1302, 169, 974, 14, 127, - 843, 139, 1057, 575, 747, 748, 1180, 1181, 518, 15, - 1171, 1403, 755, 611, 757, 758, 759, 760, 59, 612, - 162, 163, 761, 418, 844, 845, 370, 846, 219, 306, - 847, 1270, 1565, 1566, 1182, 1370, 1609, 406, 843, 786, - 787, 80, 77, 1058, 1059, 747, 748, 307, 1171, 843, - 1577, 1063, 1472, 755, 98, 390, 758, 759, 760, 1449, - 352, -738, 845, 761, 1207, 561, -738, 225, 180, 353, - 353, 353, 843, 353, 353, 352, 1072, 353, 971, 353, - 843, 353, 1521, 353, -738, 783, 784, 785, 1408, 80, - 1627, 805, 806, 808, 226, 810, 811, 786, 787, 815, - 845, 817, 1185, 819, 352, 1186, 352, 1617, 1618, 1078, - 622, 845, 1237, 1225, 1070, 1549, 1111, 866, 390, 607, - 851, 58, 1104, 1090, 866, 1092, 352, 636, 623, 407, - 954, 608, 966, 1187, 845, 955, 1374, 518, 786, 787, - 1226, 353, 845, 1446, 1263, 890, 1220, 866, 59, 407, - 1614, 1303, 1383, 866, 82, 1452, 408, 409, 41, 42, - 43, 1623, 1198, 1376, 353, 1106, 1107, 352, 352, 53, - 98, 1081, 1203, 956, 1483, 54, 408, 409, 1122, 866, - 1489, 1169, 1297, 518, 715, 1082, 1144, 735, 736, 44, - 940, 81, 715, 72, 73, 1177, 74, 924, 1336, 1177, - 1341, 1652, 1653, 131, 80, 107, 1519, 97, 1149, 1150, - 959, 1152, 924, 1348, 1292, 1154, 1290, 1156, 1157, 410, - 1159, 1177, 1669, 411, 75, 109, 1675, 978, 982, 384, - 1266, 110, 289, 649, 432, 433, 290, 1374, 103, 410, - 666, 1381, 669, 411, 1177, 1441, 1372, 1242, 1243, 1244, - 291, 292, 650, 1022, 443, 293, 294, 295, 296, 667, - 448, 670, 1375, 352, 352, 352, 1382, 352, 352, 1548, - 418, 352, 611, 352, 1075, 352, 1017, 352, 612, 87, - 1463, 745, 746, 747, 748, 412, 1089, 856, 1018, 413, - 353, 755, 414, 757, 758, 759, 760, 462, 463, 137, - 1330, 761, 611, 763, 764, 412, 857, 415, 612, 413, - 1308, 1160, 414, 416, -745, 1199, 1091, 1200, 353, -745, - -752, 855, 1253, -409, 1309, -752, 353, 415, -409, 353, - 611, 465, 466, 416, 1254, 352, 612, -745, 353, 133, - 1094, 353, 353, -752, 1293, 353, -409, 1258, 1098, 418, - 353, 1099, 1365, 1076, 353, 611, 1068, 212, 352, 1259, - 1103, 612, 781, 782, 783, 784, 785, 1109, 213, 1355, - 1300, 58, 1118, 286, 617, 1142, 786, 787, 136, 735, - 736, 866, 1547, 140, 353, 353, 611, 353, 481, 482, - 483, 353, 612, 353, 353, 1469, 353, 918, 59, 1214, - 611, 611, 957, 100, 101, 102, 612, 612, 494, 1221, - 1215, 1216, 1339, 790, 1356, 1421, 104, 105, 106, 1450, - 791, 113, 388, 631, 1340, 389, 1349, 114, 390, 1350, - 1332, 353, 1351, 353, 418, 1312, 1313, 1314, 1079, 144, - 502, 145, 116, 119, 152, 153, 154, 155, 117, 120, - 141, 1347, 611, 1094, 148, 1094, 142, 1354, 612, 1267, - 1318, 1444, 146, 1451, 1358, 1268, 1454, 866, 1360, 866, - 222, 223, 866, 745, 746, 747, 748, 749, 418, 160, - 752, 70, 1080, 755, 352, 757, 758, 759, 760, 504, - 678, 1457, 1458, 761, 1535, 763, 764, 866, 866, 418, - 866, 1192, 1185, 1083, 1193, 85, 418, 1389, 175, 1467, - 1085, 147, 352, 418, 418, 1440, 157, 1087, 1301, 1398, - 352, 418, 418, 352, 1522, 1311, 1556, 418, 1364, 134, - 135, 1606, 352, 179, 1251, 352, 352, 1578, 104, 352, - 518, 541, 735, 736, 352, 41, 42, 43, 352, 521, - 214, 227, 779, 780, 781, 782, 783, 784, 785, 228, - 229, 162, 163, 942, 943, 222, 223, 224, 786, 787, - 353, 1622, 1439, 230, 504, 678, 282, 283, 352, 352, - 284, 352, 353, 1632, 286, 352, 298, 352, 352, 300, - 352, 362, 1278, 1443, 407, 1578, 935, 936, 937, 55, - 56, 57, 363, 364, 1552, 407, 1647, 1422, 365, 366, - 367, 353, 353, 353, 374, 368, 378, 521, 379, 381, - 386, 408, 409, 1459, 387, 352, 392, 352, 395, 418, - 393, 1645, 408, 409, 398, 422, 353, 394, 747, 748, - 396, 521, 405, 397, 399, 400, 755, 401, 757, 758, - 759, 760, 402, 403, 404, 423, 761, 570, 424, 564, - 571, 583, 627, 604, 1628, 628, 637, 653, 655, 656, - 657, 659, 660, 661, 828, 658, 668, 671, 672, 700, - 1529, 1600, 1601, 1533, 410, 705, 684, 685, 411, 717, - 686, 718, 1674, 687, 688, 410, 720, 725, 573, 411, - 1479, 726, 689, 716, 353, 1366, 407, 727, 574, 728, - 729, 730, 15, 789, 792, 664, 798, 781, 782, 783, - 784, 785, 800, 812, 698, 813, 617, 829, 832, 833, - 1638, 786, 787, 408, 409, 836, 837, 841, 839, 842, - 854, 866, 611, 733, 859, 860, 861, 884, 612, 521, - 412, 891, 896, 801, 413, 897, 1143, 414, 946, 908, - 575, 412, 948, 950, 352, 413, 951, 828, 414, 972, - 1013, 1067, 415, 1576, 1071, 1077, 352, 1101, 416, 1095, - 1102, 1145, 1116, 415, 1177, 1184, 353, 1170, 1551, 416, - 1208, 1418, 407, 828, 1197, 1204, 410, 1228, 1209, 573, - 411, 645, 1210, 1211, 1239, 352, 352, 352, 1413, 574, - 1227, 1238, 548, 1240, 1261, 1241, 521, 1245, 1265, 408, - 409, 1270, 569, 1272, 1281, 1284, 1286, 1288, 1296, 1246, - 352, 580, 1304, 1256, 1257, 1306, 1305, 1316, 1317, 1343, - 1324, 593, 1402, 1327, 1377, 1346, 521, 1331, 1353, 1371, - 1378, 603, 1379, 1380, 1391, 1420, 865, 1392, 1464, 1394, - 621, 575, 412, 1399, 1412, 1599, 413, 407, 1414, 414, - 629, 1423, 1424, 1466, 1477, 1448, 353, 1453, 353, 1470, - 647, 1468, 410, 1471, 415, 652, 411, 654, 1475, 1491, - 416, 680, 680, 680, 408, 409, 663, 1499, 352, 1500, - 1481, 1439, 1496, 1497, 675, 676, 677, 1505, 1512, 1506, - 521, 521, 521, 521, 521, 521, 521, 521, 1507, 695, - 1511, 1514, 1515, 521, 521, 1531, 1537, 699, 1564, 521, - 695, 1568, 1477, 706, 707, 708, 709, 710, 521, 521, - 1569, 721, 1571, 521, 521, 521, 719, 521, 412, 1581, - 1572, 1573, 413, 1598, 1273, 414, 407, 410, 1620, 1621, - 1624, 411, 1625, 1626, 353, 1631, 1629, 1630, 721, 1633, - 415, 1643, 1634, 1658, 1661, 521, 416, 353, 1646, 1648, - 352, 407, 1662, 408, 409, 1649, 407, 1654, 1655, 1656, - 1663, 1664, 989, 991, 993, 995, 997, 999, 1001, 1557, - 944, 1670, 129, 18, 1006, 1008, 1671, 1672, 408, 409, - 1014, 83, 804, 408, 409, 173, 132, 1538, 1066, 1026, - 1028, 521, 1541, 412, 1033, 1035, 1037, 413, 1040, 1298, - 414, 310, 1205, 1542, 1543, 1544, 1545, 24, 1597, 1518, - 831, 353, 1230, 1474, 1493, 415, 410, 1562, 1494, 1404, - 411, 416, 1563, 626, 793, 93, 1619, 0, 1528, 1345, - 932, 704, 0, 0, 0, 0, 0, 721, 0, 0, - 352, 410, 352, 0, 0, 411, 410, 0, 633, 647, - 411, 634, 0, 0, 0, 0, 695, 888, 0, 889, - 0, 0, 0, 0, 894, 721, 0, 0, 0, 0, - 898, 0, 0, 0, 0, 0, 0, 0, 0, 907, - 0, 0, 412, 0, 0, 0, 413, 0, 1299, 414, - 910, 911, 912, 913, 914, 915, 0, 923, 0, 923, - 0, 0, 0, 0, 415, 1668, 0, 412, 0, 0, - 416, 413, 412, 1315, 414, 0, 413, 0, 1320, 414, - 0, 0, 0, 680, 0, 0, 735, 736, 352, 415, - 0, 0, 0, 0, 415, 416, 0, 0, 0, 0, - 416, 352, 0, 988, 990, 992, 994, 996, 998, 1000, - 1002, 1003, 1004, 0, 0, 1005, 1007, 1009, 1010, 1011, - 1012, 0, 1015, 1016, 0, 1019, 1020, 1021, 1023, 1024, - 1025, 1027, 1029, 1030, 1031, 1032, 1034, 1036, 1038, 1039, - 1041, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, - 1052, 1053, 957, 1061, 721, 0, 0, 1064, 0, 0, - 0, 0, 0, 0, 0, 352, 0, 0, 1073, 0, + 60, 70, 288, 803, 697, 646, 849, 953, 925, 954, + 925, 542, 723, 359, 573, 822, 519, 824, 1182, 1164, + 615, 620, 932, 853, 1194, 130, 1087, 1348, 1089, 222, + 1091, 817, 733, 819, 645, 821, 564, 683, 684, 354, + 639, 967, 1115, 607, 1440, 1111, 2, 597, 558, 70, + 70, 70, -122, 3, 1171, 1483, 797, 151, 675, 84, + 559, 918, 973, 38, 716, 1508, 1526, 1192, 122, 123, + 844, 736, 737, 32, 33, 599, 4, 1198, 5, 844, + 6, 734, 58, 917, 519, 930, 7, 934, 219, 1205, + 70, 70, 70, 70, 85, 946, 8, 1209, 1367, 426, + 370, 574, 9, 98, 950, 219, 692, 694, 519, 59, + 307, 575, 1621, 433, 434, 595, 92, 53, 969, 104, + 105, 106, 1099, 54, 166, 167, 10, 48, 308, 1579, + 1580, 735, 846, 444, 596, 419, 1415, 640, 641, 449, + 845, 846, 427, 847, 1606, 220, 848, 1591, 11, 12, + 1226, 835, 50, 636, 1563, 408, 829, 1126, 139, 1658, + 431, 1588, 220, 576, 408, 304, 804, 748, 749, 71, + 384, 967, 970, 303, 910, 756, 463, 464, 759, 760, + 761, 1149, 409, 410, 305, 762, 354, 1602, 1457, 1181, + 150, 409, 410, 724, 1158, 77, 1416, 1161, 51, 80, + 918, 354, 1650, 864, 866, 1631, 1632, 598, 759, 760, + 466, 467, 845, 836, 353, 124, 519, 974, 839, 306, + 125, 845, 126, 34, 795, 127, 181, 13, 901, 642, + 354, 904, 354, 865, 845, 600, 86, 725, 649, 419, + 138, 1589, 429, 1078, 845, 411, 14, 87, 643, 412, + 58, 386, 666, 601, 411, 796, 845, 15, 412, 602, + 787, 788, 1413, 907, 845, 845, 128, 482, 483, 484, + 1343, 168, 1335, 287, 886, 430, 169, 59, 170, 967, + 1227, 127, 1276, 519, 1202, 966, 1203, 495, 307, 522, + 787, 788, 756, 354, 354, 759, 760, 906, 976, 1488, + 1308, 1536, 632, 612, 919, 623, 308, 665, 58, 613, + 419, 413, 1235, 519, 1079, 414, 1224, 1146, 415, 503, + 413, 107, 1236, 624, 414, 61, 1163, 415, 80, 41, + 42, 43, 1376, 416, 213, 59, 370, 287, 407, 417, + 79, 219, 416, 1210, 919, 214, 108, 919, 417, 104, + 1066, 106, 844, 385, 62, 1237, 1224, 522, 1084, 1224, + 44, 353, 1174, 806, 807, 809, 562, 811, 812, 81, + 844, 816, 1085, 818, 1238, 820, 353, 787, 788, 1239, + 1174, 522, 80, 408, 972, 844, 98, 82, 1418, 354, + 354, 354, 1075, 354, 354, 1459, 371, 354, 220, 354, + 1623, 354, 844, 354, 1225, 353, 107, 353, 1081, 58, + 409, 410, 1534, 419, 846, 1114, 287, 1082, 955, 1242, + 852, 408, 1093, 1073, 1095, 1180, 63, 353, 637, 967, + 844, 1272, 846, 58, 1456, 650, 59, 1600, 1107, 1601, + 1641, 1380, 519, 1603, 1604, 891, 1462, 846, 409, 410, + 1378, 1391, 505, 679, 651, 1223, 1389, 1201, 98, 667, + 59, 354, 72, 73, 846, 74, 1381, 1206, 353, 353, + 1183, 1184, 226, 411, 1109, 1110, 1180, 412, 668, 505, + 679, 1390, 1172, 716, 354, 1147, 1303, 1125, 519, 522, + 941, 716, 846, 75, 925, 64, 1228, 1347, 1185, 227, + 608, 1561, 1649, 1628, 65, 867, 1342, 736, 737, 925, + 960, 411, 609, 867, 1637, 412, 1296, 1152, 1153, 1298, + 1155, 1354, 670, 1229, 1157, 1380, 1159, 1160, 1188, 1162, + 1389, 1189, 1269, 867, 287, 867, 867, 223, 224, 413, + 1309, 671, 867, 414, 58, 1451, 415, 980, 984, 1247, + 1248, 1249, 1382, 955, 1666, 1667, 522, 1484, 956, 1190, + 1495, 416, 1501, 1503, 353, 353, 353, 417, 353, 353, + 867, 59, 353, 1024, 353, 857, 353, 413, 353, 1180, + 1473, 414, 1180, 1279, 415, 791, 522, 100, 101, 102, + 1195, 1188, 792, 1196, 858, -743, 957, 1532, 1063, 416, + -743, 97, -750, 748, 749, 417, 1683, -750, 1336, 1689, + 354, 756, 1097, 758, 759, 760, 761, 87, -743, -757, + 1101, 762, 856, 1102, -757, -750, 736, 737, 152, 153, + 154, 155, 1106, 1314, 612, 612, 353, 612, 354, 1112, + 613, 613, -757, 613, 1121, 419, 354, 1315, 1092, 354, + 522, 522, 522, 522, 522, 522, 522, 522, 354, 353, + 1371, 354, 354, 522, 522, 354, 1071, -412, 103, 522, + 354, 1306, -412, 419, 354, 1145, 618, 1083, 522, 522, + 736, 737, 131, 522, 522, 522, 1560, 522, 612, 1217, + -412, 133, 612, 53, 613, 1479, 787, 788, 613, 54, + 1218, 1219, 109, 958, 354, 354, 1094, 354, 110, 134, + 135, 354, 1019, 354, 354, 522, 354, 104, 105, 106, + 746, 747, 748, 749, 1020, 1097, 1460, 1097, 136, 1258, + 756, 1338, 758, 759, 760, 761, 1482, 1263, 113, 391, + 762, 1259, 764, 765, 114, 919, 1318, 1319, 1320, 1264, + 612, 354, 1353, 354, 612, 290, 613, 1224, 1360, 291, + 613, 522, 137, 1345, 1299, 1364, 116, 1562, 1361, 1366, + 391, 1324, 117, 292, 293, 1346, 748, 749, 294, 295, + 296, 297, 70, 140, 756, 353, 758, 759, 760, 761, + 119, 141, 612, 612, 762, 144, 120, 142, 613, 613, + 145, 782, 783, 784, 785, 786, 1362, 1431, 389, 146, + 1397, 390, 1273, 353, 391, 787, 788, 147, 1274, 148, + 1477, 353, 1406, 1355, 353, 1450, 1356, 1411, 1454, 1357, + 157, 160, 1461, 353, 867, 1535, 353, 353, 867, 1370, + 353, 85, 542, 176, 1592, 353, 1464, 519, 1467, 353, + 1468, 180, 867, 104, 867, 1256, 867, 784, 785, 786, + 41, 42, 43, 419, 419, 1548, 1284, 1086, 1088, 787, + 788, 867, 215, 419, 419, 228, 229, 1090, 1307, 353, + 353, 419, 353, 1636, 283, 1317, 353, 230, 353, 353, + 419, 353, 354, 231, 1570, 1646, 419, 1453, 284, 1449, + 1620, 505, 679, 1592, 354, 162, 163, 943, 944, 285, + 287, 1432, 299, 1565, 162, 163, 164, 301, 1661, 223, + 224, 225, 936, 937, 938, 363, 353, 1469, 353, 55, + 56, 57, 364, 354, 354, 354, 365, 549, 366, 1659, + 367, 368, 369, 375, 379, 388, 393, 570, 380, 382, + 423, 387, 396, 394, 395, 397, 581, 399, 354, 424, + 406, 425, 398, 400, 571, 401, 594, 402, 736, 737, + 403, 404, 405, 419, 565, 572, 604, 584, 656, 1642, + 628, 629, 829, 638, 1542, 622, 605, 1546, 657, 662, + 658, 660, 654, 1614, 1615, 630, 659, 661, 669, 672, + 1688, 673, 706, 685, 686, 648, 687, 1372, 701, 718, + 653, 408, 655, 688, 689, 690, 1491, 719, 721, 726, + 727, 664, 728, 681, 681, 681, 354, 717, 729, 676, + 677, 678, 730, 731, 790, 15, 793, 799, 409, 410, + 699, 801, 665, 1652, 696, 813, 814, 618, 833, 830, + 834, 837, 700, 840, 838, 696, 843, 842, 707, 708, + 709, 710, 711, 855, 748, 749, 860, 353, 861, 862, + 867, 720, 756, 722, 758, 759, 760, 761, 829, 353, + 734, 885, 762, 892, 1590, 1423, 897, 898, 947, 949, + 951, 952, 909, 1015, 1070, 1074, 1428, 408, 1080, 1098, + 722, 411, 1104, 1105, 829, 412, 1564, 1119, 353, 353, + 353, 354, 646, 1148, 1180, 1187, 1200, 1207, 1173, 1211, + 522, 1231, 1212, 1230, 409, 410, 1213, 1214, 1234, 1243, + 1244, 1266, 1276, 353, 1245, 1246, 1250, 805, 1271, 1287, + 1278, 1290, 1251, 782, 783, 784, 785, 786, 1292, 1294, + 1302, 1312, 1261, 1384, 1262, 1267, 1323, 787, 788, 1310, + 1385, 1387, 1311, 1474, 1322, 832, 1388, 413, 866, 1330, + 1333, 414, 1349, 1304, 415, 1337, 1352, 1377, 1359, 1493, + 1399, 1489, 1386, 1412, 1400, 1402, 1613, 411, 1407, 416, + 1422, 412, 1424, 1430, 1433, 417, 1434, 1476, 1458, 722, + 1463, 353, 1480, 354, 648, 354, 1481, 1478, 1485, 1504, + 1512, 696, 889, 1487, 890, 1513, 1449, 1509, 1510, 895, + 1518, 1525, 1550, 1519, 1520, 899, 1566, 722, 1524, 1582, + 1527, 1528, 1544, 1595, 908, 1578, 1612, 1583, 1639, 1585, + 1640, 1489, 1586, 1587, 1645, 911, 912, 913, 914, 915, + 916, 1634, 924, 413, 924, 1643, 1635, 414, 1638, 1305, + 415, 1644, 1647, 1648, 1657, 1660, 945, 1662, 1663, 1668, + 1669, 1672, 1670, 1675, 1676, 416, 1677, 1685, 1678, 129, + 18, 417, 1571, 1684, 83, 681, 353, 736, 737, 174, + 1686, 132, 1551, 354, 1554, 311, 1069, 1555, 990, 992, + 994, 996, 998, 1000, 1002, 1004, 1005, 1006, 354, 1208, + 1007, 1009, 1011, 1012, 1013, 1014, 1556, 1017, 1018, 1557, + 1021, 1022, 1023, 1025, 1026, 1027, 1029, 1031, 1032, 1033, + 1034, 1036, 1038, 1040, 1041, 1043, 1045, 1046, 1047, 1048, + 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1558, 1064, 24, + 1611, 1531, 1067, 1486, 1233, 1383, 722, 1506, 1576, 1507, + 1414, 627, 1577, 1076, 93, 1633, 1541, 0, 1351, 933, + 0, 634, 635, 354, 794, 705, 0, 0, 353, 0, + 353, 746, 747, 748, 749, 750, 0, 0, 753, 754, + 755, 756, 0, 758, 759, 760, 761, 0, 0, 0, + 0, 762, 1103, 764, 765, 0, 0, 0, 0, 1108, + 0, 0, 0, 0, 0, 0, 1118, 0, 1120, 0, + 0, 0, 0, 0, 0, 0, 0, 1127, 1128, 1129, + 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, + 1140, 1141, 1142, 1143, 1144, 0, 0, 0, 1682, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 722, + 780, 781, 782, 783, 784, 785, 786, 0, 353, 681, + 0, 0, 0, 408, 0, 0, 787, 788, 0, 0, + 0, 707, 1177, 353, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1199, 0, 696, 0, 0, + 409, 410, 0, 0, 1204, 0, 0, 696, 0, 0, + 0, 0, 1127, 0, 0, 0, 0, 0, 0, 0, + 0, 1222, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 958, 681, 681, 681, 0, + 0, 722, 0, 722, 0, 722, 0, 722, 353, 722, + 0, 722, 0, 722, 0, 722, 0, 0, 0, 0, + 722, 0, 722, 411, 0, 0, 574, 412, 722, 0, + 0, 0, 0, 0, 0, 0, 575, 0, 0, 0, + 722, 0, 722, 0, 0, 0, 0, 722, 0, 722, + 0, 722, 0, 958, 722, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 691, 736, 737, + 0, 0, 0, 312, 0, 0, 0, 1260, 0, 313, + 0, 1265, 0, 0, 0, 314, 0, 722, 576, 413, + 0, 0, 0, 414, 0, 315, 415, 0, 0, 0, + 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 417, 317, 722, + 0, 0, 0, 0, 0, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 0, 0, + 0, 0, 746, 747, 748, 749, 750, 0, 0, 753, + 0, 1325, 756, 0, 758, 759, 760, 761, 0, 0, + 0, 0, 762, 0, 764, 765, 0, 0, 0, 0, + 0, -69, 0, 1339, 1340, 1341, 58, 0, 0, 1344, + 0, 0, 736, 737, 0, 0, 0, 1350, 924, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 745, 746, 747, 748, 749, 0, 0, 752, 753, 754, - 755, 407, 757, 758, 759, 760, 0, 0, 0, 0, - 761, 0, 763, 764, 0, 0, 0, 1100, 0, 957, - 0, 0, 0, 0, 1105, 0, 0, 0, 408, 409, - 0, 1115, 0, 1117, 0, 0, 0, 0, 0, 0, - 0, 0, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, - 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, - 0, 0, 0, 0, 0, 0, 0, 721, 778, 779, - 780, 781, 782, 783, 784, 785, 0, 680, 407, 0, - 0, 0, 0, 0, 0, 786, 787, 0, 0, 0, - 0, 410, 0, 0, 0, 411, 706, 1174, 0, 0, - 0, 0, 0, 0, 0, 408, 409, 0, 0, 0, - 1196, 0, 695, 0, 0, 0, 0, 0, 521, 1201, - 0, 0, 695, 0, 0, 0, 0, 1124, 0, 0, - 0, 0, 0, 0, 0, 0, 1219, 0, 0, 0, - 0, 0, 0, 680, 680, 680, 0, 0, 721, 407, - 721, 0, 721, 0, 721, 0, 721, 412, 721, 0, - 721, 413, 721, 1321, 414, 0, 0, 721, 410, 721, - 0, 0, 411, 0, 0, 721, 408, 409, 0, 415, - 0, 0, 0, 0, 0, 416, 0, 721, 0, 721, - 0, 0, 0, 0, 721, 0, 721, 0, 721, 0, - 0, 721, 0, 0, 0, 0, 0, 0, 0, 690, - 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, - 0, 312, 0, 0, 0, 0, 0, 313, 0, 0, - 0, 1255, 0, 721, 412, 1260, 407, 314, 413, 410, - 1322, 414, 0, 411, 0, 315, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 415, 0, 0, 0, - 316, 0, 416, 408, 409, 721, 0, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 0, 0, 0, 0, 0, 412, 0, 0, 0, 413, - 0, 1323, 414, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1319, 0, 410, 415, 0, 0, - 411, 0, 0, 416, 0, 0, 0, 0, 58, 0, - 0, 0, 0, 0, 0, 0, 1333, 1334, 1335, 0, - 0, 350, 1338, 0, 0, 0, 0, 0, 0, 0, - 1344, 923, 0, 432, 433, 59, 0, 0, 0, 0, - 0, 0, 0, 438, 439, 440, 441, 442, 0, 0, - 0, 548, 0, 443, 0, 445, 1362, 1363, 0, 448, - 0, 0, 412, 1367, 0, 0, 413, 450, 1325, 414, - 0, 1124, 0, 453, 0, 0, 454, 0, 0, 455, - 0, 351, 0, 458, 415, 1385, 0, 1387, 0, 0, - 416, 0, 1390, 565, 0, 0, 462, 463, 1393, 317, - 318, 319, 1396, 321, 322, 323, 324, 325, 464, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, - 0, 339, 340, 341, 0, 0, 344, 345, 346, 347, - 465, 466, 467, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1415, 0, 469, 470, 0, 0, 0, - 0, 0, 0, 0, 643, 0, 0, 0, 0, 721, - 471, 472, 473, 695, 0, 0, 0, 0, 0, 0, - 58, 0, 0, 0, 0, 0, 0, 0, 474, 475, - 476, 477, 478, 0, 479, 0, 480, 481, 482, 483, - 484, 485, 486, 487, 488, 489, 490, 59, 567, 492, - 493, 0, 0, 0, 0, 0, 0, 494, 0, 0, + 0, 0, 0, 59, 0, 0, 0, 0, 549, 0, + 0, 0, 0, 1368, 1369, 0, 0, 0, 0, 0, + 1373, 780, 781, 782, 783, 784, 785, 786, 1127, 0, + 0, 0, 0, 0, 0, 0, 0, 787, 788, 0, + 0, 0, 0, 0, 1393, 0, 1395, 0, 0, 352, + 0, 1398, 0, 0, 0, 0, 0, 1401, 0, 0, + 0, 1404, 0, 0, 0, 0, 0, 0, 738, 739, + 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, + 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, + 760, 761, 408, 0, 0, 0, 762, 763, 764, 765, + 766, 767, 0, 1425, 768, 769, 770, 771, 772, 773, + 774, 0, 991, 993, 995, 997, 999, 1001, 1003, 409, + 410, 0, 0, 696, 1008, 1010, 722, 0, 0, 0, + 1016, 0, 0, 0, 0, 0, 0, 0, 0, 1028, + 1030, 0, 0, 0, 1035, 1037, 1039, 0, 1042, 775, + 776, 0, 777, 778, 779, 780, 781, 782, 783, 784, + 785, 786, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 787, 788, 0, 0, 0, 505, 679, 0, 0, + 0, 0, 411, 736, 737, 574, 412, 0, 0, 0, + 0, 0, 0, 0, 0, 575, 0, 0, 0, 0, + 1498, 0, 1499, 0, 0, 0, 0, 1502, 0, 0, + 0, 0, 0, 0, 0, 736, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 497, 498, 499, 0, 14, 0, - 0, 500, 501, 735, 736, 0, 0, 0, 1486, 502, - 1487, 503, 0, 504, 505, 1490, 0, 0, 0, 0, + 0, 1511, 0, 0, 1514, 0, 0, 0, 0, 0, + 802, 0, 1521, 1522, 1523, 0, 0, 576, 413, 1530, + 0, 0, 414, 0, 1533, 415, 0, 0, 1537, 1538, + 1539, 1540, 0, 0, 696, 1543, 0, 696, 1547, 0, + 416, 0, 0, 0, 0, 1559, 417, 746, 747, 748, + 749, 750, 0, 0, 753, 754, 755, 756, 1568, 758, + 759, 760, 761, 0, 0, 0, 0, 762, 0, 764, + 765, 0, 0, 0, 0, 0, 0, 0, 0, 746, + 747, 748, 749, 750, 0, 0, 753, 754, 755, 756, + 696, 758, 759, 760, 761, 0, 0, 0, 0, 762, + 0, 764, 765, 0, 1597, 1598, 0, 768, 0, 770, + 0, 0, 0, 0, 0, 0, 0, 0, 1605, 0, + 0, 0, 0, 1610, 778, 779, 780, 781, 782, 783, + 784, 785, 786, 0, 0, 1616, 0, 1617, 0, 0, + 0, 408, 787, 788, 0, 0, 0, 0, 0, 0, + 0, 0, 1629, 1630, 0, 777, 778, 779, 780, 781, + 782, 783, 784, 785, 786, 0, 0, 0, 409, 410, + 0, 0, 0, 0, 787, 788, 0, 0, 0, 1651, + 0, 0, 0, 0, 1653, 1654, 0, 0, 0, 432, + 0, 0, 0, 433, 434, 3, 0, 435, 436, 437, + 0, 438, 0, 439, 440, 441, 442, 443, 0, 1671, + 0, 1673, 1674, 444, 445, 446, 447, 448, 0, 449, + 0, 0, 1679, 0, 0, 0, 450, 451, 0, 0, + 452, 411, 453, 454, 0, 412, 455, 0, 8, 456, + 457, 0, 458, 459, 0, 0, 460, 461, 0, 0, + 0, 0, 0, 462, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 468, 469, 0, 0, 0, 413, 0, 0, + 0, 414, 0, 1321, 415, 470, 471, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 472, 473, 474, 0, 0, 417, 0, 0, 0, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 492, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 496, 497, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1498, 0, 0, - 1501, 0, 0, 0, 0, 0, 0, 0, 1508, 1509, - 1510, 0, 0, 0, 0, 1517, 0, 0, 0, 0, - 1520, 0, 0, 0, 1524, 1525, 1526, 1527, 0, 0, - 695, 1530, 0, 695, 1534, 0, 0, 0, 0, 0, - 0, 1546, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1554, 0, 0, 0, 0, 745, 746, 747, - 748, 749, 0, 0, 752, 753, 754, 755, 0, 757, - 758, 759, 760, 0, 0, 0, 0, 761, 0, 763, - 764, 0, 0, 695, 0, 767, 768, 769, 0, 0, - 0, 773, 0, 0, 0, 0, 0, 1583, 1584, 0, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 0, 0, 0, 0, 503, + 0, 504, 432, 505, 506, 0, 433, 434, 3, 0, + 435, 436, 437, 0, 438, 0, 439, 440, 441, 442, + 443, 0, 0, 0, 0, 0, 444, 445, 446, 447, + 448, 0, 449, 0, 0, 0, 0, 0, 0, 450, + 451, 0, 0, 452, 0, 453, 454, 0, 0, 455, + 0, 8, 456, 457, 0, 458, 459, 0, 0, 460, + 461, 0, 0, 0, 0, 0, 462, 0, 0, 463, + 464, 0, 318, 319, 320, 0, 322, 323, 324, 325, + 326, 465, 328, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 0, 340, 341, 342, 0, 0, 345, + 346, 347, 348, 466, 467, 468, 469, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1591, 0, 0, 0, 0, 1596, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1602, 1603, - 0, 775, 0, 776, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 0, 1615, 1616, 0, 0, 0, 0, - 0, 0, 786, 787, 0, 0, 0, 504, 678, 0, + 0, 0, 0, 472, 473, 474, 0, 0, 0, 0, + 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, + 0, 475, 476, 477, 478, 479, 408, 480, 0, 481, + 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, + 59, 492, 493, 494, 0, 0, 0, 0, 0, 0, + 495, 1365, 497, 409, 410, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 498, 499, 500, + 0, 14, 0, 0, 501, 502, 0, 0, 433, 434, + 0, 0, 503, 0, 504, 0, 505, 506, 439, 440, + 441, 442, 443, 0, 0, 0, 0, 0, 444, 0, + 446, 0, 0, 0, 449, 0, 408, 0, 0, 0, + 0, 0, 451, 0, 0, 0, 411, 0, 454, 0, + 412, 455, 0, 0, 456, 0, 918, 0, 459, 0, + 0, 0, 0, 409, 410, 0, 0, 0, 566, 0, + 0, 463, 464, 0, 318, 319, 320, 0, 322, 323, + 324, 325, 326, 465, 328, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 0, 340, 341, 342, 0, + 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, + 0, 0, 413, 0, 0, 0, 414, 0, 1326, 415, + 470, 471, 0, 0, 0, 0, 411, 0, 0, 0, + 412, 0, 0, 0, 416, 0, 0, 0, 0, 0, + 417, 0, 0, 0, 0, 58, 0, 0, 0, 0, + 0, 0, 0, 475, 476, 477, 478, 479, 408, 480, + 919, 481, 482, 483, 484, 485, 486, 487, 488, 489, + 490, 491, 920, 568, 493, 494, 0, 0, 0, 0, + 0, 0, 495, 0, 0, 409, 410, 0, 0, 0, + 0, 0, 413, 0, 0, 0, 414, 0, 0, 921, + 499, 500, 0, 14, 0, 0, 501, 502, 0, 0, + 0, 433, 434, 0, 922, 0, 923, 0, 505, 506, + 417, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 408, + 0, 0, 0, 0, 0, 451, 0, 0, 411, 0, + 0, 454, 412, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 0, 0, 409, 410, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 413, 0, 0, 0, 414, 0, + 1327, 415, 0, 470, 471, 0, 0, 0, 0, 411, + 0, 0, 0, 412, 0, 0, 416, 0, 0, 0, + 0, 0, 417, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 408, 480, 919, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 920, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 409, 410, + 0, 0, 0, 0, 0, 413, 0, 0, 0, 414, + 0, 0, 921, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 0, 433, 434, 0, 922, 0, 931, + 0, 505, 506, 417, 439, 440, 441, 442, 443, 0, + 0, 0, 0, 0, 444, 0, 446, 0, 0, 0, + 449, 0, 599, 0, 0, 0, 0, 0, 451, 0, + 0, 411, 0, 0, 454, 412, 0, 455, 0, 0, + 456, 0, 0, 0, 459, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 566, 0, 0, 463, 464, 0, + 318, 319, 320, 0, 322, 323, 324, 325, 326, 465, + 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, + 338, 0, 340, 341, 342, 0, 0, 345, 346, 347, + 348, 466, 467, 567, 0, 0, 0, 413, 0, 0, + 0, 414, 0, 1328, 415, 0, 470, 471, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 0, 0, 0, 0, 0, 417, 0, 0, 0, 0, + 0, 58, 0, 0, 0, 0, 0, 0, 0, 475, + 476, 477, 478, 479, 408, 480, 0, 481, 482, 483, + 484, 485, 486, 487, 488, 489, 490, 491, 59, 568, + 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, + 0, 409, 410, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 600, 0, 0, 498, 499, 500, 0, 14, + 0, 0, 501, 502, 0, 0, 0, 433, 434, 0, + 1176, 0, 504, 0, 505, 506, 602, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 411, 0, 0, 454, 412, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 468, 0, 0, 0, + 413, 0, 0, 0, 414, 0, 1329, 415, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 644, 0, + 0, 0, 416, 0, 472, 473, 474, 0, 417, 0, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 408, 480, 0, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 409, 410, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 433, + 434, 0, 0, 503, 0, 504, 0, 505, 506, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 411, 0, 454, + 0, 412, 455, 0, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 468, 0, + 0, 0, 0, 413, 0, 0, 0, 414, 0, 1331, + 415, 470, 471, 0, 0, 0, 0, 0, 0, 0, + 674, 0, 0, 0, 0, 416, 472, 473, 474, 0, + 0, 417, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 408, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 409, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1637, 0, 0, 0, 0, 1639, 1640, 0, 0, - 0, 0, 431, 0, 0, 432, 433, 3, 0, 434, - 435, 436, 0, 437, 0, 438, 439, 440, 441, 442, - 0, 1657, 0, 1659, 1660, 443, 444, 445, 446, 447, - 0, 448, 0, 0, 1665, 0, 0, 0, 449, 450, - 0, 0, 451, 0, 452, 453, 0, 0, 454, 0, - 8, 455, 456, 0, 457, 458, 0, 0, 459, 460, - 0, 0, 0, 0, 0, 461, 0, 0, 462, 463, - 0, 317, 318, 319, 0, 321, 322, 323, 324, 325, - 464, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 0, 339, 340, 341, 0, 0, 344, 345, - 346, 347, 465, 466, 467, 468, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 469, 470, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 433, 434, 0, 0, 503, 0, 504, 0, 505, + 506, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 1552, 446, 447, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 411, + 0, 454, 0, 412, 455, 0, 0, 456, 457, 0, + 0, 459, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 1553, 0, 0, 0, 413, 0, 0, 0, 414, + 0, 1332, 415, 470, 471, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 417, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 408, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 409, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 471, 472, 473, 0, 0, 0, 0, 0, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 433, 434, 0, 0, 503, 0, 504, + 0, 505, 506, 439, 440, 441, 442, 443, 0, 0, + 0, 0, 0, 444, 0, 446, 0, 0, 0, 449, + 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, + 0, 411, 0, 454, 0, 412, 455, 0, 0, 456, + 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 566, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 468, 0, 0, 0, 0, 413, 0, 0, + 0, 414, 0, 1334, 415, 470, 471, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 472, 473, 474, 0, 0, 417, 0, 0, 0, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 408, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 568, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, + 409, 410, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 433, 434, 0, 0, 503, + 0, 504, 0, 505, 506, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 411, 0, 454, 0, 412, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 963, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 413, + 0, 0, 0, 414, 0, 1436, 415, 470, 471, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 417, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, - 474, 475, 476, 477, 478, 0, 479, 0, 480, 481, - 482, 483, 484, 485, 486, 487, 488, 489, 490, 59, - 491, 492, 493, 0, 0, 0, 0, 0, 0, 494, - 495, 496, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 497, 498, 499, 0, - 14, 0, 0, 500, 501, 0, 0, 0, 0, 0, - 0, 502, 0, 503, 431, 504, 505, 432, 433, 3, - 0, 434, 435, 436, 0, 437, 0, 438, 439, 440, - 441, 442, 0, 0, 0, 0, 0, 443, 444, 445, - 446, 447, 0, 448, 0, 0, 0, 0, 0, 0, - 449, 450, 0, 0, 451, 0, 452, 453, 0, 0, - 454, 0, 8, 455, 456, 0, 457, 458, 0, 0, - 459, 460, 0, 0, 0, 0, 0, 461, 0, 0, - 462, 463, 0, 317, 318, 319, 0, 321, 322, 323, - 324, 325, 464, 327, 328, 329, 330, 331, 332, 333, - 334, 335, 336, 337, 0, 339, 340, 341, 0, 0, - 344, 345, 346, 347, 465, 466, 467, 468, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 469, - 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 471, 472, 473, 0, 0, 0, + 475, 476, 477, 478, 479, 408, 480, 919, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 920, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, + 0, 0, 409, 410, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 964, 0, 504, 965, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 408, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 411, 0, 454, 0, 412, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 409, + 410, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 468, 0, 0, 0, + 0, 413, 0, 0, 0, 414, 0, 1437, 415, 470, + 471, 0, 411, 0, 0, 0, 412, 0, 0, 0, + 0, 0, 0, 416, 985, 986, 987, 0, 0, 417, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, - 0, 0, 474, 475, 476, 477, 478, 407, 479, 0, - 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, - 490, 59, 491, 492, 493, 0, 0, 0, 0, 0, - 0, 494, 1359, 496, 408, 409, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 497, 498, - 499, 0, 14, 0, 0, 500, 501, 0, 0, 432, - 433, 0, 0, 502, 0, 503, 0, 504, 505, 438, - 439, 440, 441, 442, 0, 0, 0, 0, 0, 443, - 0, 445, 0, 0, 0, 448, 0, 407, 0, 0, - 0, 0, 0, 450, 0, 0, 0, 410, 0, 453, - 0, 411, 454, 0, 0, 455, 0, 917, 0, 458, - 0, 0, 0, 0, 408, 409, 0, 0, 0, 565, - 0, 0, 462, 463, 0, 317, 318, 319, 0, 321, - 322, 323, 324, 325, 464, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 337, 0, 339, 340, 341, - 0, 0, 344, 345, 346, 347, 465, 466, 566, 0, - 0, 0, 0, 412, 0, 0, 0, 413, 0, 1326, - 414, 469, 470, 0, 0, 0, 0, 410, 0, 0, - 0, 411, 0, 0, 0, 415, 0, 0, 0, 0, - 0, 416, 0, 0, 0, 0, 58, 0, 0, 0, - 0, 0, 0, 0, 474, 475, 476, 477, 478, 407, - 479, 918, 480, 481, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 919, 567, 492, 493, 0, 0, 0, - 0, 0, 0, 494, 0, 0, 408, 409, 0, 0, - 0, 0, 0, 412, 0, 0, 0, 413, 0, 0, - 920, 498, 499, 0, 14, 0, 0, 500, 501, 0, - 0, 0, 432, 433, 0, 921, 0, 922, 0, 504, - 505, 416, 438, 439, 440, 441, 442, 0, 0, 0, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 407, 0, 0, 0, 0, 0, 450, 0, 0, 410, - 0, 0, 453, 411, 0, 454, 0, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 408, 409, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 566, 0, 0, 0, 412, 0, 0, 0, 413, - 0, 1328, 414, 0, 469, 470, 0, 0, 0, 0, - 410, 0, 0, 0, 411, 0, 0, 415, 0, 0, - 0, 0, 0, 416, 0, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 407, 479, 918, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 919, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 408, - 409, 0, 0, 0, 0, 0, 412, 0, 0, 0, - 413, 0, 0, 920, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 0, 432, 433, 0, 921, 0, - 930, 0, 504, 505, 416, 438, 439, 440, 441, 442, - 0, 0, 0, 0, 0, 443, 0, 445, 0, 0, - 0, 448, 0, 598, 0, 0, 0, 0, 0, 450, - 0, 0, 410, 0, 0, 453, 411, 0, 454, 0, - 0, 455, 0, 0, 0, 458, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 565, 0, 0, 462, 463, - 0, 317, 318, 319, 0, 321, 322, 323, 324, 325, - 464, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 0, 339, 340, 341, 0, 0, 344, 345, - 346, 347, 465, 466, 566, 0, 0, 0, 412, 0, - 0, 0, 413, 0, 1426, 414, 0, 469, 470, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 408, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 409, 410, 413, 0, + 0, 0, 414, 0, 1438, 415, 0, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 0, + 416, 433, 434, 503, 0, 504, 417, 505, 506, 712, + 0, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 408, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 411, + 0, 454, 0, 412, 455, 713, 0, 456, 0, 0, + 0, 459, 0, 409, 410, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 413, 0, 0, 0, 414, + 0, 1441, 415, 470, 471, 0, 411, 0, 0, 0, + 412, 0, 0, 0, 0, 0, 0, 416, 0, 0, + 0, 0, 0, 417, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 408, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, + 409, 410, 413, 0, 0, 0, 414, 0, 1472, 415, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 0, 416, 433, 434, 503, 603, 504, + 417, 505, 506, 712, 0, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 411, 0, 454, 0, 412, 455, 713, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 413, + 0, 0, 0, 414, 0, 1569, 415, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 0, 0, 0, 0, 0, 416, 0, 0, 0, + 0, 416, 0, 0, 0, 0, 0, 417, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, - 474, 475, 476, 477, 478, 407, 479, 0, 480, 481, - 482, 483, 484, 485, 486, 487, 488, 489, 490, 59, - 567, 492, 493, 0, 0, 0, 0, 0, 0, 494, - 0, 0, 408, 409, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 599, 0, 0, 497, 498, 499, 0, - 14, 0, 0, 500, 501, 0, 0, 0, 432, 433, - 0, 1173, 0, 503, 0, 504, 505, 601, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 410, 0, 0, 453, 411, - 0, 454, 0, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 467, 0, 0, - 0, 412, 0, 0, 0, 413, 0, 1427, 414, 0, - 469, 470, 0, 0, 0, 0, 0, 0, 0, 673, - 0, 0, 0, 415, 0, 471, 472, 473, 0, 416, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 407, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 0, 0, 494, 0, 0, 408, 409, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 432, 433, 0, 0, 502, 0, 503, 0, 504, 505, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 1539, 445, 446, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 410, 0, - 453, 0, 411, 454, 0, 0, 455, 456, 0, 0, - 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, - 1540, 0, 0, 0, 412, 0, 0, 0, 413, 0, - 1428, 414, 469, 470, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 415, 0, 0, 0, - 0, 0, 416, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 407, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 408, 409, 0, + 475, 476, 477, 478, 479, 0, 480, 919, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 920, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 432, 433, 0, 0, 502, 0, 503, 0, - 504, 505, 438, 439, 440, 441, 442, 0, 0, 0, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 410, 0, 453, 0, 411, 454, 0, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 467, 0, 0, 0, 0, 412, 0, 0, 0, - 413, 0, 1431, 414, 469, 470, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 471, - 472, 473, 0, 0, 416, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 407, 479, 0, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 59, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 408, - 409, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 497, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 432, 433, 0, 0, 502, 0, - 503, 0, 504, 505, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 410, 0, 453, 0, 411, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 962, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 412, 0, - 0, 0, 413, 0, 1462, 414, 469, 470, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 0, 0, 433, + 434, 503, 0, 504, 0, 505, 506, 712, 0, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 0, 0, 454, + 0, 0, 455, 713, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 0, 0, 0, 0, 0, 416, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 407, 479, 918, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 919, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, - 0, 408, 409, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 963, 0, 503, 964, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 410, 0, 453, 0, 411, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 467, 0, 0, 0, 0, - 412, 0, 0, 0, 413, 0, 1555, 414, 469, 470, + 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 983, 984, 985, 0, 0, 416, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 0, 0, - 432, 433, 502, 0, 503, 0, 504, 505, 711, 0, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 0, 445, 0, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, - 453, 0, 0, 454, 712, 0, 455, 0, 0, 0, - 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 0, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 0, 0, 433, 434, 503, 830, 504, 0, 505, + 506, 712, 0, 439, 440, 441, 442, 443, 0, 0, + 0, 0, 0, 444, 0, 446, 0, 0, 0, 449, + 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, + 0, 0, 0, 454, 0, 0, 455, 713, 0, 456, + 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 566, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 0, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 0, 0, 432, 433, 502, 602, 503, 0, - 504, 505, 711, 0, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 712, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 0, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 568, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 433, 434, 0, 0, 503, + 0, 504, 0, 505, 506, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 0, 0, 454, 0, 0, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 1113, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 918, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 919, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 0, 0, 432, 433, - 502, 0, 503, 0, 504, 505, 711, 0, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 0, 0, 0, 453, 0, - 0, 454, 712, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 566, 0, 0, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 475, 476, 477, 478, 479, 0, 480, 919, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 920, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 503, 0, 504, 0, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 0, 0, 454, 0, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 0, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 0, 0, 432, 433, 502, 829, 503, 0, 504, 505, - 711, 0, 438, 439, 440, 441, 442, 0, 0, 0, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 0, 0, 453, 0, 0, 454, 712, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 566, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 0, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 433, + 434, 0, 0, 503, 603, 504, 0, 505, 506, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 0, 0, 454, + 0, 0, 455, 0, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 652, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 0, 479, 0, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 59, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, + 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 497, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 432, 433, 0, 0, 502, 0, - 503, 0, 504, 505, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 1110, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 0, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 433, 434, 0, 0, 503, 0, 504, 0, 505, + 506, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, + 0, 454, 0, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 663, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 918, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 919, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 502, 0, 503, 0, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 0, 0, 453, 0, 0, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 566, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 0, 0, 433, 434, 503, 0, 504, + 0, 505, 506, 695, 0, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 0, 0, 454, 0, 0, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 432, 433, - 0, 0, 502, 602, 503, 0, 504, 505, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 0, 0, 0, 453, 0, - 0, 454, 0, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 651, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 566, 0, 0, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 59, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 503, 0, 504, 0, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 0, 0, 454, 0, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 0, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 432, 433, 0, 0, 502, 0, 503, 0, 504, 505, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 0, 445, 0, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, - 453, 0, 0, 454, 0, 0, 455, 0, 0, 0, - 458, 0, 0, 662, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 0, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 699, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 0, + 0, 433, 434, 503, 0, 504, 0, 505, 506, 703, + 0, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, + 0, 454, 0, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 0, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 433, 434, 0, 0, 503, 0, 504, + 0, 505, 506, 439, 440, 441, 442, 443, 0, 0, + 1044, 0, 0, 444, 0, 446, 0, 0, 0, 449, + 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, + 0, 0, 0, 454, 0, 0, 455, 0, 0, 456, + 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 566, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 0, 0, 432, 433, 502, 0, 503, 0, - 504, 505, 694, 0, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 0, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 568, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 0, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 59, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 433, 434, 0, 0, 503, + 0, 504, 0, 505, 506, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 0, 0, 454, 0, 0, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 502, 0, 503, 0, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 0, 0, 453, 0, 0, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 566, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 59, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 503, 0, 504, 1065, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 0, 0, 454, 0, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 698, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 0, 0, - 432, 433, 502, 0, 503, 0, 504, 505, 702, 0, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 0, 445, 0, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, - 453, 0, 0, 454, 0, 0, 455, 0, 0, 0, - 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1117, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 433, + 434, 0, 0, 503, 0, 504, 0, 505, 506, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 0, 0, 454, + 0, 0, 455, 0, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, + 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 0, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 0, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 432, 433, 0, 0, 502, 0, 503, 0, - 504, 505, 438, 439, 440, 441, 442, 0, 0, 1042, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 0, 0, 453, 0, 0, 454, 0, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 566, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 433, 434, 0, 0, 503, 0, 504, 1178, 505, + 506, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, + 0, 454, 0, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 0, 479, 0, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 59, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 497, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 432, 433, 0, 0, 502, 0, - 503, 0, 504, 505, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 0, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 433, 434, 0, 0, 503, 0, 504, + 1193, 505, 506, 439, 440, 441, 442, 443, 0, 0, + 0, 0, 0, 444, 0, 446, 0, 0, 0, 449, + 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, + 0, 0, 0, 454, 0, 0, 455, 0, 0, 456, + 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 566, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 0, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 59, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 568, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 502, 0, 503, 1062, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 0, 0, 453, 0, 0, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 566, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 433, 434, 0, 0, 503, + 0, 504, 1396, 505, 506, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 0, 0, 454, 0, 0, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1114, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 432, 433, - 0, 0, 502, 0, 503, 0, 504, 505, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 0, 0, 0, 453, 0, - 0, 454, 0, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 566, 0, 0, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 59, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 503, 0, 504, 1405, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 0, 0, 454, 0, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 0, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 432, 433, 0, 0, 502, 0, 503, 1175, 504, 505, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 0, 445, 0, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, - 453, 0, 0, 454, 0, 0, 455, 0, 0, 0, - 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 0, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 433, + 434, 0, 0, 503, 0, 504, 1410, 505, 506, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 0, 0, 454, + 0, 0, 455, 0, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, + 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 0, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 0, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 432, 433, 0, 0, 502, 0, 503, 1190, - 504, 505, 438, 439, 440, 441, 442, 0, 0, 0, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 0, 0, 453, 0, 0, 454, 0, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 566, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 433, 434, 0, 0, 503, 0, 504, 1452, 505, + 506, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, + 0, 454, 0, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 0, 479, 0, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 59, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 497, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 432, 433, 0, 0, 502, 0, - 503, 1388, 504, 505, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 0, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, + 0, 0, 498, 499, 500, 0, 14, 0, 0, 501, + 502, 0, 0, 433, 434, 0, 0, 503, 0, 504, + 1529, 505, 506, 439, 440, 441, 442, 443, 0, 0, + 0, 0, 0, 444, 0, 446, 0, 0, 0, 449, + 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, + 0, 0, 0, 454, 0, 0, 455, 0, 0, 456, + 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 566, 0, 0, 463, 464, 0, 318, + 319, 320, 0, 322, 323, 324, 325, 326, 465, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 0, 340, 341, 342, 0, 0, 345, 346, 347, 348, + 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 470, 471, 0, 0, 0, + 0, 0, 0, 0, 1567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 58, 0, 0, 0, 0, 0, 0, 0, 475, 476, + 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 59, 568, 493, + 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 0, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 59, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, + 0, 0, 0, 0, 498, 499, 500, 0, 14, 0, + 0, 501, 502, 0, 0, 433, 434, 0, 0, 503, + 0, 504, 0, 505, 506, 439, 440, 441, 442, 443, + 0, 0, 0, 0, 0, 444, 0, 446, 0, 0, + 0, 449, 0, 0, 0, 0, 0, 0, 0, 451, + 0, 0, 0, 0, 0, 454, 0, 0, 455, 0, + 0, 456, 0, 0, 0, 459, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 566, 0, 0, 463, 464, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 470, 471, 0, + 0, 0, 0, 0, 0, 0, 1608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 502, 0, 503, 1397, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 0, 0, 453, 0, 0, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 566, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, + 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, + 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, + 483, 484, 485, 486, 487, 488, 489, 490, 491, 59, + 568, 493, 494, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 498, 499, 500, 0, + 14, 0, 0, 501, 502, 0, 0, 433, 434, 0, + 0, 503, 0, 504, 0, 505, 506, 439, 440, 441, + 442, 443, 0, 0, 0, 0, 0, 444, 0, 446, + 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, + 0, 451, 0, 0, 0, 0, 0, 454, 0, 0, + 455, 0, 0, 456, 0, 0, 0, 459, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, + 463, 464, 0, 318, 319, 320, 0, 322, 323, 324, + 325, 326, 465, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 0, 340, 341, 342, 0, 0, + 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 470, + 471, 0, 0, 0, 0, 0, 0, 0, 1609, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 475, 476, 477, 478, 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 432, 433, - 0, 0, 502, 0, 503, 1442, 504, 505, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 0, 0, 0, 453, 0, - 0, 454, 0, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 566, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 470, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 0, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 432, 433, 0, 0, 502, 0, 503, 1516, 504, 505, - 438, 439, 440, 441, 442, 0, 0, 0, 0, 0, - 443, 0, 445, 0, 0, 0, 448, 0, 0, 0, - 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, - 453, 0, 0, 454, 0, 0, 455, 0, 0, 0, - 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 565, 0, 0, 462, 463, 0, 317, 318, 319, 0, - 321, 322, 323, 324, 325, 464, 327, 328, 329, 330, - 331, 332, 333, 334, 335, 336, 337, 0, 339, 340, - 341, 0, 0, 344, 345, 346, 347, 465, 466, 566, + 491, 59, 568, 493, 494, 0, 0, 0, 0, 0, + 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 498, 499, + 500, 0, 14, 0, 0, 501, 502, 0, 0, 433, + 434, 0, 0, 503, 0, 504, 0, 505, 506, 439, + 440, 441, 442, 443, 0, 0, 0, 0, 0, 444, + 0, 446, 0, 0, 0, 449, 0, 0, 0, 0, + 0, 0, 0, 451, 0, 0, 0, 0, 0, 454, + 0, 0, 455, 0, 0, 456, 0, 0, 0, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, + 0, 0, 463, 464, 0, 318, 319, 320, 0, 322, + 323, 324, 325, 326, 465, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 0, 340, 341, 342, + 0, 0, 345, 346, 347, 348, 466, 467, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 469, 470, 0, 0, 0, 0, 0, 0, - 0, 1553, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 0, 0, 474, 475, 476, 477, 478, - 0, 479, 0, 480, 481, 482, 483, 484, 485, 486, - 487, 488, 489, 490, 59, 567, 492, 493, 0, 0, - 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 497, 498, 499, 0, 14, 0, 0, 500, 501, - 0, 0, 432, 433, 0, 0, 502, 0, 503, 0, - 504, 505, 438, 439, 440, 441, 442, 0, 0, 0, - 0, 0, 443, 0, 445, 0, 0, 0, 448, 0, - 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, - 0, 0, 453, 0, 0, 454, 0, 0, 455, 0, - 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 565, 0, 0, 462, 463, 0, 317, 318, - 319, 0, 321, 322, 323, 324, 325, 464, 327, 328, - 329, 330, 331, 332, 333, 334, 335, 336, 337, 0, - 339, 340, 341, 0, 0, 344, 345, 346, 347, 465, - 466, 566, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 469, 470, 0, 0, 0, 0, - 0, 0, 0, 1594, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, - 0, 0, 0, 0, 0, 0, 0, 474, 475, 476, - 477, 478, 0, 479, 0, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 59, 567, 492, 493, - 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, + 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 497, 498, 499, 0, 14, 0, 0, - 500, 501, 0, 0, 432, 433, 0, 0, 502, 0, - 503, 0, 504, 505, 438, 439, 440, 441, 442, 0, - 0, 0, 0, 0, 443, 0, 445, 0, 0, 0, - 448, 0, 0, 0, 0, 0, 0, 0, 450, 0, - 0, 0, 0, 0, 453, 0, 0, 454, 0, 0, - 455, 0, 0, 0, 458, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 565, 0, 0, 462, 463, 0, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 465, 466, 566, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 469, 470, 0, 0, - 0, 0, 0, 0, 0, 1595, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 475, 476, 477, 478, 479, 0, + 480, 0, 481, 482, 483, 484, 485, 486, 487, 488, + 489, 490, 491, 59, 568, 493, 494, 0, 0, 0, + 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 474, - 475, 476, 477, 478, 0, 479, 0, 480, 481, 482, - 483, 484, 485, 486, 487, 488, 489, 490, 59, 567, - 492, 493, 0, 0, 0, 0, 0, 0, 494, 0, + 498, 499, 500, 0, 14, 0, 0, 501, 502, 0, + 0, 433, 434, 0, 0, 503, 0, 504, 0, 505, + 506, 439, 440, 441, 442, 443, 0, 0, 0, 0, + 0, 444, 0, 446, 0, 0, 0, 449, 0, 0, + 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, + 0, 454, 0, 0, 455, 0, 0, 456, 0, 0, + 0, 459, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 566, 0, 0, 463, 464, 0, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 466, 467, + 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 470, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 497, 498, 499, 0, 14, - 0, 0, 500, 501, 0, 0, 432, 433, 0, 0, - 502, 0, 503, 0, 504, 505, 438, 439, 440, 441, - 442, 0, 0, 0, 0, 0, 443, 0, 445, 0, - 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, - 450, 0, 0, 0, 0, 0, 453, 0, 0, 454, - 0, 0, 455, 0, 0, 0, 458, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 565, 0, 0, 462, - 463, 0, 317, 318, 319, 0, 321, 322, 323, 324, - 325, 464, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 0, 339, 340, 341, 0, 0, 344, - 345, 346, 347, 465, 466, 566, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 469, 470, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, - 0, 474, 475, 476, 477, 478, 0, 479, 0, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 59, 567, 492, 493, 0, 0, 0, 0, 0, 0, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 497, 498, 499, - 0, 14, 0, 0, 500, 501, 0, 0, 432, 433, - 0, 0, 502, 0, 503, 0, 504, 505, 438, 439, - 440, 441, 442, 0, 0, 0, 0, 0, 443, 0, - 445, 0, 0, 0, 448, 0, 0, 0, 0, 0, - 0, 0, 450, 0, 0, 0, 0, 0, 453, 0, - 0, 454, 0, 0, 455, 0, 0, 0, 458, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, - 0, 462, 463, 0, 317, 318, 319, 0, 321, 322, - 323, 324, 325, 464, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 0, 339, 340, 341, 0, - 0, 344, 345, 346, 347, 465, 466, 566, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, + 0, 0, 0, 0, 0, 0, 475, 476, 477, 478, + 479, 0, 480, 0, 481, 482, 483, 484, 485, 486, + 487, 488, 489, 490, 491, 59, 568, 493, 494, 0, + 693, 1374, 0, 0, 0, 495, 312, 0, 0, 0, + 736, 737, 313, 0, 0, 0, 0, 0, 314, 0, + 0, 0, 498, 499, 500, 0, 14, 0, 315, 501, + 502, 0, 0, 0, 0, 0, 316, 1379, 0, 504, + 0, 505, 506, 0, 0, 0, 0, 0, 0, 0, + 0, 317, 0, 0, 0, 0, 0, 0, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, + 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 746, 747, 748, 749, 750, 0, + 0, 753, 754, 755, 756, 0, 758, 759, 760, 761, + 0, 0, 0, 0, 762, 0, 764, 765, 0, 58, + 0, 0, 768, 769, 770, 0, 0, 0, 774, 0, + 0, 0, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 469, 470, 0, -68, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 474, 475, 476, 477, 478, 0, 479, - 0, 480, 481, 482, 483, 484, 485, 486, 487, 488, - 489, 490, 59, 567, 492, 493, 0, 0, 0, 0, - 735, 736, 494, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, - 498, 499, 0, 14, 0, 0, 500, 501, 0, 0, - 0, 0, 0, 0, 1373, 0, 503, 0, 504, 505, - 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, - 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 762, - 763, 764, 765, 766, 0, 0, 767, 768, 769, 770, - 771, 772, 773, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 745, 746, 747, 748, 749, 0, - 0, 752, 753, 754, 755, 0, 757, 758, 759, 760, - 0, 0, 0, 0, 761, 0, 763, 764, 0, 0, - 0, 774, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 692, 0, 0, 0, 0, 0, - 311, 1368, 0, 786, 787, 0, 312, 0, 504, 678, - 735, 736, 313, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, - 315, 777, 778, 779, 780, 781, 782, 783, 784, 785, - 0, 0, 0, 0, 0, 316, 0, 0, 0, 786, - 787, 0, 317, 318, 319, 320, 321, 322, 323, 324, + 0, 0, 0, 0, 0, 0, 0, 0, 776, 0, + 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 0, 312, 0, 0, 0, 0, 0, 313, 0, 787, + 788, 0, 352, 314, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, + 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 317, 0, 0, 0, + 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 0, 0, 0, 0, 0, + 345, 346, 347, 348, 349, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 745, 746, 747, 748, 749, 0, - 0, 752, 753, 754, 755, 0, 757, 758, 759, 760, - 0, 0, 0, 58, 761, 0, 763, 764, 0, 0, - 0, 0, 767, 768, 769, 0, 350, 0, 773, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, - 59, 0, 0, 0, 0, 312, 0, 0, 0, 0, - 0, 313, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 314, 0, 0, 0, 0, 0, 0, 775, 315, - 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, - 0, 0, 0, 0, 316, 0, 351, 0, 0, 786, - 787, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 312, 0, 0, 0, 0, 0, 313, 0, 0, 0, + 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 315, 0, 58, 0, 0, 0, 0, 0, + 316, 0, 0, 0, 0, 0, 0, 351, 0, 0, + 0, 0, 0, 0, 0, 317, 0, 0, 0, 0, + 0, 59, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, - 346, 347, 348, 349, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, - 0, 0, 0, 0, 312, 0, 0, 0, 0, 0, - 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 314, 0, 58, 0, 0, 0, 0, 0, 315, 0, - 0, 0, 0, 0, 0, 350, 0, 0, 0, 0, - 0, 0, 0, 316, 0, 0, 0, 0, 0, 59, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, - 347, 348, 349, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 351, 0, 605, 0, 0, + 346, 347, 348, 349, 350, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 352, 0, 606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 350, 0, 0, 0, 0, 0, - 0, 0, 0, 311, 0, 0, 0, 0, 610, 312, - 0, 0, 0, 0, 0, 313, 0, 0, 0, 0, - 611, 0, 0, 0, 0, 314, 612, 0, 0, 0, - 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 316, 0, - 0, 0, 0, 0, 351, 317, 318, 319, 320, 321, + 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, + 0, 0, 0, 0, 0, 312, 0, 0, 0, 0, + 611, 313, 0, 0, 0, 0, 0, 314, 0, 0, + 0, 0, 612, 0, 0, 0, 0, 315, 613, 0, + 0, 0, 0, 0, 0, 316, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 317, 0, 0, 0, 0, 0, 352, 318, 319, 320, + 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 312, 0, 0, 0, 0, 0, + 313, 0, 0, 0, 0, 0, 314, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 315, 0, 58, 0, + 0, 0, 0, 0, 316, 0, 0, 0, 0, 0, + 0, 351, 0, 0, 0, 0, 0, 0, 0, 317, + 0, 0, 0, 0, 0, 59, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 348, 349, 0, 0, + 342, 343, 344, 345, 346, 347, 348, 349, 350, 736, + 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 311, 0, 0, 0, 0, 0, 312, 0, - 0, 0, 0, 0, 313, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 314, 0, 58, 0, 0, 0, - 0, 0, 315, 0, 0, 0, 0, 0, 0, 350, - 0, 0, 0, 0, 0, 0, 0, 316, 0, 0, - 0, 0, 0, 59, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, 348, 349, 735, 736, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, + 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, + 0, 0, 0, 0, 0, 868, 869, 870, 871, 872, + 873, 874, 875, 746, 747, 748, 749, 750, 876, 877, + 753, 754, 755, 756, 878, 758, 759, 760, 761, -362, + 352, 736, 737, 762, 763, 764, 765, 879, 880, 0, + 0, 768, 769, 770, 881, 882, 883, 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 867, 868, 869, 870, 871, 872, 873, - 874, 745, 746, 747, 748, 749, 875, 876, 752, 753, - 754, 755, 877, 757, 758, 759, 760, -359, 351, 735, - 736, 761, 762, 763, 764, 878, 879, 0, 0, 767, - 768, 769, 880, 881, 882, 773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 884, 776, 0, 777, + 778, 779, 780, 781, 782, 783, 784, 785, 786, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 787, 788, + 0, 0, 0, 505, 679, 0, 0, 868, 869, 870, + 871, 872, 873, 874, 875, 746, 747, 748, 749, 750, + 876, 877, 753, 754, 755, 756, 878, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 763, 764, 765, 879, + 880, 0, 0, 768, 769, 770, 881, 882, 883, 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 736, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 883, 775, 0, 776, 777, 778, - 779, 780, 781, 782, 783, 784, 785, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 786, 787, 0, 0, - 0, 504, 678, 0, 0, 867, 868, 869, 870, 871, - 872, 873, 874, 745, 746, 747, 748, 749, 875, 876, - 752, 753, 754, 755, 877, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 762, 763, 764, 878, 879, 0, - 0, 767, 768, 769, 880, 881, 882, 773, 0, 0, + 0, 1077, 0, 0, 0, 0, 0, 0, 884, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 0, 505, 679, 868, 869, 870, + 871, 872, 873, 874, 875, 746, 747, 748, 749, 750, + 876, 877, 753, 754, 755, 756, 878, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 763, 764, 765, 879, + 880, 0, 0, 768, 769, 770, 881, 882, 883, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 1280, 0, 0, 774, 0, 0, 0, 884, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 0, 505, 679, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 0, + 505, 679, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 800, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 810, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 826, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 841, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1074, - 0, 0, 0, 0, 0, 0, 883, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 0, 504, 678, 867, 868, 869, 870, 871, - 872, 873, 874, 745, 746, 747, 748, 749, 875, 876, - 752, 753, 754, 755, 877, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 762, 763, 764, 878, 879, 0, - 0, 767, 768, 769, 880, 881, 882, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 1274, - 0, 0, 773, 0, 0, 0, 883, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 0, 504, 678, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 799, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 809, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 825, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 840, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1147, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1151, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1153, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1162, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1163, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1164, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1166, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1167, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1295, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1307, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1310, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1445, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1460, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1461, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1480, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1482, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1484, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1488, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1558, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1559, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1560, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1567, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 735, 736, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 735, - 736, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1570, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1580, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 745, 746, - 747, 748, 749, 0, 0, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 735, - 736, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 735, 736, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 0, 0, 1585, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1650, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, - 0, 767, 768, 769, 0, 0, 0, 773, 745, 746, - 747, 748, 749, 735, 736, 752, 753, 754, 755, 0, - 757, 758, 759, 760, 0, 0, 0, 0, 761, 0, - 763, 764, 0, 0, 0, 0, 767, 768, 769, 0, - 0, 0, 773, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 1651, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 775, 0, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 786, 787, 830, 0, 745, 746, 747, - 748, 749, 735, 736, 752, 753, 754, 755, 0, 757, - 758, 759, 760, 0, 0, 0, 0, 761, 0, 763, - 764, 0, 0, 0, 0, 767, 768, 769, 0, 0, - 0, 773, 0, 0, 0, 0, 0, 735, 736, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1150, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1154, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1156, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1166, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1167, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1168, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1170, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1301, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1313, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 775, 0, 776, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 786, 787, 1097, 0, 745, 746, 747, 748, - 749, 0, 0, 752, 753, 754, 755, 0, 757, 758, - 759, 760, 0, 0, 0, 0, 761, 0, 763, 764, - 0, 0, 0, 0, 767, 768, 769, 0, 0, 0, - 773, 745, 746, 747, 748, 749, 735, 736, 752, 753, - 754, 755, 0, 757, 758, 759, 760, 0, 0, 0, - 0, 761, 0, 763, 764, 0, 0, 0, 0, 767, - 768, 769, 0, 0, 0, 773, 0, 0, 0, 0, - 775, 0, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 785, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 786, 787, 1247, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 775, 0, 776, 777, 778, - 779, 780, 781, 782, 783, 784, 785, 975, 0, 0, - 0, 0, 0, 0, 0, 0, 786, 787, 1262, 0, - 745, 746, 747, 748, 749, 735, 736, 752, 753, 754, - 755, 0, 757, 758, 759, 760, 0, 0, 0, 0, - 761, 0, 763, 764, 0, 0, 0, 0, 767, 768, - 769, 0, 0, 0, 773, 0, 0, 0, 0, 317, - 318, 319, 0, 321, 322, 323, 324, 325, 464, 327, - 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, - 0, 339, 340, 341, 0, 0, 344, 345, 346, 347, - 0, 0, 0, 0, 775, 0, 776, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 786, 787, 1395, 0, 745, - 746, 747, 748, 749, 0, 0, 752, 753, 754, 755, - 0, 757, 758, 759, 760, 231, 232, 0, 0, 761, - 0, 763, 764, 0, 0, 976, 0, 767, 768, 769, - 0, 0, 233, 773, 0, 0, 0, 977, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1455, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1470, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1471, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1492, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1494, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1496, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1500, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 735, 736, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1573, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1574, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1581, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 775, 0, 776, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 786, 787, 1400, 0, 0, 0, - 0, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 0, - 0, 252, 253, 254, 0, 0, 0, 0, 0, 0, - 255, 256, 257, 258, 259, 0, 0, 260, 261, 262, - 263, 264, 265, 266, 745, 746, 747, 748, 749, 735, - 736, 752, 753, 754, 755, 0, 757, 758, 759, 760, - 0, 0, 0, 0, 761, 0, 763, 764, 0, 0, - 0, 0, 767, 768, 769, 0, 0, 0, 773, 0, - 0, 0, 0, 267, 0, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 0, 0, 278, 279, 0, - 0, 0, 0, 0, 280, 281, 0, 0, 286, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 775, 0, - 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 786, - 787, 0, 0, 745, 746, 747, 748, 749, 735, 736, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 934, - 0, 767, 768, 769, 0, 0, 0, 773, 0, 0, - 0, 0, 0, 735, 736, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 736, 737, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 736, 737, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1594, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1599, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 736, 737, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 736, 737, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 0, 0, 1664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 1665, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 746, 747, 748, 749, 750, + 736, 737, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 0, 0, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 831, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 1100, 0, 746, 747, 748, 749, 750, 736, + 737, 753, 754, 755, 756, 0, 758, 759, 760, 761, + 0, 0, 0, 0, 762, 0, 764, 765, 0, 0, + 0, 0, 768, 769, 770, 0, 0, 0, 774, 0, + 0, 0, 0, 0, 736, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 775, 0, 776, - 777, 778, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 0, 0, 745, 746, 747, 748, 749, 0, 0, 752, - 753, 754, 755, 0, 757, 758, 759, 760, 0, 0, - 0, 0, 761, 0, 763, 764, 0, 0, 1176, 0, - 767, 768, 769, 735, 736, 0, 773, 745, 746, 747, - 748, 749, 0, 0, 752, 753, 754, 755, 0, 757, - 758, 759, 760, 0, 0, 0, 0, 761, 0, 763, - 764, 0, 0, 0, 0, 767, 768, 769, 735, 736, - 0, 773, 0, 0, 0, 0, 775, 0, 776, 777, - 778, 779, 780, 781, 782, 783, 784, 785, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 786, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 775, 1252, 776, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 0, 0, 0, 0, 745, 746, 747, - 748, 749, 786, 787, 752, 753, 754, 755, 0, 757, - 758, 759, 760, 0, 0, 0, 0, 761, 0, 763, - 764, 0, 0, 0, 0, 767, 768, 769, 735, 736, - 0, 773, 745, 746, 747, 748, 749, 0, 0, 752, - 753, 754, 755, 0, 757, 758, 759, 760, 0, 0, - 0, 0, 761, 0, 763, 764, 0, 0, 0, 0, - 767, 768, 769, 1264, 0, 0, 773, 735, 736, 0, - 0, 775, 0, 776, 777, 778, 779, 780, 781, 782, - 783, 784, 785, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 786, 787, 1357, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 775, 0, 776, 777, - 778, 779, 780, 781, 782, 783, 784, 785, 0, 0, - 0, 0, 745, 746, 747, 748, 749, 786, 787, 752, - 753, 754, 755, 0, 757, 758, 759, 760, 0, 0, - 0, 0, 761, 0, 763, 764, 0, 0, 0, 0, - 767, 768, 769, 0, 0, 0, 773, 735, 736, 0, - 0, 745, 746, 747, 748, 749, 0, 0, 752, 753, - 754, 755, 0, 757, 758, 759, 760, 0, 0, 0, - 0, 761, 0, 763, 764, 0, 0, 0, 1581, 767, - 768, 769, 735, 736, 0, 773, 775, 0, 776, 777, - 778, 779, 780, 781, 782, 783, 784, 785, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 786, 787, 0, - 0, 0, 0, 0, 0, 0, 0, 1641, 0, 0, - 0, 0, 0, 0, 0, 775, 0, 776, 777, 778, - 779, 780, 781, 782, 783, 784, 785, 0, 0, 0, - 0, 745, 746, 747, 748, 749, 786, 787, 752, 753, - 754, 755, 0, 757, 758, 759, 760, 0, 0, 0, - 0, 761, 0, 763, 764, 0, 0, 0, 0, 767, - 768, 769, 735, 736, 0, 773, 745, 746, 747, 748, - 749, 0, 0, 752, 753, 754, 755, 0, 757, 758, - 759, 760, 0, 0, 0, 0, 761, 0, 763, 764, - 0, 0, 0, 0, 767, 768, 769, 1666, 0, 0, - 773, 735, 736, 0, 0, 775, 0, 776, 777, 778, - 779, 780, 781, 782, 783, 784, 785, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 786, 787, 0, 0, - 0, 0, 1667, 0, 0, 0, 0, 0, 0, 0, - 775, 0, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 785, 0, 0, 0, 0, 745, 746, 747, 748, - 749, 786, 787, 752, 753, 754, 755, 0, 757, 758, - 759, 760, 0, 0, 0, 0, 761, 0, 763, 764, - 0, 0, 0, 0, 767, 768, 769, 0, 0, 0, - 773, 735, 736, 0, 0, 745, 746, 747, 748, 749, - 0, 0, 752, 753, 754, 755, 0, 757, 758, 759, - 760, 0, 0, 0, 0, 761, 0, 763, 764, 0, - 0, 0, 1673, 767, 768, 769, 735, 736, 0, 773, - 775, 0, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 785, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 786, 787, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 775, - 0, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 0, 0, 0, 0, 745, 746, 747, 748, 749, - 786, 787, 752, 753, 754, 755, 0, 757, 758, 759, - 760, 0, 0, 0, 0, 761, 0, 763, 764, 0, - 0, 0, 0, 767, 768, 769, 735, 736, 0, -753, - 745, 746, 747, 748, 749, 0, 0, 752, 753, 754, - 755, 0, 757, 758, 759, 760, 0, 0, 0, 0, - 761, 0, 763, 764, 0, 0, 0, 0, 767, 768, - 769, 735, 736, 0, 0, 0, 0, 0, 0, 775, - 0, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 786, 787, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 775, 0, 776, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 0, 0, 0, 0, - 745, 746, 747, 748, 749, 786, 787, 752, 753, 754, - 755, 0, 757, 758, 759, 760, 0, 0, 0, 0, - 761, 0, 763, 764, 0, 0, 0, 0, 767, 0, - 769, 735, 736, 0, 0, 745, 746, 747, 748, 749, - 0, 0, 752, 753, 754, 755, 0, 757, 758, 759, - 760, 0, 0, 0, 0, 761, 0, 763, 764, 735, - 736, 0, 0, 767, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 776, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 786, 787, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 776, 0, + 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, + 788, 1252, 0, 746, 747, 748, 749, 750, 0, 0, + 753, 754, 755, 756, 0, 758, 759, 760, 761, 0, + 0, 0, 0, 762, 0, 764, 765, 0, 0, 0, + 0, 768, 769, 770, 0, 0, 0, 774, 746, 747, + 748, 749, 750, 736, 737, 753, 754, 755, 756, 0, + 758, 759, 760, 761, 0, 0, 0, 0, 762, 0, + 764, 765, 0, 0, 0, 0, 768, 769, 770, 0, + 0, 0, 774, 0, 0, 0, 0, 776, 0, 777, + 778, 779, 780, 781, 782, 783, 784, 785, 786, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 787, 788, + 1268, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 776, 0, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 787, 788, 1403, 0, 746, 747, 748, + 749, 750, 0, 0, 753, 754, 755, 756, 0, 758, + 759, 760, 761, 232, 233, 0, 0, 762, 0, 764, + 765, 0, 0, 0, 0, 768, 769, 770, 0, 0, + 234, 774, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 736, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 0, 0, 0, 0, 745, 746, 747, 748, 749, - 786, 787, 752, 753, 754, 755, 0, 757, 758, 759, - 760, 0, 0, 0, 0, 761, 0, 763, 764, 0, - 0, 0, 0, 745, 746, 747, 748, 749, 0, 0, - 752, 753, 754, 755, 0, 757, 758, 759, 760, 0, - 0, 0, 0, 761, 0, 763, 764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 979, 0, - 0, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 786, 787, 0, 0, 0, 0, 0, 0, 0, 1248, - 0, 0, 779, 780, 781, 782, 783, 784, 785, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 786, 787, - 317, 318, 319, 0, 321, 322, 323, 324, 325, 464, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 337, 0, 339, 340, 341, 0, 0, 344, 345, 346, - 347, 317, 318, 319, 0, 321, 322, 323, 324, 325, - 464, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 0, 339, 340, 341, 0, 0, 344, 345, - 346, 347, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 181, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 980, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 981, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 182, 0, - 183, 0, 184, 185, 186, 187, 188, 1249, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 1250, - 200, 201, 202, 0, 0, 203, 204, 205, 206, 0, + 0, 776, 0, 777, 778, 779, 780, 781, 782, 783, + 784, 785, 786, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 787, 788, 1408, 0, 0, 0, 0, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 0, 0, 253, + 254, 255, 0, 0, 0, 0, 0, 0, 256, 257, + 258, 259, 260, 0, 0, 261, 262, 263, 264, 265, + 266, 267, 746, 747, 748, 749, 750, 736, 737, 753, + 754, 755, 756, 0, 758, 759, 760, 761, 0, 0, + 0, 0, 762, 0, 764, 765, 0, 0, 0, 0, + 768, 769, 770, 0, 0, 0, 774, 0, 0, 0, + 0, 268, 0, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 0, 0, 279, 280, 0, 0, 0, + 0, 0, 281, 282, 0, 0, 287, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 776, 0, 777, 778, + 779, 780, 781, 782, 783, 784, 785, 786, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 787, 788, 0, + 0, 746, 747, 748, 749, 750, 736, 737, 753, 754, + 755, 756, 0, 758, 759, 760, 761, 0, 0, 0, + 0, 762, 0, 764, 765, 0, 0, 935, 0, 768, + 769, 770, 0, 0, 0, 774, 0, 0, 0, 0, + 0, 736, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 207, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 776, 0, 777, 778, 779, + 780, 781, 782, 783, 784, 785, 786, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 787, 788, 0, 0, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 1179, 0, 768, 769, + 770, 736, 737, 0, 774, 746, 747, 748, 749, 750, + 0, 0, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 736, 737, 0, 774, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 776, + 1257, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 746, 747, 748, 749, 750, + 787, 788, 753, 754, 755, 756, 0, 758, 759, 760, + 761, 0, 0, 0, 0, 762, 0, 764, 765, 0, + 0, 0, 0, 768, 769, 770, 736, 737, 0, 774, + 746, 747, 748, 749, 750, 0, 0, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 1270, 0, 0, 774, 736, 737, 0, 0, 776, + 0, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 787, 788, 1363, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 746, 747, 748, 749, 750, 787, 788, 753, 754, 755, + 756, 0, 758, 759, 760, 761, 0, 0, 0, 0, + 762, 0, 764, 765, 0, 0, 0, 0, 768, 769, + 770, 0, 0, 0, 774, 736, 737, 0, 0, 746, + 747, 748, 749, 750, 0, 0, 753, 754, 755, 756, + 0, 758, 759, 760, 761, 0, 0, 0, 0, 762, + 0, 764, 765, 0, 0, 0, 1595, 768, 769, 770, + 736, 737, 0, 774, 776, 0, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 787, 788, 0, 0, 0, + 0, 0, 0, 0, 0, 1655, 0, 0, 0, 0, + 0, 0, 0, 776, 0, 777, 778, 779, 780, 781, + 782, 783, 784, 785, 786, 0, 0, 0, 0, 746, + 747, 748, 749, 750, 787, 788, 753, 754, 755, 756, + 0, 758, 759, 760, 761, 0, 0, 0, 0, 762, + 0, 764, 765, 0, 0, 0, 0, 768, 769, 770, + 736, 737, 0, 774, 746, 747, 748, 749, 750, 0, + 0, 753, 754, 755, 756, 0, 758, 759, 760, 761, + 0, 0, 0, 0, 762, 0, 764, 765, 0, 0, + 0, 0, 768, 769, 770, 1680, 0, 0, 774, 736, + 737, 0, 0, 776, 0, 777, 778, 779, 780, 781, + 782, 783, 784, 785, 786, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 787, 788, 0, 0, 0, 0, + 1681, 0, 0, 0, 0, 0, 0, 0, 776, 0, + 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 0, 0, 0, 0, 746, 747, 748, 749, 750, 787, + 788, 753, 754, 755, 756, 0, 758, 759, 760, 761, + 0, 0, 0, 0, 762, 0, 764, 765, 0, 0, + 0, 0, 768, 769, 770, 0, 0, 0, 774, 736, + 737, 0, 0, 746, 747, 748, 749, 750, 0, 0, + 753, 754, 755, 756, 0, 758, 759, 760, 761, 0, + 0, 0, 0, 762, 0, 764, 765, 0, 0, 0, + 1687, 768, 769, 770, 736, 737, 0, 774, 776, 0, + 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, + 788, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 776, 0, 777, + 778, 779, 780, 781, 782, 783, 784, 785, 786, 0, + 0, 0, 0, 746, 747, 748, 749, 750, 787, 788, + 753, 754, 755, 756, 0, 758, 759, 760, 761, 0, + 0, 0, 0, 762, 0, 764, 765, 0, 0, 0, + 0, 768, 769, 770, 736, 737, 0, -758, 746, 747, + 748, 749, 750, 0, 0, 753, 754, 755, 756, 0, + 758, 759, 760, 761, 0, 0, 0, 0, 762, 0, + 764, 765, 0, 736, 737, 0, 768, 769, 770, 0, + 0, 0, 0, 0, 0, 0, 0, 776, 0, 777, + 778, 779, 780, 781, 782, 783, 784, 785, 786, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 787, 788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 776, 0, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 0, 0, 0, 0, 746, 747, + 748, 749, 750, 787, 788, 753, 754, 755, 756, 0, + 758, 759, 760, 761, 0, 0, 0, 0, 762, 0, + 764, 765, 0, 736, 737, 0, 768, 746, 747, 748, + 749, 750, 0, 0, 753, 754, 755, 756, 0, 758, + 759, 760, 761, 0, 0, 0, 0, 762, 0, 764, + 765, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 777, 778, 779, 780, 781, 782, + 783, 784, 785, 786, 0, 0, 0, 0, 0, 977, + 0, 0, 0, 787, 788, 0, 0, 0, 0, 0, + 0, 0, 0, 777, 778, 779, 780, 781, 782, 783, + 784, 785, 786, 0, 0, 0, 0, 746, 747, 748, + 749, 750, 787, 788, 753, 754, 755, 756, 0, 758, + 759, 760, 761, 0, 0, 0, 0, 762, 0, 764, + 765, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 0, 340, 341, 342, 0, 0, 345, 346, + 347, 348, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 981, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 779, 780, 781, 782, 783, + 784, 785, 786, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 787, 788, 0, 1253, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 978, 0, 0, + 0, 0, 0, 0, 0, 0, 318, 319, 320, 979, + 322, 323, 324, 325, 326, 465, 328, 329, 330, 331, + 332, 333, 334, 335, 336, 337, 338, 0, 340, 341, + 342, 0, 0, 345, 346, 347, 348, 318, 319, 320, + 0, 322, 323, 324, 325, 326, 465, 328, 329, 330, + 331, 332, 333, 334, 335, 336, 337, 338, 0, 340, + 341, 342, 0, 0, 345, 346, 347, 348, 0, 0, + 0, 318, 319, 320, 0, 322, 323, 324, 325, 326, + 465, 328, 329, 330, 331, 332, 333, 334, 335, 336, + 337, 338, 982, 340, 341, 342, 182, 0, 345, 346, + 347, 348, 0, 0, 983, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 209 + 0, 0, 0, 1254, 0, 0, 0, 0, 1056, 1057, + 0, 0, 183, 0, 184, 1255, 185, 186, 187, 188, + 189, 0, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 0, 201, 202, 203, 1058, 0, 204, + 205, 206, 207, 0, 0, 0, 0, 0, 0, 1059, + 0, 0, 0, 0, 0, 0, 0, 0, 208, 209, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1060, 1061, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 210 }; static const yytype_int16 yycheck[] = { - 14, 15, 211, 572, 625, 389, 444, 521, 713, 483, - 715, 376, 376, 691, 592, 693, 693, 591, 444, 227, - 161, 420, 421, 538, 909, 586, 1179, 588, 80, 590, - 383, 816, 925, 818, 418, 820, 472, 473, 931, 854, - 1317, 227, 468, 7, 630, 21, 724, 562, 4, 63, - 64, 65, 18, 19, 1376, 20, 21, 19, 32, 52, - 19, 19, 141, 158, 19, 503, 180, 19, 19, 14, - 15, 56, 19, 52, 156, 103, 130, 62, 1412, 444, - 56, 168, 153, 32, 1536, 33, 168, 158, 193, 168, - 104, 105, 106, 107, 186, 45, 168, 481, 482, 0, - 142, 215, 144, 468, 690, 6, 692, 212, 694, 127, - 128, 1527, 125, 1529, 62, 140, 702, 1533, 1534, 211, - 215, 150, 135, 828, 141, 711, 180, 214, 29, 158, - 31, 213, 33, 212, 125, 142, 143, 144, 39, 168, - 212, 1593, 14, 15, 215, 101, 102, 962, 49, 1471, - 576, 116, 117, 178, 55, 105, 1561, 595, 863, 124, - 301, 126, 127, 128, 129, 680, 374, 219, 168, 134, - 178, 1505, 189, 178, 187, 1591, 854, 156, 79, 192, - 180, 389, 887, 212, 1337, 180, 134, 180, 374, 168, - 218, 209, 210, 141, 179, 900, 187, 1531, 903, 190, - 101, 102, 168, 1608, 642, 643, 213, 212, 20, 21, - 418, 576, 420, 227, 613, 179, 161, 643, 192, 618, - 168, 166, 198, 168, 186, 6, 171, 186, 186, 667, - 1507, 186, 670, 209, 186, 186, 210, 193, 447, 186, - 178, 125, 216, 192, 209, 210, 210, 673, 180, 20, - 21, 135, 461, 305, 124, 203, 212, 127, 128, 49, - 141, 127, 128, 125, 212, 649, 153, 212, 49, 150, - 161, 158, 1436, 481, 482, 1160, 214, 215, 643, 180, - 156, 213, 1175, 187, 962, 963, 724, 168, 672, 161, - 156, 141, 168, 1446, 166, 1110, 168, 733, 199, 171, - 125, 91, 168, 187, 116, 117, 183, 184, 673, 210, - 135, 46, 124, 180, 126, 127, 128, 129, 168, 186, - 172, 173, 134, 190, 186, 187, 213, 189, 215, 150, - 192, 66, 1496, 1497, 211, 1220, 212, 351, 125, 209, - 210, 186, 61, 209, 210, 116, 117, 168, 135, 125, - 1514, 789, 189, 124, 141, 192, 127, 128, 129, 135, - 374, 189, 187, 134, 950, 379, 194, 186, 213, 577, - 578, 579, 125, 581, 582, 389, 802, 585, 731, 587, - 125, 589, 135, 591, 212, 197, 198, 199, 1273, 186, - 135, 577, 578, 579, 213, 581, 582, 209, 210, 585, - 187, 587, 180, 589, 418, 183, 420, 1571, 1572, 808, - 150, 187, 973, 186, 798, 189, 854, 186, 192, 168, - 629, 141, 848, 822, 186, 824, 440, 441, 168, 32, - 150, 180, 1110, 211, 187, 155, 186, 802, 209, 210, - 213, 649, 187, 1336, 213, 654, 961, 186, 168, 32, - 1566, 213, 1237, 186, 186, 1348, 59, 60, 168, 169, - 170, 1577, 936, 213, 672, 849, 850, 481, 482, 56, - 141, 180, 946, 193, 213, 62, 59, 60, 862, 186, - 213, 917, 1103, 848, 922, 194, 885, 20, 21, 199, - 699, 189, 930, 4, 5, 186, 7, 1175, 1175, 186, - 1178, 1617, 1618, 161, 186, 186, 213, 168, 892, 893, - 719, 895, 1190, 1190, 1092, 899, 1090, 901, 902, 122, - 904, 186, 213, 126, 35, 56, 213, 735, 736, 211, - 211, 62, 74, 193, 4, 5, 78, 186, 212, 122, - 193, 186, 193, 126, 186, 1330, 211, 983, 984, 985, - 92, 93, 212, 761, 24, 97, 98, 99, 100, 212, - 30, 212, 211, 577, 578, 579, 211, 581, 582, 211, - 190, 585, 180, 587, 194, 589, 156, 591, 186, 209, - 1365, 114, 115, 116, 117, 188, 194, 193, 168, 192, - 798, 124, 195, 126, 127, 128, 129, 67, 68, 180, - 1161, 134, 180, 136, 137, 188, 212, 210, 186, 192, - 180, 194, 195, 216, 189, 939, 194, 941, 826, 194, - 189, 635, 156, 189, 194, 194, 834, 210, 194, 837, - 180, 101, 102, 216, 168, 649, 186, 212, 846, 168, - 826, 849, 850, 212, 194, 853, 212, 156, 834, 190, - 858, 837, 1213, 194, 862, 180, 797, 178, 672, 168, - 846, 186, 195, 196, 197, 198, 199, 853, 189, 194, - 1108, 141, 858, 178, 168, 884, 209, 210, 168, 20, - 21, 186, 1467, 180, 892, 893, 180, 895, 158, 159, - 160, 899, 186, 901, 902, 1373, 904, 156, 168, 11, - 180, 180, 716, 63, 64, 65, 186, 186, 178, 168, - 22, 23, 156, 180, 194, 194, 142, 143, 144, 1340, - 187, 56, 186, 193, 168, 189, 179, 62, 192, 182, - 1168, 939, 185, 941, 190, 1119, 1120, 1121, 194, 168, - 210, 168, 56, 56, 104, 105, 106, 107, 62, 62, - 56, 1189, 180, 939, 172, 941, 62, 1195, 186, 56, - 1144, 180, 168, 180, 1202, 62, 180, 186, 1206, 186, - 172, 173, 186, 114, 115, 116, 117, 118, 190, 178, - 121, 795, 194, 124, 798, 126, 127, 128, 129, 214, - 215, 180, 180, 134, 180, 136, 137, 186, 186, 190, - 186, 179, 180, 194, 182, 56, 190, 1245, 180, 1370, - 194, 168, 826, 190, 190, 1329, 168, 194, 194, 1257, - 834, 190, 190, 837, 1445, 194, 194, 190, 1212, 86, - 87, 194, 846, 172, 1042, 849, 850, 1515, 142, 853, - 1205, 1205, 20, 21, 858, 168, 169, 170, 862, 376, - 105, 187, 193, 194, 195, 196, 197, 198, 199, 178, - 178, 172, 173, 174, 175, 172, 173, 174, 209, 210, - 1078, 1576, 212, 178, 214, 215, 34, 34, 892, 893, - 212, 895, 1090, 1588, 178, 899, 168, 901, 902, 179, - 904, 168, 1078, 1331, 32, 1573, 179, 180, 181, 10, - 11, 12, 168, 168, 1473, 32, 1611, 1306, 211, 21, - 168, 1119, 1120, 1121, 189, 211, 178, 444, 189, 178, - 212, 59, 60, 1361, 42, 939, 193, 941, 212, 190, - 193, 1609, 59, 60, 212, 168, 1144, 193, 116, 117, - 193, 468, 212, 193, 193, 193, 124, 193, 126, 127, - 128, 129, 193, 193, 193, 135, 134, 168, 212, 211, - 168, 168, 193, 210, 1585, 193, 193, 212, 168, 193, - 193, 180, 193, 161, 1412, 212, 193, 193, 193, 193, - 1454, 1550, 1551, 1457, 122, 36, 212, 212, 126, 180, - 212, 180, 1670, 212, 212, 122, 9, 180, 125, 126, - 1384, 180, 212, 215, 1212, 1214, 32, 180, 135, 180, - 180, 65, 210, 212, 179, 212, 193, 195, 196, 197, - 198, 199, 42, 213, 193, 168, 168, 211, 180, 179, - 1599, 209, 210, 59, 60, 179, 189, 212, 179, 42, - 212, 186, 180, 130, 193, 193, 193, 13, 186, 576, - 188, 187, 189, 180, 192, 161, 194, 195, 186, 215, - 187, 188, 178, 12, 1078, 192, 186, 1505, 195, 158, - 168, 7, 210, 1511, 168, 194, 1090, 168, 216, 213, - 168, 213, 168, 210, 186, 186, 1294, 212, 1472, 216, - 211, 1300, 32, 1531, 179, 179, 122, 168, 213, 125, - 126, 1539, 212, 212, 212, 1119, 1120, 1121, 1294, 135, - 213, 193, 376, 193, 1, 212, 643, 212, 179, 59, - 60, 66, 386, 180, 168, 194, 194, 194, 42, 212, - 1144, 395, 213, 212, 212, 168, 213, 213, 212, 211, - 213, 405, 180, 213, 168, 211, 673, 212, 211, 213, - 168, 415, 168, 168, 193, 213, 1594, 212, 1367, 212, - 424, 187, 188, 212, 212, 1549, 192, 32, 168, 195, - 434, 168, 212, 180, 1383, 212, 1384, 211, 1386, 168, - 444, 213, 122, 211, 210, 449, 126, 451, 211, 32, - 216, 471, 472, 473, 59, 60, 460, 168, 1212, 194, - 1386, 212, 212, 212, 468, 469, 470, 212, 69, 213, - 737, 738, 739, 740, 741, 742, 743, 744, 212, 483, - 212, 212, 212, 750, 751, 212, 194, 491, 213, 756, - 494, 194, 1441, 497, 498, 499, 500, 501, 765, 766, - 212, 521, 212, 770, 771, 772, 510, 774, 188, 180, - 212, 212, 192, 213, 194, 195, 32, 122, 213, 213, - 213, 126, 52, 211, 1472, 186, 179, 179, 548, 179, - 210, 180, 211, 211, 211, 802, 216, 1485, 186, 213, - 1294, 32, 179, 59, 60, 213, 32, 213, 213, 213, - 213, 211, 738, 739, 740, 741, 742, 743, 744, 1485, - 701, 212, 79, 1, 750, 751, 213, 213, 59, 60, - 756, 44, 576, 59, 60, 133, 82, 1464, 795, 765, - 766, 848, 1465, 188, 770, 771, 772, 192, 774, 194, - 195, 225, 948, 1465, 1465, 1465, 1465, 1, 1547, 1441, - 604, 1549, 969, 1381, 1404, 210, 122, 1493, 1407, 1269, - 126, 216, 1494, 428, 560, 52, 1573, -1, 1452, 1185, - 693, 494, -1, -1, -1, -1, -1, 647, -1, -1, - 1384, 122, 1386, -1, -1, 126, 122, -1, 440, 643, - 126, 440, -1, -1, -1, -1, 650, 651, -1, 653, - -1, -1, -1, -1, 658, 675, -1, -1, -1, -1, - 664, -1, -1, -1, -1, -1, -1, -1, -1, 673, - -1, -1, 188, -1, -1, -1, 192, -1, 194, 195, - 684, 685, 686, 687, 688, 689, -1, 691, -1, 693, - -1, -1, -1, -1, 210, 1644, -1, 188, -1, -1, - 216, 192, 188, 194, 195, -1, 192, -1, 194, 195, - -1, -1, -1, 733, -1, -1, 20, 21, 1472, 210, - -1, -1, -1, -1, 210, 216, -1, -1, -1, -1, - 216, 1485, -1, 737, 738, 739, 740, 741, 742, 743, - 744, 745, 746, -1, -1, 749, 750, 751, 752, 753, - 754, -1, 756, 757, -1, 759, 760, 761, 762, 763, - 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, - 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 785, 1536, 787, 804, -1, -1, 791, -1, -1, - -1, -1, -1, -1, -1, 1549, -1, -1, 802, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 114, 115, 116, 117, 118, -1, -1, 121, 122, 123, - 124, 32, 126, 127, 128, 129, -1, -1, -1, -1, - 134, -1, 136, 137, -1, -1, -1, 841, -1, 1593, - -1, -1, -1, -1, 848, -1, -1, -1, 59, 60, - -1, 855, -1, 857, -1, -1, -1, -1, -1, -1, - -1, -1, 866, 867, 868, 869, 870, 871, 872, 873, - 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, - -1, -1, -1, -1, -1, -1, -1, 907, 192, 193, - 194, 195, 196, 197, 198, 199, -1, 917, 32, -1, - -1, -1, -1, -1, -1, 209, 210, -1, -1, -1, - -1, 122, -1, -1, -1, 126, 920, 921, -1, -1, - -1, -1, -1, -1, -1, 59, 60, -1, -1, -1, - 934, -1, 936, -1, -1, -1, -1, -1, 1205, 943, - -1, -1, 946, -1, -1, -1, -1, 951, -1, -1, - -1, -1, -1, -1, -1, -1, 960, -1, -1, -1, - -1, -1, -1, 983, 984, 985, -1, -1, 988, 32, - 990, -1, 992, -1, 994, -1, 996, 188, 998, -1, - 1000, 192, 1002, 194, 195, -1, -1, 1007, 122, 1009, - -1, -1, 126, -1, -1, 1015, 59, 60, -1, 210, - -1, -1, -1, -1, -1, 216, -1, 1027, -1, 1029, - -1, -1, -1, -1, 1034, -1, 1036, -1, 1038, -1, - -1, 1041, -1, -1, -1, -1, -1, -1, -1, 12, - -1, -1, -1, -1, -1, 18, -1, -1, -1, -1, - -1, 24, -1, -1, -1, -1, -1, 30, -1, -1, - -1, 1055, -1, 1073, 188, 1059, 32, 40, 192, 122, - 194, 195, -1, 126, -1, 48, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 210, -1, -1, -1, - 63, -1, 216, 59, 60, 1105, -1, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - -1, -1, -1, -1, -1, 188, -1, -1, -1, 192, - -1, 194, 195, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 1148, -1, 122, 210, -1, -1, - 126, -1, -1, 216, -1, -1, -1, -1, 141, -1, - -1, -1, -1, -1, -1, -1, 1170, 1171, 1172, -1, - -1, 154, 1176, -1, -1, -1, -1, -1, -1, -1, - 1184, 1185, -1, 4, 5, 168, -1, -1, -1, -1, - -1, -1, -1, 14, 15, 16, 17, 18, -1, -1, - -1, 1205, -1, 24, -1, 26, 1210, 1211, -1, 30, - -1, -1, 188, 1217, -1, -1, 192, 38, 194, 195, - -1, 1225, -1, 44, -1, -1, 47, -1, -1, 50, - -1, 214, -1, 54, 210, 1239, -1, 1241, -1, -1, - 216, -1, 1246, 64, -1, -1, 67, 68, 1252, 70, - 71, 72, 1256, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - -1, 92, 93, 94, -1, -1, 97, 98, 99, 100, - 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 1297, -1, 116, 117, -1, -1, -1, - -1, -1, -1, -1, 125, -1, -1, -1, -1, 1329, - 131, 132, 133, 1317, -1, -1, -1, -1, -1, -1, - 141, -1, -1, -1, -1, -1, -1, -1, 149, 150, - 151, 152, 153, -1, 155, -1, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, -1, -1, -1, -1, -1, -1, 178, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 195, 196, 197, -1, 199, -1, - -1, 202, 203, 20, 21, -1, -1, -1, 1392, 210, - 1394, 212, -1, 214, 215, 1399, -1, -1, -1, -1, + 14, 15, 212, 573, 484, 445, 626, 714, 692, 716, + 694, 377, 522, 228, 390, 592, 377, 593, 926, 910, + 421, 422, 694, 631, 932, 80, 817, 1182, 819, 161, + 821, 587, 539, 589, 445, 591, 384, 473, 474, 228, + 5, 725, 855, 419, 1323, 20, 0, 33, 169, 63, + 64, 65, 8, 7, 20, 1382, 563, 103, 469, 22, + 181, 53, 4, 162, 504, 1422, 1446, 20, 15, 16, + 126, 21, 22, 19, 20, 33, 30, 20, 32, 126, + 34, 131, 142, 691, 445, 693, 40, 695, 159, 20, + 104, 105, 106, 107, 57, 703, 50, 20, 20, 7, + 154, 126, 56, 142, 712, 159, 482, 483, 469, 169, + 151, 136, 1575, 5, 6, 194, 49, 57, 159, 143, + 144, 145, 829, 63, 15, 16, 80, 179, 169, 1509, + 1510, 181, 188, 25, 213, 191, 46, 102, 103, 31, + 187, 188, 50, 190, 1549, 216, 193, 1527, 102, 103, + 963, 190, 169, 213, 1481, 33, 596, 864, 91, 1622, + 375, 1518, 216, 188, 33, 220, 577, 117, 118, 181, + 302, 855, 213, 219, 681, 125, 68, 69, 128, 129, + 130, 888, 60, 61, 181, 135, 375, 1544, 1343, 181, + 214, 60, 61, 169, 901, 62, 106, 904, 215, 187, + 53, 390, 1607, 643, 644, 1585, 1586, 193, 128, 129, + 102, 103, 187, 614, 228, 162, 577, 159, 619, 216, + 167, 187, 169, 169, 180, 172, 214, 181, 668, 194, + 419, 671, 421, 644, 187, 193, 199, 213, 448, 191, + 180, 1520, 181, 195, 187, 123, 200, 210, 213, 127, + 142, 306, 462, 211, 123, 211, 187, 211, 127, 217, + 210, 211, 47, 674, 187, 187, 213, 159, 160, 161, + 1178, 162, 1163, 179, 650, 214, 167, 169, 169, 963, + 964, 172, 67, 644, 940, 725, 942, 179, 151, 377, + 210, 211, 125, 482, 483, 128, 129, 673, 734, 141, + 1113, 1456, 194, 181, 157, 151, 169, 213, 142, 187, + 191, 189, 126, 674, 195, 193, 169, 195, 196, 211, + 189, 187, 136, 169, 193, 34, 195, 196, 187, 169, + 170, 171, 1223, 211, 179, 169, 154, 179, 352, 217, + 188, 159, 211, 951, 157, 190, 212, 157, 217, 143, + 790, 145, 126, 212, 63, 169, 169, 445, 181, 169, + 200, 375, 136, 578, 579, 580, 380, 582, 583, 190, + 126, 586, 195, 588, 188, 590, 390, 210, 211, 193, + 136, 469, 187, 33, 732, 126, 142, 187, 1279, 578, + 579, 580, 803, 582, 583, 136, 214, 586, 216, 588, + 213, 590, 126, 592, 214, 419, 187, 421, 809, 142, + 60, 61, 136, 191, 188, 855, 179, 195, 151, 975, + 630, 33, 823, 799, 825, 187, 135, 441, 442, 1113, + 126, 212, 188, 142, 1342, 194, 169, 1540, 849, 1542, + 136, 187, 803, 1546, 1547, 655, 1354, 188, 60, 61, + 212, 1242, 215, 216, 213, 962, 187, 937, 142, 194, + 169, 650, 5, 6, 188, 8, 212, 947, 482, 483, + 184, 185, 187, 123, 850, 851, 187, 127, 213, 215, + 216, 212, 918, 923, 673, 886, 1106, 863, 849, 577, + 700, 931, 188, 36, 1178, 204, 187, 1181, 212, 214, + 169, 212, 1605, 1580, 213, 187, 1178, 21, 22, 1193, + 720, 123, 181, 187, 1591, 127, 1093, 893, 894, 1095, + 896, 1193, 194, 214, 900, 187, 902, 903, 181, 905, + 187, 184, 214, 187, 179, 187, 187, 173, 174, 189, + 214, 213, 187, 193, 142, 1336, 196, 736, 737, 985, + 986, 987, 214, 151, 1631, 1632, 644, 214, 156, 212, + 214, 211, 214, 214, 578, 579, 580, 217, 582, 583, + 187, 169, 586, 762, 588, 194, 590, 189, 592, 187, + 1371, 193, 187, 195, 196, 181, 674, 63, 64, 65, + 180, 181, 188, 183, 213, 190, 194, 214, 787, 211, + 195, 169, 190, 117, 118, 217, 214, 195, 1164, 214, + 799, 125, 827, 127, 128, 129, 130, 210, 213, 190, + 835, 135, 636, 838, 195, 213, 21, 22, 104, 105, + 106, 107, 847, 181, 181, 181, 650, 181, 827, 854, + 187, 187, 213, 187, 859, 191, 835, 195, 195, 838, + 738, 739, 740, 741, 742, 743, 744, 745, 847, 673, + 1216, 850, 851, 751, 752, 854, 798, 190, 213, 757, + 859, 1111, 195, 191, 863, 885, 169, 195, 766, 767, + 21, 22, 162, 771, 772, 773, 1477, 775, 181, 12, + 213, 169, 181, 57, 187, 1379, 210, 211, 187, 63, + 23, 24, 57, 717, 893, 894, 195, 896, 63, 86, + 87, 900, 157, 902, 903, 803, 905, 143, 144, 145, + 115, 116, 117, 118, 169, 940, 1346, 942, 169, 157, + 125, 1171, 127, 128, 129, 130, 190, 157, 57, 193, + 135, 169, 137, 138, 63, 157, 1122, 1123, 1124, 169, + 181, 940, 1192, 942, 181, 75, 187, 169, 1198, 79, + 187, 849, 181, 157, 195, 1205, 57, 190, 195, 1209, + 193, 1147, 63, 93, 94, 169, 117, 118, 98, 99, + 100, 101, 796, 181, 125, 799, 127, 128, 129, 130, + 57, 57, 181, 181, 135, 169, 63, 63, 187, 187, + 169, 196, 197, 198, 199, 200, 195, 195, 187, 169, + 1250, 190, 57, 827, 193, 210, 211, 169, 63, 173, + 1376, 835, 1262, 180, 838, 1335, 183, 1267, 181, 186, + 169, 179, 181, 847, 187, 1455, 850, 851, 187, 1215, + 854, 57, 1208, 181, 1528, 859, 181, 1208, 181, 863, + 181, 173, 187, 143, 187, 1044, 187, 198, 199, 200, + 169, 170, 171, 191, 191, 181, 1081, 195, 195, 210, + 211, 187, 106, 191, 191, 188, 179, 195, 195, 893, + 894, 191, 896, 1590, 35, 195, 900, 179, 902, 903, + 191, 905, 1081, 179, 195, 1602, 191, 1337, 35, 213, + 195, 215, 216, 1587, 1093, 173, 174, 175, 176, 213, + 179, 1312, 169, 1483, 173, 174, 175, 180, 1625, 173, + 174, 175, 180, 181, 182, 169, 940, 1367, 942, 10, + 11, 12, 169, 1122, 1123, 1124, 169, 377, 212, 1623, + 22, 169, 212, 190, 179, 43, 194, 387, 190, 179, + 169, 213, 213, 194, 194, 194, 396, 213, 1147, 136, + 213, 213, 194, 194, 169, 194, 406, 194, 21, 22, + 194, 194, 194, 191, 212, 169, 416, 169, 169, 1599, + 194, 194, 1422, 194, 1464, 425, 211, 1467, 194, 162, + 194, 181, 213, 1563, 1564, 435, 213, 194, 194, 194, + 1684, 194, 37, 213, 213, 445, 213, 1217, 194, 181, + 450, 33, 452, 213, 213, 213, 1392, 181, 10, 181, + 181, 461, 181, 472, 473, 474, 1215, 216, 181, 469, + 470, 471, 181, 66, 213, 211, 180, 194, 60, 61, + 194, 43, 213, 1613, 484, 214, 169, 169, 181, 212, + 180, 180, 492, 180, 190, 495, 43, 213, 498, 499, + 500, 501, 502, 213, 117, 118, 194, 1081, 194, 194, + 187, 511, 125, 522, 127, 128, 129, 130, 1518, 1093, + 131, 14, 135, 188, 1524, 1300, 190, 162, 187, 179, + 13, 187, 216, 169, 8, 169, 1306, 33, 195, 214, + 549, 123, 169, 169, 1544, 127, 1482, 169, 1122, 1123, + 1124, 1300, 1552, 214, 187, 187, 180, 180, 213, 212, + 1208, 169, 214, 214, 60, 61, 213, 213, 213, 194, + 213, 1, 67, 1147, 194, 213, 213, 577, 180, 169, + 181, 195, 213, 196, 197, 198, 199, 200, 195, 195, + 43, 169, 213, 169, 213, 213, 213, 210, 211, 214, + 169, 169, 214, 1373, 214, 605, 169, 189, 1608, 214, + 214, 193, 212, 195, 196, 213, 212, 214, 212, 1394, + 194, 1391, 213, 181, 213, 213, 1562, 123, 213, 211, + 213, 127, 169, 214, 169, 217, 213, 181, 213, 648, + 212, 1215, 169, 1392, 644, 1394, 212, 214, 169, 33, + 169, 651, 652, 212, 654, 195, 213, 213, 213, 659, + 213, 70, 195, 214, 213, 665, 214, 676, 213, 195, + 213, 213, 213, 181, 674, 214, 214, 213, 53, 213, + 212, 1451, 213, 213, 187, 685, 686, 687, 688, 689, + 690, 214, 692, 189, 694, 180, 214, 193, 214, 195, + 196, 180, 180, 212, 181, 187, 702, 214, 214, 214, + 214, 212, 214, 212, 180, 211, 214, 214, 212, 79, + 1, 217, 1497, 213, 44, 734, 1300, 21, 22, 133, + 214, 82, 1474, 1482, 1475, 226, 796, 1475, 738, 739, + 740, 741, 742, 743, 744, 745, 746, 747, 1497, 949, + 750, 751, 752, 753, 754, 755, 1475, 757, 758, 1475, + 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, + 780, 781, 782, 783, 784, 785, 786, 1475, 788, 1, + 1560, 1451, 792, 1389, 970, 1234, 805, 1414, 1506, 1417, + 1275, 429, 1507, 803, 52, 1587, 1462, -1, 1188, 694, + -1, 441, 441, 1562, 561, 495, -1, -1, 1392, -1, + 1394, 115, 116, 117, 118, 119, -1, -1, 122, 123, + 124, 125, -1, 127, 128, 129, 130, -1, -1, -1, + -1, 135, 842, 137, 138, -1, -1, -1, -1, 849, + -1, -1, -1, -1, -1, -1, 856, -1, 858, -1, + -1, -1, -1, -1, -1, -1, -1, 867, 868, 869, + 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, + 880, 881, 882, 883, 884, -1, -1, -1, 1658, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 908, + 194, 195, 196, 197, 198, 199, 200, -1, 1482, 918, + -1, -1, -1, 33, -1, -1, 210, 211, -1, -1, + -1, 921, 922, 1497, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 935, -1, 937, -1, -1, + 60, 61, -1, -1, 944, -1, -1, 947, -1, -1, + -1, -1, 952, -1, -1, -1, -1, -1, -1, -1, + -1, 961, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1549, 985, 986, 987, -1, + -1, 990, -1, 992, -1, 994, -1, 996, 1562, 998, + -1, 1000, -1, 1002, -1, 1004, -1, -1, -1, -1, + 1009, -1, 1011, 123, -1, -1, 126, 127, 1017, -1, + -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, + 1029, -1, 1031, -1, -1, -1, -1, 1036, -1, 1038, + -1, 1040, -1, 1607, 1043, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 13, 21, 22, + -1, -1, -1, 19, -1, -1, -1, 1057, -1, 25, + -1, 1061, -1, -1, -1, 31, -1, 1076, 188, 189, + -1, -1, -1, 193, -1, 41, 196, -1, -1, -1, + -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, + -1, 211, -1, -1, -1, -1, -1, 217, 64, 1108, + -1, -1, -1, -1, -1, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, -1, -1, + -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, + -1, 1151, 125, -1, 127, 128, 129, 130, -1, -1, + -1, -1, 135, -1, 137, 138, -1, -1, -1, -1, + -1, 10, -1, 1173, 1174, 1175, 142, -1, -1, 1179, + -1, -1, 21, 22, -1, -1, -1, 1187, 1188, 155, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 1421, -1, -1, - 1424, -1, -1, -1, -1, -1, -1, -1, 1432, 1433, - 1434, -1, -1, -1, -1, 1439, -1, -1, -1, -1, - 1444, -1, -1, -1, 1448, 1449, 1450, 1451, -1, -1, - 1454, 1455, -1, 1457, 1458, -1, -1, -1, -1, -1, - -1, 1465, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 1476, -1, -1, -1, -1, 114, 115, 116, - 117, 118, -1, -1, 121, 122, 123, 124, -1, 126, - 127, 128, 129, -1, -1, -1, -1, 134, -1, 136, - 137, -1, -1, 1507, -1, 142, 143, 144, -1, -1, - -1, 148, -1, -1, -1, -1, -1, 1521, 1522, -1, + -1, -1, -1, 169, -1, -1, -1, -1, 1208, -1, + -1, -1, -1, 1213, 1214, -1, -1, -1, -1, -1, + 1220, 194, 195, 196, 197, 198, 199, 200, 1228, -1, + -1, -1, -1, -1, -1, -1, -1, 210, 211, -1, + -1, -1, -1, -1, 1244, -1, 1246, -1, -1, 215, + -1, 1251, -1, -1, -1, -1, -1, 1257, -1, -1, + -1, 1261, -1, -1, -1, -1, -1, -1, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 33, -1, -1, -1, 135, 136, 137, 138, + 139, 140, -1, 1303, 143, 144, 145, 146, 147, 148, + 149, -1, 739, 740, 741, 742, 743, 744, 745, 60, + 61, -1, -1, 1323, 751, 752, 1335, -1, -1, -1, + 757, -1, -1, -1, -1, -1, -1, -1, -1, 766, + 767, -1, -1, -1, 771, 772, 773, -1, 775, 188, + 189, -1, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 210, 211, -1, -1, -1, 215, 216, -1, -1, + -1, -1, 123, 21, 22, 126, 127, -1, -1, -1, + -1, -1, -1, -1, -1, 136, -1, -1, -1, -1, + 1400, -1, 1402, -1, -1, -1, -1, 1407, -1, -1, + -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 1535, -1, -1, -1, -1, 1540, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 1552, 1553, - -1, 188, -1, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, -1, 1568, 1569, -1, -1, -1, -1, - -1, -1, 209, 210, -1, -1, -1, 214, 215, -1, + -1, 1431, -1, -1, 1434, -1, -1, -1, -1, -1, + 181, -1, 1442, 1443, 1444, -1, -1, 188, 189, 1449, + -1, -1, 193, -1, 1454, 196, -1, -1, 1458, 1459, + 1460, 1461, -1, -1, 1464, 1465, -1, 1467, 1468, -1, + 211, -1, -1, -1, -1, 1475, 217, 115, 116, 117, + 118, 119, -1, -1, 122, 123, 124, 125, 1488, 127, + 128, 129, 130, -1, -1, -1, -1, 135, -1, 137, + 138, -1, -1, -1, -1, -1, -1, -1, -1, 115, + 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, + 1520, 127, 128, 129, 130, -1, -1, -1, -1, 135, + -1, 137, 138, -1, 1534, 1535, -1, 143, -1, 145, + -1, -1, -1, -1, -1, -1, -1, -1, 1548, -1, + -1, -1, -1, 1553, 192, 193, 194, 195, 196, 197, + 198, 199, 200, -1, -1, 1565, -1, 1567, -1, -1, + -1, 33, 210, 211, -1, -1, -1, -1, -1, -1, + -1, -1, 1582, 1583, -1, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, -1, -1, -1, 60, 61, + -1, -1, -1, -1, 210, 211, -1, -1, -1, 1609, + -1, -1, -1, -1, 1614, 1615, -1, -1, -1, 1, + -1, -1, -1, 5, 6, 7, -1, 9, 10, 11, + -1, 13, -1, 15, 16, 17, 18, 19, -1, 1639, + -1, 1641, 1642, 25, 26, 27, 28, 29, -1, 31, + -1, -1, 1652, -1, -1, -1, 38, 39, -1, -1, + 42, 123, 44, 45, -1, 127, 48, -1, 50, 51, + 52, -1, 54, 55, -1, -1, 58, 59, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, 105, -1, -1, -1, 189, -1, -1, + -1, 193, -1, 195, 196, 117, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 211, + 132, 133, 134, -1, -1, 217, -1, -1, -1, -1, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, -1, -1, -1, -1, -1, -1, 179, 180, 181, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 1595, -1, -1, -1, -1, 1600, 1601, -1, -1, - -1, -1, 1, -1, -1, 4, 5, 6, -1, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 17, 18, - -1, 1625, -1, 1627, 1628, 24, 25, 26, 27, 28, - -1, 30, -1, -1, 1638, -1, -1, -1, 37, 38, - -1, -1, 41, -1, 43, 44, -1, -1, 47, -1, - 49, 50, 51, -1, 53, 54, -1, -1, 57, 58, - -1, -1, -1, -1, -1, 64, -1, -1, 67, 68, - -1, 70, 71, 72, -1, 74, 75, 76, 77, 78, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, -1, -1, -1, -1, 211, + -1, 213, 1, 215, 216, -1, 5, 6, 7, -1, + 9, 10, 11, -1, 13, -1, 15, 16, 17, 18, + 19, -1, -1, -1, -1, -1, 25, 26, 27, 28, + 29, -1, 31, -1, -1, -1, -1, -1, -1, 38, + 39, -1, -1, 42, -1, 44, 45, -1, -1, 48, + -1, 50, 51, 52, -1, 54, 55, -1, -1, 58, + 59, -1, -1, -1, -1, -1, 65, -1, -1, 68, + 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, -1, 92, 93, 94, -1, -1, 97, 98, - 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 116, 117, -1, + 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, + 99, 100, 101, 102, 103, 104, 105, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 131, 132, 133, -1, -1, -1, -1, -1, - -1, -1, 141, -1, -1, -1, -1, -1, -1, -1, - 149, 150, 151, 152, 153, -1, 155, -1, 157, 158, + -1, -1, -1, 132, 133, 134, -1, -1, -1, -1, + -1, -1, -1, 142, -1, -1, -1, -1, -1, -1, + -1, 150, 151, 152, 153, 154, 33, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, -1, -1, -1, -1, -1, -1, 178, - 179, 180, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 195, 196, 197, -1, - 199, -1, -1, 202, 203, -1, -1, -1, -1, -1, - -1, 210, -1, 212, 1, 214, 215, 4, 5, 6, - -1, 8, 9, 10, -1, 12, -1, 14, 15, 16, - 17, 18, -1, -1, -1, -1, -1, 24, 25, 26, - 27, 28, -1, 30, -1, -1, -1, -1, -1, -1, - 37, 38, -1, -1, 41, -1, 43, 44, -1, -1, - 47, -1, 49, 50, 51, -1, 53, 54, -1, -1, - 57, 58, -1, -1, -1, -1, -1, 64, -1, -1, - 67, 68, -1, 70, 71, 72, -1, 74, 75, 76, + 169, 170, 171, 172, -1, -1, -1, -1, -1, -1, + 179, 180, 181, 60, 61, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 196, 197, 198, + -1, 200, -1, -1, 203, 204, -1, -1, 5, 6, + -1, -1, 211, -1, 213, -1, 215, 216, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, + 27, -1, -1, -1, 31, -1, 33, -1, -1, -1, + -1, -1, 39, -1, -1, -1, 123, -1, 45, -1, + 127, 48, -1, -1, 51, -1, 53, -1, 55, -1, + -1, -1, -1, 60, 61, -1, -1, -1, 65, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, -1, 92, 93, 94, -1, -1, - 97, 98, 99, 100, 101, 102, 103, 104, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 116, - 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 131, 132, 133, -1, -1, -1, - -1, -1, -1, -1, 141, -1, -1, -1, -1, -1, - -1, -1, 149, 150, 151, 152, 153, 32, 155, -1, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, + -1, -1, 189, -1, -1, -1, 193, -1, 195, 196, + 117, 118, -1, -1, -1, -1, 123, -1, -1, -1, + 127, -1, -1, -1, 211, -1, -1, -1, -1, -1, + 217, -1, -1, -1, -1, 142, -1, -1, -1, -1, + -1, -1, -1, 150, 151, 152, 153, 154, 33, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, -1, -1, -1, -1, -1, - -1, 178, 179, 180, 59, 60, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 195, 196, - 197, -1, 199, -1, -1, 202, 203, -1, -1, 4, - 5, -1, -1, 210, -1, 212, -1, 214, 215, 14, - 15, 16, 17, 18, -1, -1, -1, -1, -1, 24, - -1, 26, -1, -1, -1, 30, -1, 32, -1, -1, - -1, -1, -1, 38, -1, -1, -1, 122, -1, 44, - -1, 126, 47, -1, -1, 50, -1, 52, -1, 54, - -1, -1, -1, -1, 59, 60, -1, -1, -1, 64, - -1, -1, 67, 68, -1, 70, 71, 72, -1, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, -1, 92, 93, 94, - -1, -1, 97, 98, 99, 100, 101, 102, 103, -1, - -1, -1, -1, 188, -1, -1, -1, 192, -1, 194, - 195, 116, 117, -1, -1, -1, -1, 122, -1, -1, - -1, 126, -1, -1, -1, 210, -1, -1, -1, -1, - -1, 216, -1, -1, -1, -1, 141, -1, -1, -1, - -1, -1, -1, -1, 149, 150, 151, 152, 153, 32, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, -1, -1, -1, - -1, -1, -1, 178, -1, -1, 59, 60, -1, -1, - -1, -1, -1, 188, -1, -1, -1, 192, -1, -1, - 195, 196, 197, -1, 199, -1, -1, 202, 203, -1, - -1, -1, 4, 5, -1, 210, -1, 212, -1, 214, - 215, 216, 14, 15, 16, 17, 18, -1, -1, -1, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - 32, -1, -1, -1, -1, -1, 38, -1, -1, 122, - -1, -1, 44, 126, -1, 47, -1, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, 59, 60, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, 188, -1, -1, -1, 192, - -1, 194, 195, -1, 116, 117, -1, -1, -1, -1, - 122, -1, -1, -1, 126, -1, -1, 210, -1, -1, - -1, -1, -1, 216, -1, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, 32, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, 59, - 60, -1, -1, -1, -1, -1, 188, -1, -1, -1, - 192, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, -1, 4, 5, -1, 210, -1, - 212, -1, 214, 215, 216, 14, 15, 16, 17, 18, - -1, -1, -1, -1, -1, 24, -1, 26, -1, -1, - -1, 30, -1, 32, -1, -1, -1, -1, -1, 38, - -1, -1, 122, -1, -1, 44, 126, -1, 47, -1, - -1, 50, -1, -1, -1, 54, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 64, -1, -1, 67, 68, - -1, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, -1, 92, 93, 94, -1, -1, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, 188, -1, - -1, -1, 192, -1, 194, 195, -1, 116, 117, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 210, -1, -1, -1, -1, -1, 216, -1, -1, -1, - -1, -1, 141, -1, -1, -1, -1, -1, -1, -1, - 149, 150, 151, 152, 153, 32, 155, -1, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, -1, -1, -1, -1, -1, -1, 178, - -1, -1, 59, 60, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 192, -1, -1, 195, 196, 197, -1, - 199, -1, -1, 202, 203, -1, -1, -1, 4, 5, - -1, 210, -1, 212, -1, 214, 215, 216, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, 122, -1, -1, 44, 126, - -1, 47, -1, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + 167, 168, 169, 170, 171, 172, -1, -1, -1, -1, + -1, -1, 179, -1, -1, 60, 61, -1, -1, -1, + -1, -1, 189, -1, -1, -1, 193, -1, -1, 196, + 197, 198, -1, 200, -1, -1, 203, 204, -1, -1, + -1, 5, 6, -1, 211, -1, 213, -1, 215, 216, + 217, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, 33, + -1, -1, -1, -1, -1, 39, -1, -1, 123, -1, + -1, 45, 127, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, -1, -1, 60, 61, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, 189, -1, -1, -1, 193, -1, + 195, 196, -1, 117, 118, -1, -1, -1, -1, 123, + -1, -1, -1, 127, -1, -1, 211, -1, -1, -1, + -1, -1, 217, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, 33, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, 60, 61, + -1, -1, -1, -1, -1, 189, -1, -1, -1, 193, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, -1, 5, 6, -1, 211, -1, 213, + -1, 215, 216, 217, 15, 16, 17, 18, 19, -1, + -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, + 31, -1, 33, -1, -1, -1, -1, -1, 39, -1, + -1, 123, -1, -1, 45, 127, -1, 48, -1, -1, + 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, -1, + 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, + 101, 102, 103, 104, -1, -1, -1, 189, -1, -1, + -1, 193, -1, 195, 196, -1, 117, 118, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 211, + -1, -1, -1, -1, -1, 217, -1, -1, -1, -1, + -1, 142, -1, -1, -1, -1, -1, -1, -1, 150, + 151, 152, 153, 154, 33, 156, -1, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, + -1, 60, 61, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 193, -1, -1, 196, 197, 198, -1, 200, + -1, -1, 203, 204, -1, -1, -1, 5, 6, -1, + 211, -1, 213, -1, 215, 216, 217, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, 123, -1, -1, 45, 127, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + 189, -1, -1, -1, 193, -1, 195, 196, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, 126, -1, + -1, -1, 211, -1, 132, 133, 134, -1, 217, -1, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, 33, 156, -1, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, 60, 61, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, 5, + 6, -1, -1, 211, -1, 213, -1, 215, 216, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, 123, -1, 45, + -1, 127, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, - -1, 188, -1, -1, -1, 192, -1, 194, 195, -1, - 116, 117, -1, -1, -1, -1, -1, -1, -1, 125, - -1, -1, -1, 210, -1, 131, 132, 133, -1, 216, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, 32, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - -1, -1, 178, -1, -1, 59, 60, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - 4, 5, -1, -1, 210, -1, 212, -1, 214, 215, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, 25, 26, 27, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, 122, -1, - 44, -1, 126, 47, -1, -1, 50, 51, -1, -1, - 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, 188, -1, -1, -1, 192, -1, - 194, 195, 116, 117, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 210, -1, -1, -1, - -1, -1, 216, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - 32, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, 59, 60, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, -1, 189, -1, -1, -1, 193, -1, 195, + 196, 117, 118, -1, -1, -1, -1, -1, -1, -1, + 126, -1, -1, -1, -1, 211, 132, 133, 134, -1, + -1, 217, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, 33, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, 60, 61, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, 5, 6, -1, -1, 211, -1, 213, -1, 215, + 216, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, 26, 27, 28, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, 123, + -1, 45, -1, 127, 48, -1, -1, 51, 52, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, 105, -1, -1, -1, 189, -1, -1, -1, 193, + -1, 195, 196, 117, 118, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 211, -1, -1, + -1, -1, -1, 217, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, 33, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, 60, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, 4, 5, -1, -1, 210, -1, 212, -1, - 214, 215, 14, 15, 16, 17, 18, -1, -1, -1, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, - 122, -1, 44, -1, 126, 47, -1, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, 188, -1, -1, -1, - 192, -1, 194, 195, 116, 117, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 210, 131, - 132, 133, -1, -1, 216, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, 32, 155, -1, 157, 158, 159, 160, 161, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, 5, 6, -1, -1, 211, -1, 213, + -1, 215, 216, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, 123, -1, 45, -1, 127, 48, -1, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, 189, -1, -1, + -1, 193, -1, 195, 196, 117, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 211, + 132, 133, 134, -1, -1, 217, -1, -1, -1, -1, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, 33, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, 59, - 60, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, 4, 5, -1, -1, 210, -1, - 212, -1, 214, 215, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, 122, -1, 44, -1, 126, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, 69, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, + 60, 61, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, 5, 6, -1, -1, 211, + -1, 213, -1, 215, 216, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, 123, -1, 45, -1, 127, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + 70, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, 188, -1, - -1, -1, 192, -1, 194, 195, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, 189, + -1, -1, -1, 193, -1, 195, 196, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 210, -1, -1, -1, -1, -1, 216, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, 32, 155, 156, 157, 158, 159, + -1, 211, -1, -1, -1, -1, -1, 217, -1, -1, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, 33, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, - -1, 59, 60, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, 213, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, 122, -1, 44, -1, 126, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, + -1, -1, 60, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, 214, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, 33, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, 123, -1, 45, -1, 127, + 48, -1, -1, 51, -1, -1, -1, 55, -1, 60, + 61, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - 188, -1, -1, -1, 192, -1, 194, 195, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 210, 131, 132, 133, -1, -1, 216, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, 189, -1, -1, -1, 193, -1, 195, 196, 117, + 118, -1, 123, -1, -1, -1, 127, -1, -1, -1, + -1, -1, -1, 211, 132, 133, 134, -1, -1, 217, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, 33, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, -1, -1, - 4, 5, 210, -1, 212, -1, 214, 215, 12, -1, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, -1, 26, -1, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 44, -1, -1, 47, 48, -1, 50, -1, -1, -1, - 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - -1, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, -1, -1, 4, 5, 210, 211, 212, -1, - 214, 215, 12, -1, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, 48, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, -1, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, 60, 61, 189, -1, + -1, -1, 193, -1, 195, 196, -1, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, -1, + 211, 5, 6, 211, -1, 213, 217, 215, 216, 13, + -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, 33, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, 123, + -1, 45, -1, 127, 48, 49, -1, 51, -1, -1, + -1, 55, -1, 60, 61, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, 189, -1, -1, -1, 193, + -1, 195, 196, 117, 118, -1, 123, -1, -1, -1, + 127, -1, -1, -1, -1, -1, -1, 211, -1, -1, + -1, -1, -1, 217, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, 33, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, + 60, 61, 189, -1, -1, -1, 193, -1, 195, 196, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, -1, 211, 5, 6, 211, 212, 213, + 217, 215, 216, 13, -1, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, 123, -1, 45, -1, 127, 48, 49, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, 189, + -1, -1, -1, 193, -1, 195, 196, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, 156, 157, 158, 159, + -1, 211, -1, -1, -1, -1, -1, 217, -1, -1, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, -1, -1, 4, 5, - 210, -1, 212, -1, 214, 215, 12, -1, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, -1, -1, -1, 44, -1, - -1, 47, 48, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, -1, -1, 5, + 6, 211, -1, 213, -1, 215, 216, 13, -1, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + -1, -1, 48, 49, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, -1, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, -1, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - -1, -1, 178, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - -1, -1, 4, 5, 210, 211, 212, -1, 214, 215, - 12, -1, 14, 15, 16, 17, 18, -1, -1, -1, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, - -1, -1, 44, -1, -1, 47, 48, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, -1, -1, 5, 6, 211, 212, 213, -1, 215, + 216, 13, -1, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, 49, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, -1, 155, -1, 157, 158, 159, 160, 161, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, -1, + 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, 4, 5, -1, -1, 210, -1, - 212, -1, 214, 215, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, 69, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, 5, 6, -1, -1, 211, + -1, 213, -1, 215, 216, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + 70, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, 156, 157, 158, 159, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, -1, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, -1, -1, 44, -1, -1, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, -1, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, 4, 5, - -1, -1, 210, 211, 212, -1, 214, 215, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, -1, -1, -1, 44, -1, - -1, 47, -1, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, 60, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, 5, + 6, -1, -1, 211, 212, 213, -1, 215, 216, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, 61, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, -1, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - -1, -1, 178, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - 4, 5, -1, -1, 210, -1, 212, -1, 214, 215, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, -1, 26, -1, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 44, -1, -1, 47, -1, -1, 50, -1, -1, -1, - 54, -1, -1, 57, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, -1, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, 5, 6, -1, -1, 211, -1, 213, -1, 215, + 216, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, 58, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - -1, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, -1, -1, 4, 5, 210, -1, 212, -1, - 214, 215, 12, -1, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, -1, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, -1, -1, 5, 6, 211, -1, 213, + -1, 215, 216, 13, -1, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, -1, 157, 158, 159, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, -1, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, -1, -1, 44, -1, -1, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, -1, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 193, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, -1, -1, - 4, 5, 210, -1, 212, -1, 214, 215, 12, -1, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, -1, 26, -1, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 44, -1, -1, 47, -1, -1, 50, -1, -1, -1, - 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 194, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, -1, + -1, 5, 6, 211, -1, 213, -1, 215, 216, 13, + -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - -1, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, -1, -1, -1, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, 5, 6, -1, -1, 211, -1, 213, + -1, 215, 216, 15, 16, 17, 18, 19, -1, -1, + 22, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, 4, 5, -1, -1, 210, -1, 212, -1, - 214, 215, 14, 15, 16, 17, 18, -1, -1, 21, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, - -1, -1, 44, -1, -1, 47, -1, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, -1, 155, -1, 157, 158, 159, 160, 161, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, -1, + 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, 4, 5, -1, -1, 210, -1, - 212, -1, 214, 215, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, -1, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, 5, 6, -1, -1, 211, + -1, 213, -1, 215, 216, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, -1, 157, 158, 159, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, 213, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, -1, -1, 44, -1, -1, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, 214, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 193, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, 4, 5, - -1, -1, 210, -1, 212, -1, 214, 215, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, -1, -1, -1, 44, -1, - -1, 47, -1, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 194, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, 5, + 6, -1, -1, 211, -1, 213, -1, 215, 216, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, -1, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - -1, -1, 178, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - 4, 5, -1, -1, 210, -1, 212, 213, 214, 215, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, -1, 26, -1, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 44, -1, -1, 47, -1, -1, 50, -1, -1, -1, - 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, -1, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, 5, 6, -1, -1, 211, -1, 213, 214, 215, + 216, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - -1, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, -1, -1, -1, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, 5, 6, -1, -1, 211, -1, 213, + 214, 215, 216, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, 4, 5, -1, -1, 210, -1, 212, 213, - 214, 215, 14, 15, 16, 17, 18, -1, -1, -1, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, - -1, -1, 44, -1, -1, 47, -1, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, -1, 155, -1, 157, 158, 159, 160, 161, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, -1, + 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, 4, 5, -1, -1, 210, -1, - 212, 213, 214, 215, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, -1, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, 5, 6, -1, -1, 211, + -1, 213, 214, 215, 216, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, -1, 157, 158, 159, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, 213, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, -1, -1, 44, -1, -1, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, 214, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, 4, 5, - -1, -1, 210, -1, 212, 213, 214, 215, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, -1, -1, -1, 44, -1, - -1, 47, -1, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, 5, + 6, -1, -1, 211, -1, 213, 214, 215, 216, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 117, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, -1, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - -1, -1, 178, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - 4, 5, -1, -1, 210, -1, 212, 213, 214, 215, - 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, - 24, -1, 26, -1, -1, -1, 30, -1, -1, -1, - -1, -1, -1, -1, 38, -1, -1, -1, -1, -1, - 44, -1, -1, 47, -1, -1, 50, -1, -1, -1, - 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, 67, 68, -1, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, -1, 92, 93, - 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, -1, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, 5, 6, -1, -1, 211, -1, 213, 214, 215, + 216, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 116, 117, -1, -1, -1, -1, -1, -1, - -1, 125, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 141, -1, -1, - -1, -1, -1, -1, -1, 149, 150, 151, 152, 153, - -1, 155, -1, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, -1, -1, - -1, -1, -1, -1, 178, -1, -1, -1, -1, -1, + -1, -1, 196, 197, 198, -1, 200, -1, -1, 203, + 204, -1, -1, 5, 6, -1, -1, 211, -1, 213, + 214, 215, 216, 15, 16, 17, 18, 19, -1, -1, + -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, + -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, 68, 69, -1, 71, + 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, + 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 195, 196, 197, -1, 199, -1, -1, 202, 203, - -1, -1, 4, 5, -1, -1, 210, -1, 212, -1, - 214, 215, 14, 15, 16, 17, 18, -1, -1, -1, - -1, -1, 24, -1, 26, -1, -1, -1, 30, -1, - -1, -1, -1, -1, -1, -1, 38, -1, -1, -1, - -1, -1, 44, -1, -1, 47, -1, -1, 50, -1, - -1, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 64, -1, -1, 67, 68, -1, 70, 71, - 72, -1, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -1, - 92, 93, 94, -1, -1, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, - -1, -1, -1, 125, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - -1, -1, -1, -1, -1, -1, -1, 149, 150, 151, - 152, 153, -1, 155, -1, 157, 158, 159, 160, 161, + 142, -1, -1, -1, -1, -1, -1, -1, 150, 151, + 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - -1, -1, -1, -1, -1, -1, 178, -1, -1, -1, + 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 195, 196, 197, -1, 199, -1, -1, - 202, 203, -1, -1, 4, 5, -1, -1, 210, -1, - 212, -1, 214, 215, 14, 15, 16, 17, 18, -1, - -1, -1, -1, -1, 24, -1, 26, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, 38, -1, - -1, -1, -1, -1, 44, -1, -1, 47, -1, -1, - 50, -1, -1, -1, 54, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 64, -1, -1, 67, 68, -1, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, -1, -1, 196, 197, 198, -1, 200, -1, + -1, 203, 204, -1, -1, 5, 6, -1, -1, 211, + -1, 213, -1, 215, 216, 15, 16, 17, 18, 19, + -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, + -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, 68, 69, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 116, 117, -1, -1, - -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, 149, - 150, 151, 152, 153, -1, 155, -1, 157, 158, 159, + -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, + 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, -1, -1, -1, -1, -1, -1, 178, -1, + 170, 171, 172, -1, -1, -1, -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 195, 196, 197, -1, 199, - -1, -1, 202, 203, -1, -1, 4, 5, -1, -1, - 210, -1, 212, -1, 214, 215, 14, 15, 16, 17, - 18, -1, -1, -1, -1, -1, 24, -1, 26, -1, - -1, -1, 30, -1, -1, -1, -1, -1, -1, -1, - 38, -1, -1, -1, -1, -1, 44, -1, -1, 47, - -1, -1, 50, -1, -1, -1, 54, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 64, -1, -1, 67, - 68, -1, 70, 71, 72, -1, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 196, 197, 198, -1, + 200, -1, -1, 203, 204, -1, -1, 5, 6, -1, + -1, 211, -1, 213, -1, 215, 216, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, + 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, -1, 92, 93, 94, -1, -1, 97, - 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 116, 117, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 141, -1, -1, -1, -1, -1, -1, - -1, 149, 150, 151, 152, 153, -1, 155, -1, 157, + -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, + -1, -1, 150, 151, 152, 153, 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, -1, -1, -1, -1, -1, -1, - 178, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 195, 196, 197, - -1, 199, -1, -1, 202, 203, -1, -1, 4, 5, - -1, -1, 210, -1, 212, -1, 214, 215, 14, 15, - 16, 17, 18, -1, -1, -1, -1, -1, 24, -1, - 26, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, 38, -1, -1, -1, -1, -1, 44, -1, - -1, 47, -1, -1, 50, -1, -1, -1, 54, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, - -1, 67, 68, -1, 70, 71, 72, -1, 74, 75, + 168, 169, 170, 171, 172, -1, -1, -1, -1, -1, + -1, 179, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 196, 197, + 198, -1, 200, -1, -1, 203, 204, -1, -1, 5, + 6, -1, -1, 211, -1, 213, -1, 215, 216, 15, + 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, + -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, -1, 92, 93, 94, -1, - -1, 97, 98, 99, 100, 101, 102, 103, -1, -1, + 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, + -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, + -1, -1, -1, -1, 150, 151, 152, 153, 154, -1, + 156, -1, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, -1, -1, -1, + -1, -1, -1, 179, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 196, 197, 198, -1, 200, -1, -1, 203, 204, -1, + -1, 5, 6, -1, -1, 211, -1, 213, -1, 215, + 216, 15, 16, 17, 18, 19, -1, -1, -1, -1, + -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, + -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, + 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 116, 117, -1, 9, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, 149, 150, 151, 152, 153, -1, 155, - -1, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, -1, -1, -1, -1, - 20, 21, 178, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 195, - 196, 197, -1, 199, -1, -1, 202, 203, -1, -1, - -1, -1, -1, -1, 210, -1, 212, -1, 214, 215, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, -1, -1, -1, -1, 134, 135, - 136, 137, 138, 139, -1, -1, 142, 143, 144, 145, - 146, 147, 148, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 114, 115, 116, 117, 118, -1, - -1, 121, 122, 123, 124, -1, 126, 127, 128, 129, - -1, -1, -1, -1, 134, -1, 136, 137, -1, -1, - -1, 187, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 12, -1, -1, -1, -1, -1, - 18, 11, -1, 209, 210, -1, 24, -1, 214, 215, - 20, 21, 30, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, - 48, 191, 192, 193, 194, 195, 196, 197, 198, 199, - -1, -1, -1, -1, -1, 63, -1, -1, -1, 209, - 210, -1, 70, 71, 72, 73, 74, 75, 76, 77, + -1, -1, -1, -1, -1, -1, -1, -1, 142, -1, + -1, -1, -1, -1, -1, -1, 150, 151, 152, 153, + 154, -1, 156, -1, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, -1, + 13, 12, -1, -1, -1, 179, 19, -1, -1, -1, + 21, 22, 25, -1, -1, -1, -1, -1, 31, -1, + -1, -1, 196, 197, 198, -1, 200, -1, 41, 203, + 204, -1, -1, -1, -1, -1, 49, 211, -1, 213, + -1, 215, 216, -1, -1, -1, -1, -1, -1, -1, + -1, 64, -1, -1, -1, -1, -1, -1, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + -1, -1, -1, -1, 135, -1, 137, 138, -1, 142, + -1, -1, 143, 144, 145, -1, -1, -1, 149, -1, + -1, -1, 155, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 169, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 189, -1, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + -1, 19, -1, -1, -1, -1, -1, 25, -1, 210, + 211, -1, 215, 31, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, -1, -1, -1, -1, + -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, + -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, -1, -1, -1, -1, -1, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 114, 115, 116, 117, 118, -1, - -1, 121, 122, 123, 124, -1, 126, 127, 128, 129, - -1, -1, -1, 141, 134, -1, 136, 137, -1, -1, - -1, -1, 142, 143, 144, -1, 154, -1, 148, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 18, - 168, -1, -1, -1, -1, 24, -1, -1, -1, -1, - -1, 30, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 40, -1, -1, -1, -1, -1, -1, 188, 48, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - -1, -1, -1, -1, 63, -1, 214, -1, -1, 209, - 210, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 19, -1, -1, -1, -1, -1, 25, -1, -1, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 41, -1, 142, -1, -1, -1, -1, -1, + 49, -1, -1, -1, -1, -1, -1, 155, -1, -1, + -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, + -1, 169, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 18, -1, - -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, - 30, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 40, -1, 141, -1, -1, -1, -1, -1, 48, -1, - -1, -1, -1, -1, -1, 154, -1, -1, -1, -1, - -1, -1, -1, 63, -1, -1, -1, -1, -1, 168, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 214, -1, 216, -1, -1, + 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 215, -1, 217, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 142, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 155, -1, -1, -1, + -1, -1, -1, -1, -1, 19, -1, -1, -1, -1, + 169, 25, -1, -1, -1, -1, -1, 31, -1, -1, + -1, -1, 181, -1, -1, -1, -1, 41, 187, -1, + -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 154, -1, -1, -1, -1, -1, - -1, -1, -1, 18, -1, -1, -1, -1, 168, 24, - -1, -1, -1, -1, -1, 30, -1, -1, -1, -1, - 180, -1, -1, -1, -1, 40, 186, -1, -1, -1, - -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 63, -1, - -1, -1, -1, -1, 214, 70, 71, 72, 73, 74, + 64, -1, -1, -1, -1, -1, 215, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, + 25, -1, -1, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 41, -1, 142, -1, + -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, + -1, 155, -1, -1, -1, -1, -1, -1, -1, 64, + -1, -1, -1, -1, -1, 169, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, -1, -1, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 215, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 18, -1, -1, -1, -1, -1, 24, -1, - -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 40, -1, 141, -1, -1, -1, - -1, -1, 48, -1, -1, -1, -1, -1, -1, 154, - -1, -1, -1, -1, -1, -1, -1, 63, -1, -1, - -1, -1, -1, 168, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 20, 21, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 155, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 169, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 141, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, + -1, -1, -1, -1, -1, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 215, 21, 22, 135, 136, 137, 138, 139, 140, -1, + -1, 143, 144, 145, 146, 147, 148, 149, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 168, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 214, 20, - 21, 134, 135, 136, 137, 138, 139, -1, -1, 142, - 143, 144, 145, 146, 147, 148, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 188, 189, -1, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 210, 211, + -1, -1, -1, 215, 216, -1, -1, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 21, 22, -1, -1, 135, 136, 137, 138, 139, + 140, -1, -1, 143, 144, 145, 146, 147, 148, 149, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 187, 188, -1, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 209, 210, -1, -1, - -1, 214, 215, -1, -1, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 20, - 21, -1, -1, 134, 135, 136, 137, 138, 139, -1, - -1, 142, 143, 144, 145, 146, 147, 148, -1, -1, + -1, 181, -1, -1, -1, -1, -1, -1, 188, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, -1, 215, 216, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, -1, -1, -1, -1, 135, 136, 137, 138, 139, + 140, -1, -1, 143, 144, 145, 146, 147, 148, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, 181, -1, -1, 149, -1, -1, -1, 188, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, -1, 215, 216, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, -1, + 215, 216, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, - -1, -1, -1, -1, -1, -1, 187, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, -1, 214, 215, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, -1, - -1, -1, -1, 134, 135, 136, 137, 138, 139, -1, - -1, 142, 143, 144, 145, 146, 147, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, 180, - -1, -1, 148, -1, -1, -1, 187, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, -1, 214, 215, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, 20, 21, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 20, - 21, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 114, 115, - 116, 117, 118, -1, -1, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, 20, - 21, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 20, 21, -1, -1, -1, -1, - -1, -1, -1, 209, 210, -1, -1, 213, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, - -1, 142, 143, 144, -1, -1, -1, 148, 114, 115, - 116, 117, 118, 20, 21, 121, 122, 123, 124, -1, - 126, 127, 128, 129, -1, -1, -1, -1, 134, -1, - 136, 137, -1, -1, -1, -1, 142, 143, 144, -1, - -1, -1, 148, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 213, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 188, -1, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 209, 210, 211, -1, 114, 115, 116, - 117, 118, 20, 21, 121, 122, 123, 124, -1, 126, - 127, 128, 129, -1, -1, -1, -1, 134, -1, 136, - 137, -1, -1, -1, -1, 142, 143, 144, -1, -1, - -1, 148, -1, -1, -1, -1, -1, 20, 21, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 188, -1, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 209, 210, 211, -1, 114, 115, 116, 117, - 118, -1, -1, 121, 122, 123, 124, -1, 126, 127, - 128, 129, -1, -1, -1, -1, 134, -1, 136, 137, - -1, -1, -1, -1, 142, 143, 144, -1, -1, -1, - 148, 114, 115, 116, 117, 118, 20, 21, 121, 122, - 123, 124, -1, 126, 127, 128, 129, -1, -1, -1, - -1, 134, -1, 136, 137, -1, -1, -1, -1, 142, - 143, 144, -1, -1, -1, 148, -1, -1, -1, -1, - 188, -1, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 209, 210, 211, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 188, -1, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 18, -1, -1, - -1, -1, -1, -1, -1, -1, 209, 210, 211, -1, - 114, 115, 116, 117, 118, 20, 21, 121, 122, 123, - 124, -1, 126, 127, 128, 129, -1, -1, -1, -1, - 134, -1, 136, 137, -1, -1, -1, -1, 142, 143, - 144, -1, -1, -1, 148, -1, -1, -1, -1, 70, - 71, 72, -1, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - -1, 92, 93, 94, -1, -1, 97, 98, 99, 100, - -1, -1, -1, -1, 188, -1, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 209, 210, 211, -1, 114, - 115, 116, 117, 118, -1, -1, 121, 122, 123, 124, - -1, 126, 127, 128, 129, 20, 21, -1, -1, 134, - -1, 136, 137, -1, -1, 156, -1, 142, 143, 144, - -1, -1, 37, 148, -1, -1, -1, 168, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 188, -1, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 209, 210, 211, -1, -1, -1, - -1, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, -1, - -1, 126, 127, 128, -1, -1, -1, -1, -1, -1, - 135, 136, 137, 138, 139, -1, -1, 142, 143, 144, - 145, 146, 147, 148, 114, 115, 116, 117, 118, 20, - 21, 121, 122, 123, 124, -1, 126, 127, 128, 129, - -1, -1, -1, -1, 134, -1, 136, 137, -1, -1, - -1, -1, 142, 143, 144, -1, -1, -1, 148, -1, - -1, -1, -1, 188, -1, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, -1, -1, 202, 203, -1, - -1, -1, -1, -1, 209, 210, -1, -1, 178, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 188, -1, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 209, - 210, -1, -1, 114, 115, 116, 117, 118, 20, 21, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, 140, - -1, 142, 143, 144, -1, -1, -1, 148, -1, -1, - -1, -1, -1, 20, 21, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 21, 22, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 21, 22, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 21, 22, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 21, 22, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, 214, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 115, 116, 117, 118, 119, + 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, 212, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, 212, -1, 115, 116, 117, 118, 119, 21, + 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, + -1, -1, -1, -1, 135, -1, 137, 138, -1, -1, + -1, -1, 143, 144, 145, -1, -1, -1, 149, -1, + -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 188, -1, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - -1, -1, 114, 115, 116, 117, 118, -1, -1, 121, - 122, 123, 124, -1, 126, 127, 128, 129, -1, -1, - -1, -1, 134, -1, 136, 137, -1, -1, 140, -1, - 142, 143, 144, 20, 21, -1, 148, 114, 115, 116, - 117, 118, -1, -1, 121, 122, 123, 124, -1, 126, - 127, 128, 129, -1, -1, -1, -1, 134, -1, 136, - 137, -1, -1, -1, -1, 142, 143, 144, 20, 21, - -1, 148, -1, -1, -1, -1, 188, -1, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 209, 210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, -1, -1, -1, -1, 114, 115, 116, - 117, 118, 209, 210, 121, 122, 123, 124, -1, 126, - 127, 128, 129, -1, -1, -1, -1, 134, -1, 136, - 137, -1, -1, -1, -1, 142, 143, 144, 20, 21, - -1, 148, 114, 115, 116, 117, 118, -1, -1, 121, - 122, 123, 124, -1, 126, 127, 128, 129, -1, -1, - -1, -1, 134, -1, 136, 137, -1, -1, -1, -1, - 142, 143, 144, 180, -1, -1, 148, 20, 21, -1, - -1, 188, -1, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 209, 210, 176, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 188, -1, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, -1, -1, - -1, -1, 114, 115, 116, 117, 118, 209, 210, 121, - 122, 123, 124, -1, 126, 127, 128, 129, -1, -1, - -1, -1, 134, -1, 136, 137, -1, -1, -1, -1, - 142, 143, 144, -1, -1, -1, 148, 20, 21, -1, - -1, 114, 115, 116, 117, 118, -1, -1, 121, 122, - 123, 124, -1, 126, 127, 128, 129, -1, -1, -1, - -1, 134, -1, 136, 137, -1, -1, -1, 180, 142, - 143, 144, 20, 21, -1, 148, 188, -1, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 209, 210, -1, - -1, -1, -1, -1, -1, -1, -1, 180, -1, -1, - -1, -1, -1, -1, -1, 188, -1, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, -1, -1, -1, - -1, 114, 115, 116, 117, 118, 209, 210, 121, 122, - 123, 124, -1, 126, 127, 128, 129, -1, -1, -1, - -1, 134, -1, 136, 137, -1, -1, -1, -1, 142, - 143, 144, 20, 21, -1, 148, 114, 115, 116, 117, - 118, -1, -1, 121, 122, 123, 124, -1, 126, 127, - 128, 129, -1, -1, -1, -1, 134, -1, 136, 137, - -1, -1, -1, -1, 142, 143, 144, 180, -1, -1, - 148, 20, 21, -1, -1, 188, -1, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 209, 210, -1, -1, - -1, -1, 180, -1, -1, -1, -1, -1, -1, -1, - 188, -1, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, -1, -1, -1, -1, 114, 115, 116, 117, - 118, 209, 210, 121, 122, 123, 124, -1, 126, 127, - 128, 129, -1, -1, -1, -1, 134, -1, 136, 137, - -1, -1, -1, -1, 142, 143, 144, -1, -1, -1, - 148, 20, 21, -1, -1, 114, 115, 116, 117, 118, - -1, -1, 121, 122, 123, 124, -1, 126, 127, 128, - 129, -1, -1, -1, -1, 134, -1, 136, 137, -1, - -1, -1, 180, 142, 143, 144, 20, 21, -1, 148, - 188, -1, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 209, 210, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 188, - -1, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, -1, -1, -1, -1, 114, 115, 116, 117, 118, - 209, 210, 121, 122, 123, 124, -1, 126, 127, 128, - 129, -1, -1, -1, -1, 134, -1, 136, 137, -1, - -1, -1, -1, 142, 143, 144, 20, 21, -1, 148, - 114, 115, 116, 117, 118, -1, -1, 121, 122, 123, - 124, -1, 126, 127, 128, 129, -1, -1, -1, -1, - 134, -1, 136, 137, -1, -1, -1, -1, 142, 143, - 144, 20, 21, -1, -1, -1, -1, -1, -1, 188, - -1, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 209, 210, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 188, -1, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, -1, -1, -1, -1, - 114, 115, 116, 117, 118, 209, 210, 121, 122, 123, - 124, -1, 126, 127, 128, 129, -1, -1, -1, -1, - 134, -1, 136, 137, -1, -1, -1, -1, 142, -1, - 144, 20, 21, -1, -1, 114, 115, 116, 117, 118, - -1, -1, 121, 122, 123, 124, -1, 126, 127, 128, - 129, -1, -1, -1, -1, 134, -1, 136, 137, 20, - 21, -1, -1, 142, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 209, 210, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 189, -1, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 210, + 211, 212, -1, 115, 116, 117, 118, 119, -1, -1, + 122, 123, 124, 125, -1, 127, 128, 129, 130, -1, + -1, -1, -1, 135, -1, 137, 138, -1, -1, -1, + -1, 143, 144, 145, -1, -1, -1, 149, 115, 116, + 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, + 127, 128, 129, 130, -1, -1, -1, -1, 135, -1, + 137, 138, -1, -1, -1, -1, 143, 144, 145, -1, + -1, -1, 149, -1, -1, -1, -1, 189, -1, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 210, 211, + 212, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 189, -1, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 210, 211, 212, -1, 115, 116, 117, + 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, + 128, 129, 130, 21, 22, -1, -1, 135, -1, 137, + 138, -1, -1, -1, -1, 143, 144, 145, -1, -1, + 38, 149, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 21, 22, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 189, -1, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 210, 211, 212, -1, -1, -1, -1, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, -1, -1, 127, + 128, 129, -1, -1, -1, -1, -1, -1, 136, 137, + 138, 139, 140, -1, -1, 143, 144, 145, 146, 147, + 148, 149, 115, 116, 117, 118, 119, 21, 22, 122, + 123, 124, 125, -1, 127, 128, 129, 130, -1, -1, + -1, -1, 135, -1, 137, 138, -1, -1, -1, -1, + 143, 144, 145, -1, -1, -1, 149, -1, -1, -1, + -1, 189, -1, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, -1, -1, 203, 204, -1, -1, -1, + -1, -1, 210, 211, -1, -1, 179, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 189, -1, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 210, 211, -1, + -1, 115, 116, 117, 118, 119, 21, 22, 122, 123, + 124, 125, -1, 127, 128, 129, 130, -1, -1, -1, + -1, 135, -1, 137, 138, -1, -1, 141, -1, 143, + 144, 145, -1, -1, -1, 149, -1, -1, -1, -1, + -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 189, -1, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 210, 211, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, 141, -1, 143, 144, + 145, 21, 22, -1, 149, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, 21, 22, -1, 149, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, 115, 116, 117, 118, 119, + 210, 211, 122, 123, 124, 125, -1, 127, 128, 129, + 130, -1, -1, -1, -1, 135, -1, 137, 138, -1, + -1, -1, -1, 143, 144, 145, 21, 22, -1, 149, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, 181, -1, -1, 149, 21, 22, -1, -1, 189, + -1, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, 177, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + 115, 116, 117, 118, 119, 210, 211, 122, 123, 124, + 125, -1, 127, 128, 129, 130, -1, -1, -1, -1, + 135, -1, 137, 138, -1, -1, -1, -1, 143, 144, + 145, -1, -1, -1, 149, 21, 22, -1, -1, 115, + 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, + -1, 127, 128, 129, 130, -1, -1, -1, -1, 135, + -1, 137, 138, -1, -1, -1, 181, 143, 144, 145, + 21, 22, -1, 149, 189, -1, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 210, 211, -1, -1, -1, + -1, -1, -1, -1, -1, 181, -1, -1, -1, -1, + -1, -1, -1, 189, -1, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, -1, -1, -1, -1, 115, + 116, 117, 118, 119, 210, 211, 122, 123, 124, 125, + -1, 127, 128, 129, 130, -1, -1, -1, -1, 135, + -1, 137, 138, -1, -1, -1, -1, 143, 144, 145, + 21, 22, -1, 149, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + -1, -1, -1, -1, 135, -1, 137, 138, -1, -1, + -1, -1, 143, 144, 145, 181, -1, -1, 149, 21, + 22, -1, -1, 189, -1, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 210, 211, -1, -1, -1, -1, + 181, -1, -1, -1, -1, -1, -1, -1, 189, -1, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + -1, -1, -1, -1, 115, 116, 117, 118, 119, 210, + 211, 122, 123, 124, 125, -1, 127, 128, 129, 130, + -1, -1, -1, -1, 135, -1, 137, 138, -1, -1, + -1, -1, 143, 144, 145, -1, -1, -1, 149, 21, + 22, -1, -1, 115, 116, 117, 118, 119, -1, -1, + 122, 123, 124, 125, -1, 127, 128, 129, 130, -1, + -1, -1, -1, 135, -1, 137, 138, -1, -1, -1, + 181, 143, 144, 145, 21, 22, -1, 149, 189, -1, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 210, + 211, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 189, -1, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, -1, + -1, -1, -1, 115, 116, 117, 118, 119, 210, 211, + 122, 123, 124, 125, -1, 127, 128, 129, 130, -1, + -1, -1, -1, 135, -1, 137, 138, -1, -1, -1, + -1, 143, 144, 145, 21, 22, -1, 149, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + 127, 128, 129, 130, -1, -1, -1, -1, 135, -1, + 137, 138, -1, 21, 22, -1, 143, 144, 145, -1, + -1, -1, -1, -1, -1, -1, -1, 189, -1, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 210, 211, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, -1, -1, -1, -1, 114, 115, 116, 117, 118, - 209, 210, 121, 122, 123, 124, -1, 126, 127, 128, - 129, -1, -1, -1, -1, 134, -1, 136, 137, -1, - -1, -1, -1, 114, 115, 116, 117, 118, -1, -1, - 121, 122, 123, 124, -1, 126, 127, 128, 129, -1, - -1, -1, -1, 134, -1, 136, 137, -1, -1, -1, + -1, -1, 189, -1, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, -1, -1, -1, -1, 115, 116, + 117, 118, 119, 210, 211, 122, 123, 124, 125, -1, + 127, 128, 129, 130, -1, -1, -1, -1, 135, -1, + 137, 138, -1, 21, 22, -1, 143, 115, 116, 117, + 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, + 128, 129, 130, -1, -1, -1, -1, 135, -1, 137, + 138, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 18, -1, - -1, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 209, 210, -1, -1, -1, -1, -1, -1, -1, 18, - -1, -1, 193, 194, 195, 196, 197, 198, 199, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 209, 210, - 70, 71, 72, -1, 74, 75, 76, 77, 78, 79, + -1, -1, -1, -1, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, -1, -1, -1, -1, -1, 19, + -1, -1, -1, 210, 211, -1, -1, -1, -1, -1, + -1, -1, -1, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, -1, -1, -1, -1, 115, 116, 117, + 118, 119, 210, 211, 122, 123, 124, 125, -1, 127, + 128, 129, 130, -1, -1, -1, -1, 135, -1, 137, + 138, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, 92, 93, 94, -1, -1, 97, 98, 99, - 100, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, -1, 92, 93, 94, -1, -1, 97, 98, - 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 34, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 156, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 168, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 70, -1, - 72, -1, 74, 75, 76, 77, 78, 156, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 168, - 92, 93, 94, -1, -1, 97, 98, 99, 100, -1, + 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, + 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 19, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 193, 194, 195, 196, 197, + 198, 199, 200, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 210, 211, -1, 19, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 157, -1, -1, + -1, -1, -1, -1, -1, -1, 71, 72, 73, 169, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, + 95, -1, -1, 98, 99, 100, 101, 71, 72, 73, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, + 94, 95, -1, -1, 98, 99, 100, 101, -1, -1, + -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 157, 93, 94, 95, 35, -1, 98, 99, + 100, 101, -1, -1, 169, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 116, 117, -1, -1, -1, -1, + -1, -1, -1, 157, -1, -1, -1, -1, 128, 129, + -1, -1, 71, -1, 73, 169, 75, 76, 77, 78, + 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, -1, 93, 94, 95, 157, -1, 98, + 99, 100, 101, -1, -1, -1, -1, -1, -1, 169, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 210, 211, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 168 + 169 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int16 yystos[] = { - 0, 218, 0, 6, 29, 31, 33, 39, 49, 55, - 79, 101, 102, 180, 199, 210, 219, 222, 228, 230, - 231, 236, 266, 270, 304, 382, 389, 393, 404, 449, - 454, 459, 18, 19, 168, 258, 259, 260, 161, 237, - 238, 168, 169, 170, 199, 232, 233, 234, 178, 390, - 168, 214, 221, 56, 62, 385, 385, 385, 141, 168, - 290, 33, 62, 134, 203, 212, 262, 263, 264, 265, - 290, 180, 4, 5, 7, 35, 401, 61, 380, 187, - 186, 189, 186, 233, 21, 56, 198, 209, 235, 385, - 386, 388, 386, 380, 460, 450, 455, 168, 141, 229, - 264, 264, 264, 212, 142, 143, 144, 186, 211, 56, - 62, 271, 273, 56, 62, 391, 56, 62, 402, 56, - 62, 381, 14, 15, 161, 166, 168, 171, 212, 224, - 259, 161, 238, 168, 232, 232, 168, 180, 179, 386, - 180, 56, 62, 220, 168, 168, 168, 168, 172, 227, - 213, 260, 264, 264, 264, 264, 274, 168, 392, 405, - 178, 383, 172, 173, 223, 14, 15, 161, 166, 168, - 224, 256, 257, 235, 387, 180, 461, 451, 456, 172, - 213, 34, 70, 72, 74, 75, 76, 77, 78, 80, + 0, 219, 0, 7, 30, 32, 34, 40, 50, 56, + 80, 102, 103, 181, 200, 211, 220, 223, 229, 231, + 232, 237, 267, 271, 305, 383, 390, 394, 405, 450, + 455, 460, 19, 20, 169, 259, 260, 261, 162, 238, + 239, 169, 170, 171, 200, 233, 234, 235, 179, 391, + 169, 215, 222, 57, 63, 386, 386, 386, 142, 169, + 291, 34, 63, 135, 204, 213, 263, 264, 265, 266, + 291, 181, 5, 6, 8, 36, 402, 62, 381, 188, + 187, 190, 187, 234, 22, 57, 199, 210, 236, 386, + 387, 389, 387, 381, 461, 451, 456, 169, 142, 230, + 265, 265, 265, 213, 143, 144, 145, 187, 212, 57, + 63, 272, 274, 57, 63, 392, 57, 63, 403, 57, + 63, 382, 15, 16, 162, 167, 169, 172, 213, 225, + 260, 162, 239, 169, 233, 233, 169, 181, 180, 387, + 181, 57, 63, 221, 169, 169, 169, 169, 173, 228, + 214, 261, 265, 265, 265, 265, 275, 169, 393, 406, + 179, 384, 173, 174, 175, 224, 15, 16, 162, 167, + 169, 225, 257, 258, 236, 388, 181, 462, 452, 457, + 173, 214, 35, 71, 73, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 92, 93, 94, 97, 98, 99, 100, 116, 117, 168, - 269, 272, 178, 189, 105, 399, 400, 378, 158, 215, - 261, 354, 172, 173, 174, 186, 213, 187, 178, 178, - 178, 20, 21, 37, 106, 107, 108, 109, 110, 111, + 91, 93, 94, 95, 98, 99, 100, 101, 117, 118, + 169, 270, 273, 179, 190, 106, 400, 401, 379, 159, + 216, 262, 355, 173, 174, 175, 187, 214, 188, 179, + 179, 179, 21, 22, 38, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 126, 127, 128, 135, 136, 137, 138, 139, - 142, 143, 144, 145, 146, 147, 148, 188, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 202, 203, - 209, 210, 34, 34, 212, 267, 178, 275, 394, 74, - 78, 92, 93, 97, 98, 99, 100, 409, 168, 406, - 179, 379, 260, 259, 180, 215, 150, 168, 376, 377, - 256, 18, 24, 30, 40, 48, 63, 70, 71, 72, + 122, 123, 124, 127, 128, 129, 136, 137, 138, 139, + 140, 143, 144, 145, 146, 147, 148, 149, 189, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 203, + 204, 210, 211, 35, 35, 213, 268, 179, 276, 395, + 75, 79, 93, 94, 98, 99, 100, 101, 410, 169, + 407, 180, 380, 261, 260, 181, 216, 151, 169, 377, + 378, 257, 19, 25, 31, 41, 49, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 154, 214, 290, 408, 410, 411, 414, 420, 448, 462, - 452, 457, 168, 168, 168, 211, 21, 168, 211, 153, - 213, 354, 364, 365, 189, 268, 278, 384, 178, 189, - 398, 178, 403, 354, 211, 259, 212, 42, 186, 189, - 192, 375, 193, 193, 193, 212, 193, 193, 212, 193, - 193, 193, 193, 193, 193, 212, 290, 32, 59, 60, - 122, 126, 188, 192, 195, 210, 216, 419, 190, 413, - 368, 371, 168, 135, 212, 6, 49, 303, 180, 213, - 448, 1, 4, 5, 8, 9, 10, 12, 14, 15, - 16, 17, 18, 24, 25, 26, 27, 28, 30, 37, - 38, 41, 43, 44, 47, 50, 51, 53, 54, 57, - 58, 64, 67, 68, 79, 101, 102, 103, 104, 116, - 117, 131, 132, 133, 149, 150, 151, 152, 153, 155, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 169, 170, 171, 178, 179, 180, 195, 196, 197, - 202, 203, 210, 212, 214, 215, 226, 228, 239, 240, - 243, 246, 247, 249, 251, 252, 253, 254, 276, 277, - 279, 284, 289, 290, 291, 295, 296, 297, 298, 299, - 300, 301, 302, 304, 308, 309, 316, 319, 322, 327, - 330, 331, 333, 334, 335, 337, 342, 345, 346, 353, - 408, 464, 479, 490, 494, 507, 510, 168, 180, 395, - 396, 290, 360, 377, 211, 64, 103, 169, 284, 346, - 168, 168, 420, 125, 135, 187, 374, 421, 426, 428, - 346, 430, 424, 168, 415, 432, 434, 436, 438, 440, - 442, 444, 446, 346, 193, 212, 32, 192, 32, 192, - 210, 216, 211, 346, 210, 216, 420, 168, 180, 463, - 168, 180, 186, 366, 417, 448, 453, 168, 369, 417, - 458, 346, 150, 168, 373, 407, 364, 193, 193, 346, - 250, 193, 292, 410, 464, 212, 290, 193, 4, 101, - 102, 193, 212, 125, 289, 320, 331, 346, 275, 193, - 212, 60, 346, 212, 346, 168, 193, 193, 212, 180, - 193, 161, 57, 346, 212, 275, 193, 212, 193, 193, - 212, 193, 193, 125, 289, 346, 346, 346, 215, 275, - 322, 326, 326, 326, 212, 212, 212, 212, 212, 212, - 12, 420, 12, 420, 12, 346, 489, 505, 193, 346, - 193, 225, 12, 489, 506, 36, 346, 346, 346, 346, - 346, 12, 48, 320, 346, 320, 215, 180, 180, 346, - 9, 322, 328, 168, 212, 180, 180, 180, 180, 180, - 65, 305, 266, 130, 180, 20, 21, 106, 107, 108, + 103, 155, 215, 291, 409, 411, 412, 415, 421, 449, + 463, 453, 458, 169, 169, 169, 212, 22, 169, 212, + 154, 214, 355, 365, 366, 190, 269, 279, 385, 179, + 190, 399, 179, 404, 355, 212, 260, 213, 43, 187, + 190, 193, 376, 194, 194, 194, 213, 194, 194, 213, + 194, 194, 194, 194, 194, 194, 213, 291, 33, 60, + 61, 123, 127, 189, 193, 196, 211, 217, 420, 191, + 414, 369, 372, 169, 136, 213, 7, 50, 304, 181, + 214, 449, 1, 5, 6, 9, 10, 11, 13, 15, + 16, 17, 18, 19, 25, 26, 27, 28, 29, 31, + 38, 39, 42, 44, 45, 48, 51, 52, 54, 55, + 58, 59, 65, 68, 69, 80, 102, 103, 104, 105, + 117, 118, 132, 133, 134, 150, 151, 152, 153, 154, + 156, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 170, 171, 172, 179, 180, 181, 196, 197, + 198, 203, 204, 211, 213, 215, 216, 227, 229, 240, + 241, 244, 247, 248, 250, 252, 253, 254, 255, 277, + 278, 280, 285, 290, 291, 292, 296, 297, 298, 299, + 300, 301, 302, 303, 305, 309, 310, 317, 320, 323, + 328, 331, 332, 334, 335, 336, 338, 343, 346, 347, + 354, 409, 465, 480, 491, 495, 508, 511, 169, 181, + 396, 397, 291, 361, 378, 212, 65, 104, 170, 285, + 347, 169, 169, 421, 126, 136, 188, 375, 422, 427, + 429, 347, 431, 425, 169, 416, 433, 435, 437, 439, + 441, 443, 445, 447, 347, 194, 213, 33, 193, 33, + 193, 211, 217, 212, 347, 211, 217, 421, 169, 181, + 464, 169, 181, 187, 367, 418, 449, 454, 169, 370, + 418, 459, 347, 151, 169, 374, 408, 365, 194, 194, + 347, 251, 194, 293, 411, 465, 213, 291, 194, 5, + 102, 103, 194, 213, 126, 290, 321, 332, 347, 276, + 194, 213, 61, 347, 213, 347, 169, 194, 194, 213, + 181, 194, 162, 58, 347, 213, 276, 194, 213, 194, + 194, 213, 194, 194, 126, 290, 347, 347, 347, 216, + 276, 323, 327, 327, 327, 213, 213, 213, 213, 213, + 213, 13, 421, 13, 421, 13, 347, 490, 506, 194, + 347, 194, 226, 13, 490, 507, 37, 347, 347, 347, + 347, 347, 13, 49, 321, 347, 321, 216, 181, 181, + 347, 10, 323, 329, 169, 213, 181, 181, 181, 181, + 181, 66, 306, 267, 131, 181, 21, 22, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 134, 135, 136, 137, 138, 139, 142, 143, 144, - 145, 146, 147, 148, 187, 188, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 209, 210, 328, 212, - 180, 187, 179, 384, 179, 210, 266, 361, 193, 213, - 42, 180, 374, 289, 346, 448, 448, 418, 448, 213, - 448, 448, 213, 168, 412, 448, 267, 448, 267, 448, - 267, 366, 367, 369, 370, 213, 423, 280, 320, 211, - 211, 346, 180, 179, 189, 417, 179, 189, 417, 179, - 213, 212, 42, 125, 186, 187, 189, 192, 372, 480, - 482, 275, 407, 293, 212, 290, 193, 212, 317, 193, - 193, 193, 501, 320, 289, 320, 186, 106, 107, 108, - 109, 110, 111, 112, 113, 119, 120, 125, 138, 139, - 145, 146, 147, 187, 13, 420, 282, 506, 346, 346, - 275, 187, 310, 312, 346, 314, 189, 161, 346, 503, - 320, 486, 491, 320, 484, 420, 289, 346, 215, 266, - 346, 346, 346, 346, 346, 346, 407, 52, 156, 168, - 195, 210, 212, 346, 465, 468, 472, 488, 493, 407, - 212, 468, 493, 407, 140, 179, 180, 181, 473, 285, - 275, 287, 174, 175, 223, 407, 186, 509, 178, 407, - 12, 186, 509, 509, 150, 155, 193, 290, 336, 275, - 248, 329, 69, 210, 213, 320, 465, 467, 158, 212, - 307, 377, 158, 325, 326, 18, 156, 168, 408, 18, - 156, 168, 408, 131, 132, 133, 276, 332, 346, 332, - 346, 332, 346, 332, 346, 332, 346, 332, 346, 332, - 346, 332, 346, 346, 346, 346, 332, 346, 332, 346, - 346, 346, 346, 168, 332, 346, 346, 156, 168, 346, - 346, 346, 408, 346, 346, 346, 332, 346, 332, 346, - 346, 346, 346, 332, 346, 332, 346, 332, 346, 346, - 332, 346, 21, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 127, 128, 156, 168, 209, 210, - 343, 346, 213, 320, 346, 397, 265, 7, 354, 359, - 420, 168, 289, 346, 180, 194, 194, 194, 417, 194, - 194, 180, 194, 194, 268, 194, 268, 194, 268, 194, - 417, 194, 417, 283, 448, 213, 509, 211, 448, 448, - 346, 168, 168, 448, 289, 346, 420, 420, 19, 448, - 69, 320, 467, 478, 193, 346, 168, 346, 448, 495, - 497, 499, 420, 509, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 275, 194, 417, 213, 509, 213, 255, 420, - 420, 213, 420, 213, 420, 509, 420, 420, 509, 420, - 194, 325, 213, 213, 213, 213, 213, 213, 19, 326, - 212, 135, 372, 210, 346, 213, 140, 186, 180, 472, - 183, 184, 211, 476, 186, 180, 183, 211, 475, 19, - 213, 472, 179, 182, 474, 19, 346, 179, 489, 283, - 283, 346, 19, 489, 179, 278, 19, 407, 211, 213, - 212, 212, 338, 340, 11, 22, 23, 241, 242, 346, - 266, 168, 213, 467, 465, 186, 213, 213, 168, 306, - 306, 125, 135, 187, 192, 323, 324, 267, 193, 212, - 193, 212, 326, 326, 326, 212, 212, 211, 18, 156, - 168, 408, 189, 156, 168, 346, 212, 212, 156, 168, - 346, 1, 211, 213, 180, 179, 211, 56, 62, 357, - 66, 358, 180, 194, 180, 422, 427, 429, 448, 431, - 425, 168, 416, 433, 194, 437, 194, 441, 194, 445, - 366, 447, 369, 194, 417, 213, 42, 372, 194, 194, - 320, 194, 467, 213, 213, 213, 168, 213, 180, 194, - 213, 194, 420, 420, 420, 194, 213, 212, 420, 346, - 194, 194, 194, 194, 213, 194, 194, 213, 194, 325, - 267, 212, 320, 346, 346, 346, 468, 472, 346, 156, - 168, 465, 476, 211, 346, 488, 211, 320, 468, 179, - 182, 185, 477, 211, 320, 194, 194, 176, 320, 179, - 320, 19, 346, 346, 420, 267, 275, 346, 11, 244, - 325, 213, 211, 210, 186, 211, 213, 168, 168, 168, - 168, 186, 211, 268, 347, 346, 349, 346, 213, 320, - 346, 193, 212, 346, 212, 211, 346, 213, 320, 212, - 211, 344, 180, 46, 358, 45, 105, 355, 325, 435, - 439, 443, 212, 448, 168, 346, 481, 483, 275, 294, - 213, 194, 417, 168, 212, 318, 194, 194, 194, 502, - 282, 194, 311, 313, 315, 504, 487, 492, 485, 212, - 328, 268, 213, 320, 180, 213, 472, 476, 212, 135, - 372, 180, 472, 211, 180, 286, 288, 180, 180, 320, - 213, 213, 194, 268, 275, 245, 180, 267, 213, 465, - 168, 211, 189, 375, 323, 211, 140, 275, 321, 420, - 213, 448, 213, 213, 213, 351, 346, 346, 213, 213, - 346, 32, 356, 355, 357, 280, 212, 212, 346, 168, - 194, 346, 496, 498, 500, 212, 213, 212, 346, 346, - 346, 212, 69, 478, 212, 212, 213, 346, 321, 213, - 346, 135, 372, 476, 346, 346, 346, 346, 477, 489, - 346, 212, 281, 489, 346, 180, 339, 194, 242, 25, - 104, 246, 296, 297, 298, 300, 346, 268, 211, 189, - 375, 420, 374, 125, 346, 194, 194, 448, 213, 213, - 213, 362, 356, 373, 213, 478, 478, 213, 194, 212, - 213, 212, 212, 212, 280, 282, 320, 478, 465, 466, - 213, 180, 508, 346, 346, 213, 508, 508, 280, 508, - 508, 346, 336, 341, 125, 125, 346, 275, 213, 420, - 374, 374, 346, 346, 348, 350, 194, 272, 363, 212, - 465, 469, 470, 471, 471, 346, 346, 478, 478, 466, - 213, 213, 509, 471, 213, 52, 211, 135, 372, 179, - 179, 186, 509, 179, 211, 508, 336, 346, 374, 346, - 346, 180, 352, 180, 272, 465, 186, 509, 213, 213, - 213, 213, 471, 471, 213, 213, 213, 346, 211, 346, - 346, 211, 179, 213, 211, 346, 180, 180, 275, 213, - 212, 213, 213, 180, 465, 213 + 129, 130, 135, 136, 137, 138, 139, 140, 143, 144, + 145, 146, 147, 148, 149, 188, 189, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 210, 211, 329, + 213, 181, 188, 180, 385, 180, 211, 267, 362, 194, + 214, 43, 181, 375, 290, 347, 449, 449, 419, 449, + 214, 449, 449, 214, 169, 413, 449, 268, 449, 268, + 449, 268, 367, 368, 370, 371, 214, 424, 281, 321, + 212, 212, 347, 181, 180, 190, 418, 180, 190, 418, + 180, 214, 213, 43, 126, 187, 188, 190, 193, 373, + 481, 483, 276, 408, 294, 213, 291, 194, 213, 318, + 194, 194, 194, 502, 321, 290, 321, 187, 107, 108, + 109, 110, 111, 112, 113, 114, 120, 121, 126, 139, + 140, 146, 147, 148, 188, 14, 421, 283, 507, 347, + 347, 276, 188, 311, 313, 347, 315, 190, 162, 347, + 504, 321, 487, 492, 321, 485, 421, 290, 347, 216, + 267, 347, 347, 347, 347, 347, 347, 408, 53, 157, + 169, 196, 211, 213, 347, 466, 469, 473, 489, 494, + 408, 213, 469, 494, 408, 141, 180, 181, 182, 474, + 286, 276, 288, 175, 176, 224, 408, 187, 510, 179, + 408, 13, 187, 510, 510, 151, 156, 194, 291, 337, + 276, 249, 330, 70, 211, 214, 321, 466, 468, 159, + 213, 308, 378, 4, 159, 326, 327, 19, 157, 169, + 409, 19, 157, 169, 409, 132, 133, 134, 277, 333, + 347, 333, 347, 333, 347, 333, 347, 333, 347, 333, + 347, 333, 347, 333, 347, 347, 347, 347, 333, 347, + 333, 347, 347, 347, 347, 169, 333, 347, 347, 157, + 169, 347, 347, 347, 409, 347, 347, 347, 333, 347, + 333, 347, 347, 347, 347, 333, 347, 333, 347, 333, + 347, 347, 333, 347, 22, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 128, 129, 157, 169, + 210, 211, 344, 409, 347, 214, 321, 347, 398, 266, + 8, 355, 360, 421, 169, 290, 347, 181, 195, 195, + 195, 418, 195, 195, 181, 195, 195, 269, 195, 269, + 195, 269, 195, 418, 195, 418, 284, 449, 214, 510, + 212, 449, 449, 347, 169, 169, 449, 290, 347, 421, + 421, 20, 449, 70, 321, 468, 479, 194, 347, 169, + 347, 449, 496, 498, 500, 421, 510, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 276, 195, 418, 214, 510, + 214, 256, 421, 421, 214, 421, 214, 421, 510, 421, + 421, 510, 421, 195, 326, 214, 214, 214, 214, 214, + 214, 20, 327, 213, 136, 373, 211, 347, 214, 141, + 187, 181, 473, 184, 185, 212, 477, 187, 181, 184, + 212, 476, 20, 214, 473, 180, 183, 475, 20, 347, + 180, 490, 284, 284, 347, 20, 490, 180, 279, 20, + 408, 212, 214, 213, 213, 339, 341, 12, 23, 24, + 242, 243, 347, 267, 169, 214, 468, 466, 187, 214, + 214, 169, 307, 307, 213, 126, 136, 169, 188, 193, + 324, 325, 268, 194, 213, 194, 213, 327, 327, 327, + 213, 213, 212, 19, 157, 169, 409, 190, 157, 169, + 347, 213, 213, 157, 169, 347, 1, 213, 212, 214, + 181, 180, 212, 57, 63, 358, 67, 359, 181, 195, + 181, 423, 428, 430, 449, 432, 426, 169, 417, 434, + 195, 438, 195, 442, 195, 446, 367, 448, 370, 195, + 418, 214, 43, 373, 195, 195, 321, 195, 468, 214, + 214, 214, 169, 214, 181, 195, 214, 195, 421, 421, + 421, 195, 214, 213, 421, 347, 195, 195, 195, 195, + 214, 195, 195, 214, 195, 326, 268, 213, 321, 347, + 347, 347, 469, 473, 347, 157, 169, 466, 477, 212, + 347, 489, 212, 321, 469, 180, 183, 186, 478, 212, + 321, 195, 195, 177, 321, 180, 321, 20, 347, 347, + 421, 268, 276, 347, 12, 245, 326, 214, 212, 211, + 187, 212, 214, 325, 169, 169, 213, 169, 169, 187, + 212, 269, 348, 347, 350, 347, 214, 321, 347, 194, + 213, 347, 213, 212, 347, 214, 321, 213, 212, 345, + 214, 321, 181, 47, 359, 46, 106, 356, 326, 436, + 440, 444, 213, 449, 169, 347, 482, 484, 276, 295, + 214, 195, 418, 169, 213, 319, 195, 195, 195, 503, + 283, 195, 312, 314, 316, 505, 488, 493, 486, 213, + 329, 269, 214, 321, 181, 214, 473, 477, 213, 136, + 373, 181, 473, 212, 181, 287, 289, 181, 181, 321, + 214, 214, 195, 269, 276, 246, 181, 268, 214, 466, + 169, 212, 190, 376, 214, 169, 324, 212, 141, 276, + 322, 421, 214, 449, 214, 214, 214, 352, 347, 347, + 214, 214, 347, 214, 33, 357, 356, 358, 281, 213, + 213, 347, 169, 195, 347, 497, 499, 501, 213, 214, + 213, 347, 347, 347, 213, 70, 479, 213, 213, 214, + 347, 322, 214, 347, 136, 373, 477, 347, 347, 347, + 347, 478, 490, 347, 213, 282, 490, 347, 181, 340, + 195, 243, 26, 105, 247, 297, 298, 299, 301, 347, + 269, 212, 190, 376, 421, 375, 214, 126, 347, 195, + 195, 449, 214, 214, 214, 363, 357, 374, 214, 479, + 479, 214, 195, 213, 214, 213, 213, 213, 281, 283, + 321, 479, 466, 467, 214, 181, 509, 347, 347, 214, + 509, 509, 281, 509, 509, 347, 337, 342, 126, 126, + 347, 276, 214, 421, 375, 375, 347, 347, 349, 351, + 195, 273, 364, 213, 466, 470, 471, 472, 472, 347, + 347, 479, 479, 467, 214, 214, 510, 472, 214, 53, + 212, 136, 373, 180, 180, 187, 510, 180, 212, 509, + 337, 347, 375, 347, 347, 181, 353, 181, 273, 466, + 187, 510, 214, 214, 214, 214, 472, 472, 214, 214, + 214, 347, 212, 347, 347, 212, 180, 214, 212, 347, + 181, 181, 276, 214, 213, 214, 214, 181, 466, 214 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 217, 218, 218, 218, 218, 218, 218, 218, 218, - 218, 218, 218, 218, 218, 218, 218, 219, 220, 220, - 220, 221, 221, 222, 223, 223, 223, 223, 224, 225, - 225, 225, 226, 227, 227, 229, 228, 230, 231, 232, - 232, 232, 233, 233, 233, 233, 234, 234, 235, 235, - 236, 237, 237, 238, 238, 239, 240, 240, 241, 241, - 242, 242, 242, 243, 243, 244, 245, 244, 246, 246, - 246, 246, 246, 247, 248, 247, 250, 249, 251, 252, - 253, 255, 254, 256, 256, 256, 256, 256, 256, 257, - 257, 258, 258, 258, 259, 259, 259, 259, 259, 259, - 259, 259, 260, 260, 261, 261, 261, 262, 262, 262, - 263, 263, 264, 264, 264, 264, 264, 264, 264, 265, - 265, 266, 266, 267, 267, 267, 268, 268, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 270, 271, 271, 271, 272, 274, 273, - 275, 275, 276, 276, 276, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 278, 278, 278, 279, - 280, 280, 281, 281, 282, 282, 283, 283, 285, 286, - 284, 287, 288, 284, 289, 289, 289, 289, 289, 290, - 290, 290, 291, 291, 293, 294, 292, 292, 295, 295, - 295, 295, 295, 295, 296, 297, 298, 298, 298, 299, - 299, 299, 300, 300, 301, 301, 301, 302, 303, 303, - 303, 304, 304, 305, 305, 306, 306, 307, 307, 307, - 307, 308, 308, 310, 311, 309, 312, 313, 309, 314, - 315, 309, 317, 318, 316, 319, 319, 319, 319, 319, - 319, 320, 320, 321, 321, 321, 322, 322, 322, 323, - 323, 323, 323, 324, 324, 325, 325, 326, 326, 327, - 329, 328, 330, 330, 330, 330, 330, 330, 330, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 331, 331, 331, 331, 332, 332, - 332, 332, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 333, 333, 333, 333, 333, 333, 333, 334, - 334, 335, 335, 336, 336, 337, 338, 339, 337, 340, - 341, 337, 342, 342, 342, 342, 343, 344, 342, 345, - 345, 345, 345, 345, 345, 345, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 347, 348, 346, 346, 346, 346, 349, 350, - 346, 346, 346, 351, 352, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, - 353, 353, 353, 353, 353, 353, 354, 354, 354, 355, - 355, 355, 356, 356, 357, 357, 357, 358, 358, 359, - 360, 361, 360, 362, 360, 363, 360, 360, 364, 364, - 365, 365, 366, 366, 367, 367, 368, 368, 368, 369, - 370, 370, 371, 371, 371, 372, 372, 373, 373, 373, - 373, 373, 373, 374, 374, 374, 375, 375, 376, 376, - 376, 376, 376, 377, 377, 377, 377, 377, 378, 379, - 378, 380, 380, 381, 381, 381, 382, 383, 382, 384, - 384, 384, 384, 385, 385, 385, 387, 386, 388, 388, - 389, 390, 389, 391, 391, 391, 392, 394, 395, 393, - 396, 397, 393, 398, 398, 399, 399, 400, 401, 401, - 402, 402, 402, 403, 403, 405, 406, 404, 407, 407, - 407, 407, 407, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, - 409, 409, 409, 409, 409, 409, 409, 409, 410, 411, - 411, 411, 412, 412, 413, 413, 413, 415, 416, 414, - 417, 417, 418, 418, 419, 419, 420, 420, 420, 420, - 420, 420, 421, 422, 420, 420, 420, 423, 420, 420, - 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, - 420, 424, 425, 420, 420, 426, 427, 420, 428, 429, - 420, 430, 431, 420, 420, 432, 433, 420, 434, 435, - 420, 420, 436, 437, 420, 438, 439, 420, 420, 440, - 441, 420, 442, 443, 420, 444, 445, 420, 446, 447, - 420, 448, 448, 448, 450, 451, 452, 453, 449, 455, - 456, 457, 458, 454, 460, 461, 462, 463, 459, 464, - 464, 464, 464, 464, 465, 465, 465, 465, 465, 465, - 465, 465, 466, 467, 468, 468, 469, 469, 470, 470, - 471, 471, 472, 472, 473, 473, 474, 474, 475, 475, - 476, 476, 476, 477, 477, 477, 478, 478, 479, 479, - 479, 479, 479, 479, 480, 481, 479, 482, 483, 479, - 484, 485, 479, 486, 487, 479, 488, 488, 488, 489, - 489, 490, 491, 492, 490, 493, 493, 494, 494, 494, - 495, 496, 494, 497, 498, 494, 499, 500, 494, 494, - 501, 502, 494, 494, 503, 504, 494, 505, 505, 506, - 506, 507, 507, 507, 507, 507, 508, 508, 509, 509, - 510, 510, 510, 510, 510, 510 + 0, 218, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 220, 221, 221, + 221, 222, 222, 223, 224, 224, 224, 224, 225, 225, + 226, 226, 226, 227, 228, 228, 230, 229, 231, 232, + 233, 233, 233, 234, 234, 234, 234, 235, 235, 236, + 236, 237, 238, 238, 239, 239, 240, 241, 241, 242, + 242, 243, 243, 243, 244, 244, 245, 246, 245, 247, + 247, 247, 247, 247, 248, 249, 248, 251, 250, 252, + 253, 254, 256, 255, 257, 257, 257, 257, 257, 257, + 258, 258, 259, 259, 259, 260, 260, 260, 260, 260, + 260, 260, 260, 261, 261, 262, 262, 262, 263, 263, + 263, 264, 264, 265, 265, 265, 265, 265, 265, 265, + 266, 266, 267, 267, 268, 268, 268, 269, 269, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 271, 272, 272, 272, 273, 275, + 274, 276, 276, 277, 277, 277, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 279, 279, 279, + 280, 281, 281, 282, 282, 283, 283, 284, 284, 286, + 287, 285, 288, 289, 285, 290, 290, 290, 290, 290, + 291, 291, 291, 292, 292, 294, 295, 293, 293, 296, + 296, 296, 296, 296, 296, 297, 298, 299, 299, 299, + 300, 300, 300, 301, 301, 302, 302, 302, 303, 304, + 304, 304, 305, 305, 306, 306, 307, 307, 308, 308, + 308, 308, 309, 309, 311, 312, 310, 313, 314, 310, + 315, 316, 310, 318, 319, 317, 320, 320, 320, 320, + 320, 320, 321, 321, 322, 322, 322, 323, 323, 323, + 324, 324, 324, 324, 324, 325, 325, 326, 326, 326, + 327, 327, 328, 330, 329, 331, 331, 331, 331, 331, + 331, 331, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, + 332, 333, 333, 333, 333, 334, 334, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, + 334, 334, 335, 335, 336, 336, 337, 337, 338, 339, + 340, 338, 341, 342, 338, 343, 343, 343, 343, 343, + 343, 344, 345, 343, 346, 346, 346, 346, 346, 346, + 346, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 347, 347, 348, 349, 347, + 347, 347, 347, 350, 351, 347, 347, 347, 352, 353, + 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, + 347, 347, 347, 347, 347, 354, 354, 354, 354, 354, + 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, + 354, 355, 355, 355, 356, 356, 356, 357, 357, 358, + 358, 358, 359, 359, 360, 361, 362, 361, 363, 361, + 364, 361, 361, 365, 365, 366, 366, 367, 367, 368, + 368, 369, 369, 369, 370, 371, 371, 372, 372, 372, + 373, 373, 374, 374, 374, 374, 374, 374, 375, 375, + 375, 376, 376, 377, 377, 377, 377, 377, 378, 378, + 378, 378, 378, 379, 380, 379, 381, 381, 382, 382, + 382, 383, 384, 383, 385, 385, 385, 385, 386, 386, + 386, 388, 387, 389, 389, 390, 391, 390, 392, 392, + 392, 393, 395, 396, 394, 397, 398, 394, 399, 399, + 400, 400, 401, 402, 402, 403, 403, 403, 404, 404, + 406, 407, 405, 408, 408, 408, 408, 408, 409, 409, + 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, + 409, 409, 409, 409, 409, 410, 410, 410, 410, 410, + 410, 410, 410, 411, 412, 412, 412, 413, 413, 414, + 414, 414, 416, 417, 415, 418, 418, 419, 419, 420, + 420, 421, 421, 421, 421, 421, 421, 422, 423, 421, + 421, 421, 424, 421, 421, 421, 421, 421, 421, 421, + 421, 421, 421, 421, 421, 421, 425, 426, 421, 421, + 427, 428, 421, 429, 430, 421, 431, 432, 421, 421, + 433, 434, 421, 435, 436, 421, 421, 437, 438, 421, + 439, 440, 421, 421, 441, 442, 421, 443, 444, 421, + 445, 446, 421, 447, 448, 421, 449, 449, 449, 451, + 452, 453, 454, 450, 456, 457, 458, 459, 455, 461, + 462, 463, 464, 460, 465, 465, 465, 465, 465, 466, + 466, 466, 466, 466, 466, 466, 466, 467, 468, 469, + 469, 470, 470, 471, 471, 472, 472, 473, 473, 474, + 474, 475, 475, 476, 476, 477, 477, 477, 478, 478, + 478, 479, 479, 480, 480, 480, 480, 480, 480, 481, + 482, 480, 483, 484, 480, 485, 486, 480, 487, 488, + 480, 489, 489, 489, 490, 490, 491, 492, 493, 491, + 494, 494, 495, 495, 495, 496, 497, 495, 498, 499, + 495, 500, 501, 495, 495, 502, 503, 495, 495, 504, + 505, 495, 506, 506, 507, 507, 508, 508, 508, 508, + 508, 509, 509, 510, 510, 511, 511, 511, 511, 511, + 511 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ @@ -4959,93 +5005,94 @@ static const yytype_int8 yyr2[] = { 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, - 1, 1, 1, 4, 1, 1, 2, 2, 3, 0, - 2, 4, 3, 1, 2, 0, 4, 2, 2, 1, - 1, 1, 1, 2, 3, 3, 2, 4, 0, 1, - 2, 1, 3, 1, 3, 3, 3, 2, 1, 1, - 0, 2, 4, 1, 1, 0, 0, 3, 1, 1, - 1, 1, 1, 4, 0, 6, 0, 6, 2, 3, - 3, 0, 5, 1, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 1, 5, 1, 3, 2, 3, 2, 1, 1, 1, - 1, 4, 1, 2, 3, 3, 3, 3, 2, 1, - 3, 0, 3, 0, 2, 3, 0, 2, 1, 2, + 1, 1, 1, 4, 1, 1, 2, 2, 3, 2, + 0, 2, 4, 3, 1, 2, 0, 4, 2, 2, + 1, 1, 1, 1, 2, 3, 3, 2, 4, 0, + 1, 2, 1, 3, 1, 3, 3, 3, 2, 1, + 1, 0, 2, 4, 1, 1, 0, 0, 3, 1, + 1, 1, 1, 1, 4, 0, 6, 0, 6, 2, + 3, 3, 0, 5, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 3, 3, 3, 3, 3, + 3, 1, 5, 1, 3, 2, 3, 2, 1, 1, + 1, 1, 4, 1, 2, 3, 3, 3, 3, 2, + 1, 3, 0, 3, 0, 2, 3, 0, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 3, 3, 2, 2, 3, 4, 3, 2, - 2, 2, 2, 2, 3, 3, 3, 4, 1, 1, + 2, 2, 2, 3, 3, 2, 2, 3, 4, 3, + 2, 2, 2, 2, 2, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 0, 1, 1, 3, 0, 4, - 3, 7, 2, 2, 6, 1, 1, 1, 1, 2, - 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, - 1, 1, 1, 2, 2, 2, 0, 2, 2, 3, - 0, 2, 0, 4, 0, 2, 1, 3, 0, 0, - 7, 0, 0, 7, 3, 2, 2, 2, 1, 1, - 3, 2, 2, 3, 0, 0, 5, 1, 2, 5, - 5, 5, 6, 2, 1, 1, 1, 2, 3, 2, - 2, 3, 2, 3, 2, 2, 3, 4, 1, 1, - 0, 1, 1, 1, 0, 1, 3, 9, 8, 8, - 7, 3, 3, 0, 0, 7, 0, 0, 7, 0, - 0, 7, 0, 0, 6, 5, 8, 10, 5, 8, - 10, 1, 3, 1, 2, 3, 1, 1, 2, 2, - 2, 2, 2, 1, 3, 0, 4, 1, 6, 6, - 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 0, 1, 1, 3, 0, + 4, 3, 7, 2, 2, 6, 1, 1, 1, 1, + 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, + 1, 1, 1, 1, 2, 2, 2, 0, 2, 2, + 3, 0, 2, 0, 4, 0, 2, 1, 3, 0, + 0, 7, 0, 0, 7, 3, 2, 2, 2, 1, + 1, 3, 2, 2, 3, 0, 0, 5, 1, 2, + 5, 5, 5, 6, 2, 1, 1, 1, 2, 3, + 2, 2, 3, 2, 3, 2, 2, 3, 4, 1, + 1, 0, 1, 1, 1, 0, 1, 3, 9, 8, + 8, 7, 3, 3, 0, 0, 7, 0, 0, 7, + 0, 0, 7, 0, 0, 6, 5, 8, 10, 5, + 8, 10, 1, 3, 1, 2, 3, 1, 1, 2, + 2, 2, 2, 2, 4, 1, 3, 0, 4, 4, + 1, 6, 6, 0, 7, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, - 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, - 8, 5, 6, 1, 4, 3, 0, 0, 8, 0, - 0, 9, 3, 4, 5, 6, 0, 0, 5, 3, - 4, 4, 5, 4, 3, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 2, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 6, 8, 5, 6, 1, 4, 3, 0, + 0, 8, 0, 0, 9, 3, 4, 5, 6, 5, + 6, 0, 0, 5, 3, 4, 4, 5, 4, 3, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 2, 4, 4, 5, 4, - 5, 3, 4, 1, 1, 2, 4, 4, 7, 8, - 3, 5, 0, 0, 8, 3, 3, 3, 0, 0, - 8, 3, 4, 0, 0, 9, 4, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 2, 4, 1, - 4, 4, 4, 4, 4, 1, 6, 7, 6, 6, - 7, 7, 6, 7, 6, 6, 0, 4, 1, 0, - 1, 1, 0, 1, 0, 1, 1, 0, 1, 5, - 0, 0, 4, 0, 9, 0, 10, 5, 3, 4, - 1, 3, 1, 3, 1, 3, 0, 2, 3, 3, - 1, 3, 0, 2, 3, 1, 1, 1, 2, 3, - 5, 3, 3, 1, 1, 1, 0, 1, 1, 4, - 3, 3, 5, 4, 6, 5, 5, 4, 0, 0, - 4, 0, 1, 0, 1, 1, 6, 0, 6, 0, - 2, 3, 5, 0, 1, 1, 0, 5, 2, 3, - 4, 0, 4, 0, 1, 1, 1, 0, 0, 9, - 0, 0, 11, 0, 2, 0, 1, 3, 1, 1, - 0, 1, 1, 0, 3, 0, 0, 7, 1, 4, - 3, 3, 5, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 4, 4, 5, 4, 5, 3, 4, 1, 1, + 2, 4, 4, 7, 8, 3, 5, 0, 0, 8, + 3, 3, 3, 0, 0, 8, 3, 4, 0, 0, + 9, 4, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 2, 4, 1, 4, 4, 4, 4, 4, + 1, 6, 7, 6, 6, 7, 7, 6, 7, 6, + 6, 0, 4, 1, 0, 1, 1, 0, 1, 0, + 1, 1, 0, 1, 5, 0, 0, 4, 0, 9, + 0, 10, 5, 3, 4, 1, 3, 1, 3, 1, + 3, 0, 2, 3, 3, 1, 3, 0, 2, 3, + 1, 1, 1, 2, 3, 5, 3, 3, 1, 1, + 1, 0, 1, 1, 4, 3, 3, 5, 4, 6, + 5, 5, 4, 0, 0, 4, 0, 1, 0, 1, + 1, 6, 0, 6, 0, 2, 3, 5, 0, 1, + 1, 0, 5, 2, 3, 4, 0, 4, 0, 1, + 1, 1, 0, 0, 9, 0, 0, 11, 0, 2, + 0, 1, 3, 1, 1, 0, 1, 1, 0, 3, + 0, 0, 7, 1, 4, 3, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 4, 4, 1, 3, 0, 2, 3, 0, 0, 6, - 1, 1, 1, 3, 3, 4, 1, 1, 1, 1, - 2, 3, 0, 0, 6, 4, 5, 0, 9, 4, - 2, 2, 3, 2, 3, 2, 2, 3, 3, 3, - 2, 0, 0, 6, 2, 0, 0, 6, 0, 0, - 6, 0, 0, 6, 1, 0, 0, 6, 0, 0, - 7, 1, 0, 0, 6, 0, 0, 7, 1, 0, - 0, 6, 0, 0, 7, 0, 0, 6, 0, 0, - 6, 1, 3, 3, 0, 0, 0, 0, 10, 0, - 0, 0, 0, 10, 0, 0, 0, 0, 10, 1, - 1, 1, 1, 1, 3, 3, 5, 5, 6, 6, - 8, 8, 1, 1, 1, 3, 3, 5, 1, 2, - 1, 0, 0, 2, 2, 1, 2, 1, 2, 1, - 2, 1, 1, 2, 1, 1, 0, 1, 5, 4, - 6, 7, 5, 7, 0, 0, 10, 0, 0, 10, - 0, 0, 9, 0, 0, 7, 1, 3, 3, 3, - 1, 5, 0, 0, 10, 1, 3, 4, 4, 4, - 0, 0, 11, 0, 0, 11, 0, 0, 10, 5, - 0, 0, 9, 5, 0, 0, 10, 1, 3, 1, - 3, 4, 3, 4, 7, 9, 0, 3, 0, 1, - 9, 10, 10, 10, 9, 10 + 1, 1, 1, 1, 1, 4, 4, 1, 3, 0, + 2, 3, 0, 0, 6, 1, 1, 1, 3, 3, + 4, 1, 1, 1, 1, 2, 3, 0, 0, 6, + 4, 5, 0, 9, 4, 2, 2, 3, 2, 3, + 2, 2, 3, 3, 3, 2, 0, 0, 6, 2, + 0, 0, 6, 0, 0, 6, 0, 0, 6, 1, + 0, 0, 6, 0, 0, 7, 1, 0, 0, 6, + 0, 0, 7, 1, 0, 0, 6, 0, 0, 7, + 0, 0, 6, 0, 0, 6, 1, 3, 3, 0, + 0, 0, 0, 10, 0, 0, 0, 0, 10, 0, + 0, 0, 0, 10, 1, 1, 1, 1, 1, 3, + 3, 5, 5, 6, 6, 8, 8, 1, 1, 1, + 3, 3, 5, 1, 2, 1, 0, 0, 2, 2, + 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, + 1, 0, 1, 5, 4, 6, 7, 5, 7, 0, + 0, 10, 0, 0, 10, 0, 0, 9, 0, 0, + 7, 1, 3, 3, 3, 1, 5, 0, 0, 10, + 1, 3, 4, 4, 4, 0, 0, 11, 0, 0, + 11, 0, 0, 10, 5, 0, 0, 9, 5, 0, + 0, 10, 1, 3, 1, 3, 4, 3, 4, 7, + 9, 0, 3, 0, 1, 9, 10, 10, 10, 9, + 10 }; @@ -6550,7 +6597,11 @@ YYLTYPE yylloc = yyloc_default; { (yyval.s) = (yyvsp[-1].s); } break; - case 29: /* string_builder_body: %empty */ + case 29: /* string_constant: "start of the string" "end of the string" */ + { (yyval.s) = new string(); } + break; + + case 30: /* string_builder_body: %empty */ { (yyval.pExpression) = new ExprStringBuilder(); (yyval.pExpression)->at = LineInfo(yyextra->g_FileAccessStack.back(), @@ -6558,7 +6609,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 30: /* string_builder_body: string_builder_body character_sequence */ + case 31: /* string_builder_body: string_builder_body character_sequence */ { bool err; auto esconst = unescapeString(*(yyvsp[0].s),&err); @@ -6570,7 +6621,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 31: /* string_builder_body: string_builder_body "{" expr "}" */ + case 32: /* string_builder_body: string_builder_body "{" expr "}" */ { auto se = ExpressionPtr((yyvsp[-1].pExpression)); static_cast((yyvsp[-3].pExpression))->elements.push_back(se); @@ -6578,7 +6629,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 32: /* string_builder: "start of the string" string_builder_body "end of the string" */ + case 33: /* string_builder: "start of the string" string_builder_body "end of the string" */ { auto strb = static_cast((yyvsp[-1].pExpression)); if ( strb->elements.size()==0 ) { @@ -6594,7 +6645,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 33: /* reader_character_sequence: STRING_CHARACTER */ + case 34: /* reader_character_sequence: STRING_CHARACTER */ { if ( !yyextra->g_ReaderMacro->accept(yyextra->g_Program.get(), yyextra->g_Program->thisModule.get(), yyextra->g_ReaderExpr, (yyvsp[0].ch), tokAt(scanner,(yylsp[0]))) ) { das_yyend_reader(scanner); @@ -6602,7 +6653,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 34: /* reader_character_sequence: reader_character_sequence STRING_CHARACTER */ + case 35: /* reader_character_sequence: reader_character_sequence STRING_CHARACTER */ { if ( !yyextra->g_ReaderMacro->accept(yyextra->g_Program.get(), yyextra->g_Program->thisModule.get(), yyextra->g_ReaderExpr, (yyvsp[0].ch), tokAt(scanner,(yylsp[0]))) ) { das_yyend_reader(scanner); @@ -6610,7 +6661,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 35: /* $@1: %empty */ + case 36: /* $@1: %empty */ { auto macros = yyextra->g_Program->getReaderMacro(*(yyvsp[0].s)); if ( macros.size()==0 ) { @@ -6635,7 +6686,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 36: /* expr_reader: '%' name_in_namespace $@1 reader_character_sequence */ + case 37: /* expr_reader: '%' name_in_namespace $@1 reader_character_sequence */ { yyextra->g_ReaderExpr->at = tokRangeAt(scanner,(yylsp[-3]),(yylsp[0])); (yyval.pExpression) = yyextra->g_ReaderExpr; @@ -6654,7 +6705,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 37: /* options_declaration: "options" annotation_argument_list */ + case 38: /* options_declaration: "options" annotation_argument_list */ { for ( auto & opt : *(yyvsp[0].aaList) ) { if ( opt.name=="indenting" && opt.type==Type::tInt ) { @@ -6684,32 +6735,32 @@ YYLTYPE yylloc = yyloc_default; } break; - case 39: /* keyword_or_name: "name" */ + case 40: /* keyword_or_name: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 40: /* keyword_or_name: "keyword" */ + case 41: /* keyword_or_name: "keyword" */ { (yyval.s) = (yyvsp[0].s); } break; - case 41: /* keyword_or_name: "type function" */ + case 42: /* keyword_or_name: "type function" */ { (yyval.s) = (yyvsp[0].s); } break; - case 42: /* require_module_name: keyword_or_name */ + case 43: /* require_module_name: keyword_or_name */ { (yyval.s) = (yyvsp[0].s); } break; - case 43: /* require_module_name: '%' require_module_name */ + case 44: /* require_module_name: '%' require_module_name */ { *(yyvsp[0].s) = "%" + *(yyvsp[0].s); (yyval.s) = (yyvsp[0].s); } break; - case 44: /* require_module_name: require_module_name '.' keyword_or_name */ + case 45: /* require_module_name: require_module_name '.' keyword_or_name */ { *(yyvsp[-2].s) += "."; *(yyvsp[-2].s) += *(yyvsp[0].s); @@ -6718,7 +6769,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 45: /* require_module_name: require_module_name '/' keyword_or_name */ + case 46: /* require_module_name: require_module_name '/' keyword_or_name */ { *(yyvsp[-2].s) += "/"; *(yyvsp[-2].s) += *(yyvsp[0].s); @@ -6727,73 +6778,73 @@ YYLTYPE yylloc = yyloc_default; } break; - case 46: /* require_module: require_module_name is_public_module */ + case 47: /* require_module: require_module_name is_public_module */ { ast_requireModule(scanner,(yyvsp[-1].s),nullptr,(yyvsp[0].b),tokAt(scanner,(yylsp[-1]))); } break; - case 47: /* require_module: require_module_name "as" "name" is_public_module */ + case 48: /* require_module: require_module_name "as" "name" is_public_module */ { ast_requireModule(scanner,(yyvsp[-3].s),(yyvsp[-1].s),(yyvsp[0].b),tokAt(scanner,(yylsp[-3]))); } break; - case 48: /* is_public_module: %empty */ + case 49: /* is_public_module: %empty */ { (yyval.b) = false; } break; - case 49: /* is_public_module: "public" */ + case 50: /* is_public_module: "public" */ { (yyval.b) = true; } break; - case 53: /* expect_error: "integer constant" */ + case 54: /* expect_error: "integer constant" */ { yyextra->g_Program->expectErrors[CompilationError((yyvsp[0].i))] ++; } break; - case 54: /* expect_error: "integer constant" ':' "integer constant" */ + case 55: /* expect_error: "integer constant" ':' "integer constant" */ { yyextra->g_Program->expectErrors[CompilationError((yyvsp[-2].i))] += (yyvsp[0].i); } break; - case 55: /* expression_label: "label" "integer constant" ':' */ + case 56: /* expression_label: "label" "integer constant" ':' */ { (yyval.pExpression) = new ExprLabel(tokAt(scanner,(yylsp[-2])),(yyvsp[-1].i)); } break; - case 56: /* expression_goto: "goto" "label" "integer constant" */ + case 57: /* expression_goto: "goto" "label" "integer constant" */ { (yyval.pExpression) = new ExprGoto(tokAt(scanner,(yylsp[-2])),(yyvsp[0].i)); } break; - case 57: /* expression_goto: "goto" expr */ + case 58: /* expression_goto: "goto" expr */ { (yyval.pExpression) = new ExprGoto(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 58: /* elif_or_static_elif: "elif" */ + case 59: /* elif_or_static_elif: "elif" */ { (yyval.b) = false; } break; - case 59: /* elif_or_static_elif: "static_elif" */ + case 60: /* elif_or_static_elif: "static_elif" */ { (yyval.b) = true; } break; - case 60: /* expression_else: %empty */ + case 61: /* expression_else: %empty */ { (yyval.pExpression) = nullptr; } break; - case 61: /* expression_else: "else" expression_block */ + case 62: /* expression_else: "else" expression_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 62: /* expression_else: elif_or_static_elif expr expression_block expression_else */ + case 63: /* expression_else: elif_or_static_elif expr expression_block expression_else */ { auto eite = new ExprIfThenElse(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); @@ -6802,49 +6853,49 @@ YYLTYPE yylloc = yyloc_default; } break; - case 63: /* if_or_static_if: "if" */ + case 64: /* if_or_static_if: "if" */ { (yyval.b) = false; } break; - case 64: /* if_or_static_if: "static_if" */ + case 65: /* if_or_static_if: "static_if" */ { (yyval.b) = true; } break; - case 65: /* expression_else_one_liner: %empty */ + case 66: /* expression_else_one_liner: %empty */ { (yyval.pExpression) = nullptr; } break; - case 66: /* $@2: %empty */ + case 67: /* $@2: %empty */ { yyextra->das_need_oxford_comma = true; } break; - case 67: /* expression_else_one_liner: "else" $@2 expression_if_one_liner */ + case 68: /* expression_else_one_liner: "else" $@2 expression_if_one_liner */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 68: /* expression_if_one_liner: expr */ + case 69: /* expression_if_one_liner: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 69: /* expression_if_one_liner: expression_return_no_pipe */ + case 70: /* expression_if_one_liner: expression_return_no_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 70: /* expression_if_one_liner: expression_yield_no_pipe */ + case 71: /* expression_if_one_liner: expression_yield_no_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 71: /* expression_if_one_liner: expression_break */ + case 72: /* expression_if_one_liner: expression_break */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 72: /* expression_if_one_liner: expression_continue */ + case 73: /* expression_if_one_liner: expression_continue */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 73: /* expression_if_then_else: if_or_static_if expr expression_block expression_else */ + case 74: /* expression_if_then_else: if_or_static_if expr expression_block expression_else */ { auto eite = new ExprIfThenElse(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); @@ -6853,27 +6904,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 74: /* $@3: %empty */ + case 75: /* $@3: %empty */ { yyextra->das_need_oxford_comma = true; } break; - case 75: /* expression_if_then_else: expression_if_one_liner "if" $@3 expr expression_else_one_liner "end of expression" */ + case 76: /* expression_if_then_else: expression_if_one_liner "if" $@3 expr expression_else_one_liner "end of expression" */ { (yyval.pExpression) = new ExprIfThenElse(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr(ast_wrapInBlock((yyvsp[-5].pExpression))),(yyvsp[-1].pExpression) ? ExpressionPtr(ast_wrapInBlock((yyvsp[-1].pExpression))) : nullptr); } break; - case 76: /* $@4: %empty */ + case 77: /* $@4: %empty */ { yyextra->das_need_oxford_comma=false; } break; - case 77: /* expression_for_loop: "for" $@4 variable_name_with_pos_list "in" expr_list expression_block */ + case 78: /* expression_for_loop: "for" $@4 variable_name_with_pos_list "in" expr_list expression_block */ { (yyval.pExpression) = ast_forLoop(scanner,(yyvsp[-3].pNameWithPosList),(yyvsp[-1].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-5])),tokAt(scanner,(yylsp[0]))); } break; - case 78: /* expression_unsafe: "unsafe" expression_block */ + case 79: /* expression_unsafe: "unsafe" expression_block */ { auto pUnsafe = new ExprUnsafe(tokAt(scanner,(yylsp[-1]))); pUnsafe->body = ExpressionPtr((yyvsp[0].pExpression)); @@ -6881,7 +6932,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 79: /* expression_while_loop: "while" expr expression_block */ + case 80: /* expression_while_loop: "while" expr expression_block */ { auto pWhile = new ExprWhile(tokAt(scanner,(yylsp[-2]))); pWhile->cond = ExpressionPtr((yyvsp[-1].pExpression)); @@ -6891,7 +6942,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 80: /* expression_with: "with" expr expression_block */ + case 81: /* expression_with: "with" expr expression_block */ { auto pWith = new ExprWith(tokAt(scanner,(yylsp[-2]))); pWith->with = ExpressionPtr((yyvsp[-1].pExpression)); @@ -6900,42 +6951,42 @@ YYLTYPE yylloc = yyloc_default; } break; - case 81: /* $@5: %empty */ + case 82: /* $@5: %empty */ { yyextra->das_need_oxford_comma=true; } break; - case 82: /* expression_with_alias: "assume" "name" '=' $@5 expr */ + case 83: /* expression_with_alias: "assume" "name" '=' $@5 expr */ { (yyval.pExpression) = new ExprAssume(tokAt(scanner,(yylsp[-4])), *(yyvsp[-3].s), (yyvsp[0].pExpression) ); delete (yyvsp[-3].s); } break; - case 83: /* annotation_argument_value: string_constant */ + case 84: /* annotation_argument_value: string_constant */ { (yyval.aa) = new AnnotationArgument("",*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 84: /* annotation_argument_value: "name" */ + case 85: /* annotation_argument_value: "name" */ { (yyval.aa) = new AnnotationArgument("",*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 85: /* annotation_argument_value: "integer constant" */ + case 86: /* annotation_argument_value: "integer constant" */ { (yyval.aa) = new AnnotationArgument("",(yyvsp[0].i)); } break; - case 86: /* annotation_argument_value: "floating point constant" */ + case 87: /* annotation_argument_value: "floating point constant" */ { (yyval.aa) = new AnnotationArgument("",float((yyvsp[0].fd))); } break; - case 87: /* annotation_argument_value: "true" */ + case 88: /* annotation_argument_value: "true" */ { (yyval.aa) = new AnnotationArgument("",true); } break; - case 88: /* annotation_argument_value: "false" */ + case 89: /* annotation_argument_value: "false" */ { (yyval.aa) = new AnnotationArgument("",false); } break; - case 89: /* annotation_argument_value_list: annotation_argument_value */ + case 90: /* annotation_argument_value_list: annotation_argument_value */ { (yyval.aaList) = new AnnotationArgumentList(); (yyval.aaList)->push_back(*(yyvsp[0].aa)); @@ -6943,7 +6994,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 90: /* annotation_argument_value_list: annotation_argument_value_list ',' annotation_argument_value */ + case 91: /* annotation_argument_value_list: annotation_argument_value_list ',' annotation_argument_value */ { (yyval.aaList) = (yyvsp[-2].aaList); (yyval.aaList)->push_back(*(yyvsp[0].aa)); @@ -6951,95 +7002,95 @@ YYLTYPE yylloc = yyloc_default; } break; - case 91: /* annotation_argument_name: "name" */ + case 92: /* annotation_argument_name: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 92: /* annotation_argument_name: "type" */ + case 93: /* annotation_argument_name: "type" */ { (yyval.s) = new string("type"); } break; - case 93: /* annotation_argument_name: "in" */ + case 94: /* annotation_argument_name: "in" */ { (yyval.s) = new string("in"); } break; - case 94: /* annotation_argument: annotation_argument_name '=' string_constant */ + case 95: /* annotation_argument: annotation_argument_name '=' string_constant */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),*(yyvsp[0].s),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[0].s); delete (yyvsp[-2].s); } break; - case 95: /* annotation_argument: annotation_argument_name '=' "name" */ + case 96: /* annotation_argument: annotation_argument_name '=' "name" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),*(yyvsp[0].s),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[0].s); delete (yyvsp[-2].s); } break; - case 96: /* annotation_argument: annotation_argument_name '=' "integer constant" */ + case 97: /* annotation_argument: annotation_argument_name '=' "integer constant" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),(yyvsp[0].i),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 97: /* annotation_argument: annotation_argument_name '=' "floating point constant" */ + case 98: /* annotation_argument: annotation_argument_name '=' "floating point constant" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),float((yyvsp[0].fd)),tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 98: /* annotation_argument: annotation_argument_name '=' "true" */ + case 99: /* annotation_argument: annotation_argument_name '=' "true" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),true,tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 99: /* annotation_argument: annotation_argument_name '=' "false" */ + case 100: /* annotation_argument: annotation_argument_name '=' "false" */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[-2].s),false,tokAt(scanner,(yylsp[-2]))); delete (yyvsp[-2].s); } break; - case 100: /* annotation_argument: annotation_argument_name */ + case 101: /* annotation_argument: annotation_argument_name */ { (yyval.aa) = new AnnotationArgument(*(yyvsp[0].s),true,tokAt(scanner,(yylsp[0]))); delete (yyvsp[0].s); } break; - case 101: /* annotation_argument: annotation_argument_name '=' '(' annotation_argument_value_list ')' */ + case 102: /* annotation_argument: annotation_argument_name '=' '(' annotation_argument_value_list ')' */ { { (yyval.aa) = new AnnotationArgument(*(yyvsp[-4].s),(yyvsp[-1].aaList),tokAt(scanner,(yylsp[-4]))); delete (yyvsp[-4].s); } } break; - case 102: /* annotation_argument_list: annotation_argument */ + case 103: /* annotation_argument_list: annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,new AnnotationArgumentList(),(yyvsp[0].aa)); } break; - case 103: /* annotation_argument_list: annotation_argument_list ',' annotation_argument */ + case 104: /* annotation_argument_list: annotation_argument_list ',' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,(yyvsp[-2].aaList),(yyvsp[0].aa)); } break; - case 104: /* metadata_argument_list: '@' annotation_argument */ + case 105: /* metadata_argument_list: '@' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,new AnnotationArgumentList(),(yyvsp[0].aa)); } break; - case 105: /* metadata_argument_list: metadata_argument_list '@' annotation_argument */ + case 106: /* metadata_argument_list: metadata_argument_list '@' annotation_argument */ { (yyval.aaList) = ast_annotationArgumentListEntry(scanner,(yyvsp[-2].aaList),(yyvsp[0].aa)); } break; - case 106: /* metadata_argument_list: metadata_argument_list "end of expression" */ + case 107: /* metadata_argument_list: metadata_argument_list "end of expression" */ { (yyval.aaList) = (yyvsp[-1].aaList); } break; - case 107: /* annotation_declaration_name: name_in_namespace */ + case 108: /* annotation_declaration_name: name_in_namespace */ { (yyval.s) = (yyvsp[0].s); } break; - case 108: /* annotation_declaration_name: "require" */ + case 109: /* annotation_declaration_name: "require" */ { (yyval.s) = new string("require"); } break; - case 109: /* annotation_declaration_name: "private" */ + case 110: /* annotation_declaration_name: "private" */ { (yyval.s) = new string("private"); } break; - case 110: /* annotation_declaration_basic: annotation_declaration_name */ + case 111: /* annotation_declaration_basic: annotation_declaration_name */ { (yyval.fa) = new AnnotationDeclaration(); (yyval.fa)->at = tokAt(scanner,(yylsp[0])); @@ -7055,7 +7106,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 111: /* annotation_declaration_basic: annotation_declaration_name '(' annotation_argument_list ')' */ + case 112: /* annotation_declaration_basic: annotation_declaration_name '(' annotation_argument_list ')' */ { (yyval.fa) = new AnnotationDeclaration(); (yyval.fa)->at = tokAt(scanner,(yylsp[-3])); @@ -7073,13 +7124,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 112: /* annotation_declaration: annotation_declaration_basic */ + case 113: /* annotation_declaration: annotation_declaration_basic */ { (yyval.fa) = (yyvsp[0].fa); } break; - case 113: /* annotation_declaration: '!' annotation_declaration */ + case 114: /* annotation_declaration: '!' annotation_declaration */ { if ( !(yyvsp[0].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[0].fa)->annotation.get()))->isSpecialized() ) { das_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[0])), @@ -7090,7 +7141,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 114: /* annotation_declaration: annotation_declaration "&&" annotation_declaration */ + case 115: /* annotation_declaration: annotation_declaration "&&" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -7104,7 +7155,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 115: /* annotation_declaration: annotation_declaration "||" annotation_declaration */ + case 116: /* annotation_declaration: annotation_declaration "||" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation || !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -7118,7 +7169,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 116: /* annotation_declaration: annotation_declaration "^^" annotation_declaration */ + case 117: /* annotation_declaration: annotation_declaration "^^" annotation_declaration */ { if ( !(yyvsp[-2].fa)->annotation->rtti_isFunctionAnnotation() || !((FunctionAnnotation *)((yyvsp[-2].fa)->annotation.get()))->isSpecialized() ) { das_yyerror(scanner,"can only run logical operations on contracts", tokAt(scanner, (yylsp[-2])), @@ -7132,410 +7183,410 @@ YYLTYPE yylloc = yyloc_default; } break; - case 117: /* annotation_declaration: '(' annotation_declaration ')' */ + case 118: /* annotation_declaration: '(' annotation_declaration ')' */ { (yyval.fa) = (yyvsp[-1].fa); } break; - case 118: /* annotation_declaration: "|>" annotation_declaration */ + case 119: /* annotation_declaration: "|>" annotation_declaration */ { (yyval.fa) = (yyvsp[0].fa); (yyvsp[0].fa)->inherited = true; } break; - case 119: /* annotation_list: annotation_declaration */ + case 120: /* annotation_list: annotation_declaration */ { (yyval.faList) = new AnnotationList(); (yyval.faList)->push_back(AnnotationDeclarationPtr((yyvsp[0].fa))); } break; - case 120: /* annotation_list: annotation_list ',' annotation_declaration */ + case 121: /* annotation_list: annotation_list ',' annotation_declaration */ { (yyval.faList) = (yyvsp[-2].faList); (yyval.faList)->push_back(AnnotationDeclarationPtr((yyvsp[0].fa))); } break; - case 121: /* optional_annotation_list: %empty */ + case 122: /* optional_annotation_list: %empty */ { (yyval.faList) = nullptr; } break; - case 122: /* optional_annotation_list: '[' annotation_list ']' */ + case 123: /* optional_annotation_list: '[' annotation_list ']' */ { (yyval.faList) = (yyvsp[-1].faList); } break; - case 123: /* optional_function_argument_list: %empty */ + case 124: /* optional_function_argument_list: %empty */ { (yyval.pVarDeclList) = nullptr; } break; - case 124: /* optional_function_argument_list: '(' ')' */ + case 125: /* optional_function_argument_list: '(' ')' */ { (yyval.pVarDeclList) = nullptr; } break; - case 125: /* optional_function_argument_list: '(' function_argument_list ')' */ + case 126: /* optional_function_argument_list: '(' function_argument_list ')' */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 126: /* optional_function_type: %empty */ + case 127: /* optional_function_type: %empty */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); } break; - case 127: /* optional_function_type: ':' type_declaration */ + case 128: /* optional_function_type: ':' type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 128: /* function_name: "name" */ + case 129: /* function_name: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyval.s) = (yyvsp[0].s); } break; - case 129: /* function_name: "operator" '!' */ + case 130: /* function_name: "operator" '!' */ { (yyval.s) = new string("!"); } break; - case 130: /* function_name: "operator" '~' */ + case 131: /* function_name: "operator" '~' */ { (yyval.s) = new string("~"); } break; - case 131: /* function_name: "operator" "+=" */ + case 132: /* function_name: "operator" "+=" */ { (yyval.s) = new string("+="); } break; - case 132: /* function_name: "operator" "-=" */ + case 133: /* function_name: "operator" "-=" */ { (yyval.s) = new string("-="); } break; - case 133: /* function_name: "operator" "*=" */ + case 134: /* function_name: "operator" "*=" */ { (yyval.s) = new string("*="); } break; - case 134: /* function_name: "operator" "/=" */ + case 135: /* function_name: "operator" "/=" */ { (yyval.s) = new string("/="); } break; - case 135: /* function_name: "operator" "%=" */ + case 136: /* function_name: "operator" "%=" */ { (yyval.s) = new string("%="); } break; - case 136: /* function_name: "operator" "&=" */ + case 137: /* function_name: "operator" "&=" */ { (yyval.s) = new string("&="); } break; - case 137: /* function_name: "operator" "|=" */ + case 138: /* function_name: "operator" "|=" */ { (yyval.s) = new string("|="); } break; - case 138: /* function_name: "operator" "^=" */ + case 139: /* function_name: "operator" "^=" */ { (yyval.s) = new string("^="); } break; - case 139: /* function_name: "operator" "&&=" */ + case 140: /* function_name: "operator" "&&=" */ { (yyval.s) = new string("&&="); } break; - case 140: /* function_name: "operator" "||=" */ + case 141: /* function_name: "operator" "||=" */ { (yyval.s) = new string("||="); } break; - case 141: /* function_name: "operator" "^^=" */ + case 142: /* function_name: "operator" "^^=" */ { (yyval.s) = new string("^^="); } break; - case 142: /* function_name: "operator" "&&" */ + case 143: /* function_name: "operator" "&&" */ { (yyval.s) = new string("&&"); } break; - case 143: /* function_name: "operator" "||" */ + case 144: /* function_name: "operator" "||" */ { (yyval.s) = new string("||"); } break; - case 144: /* function_name: "operator" "^^" */ + case 145: /* function_name: "operator" "^^" */ { (yyval.s) = new string("^^"); } break; - case 145: /* function_name: "operator" '+' */ + case 146: /* function_name: "operator" '+' */ { (yyval.s) = new string("+"); } break; - case 146: /* function_name: "operator" '-' */ + case 147: /* function_name: "operator" '-' */ { (yyval.s) = new string("-"); } break; - case 147: /* function_name: "operator" '*' */ + case 148: /* function_name: "operator" '*' */ { (yyval.s) = new string("*"); } break; - case 148: /* function_name: "operator" '/' */ + case 149: /* function_name: "operator" '/' */ { (yyval.s) = new string("/"); } break; - case 149: /* function_name: "operator" '%' */ + case 150: /* function_name: "operator" '%' */ { (yyval.s) = new string("%"); } break; - case 150: /* function_name: "operator" '<' */ + case 151: /* function_name: "operator" '<' */ { (yyval.s) = new string("<"); } break; - case 151: /* function_name: "operator" '>' */ + case 152: /* function_name: "operator" '>' */ { (yyval.s) = new string(">"); } break; - case 152: /* function_name: "operator" ".." */ + case 153: /* function_name: "operator" ".." */ { (yyval.s) = new string("interval"); } break; - case 153: /* function_name: "operator" "==" */ + case 154: /* function_name: "operator" "==" */ { (yyval.s) = new string("=="); } break; - case 154: /* function_name: "operator" "!=" */ + case 155: /* function_name: "operator" "!=" */ { (yyval.s) = new string("!="); } break; - case 155: /* function_name: "operator" "<=" */ + case 156: /* function_name: "operator" "<=" */ { (yyval.s) = new string("<="); } break; - case 156: /* function_name: "operator" ">=" */ + case 157: /* function_name: "operator" ">=" */ { (yyval.s) = new string(">="); } break; - case 157: /* function_name: "operator" '&' */ + case 158: /* function_name: "operator" '&' */ { (yyval.s) = new string("&"); } break; - case 158: /* function_name: "operator" '|' */ + case 159: /* function_name: "operator" '|' */ { (yyval.s) = new string("|"); } break; - case 159: /* function_name: "operator" '^' */ + case 160: /* function_name: "operator" '^' */ { (yyval.s) = new string("^"); } break; - case 160: /* function_name: "++" "operator" */ + case 161: /* function_name: "++" "operator" */ { (yyval.s) = new string("++"); } break; - case 161: /* function_name: "--" "operator" */ + case 162: /* function_name: "--" "operator" */ { (yyval.s) = new string("--"); } break; - case 162: /* function_name: "operator" "++" */ + case 163: /* function_name: "operator" "++" */ { (yyval.s) = new string("+++"); } break; - case 163: /* function_name: "operator" "--" */ + case 164: /* function_name: "operator" "--" */ { (yyval.s) = new string("---"); } break; - case 164: /* function_name: "operator" "<<" */ + case 165: /* function_name: "operator" "<<" */ { (yyval.s) = new string("<<"); } break; - case 165: /* function_name: "operator" ">>" */ + case 166: /* function_name: "operator" ">>" */ { (yyval.s) = new string(">>"); } break; - case 166: /* function_name: "operator" "<<=" */ + case 167: /* function_name: "operator" "<<=" */ { (yyval.s) = new string("<<="); } break; - case 167: /* function_name: "operator" ">>=" */ + case 168: /* function_name: "operator" ">>=" */ { (yyval.s) = new string(">>="); } break; - case 168: /* function_name: "operator" "<<<" */ + case 169: /* function_name: "operator" "<<<" */ { (yyval.s) = new string("<<<"); } break; - case 169: /* function_name: "operator" ">>>" */ + case 170: /* function_name: "operator" ">>>" */ { (yyval.s) = new string(">>>"); } break; - case 170: /* function_name: "operator" "<<<=" */ + case 171: /* function_name: "operator" "<<<=" */ { (yyval.s) = new string("<<<="); } break; - case 171: /* function_name: "operator" ">>>=" */ + case 172: /* function_name: "operator" ">>>=" */ { (yyval.s) = new string(">>>="); } break; - case 172: /* function_name: "operator" '[' ']' */ + case 173: /* function_name: "operator" '[' ']' */ { (yyval.s) = new string("[]"); } break; - case 173: /* function_name: "operator" "?[" ']' */ + case 174: /* function_name: "operator" "?[" ']' */ { (yyval.s) = new string("?[]"); } break; - case 174: /* function_name: "operator" '.' */ + case 175: /* function_name: "operator" '.' */ { (yyval.s) = new string("."); } break; - case 175: /* function_name: "operator" "?." */ + case 176: /* function_name: "operator" "?." */ { (yyval.s) = new string("?."); } break; - case 176: /* function_name: "operator" '.' "name" */ + case 177: /* function_name: "operator" '.' "name" */ { (yyval.s) = new string(".`"+*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 177: /* function_name: "operator" '.' "name" ":=" */ + case 178: /* function_name: "operator" '.' "name" ":=" */ { (yyval.s) = new string(".`"+*(yyvsp[-1].s)+"`clone"); delete (yyvsp[-1].s); } break; - case 178: /* function_name: "operator" "?." "name" */ + case 179: /* function_name: "operator" "?." "name" */ { (yyval.s) = new string("?.`"+*(yyvsp[0].s)); delete (yyvsp[0].s);} break; - case 179: /* function_name: "operator" ":=" */ + case 180: /* function_name: "operator" ":=" */ { (yyval.s) = new string("clone"); } break; - case 180: /* function_name: "operator" "delete" */ + case 181: /* function_name: "operator" "delete" */ { (yyval.s) = new string("finalize"); } break; - case 181: /* function_name: "operator" "??" */ + case 182: /* function_name: "operator" "??" */ { (yyval.s) = new string("??"); } break; - case 182: /* function_name: "operator" "is" */ + case 183: /* function_name: "operator" "is" */ { (yyval.s) = new string("`is"); } break; - case 183: /* function_name: "operator" "as" */ + case 184: /* function_name: "operator" "as" */ { (yyval.s) = new string("`as"); } break; - case 184: /* function_name: "operator" "is" "name" */ + case 185: /* function_name: "operator" "is" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "`is`" + *(yyvsp[0].s); } break; - case 185: /* function_name: "operator" "as" "name" */ + case 186: /* function_name: "operator" "as" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "`as`" + *(yyvsp[0].s); } break; - case 186: /* function_name: "operator" '?' "as" */ + case 187: /* function_name: "operator" '?' "as" */ { (yyval.s) = new string("?as"); } break; - case 187: /* function_name: "operator" '?' "as" "name" */ + case 188: /* function_name: "operator" '?' "as" "name" */ { (yyval.s) = (yyvsp[0].s); *(yyvsp[0].s) = "?as`" + *(yyvsp[0].s); } break; - case 188: /* function_name: "bool" */ + case 189: /* function_name: "bool" */ { (yyval.s) = new string("bool"); } break; - case 189: /* function_name: "string" */ + case 190: /* function_name: "string" */ { (yyval.s) = new string("string"); } break; - case 190: /* function_name: "int" */ + case 191: /* function_name: "int" */ { (yyval.s) = new string("int"); } break; - case 191: /* function_name: "int2" */ + case 192: /* function_name: "int2" */ { (yyval.s) = new string("int2"); } break; - case 192: /* function_name: "int3" */ + case 193: /* function_name: "int3" */ { (yyval.s) = new string("int3"); } break; - case 193: /* function_name: "int4" */ + case 194: /* function_name: "int4" */ { (yyval.s) = new string("int4"); } break; - case 194: /* function_name: "uint" */ + case 195: /* function_name: "uint" */ { (yyval.s) = new string("uint"); } break; - case 195: /* function_name: "uint2" */ + case 196: /* function_name: "uint2" */ { (yyval.s) = new string("uint2"); } break; - case 196: /* function_name: "uint3" */ + case 197: /* function_name: "uint3" */ { (yyval.s) = new string("uint3"); } break; - case 197: /* function_name: "uint4" */ + case 198: /* function_name: "uint4" */ { (yyval.s) = new string("uint4"); } break; - case 198: /* function_name: "float" */ + case 199: /* function_name: "float" */ { (yyval.s) = new string("float"); } break; - case 199: /* function_name: "float2" */ + case 200: /* function_name: "float2" */ { (yyval.s) = new string("float2"); } break; - case 200: /* function_name: "float3" */ + case 201: /* function_name: "float3" */ { (yyval.s) = new string("float3"); } break; - case 201: /* function_name: "float4" */ + case 202: /* function_name: "float4" */ { (yyval.s) = new string("float4"); } break; - case 202: /* function_name: "range" */ + case 203: /* function_name: "range" */ { (yyval.s) = new string("range"); } break; - case 203: /* function_name: "urange" */ + case 204: /* function_name: "urange" */ { (yyval.s) = new string("urange"); } break; - case 204: /* function_name: "range64" */ + case 205: /* function_name: "range64" */ { (yyval.s) = new string("range64"); } break; - case 205: /* function_name: "urange64" */ + case 206: /* function_name: "urange64" */ { (yyval.s) = new string("urange64"); } break; - case 206: /* function_name: "int64" */ + case 207: /* function_name: "int64" */ { (yyval.s) = new string("int64"); } break; - case 207: /* function_name: "uint64" */ + case 208: /* function_name: "uint64" */ { (yyval.s) = new string("uint64"); } break; - case 208: /* function_name: "double" */ + case 209: /* function_name: "double" */ { (yyval.s) = new string("double"); } break; - case 209: /* function_name: "int8" */ + case 210: /* function_name: "int8" */ { (yyval.s) = new string("int8"); } break; - case 210: /* function_name: "uint8" */ + case 211: /* function_name: "uint8" */ { (yyval.s) = new string("uint8"); } break; - case 211: /* function_name: "int16" */ + case 212: /* function_name: "int16" */ { (yyval.s) = new string("int16"); } break; - case 212: /* function_name: "uint16" */ + case 213: /* function_name: "uint16" */ { (yyval.s) = new string("uint16"); } break; - case 213: /* global_function_declaration: optional_annotation_list "def" function_declaration */ + case 214: /* global_function_declaration: optional_annotation_list "def" function_declaration */ { (yyvsp[0].pFuncDecl)->atDecl = tokRangeAt(scanner,(yylsp[-1]),(yylsp[0])); assignDefaultArguments((yyvsp[0].pFuncDecl)); @@ -7553,25 +7604,25 @@ YYLTYPE yylloc = yyloc_default; } break; - case 214: /* optional_public_or_private_function: %empty */ + case 215: /* optional_public_or_private_function: %empty */ { (yyval.b) = yyextra->g_thisStructure ? !yyextra->g_thisStructure->privateStructure : yyextra->g_Program->thisModule->isPublic; } break; - case 215: /* optional_public_or_private_function: "private" */ + case 216: /* optional_public_or_private_function: "private" */ { (yyval.b) = false; } break; - case 216: /* optional_public_or_private_function: "public" */ + case 217: /* optional_public_or_private_function: "public" */ { (yyval.b) = true; } break; - case 217: /* function_declaration_header: function_name optional_function_argument_list optional_function_type */ + case 218: /* function_declaration_header: function_name optional_function_argument_list optional_function_type */ { (yyval.pFuncDecl) = ast_functionDeclarationHeader(scanner,(yyvsp[-2].s),(yyvsp[-1].pVarDeclList),(yyvsp[0].pTypeDecl),tokAt(scanner,(yylsp[-2]))); } break; - case 218: /* $@6: %empty */ + case 219: /* $@6: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -7580,7 +7631,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 219: /* function_declaration: optional_public_or_private_function $@6 function_declaration_header expression_block */ + case 220: /* function_declaration: optional_public_or_private_function $@6 function_declaration_header expression_block */ { (yyvsp[-1].pFuncDecl)->body = ExpressionPtr((yyvsp[0].pExpression)); (yyvsp[-1].pFuncDecl)->privateFunction = !(yyvsp[-3].b); @@ -7592,14 +7643,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 220: /* expression_block: "begin of code block" expressions "end of code block" */ + case 221: /* expression_block: "begin of code block" expressions "end of code block" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); (yyval.pExpression)->at = tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])); } break; - case 221: /* expression_block: "begin of code block" expressions "end of code block" "finally" "begin of code block" expressions "end of code block" */ + case 222: /* expression_block: "begin of code block" expressions "end of code block" "finally" "begin of code block" expressions "end of code block" */ { auto pB = (ExprBlock *) (yyvsp[-5].pExpression); auto pF = (ExprBlock *) (yyvsp[-1].pExpression); @@ -7610,7 +7661,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 222: /* expr_call_pipe: expr expr_full_block_assumed_piped */ + case 223: /* expr_call_pipe: expr expr_full_block_assumed_piped */ { if ( (yyvsp[-1].pExpression)->rtti_isCallLikeExpr() ) { ((ExprLooksLikeCall *)(yyvsp[-1].pExpression))->arguments.push_back(ExpressionPtr((yyvsp[0].pExpression))); @@ -7622,7 +7673,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 223: /* expr_call_pipe: expression_keyword expr_full_block_assumed_piped */ + case 224: /* expr_call_pipe: expression_keyword expr_full_block_assumed_piped */ { if ( (yyvsp[-1].pExpression)->rtti_isCallLikeExpr() ) { ((ExprLooksLikeCall *)(yyvsp[-1].pExpression))->arguments.push_back(ExpressionPtr((yyvsp[0].pExpression))); @@ -7634,97 +7685,97 @@ YYLTYPE yylloc = yyloc_default; } break; - case 224: /* expr_call_pipe: "generator" '<' type_declaration_no_options '>' optional_capture_list expr_full_block_assumed_piped */ + case 225: /* expr_call_pipe: "generator" '<' type_declaration_no_options '>' optional_capture_list expr_full_block_assumed_piped */ { (yyval.pExpression) = ast_makeGenerator(scanner,(yyvsp[-3].pTypeDecl),(yyvsp[-1].pCaptList),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-5]))); } break; - case 225: /* expression_any: "end of expression" */ + case 226: /* expression_any: "end of expression" */ { (yyval.pExpression) = nullptr; } break; - case 226: /* expression_any: expr_pipe */ + case 227: /* expression_any: expr_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 227: /* expression_any: expr_keyword */ + case 228: /* expression_any: expr_keyword */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 228: /* expression_any: expr_assign_pipe */ + case 229: /* expression_any: expr_assign_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 229: /* expression_any: expr_assign "end of expression" */ + case 230: /* expression_any: expr_assign "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 230: /* expression_any: expression_delete "end of expression" */ + case 231: /* expression_any: expression_delete "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 231: /* expression_any: expression_let */ + case 232: /* expression_any: expression_let */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 232: /* expression_any: expression_while_loop */ + case 233: /* expression_any: expression_while_loop */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 233: /* expression_any: expression_unsafe */ + case 234: /* expression_any: expression_unsafe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 234: /* expression_any: expression_with */ + case 235: /* expression_any: expression_with */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 235: /* expression_any: expression_with_alias */ + case 236: /* expression_any: expression_with_alias */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 236: /* expression_any: expression_for_loop */ + case 237: /* expression_any: expression_for_loop */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 237: /* expression_any: expression_break "end of expression" */ + case 238: /* expression_any: expression_break "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 238: /* expression_any: expression_continue "end of expression" */ + case 239: /* expression_any: expression_continue "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 239: /* expression_any: expression_return */ + case 240: /* expression_any: expression_return */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 240: /* expression_any: expression_yield */ + case 241: /* expression_any: expression_yield */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 241: /* expression_any: expression_if_then_else */ + case 242: /* expression_any: expression_if_then_else */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 242: /* expression_any: expression_try_catch */ + case 243: /* expression_any: expression_try_catch */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 243: /* expression_any: expression_label "end of expression" */ + case 244: /* expression_any: expression_label "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 244: /* expression_any: expression_goto "end of expression" */ + case 245: /* expression_any: expression_goto "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 245: /* expression_any: "pass" "end of expression" */ + case 246: /* expression_any: "pass" "end of expression" */ { (yyval.pExpression) = nullptr; } break; - case 246: /* expressions: %empty */ + case 247: /* expressions: %empty */ { (yyval.pExpression) = new ExprBlock(); (yyval.pExpression)->at = LineInfo(yyextra->g_FileAccessStack.back(), @@ -7732,7 +7783,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 247: /* expressions: expressions expression_any */ + case 248: /* expressions: expressions expression_any */ { (yyval.pExpression) = (yyvsp[-1].pExpression); if ( (yyvsp[0].pExpression) ) { @@ -7741,13 +7792,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 248: /* expressions: expressions error */ + case 249: /* expressions: expressions error */ { delete (yyvsp[-1].pExpression); (yyval.pExpression) = nullptr; YYABORT; } break; - case 249: /* expr_keyword: "keyword" expr expression_block */ + case 250: /* expr_keyword: "keyword" expr expression_block */ { auto pCall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s)); pCall->arguments.push_back(ExpressionPtr((yyvsp[-1].pExpression))); @@ -7759,53 +7810,53 @@ YYLTYPE yylloc = yyloc_default; } break; - case 250: /* optional_expr_list: %empty */ + case 251: /* optional_expr_list: %empty */ { (yyval.pExpression) = nullptr; } break; - case 251: /* optional_expr_list: expr_list optional_comma */ + case 252: /* optional_expr_list: expr_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 252: /* optional_expr_list_in_braces: %empty */ + case 253: /* optional_expr_list_in_braces: %empty */ { (yyval.pExpression) = nullptr; } break; - case 253: /* optional_expr_list_in_braces: '(' optional_expr_list optional_comma ')' */ + case 254: /* optional_expr_list_in_braces: '(' optional_expr_list optional_comma ')' */ { (yyval.pExpression) = (yyvsp[-2].pExpression); } break; - case 254: /* optional_expr_map_tuple_list: %empty */ + case 255: /* optional_expr_map_tuple_list: %empty */ { (yyval.pExpression) = nullptr; } break; - case 255: /* optional_expr_map_tuple_list: expr_map_tuple_list optional_comma */ + case 256: /* optional_expr_map_tuple_list: expr_map_tuple_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 256: /* type_declaration_no_options_list: type_declaration */ + case 257: /* type_declaration_no_options_list: type_declaration */ { (yyval.pTypeDeclList) = new vector(); (yyval.pTypeDeclList)->push_back(new ExprTypeDecl(tokAt(scanner,(yylsp[0])),(yyvsp[0].pTypeDecl))); } break; - case 257: /* type_declaration_no_options_list: type_declaration_no_options_list c_or_s type_declaration */ + case 258: /* type_declaration_no_options_list: type_declaration_no_options_list c_or_s type_declaration */ { (yyval.pTypeDeclList) = (yyvsp[-2].pTypeDeclList); (yyval.pTypeDeclList)->push_back(new ExprTypeDecl(tokAt(scanner,(yylsp[0])),(yyvsp[0].pTypeDecl))); } break; - case 258: /* $@7: %empty */ + case 259: /* $@7: %empty */ { yyextra->das_arrow_depth ++; } break; - case 259: /* $@8: %empty */ + case 260: /* $@8: %empty */ { yyextra->das_arrow_depth --; } break; - case 260: /* expression_keyword: "keyword" '<' $@7 type_declaration_no_options_list '>' $@8 expr */ + case 261: /* expression_keyword: "keyword" '<' $@7 type_declaration_no_options_list '>' $@8 expr */ { auto pCall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-6])),tokAt(scanner,(yylsp[0])),*(yyvsp[-6].s)); pCall->arguments = typesAndSequenceToList((yyvsp[-3].pTypeDeclList),(yyvsp[0].pExpression)); @@ -7814,15 +7865,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 261: /* $@9: %empty */ + case 262: /* $@9: %empty */ { yyextra->das_arrow_depth ++; } break; - case 262: /* $@10: %empty */ + case 263: /* $@10: %empty */ { yyextra->das_arrow_depth --; } break; - case 263: /* expression_keyword: "type function" '<' $@9 type_declaration_no_options_list '>' $@10 optional_expr_list_in_braces */ + case 264: /* expression_keyword: "type function" '<' $@9 type_declaration_no_options_list '>' $@10 optional_expr_list_in_braces */ { auto pCall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-6])),tokAt(scanner,(yylsp[0])),*(yyvsp[-6].s)); pCall->arguments = typesAndSequenceToList((yyvsp[-3].pTypeDeclList),(yyvsp[0].pExpression)); @@ -7831,7 +7882,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 264: /* expr_pipe: expr_assign " <|" expr_block */ + case 265: /* expr_pipe: expr_assign " <|" expr_block */ { Expression * pipeCall = (yyvsp[-2].pExpression)->tail(); if ( pipeCall->rtti_isCallLikeExpr() ) { @@ -7868,35 +7919,35 @@ YYLTYPE yylloc = yyloc_default; } break; - case 265: /* expr_pipe: "@ <|" expr_block */ + case 266: /* expr_pipe: "@ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 266: /* expr_pipe: "@@ <|" expr_block */ + case 267: /* expr_pipe: "@@ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 267: /* expr_pipe: "$ <|" expr_block */ + case 268: /* expr_pipe: "$ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 268: /* expr_pipe: expr_call_pipe */ + case 269: /* expr_pipe: expr_call_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 269: /* name_in_namespace: "name" */ + case 270: /* name_in_namespace: "name" */ { (yyval.s) = (yyvsp[0].s); } break; - case 270: /* name_in_namespace: "name" "::" "name" */ + case 271: /* name_in_namespace: "name" "::" "name" */ { auto ita = yyextra->das_module_alias.find(*(yyvsp[-2].s)); if ( ita == yyextra->das_module_alias.end() ) { @@ -7910,17 +7961,17 @@ YYLTYPE yylloc = yyloc_default; } break; - case 271: /* name_in_namespace: "::" "name" */ + case 272: /* name_in_namespace: "::" "name" */ { *(yyvsp[0].s) = "::" + *(yyvsp[0].s); (yyval.s) = (yyvsp[0].s); } break; - case 272: /* expression_delete: "delete" expr */ + case 273: /* expression_delete: "delete" expr */ { (yyval.pExpression) = new ExprDelete(tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 273: /* expression_delete: "delete" "explicit" expr */ + case 274: /* expression_delete: "delete" "explicit" expr */ { auto delExpr = new ExprDelete(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[0].pExpression))); delExpr->native = true; @@ -7928,47 +7979,47 @@ YYLTYPE yylloc = yyloc_default; } break; - case 274: /* $@11: %empty */ + case 275: /* $@11: %empty */ { yyextra->das_arrow_depth ++; } break; - case 275: /* $@12: %empty */ + case 276: /* $@12: %empty */ { yyextra->das_arrow_depth --; } break; - case 276: /* new_type_declaration: '<' $@11 type_declaration '>' $@12 */ + case 277: /* new_type_declaration: '<' $@11 type_declaration '>' $@12 */ { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 277: /* new_type_declaration: structure_type_declaration */ + case 278: /* new_type_declaration: structure_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 278: /* expr_new: "new" new_type_declaration */ + case 279: /* expr_new: "new" new_type_declaration */ { (yyval.pExpression) = new ExprNew(tokAt(scanner,(yylsp[-1])),TypeDeclPtr((yyvsp[0].pTypeDecl)),false); } break; - case 279: /* expr_new: "new" new_type_declaration '(' use_initializer ')' */ + case 280: /* expr_new: "new" new_type_declaration '(' use_initializer ')' */ { (yyval.pExpression) = new ExprNew(tokAt(scanner,(yylsp[-4])),TypeDeclPtr((yyvsp[-3].pTypeDecl)),true); ((ExprNew *)(yyval.pExpression))->initializer = (yyvsp[-1].b); } break; - case 280: /* expr_new: "new" new_type_declaration '(' expr_list ')' */ + case 281: /* expr_new: "new" new_type_declaration '(' expr_list ')' */ { auto pNew = new ExprNew(tokAt(scanner,(yylsp[-4])),TypeDeclPtr((yyvsp[-3].pTypeDecl)),true); (yyval.pExpression) = parseFunctionArguments(pNew,(yyvsp[-1].pExpression)); } break; - case 281: /* expr_new: "new" new_type_declaration '(' make_struct_single ')' */ + case 282: /* expr_new: "new" new_type_declaration '(' make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-3])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = (yyvsp[-3].pTypeDecl); @@ -7978,7 +8029,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 282: /* expr_new: "new" new_type_declaration '(' "uninitialized" make_struct_single ')' */ + case 283: /* expr_new: "new" new_type_declaration '(' "uninitialized" make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-4])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = (yyvsp[-4].pTypeDecl); @@ -7988,33 +8039,33 @@ YYLTYPE yylloc = yyloc_default; } break; - case 283: /* expr_new: "new" make_decl */ + case 284: /* expr_new: "new" make_decl */ { (yyval.pExpression) = new ExprAscend(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 284: /* expression_break: "break" */ + case 285: /* expression_break: "break" */ { (yyval.pExpression) = new ExprBreak(tokAt(scanner,(yylsp[0]))); } break; - case 285: /* expression_continue: "continue" */ + case 286: /* expression_continue: "continue" */ { (yyval.pExpression) = new ExprContinue(tokAt(scanner,(yylsp[0]))); } break; - case 286: /* expression_return_no_pipe: "return" */ + case 287: /* expression_return_no_pipe: "return" */ { (yyval.pExpression) = new ExprReturn(tokAt(scanner,(yylsp[0])),nullptr); } break; - case 287: /* expression_return_no_pipe: "return" expr_list */ + case 288: /* expression_return_no_pipe: "return" expr_list */ { (yyval.pExpression) = new ExprReturn(tokAt(scanner,(yylsp[-1])),sequenceToTuple((yyvsp[0].pExpression))); } break; - case 288: /* expression_return_no_pipe: "return" "<-" expr_list */ + case 289: /* expression_return_no_pipe: "return" "<-" expr_list */ { auto pRet = new ExprReturn(tokAt(scanner,(yylsp[-2])),sequenceToTuple((yyvsp[0].pExpression))); pRet->moveSemantics = true; @@ -8022,19 +8073,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 289: /* expression_return: expression_return_no_pipe "end of expression" */ + case 290: /* expression_return: expression_return_no_pipe "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 290: /* expression_return: "return" expr_pipe */ + case 291: /* expression_return: "return" expr_pipe */ { (yyval.pExpression) = new ExprReturn(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 291: /* expression_return: "return" "<-" expr_pipe */ + case 292: /* expression_return: "return" "<-" expr_pipe */ { auto pRet = new ExprReturn(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[0].pExpression))); pRet->moveSemantics = true; @@ -8042,13 +8093,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 292: /* expression_yield_no_pipe: "yield" expr */ + case 293: /* expression_yield_no_pipe: "yield" expr */ { (yyval.pExpression) = new ExprYield(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 293: /* expression_yield_no_pipe: "yield" "<-" expr */ + case 294: /* expression_yield_no_pipe: "yield" "<-" expr */ { auto pRet = new ExprYield(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[0].pExpression))); pRet->moveSemantics = true; @@ -8056,19 +8107,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 294: /* expression_yield: expression_yield_no_pipe "end of expression" */ + case 295: /* expression_yield: expression_yield_no_pipe "end of expression" */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 295: /* expression_yield: "yield" expr_pipe */ + case 296: /* expression_yield: "yield" expr_pipe */ { (yyval.pExpression) = new ExprYield(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 296: /* expression_yield: "yield" "<-" expr_pipe */ + case 297: /* expression_yield: "yield" "<-" expr_pipe */ { auto pRet = new ExprYield(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[0].pExpression))); pRet->moveSemantics = true; @@ -8076,41 +8127,41 @@ YYLTYPE yylloc = yyloc_default; } break; - case 297: /* expression_try_catch: "try" expression_block "recover" expression_block */ + case 298: /* expression_try_catch: "try" expression_block "recover" expression_block */ { (yyval.pExpression) = new ExprTryCatch(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 298: /* kwd_let_var_or_nothing: "let" */ + case 299: /* kwd_let_var_or_nothing: "let" */ { (yyval.b) = true; } break; - case 299: /* kwd_let_var_or_nothing: "var" */ + case 300: /* kwd_let_var_or_nothing: "var" */ { (yyval.b) = false; } break; - case 300: /* kwd_let_var_or_nothing: %empty */ + case 301: /* kwd_let_var_or_nothing: %empty */ { (yyval.b) = true; } break; - case 301: /* kwd_let: "let" */ + case 302: /* kwd_let: "let" */ { (yyval.b) = true; } break; - case 302: /* kwd_let: "var" */ + case 303: /* kwd_let: "var" */ { (yyval.b) = false; } break; - case 303: /* optional_in_scope: "inscope" */ + case 304: /* optional_in_scope: "inscope" */ { (yyval.b) = true; } break; - case 304: /* optional_in_scope: %empty */ + case 305: /* optional_in_scope: %empty */ { (yyval.b) = false; } break; - case 305: /* tuple_expansion: "name" */ + case 306: /* tuple_expansion: "name" */ { (yyval.pNameList) = new vector(); (yyval.pNameList)->push_back(*(yyvsp[0].s)); @@ -8118,7 +8169,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 306: /* tuple_expansion: tuple_expansion ',' "name" */ + case 307: /* tuple_expansion: tuple_expansion ',' "name" */ { (yyvsp[-2].pNameList)->push_back(*(yyvsp[0].s)); delete (yyvsp[0].s); @@ -8126,7 +8177,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 307: /* tuple_expansion_variable_declaration: "[[" tuple_expansion ']' ']' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 308: /* tuple_expansion_variable_declaration: "[[" tuple_expansion ']' ']' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-7].pNameList),tokAt(scanner,(yylsp[-7])),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -8135,7 +8186,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 308: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 309: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-6].pNameList),tokAt(scanner,(yylsp[-6])),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -8144,7 +8195,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 309: /* tuple_expansion_variable_declaration: "[[" tuple_expansion ']' ']' optional_ref copy_or_move_or_clone expr "end of expression" */ + case 310: /* tuple_expansion_variable_declaration: "[[" tuple_expansion ']' ']' optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-6])); @@ -8156,7 +8207,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 310: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' optional_ref copy_or_move_or_clone expr "end of expression" */ + case 311: /* tuple_expansion_variable_declaration: '(' tuple_expansion ')' optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-5])); @@ -8168,41 +8219,41 @@ YYLTYPE yylloc = yyloc_default; } break; - case 311: /* expression_let: kwd_let optional_in_scope let_variable_declaration */ + case 312: /* expression_let: kwd_let optional_in_scope let_variable_declaration */ { (yyval.pExpression) = ast_Let(scanner,(yyvsp[-2].b),(yyvsp[-1].b),(yyvsp[0].pVarDecl),tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0]))); } break; - case 312: /* expression_let: kwd_let optional_in_scope tuple_expansion_variable_declaration */ + case 313: /* expression_let: kwd_let optional_in_scope tuple_expansion_variable_declaration */ { (yyval.pExpression) = ast_Let(scanner,(yyvsp[-2].b),(yyvsp[-1].b),(yyvsp[0].pVarDecl),tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0]))); } break; - case 313: /* $@13: %empty */ + case 314: /* $@13: %empty */ { yyextra->das_arrow_depth ++; } break; - case 314: /* $@14: %empty */ + case 315: /* $@14: %empty */ { yyextra->das_arrow_depth --; } break; - case 315: /* expr_cast: "cast" '<' $@13 type_declaration_no_options '>' $@14 expr */ + case 316: /* expr_cast: "cast" '<' $@13 type_declaration_no_options '>' $@14 expr */ { (yyval.pExpression) = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); } break; - case 316: /* $@15: %empty */ + case 317: /* $@15: %empty */ { yyextra->das_arrow_depth ++; } break; - case 317: /* $@16: %empty */ + case 318: /* $@16: %empty */ { yyextra->das_arrow_depth --; } break; - case 318: /* expr_cast: "upcast" '<' $@15 type_declaration_no_options '>' $@16 expr */ + case 319: /* expr_cast: "upcast" '<' $@15 type_declaration_no_options '>' $@16 expr */ { auto pCast = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); pCast->upcast = true; @@ -8210,15 +8261,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 319: /* $@17: %empty */ + case 320: /* $@17: %empty */ { yyextra->das_arrow_depth ++; } break; - case 320: /* $@18: %empty */ + case 321: /* $@18: %empty */ { yyextra->das_arrow_depth --; } break; - case 321: /* expr_cast: "reinterpret" '<' $@17 type_declaration_no_options '>' $@18 expr */ + case 322: /* expr_cast: "reinterpret" '<' $@17 type_declaration_no_options '>' $@18 expr */ { auto pCast = new ExprCast(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[0].pExpression)),TypeDeclPtr((yyvsp[-3].pTypeDecl))); pCast->reinterpret = true; @@ -8226,21 +8277,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 322: /* $@19: %empty */ + case 323: /* $@19: %empty */ { yyextra->das_arrow_depth ++; } break; - case 323: /* $@20: %empty */ + case 324: /* $@20: %empty */ { yyextra->das_arrow_depth --; } break; - case 324: /* expr_type_decl: "type" '<' $@19 type_declaration '>' $@20 */ + case 325: /* expr_type_decl: "type" '<' $@19 type_declaration '>' $@20 */ { (yyval.pExpression) = new ExprTypeDecl(tokAt(scanner,(yylsp[-5])),TypeDeclPtr((yyvsp[-2].pTypeDecl))); } break; - case 325: /* expr_type_info: "typeinfo" '(' name_in_namespace expr ')' */ + case 326: /* expr_type_info: "typeinfo" '(' name_in_namespace expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8253,7 +8304,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 326: /* expr_type_info: "typeinfo" '(' name_in_namespace '<' "name" '>' expr ')' */ + case 327: /* expr_type_info: "typeinfo" '(' name_in_namespace '<' "name" '>' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8267,7 +8318,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 327: /* expr_type_info: "typeinfo" '(' name_in_namespace '<' "name" c_or_s "name" '>' expr ')' */ + case 328: /* expr_type_info: "typeinfo" '(' name_in_namespace '<' "name" c_or_s "name" '>' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8282,7 +8333,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 328: /* expr_type_info: "typeinfo" name_in_namespace '(' expr ')' */ + case 329: /* expr_type_info: "typeinfo" name_in_namespace '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8295,7 +8346,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 329: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" '>' '(' expr ')' */ + case 330: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" '>' '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8309,7 +8360,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 330: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" "end of expression" "name" '>' '(' expr ')' */ + case 331: /* expr_type_info: "typeinfo" name_in_namespace '<' "name" "end of expression" "name" '>' '(' expr ')' */ { if ( (yyvsp[-1].pExpression)->rtti_isTypeDecl() ) { auto ptd = (ExprTypeDecl *)(yyvsp[-1].pExpression); @@ -8324,23 +8375,23 @@ YYLTYPE yylloc = yyloc_default; } break; - case 331: /* expr_list: expr */ + case 332: /* expr_list: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 332: /* expr_list: expr_list ',' expr */ + case 333: /* expr_list: expr_list ',' expr */ { (yyval.pExpression) = new ExprSequence(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 333: /* block_or_simple_block: expression_block */ + case 334: /* block_or_simple_block: expression_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 334: /* block_or_simple_block: "=>" expr */ + case 335: /* block_or_simple_block: "=>" expr */ { auto retE = make_smart(tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[0].pExpression))); auto blkE = new ExprBlock(); @@ -8350,7 +8401,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 335: /* block_or_simple_block: "=>" "<-" expr */ + case 336: /* block_or_simple_block: "=>" "<-" expr */ { auto retE = make_smart(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[0].pExpression))); retE->moveSemantics = true; @@ -8361,35 +8412,39 @@ YYLTYPE yylloc = yyloc_default; } break; - case 336: /* block_or_lambda: '$' */ + case 337: /* block_or_lambda: '$' */ { (yyval.i) = 0; /* block */ } break; - case 337: /* block_or_lambda: '@' */ + case 338: /* block_or_lambda: '@' */ { (yyval.i) = 1; /* lambda */ } break; - case 338: /* block_or_lambda: '@' '@' */ + case 339: /* block_or_lambda: '@' '@' */ { (yyval.i) = 2; /* local function */ } break; - case 339: /* capture_entry: '&' "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_reference); delete (yyvsp[0].s); } + case 340: /* capture_entry: '&' "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_reference); delete (yyvsp[0].s); } break; - case 340: /* capture_entry: '=' "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_copy); delete (yyvsp[0].s); } + case 341: /* capture_entry: '=' "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_copy); delete (yyvsp[0].s); } break; - case 341: /* capture_entry: "<-" "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_move); delete (yyvsp[0].s); } + case 342: /* capture_entry: "<-" "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_move); delete (yyvsp[0].s); } break; - case 342: /* capture_entry: ":=" "name" */ - { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_clone); delete (yyvsp[0].s); } + case 343: /* capture_entry: ":=" "name" */ + { (yyval.pCapt) = new CaptureEntry(*(yyvsp[0].s),CaptureMode::capture_by_clone); delete (yyvsp[0].s); } break; - case 343: /* capture_list: capture_entry */ + case 344: /* capture_entry: "name" '(' "name" ')' */ + { (yyval.pCapt) = ast_makeCaptureEntry(scanner,tokAt(scanner,(yylsp[-3])),*(yyvsp[-3].s),*(yyvsp[-1].s)); delete (yyvsp[-3].s); delete (yyvsp[-1].s); } + break; + + case 345: /* capture_list: capture_entry */ { (yyval.pCaptList) = new vector(); (yyval.pCaptList)->push_back(*(yyvsp[0].pCapt)); @@ -8397,7 +8452,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 344: /* capture_list: capture_list ',' capture_entry */ + case 346: /* capture_list: capture_list ',' capture_entry */ { (yyvsp[-2].pCaptList)->push_back(*(yyvsp[0].pCapt)); delete (yyvsp[0].pCapt); @@ -8405,15 +8460,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 345: /* optional_capture_list: %empty */ + case 347: /* optional_capture_list: %empty */ { (yyval.pCaptList) = nullptr; } break; - case 346: /* optional_capture_list: "[[" capture_list ']' ']' */ + case 348: /* optional_capture_list: "[[" capture_list ']' ']' */ { (yyval.pCaptList) = (yyvsp[-2].pCaptList); } break; - case 347: /* expr_block: expression_block */ + case 349: /* optional_capture_list: "capture" '(' capture_list ')' */ + { (yyval.pCaptList) = (yyvsp[-1].pCaptList); } + break; + + case 350: /* expr_block: expression_block */ { ExprBlock * closure = (ExprBlock *) (yyvsp[0].pExpression); (yyval.pExpression) = new ExprMakeBlock(tokAt(scanner,(yylsp[0])),ExpressionPtr((yyvsp[0].pExpression))); @@ -8421,217 +8480,217 @@ YYLTYPE yylloc = yyloc_default; } break; - case 348: /* expr_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ + case 351: /* expr_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ { (yyval.pExpression) = ast_makeBlock(scanner,(yyvsp[-5].i),(yyvsp[-4].faList),(yyvsp[-3].pCaptList),(yyvsp[-2].pVarDeclList),(yyvsp[-1].pTypeDecl),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[-4]))); } break; - case 349: /* expr_full_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ + case 352: /* expr_full_block: block_or_lambda optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type block_or_simple_block */ { (yyval.pExpression) = ast_makeBlock(scanner,(yyvsp[-5].i),(yyvsp[-4].faList),(yyvsp[-3].pCaptList),(yyvsp[-2].pVarDeclList),(yyvsp[-1].pTypeDecl),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[-4]))); } break; - case 350: /* $@21: %empty */ + case 353: /* $@21: %empty */ { yyextra->das_need_oxford_comma = false; } break; - case 351: /* expr_full_block_assumed_piped: block_or_lambda $@21 optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type expression_block */ + case 354: /* expr_full_block_assumed_piped: block_or_lambda $@21 optional_annotation_list optional_capture_list optional_function_argument_list optional_function_type expression_block */ { (yyval.pExpression) = ast_makeBlock(scanner,(yyvsp[-6].i),(yyvsp[-4].faList),(yyvsp[-3].pCaptList),(yyvsp[-2].pVarDeclList),(yyvsp[-1].pTypeDecl),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[-4]))); } break; - case 352: /* expr_numeric_const: "integer constant" */ + case 355: /* expr_numeric_const: "integer constant" */ { (yyval.pExpression) = new ExprConstInt(tokAt(scanner,(yylsp[0])),(int32_t)(yyvsp[0].i)); } break; - case 353: /* expr_numeric_const: "unsigned integer constant" */ + case 356: /* expr_numeric_const: "unsigned integer constant" */ { (yyval.pExpression) = new ExprConstUInt(tokAt(scanner,(yylsp[0])),(uint32_t)(yyvsp[0].ui)); } break; - case 354: /* expr_numeric_const: "long integer constant" */ + case 357: /* expr_numeric_const: "long integer constant" */ { (yyval.pExpression) = new ExprConstInt64(tokAt(scanner,(yylsp[0])),(int64_t)(yyvsp[0].i64)); } break; - case 355: /* expr_numeric_const: "unsigned long integer constant" */ + case 358: /* expr_numeric_const: "unsigned long integer constant" */ { (yyval.pExpression) = new ExprConstUInt64(tokAt(scanner,(yylsp[0])),(uint64_t)(yyvsp[0].ui64)); } break; - case 356: /* expr_numeric_const: "unsigned int8 constant" */ + case 359: /* expr_numeric_const: "unsigned int8 constant" */ { (yyval.pExpression) = new ExprConstUInt8(tokAt(scanner,(yylsp[0])),(uint8_t)(yyvsp[0].ui)); } break; - case 357: /* expr_numeric_const: "floating point constant" */ + case 360: /* expr_numeric_const: "floating point constant" */ { (yyval.pExpression) = new ExprConstFloat(tokAt(scanner,(yylsp[0])),(float)(yyvsp[0].fd)); } break; - case 358: /* expr_numeric_const: "double constant" */ + case 361: /* expr_numeric_const: "double constant" */ { (yyval.pExpression) = new ExprConstDouble(tokAt(scanner,(yylsp[0])),(double)(yyvsp[0].d)); } break; - case 359: /* expr_assign: expr */ + case 362: /* expr_assign: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 360: /* expr_assign: expr '=' expr */ + case 363: /* expr_assign: expr '=' expr */ { (yyval.pExpression) = new ExprCopy(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 361: /* expr_assign: expr "<-" expr */ + case 364: /* expr_assign: expr "<-" expr */ { (yyval.pExpression) = new ExprMove(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 362: /* expr_assign: expr ":=" expr */ + case 365: /* expr_assign: expr ":=" expr */ { (yyval.pExpression) = new ExprClone(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 363: /* expr_assign: expr "&=" expr */ + case 366: /* expr_assign: expr "&=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 364: /* expr_assign: expr "|=" expr */ + case 367: /* expr_assign: expr "|=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"|=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 365: /* expr_assign: expr "^=" expr */ + case 368: /* expr_assign: expr "^=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 366: /* expr_assign: expr "&&=" expr */ + case 369: /* expr_assign: expr "&&=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 367: /* expr_assign: expr "||=" expr */ + case 370: /* expr_assign: expr "||=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"||=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 368: /* expr_assign: expr "^^=" expr */ + case 371: /* expr_assign: expr "^^=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 369: /* expr_assign: expr "+=" expr */ + case 372: /* expr_assign: expr "+=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"+=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 370: /* expr_assign: expr "-=" expr */ + case 373: /* expr_assign: expr "-=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"-=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 371: /* expr_assign: expr "*=" expr */ + case 374: /* expr_assign: expr "*=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"*=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 372: /* expr_assign: expr "/=" expr */ + case 375: /* expr_assign: expr "/=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"/=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 373: /* expr_assign: expr "%=" expr */ + case 376: /* expr_assign: expr "%=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"%=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 374: /* expr_assign: expr "<<=" expr */ + case 377: /* expr_assign: expr "<<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 375: /* expr_assign: expr ">>=" expr */ + case 378: /* expr_assign: expr ">>=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 376: /* expr_assign: expr "<<<=" expr */ + case 379: /* expr_assign: expr "<<<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 377: /* expr_assign: expr ">>>=" expr */ + case 380: /* expr_assign: expr ">>>=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 378: /* expr_assign_pipe_right: "@ <|" expr_block */ + case 381: /* expr_assign_pipe_right: "@ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 379: /* expr_assign_pipe_right: "@@ <|" expr_block */ + case 382: /* expr_assign_pipe_right: "@@ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 380: /* expr_assign_pipe_right: "$ <|" expr_block */ + case 383: /* expr_assign_pipe_right: "$ <|" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 381: /* expr_assign_pipe_right: expr_call_pipe */ + case 384: /* expr_assign_pipe_right: expr_call_pipe */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 382: /* expr_assign_pipe: expr '=' expr_assign_pipe_right */ + case 385: /* expr_assign_pipe: expr '=' expr_assign_pipe_right */ { (yyval.pExpression) = new ExprCopy(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 383: /* expr_assign_pipe: expr "<-" expr_assign_pipe_right */ + case 386: /* expr_assign_pipe: expr "<-" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprMove(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 384: /* expr_assign_pipe: expr "&=" expr_assign_pipe_right */ + case 387: /* expr_assign_pipe: expr "&=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 385: /* expr_assign_pipe: expr "|=" expr_assign_pipe_right */ + case 388: /* expr_assign_pipe: expr "|=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"|=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 386: /* expr_assign_pipe: expr "^=" expr_assign_pipe_right */ + case 389: /* expr_assign_pipe: expr "^=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 387: /* expr_assign_pipe: expr "&&=" expr_assign_pipe_right */ + case 390: /* expr_assign_pipe: expr "&&=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&&=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 388: /* expr_assign_pipe: expr "||=" expr_assign_pipe_right */ + case 391: /* expr_assign_pipe: expr "||=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"||=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 389: /* expr_assign_pipe: expr "^^=" expr_assign_pipe_right */ + case 392: /* expr_assign_pipe: expr "^^=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^^=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 390: /* expr_assign_pipe: expr "+=" expr_assign_pipe_right */ + case 393: /* expr_assign_pipe: expr "+=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"+=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 391: /* expr_assign_pipe: expr "-=" expr_assign_pipe_right */ + case 394: /* expr_assign_pipe: expr "-=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"-=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 392: /* expr_assign_pipe: expr "*=" expr_assign_pipe_right */ + case 395: /* expr_assign_pipe: expr "*=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"*=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 393: /* expr_assign_pipe: expr "/=" expr_assign_pipe_right */ + case 396: /* expr_assign_pipe: expr "/=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"/=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 394: /* expr_assign_pipe: expr "%=" expr_assign_pipe_right */ + case 397: /* expr_assign_pipe: expr "%=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"%=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 395: /* expr_assign_pipe: expr "<<=" expr_assign_pipe_right */ + case 398: /* expr_assign_pipe: expr "<<=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 396: /* expr_assign_pipe: expr ">>=" expr_assign_pipe_right */ + case 399: /* expr_assign_pipe: expr ">>=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 397: /* expr_assign_pipe: expr "<<<=" expr_assign_pipe_right */ + case 400: /* expr_assign_pipe: expr "<<<=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 398: /* expr_assign_pipe: expr ">>>=" expr_assign_pipe_right */ + case 401: /* expr_assign_pipe: expr ">>>=" expr_assign_pipe_right */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>>=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 399: /* expr_named_call: name_in_namespace '(' '[' make_struct_fields ']' ')' */ + case 402: /* expr_named_call: name_in_namespace '(' '[' make_struct_fields ']' ')' */ { auto nc = new ExprNamedCall(tokAt(scanner,(yylsp[-5])),*(yyvsp[-5].s)); nc->arguments = *(yyvsp[-2].pMakeStruct); @@ -8641,7 +8700,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 400: /* expr_named_call: name_in_namespace '(' expr_list ',' '[' make_struct_fields ']' ')' */ + case 403: /* expr_named_call: name_in_namespace '(' expr_list ',' '[' make_struct_fields ']' ')' */ { auto nc = new ExprNamedCall(tokAt(scanner,(yylsp[-7])),*(yyvsp[-7].s)); nc->nonNamedArguments = sequenceToList((yyvsp[-5].pExpression)); @@ -8652,7 +8711,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 401: /* expr_method_call: expr "->" "name" '(' ')' */ + case 404: /* expr_method_call: expr "->" "name" '(' ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), *(yyvsp[-2].s)); delete (yyvsp[-2].s); @@ -8660,7 +8719,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 402: /* expr_method_call: expr "->" "name" '(' expr_list ')' */ + case 405: /* expr_method_call: expr "->" "name" '(' expr_list ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), *(yyvsp[-3].s)); auto callArgs = sequenceToList((yyvsp[-1].pExpression)); @@ -8670,35 +8729,35 @@ YYLTYPE yylloc = yyloc_default; } break; - case 403: /* func_addr_name: name_in_namespace */ + case 406: /* func_addr_name: name_in_namespace */ { (yyval.pExpression) = new ExprAddr(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 404: /* func_addr_name: "$i" '(' expr ')' */ + case 407: /* func_addr_name: "$i" '(' expr ')' */ { auto expr = new ExprAddr(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``ADDR``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression), expr, "i"); } break; - case 405: /* func_addr_expr: '@' '@' func_addr_name */ + case 408: /* func_addr_expr: '@' '@' func_addr_name */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 406: /* $@22: %empty */ + case 409: /* $@22: %empty */ { yyextra->das_arrow_depth ++; } break; - case 407: /* $@23: %empty */ + case 410: /* $@23: %empty */ { yyextra->das_arrow_depth --; } break; - case 408: /* func_addr_expr: '@' '@' '<' $@22 type_declaration_no_options '>' $@23 func_addr_name */ + case 411: /* func_addr_expr: '@' '@' '<' $@22 type_declaration_no_options '>' $@23 func_addr_name */ { auto expr = (ExprAddr *) ((yyvsp[0].pExpression)->rtti_isAddr() ? (yyvsp[0].pExpression) : (((ExprTag *) (yyvsp[0].pExpression))->value.get())); expr->funcType = TypeDeclPtr((yyvsp[-3].pTypeDecl)); @@ -8706,15 +8765,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 409: /* $@24: %empty */ + case 412: /* $@24: %empty */ { yyextra->das_arrow_depth ++; } break; - case 410: /* $@25: %empty */ + case 413: /* $@25: %empty */ { yyextra->das_arrow_depth --; } break; - case 411: /* func_addr_expr: '@' '@' '<' $@24 optional_function_argument_list optional_function_type '>' $@25 func_addr_name */ + case 414: /* func_addr_expr: '@' '@' '<' $@24 optional_function_argument_list optional_function_type '>' $@25 func_addr_name */ { auto expr = (ExprAddr *) ((yyvsp[0].pExpression)->rtti_isAddr() ? (yyvsp[0].pExpression) : (((ExprTag *) (yyvsp[0].pExpression))->value.get())); expr->funcType = make_smart(Type::tFunction); @@ -8727,21 +8786,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 412: /* expr_field: expr '.' "name" */ + case 415: /* expr_field: expr '.' "name" */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-2].pExpression)), *(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 413: /* expr_field: expr '.' '.' "name" */ + case 416: /* expr_field: expr '.' '.' "name" */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-3].pExpression)), *(yyvsp[0].s), true); delete (yyvsp[0].s); } break; - case 414: /* expr_field: expr '.' "name" '(' ')' */ + case 417: /* expr_field: expr '.' "name" '(' ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), *(yyvsp[-2].s)); delete (yyvsp[-2].s); @@ -8749,7 +8808,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 415: /* expr_field: expr '.' "name" '(' expr_list ')' */ + case 418: /* expr_field: expr '.' "name" '(' expr_list ')' */ { auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), *(yyvsp[-3].s)); auto callArgs = sequenceToList((yyvsp[-1].pExpression)); @@ -8759,29 +8818,47 @@ YYLTYPE yylloc = yyloc_default; } break; - case 416: /* $@26: %empty */ + case 419: /* expr_field: expr '.' basic_type_declaration '(' ')' */ + { + auto method_name = das_to_string((yyvsp[-2].type)); + auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-3])), (yyvsp[-4].pExpression), method_name); + (yyval.pExpression) = pInvoke; + } + break; + + case 420: /* expr_field: expr '.' basic_type_declaration '(' expr_list ')' */ + { + auto method_name = das_to_string((yyvsp[-3].type)); + auto pInvoke = makeInvokeMethod(tokAt(scanner,(yylsp[-4])), (yyvsp[-5].pExpression), method_name); + auto callArgs = sequenceToList((yyvsp[-1].pExpression)); + pInvoke->arguments.insert ( pInvoke->arguments.end(), callArgs.begin(), callArgs.end() ); + (yyval.pExpression) = pInvoke; + } + break; + + case 421: /* $@26: %empty */ { yyextra->das_suppress_errors=true; } break; - case 417: /* $@27: %empty */ + case 422: /* $@27: %empty */ { yyextra->das_suppress_errors=false; } break; - case 418: /* expr_field: expr '.' $@26 error $@27 */ + case 423: /* expr_field: expr '.' $@26 error $@27 */ { (yyval.pExpression) = new ExprField(tokAt(scanner,(yylsp[-3])), tokAt(scanner,(yylsp[-3])), ExpressionPtr((yyvsp[-4].pExpression)), ""); yyerrok; } break; - case 419: /* expr_call: name_in_namespace '(' ')' */ + case 424: /* expr_call: name_in_namespace '(' ')' */ { (yyval.pExpression) = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0])),*(yyvsp[-2].s)); delete (yyvsp[-2].s); } break; - case 420: /* expr_call: name_in_namespace '(' "uninitialized" ')' */ + case 425: /* expr_call: name_in_namespace '(' "uninitialized" ')' */ { auto dd = new ExprMakeStruct(tokAt(scanner,(yylsp[-3]))); dd->at = tokAt(scanner,(yylsp[-3])); @@ -8794,7 +8871,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 421: /* expr_call: name_in_namespace '(' make_struct_single ')' */ + case 426: /* expr_call: name_in_namespace '(' make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-3])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = new TypeDecl(Type::alias); @@ -8806,7 +8883,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 422: /* expr_call: name_in_namespace '(' "uninitialized" make_struct_single ')' */ + case 427: /* expr_call: name_in_namespace '(' "uninitialized" make_struct_single ')' */ { ((ExprMakeStruct *)(yyvsp[-1].pExpression))->at = tokAt(scanner,(yylsp[-4])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = new TypeDecl(Type::alias); @@ -8818,166 +8895,166 @@ YYLTYPE yylloc = yyloc_default; } break; - case 423: /* expr_call: name_in_namespace '(' expr_list ')' */ + case 428: /* expr_call: name_in_namespace '(' expr_list ')' */ { (yyval.pExpression) = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-3])),tokAt(scanner,(yylsp[0])),*(yyvsp[-3].s)),(yyvsp[-1].pExpression)); delete (yyvsp[-3].s); } break; - case 424: /* expr_call: basic_type_declaration '(' ')' */ + case 429: /* expr_call: basic_type_declaration '(' ')' */ { (yyval.pExpression) = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-2])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[-2].type))); } break; - case 425: /* expr_call: basic_type_declaration '(' expr_list ')' */ + case 430: /* expr_call: basic_type_declaration '(' expr_list ')' */ { (yyval.pExpression) = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-3])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[-3].type))),(yyvsp[-1].pExpression)); } break; - case 426: /* expr: "null" */ + case 431: /* expr: "null" */ { (yyval.pExpression) = new ExprConstPtr(tokAt(scanner,(yylsp[0])),nullptr); } break; - case 427: /* expr: name_in_namespace */ + case 432: /* expr: name_in_namespace */ { (yyval.pExpression) = new ExprVar(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 428: /* expr: expr_numeric_const */ + case 433: /* expr: expr_numeric_const */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 429: /* expr: expr_reader */ + case 434: /* expr: expr_reader */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 430: /* expr: string_builder */ + case 435: /* expr: string_builder */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 431: /* expr: make_decl */ + case 436: /* expr: make_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 432: /* expr: "true" */ + case 437: /* expr: "true" */ { (yyval.pExpression) = new ExprConstBool(tokAt(scanner,(yylsp[0])),true); } break; - case 433: /* expr: "false" */ + case 438: /* expr: "false" */ { (yyval.pExpression) = new ExprConstBool(tokAt(scanner,(yylsp[0])),false); } break; - case 434: /* expr: expr_field */ + case 439: /* expr: expr_field */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 435: /* expr: expr_mtag */ + case 440: /* expr: expr_mtag */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 436: /* expr: '!' expr */ + case 441: /* expr: '!' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"!",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 437: /* expr: '~' expr */ + case 442: /* expr: '~' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"~",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 438: /* expr: '+' expr */ + case 443: /* expr: '+' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"+",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 439: /* expr: '-' expr */ + case 444: /* expr: '-' expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"-",ExpressionPtr((yyvsp[0].pExpression))); } break; - case 440: /* expr: expr "<<" expr */ + case 445: /* expr: expr "<<" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 441: /* expr: expr ">>" expr */ + case 446: /* expr: expr ">>" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 442: /* expr: expr "<<<" expr */ + case 447: /* expr: expr "<<<" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<<<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 443: /* expr: expr ">>>" expr */ + case 448: /* expr: expr ">>>" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">>>", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 444: /* expr: expr '+' expr */ + case 449: /* expr: expr '+' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"+", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 445: /* expr: expr '-' expr */ + case 450: /* expr: expr '-' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"-", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 446: /* expr: expr '*' expr */ + case 451: /* expr: expr '*' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"*", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 447: /* expr: expr '/' expr */ + case 452: /* expr: expr '/' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"/", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 448: /* expr: expr '%' expr */ + case 453: /* expr: expr '%' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"%", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 449: /* expr: expr '<' expr */ + case 454: /* expr: expr '<' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 450: /* expr: expr '>' expr */ + case 455: /* expr: expr '>' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 451: /* expr: expr "==" expr */ + case 456: /* expr: expr "==" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"==", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 452: /* expr: expr "!=" expr */ + case 457: /* expr: expr "!=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"!=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 453: /* expr: expr "<=" expr */ + case 458: /* expr: expr "<=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"<=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 454: /* expr: expr ">=" expr */ + case 459: /* expr: expr ">=" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),">=", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 455: /* expr: expr '&' expr */ + case 460: /* expr: expr '&' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 456: /* expr: expr '|' expr */ + case 461: /* expr: expr '|' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"|", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 457: /* expr: expr '^' expr */ + case 462: /* expr: expr '^' expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 458: /* expr: expr "&&" expr */ + case 463: /* expr: expr "&&" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"&&", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 459: /* expr: expr "||" expr */ + case 464: /* expr: expr "||" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"||", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 460: /* expr: expr "^^" expr */ + case 465: /* expr: expr "^^" expr */ { (yyval.pExpression) = new ExprOp2(tokAt(scanner,(yylsp[-1])),"^^", ExpressionPtr((yyvsp[-2].pExpression)), ExpressionPtr((yyvsp[0].pExpression))); } break; - case 461: /* expr: expr ".." expr */ + case 466: /* expr: expr ".." expr */ { auto itv = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-1])),"interval"); itv->arguments.push_back(ExpressionPtr((yyvsp[-2].pExpression))); @@ -8986,23 +9063,23 @@ YYLTYPE yylloc = yyloc_default; } break; - case 462: /* expr: "++" expr */ + case 467: /* expr: "++" expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"++", ExpressionPtr((yyvsp[0].pExpression))); } break; - case 463: /* expr: "--" expr */ + case 468: /* expr: "--" expr */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[-1])),"--", ExpressionPtr((yyvsp[0].pExpression))); } break; - case 464: /* expr: expr "++" */ + case 469: /* expr: expr "++" */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[0])),"+++", ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 465: /* expr: expr "--" */ + case 470: /* expr: expr "--" */ { (yyval.pExpression) = new ExprOp1(tokAt(scanner,(yylsp[0])),"---", ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 466: /* expr: '(' expr_list optional_comma ')' */ + case 471: /* expr: '(' expr_list optional_comma ')' */ { if ( (yyvsp[-2].pExpression)->rtti_isSequence() ) { auto mkt = new ExprMakeTuple(tokAt(scanner,(yylsp[-2]))); @@ -9018,87 +9095,87 @@ YYLTYPE yylloc = yyloc_default; } break; - case 467: /* expr: expr '[' expr ']' */ + case 472: /* expr: expr '[' expr ']' */ { (yyval.pExpression) = new ExprAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 468: /* expr: expr '.' '[' expr ']' */ + case 473: /* expr: expr '.' '[' expr ']' */ { (yyval.pExpression) = new ExprAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-4].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)), true); } break; - case 469: /* expr: expr "?[" expr ']' */ + case 474: /* expr: expr "?[" expr ']' */ { (yyval.pExpression) = new ExprSafeAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-3].pExpression)), ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 470: /* expr: expr '.' "?[" expr ']' */ + case 475: /* expr: expr '.' "?[" expr ']' */ { (yyval.pExpression) = new ExprSafeAt(tokAt(scanner,(yylsp[-2])), ExpressionPtr((yyvsp[-4].pExpression)), ExpressionPtr((yyvsp[-1].pExpression)), true); } break; - case 471: /* expr: expr "?." "name" */ + case 476: /* expr: expr "?." "name" */ { (yyval.pExpression) = new ExprSafeField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-2].pExpression)), *(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 472: /* expr: expr '.' "?." "name" */ + case 477: /* expr: expr '.' "?." "name" */ { (yyval.pExpression) = new ExprSafeField(tokAt(scanner,(yylsp[-1])), tokAt(scanner,(yylsp[0])), ExpressionPtr((yyvsp[-3].pExpression)), *(yyvsp[0].s), true); delete (yyvsp[0].s); } break; - case 473: /* expr: func_addr_expr */ + case 478: /* expr: func_addr_expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 474: /* expr: expr_call */ + case 479: /* expr: expr_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 475: /* expr: '*' expr */ + case 480: /* expr: '*' expr */ { (yyval.pExpression) = new ExprPtr2Ref(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 476: /* expr: "deref" '(' expr ')' */ + case 481: /* expr: "deref" '(' expr ')' */ { (yyval.pExpression) = new ExprPtr2Ref(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 477: /* expr: "addr" '(' expr ')' */ + case 482: /* expr: "addr" '(' expr ')' */ { (yyval.pExpression) = new ExprRef2Ptr(tokAt(scanner,(yylsp[-3])),ExpressionPtr((yyvsp[-1].pExpression))); } break; - case 478: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' ')' */ + case 483: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' ')' */ { (yyval.pExpression) = ast_makeGenerator(scanner,(yyvsp[-4].pTypeDecl),(yyvsp[-2].pCaptList),nullptr,tokAt(scanner,(yylsp[-6]))); } break; - case 479: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' expr ')' */ + case 484: /* expr: "generator" '<' type_declaration_no_options '>' optional_capture_list '(' expr ')' */ { (yyval.pExpression) = ast_makeGenerator(scanner,(yyvsp[-5].pTypeDecl),(yyvsp[-3].pCaptList),(yyvsp[-1].pExpression),tokAt(scanner,(yylsp[-7]))); } break; - case 480: /* expr: expr "??" expr */ + case 485: /* expr: expr "??" expr */ { (yyval.pExpression) = new ExprNullCoalescing(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 481: /* expr: expr '?' expr ':' expr */ + case 486: /* expr: expr '?' expr ':' expr */ { (yyval.pExpression) = new ExprOp3(tokAt(scanner,(yylsp[-3])),"?",ExpressionPtr((yyvsp[-4].pExpression)),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 482: /* $@28: %empty */ + case 487: /* $@28: %empty */ { yyextra->das_arrow_depth ++; } break; - case 483: /* $@29: %empty */ + case 488: /* $@29: %empty */ { yyextra->das_arrow_depth --; } break; - case 484: /* expr: expr "is" "type" '<' $@28 type_declaration_no_options '>' $@29 */ + case 489: /* expr: expr "is" "type" '<' $@28 type_declaration_no_options '>' $@29 */ { (yyval.pExpression) = new ExprIs(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-7].pExpression)),TypeDeclPtr((yyvsp[-2].pTypeDecl))); } break; - case 485: /* expr: expr "is" basic_type_declaration */ + case 490: /* expr: expr "is" basic_type_declaration */ { auto vdecl = new TypeDecl((yyvsp[0].type)); vdecl->at = tokAt(scanner,(yylsp[0])); @@ -9106,29 +9183,29 @@ YYLTYPE yylloc = yyloc_default; } break; - case 486: /* expr: expr "is" "name" */ + case 491: /* expr: expr "is" "name" */ { (yyval.pExpression) = new ExprIsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 487: /* expr: expr "as" "name" */ + case 492: /* expr: expr "as" "name" */ { (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 488: /* $@30: %empty */ + case 493: /* $@30: %empty */ { yyextra->das_arrow_depth ++; } break; - case 489: /* $@31: %empty */ + case 494: /* $@31: %empty */ { yyextra->das_arrow_depth --; } break; - case 490: /* expr: expr "as" "type" '<' $@30 type_declaration '>' $@31 */ + case 495: /* expr: expr "as" "type" '<' $@30 type_declaration '>' $@31 */ { auto vname = (yyvsp[-2].pTypeDecl)->describe(); (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-7].pExpression)),vname); @@ -9136,28 +9213,28 @@ YYLTYPE yylloc = yyloc_default; } break; - case 491: /* expr: expr "as" basic_type_declaration */ + case 496: /* expr: expr "as" basic_type_declaration */ { (yyval.pExpression) = new ExprAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-2].pExpression)),das_to_string((yyvsp[0].type))); } break; - case 492: /* expr: expr '?' "as" "name" */ + case 497: /* expr: expr '?' "as" "name" */ { (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-3].pExpression)),*(yyvsp[0].s)); delete (yyvsp[0].s); } break; - case 493: /* $@32: %empty */ + case 498: /* $@32: %empty */ { yyextra->das_arrow_depth ++; } break; - case 494: /* $@33: %empty */ + case 499: /* $@33: %empty */ { yyextra->das_arrow_depth --; } break; - case 495: /* expr: expr '?' "as" "type" '<' $@32 type_declaration '>' $@33 */ + case 500: /* expr: expr '?' "as" "type" '<' $@32 type_declaration '>' $@33 */ { auto vname = (yyvsp[-2].pTypeDecl)->describe(); (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-6])),ExpressionPtr((yyvsp[-8].pExpression)),vname); @@ -9165,60 +9242,60 @@ YYLTYPE yylloc = yyloc_default; } break; - case 496: /* expr: expr '?' "as" basic_type_declaration */ + case 501: /* expr: expr '?' "as" basic_type_declaration */ { (yyval.pExpression) = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-3].pExpression)),das_to_string((yyvsp[0].type))); } break; - case 497: /* expr: expr_type_info */ + case 502: /* expr: expr_type_info */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 498: /* expr: expr_type_decl */ + case 503: /* expr: expr_type_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 499: /* expr: expr_cast */ + case 504: /* expr: expr_cast */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 500: /* expr: expr_new */ + case 505: /* expr: expr_new */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 501: /* expr: expr_method_call */ + case 506: /* expr: expr_method_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 502: /* expr: expr_named_call */ + case 507: /* expr: expr_named_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 503: /* expr: expr_full_block */ + case 508: /* expr: expr_full_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 504: /* expr: expr "<|" expr */ + case 509: /* expr: expr "<|" expr */ { (yyval.pExpression) = ast_lpipe(scanner,(yyvsp[-2].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-1]))); } break; - case 505: /* expr: expr "|>" expr */ + case 510: /* expr: expr "|>" expr */ { (yyval.pExpression) = ast_rpipe(scanner,(yyvsp[-2].pExpression),(yyvsp[0].pExpression),tokAt(scanner,(yylsp[-1]))); } break; - case 506: /* expr: expr "|>" basic_type_declaration */ + case 511: /* expr: expr "|>" basic_type_declaration */ { auto fncall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[0])),tokAt(scanner,(yylsp[0])),das_to_string((yyvsp[0].type))); (yyval.pExpression) = ast_rpipe(scanner,(yyvsp[-2].pExpression),fncall,tokAt(scanner,(yylsp[-1]))); } break; - case 507: /* expr: name_in_namespace "name" */ + case 512: /* expr: name_in_namespace "name" */ { (yyval.pExpression) = ast_NameName(scanner,(yyvsp[-1].s),(yyvsp[0].s),tokAt(scanner,(yylsp[-1])),tokAt(scanner,(yylsp[0]))); } break; - case 508: /* expr: "unsafe" '(' expr ')' */ + case 513: /* expr: "unsafe" '(' expr ')' */ { (yyvsp[-1].pExpression)->alwaysSafe = true; (yyvsp[-1].pExpression)->userSaidItsSafe = true; @@ -9226,157 +9303,157 @@ YYLTYPE yylloc = yyloc_default; } break; - case 509: /* expr: expression_keyword */ + case 514: /* expr: expression_keyword */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 510: /* expr_mtag: "$$" '(' expr ')' */ + case 515: /* expr_mtag: "$$" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"e"); } break; - case 511: /* expr_mtag: "$i" '(' expr ')' */ + case 516: /* expr_mtag: "$i" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"i"); } break; - case 512: /* expr_mtag: "$v" '(' expr ')' */ + case 517: /* expr_mtag: "$v" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"v"); } break; - case 513: /* expr_mtag: "$b" '(' expr ')' */ + case 518: /* expr_mtag: "$b" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"b"); } break; - case 514: /* expr_mtag: "$a" '(' expr ')' */ + case 519: /* expr_mtag: "$a" '(' expr ')' */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),"a"); } break; - case 515: /* expr_mtag: "..." */ + case 520: /* expr_mtag: "..." */ { (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[0])),nullptr,"..."); } break; - case 516: /* expr_mtag: "$c" '(' expr ')' '(' ')' */ + case 521: /* expr_mtag: "$c" '(' expr ')' '(' ')' */ { auto ccall = yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-5])),tokAt(scanner,(yylsp[0])),"``MACRO``TAG``CALL``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-5])),(yyvsp[-3].pExpression),ccall,"c"); } break; - case 517: /* expr_mtag: "$c" '(' expr ')' '(' expr_list ')' */ + case 522: /* expr_mtag: "$c" '(' expr ')' '(' expr_list ')' */ { auto ccall = parseFunctionArguments(yyextra->g_Program->makeCall(tokAt(scanner,(yylsp[-6])),tokAt(scanner,(yylsp[0])),"``MACRO``TAG``CALL``"),(yyvsp[-1].pExpression)); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-6])),(yyvsp[-4].pExpression),ccall,"c"); } break; - case 518: /* expr_mtag: expr '.' "$f" '(' expr ')' */ + case 523: /* expr_mtag: expr '.' "$f" '(' expr ')' */ { auto cfield = new ExprField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-5].pExpression)), "``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 519: /* expr_mtag: expr "?." "$f" '(' expr ')' */ + case 524: /* expr_mtag: expr "?." "$f" '(' expr ')' */ { auto cfield = new ExprSafeField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-5].pExpression)), "``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 520: /* expr_mtag: expr '.' '.' "$f" '(' expr ')' */ + case 525: /* expr_mtag: expr '.' '.' "$f" '(' expr ')' */ { auto cfield = new ExprField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-6].pExpression)), "``MACRO``TAG``FIELD``", true); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 521: /* expr_mtag: expr '.' "?." "$f" '(' expr ')' */ + case 526: /* expr_mtag: expr '.' "?." "$f" '(' expr ')' */ { auto cfield = new ExprSafeField(tokAt(scanner,(yylsp[-4])), tokAt(scanner,(yylsp[-1])), ExpressionPtr((yyvsp[-6].pExpression)), "``MACRO``TAG``FIELD``", true); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 522: /* expr_mtag: expr "as" "$f" '(' expr ')' */ + case 527: /* expr_mtag: expr "as" "$f" '(' expr ')' */ { auto cfield = new ExprAsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-5].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 523: /* expr_mtag: expr '?' "as" "$f" '(' expr ')' */ + case 528: /* expr_mtag: expr '?' "as" "$f" '(' expr ')' */ { auto cfield = new ExprSafeAsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-6].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 524: /* expr_mtag: expr "is" "$f" '(' expr ')' */ + case 529: /* expr_mtag: expr "is" "$f" '(' expr ')' */ { auto cfield = new ExprIsVariant(tokAt(scanner,(yylsp[-4])),ExpressionPtr((yyvsp[-5].pExpression)),"``MACRO``TAG``FIELD``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression),cfield,"f"); } break; - case 525: /* expr_mtag: '@' '@' "$c" '(' expr ')' */ + case 530: /* expr_mtag: '@' '@' "$c" '(' expr ')' */ { auto ccall = new ExprAddr(tokAt(scanner,(yylsp[-4])),"``MACRO``TAG``ADDR``"); (yyval.pExpression) = new ExprTag(tokAt(scanner,(yylsp[-3])),(yyvsp[-1].pExpression),ccall,"c"); } break; - case 526: /* optional_field_annotation: %empty */ + case 531: /* optional_field_annotation: %empty */ { (yyval.aaList) = nullptr; } break; - case 527: /* optional_field_annotation: "[[" annotation_argument_list ']' ']' */ + case 532: /* optional_field_annotation: "[[" annotation_argument_list ']' ']' */ { (yyval.aaList) = (yyvsp[-2].aaList); /*this one is gone when BRABRA is disabled*/ } break; - case 528: /* optional_field_annotation: metadata_argument_list */ + case 533: /* optional_field_annotation: metadata_argument_list */ { (yyval.aaList) = (yyvsp[0].aaList); } break; - case 529: /* optional_override: %empty */ + case 534: /* optional_override: %empty */ { (yyval.i) = OVERRIDE_NONE; } break; - case 530: /* optional_override: "override" */ + case 535: /* optional_override: "override" */ { (yyval.i) = OVERRIDE_OVERRIDE; } break; - case 531: /* optional_override: "sealed" */ + case 536: /* optional_override: "sealed" */ { (yyval.i) = OVERRIDE_SEALED; } break; - case 532: /* optional_constant: %empty */ + case 537: /* optional_constant: %empty */ { (yyval.b) = false; } break; - case 533: /* optional_constant: "const" */ + case 538: /* optional_constant: "const" */ { (yyval.b) = true; } break; - case 534: /* optional_public_or_private_member_variable: %empty */ + case 539: /* optional_public_or_private_member_variable: %empty */ { (yyval.b) = false; } break; - case 535: /* optional_public_or_private_member_variable: "public" */ + case 540: /* optional_public_or_private_member_variable: "public" */ { (yyval.b) = false; } break; - case 536: /* optional_public_or_private_member_variable: "private" */ + case 541: /* optional_public_or_private_member_variable: "private" */ { (yyval.b) = true; } break; - case 537: /* optional_static_member_variable: %empty */ + case 542: /* optional_static_member_variable: %empty */ { (yyval.b) = false; } break; - case 538: /* optional_static_member_variable: "static" */ + case 543: /* optional_static_member_variable: "static" */ { (yyval.b) = true; } break; - case 539: /* structure_variable_declaration: optional_field_annotation optional_static_member_variable optional_override optional_public_or_private_member_variable variable_declaration */ + case 544: /* structure_variable_declaration: optional_field_annotation optional_static_member_variable optional_override optional_public_or_private_member_variable variable_declaration */ { (yyvsp[0].pVarDecl)->override = (yyvsp[-2].i) == OVERRIDE_OVERRIDE; (yyvsp[0].pVarDecl)->sealed = (yyvsp[-2].i) == OVERRIDE_SEALED; @@ -9387,13 +9464,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 540: /* struct_variable_declaration_list: %empty */ + case 545: /* struct_variable_declaration_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 541: /* $@34: %empty */ + case 546: /* $@34: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9402,7 +9479,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 542: /* struct_variable_declaration_list: struct_variable_declaration_list $@34 structure_variable_declaration "end of expression" */ + case 547: /* struct_variable_declaration_list: struct_variable_declaration_list $@34 structure_variable_declaration "end of expression" */ { (yyval.pVarDeclList) = (yyvsp[-3].pVarDeclList); if ( (yyvsp[-1].pVarDecl) ) (yyvsp[-3].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); @@ -9418,7 +9495,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 543: /* $@35: %empty */ + case 548: /* $@35: %empty */ { yyextra->das_force_oxford_comma=true; if ( !yyextra->g_CommentReaders.empty() ) { @@ -9428,7 +9505,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 544: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable "abstract" optional_constant $@35 function_declaration_header "end of expression" */ + case 549: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable "abstract" optional_constant $@35 function_declaration_header "end of expression" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -9438,7 +9515,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 545: /* $@36: %empty */ + case 550: /* $@36: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9447,7 +9524,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 546: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable optional_static_member_variable optional_override optional_constant $@36 function_declaration_header expression_block */ + case 551: /* struct_variable_declaration_list: struct_variable_declaration_list optional_annotation_list "def" optional_public_or_private_member_variable optional_static_member_variable optional_override optional_constant $@36 function_declaration_header expression_block */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9457,7 +9534,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 547: /* struct_variable_declaration_list: struct_variable_declaration_list '[' annotation_list ']' "end of expression" */ + case 552: /* struct_variable_declaration_list: struct_variable_declaration_list '[' annotation_list ']' "end of expression" */ { das_yyerror(scanner,"structure field or class method annotation expected to remain on the same line with the field or the class", tokAt(scanner,(yylsp[-2])), CompilationError::syntax_error); @@ -9466,7 +9543,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 548: /* function_argument_declaration: optional_field_annotation kwd_let_var_or_nothing variable_declaration */ + case 553: /* function_argument_declaration: optional_field_annotation kwd_let_var_or_nothing variable_declaration */ { (yyval.pVarDecl) = (yyvsp[0].pVarDecl); if ( (yyvsp[-1].b) ) { @@ -9478,7 +9555,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 549: /* function_argument_declaration: "$a" '(' expr ')' */ + case 554: /* function_argument_declaration: "$a" '(' expr ')' */ { auto na = new vector(); na->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1]))}); @@ -9488,21 +9565,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 550: /* function_argument_list: function_argument_declaration */ + case 555: /* function_argument_list: function_argument_declaration */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 551: /* function_argument_list: function_argument_list "end of expression" function_argument_declaration */ + case 556: /* function_argument_list: function_argument_list "end of expression" function_argument_declaration */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 552: /* tuple_type: type_declaration */ + case 557: /* tuple_type: type_declaration */ { (yyval.pVarDecl) = new VariableDeclaration(nullptr,(yyvsp[0].pTypeDecl),nullptr); } break; - case 553: /* tuple_type: "name" ':' type_declaration */ + case 558: /* tuple_type: "name" ':' type_declaration */ { auto na = new vector(); na->push_back(VariableNameAndPosition{*(yyvsp[-2].s),"",tokAt(scanner,(yylsp[-2]))}); @@ -9511,27 +9588,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 554: /* tuple_type_list: tuple_type */ + case 559: /* tuple_type_list: tuple_type */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 555: /* tuple_type_list: tuple_type_list c_or_s tuple_type */ + case 560: /* tuple_type_list: tuple_type_list c_or_s tuple_type */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 556: /* tuple_alias_type_list: %empty */ + case 561: /* tuple_alias_type_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 557: /* tuple_alias_type_list: tuple_alias_type_list c_or_s */ + case 562: /* tuple_alias_type_list: tuple_alias_type_list c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 558: /* tuple_alias_type_list: tuple_alias_type_list tuple_type c_or_s */ + case 563: /* tuple_alias_type_list: tuple_alias_type_list tuple_type c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); /* @@ -9547,7 +9624,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 559: /* variant_type: "name" ':' type_declaration */ + case 564: /* variant_type: "name" ':' type_declaration */ { auto na = new vector(); na->push_back(VariableNameAndPosition{*(yyvsp[-2].s),"",tokAt(scanner,(yylsp[-2]))}); @@ -9556,27 +9633,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 560: /* variant_type_list: variant_type */ + case 565: /* variant_type_list: variant_type */ { (yyval.pVarDeclList) = new vector(); (yyval.pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 561: /* variant_type_list: variant_type_list c_or_s variant_type */ + case 566: /* variant_type_list: variant_type_list c_or_s variant_type */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[0].pVarDecl)); } break; - case 562: /* variant_alias_type_list: %empty */ + case 567: /* variant_alias_type_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 563: /* variant_alias_type_list: variant_alias_type_list c_or_s */ + case 568: /* variant_alias_type_list: variant_alias_type_list c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 564: /* variant_alias_type_list: variant_alias_type_list variant_type c_or_s */ + case 569: /* variant_alias_type_list: variant_alias_type_list variant_type c_or_s */ { (yyval.pVarDeclList) = (yyvsp[-2].pVarDeclList); (yyvsp[-2].pVarDeclList)->push_back((yyvsp[-1].pVarDecl)); if ( !yyextra->g_CommentReaders.empty() ) { @@ -9590,15 +9667,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 565: /* copy_or_move: '=' */ + case 570: /* copy_or_move: '=' */ { (yyval.b) = false; } break; - case 566: /* copy_or_move: "<-" */ + case 571: /* copy_or_move: "<-" */ { (yyval.b) = true; } break; - case 567: /* variable_declaration: variable_name_with_pos_list */ + case 572: /* variable_declaration: variable_name_with_pos_list */ { auto autoT = new TypeDecl(Type::autoinfer); autoT->at = tokAt(scanner,(yylsp[0])); @@ -9607,7 +9684,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 568: /* variable_declaration: variable_name_with_pos_list '&' */ + case 573: /* variable_declaration: variable_name_with_pos_list '&' */ { auto autoT = new TypeDecl(Type::autoinfer); autoT->at = tokAt(scanner,(yylsp[-1])); @@ -9616,20 +9693,20 @@ YYLTYPE yylloc = yyloc_default; } break; - case 569: /* variable_declaration: variable_name_with_pos_list ':' type_declaration */ + case 574: /* variable_declaration: variable_name_with_pos_list ':' type_declaration */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-2].pNameWithPosList),(yyvsp[0].pTypeDecl),nullptr); } break; - case 570: /* variable_declaration: variable_name_with_pos_list ':' type_declaration copy_or_move expr */ + case 575: /* variable_declaration: variable_name_with_pos_list ':' type_declaration copy_or_move expr */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-4].pNameWithPosList),(yyvsp[-2].pTypeDecl),(yyvsp[0].pExpression)); (yyval.pVarDecl)->init_via_move = (yyvsp[-1].b); } break; - case 571: /* variable_declaration: variable_name_with_pos_list copy_or_move expr */ + case 576: /* variable_declaration: variable_name_with_pos_list copy_or_move expr */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-2])); @@ -9638,7 +9715,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 572: /* variable_declaration: variable_name_with_pos_list copy_or_move expr_pipe */ + case 577: /* variable_declaration: variable_name_with_pos_list copy_or_move expr_pipe */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-2])); @@ -9647,27 +9724,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 573: /* copy_or_move_or_clone: '=' */ + case 578: /* copy_or_move_or_clone: '=' */ { (yyval.i) = CorM_COPY; } break; - case 574: /* copy_or_move_or_clone: "<-" */ + case 579: /* copy_or_move_or_clone: "<-" */ { (yyval.i) = CorM_MOVE; } break; - case 575: /* copy_or_move_or_clone: ":=" */ + case 580: /* copy_or_move_or_clone: ":=" */ { (yyval.i) = CorM_CLONE; } break; - case 576: /* optional_ref: %empty */ + case 581: /* optional_ref: %empty */ { (yyval.b) = false; } break; - case 577: /* optional_ref: '&' */ + case 582: /* optional_ref: '&' */ { (yyval.b) = true; } break; - case 578: /* let_variable_name_with_pos_list: "name" */ + case 583: /* let_variable_name_with_pos_list: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -9677,7 +9754,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 579: /* let_variable_name_with_pos_list: "$i" '(' expr ')' */ + case 584: /* let_variable_name_with_pos_list: "$i" '(' expr ')' */ { auto pSL = new vector(); pSL->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1])),ExpressionPtr((yyvsp[-1].pExpression))}); @@ -9685,7 +9762,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 580: /* let_variable_name_with_pos_list: "name" "aka" "name" */ + case 585: /* let_variable_name_with_pos_list: "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -9697,7 +9774,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 581: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" */ + case 586: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameWithPosList)->push_back(VariableNameAndPosition{*(yyvsp[0].s),"",tokAt(scanner,(yylsp[0]))}); @@ -9706,7 +9783,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 582: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" "aka" "name" */ + case 587: /* let_variable_name_with_pos_list: let_variable_name_with_pos_list ',' "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -9717,13 +9794,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 583: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ + case 588: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-3].pNameWithPosList),(yyvsp[-1].pTypeDecl),nullptr); } break; - case 584: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ + case 589: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr "end of expression" */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-5].pNameWithPosList),(yyvsp[-3].pTypeDecl),(yyvsp[-1].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-2].i) & CorM_MOVE) !=0; @@ -9731,7 +9808,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 585: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr_pipe */ + case 590: /* let_variable_declaration: let_variable_name_with_pos_list ':' type_declaration_no_options copy_or_move_or_clone expr_pipe */ { (yyval.pVarDecl) = new VariableDeclaration((yyvsp[-4].pNameWithPosList),(yyvsp[-2].pTypeDecl),(yyvsp[0].pExpression)); (yyval.pVarDecl)->init_via_move = ((yyvsp[-1].i) & CorM_MOVE) !=0; @@ -9739,7 +9816,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 586: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ + case 591: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr "end of expression" */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-4])); @@ -9750,7 +9827,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 587: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr_pipe */ + case 592: /* let_variable_declaration: let_variable_name_with_pos_list optional_ref copy_or_move_or_clone expr_pipe */ { auto typeDecl = new TypeDecl(Type::autoinfer); typeDecl->at = tokAt(scanner,(yylsp[-3])); @@ -9761,13 +9838,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 588: /* global_variable_declaration_list: %empty */ + case 593: /* global_variable_declaration_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 589: /* $@37: %empty */ + case 594: /* $@37: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9776,7 +9853,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 590: /* global_variable_declaration_list: global_variable_declaration_list $@37 optional_field_annotation let_variable_declaration */ + case 595: /* global_variable_declaration_list: global_variable_declaration_list $@37 optional_field_annotation let_variable_declaration */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9791,33 +9868,33 @@ YYLTYPE yylloc = yyloc_default; } break; - case 591: /* optional_shared: %empty */ + case 596: /* optional_shared: %empty */ { (yyval.b) = false; } break; - case 592: /* optional_shared: "shared" */ + case 597: /* optional_shared: "shared" */ { (yyval.b) = true; } break; - case 593: /* optional_public_or_private_variable: %empty */ + case 598: /* optional_public_or_private_variable: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 594: /* optional_public_or_private_variable: "private" */ + case 599: /* optional_public_or_private_variable: "private" */ { (yyval.b) = false; } break; - case 595: /* optional_public_or_private_variable: "public" */ + case 600: /* optional_public_or_private_variable: "public" */ { (yyval.b) = true; } break; - case 596: /* global_let: kwd_let optional_shared optional_public_or_private_variable "begin of code block" global_variable_declaration_list "end of code block" */ + case 601: /* global_let: kwd_let optional_shared optional_public_or_private_variable "begin of code block" global_variable_declaration_list "end of code block" */ { ast_globalLetList(scanner,(yyvsp[-5].b),(yyvsp[-4].b),(yyvsp[-3].b),(yyvsp[-1].pVarDeclList)); } break; - case 597: /* $@38: %empty */ + case 602: /* $@38: %empty */ { yyextra->das_force_oxford_comma=true; if ( !yyextra->g_CommentReaders.empty() ) { @@ -9827,7 +9904,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 598: /* global_let: kwd_let optional_shared optional_public_or_private_variable $@38 optional_field_annotation let_variable_declaration */ + case 603: /* global_let: kwd_let optional_shared optional_public_or_private_variable $@38 optional_field_annotation let_variable_declaration */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9840,19 +9917,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 599: /* enum_list: %empty */ + case 604: /* enum_list: %empty */ { (yyval.pEnum) = new Enumeration(); } break; - case 600: /* enum_list: enum_list "end of expression" */ + case 605: /* enum_list: enum_list "end of expression" */ { (yyval.pEnum) = (yyvsp[-1].pEnum); } break; - case 601: /* enum_list: enum_list "name" "end of expression" */ + case 606: /* enum_list: enum_list "name" "end of expression" */ { das_checkName(scanner,*(yyvsp[-1].s),tokAt(scanner,(yylsp[-1]))); if ( !(yyvsp[-2].pEnum)->add(*(yyvsp[-1].s),nullptr,tokAt(scanner,(yylsp[-1]))) ) { @@ -9870,7 +9947,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 602: /* enum_list: enum_list "name" '=' expr "end of expression" */ + case 607: /* enum_list: enum_list "name" '=' expr "end of expression" */ { das_checkName(scanner,*(yyvsp[-3].s),tokAt(scanner,(yylsp[-3]))); if ( !(yyvsp[-4].pEnum)->add(*(yyvsp[-3].s),ExpressionPtr((yyvsp[-1].pExpression)),tokAt(scanner,(yylsp[-3]))) ) { @@ -9888,19 +9965,19 @@ YYLTYPE yylloc = yyloc_default; } break; - case 603: /* optional_public_or_private_alias: %empty */ + case 608: /* optional_public_or_private_alias: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 604: /* optional_public_or_private_alias: "private" */ + case 609: /* optional_public_or_private_alias: "private" */ { (yyval.b) = false; } break; - case 605: /* optional_public_or_private_alias: "public" */ + case 610: /* optional_public_or_private_alias: "public" */ { (yyval.b) = true; } break; - case 606: /* $@39: %empty */ + case 611: /* $@39: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[0])); @@ -9909,7 +9986,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 607: /* single_alias: optional_public_or_private_alias "name" $@39 '=' type_declaration */ + case 612: /* single_alias: optional_public_or_private_alias "name" $@39 '=' type_declaration */ { das_checkName(scanner,*(yyvsp[-3].s),tokAt(scanner,(yylsp[-3]))); (yyvsp[0].pTypeDecl)->isPrivateAlias = !(yyvsp[-4].b); @@ -9930,23 +10007,23 @@ YYLTYPE yylloc = yyloc_default; } break; - case 611: /* $@40: %empty */ + case 616: /* $@40: %empty */ { yyextra->das_force_oxford_comma=true;} break; - case 613: /* optional_public_or_private_enum: %empty */ + case 618: /* optional_public_or_private_enum: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 614: /* optional_public_or_private_enum: "private" */ + case 619: /* optional_public_or_private_enum: "private" */ { (yyval.b) = false; } break; - case 615: /* optional_public_or_private_enum: "public" */ + case 620: /* optional_public_or_private_enum: "public" */ { (yyval.b) = true; } break; - case 616: /* enum_name: "name" */ + case 621: /* enum_name: "name" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[0])); @@ -9956,7 +10033,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 617: /* $@41: %empty */ + case 622: /* $@41: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -9965,7 +10042,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 618: /* $@42: %empty */ + case 623: /* $@42: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -9974,7 +10051,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 619: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name "begin of code block" $@41 enum_list $@42 "end of code block" */ + case 624: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name "begin of code block" $@41 enum_list $@42 "end of code block" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[-2])); @@ -9984,7 +10061,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 620: /* $@43: %empty */ + case 625: /* $@43: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-3])); @@ -9993,7 +10070,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 621: /* $@44: %empty */ + case 626: /* $@44: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[0])); @@ -10002,7 +10079,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 622: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name ':' enum_basic_type_declaration "begin of code block" $@43 enum_list $@44 "end of code block" */ + case 627: /* enum_declaration: optional_annotation_list "enum" optional_public_or_private_enum enum_name ':' enum_basic_type_declaration "begin of code block" $@43 enum_list $@44 "end of code block" */ { if ( !yyextra->g_CommentReaders.empty() ) { auto pubename = tokAt(scanner,(yylsp[-2])); @@ -10012,61 +10089,61 @@ YYLTYPE yylloc = yyloc_default; } break; - case 623: /* optional_structure_parent: %empty */ + case 628: /* optional_structure_parent: %empty */ { (yyval.s) = nullptr; } break; - case 624: /* optional_structure_parent: ':' name_in_namespace */ + case 629: /* optional_structure_parent: ':' name_in_namespace */ { (yyval.s) = (yyvsp[0].s); } break; - case 625: /* optional_sealed: %empty */ + case 630: /* optional_sealed: %empty */ { (yyval.b) = false; } break; - case 626: /* optional_sealed: "sealed" */ + case 631: /* optional_sealed: "sealed" */ { (yyval.b) = true; } break; - case 627: /* structure_name: optional_sealed "name" optional_structure_parent */ + case 632: /* structure_name: optional_sealed "name" optional_structure_parent */ { (yyval.pStructure) = ast_structureName(scanner,(yyvsp[-2].b),(yyvsp[-1].s),tokAt(scanner,(yylsp[-1])),(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); } break; - case 628: /* class_or_struct: "class" */ + case 633: /* class_or_struct: "class" */ { (yyval.b) = true; } break; - case 629: /* class_or_struct: "struct" */ + case 634: /* class_or_struct: "struct" */ { (yyval.b) = false; } break; - case 630: /* optional_public_or_private_structure: %empty */ + case 635: /* optional_public_or_private_structure: %empty */ { (yyval.b) = yyextra->g_Program->thisModule->isPublic; } break; - case 631: /* optional_public_or_private_structure: "private" */ + case 636: /* optional_public_or_private_structure: "private" */ { (yyval.b) = false; } break; - case 632: /* optional_public_or_private_structure: "public" */ + case 637: /* optional_public_or_private_structure: "public" */ { (yyval.b) = true; } break; - case 633: /* optional_struct_variable_declaration_list: %empty */ + case 638: /* optional_struct_variable_declaration_list: %empty */ { (yyval.pVarDeclList) = new vector(); } break; - case 634: /* optional_struct_variable_declaration_list: "begin of code block" struct_variable_declaration_list "end of code block" */ + case 639: /* optional_struct_variable_declaration_list: "begin of code block" struct_variable_declaration_list "end of code block" */ { (yyval.pVarDeclList) = (yyvsp[-1].pVarDeclList); } break; - case 635: /* $@45: %empty */ + case 640: /* $@45: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(scanner,(yylsp[-1])); @@ -10075,11 +10152,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 636: /* $@46: %empty */ + case 641: /* $@46: %empty */ { if ( (yyvsp[0].pStructure) ) { (yyvsp[0].pStructure)->isClass = (yyvsp[-3].b); (yyvsp[0].pStructure)->privateStructure = !(yyvsp[-2].b); } } break; - case 637: /* structure_declaration: optional_annotation_list class_or_struct optional_public_or_private_structure $@45 structure_name $@46 optional_struct_variable_declaration_list */ + case 642: /* structure_declaration: optional_annotation_list class_or_struct optional_public_or_private_structure $@45 structure_name $@46 optional_struct_variable_declaration_list */ { if ( (yyvsp[-2].pStructure) ) { ast_structureDeclaration ( scanner, (yyvsp[-6].faList), tokAt(scanner,(yylsp[-5])), (yyvsp[-2].pStructure), tokAt(scanner,(yylsp[-2])), (yyvsp[0].pVarDeclList) ); @@ -10093,7 +10170,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 638: /* variable_name_with_pos_list: "name" */ + case 643: /* variable_name_with_pos_list: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -10103,7 +10180,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 639: /* variable_name_with_pos_list: "$i" '(' expr ')' */ + case 644: /* variable_name_with_pos_list: "$i" '(' expr ')' */ { auto pSL = new vector(); pSL->push_back(VariableNameAndPosition{"``MACRO``TAG``","",tokAt(scanner,(yylsp[-1])),(yyvsp[-1].pExpression)}); @@ -10111,7 +10188,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 640: /* variable_name_with_pos_list: "name" "aka" "name" */ + case 645: /* variable_name_with_pos_list: "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -10123,7 +10200,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 641: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" */ + case 646: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameWithPosList)->push_back(VariableNameAndPosition{*(yyvsp[0].s),"",tokAt(scanner,(yylsp[0]))}); @@ -10132,7 +10209,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 642: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" "aka" "name" */ + case 647: /* variable_name_with_pos_list: variable_name_with_pos_list ',' "name" "aka" "name" */ { das_checkName(scanner,*(yyvsp[-2].s),tokAt(scanner,(yylsp[-2]))); das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); @@ -10143,147 +10220,147 @@ YYLTYPE yylloc = yyloc_default; } break; - case 643: /* basic_type_declaration: "bool" */ + case 648: /* basic_type_declaration: "bool" */ { (yyval.type) = Type::tBool; } break; - case 644: /* basic_type_declaration: "string" */ + case 649: /* basic_type_declaration: "string" */ { (yyval.type) = Type::tString; } break; - case 645: /* basic_type_declaration: "int" */ + case 650: /* basic_type_declaration: "int" */ { (yyval.type) = Type::tInt; } break; - case 646: /* basic_type_declaration: "int8" */ + case 651: /* basic_type_declaration: "int8" */ { (yyval.type) = Type::tInt8; } break; - case 647: /* basic_type_declaration: "int16" */ + case 652: /* basic_type_declaration: "int16" */ { (yyval.type) = Type::tInt16; } break; - case 648: /* basic_type_declaration: "int64" */ + case 653: /* basic_type_declaration: "int64" */ { (yyval.type) = Type::tInt64; } break; - case 649: /* basic_type_declaration: "int2" */ + case 654: /* basic_type_declaration: "int2" */ { (yyval.type) = Type::tInt2; } break; - case 650: /* basic_type_declaration: "int3" */ + case 655: /* basic_type_declaration: "int3" */ { (yyval.type) = Type::tInt3; } break; - case 651: /* basic_type_declaration: "int4" */ + case 656: /* basic_type_declaration: "int4" */ { (yyval.type) = Type::tInt4; } break; - case 652: /* basic_type_declaration: "uint" */ + case 657: /* basic_type_declaration: "uint" */ { (yyval.type) = Type::tUInt; } break; - case 653: /* basic_type_declaration: "uint8" */ + case 658: /* basic_type_declaration: "uint8" */ { (yyval.type) = Type::tUInt8; } break; - case 654: /* basic_type_declaration: "uint16" */ + case 659: /* basic_type_declaration: "uint16" */ { (yyval.type) = Type::tUInt16; } break; - case 655: /* basic_type_declaration: "uint64" */ + case 660: /* basic_type_declaration: "uint64" */ { (yyval.type) = Type::tUInt64; } break; - case 656: /* basic_type_declaration: "uint2" */ + case 661: /* basic_type_declaration: "uint2" */ { (yyval.type) = Type::tUInt2; } break; - case 657: /* basic_type_declaration: "uint3" */ + case 662: /* basic_type_declaration: "uint3" */ { (yyval.type) = Type::tUInt3; } break; - case 658: /* basic_type_declaration: "uint4" */ + case 663: /* basic_type_declaration: "uint4" */ { (yyval.type) = Type::tUInt4; } break; - case 659: /* basic_type_declaration: "float" */ + case 664: /* basic_type_declaration: "float" */ { (yyval.type) = Type::tFloat; } break; - case 660: /* basic_type_declaration: "float2" */ + case 665: /* basic_type_declaration: "float2" */ { (yyval.type) = Type::tFloat2; } break; - case 661: /* basic_type_declaration: "float3" */ + case 666: /* basic_type_declaration: "float3" */ { (yyval.type) = Type::tFloat3; } break; - case 662: /* basic_type_declaration: "float4" */ + case 667: /* basic_type_declaration: "float4" */ { (yyval.type) = Type::tFloat4; } break; - case 663: /* basic_type_declaration: "void" */ + case 668: /* basic_type_declaration: "void" */ { (yyval.type) = Type::tVoid; } break; - case 664: /* basic_type_declaration: "range" */ + case 669: /* basic_type_declaration: "range" */ { (yyval.type) = Type::tRange; } break; - case 665: /* basic_type_declaration: "urange" */ + case 670: /* basic_type_declaration: "urange" */ { (yyval.type) = Type::tURange; } break; - case 666: /* basic_type_declaration: "range64" */ + case 671: /* basic_type_declaration: "range64" */ { (yyval.type) = Type::tRange64; } break; - case 667: /* basic_type_declaration: "urange64" */ + case 672: /* basic_type_declaration: "urange64" */ { (yyval.type) = Type::tURange64; } break; - case 668: /* basic_type_declaration: "double" */ + case 673: /* basic_type_declaration: "double" */ { (yyval.type) = Type::tDouble; } break; - case 669: /* basic_type_declaration: "bitfield" */ + case 674: /* basic_type_declaration: "bitfield" */ { (yyval.type) = Type::tBitfield; } break; - case 670: /* enum_basic_type_declaration: "int" */ + case 675: /* enum_basic_type_declaration: "int" */ { (yyval.type) = Type::tInt; } break; - case 671: /* enum_basic_type_declaration: "int8" */ + case 676: /* enum_basic_type_declaration: "int8" */ { (yyval.type) = Type::tInt8; } break; - case 672: /* enum_basic_type_declaration: "int16" */ + case 677: /* enum_basic_type_declaration: "int16" */ { (yyval.type) = Type::tInt16; } break; - case 673: /* enum_basic_type_declaration: "uint" */ + case 678: /* enum_basic_type_declaration: "uint" */ { (yyval.type) = Type::tUInt; } break; - case 674: /* enum_basic_type_declaration: "uint8" */ + case 679: /* enum_basic_type_declaration: "uint8" */ { (yyval.type) = Type::tUInt8; } break; - case 675: /* enum_basic_type_declaration: "uint16" */ + case 680: /* enum_basic_type_declaration: "uint16" */ { (yyval.type) = Type::tUInt16; } break; - case 676: /* enum_basic_type_declaration: "int64" */ + case 681: /* enum_basic_type_declaration: "int64" */ { (yyval.type) = Type::tInt64; } break; - case 677: /* enum_basic_type_declaration: "uint64" */ + case 682: /* enum_basic_type_declaration: "uint64" */ { (yyval.type) = Type::tUInt64; } break; - case 678: /* structure_type_declaration: name_in_namespace */ + case 683: /* structure_type_declaration: name_in_namespace */ { (yyval.pTypeDecl) = yyextra->g_Program->makeTypeDeclaration(tokAt(scanner,(yylsp[0])),*(yyvsp[0].s)); if ( !(yyval.pTypeDecl) ) { @@ -10294,14 +10371,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 679: /* auto_type_declaration: "auto" */ + case 684: /* auto_type_declaration: "auto" */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 680: /* auto_type_declaration: "auto" '(' "name" ')' */ + case 685: /* auto_type_declaration: "auto" '(' "name" ')' */ { das_checkName(scanner,*(yyvsp[-1].s),tokAt(scanner,(yylsp[-1]))); (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); @@ -10311,7 +10388,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 681: /* auto_type_declaration: "$t" '(' expr ')' */ + case 686: /* auto_type_declaration: "$t" '(' expr ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::alias); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-3])); @@ -10323,7 +10400,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 682: /* bitfield_bits: "name" */ + case 687: /* bitfield_bits: "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); auto pSL = new vector(); @@ -10333,7 +10410,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 683: /* bitfield_bits: bitfield_bits "end of expression" "name" */ + case 688: /* bitfield_bits: bitfield_bits "end of expression" "name" */ { das_checkName(scanner,*(yyvsp[0].s),tokAt(scanner,(yylsp[0]))); (yyvsp[-2].pNameList)->push_back(*(yyvsp[0].s)); @@ -10342,7 +10419,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 684: /* bitfield_alias_bits: %empty */ + case 689: /* bitfield_alias_bits: %empty */ { auto pSL = new vector(); (yyval.pNameList) = pSL; @@ -10350,13 +10427,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 685: /* bitfield_alias_bits: bitfield_alias_bits "end of expression" */ + case 690: /* bitfield_alias_bits: bitfield_alias_bits "end of expression" */ { (yyval.pNameList) = (yyvsp[-1].pNameList); } break; - case 686: /* bitfield_alias_bits: bitfield_alias_bits "name" "end of expression" */ + case 691: /* bitfield_alias_bits: bitfield_alias_bits "name" "end of expression" */ { das_checkName(scanner,*(yyvsp[-1].s),tokAt(scanner,(yylsp[-1]))); (yyvsp[-2].pNameList)->push_back(*(yyvsp[-1].s)); @@ -10369,15 +10446,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 687: /* $@47: %empty */ + case 692: /* $@47: %empty */ { yyextra->das_arrow_depth ++; } break; - case 688: /* $@48: %empty */ + case 693: /* $@48: %empty */ { yyextra->das_arrow_depth --; } break; - case 689: /* bitfield_type_declaration: "bitfield" '<' $@47 bitfield_bits '>' $@48 */ + case 694: /* bitfield_type_declaration: "bitfield" '<' $@47 bitfield_bits '>' $@48 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBitfield); (yyval.pTypeDecl)->argNames = *(yyvsp[-2].pNameList); @@ -10390,51 +10467,51 @@ YYLTYPE yylloc = yyloc_default; } break; - case 692: /* table_type_pair: type_declaration */ + case 697: /* table_type_pair: type_declaration */ { (yyval.aTypePair).firstType = (yyvsp[0].pTypeDecl); (yyval.aTypePair).secondType = new TypeDecl(Type::tVoid); } break; - case 693: /* table_type_pair: type_declaration c_or_s type_declaration */ + case 698: /* table_type_pair: type_declaration c_or_s type_declaration */ { (yyval.aTypePair).firstType = (yyvsp[-2].pTypeDecl); (yyval.aTypePair).secondType = (yyvsp[0].pTypeDecl); } break; - case 694: /* dim_list: '[' expr ']' */ + case 699: /* dim_list: '[' expr ']' */ { (yyval.pTypeDecl) = new TypeDecl(Type::autoinfer); appendDimExpr((yyval.pTypeDecl), (yyvsp[-1].pExpression)); } break; - case 695: /* dim_list: dim_list '[' expr ']' */ + case 700: /* dim_list: dim_list '[' expr ']' */ { (yyval.pTypeDecl) = (yyvsp[-3].pTypeDecl); appendDimExpr((yyval.pTypeDecl), (yyvsp[-1].pExpression)); } break; - case 696: /* type_declaration_no_options: basic_type_declaration */ + case 701: /* type_declaration_no_options: basic_type_declaration */ { (yyval.pTypeDecl) = new TypeDecl((yyvsp[0].type)); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 697: /* type_declaration_no_options: auto_type_declaration */ + case 702: /* type_declaration_no_options: auto_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 698: /* type_declaration_no_options: bitfield_type_declaration */ + case 703: /* type_declaration_no_options: bitfield_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 699: /* type_declaration_no_options: structure_type_declaration */ + case 704: /* type_declaration_no_options: structure_type_declaration */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 700: /* type_declaration_no_options: type_declaration_no_options dim_list */ + case 705: /* type_declaration_no_options: type_declaration_no_options dim_list */ { if ( (yyvsp[-1].pTypeDecl)->baseType==Type::typeDecl ) { das_yyerror(scanner,"type declaration can`t be used as array base type",tokAt(scanner,(yylsp[-1])), @@ -10452,7 +10529,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 701: /* type_declaration_no_options: type_declaration_no_options '[' ']' */ + case 706: /* type_declaration_no_options: type_declaration_no_options '[' ']' */ { (yyvsp[-2].pTypeDecl)->dim.push_back(TypeDecl::dimAuto); (yyvsp[-2].pTypeDecl)->dimExpr.push_back(nullptr); @@ -10461,22 +10538,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 702: /* $@49: %empty */ + case 707: /* $@49: %empty */ { yyextra->das_arrow_depth ++; } break; - case 703: /* $@50: %empty */ + case 708: /* $@50: %empty */ { yyextra->das_arrow_depth --; } break; - case 704: /* type_declaration_no_options: "type" '<' $@49 type_declaration '>' $@50 */ + case 709: /* type_declaration_no_options: "type" '<' $@49 type_declaration '>' $@50 */ { (yyvsp[-2].pTypeDecl)->autoToAlias = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 705: /* type_declaration_no_options: "typedecl" '(' expr ')' */ + case 710: /* type_declaration_no_options: "typedecl" '(' expr ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeDecl); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-3]),(yylsp[-1])); @@ -10484,7 +10561,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 706: /* type_declaration_no_options: '$' name_in_namespace '(' optional_expr_list ')' */ + case 711: /* type_declaration_no_options: '$' name_in_namespace '(' optional_expr_list ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeMacro); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-3]), (yylsp[-1])); @@ -10494,11 +10571,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 707: /* $@51: %empty */ + case 712: /* $@51: %empty */ { yyextra->das_arrow_depth ++; } break; - case 708: /* type_declaration_no_options: '$' name_in_namespace '<' $@51 type_declaration_no_options_list '>' '(' optional_expr_list ')' */ + case 713: /* type_declaration_no_options: '$' name_in_namespace '<' $@51 type_declaration_no_options_list '>' '(' optional_expr_list ')' */ { (yyval.pTypeDecl) = new TypeDecl(Type::typeMacro); (yyval.pTypeDecl)->at = tokRangeAt(scanner,(yylsp[-7]), (yylsp[-1])); @@ -10508,21 +10585,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 709: /* type_declaration_no_options: type_declaration_no_options '-' '[' ']' */ + case 714: /* type_declaration_no_options: type_declaration_no_options '-' '[' ']' */ { (yyvsp[-3].pTypeDecl)->removeDim = true; (yyval.pTypeDecl) = (yyvsp[-3].pTypeDecl); } break; - case 710: /* type_declaration_no_options: type_declaration_no_options "explicit" */ + case 715: /* type_declaration_no_options: type_declaration_no_options "explicit" */ { (yyvsp[-1].pTypeDecl)->isExplicit = true; (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); } break; - case 711: /* type_declaration_no_options: type_declaration_no_options "const" */ + case 716: /* type_declaration_no_options: type_declaration_no_options "const" */ { (yyvsp[-1].pTypeDecl)->constant = true; (yyvsp[-1].pTypeDecl)->removeConstant = false; @@ -10530,7 +10607,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 712: /* type_declaration_no_options: type_declaration_no_options '-' "const" */ + case 717: /* type_declaration_no_options: type_declaration_no_options '-' "const" */ { (yyvsp[-2].pTypeDecl)->constant = false; (yyvsp[-2].pTypeDecl)->removeConstant = true; @@ -10538,7 +10615,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 713: /* type_declaration_no_options: type_declaration_no_options '&' */ + case 718: /* type_declaration_no_options: type_declaration_no_options '&' */ { (yyvsp[-1].pTypeDecl)->ref = true; (yyvsp[-1].pTypeDecl)->removeRef = false; @@ -10546,7 +10623,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 714: /* type_declaration_no_options: type_declaration_no_options '-' '&' */ + case 719: /* type_declaration_no_options: type_declaration_no_options '-' '&' */ { (yyvsp[-2].pTypeDecl)->ref = false; (yyvsp[-2].pTypeDecl)->removeRef = true; @@ -10554,21 +10631,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 715: /* type_declaration_no_options: type_declaration_no_options '#' */ + case 720: /* type_declaration_no_options: type_declaration_no_options '#' */ { (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); (yyval.pTypeDecl)->temporary = true; } break; - case 716: /* type_declaration_no_options: type_declaration_no_options "implicit" */ + case 721: /* type_declaration_no_options: type_declaration_no_options "implicit" */ { (yyval.pTypeDecl) = (yyvsp[-1].pTypeDecl); (yyval.pTypeDecl)->implicit = true; } break; - case 717: /* type_declaration_no_options: type_declaration_no_options '-' '#' */ + case 722: /* type_declaration_no_options: type_declaration_no_options '-' '#' */ { (yyvsp[-2].pTypeDecl)->temporary = false; (yyvsp[-2].pTypeDecl)->removeTemporary = true; @@ -10576,21 +10653,21 @@ YYLTYPE yylloc = yyloc_default; } break; - case 718: /* type_declaration_no_options: type_declaration_no_options "==" "const" */ + case 723: /* type_declaration_no_options: type_declaration_no_options "==" "const" */ { (yyvsp[-2].pTypeDecl)->explicitConst = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 719: /* type_declaration_no_options: type_declaration_no_options "==" '&' */ + case 724: /* type_declaration_no_options: type_declaration_no_options "==" '&' */ { (yyvsp[-2].pTypeDecl)->explicitRef = true; (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); } break; - case 720: /* type_declaration_no_options: type_declaration_no_options '?' */ + case 725: /* type_declaration_no_options: type_declaration_no_options '?' */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-1])); @@ -10598,15 +10675,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 721: /* $@52: %empty */ + case 726: /* $@52: %empty */ { yyextra->das_arrow_depth ++; } break; - case 722: /* $@53: %empty */ + case 727: /* $@53: %empty */ { yyextra->das_arrow_depth --; } break; - case 723: /* type_declaration_no_options: "smart_ptr" '<' $@52 type_declaration '>' $@53 */ + case 728: /* type_declaration_no_options: "smart_ptr" '<' $@52 type_declaration '>' $@53 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10615,7 +10692,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 724: /* type_declaration_no_options: type_declaration_no_options "??" */ + case 729: /* type_declaration_no_options: type_declaration_no_options "??" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tPointer); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-1])); @@ -10625,15 +10702,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 725: /* $@54: %empty */ + case 730: /* $@54: %empty */ { yyextra->das_arrow_depth ++; } break; - case 726: /* $@55: %empty */ + case 731: /* $@55: %empty */ { yyextra->das_arrow_depth --; } break; - case 727: /* type_declaration_no_options: "array" '<' $@54 type_declaration '>' $@55 */ + case 732: /* type_declaration_no_options: "array" '<' $@54 type_declaration '>' $@55 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tArray); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10641,15 +10718,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 728: /* $@56: %empty */ + case 733: /* $@56: %empty */ { yyextra->das_arrow_depth ++; } break; - case 729: /* $@57: %empty */ + case 734: /* $@57: %empty */ { yyextra->das_arrow_depth --; } break; - case 730: /* type_declaration_no_options: "table" '<' $@56 table_type_pair '>' $@57 */ + case 735: /* type_declaration_no_options: "table" '<' $@56 table_type_pair '>' $@57 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tTable); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10658,15 +10735,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 731: /* $@58: %empty */ + case 736: /* $@58: %empty */ { yyextra->das_arrow_depth ++; } break; - case 732: /* $@59: %empty */ + case 737: /* $@59: %empty */ { yyextra->das_arrow_depth --; } break; - case 733: /* type_declaration_no_options: "iterator" '<' $@58 type_declaration '>' $@59 */ + case 738: /* type_declaration_no_options: "iterator" '<' $@58 type_declaration '>' $@59 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tIterator); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10674,22 +10751,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 734: /* type_declaration_no_options: "block" */ + case 739: /* type_declaration_no_options: "block" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 735: /* $@60: %empty */ + case 740: /* $@60: %empty */ { yyextra->das_arrow_depth ++; } break; - case 736: /* $@61: %empty */ + case 741: /* $@61: %empty */ { yyextra->das_arrow_depth --; } break; - case 737: /* type_declaration_no_options: "block" '<' $@60 type_declaration '>' $@61 */ + case 742: /* type_declaration_no_options: "block" '<' $@60 type_declaration '>' $@61 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10697,15 +10774,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 738: /* $@62: %empty */ + case 743: /* $@62: %empty */ { yyextra->das_arrow_depth ++; } break; - case 739: /* $@63: %empty */ + case 744: /* $@63: %empty */ { yyextra->das_arrow_depth --; } break; - case 740: /* type_declaration_no_options: "block" '<' $@62 optional_function_argument_list optional_function_type '>' $@63 */ + case 745: /* type_declaration_no_options: "block" '<' $@62 optional_function_argument_list optional_function_type '>' $@63 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tBlock); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -10717,22 +10794,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 741: /* type_declaration_no_options: "function" */ + case 746: /* type_declaration_no_options: "function" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 742: /* $@64: %empty */ + case 747: /* $@64: %empty */ { yyextra->das_arrow_depth ++; } break; - case 743: /* $@65: %empty */ + case 748: /* $@65: %empty */ { yyextra->das_arrow_depth --; } break; - case 744: /* type_declaration_no_options: "function" '<' $@64 type_declaration '>' $@65 */ + case 749: /* type_declaration_no_options: "function" '<' $@64 type_declaration '>' $@65 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10740,15 +10817,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 745: /* $@66: %empty */ + case 750: /* $@66: %empty */ { yyextra->das_arrow_depth ++; } break; - case 746: /* $@67: %empty */ + case 751: /* $@67: %empty */ { yyextra->das_arrow_depth --; } break; - case 747: /* type_declaration_no_options: "function" '<' $@66 optional_function_argument_list optional_function_type '>' $@67 */ + case 752: /* type_declaration_no_options: "function" '<' $@66 optional_function_argument_list optional_function_type '>' $@67 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tFunction); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -10760,22 +10837,22 @@ YYLTYPE yylloc = yyloc_default; } break; - case 748: /* type_declaration_no_options: "lambda" */ + case 753: /* type_declaration_no_options: "lambda" */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[0])); } break; - case 749: /* $@68: %empty */ + case 754: /* $@68: %empty */ { yyextra->das_arrow_depth ++; } break; - case 750: /* $@69: %empty */ + case 755: /* $@69: %empty */ { yyextra->das_arrow_depth --; } break; - case 751: /* type_declaration_no_options: "lambda" '<' $@68 type_declaration '>' $@69 */ + case 756: /* type_declaration_no_options: "lambda" '<' $@68 type_declaration '>' $@69 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10783,15 +10860,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 752: /* $@70: %empty */ + case 757: /* $@70: %empty */ { yyextra->das_arrow_depth ++; } break; - case 753: /* $@71: %empty */ + case 758: /* $@71: %empty */ { yyextra->das_arrow_depth --; } break; - case 754: /* type_declaration_no_options: "lambda" '<' $@70 optional_function_argument_list optional_function_type '>' $@71 */ + case 759: /* type_declaration_no_options: "lambda" '<' $@70 optional_function_argument_list optional_function_type '>' $@71 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tLambda); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-6])); @@ -10803,15 +10880,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 755: /* $@72: %empty */ + case 760: /* $@72: %empty */ { yyextra->das_arrow_depth ++; } break; - case 756: /* $@73: %empty */ + case 761: /* $@73: %empty */ { yyextra->das_arrow_depth --; } break; - case 757: /* type_declaration_no_options: "tuple" '<' $@72 tuple_type_list '>' $@73 */ + case 762: /* type_declaration_no_options: "tuple" '<' $@72 tuple_type_list '>' $@73 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tTuple); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10820,15 +10897,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 758: /* $@74: %empty */ + case 763: /* $@74: %empty */ { yyextra->das_arrow_depth ++; } break; - case 759: /* $@75: %empty */ + case 764: /* $@75: %empty */ { yyextra->das_arrow_depth --; } break; - case 760: /* type_declaration_no_options: "variant" '<' $@74 variant_type_list '>' $@75 */ + case 765: /* type_declaration_no_options: "variant" '<' $@74 variant_type_list '>' $@75 */ { (yyval.pTypeDecl) = new TypeDecl(Type::tVariant); (yyval.pTypeDecl)->at = tokAt(scanner,(yylsp[-5])); @@ -10837,13 +10914,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 761: /* type_declaration: type_declaration_no_options */ + case 766: /* type_declaration: type_declaration_no_options */ { (yyval.pTypeDecl) = (yyvsp[0].pTypeDecl); } break; - case 762: /* type_declaration: type_declaration '|' type_declaration_no_options */ + case 767: /* type_declaration: type_declaration '|' type_declaration_no_options */ { if ( (yyvsp[-2].pTypeDecl)->baseType==Type::option ) { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); @@ -10857,7 +10934,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 763: /* type_declaration: type_declaration '|' '#' */ + case 768: /* type_declaration: type_declaration '|' '#' */ { if ( (yyvsp[-2].pTypeDecl)->baseType==Type::option ) { (yyval.pTypeDecl) = (yyvsp[-2].pTypeDecl); @@ -10873,11 +10950,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 764: /* $@76: %empty */ + case 769: /* $@76: %empty */ { yyextra->das_need_oxford_comma=false; } break; - case 765: /* $@77: %empty */ + case 770: /* $@77: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -10886,7 +10963,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 766: /* $@78: %empty */ + case 771: /* $@78: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -10895,7 +10972,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 767: /* $@79: %empty */ + case 772: /* $@79: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-4])); @@ -10904,7 +10981,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 768: /* tuple_alias_declaration: "tuple" optional_public_or_private_alias $@76 "name" $@77 "begin of code block" $@78 tuple_alias_type_list $@79 "end of code block" */ + case 773: /* tuple_alias_declaration: "tuple" optional_public_or_private_alias $@76 "name" $@77 "begin of code block" $@78 tuple_alias_type_list $@79 "end of code block" */ { auto vtype = make_smart(Type::tTuple); vtype->alias = *(yyvsp[-6].s); @@ -10924,11 +11001,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 769: /* $@80: %empty */ + case 774: /* $@80: %empty */ { yyextra->das_need_oxford_comma=false; } break; - case 770: /* $@81: %empty */ + case 775: /* $@81: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -10937,7 +11014,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 771: /* $@82: %empty */ + case 776: /* $@82: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -10947,7 +11024,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 772: /* $@83: %empty */ + case 777: /* $@83: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-4])); @@ -10956,7 +11033,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 773: /* variant_alias_declaration: "variant" optional_public_or_private_alias $@80 "name" $@81 "begin of code block" $@82 variant_alias_type_list $@83 "end of code block" */ + case 778: /* variant_alias_declaration: "variant" optional_public_or_private_alias $@80 "name" $@81 "begin of code block" $@82 variant_alias_type_list $@83 "end of code block" */ { auto vtype = make_smart(Type::tVariant); vtype->alias = *(yyvsp[-6].s); @@ -10976,11 +11053,11 @@ YYLTYPE yylloc = yyloc_default; } break; - case 774: /* $@84: %empty */ + case 779: /* $@84: %empty */ { yyextra->das_need_oxford_comma=false; } break; - case 775: /* $@85: %empty */ + case 780: /* $@85: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[0])); @@ -10989,7 +11066,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 776: /* $@86: %empty */ + case 781: /* $@86: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-2])); @@ -10998,7 +11075,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 777: /* $@87: %empty */ + case 782: /* $@87: %empty */ { if ( !yyextra->g_CommentReaders.empty() ) { auto atvname = tokAt(scanner,(yylsp[-4])); @@ -11007,7 +11084,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 778: /* bitfield_alias_declaration: "bitfield" optional_public_or_private_alias $@84 "name" $@85 "begin of code block" $@86 bitfield_alias_bits $@87 "end of code block" */ + case 783: /* bitfield_alias_declaration: "bitfield" optional_public_or_private_alias $@84 "name" $@85 "begin of code block" $@86 bitfield_alias_bits $@87 "end of code block" */ { auto btype = make_smart(Type::tBitfield); btype->alias = *(yyvsp[-6].s); @@ -11031,27 +11108,27 @@ YYLTYPE yylloc = yyloc_default; } break; - case 779: /* make_decl: make_struct_decl */ + case 784: /* make_decl: make_struct_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 780: /* make_decl: make_dim_decl */ + case 785: /* make_decl: make_dim_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 781: /* make_decl: make_table_decl */ + case 786: /* make_decl: make_table_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 782: /* make_decl: array_comprehension */ + case 787: /* make_decl: array_comprehension */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 783: /* make_decl: make_tuple_call */ + case 788: /* make_decl: make_tuple_call */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 784: /* make_struct_fields: "name" copy_or_move expr */ + case 789: /* make_struct_fields: "name" copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); delete (yyvsp[-2].s); @@ -11061,7 +11138,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 785: /* make_struct_fields: "name" ":=" expr */ + case 790: /* make_struct_fields: "name" ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),false,true); delete (yyvsp[-2].s); @@ -11071,7 +11148,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 786: /* make_struct_fields: make_struct_fields ',' "name" copy_or_move expr */ + case 791: /* make_struct_fields: make_struct_fields ',' "name" copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); delete (yyvsp[-2].s); @@ -11080,7 +11157,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 787: /* make_struct_fields: make_struct_fields ',' "name" ":=" expr */ + case 792: /* make_struct_fields: make_struct_fields ',' "name" ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-2])),*(yyvsp[-2].s),ExpressionPtr((yyvsp[0].pExpression)),false,true); delete (yyvsp[-2].s); @@ -11089,7 +11166,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 788: /* make_struct_fields: "$f" '(' expr ')' copy_or_move expr */ + case 793: /* make_struct_fields: "$f" '(' expr ')' copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -11099,7 +11176,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 789: /* make_struct_fields: "$f" '(' expr ')' ":=" expr */ + case 794: /* make_struct_fields: "$f" '(' expr ')' ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),false,true); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -11109,7 +11186,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 790: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' copy_or_move expr */ + case 795: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' copy_or_move expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),(yyvsp[-1].b),false); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -11118,7 +11195,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 791: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' ":=" expr */ + case 796: /* make_struct_fields: make_struct_fields ',' "$f" '(' expr ')' ":=" expr */ { auto mfd = make_smart(tokAt(scanner,(yylsp[-3])),"``MACRO``TAG``FIELD``",ExpressionPtr((yyvsp[0].pExpression)),false,true); mfd->tag = ExpressionPtr((yyvsp[-3].pExpression)); @@ -11127,13 +11204,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 792: /* make_variant_dim: make_struct_fields */ + case 797: /* make_variant_dim: make_struct_fields */ { (yyval.pExpression) = ast_makeStructToMakeVariant((yyvsp[0].pMakeStruct), tokAt(scanner,(yylsp[0]))); } break; - case 793: /* make_struct_single: make_struct_fields */ + case 798: /* make_struct_single: make_struct_fields */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); @@ -11141,7 +11218,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 794: /* make_struct_dim: make_struct_fields */ + case 799: /* make_struct_dim: make_struct_fields */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); @@ -11149,14 +11226,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 795: /* make_struct_dim: make_struct_dim "end of expression" make_struct_fields */ + case 800: /* make_struct_dim: make_struct_dim "end of expression" make_struct_fields */ { ((ExprMakeStruct *) (yyvsp[-2].pExpression))->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); (yyval.pExpression) = (yyvsp[-2].pExpression); } break; - case 796: /* make_struct_dim_list: '(' make_struct_fields ')' */ + case 801: /* make_struct_dim_list: '(' make_struct_fields ')' */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[-1].pMakeStruct))); @@ -11164,14 +11241,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 797: /* make_struct_dim_list: make_struct_dim_list ',' '(' make_struct_fields ')' */ + case 802: /* make_struct_dim_list: make_struct_dim_list ',' '(' make_struct_fields ')' */ { ((ExprMakeStruct *) (yyvsp[-4].pExpression))->structs.push_back(MakeStructPtr((yyvsp[-1].pMakeStruct))); (yyval.pExpression) = (yyvsp[-4].pExpression); } break; - case 798: /* make_struct_dim_decl: make_struct_fields */ + case 803: /* make_struct_dim_decl: make_struct_fields */ { auto msd = new ExprMakeStruct(); msd->structs.push_back(MakeStructPtr((yyvsp[0].pMakeStruct))); @@ -11179,37 +11256,37 @@ YYLTYPE yylloc = yyloc_default; } break; - case 799: /* make_struct_dim_decl: make_struct_dim_list optional_comma */ + case 804: /* make_struct_dim_decl: make_struct_dim_list optional_comma */ { (yyval.pExpression) = (yyvsp[-1].pExpression); } break; - case 800: /* optional_make_struct_dim_decl: make_struct_dim_decl */ + case 805: /* optional_make_struct_dim_decl: make_struct_dim_decl */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 801: /* optional_make_struct_dim_decl: %empty */ + case 806: /* optional_make_struct_dim_decl: %empty */ { (yyval.pExpression) = new ExprMakeStruct(); } break; - case 802: /* optional_block: %empty */ + case 807: /* optional_block: %empty */ { (yyval.pExpression) = nullptr; } break; - case 803: /* optional_block: "where" expr_block */ + case 808: /* optional_block: "where" expr_block */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 816: /* use_initializer: %empty */ + case 821: /* use_initializer: %empty */ { (yyval.b) = true; } break; - case 817: /* use_initializer: "uninitialized" */ + case 822: /* use_initializer: "uninitialized" */ { (yyval.b) = false; } break; - case 818: /* make_struct_decl: "[[" type_declaration_no_options make_struct_dim optional_block optional_trailing_delim_sqr_sqr */ + case 823: /* make_struct_decl: "[[" type_declaration_no_options make_struct_dim optional_block optional_trailing_delim_sqr_sqr */ { ((ExprMakeStruct *)(yyvsp[-2].pExpression))->makeType = TypeDeclPtr((yyvsp[-3].pTypeDecl)); ((ExprMakeStruct *)(yyvsp[-2].pExpression))->block = (yyvsp[-1].pExpression); @@ -11218,7 +11295,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 819: /* make_struct_decl: "[[" type_declaration_no_options optional_block optional_trailing_delim_sqr_sqr */ + case 824: /* make_struct_decl: "[[" type_declaration_no_options optional_block optional_trailing_delim_sqr_sqr */ { auto msd = new ExprMakeStruct(); msd->makeType = TypeDeclPtr((yyvsp[-2].pTypeDecl)); @@ -11228,7 +11305,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 820: /* make_struct_decl: "[[" type_declaration_no_options '(' ')' optional_block optional_trailing_delim_sqr_sqr */ + case 825: /* make_struct_decl: "[[" type_declaration_no_options '(' ')' optional_block optional_trailing_delim_sqr_sqr */ { auto msd = new ExprMakeStruct(); msd->makeType = TypeDeclPtr((yyvsp[-4].pTypeDecl)); @@ -11239,7 +11316,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 821: /* make_struct_decl: "[[" type_declaration_no_options '(' ')' make_struct_dim optional_block optional_trailing_delim_sqr_sqr */ + case 826: /* make_struct_decl: "[[" type_declaration_no_options '(' ')' make_struct_dim optional_block optional_trailing_delim_sqr_sqr */ { ((ExprMakeStruct *)(yyvsp[-2].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); ((ExprMakeStruct *)(yyvsp[-2].pExpression))->useInitializer = true; @@ -11249,7 +11326,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 822: /* make_struct_decl: "[{" type_declaration_no_options make_struct_dim optional_block optional_trailing_delim_cur_sqr */ + case 827: /* make_struct_decl: "[{" type_declaration_no_options make_struct_dim optional_block optional_trailing_delim_cur_sqr */ { ((ExprMakeStruct *)(yyvsp[-2].pExpression))->makeType = TypeDeclPtr((yyvsp[-3].pTypeDecl)); ((ExprMakeStruct *)(yyvsp[-2].pExpression))->block = (yyvsp[-1].pExpression); @@ -11260,7 +11337,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 823: /* make_struct_decl: "[{" type_declaration_no_options '(' ')' make_struct_dim optional_block optional_trailing_delim_cur_sqr */ + case 828: /* make_struct_decl: "[{" type_declaration_no_options '(' ')' make_struct_dim optional_block optional_trailing_delim_cur_sqr */ { ((ExprMakeStruct *)(yyvsp[-2].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); ((ExprMakeStruct *)(yyvsp[-2].pExpression))->useInitializer = true; @@ -11272,15 +11349,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 824: /* $@88: %empty */ + case 829: /* $@88: %empty */ { yyextra->das_force_oxford_comma=true; yyextra->das_arrow_depth ++; } break; - case 825: /* $@89: %empty */ + case 830: /* $@89: %empty */ { yyextra->das_arrow_depth --; } break; - case 826: /* make_struct_decl: "struct" '<' $@88 type_declaration_no_options '>' $@89 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 831: /* make_struct_decl: "struct" '<' $@88 type_declaration_no_options '>' $@89 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -11291,15 +11368,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 827: /* $@90: %empty */ + case 832: /* $@90: %empty */ { yyextra->das_force_oxford_comma=true; yyextra->das_arrow_depth ++; } break; - case 828: /* $@91: %empty */ + case 833: /* $@91: %empty */ { yyextra->das_arrow_depth --; } break; - case 829: /* make_struct_decl: "class" '<' $@90 type_declaration_no_options '>' $@91 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 834: /* make_struct_decl: "class" '<' $@90 type_declaration_no_options '>' $@91 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -11309,15 +11386,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 830: /* $@92: %empty */ + case 835: /* $@92: %empty */ { yyextra->das_force_oxford_comma=true; yyextra->das_arrow_depth ++; } break; - case 831: /* $@93: %empty */ + case 836: /* $@93: %empty */ { yyextra->das_arrow_depth --; } break; - case 832: /* make_struct_decl: "variant" '<' $@92 type_declaration_no_options '>' $@93 '(' make_variant_dim ')' */ + case 837: /* make_struct_decl: "variant" '<' $@92 type_declaration_no_options '>' $@93 '(' make_variant_dim ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-8])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); @@ -11327,15 +11404,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 833: /* $@94: %empty */ + case 838: /* $@94: %empty */ { yyextra->das_arrow_depth ++; } break; - case 834: /* $@95: %empty */ + case 839: /* $@95: %empty */ { yyextra->das_arrow_depth --; } break; - case 835: /* make_struct_decl: "default" '<' $@94 type_declaration_no_options '>' $@95 use_initializer */ + case 840: /* make_struct_decl: "default" '<' $@94 type_declaration_no_options '>' $@95 use_initializer */ { auto msd = new ExprMakeStruct(); msd->at = tokAt(scanner,(yylsp[-6])); @@ -11346,13 +11423,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 836: /* make_tuple: expr */ + case 841: /* make_tuple: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 837: /* make_tuple: expr "=>" expr */ + case 842: /* make_tuple: expr "=>" expr */ { ExprMakeTuple * mt = new ExprMakeTuple(tokAt(scanner,(yylsp[-1]))); mt->values.push_back(ExpressionPtr((yyvsp[-2].pExpression))); @@ -11361,7 +11438,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 838: /* make_tuple: make_tuple ',' expr */ + case 843: /* make_tuple: make_tuple ',' expr */ { ExprMakeTuple * mt; if ( (yyvsp[-2].pExpression)->rtti_isMakeTuple() ) { @@ -11375,7 +11452,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 839: /* make_map_tuple: expr "=>" expr */ + case 844: /* make_map_tuple: expr "=>" expr */ { ExprMakeTuple * mt = new ExprMakeTuple(tokAt(scanner,(yylsp[-1]))); mt->values.push_back(ExpressionPtr((yyvsp[-2].pExpression))); @@ -11384,13 +11461,13 @@ YYLTYPE yylloc = yyloc_default; } break; - case 840: /* make_map_tuple: expr */ + case 845: /* make_map_tuple: expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 841: /* make_tuple_call: "tuple" '(' expr_list optional_comma ')' */ + case 846: /* make_tuple_call: "tuple" '(' expr_list optional_comma ')' */ { auto mkt = new ExprMakeTuple(tokAt(scanner,(yylsp[-4]))); mkt->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11399,15 +11476,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 842: /* $@96: %empty */ + case 847: /* $@96: %empty */ { yyextra->das_force_oxford_comma=true; yyextra->das_arrow_depth ++; } break; - case 843: /* $@97: %empty */ + case 848: /* $@97: %empty */ { yyextra->das_arrow_depth --; } break; - case 844: /* make_tuple_call: "tuple" '<' $@96 type_declaration_no_options '>' $@97 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 849: /* make_tuple_call: "tuple" '<' $@96 type_declaration_no_options '>' $@97 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -11417,7 +11494,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 845: /* make_dim: make_tuple */ + case 850: /* make_dim: make_tuple */ { auto mka = new ExprMakeArray(); mka->values.push_back(ExpressionPtr((yyvsp[0].pExpression))); @@ -11425,14 +11502,14 @@ YYLTYPE yylloc = yyloc_default; } break; - case 846: /* make_dim: make_dim "end of expression" make_tuple */ + case 851: /* make_dim: make_dim "end of expression" make_tuple */ { ((ExprMakeArray *) (yyvsp[-2].pExpression))->values.push_back(ExpressionPtr((yyvsp[0].pExpression))); (yyval.pExpression) = (yyvsp[-2].pExpression); } break; - case 847: /* make_dim_decl: '[' expr_list optional_comma ']' */ + case 852: /* make_dim_decl: '[' expr_list optional_comma ']' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-3]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11443,7 +11520,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 848: /* make_dim_decl: "[[" type_declaration_no_options make_dim optional_trailing_semicolon_sqr_sqr */ + case 853: /* make_dim_decl: "[[" type_declaration_no_options make_dim optional_trailing_semicolon_sqr_sqr */ { ((ExprMakeArray *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-2].pTypeDecl)); (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-3])); @@ -11451,7 +11528,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 849: /* make_dim_decl: "[{" type_declaration_no_options make_dim optional_trailing_semicolon_cur_sqr */ + case 854: /* make_dim_decl: "[{" type_declaration_no_options make_dim optional_trailing_semicolon_cur_sqr */ { ((ExprMakeArray *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-2].pTypeDecl)); (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-3])); @@ -11461,15 +11538,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 850: /* $@98: %empty */ + case 855: /* $@98: %empty */ { yyextra->das_arrow_depth ++; } break; - case 851: /* $@99: %empty */ + case 856: /* $@99: %empty */ { yyextra->das_arrow_depth --; } break; - case 852: /* make_dim_decl: "array" "struct" '<' $@98 type_declaration_no_options '>' $@99 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 857: /* make_dim_decl: "array" "struct" '<' $@98 type_declaration_no_options '>' $@99 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-10])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -11482,15 +11559,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 853: /* $@100: %empty */ + case 858: /* $@100: %empty */ { yyextra->das_arrow_depth ++; } break; - case 854: /* $@101: %empty */ + case 859: /* $@101: %empty */ { yyextra->das_arrow_depth --; } break; - case 855: /* make_dim_decl: "array" "tuple" '<' $@100 type_declaration_no_options '>' $@101 '(' use_initializer optional_make_struct_dim_decl ')' */ + case 860: /* make_dim_decl: "array" "tuple" '<' $@100 type_declaration_no_options '>' $@101 '(' use_initializer optional_make_struct_dim_decl ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-10])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-6].pTypeDecl)); @@ -11503,15 +11580,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 856: /* $@102: %empty */ + case 861: /* $@102: %empty */ { yyextra->das_arrow_depth ++; } break; - case 857: /* $@103: %empty */ + case 862: /* $@103: %empty */ { yyextra->das_arrow_depth --; } break; - case 858: /* make_dim_decl: "array" "variant" '<' $@102 type_declaration_no_options '>' $@103 '(' make_variant_dim ')' */ + case 863: /* make_dim_decl: "array" "variant" '<' $@102 type_declaration_no_options '>' $@103 '(' make_variant_dim ')' */ { (yyvsp[-1].pExpression)->at = tokAt(scanner,(yylsp[-9])); ((ExprMakeStruct *)(yyvsp[-1].pExpression))->makeType = TypeDeclPtr((yyvsp[-5].pTypeDecl)); @@ -11524,7 +11601,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 859: /* make_dim_decl: "array" '(' expr_list optional_comma ')' */ + case 864: /* make_dim_decl: "array" '(' expr_list optional_comma ')' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-4]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11535,15 +11612,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 860: /* $@104: %empty */ + case 865: /* $@104: %empty */ { yyextra->das_arrow_depth ++; } break; - case 861: /* $@105: %empty */ + case 866: /* $@105: %empty */ { yyextra->das_arrow_depth --; } break; - case 862: /* make_dim_decl: "array" '<' $@104 type_declaration_no_options '>' $@105 '(' optional_expr_list ')' */ + case 867: /* make_dim_decl: "array" '<' $@104 type_declaration_no_options '>' $@105 '(' optional_expr_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-8]))); @@ -11565,7 +11642,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 863: /* make_dim_decl: "fixed_array" '(' expr_list optional_comma ')' */ + case 868: /* make_dim_decl: "fixed_array" '(' expr_list optional_comma ')' */ { auto mka = new ExprMakeArray(tokAt(scanner,(yylsp[-4]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11575,15 +11652,15 @@ YYLTYPE yylloc = yyloc_default; } break; - case 864: /* $@106: %empty */ + case 869: /* $@106: %empty */ { yyextra->das_arrow_depth ++; } break; - case 865: /* $@107: %empty */ + case 870: /* $@107: %empty */ { yyextra->das_arrow_depth --; } break; - case 866: /* make_dim_decl: "fixed_array" '<' $@106 type_declaration_no_options '>' $@107 '(' expr_list optional_comma ')' */ + case 871: /* make_dim_decl: "fixed_array" '<' $@106 type_declaration_no_options '>' $@107 '(' expr_list optional_comma ')' */ { auto mka = new ExprMakeArray(tokAt(scanner,(yylsp[-9]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11593,7 +11670,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 867: /* make_table: make_map_tuple */ + case 872: /* make_table: make_map_tuple */ { auto mka = new ExprMakeArray(); mka->values.push_back(ExpressionPtr((yyvsp[0].pExpression))); @@ -11601,26 +11678,26 @@ YYLTYPE yylloc = yyloc_default; } break; - case 868: /* make_table: make_table "end of expression" make_map_tuple */ + case 873: /* make_table: make_table "end of expression" make_map_tuple */ { ((ExprMakeArray *) (yyvsp[-2].pExpression))->values.push_back(ExpressionPtr((yyvsp[0].pExpression))); (yyval.pExpression) = (yyvsp[-2].pExpression); } break; - case 869: /* expr_map_tuple_list: make_map_tuple */ + case 874: /* expr_map_tuple_list: make_map_tuple */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 870: /* expr_map_tuple_list: expr_map_tuple_list ',' make_map_tuple */ + case 875: /* expr_map_tuple_list: expr_map_tuple_list ',' make_map_tuple */ { (yyval.pExpression) = new ExprSequence(tokAt(scanner,(yylsp[-2])),ExpressionPtr((yyvsp[-2].pExpression)),ExpressionPtr((yyvsp[0].pExpression))); } break; - case 871: /* make_table_decl: "begin of code block" expr_map_tuple_list optional_comma "end of code block" */ + case 876: /* make_table_decl: "begin of code block" expr_map_tuple_list optional_comma "end of code block" */ { auto mka = make_smart(tokAt(scanner,(yylsp[-3]))); mka->values = sequenceToList((yyvsp[-2].pExpression)); @@ -11631,7 +11708,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 872: /* make_table_decl: "{{" make_table optional_trailing_semicolon_cur_cur */ + case 877: /* make_table_decl: "{{" make_table optional_trailing_semicolon_cur_cur */ { auto mkt = make_smart(Type::autoinfer); mkt->dim.push_back(TypeDecl::dimAuto); @@ -11643,7 +11720,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 873: /* make_table_decl: "table" '(' optional_expr_map_tuple_list ')' */ + case 878: /* make_table_decl: "table" '(' optional_expr_map_tuple_list ')' */ { auto mka = make_smart(tokAt(scanner,(yylsp[-3]))); mka->values = sequenceToList((yyvsp[-1].pExpression)); @@ -11654,7 +11731,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 874: /* make_table_decl: "table" '<' type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ + case 879: /* make_table_decl: "table" '<' type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-6]))); @@ -11677,7 +11754,7 @@ YYLTYPE yylloc = yyloc_default; } break; - case 875: /* make_table_decl: "table" '<' type_declaration_no_options c_or_s type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ + case 880: /* make_table_decl: "table" '<' type_declaration_no_options c_or_s type_declaration_no_options '>' '(' optional_expr_map_tuple_list ')' */ { if ( (yyvsp[-1].pExpression) ) { auto mka = make_smart(tokAt(scanner,(yylsp[-8]))); @@ -11702,53 +11779,53 @@ YYLTYPE yylloc = yyloc_default; } break; - case 876: /* array_comprehension_where: %empty */ + case 881: /* array_comprehension_where: %empty */ { (yyval.pExpression) = nullptr; } break; - case 877: /* array_comprehension_where: "end of expression" "where" expr */ + case 882: /* array_comprehension_where: "end of expression" "where" expr */ { (yyval.pExpression) = (yyvsp[0].pExpression); } break; - case 878: /* optional_comma: %empty */ + case 883: /* optional_comma: %empty */ { (yyval.b) = false; } break; - case 879: /* optional_comma: ',' */ + case 884: /* optional_comma: ',' */ { (yyval.b) = true; } break; - case 880: /* array_comprehension: '[' "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ + case 885: /* array_comprehension: '[' "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),false,false); } break; - case 881: /* array_comprehension: '[' "iterator" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ + case 886: /* array_comprehension: '[' "iterator" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),true,false); } break; - case 882: /* array_comprehension: "[[" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' ']' */ + case 887: /* array_comprehension: "[[" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where ']' ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-8])),(yyvsp[-7].pNameWithPosList),(yyvsp[-5].pExpression),(yyvsp[-3].pExpression),(yyvsp[-2].pExpression),tokRangeAt(scanner,(yylsp[-3]),(yylsp[0])),true,false); } break; - case 883: /* array_comprehension: "[{" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where "end of code block" ']' */ + case 888: /* array_comprehension: "[{" "for" variable_name_with_pos_list "in" expr_list "end of expression" expr array_comprehension_where "end of code block" ']' */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-8])),(yyvsp[-7].pNameWithPosList),(yyvsp[-5].pExpression),(yyvsp[-3].pExpression),(yyvsp[-2].pExpression),tokRangeAt(scanner,(yylsp[-3]),(yylsp[0])),false,false); } break; - case 884: /* array_comprehension: "begin of code block" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" */ + case 889: /* array_comprehension: "begin of code block" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-7])),(yyvsp[-6].pNameWithPosList),(yyvsp[-4].pExpression),(yyvsp[-2].pExpression),(yyvsp[-1].pExpression),tokRangeAt(scanner,(yylsp[-2]),(yylsp[0])),false,true); } break; - case 885: /* array_comprehension: "{{" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" "end of code block" */ + case 890: /* array_comprehension: "{{" "for" variable_name_with_pos_list "in" expr_list "end of expression" make_map_tuple array_comprehension_where "end of code block" "end of code block" */ { (yyval.pExpression) = ast_arrayComprehension(scanner,tokAt(scanner,(yylsp[-8])),(yyvsp[-7].pNameWithPosList),(yyvsp[-5].pExpression),(yyvsp[-3].pExpression),(yyvsp[-2].pExpression),tokRangeAt(scanner,(yylsp[-3]),(yylsp[0])),true,true); } diff --git a/prog/1stPartyLibs/daScript/src/parser/ds_parser.hpp b/prog/1stPartyLibs/daScript/src/parser/ds_parser.hpp index 183ffb3d8..9d1f671f5 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds_parser.hpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds_parser.hpp @@ -96,192 +96,193 @@ extern int das_yydebug; DAS_YYerror = 256, /* error */ DAS_YYUNDEF = 257, /* "invalid token" */ LEXER_ERROR = 258, /* "lexer error" */ - DAS_STRUCT = 259, /* "struct" */ - DAS_CLASS = 260, /* "class" */ - DAS_LET = 261, /* "let" */ - DAS_DEF = 262, /* "def" */ - DAS_WHILE = 263, /* "while" */ - DAS_IF = 264, /* "if" */ - DAS_STATIC_IF = 265, /* "static_if" */ - DAS_ELSE = 266, /* "else" */ - DAS_FOR = 267, /* "for" */ - DAS_CATCH = 268, /* "recover" */ - DAS_TRUE = 269, /* "true" */ - DAS_FALSE = 270, /* "false" */ - DAS_NEWT = 271, /* "new" */ - DAS_TYPEINFO = 272, /* "typeinfo" */ - DAS_TYPE = 273, /* "type" */ - DAS_IN = 274, /* "in" */ - DAS_IS = 275, /* "is" */ - DAS_AS = 276, /* "as" */ - DAS_ELIF = 277, /* "elif" */ - DAS_STATIC_ELIF = 278, /* "static_elif" */ - DAS_ARRAY = 279, /* "array" */ - DAS_RETURN = 280, /* "return" */ - DAS_NULL = 281, /* "null" */ - DAS_BREAK = 282, /* "break" */ - DAS_TRY = 283, /* "try" */ - DAS_OPTIONS = 284, /* "options" */ - DAS_TABLE = 285, /* "table" */ - DAS_EXPECT = 286, /* "expect" */ - DAS_CONST = 287, /* "const" */ - DAS_REQUIRE = 288, /* "require" */ - DAS_OPERATOR = 289, /* "operator" */ - DAS_ENUM = 290, /* "enum" */ - DAS_FINALLY = 291, /* "finally" */ - DAS_DELETE = 292, /* "delete" */ - DAS_DEREF = 293, /* "deref" */ - DAS_TYPEDEF = 294, /* "typedef" */ - DAS_TYPEDECL = 295, /* "typedecl" */ - DAS_WITH = 296, /* "with" */ - DAS_AKA = 297, /* "aka" */ - DAS_ASSUME = 298, /* "assume" */ - DAS_CAST = 299, /* "cast" */ - DAS_OVERRIDE = 300, /* "override" */ - DAS_ABSTRACT = 301, /* "abstract" */ - DAS_UPCAST = 302, /* "upcast" */ - DAS_ITERATOR = 303, /* "iterator" */ - DAS_VAR = 304, /* "var" */ - DAS_ADDR = 305, /* "addr" */ - DAS_CONTINUE = 306, /* "continue" */ - DAS_WHERE = 307, /* "where" */ - DAS_PASS = 308, /* "pass" */ - DAS_REINTERPRET = 309, /* "reinterpret" */ - DAS_MODULE = 310, /* "module" */ - DAS_PUBLIC = 311, /* "public" */ - DAS_LABEL = 312, /* "label" */ - DAS_GOTO = 313, /* "goto" */ - DAS_IMPLICIT = 314, /* "implicit" */ - DAS_EXPLICIT = 315, /* "explicit" */ - DAS_SHARED = 316, /* "shared" */ - DAS_PRIVATE = 317, /* "private" */ - DAS_SMART_PTR = 318, /* "smart_ptr" */ - DAS_UNSAFE = 319, /* "unsafe" */ - DAS_INSCOPE = 320, /* "inscope" */ - DAS_STATIC = 321, /* "static" */ - DAS_FIXED_ARRAY = 322, /* "fixed_array" */ - DAS_DEFAULT = 323, /* "default" */ - DAS_UNINITIALIZED = 324, /* "uninitialized" */ - DAS_TBOOL = 325, /* "bool" */ - DAS_TVOID = 326, /* "void" */ - DAS_TSTRING = 327, /* "string" */ - DAS_TAUTO = 328, /* "auto" */ - DAS_TINT = 329, /* "int" */ - DAS_TINT2 = 330, /* "int2" */ - DAS_TINT3 = 331, /* "int3" */ - DAS_TINT4 = 332, /* "int4" */ - DAS_TUINT = 333, /* "uint" */ - DAS_TBITFIELD = 334, /* "bitfield" */ - DAS_TUINT2 = 335, /* "uint2" */ - DAS_TUINT3 = 336, /* "uint3" */ - DAS_TUINT4 = 337, /* "uint4" */ - DAS_TFLOAT = 338, /* "float" */ - DAS_TFLOAT2 = 339, /* "float2" */ - DAS_TFLOAT3 = 340, /* "float3" */ - DAS_TFLOAT4 = 341, /* "float4" */ - DAS_TRANGE = 342, /* "range" */ - DAS_TURANGE = 343, /* "urange" */ - DAS_TRANGE64 = 344, /* "range64" */ - DAS_TURANGE64 = 345, /* "urange64" */ - DAS_TBLOCK = 346, /* "block" */ - DAS_TINT64 = 347, /* "int64" */ - DAS_TUINT64 = 348, /* "uint64" */ - DAS_TDOUBLE = 349, /* "double" */ - DAS_TFUNCTION = 350, /* "function" */ - DAS_TLAMBDA = 351, /* "lambda" */ - DAS_TINT8 = 352, /* "int8" */ - DAS_TUINT8 = 353, /* "uint8" */ - DAS_TINT16 = 354, /* "int16" */ - DAS_TUINT16 = 355, /* "uint16" */ - DAS_TTUPLE = 356, /* "tuple" */ - DAS_TVARIANT = 357, /* "variant" */ - DAS_GENERATOR = 358, /* "generator" */ - DAS_YIELD = 359, /* "yield" */ - DAS_SEALED = 360, /* "sealed" */ - ADDEQU = 361, /* "+=" */ - SUBEQU = 362, /* "-=" */ - DIVEQU = 363, /* "/=" */ - MULEQU = 364, /* "*=" */ - MODEQU = 365, /* "%=" */ - ANDEQU = 366, /* "&=" */ - OREQU = 367, /* "|=" */ - XOREQU = 368, /* "^=" */ - SHL = 369, /* "<<" */ - SHR = 370, /* ">>" */ - ADDADD = 371, /* "++" */ - SUBSUB = 372, /* "--" */ - LEEQU = 373, /* "<=" */ - SHLEQU = 374, /* "<<=" */ - SHREQU = 375, /* ">>=" */ - GREQU = 376, /* ">=" */ - EQUEQU = 377, /* "==" */ - NOTEQU = 378, /* "!=" */ - RARROW = 379, /* "->" */ - LARROW = 380, /* "<-" */ - QQ = 381, /* "??" */ - QDOT = 382, /* "?." */ - QBRA = 383, /* "?[" */ - LPIPE = 384, /* "<|" */ - LBPIPE = 385, /* " <|" */ - LLPIPE = 386, /* "$ <|" */ - LAPIPE = 387, /* "@ <|" */ - LFPIPE = 388, /* "@@ <|" */ - RPIPE = 389, /* "|>" */ - CLONEEQU = 390, /* ":=" */ - ROTL = 391, /* "<<<" */ - ROTR = 392, /* ">>>" */ - ROTLEQU = 393, /* "<<<=" */ - ROTREQU = 394, /* ">>>=" */ - MAPTO = 395, /* "=>" */ - COLCOL = 396, /* "::" */ - ANDAND = 397, /* "&&" */ - OROR = 398, /* "||" */ - XORXOR = 399, /* "^^" */ - ANDANDEQU = 400, /* "&&=" */ - OROREQU = 401, /* "||=" */ - XORXOREQU = 402, /* "^^=" */ - DOTDOT = 403, /* ".." */ - MTAG_E = 404, /* "$$" */ - MTAG_I = 405, /* "$i" */ - MTAG_V = 406, /* "$v" */ - MTAG_B = 407, /* "$b" */ - MTAG_A = 408, /* "$a" */ - MTAG_T = 409, /* "$t" */ - MTAG_C = 410, /* "$c" */ - MTAG_F = 411, /* "$f" */ - MTAG_DOTDOTDOT = 412, /* "..." */ - BRABRAB = 413, /* "[[" */ - BRACBRB = 414, /* "[{" */ - CBRCBRB = 415, /* "{{" */ - INTEGER = 416, /* "integer constant" */ - LONG_INTEGER = 417, /* "long integer constant" */ - UNSIGNED_INTEGER = 418, /* "unsigned integer constant" */ - UNSIGNED_LONG_INTEGER = 419, /* "unsigned long integer constant" */ - UNSIGNED_INT8 = 420, /* "unsigned int8 constant" */ - FLOAT = 421, /* "floating point constant" */ - DOUBLE = 422, /* "double constant" */ - NAME = 423, /* "name" */ - KEYWORD = 424, /* "keyword" */ - TYPE_FUNCTION = 425, /* "type function" */ - BEGIN_STRING = 426, /* "start of the string" */ - STRING_CHARACTER = 427, /* STRING_CHARACTER */ - STRING_CHARACTER_ESC = 428, /* STRING_CHARACTER_ESC */ - END_STRING = 429, /* "end of the string" */ - BEGIN_STRING_EXPR = 430, /* "{" */ - END_STRING_EXPR = 431, /* "}" */ - END_OF_READ = 432, /* "end of failed eader macro" */ - SEMICOLON_CUR_CUR = 433, /* ";}}" */ - SEMICOLON_CUR_SQR = 434, /* ";}]" */ - SEMICOLON_SQR_SQR = 435, /* ";]]" */ - COMMA_SQR_SQR = 436, /* ",]]" */ - COMMA_CUR_SQR = 437, /* ",}]" */ - UNARY_MINUS = 438, /* UNARY_MINUS */ - UNARY_PLUS = 439, /* UNARY_PLUS */ - PRE_INC = 440, /* PRE_INC */ - PRE_DEC = 441, /* PRE_DEC */ - POST_INC = 442, /* POST_INC */ - POST_DEC = 443, /* POST_DEC */ - DEREF = 444 /* DEREF */ + DAS_CAPTURE = 259, /* "capture" */ + DAS_STRUCT = 260, /* "struct" */ + DAS_CLASS = 261, /* "class" */ + DAS_LET = 262, /* "let" */ + DAS_DEF = 263, /* "def" */ + DAS_WHILE = 264, /* "while" */ + DAS_IF = 265, /* "if" */ + DAS_STATIC_IF = 266, /* "static_if" */ + DAS_ELSE = 267, /* "else" */ + DAS_FOR = 268, /* "for" */ + DAS_CATCH = 269, /* "recover" */ + DAS_TRUE = 270, /* "true" */ + DAS_FALSE = 271, /* "false" */ + DAS_NEWT = 272, /* "new" */ + DAS_TYPEINFO = 273, /* "typeinfo" */ + DAS_TYPE = 274, /* "type" */ + DAS_IN = 275, /* "in" */ + DAS_IS = 276, /* "is" */ + DAS_AS = 277, /* "as" */ + DAS_ELIF = 278, /* "elif" */ + DAS_STATIC_ELIF = 279, /* "static_elif" */ + DAS_ARRAY = 280, /* "array" */ + DAS_RETURN = 281, /* "return" */ + DAS_NULL = 282, /* "null" */ + DAS_BREAK = 283, /* "break" */ + DAS_TRY = 284, /* "try" */ + DAS_OPTIONS = 285, /* "options" */ + DAS_TABLE = 286, /* "table" */ + DAS_EXPECT = 287, /* "expect" */ + DAS_CONST = 288, /* "const" */ + DAS_REQUIRE = 289, /* "require" */ + DAS_OPERATOR = 290, /* "operator" */ + DAS_ENUM = 291, /* "enum" */ + DAS_FINALLY = 292, /* "finally" */ + DAS_DELETE = 293, /* "delete" */ + DAS_DEREF = 294, /* "deref" */ + DAS_TYPEDEF = 295, /* "typedef" */ + DAS_TYPEDECL = 296, /* "typedecl" */ + DAS_WITH = 297, /* "with" */ + DAS_AKA = 298, /* "aka" */ + DAS_ASSUME = 299, /* "assume" */ + DAS_CAST = 300, /* "cast" */ + DAS_OVERRIDE = 301, /* "override" */ + DAS_ABSTRACT = 302, /* "abstract" */ + DAS_UPCAST = 303, /* "upcast" */ + DAS_ITERATOR = 304, /* "iterator" */ + DAS_VAR = 305, /* "var" */ + DAS_ADDR = 306, /* "addr" */ + DAS_CONTINUE = 307, /* "continue" */ + DAS_WHERE = 308, /* "where" */ + DAS_PASS = 309, /* "pass" */ + DAS_REINTERPRET = 310, /* "reinterpret" */ + DAS_MODULE = 311, /* "module" */ + DAS_PUBLIC = 312, /* "public" */ + DAS_LABEL = 313, /* "label" */ + DAS_GOTO = 314, /* "goto" */ + DAS_IMPLICIT = 315, /* "implicit" */ + DAS_EXPLICIT = 316, /* "explicit" */ + DAS_SHARED = 317, /* "shared" */ + DAS_PRIVATE = 318, /* "private" */ + DAS_SMART_PTR = 319, /* "smart_ptr" */ + DAS_UNSAFE = 320, /* "unsafe" */ + DAS_INSCOPE = 321, /* "inscope" */ + DAS_STATIC = 322, /* "static" */ + DAS_FIXED_ARRAY = 323, /* "fixed_array" */ + DAS_DEFAULT = 324, /* "default" */ + DAS_UNINITIALIZED = 325, /* "uninitialized" */ + DAS_TBOOL = 326, /* "bool" */ + DAS_TVOID = 327, /* "void" */ + DAS_TSTRING = 328, /* "string" */ + DAS_TAUTO = 329, /* "auto" */ + DAS_TINT = 330, /* "int" */ + DAS_TINT2 = 331, /* "int2" */ + DAS_TINT3 = 332, /* "int3" */ + DAS_TINT4 = 333, /* "int4" */ + DAS_TUINT = 334, /* "uint" */ + DAS_TBITFIELD = 335, /* "bitfield" */ + DAS_TUINT2 = 336, /* "uint2" */ + DAS_TUINT3 = 337, /* "uint3" */ + DAS_TUINT4 = 338, /* "uint4" */ + DAS_TFLOAT = 339, /* "float" */ + DAS_TFLOAT2 = 340, /* "float2" */ + DAS_TFLOAT3 = 341, /* "float3" */ + DAS_TFLOAT4 = 342, /* "float4" */ + DAS_TRANGE = 343, /* "range" */ + DAS_TURANGE = 344, /* "urange" */ + DAS_TRANGE64 = 345, /* "range64" */ + DAS_TURANGE64 = 346, /* "urange64" */ + DAS_TBLOCK = 347, /* "block" */ + DAS_TINT64 = 348, /* "int64" */ + DAS_TUINT64 = 349, /* "uint64" */ + DAS_TDOUBLE = 350, /* "double" */ + DAS_TFUNCTION = 351, /* "function" */ + DAS_TLAMBDA = 352, /* "lambda" */ + DAS_TINT8 = 353, /* "int8" */ + DAS_TUINT8 = 354, /* "uint8" */ + DAS_TINT16 = 355, /* "int16" */ + DAS_TUINT16 = 356, /* "uint16" */ + DAS_TTUPLE = 357, /* "tuple" */ + DAS_TVARIANT = 358, /* "variant" */ + DAS_GENERATOR = 359, /* "generator" */ + DAS_YIELD = 360, /* "yield" */ + DAS_SEALED = 361, /* "sealed" */ + ADDEQU = 362, /* "+=" */ + SUBEQU = 363, /* "-=" */ + DIVEQU = 364, /* "/=" */ + MULEQU = 365, /* "*=" */ + MODEQU = 366, /* "%=" */ + ANDEQU = 367, /* "&=" */ + OREQU = 368, /* "|=" */ + XOREQU = 369, /* "^=" */ + SHL = 370, /* "<<" */ + SHR = 371, /* ">>" */ + ADDADD = 372, /* "++" */ + SUBSUB = 373, /* "--" */ + LEEQU = 374, /* "<=" */ + SHLEQU = 375, /* "<<=" */ + SHREQU = 376, /* ">>=" */ + GREQU = 377, /* ">=" */ + EQUEQU = 378, /* "==" */ + NOTEQU = 379, /* "!=" */ + RARROW = 380, /* "->" */ + LARROW = 381, /* "<-" */ + QQ = 382, /* "??" */ + QDOT = 383, /* "?." */ + QBRA = 384, /* "?[" */ + LPIPE = 385, /* "<|" */ + LBPIPE = 386, /* " <|" */ + LLPIPE = 387, /* "$ <|" */ + LAPIPE = 388, /* "@ <|" */ + LFPIPE = 389, /* "@@ <|" */ + RPIPE = 390, /* "|>" */ + CLONEEQU = 391, /* ":=" */ + ROTL = 392, /* "<<<" */ + ROTR = 393, /* ">>>" */ + ROTLEQU = 394, /* "<<<=" */ + ROTREQU = 395, /* ">>>=" */ + MAPTO = 396, /* "=>" */ + COLCOL = 397, /* "::" */ + ANDAND = 398, /* "&&" */ + OROR = 399, /* "||" */ + XORXOR = 400, /* "^^" */ + ANDANDEQU = 401, /* "&&=" */ + OROREQU = 402, /* "||=" */ + XORXOREQU = 403, /* "^^=" */ + DOTDOT = 404, /* ".." */ + MTAG_E = 405, /* "$$" */ + MTAG_I = 406, /* "$i" */ + MTAG_V = 407, /* "$v" */ + MTAG_B = 408, /* "$b" */ + MTAG_A = 409, /* "$a" */ + MTAG_T = 410, /* "$t" */ + MTAG_C = 411, /* "$c" */ + MTAG_F = 412, /* "$f" */ + MTAG_DOTDOTDOT = 413, /* "..." */ + BRABRAB = 414, /* "[[" */ + BRACBRB = 415, /* "[{" */ + CBRCBRB = 416, /* "{{" */ + INTEGER = 417, /* "integer constant" */ + LONG_INTEGER = 418, /* "long integer constant" */ + UNSIGNED_INTEGER = 419, /* "unsigned integer constant" */ + UNSIGNED_LONG_INTEGER = 420, /* "unsigned long integer constant" */ + UNSIGNED_INT8 = 421, /* "unsigned int8 constant" */ + FLOAT = 422, /* "floating point constant" */ + DOUBLE = 423, /* "double constant" */ + NAME = 424, /* "name" */ + KEYWORD = 425, /* "keyword" */ + TYPE_FUNCTION = 426, /* "type function" */ + BEGIN_STRING = 427, /* "start of the string" */ + STRING_CHARACTER = 428, /* STRING_CHARACTER */ + STRING_CHARACTER_ESC = 429, /* STRING_CHARACTER_ESC */ + END_STRING = 430, /* "end of the string" */ + BEGIN_STRING_EXPR = 431, /* "{" */ + END_STRING_EXPR = 432, /* "}" */ + END_OF_READ = 433, /* "end of failed eader macro" */ + SEMICOLON_CUR_CUR = 434, /* ";}}" */ + SEMICOLON_CUR_SQR = 435, /* ";}]" */ + SEMICOLON_SQR_SQR = 436, /* ";]]" */ + COMMA_SQR_SQR = 437, /* ",]]" */ + COMMA_CUR_SQR = 438, /* ",}]" */ + UNARY_MINUS = 439, /* UNARY_MINUS */ + UNARY_PLUS = 440, /* UNARY_PLUS */ + PRE_INC = 441, /* PRE_INC */ + PRE_DEC = 442, /* PRE_DEC */ + POST_INC = 443, /* POST_INC */ + POST_DEC = 444, /* POST_DEC */ + DEREF = 445 /* DEREF */ }; typedef enum das_yytokentype das_yytoken_kind_t; #endif diff --git a/prog/1stPartyLibs/daScript/src/parser/ds_parser.ypp b/prog/1stPartyLibs/daScript/src/parser/ds_parser.ypp index 8c6e98f17..0bf7f4c1b 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds_parser.ypp +++ b/prog/1stPartyLibs/daScript/src/parser/ds_parser.ypp @@ -143,6 +143,7 @@ %token LEXER_ERROR "lexer error" /* keywords */ +%token DAS_CAPTURE "capture" %token DAS_STRUCT "struct" %token DAS_CLASS "class" %token DAS_LET "let" @@ -604,6 +605,7 @@ character_sequence string_constant : BEGIN_STRING character_sequence[seq] END_STRING { $$ = $seq; } + | BEGIN_STRING END_STRING { $$ = new string(); } ; string_builder_body @@ -1730,10 +1732,11 @@ block_or_lambda ; capture_entry - : '&' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_reference); delete $name; } - | '=' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_copy); delete $name; } - | LARROW NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_move); delete $name; } - | CLONEEQU NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_clone); delete $name; } + : '&' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_reference); delete $name; } + | '=' NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_copy); delete $name; } + | LARROW NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_move); delete $name; } + | CLONEEQU NAME[name] { $$ = new CaptureEntry(*$name,CaptureMode::capture_by_clone); delete $name; } + | NAME[op] '(' NAME[name] ')' { $$ = ast_makeCaptureEntry(scanner,tokAt(scanner,@op),*$op,*$name); delete $op; delete $name; } ; capture_list @@ -1752,6 +1755,7 @@ capture_list optional_capture_list : { $$ = nullptr; } | BRABRAB capture_list[cl] ']' ']' { $$ = $cl; } + | DAS_CAPTURE '(' capture_list[cl] ')' { $$ = $cl; } ; expr_block @@ -1930,6 +1934,18 @@ expr_field delete $method_name; $$ = pInvoke; } + | expr[left] '.'[loc] basic_type_declaration[method_type] '(' ')' { + auto method_name = das_to_string($method_type); + auto pInvoke = makeInvokeMethod(tokAt(scanner,@loc), $left, method_name); + $$ = pInvoke; + } + | expr[left] '.'[loc] basic_type_declaration[method_type] '(' expr_list[arguments] ')' { + auto method_name = das_to_string($method_type); + auto pInvoke = makeInvokeMethod(tokAt(scanner,@loc), $left, method_name); + auto callArgs = sequenceToList($arguments); + pInvoke->arguments.insert ( pInvoke->arguments.end(), callArgs.begin(), callArgs.end() ); + $$ = pInvoke; + } | expr[subexpr] '.'[loc] { yyextra->das_suppress_errors=true; } error { yyextra->das_suppress_errors=false; } { $$ = new ExprField(tokAt(scanner,@loc), tokAt(scanner,@loc), ExpressionPtr($subexpr), ""); yyerrok; diff --git a/prog/1stPartyLibs/daScript/src/parser/parser_impl.cpp b/prog/1stPartyLibs/daScript/src/parser/parser_impl.cpp index 2d6c89a2c..c83864bad 100644 --- a/prog/1stPartyLibs/daScript/src/parser/parser_impl.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/parser_impl.cpp @@ -1075,4 +1075,13 @@ namespace das { return mks; } + CaptureEntry * ast_makeCaptureEntry ( yyscan_t scanner, const LineInfo & at, const string & op, const string & name ) { + CaptureMode mode = CaptureMode::capture_by_reference; + if ( op=="clone" ) mode = CaptureMode::capture_by_clone; + else if ( op=="move" ) mode = CaptureMode::capture_by_move; + else if ( op=="copy" ) mode = CaptureMode::capture_by_copy; + else if ( op=="ref" ) mode = CaptureMode::capture_by_reference; + else yyextra->g_Program->error("unknown capture mode " + op, "", "", at, CompilationError::syntax_error); + return new CaptureEntry(name,mode); + } } \ No newline at end of file diff --git a/prog/1stPartyLibs/daScript/src/parser/parser_impl.h b/prog/1stPartyLibs/daScript/src/parser/parser_impl.h index c9c2d4c19..c24142dbb 100644 --- a/prog/1stPartyLibs/daScript/src/parser/parser_impl.h +++ b/prog/1stPartyLibs/daScript/src/parser/parser_impl.h @@ -104,4 +104,5 @@ namespace das { ExprBlock * ast_wrapInBlock ( Expression * expr ); int skip_underscode ( char * tok, char * buf, char * bufend ); Expression * ast_makeStructToMakeVariant ( MakeStruct * decl, const LineInfo & locAt ); + CaptureEntry * ast_makeCaptureEntry ( yyscan_t scanner, const LineInfo & at, const string & op, const string & name ); } \ No newline at end of file diff --git a/prog/1stPartyLibs/vecmath/dag_vecMath.h b/prog/1stPartyLibs/vecmath/dag_vecMath.h index 440bd72a7..f5276d2e2 100644 --- a/prog/1stPartyLibs/vecmath/dag_vecMath.h +++ b/prog/1stPartyLibs/vecmath/dag_vecMath.h @@ -1057,8 +1057,37 @@ VECTORCALL VECMATH_FINLINE quat4f v_quat_from_unit_vec_cos(vec3f v, vec4f ang_co VECTORCALL VECMATH_FINLINE quat4f v_quat_from_unit_arc(vec3f v0, vec3f v1); //! make (unnormalized) quaternion to rotate 'v0' to 'v1', both CAN be not normalized VECTORCALL VECMATH_FINLINE quat4f v_quat_from_arc(vec3f v0, vec3f v1); -//! make (unnormalized) quaternion from heading, attitude, bank angles in .xyz -VECTORCALL inline quat4f v_quat_from_euler(vec3f angles); + +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_XYZ) +VECTORCALL inline quat4f v_quat_from_euler_xyz(vec3f angles); +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_XZY) +VECTORCALL inline quat4f v_quat_from_euler_xzy(vec3f angles); +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_YZX) +VECTORCALL inline quat4f v_quat_from_euler_yzx(vec3f angles); +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_YXZ) +VECTORCALL inline quat4f v_quat_from_euler_yxz(vec3f angles); +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_ZXY) +VECTORCALL inline quat4f v_quat_from_euler_zxy(vec3f angles); +//! make (unnormalized) quaternion from euler angles. equivalent to v_quat_from_euler(angles, EULER_ORDER_ZYX) +VECTORCALL inline quat4f v_quat_from_euler_zyx(vec3f angles); + +enum EulerOrder +{ + EULER_ORDER_XYZ, + EULER_ORDER_XZY, + EULER_ORDER_YZX, + EULER_ORDER_YXZ, + EULER_ORDER_ZXY, + EULER_ORDER_ZYX +}; +//! Make (unnormalized) quaternion from euler angles with a provided order. +//! angles.x, angles.y, angles.z are rotations around X, Y, Z axes respectively. +//! Rotations are performed left to right according to the specified order. +//! Keep in mind, that the last rotation in the order is the first to be applied when finally multiplying a vector, +//! so that `quat(EULER_ORDER_XYZ) * v` is equivalent to `rotX * rotY * rotZ * v`. +//! In other words, rotations in world space are performed in reverse order. +VECTORCALL inline quat4f v_quat_from_euler(vec3f angles, EulerOrder order); + //! make heading, attitude, bank angles from quaternion VECTORCALL inline vec3f v_euler_from_quat(quat4f quat); diff --git a/prog/1stPartyLibs/vecmath/dag_vecMath_common.h b/prog/1stPartyLibs/vecmath/dag_vecMath_common.h index 20f9565bf..acd81a768 100644 --- a/prog/1stPartyLibs/vecmath/dag_vecMath_common.h +++ b/prog/1stPartyLibs/vecmath/dag_vecMath_common.h @@ -1348,18 +1348,74 @@ VECTORCALL VECMATH_FINLINE quat4f v_quat_from_unit_vec_cos(vec3f v, vec4f ang_co return v_perm_xyzd(v_mul(v, s), ang_cos); } -// .xyz = heading, attitude, bank -VECTORCALL inline quat4f v_quat_from_euler(vec3f angles) +VECTORCALL inline void v_quat_from_euler_base(vec3f angles, vec4f &q1, vec4f &q2) { vec4f s, c; v_sincos(v_mul(angles, V_C_HALF), s, c); - vec4f q1 = v_mul(v_mul(v_perm_xycd(v_splat_x(s), v_splat_x(c)), - v_perm_xaxa(v_splat_y(s), v_splat_y(c))), - v_splat_z(c)); - vec4f q2 = v_mul(v_mul(v_perm_xycd(v_splat_x(c), v_splat_x(s)), - v_perm_xaxa(v_splat_y(c), v_splat_y(s))), - v_splat_z(s)); - return v_perm_xycd(v_add(q1, q2), v_sub(q1, q2)); + + vec4f sx = v_splat_x(s), sy = v_splat_y(s), sz = v_splat_z(s); + vec4f cx = v_splat_x(c), cy = v_splat_y(c), cz = v_splat_z(c); + + q1 = v_mul(v_mul(v_perm_ayzw(cx, sx), v_perm_xbzw(cy, sy)), v_perm_xycw(cz, sz)); + q2 = v_mul(v_mul(v_perm_ayzw(sx, cx), v_perm_xbzw(sy, cy)), v_perm_xycw(sz, cz)); +} + +VECTORCALL inline quat4f v_quat_from_euler_xyz(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0101); +} + +VECTORCALL inline quat4f v_quat_from_euler_xzy(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1101); +} + +VECTORCALL inline quat4f v_quat_from_euler_yzx(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0011); +} + +VECTORCALL inline quat4f v_quat_from_euler_yxz(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0111); +} + +VECTORCALL inline quat4f v_quat_from_euler_zxy(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1001); +} + +VECTORCALL inline quat4f v_quat_from_euler_zyx(vec3f angles) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1011); +} + +VECTORCALL inline quat4f v_quat_from_euler(vec3f angles, EulerOrder order) +{ + vec4f q1, q2; + v_quat_from_euler_base(angles, q1, q2); + switch (order) + { + default: + case EULER_ORDER_XYZ: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0101); + case EULER_ORDER_XZY: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1101); + case EULER_ORDER_YZX: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0011); + case EULER_ORDER_YXZ: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK0111); + case EULER_ORDER_ZXY: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1001); + case EULER_ORDER_ZYX: return v_sel(v_add(q1, q2), v_sub(q1, q2), V_CI_MASK1011); + } } // .xyz = heading, attitude, bank diff --git a/prog/1stPartyLibs/vecmath/dag_vecMath_const.h b/prog/1stPartyLibs/vecmath/dag_vecMath_const.h index 204753666..3df2cedab 100644 --- a/prog/1stPartyLibs/vecmath/dag_vecMath_const.h +++ b/prog/1stPartyLibs/vecmath/dag_vecMath_const.h @@ -66,19 +66,20 @@ DECL_VEC_CONST vec4f_const V_C_UNIT_0011 = {0.0f, 0.0f, 1.0f, 1.0f}; DECL_VEC_CONST vec4i_const V_CI_MASK0000 = { 0, 0, 0, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK1000 = { 0xFFFFFFFF, 0, 0, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK0100 = { 0, 0xFFFFFFFF, 0, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK0010 = { 0, 0, 0xFFFFFFFF, 0 }; DECL_VEC_CONST vec4i_const V_CI_MASK0001 = { 0, 0, 0, 0xFFFFFFFF }; - DECL_VEC_CONST vec4i_const V_CI_MASK1100 = { 0xFFFFFFFF, 0xFFFFFFFF, 0, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK0110 = { 0, 0xFFFFFFFF, 0xFFFFFFFF, 0 }; + DECL_VEC_CONST vec4i_const V_CI_MASK0010 = { 0, 0, 0xFFFFFFFF, 0 }; DECL_VEC_CONST vec4i_const V_CI_MASK0011 = { 0, 0, 0xFFFFFFFF, 0xFFFFFFFF }; + DECL_VEC_CONST vec4i_const V_CI_MASK0100 = { 0, 0xFFFFFFFF, 0, 0 }; + DECL_VEC_CONST vec4i_const V_CI_MASK0101 = { 0, 0xFFFFFFFF, 0, 0xFFFFFFFF }; + DECL_VEC_CONST vec4i_const V_CI_MASK0110 = { 0, 0xFFFFFFFF, 0xFFFFFFFF, 0 }; + DECL_VEC_CONST vec4i_const V_CI_MASK0111 = { 0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; + DECL_VEC_CONST vec4i_const V_CI_MASK1000 = { 0xFFFFFFFF, 0, 0, 0 }; + DECL_VEC_CONST vec4i_const V_CI_MASK1001 = { 0xFFFFFFFF, 0, 0, 0xFFFFFFFF }; DECL_VEC_CONST vec4i_const V_CI_MASK1010 = { 0xFFFFFFFF, 0, 0xFFFFFFFF, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK0101 = { 0, 0xFFFFFFFF, 0xFFFFFFFF, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK1110 = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0 }; - DECL_VEC_CONST vec4i_const V_CI_MASK1101 = { 0xFFFFFFFF, 0xFFFFFFFF, 0, 0xFFFFFFFF }; DECL_VEC_CONST vec4i_const V_CI_MASK1011 = { 0xFFFFFFFF, 0, 0xFFFFFFFF, 0xFFFFFFFF }; - DECL_VEC_CONST vec4i_const V_CI_MASK0111 = { 0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; + DECL_VEC_CONST vec4i_const V_CI_MASK1100 = { 0xFFFFFFFF, 0xFFFFFFFF, 0, 0 }; + DECL_VEC_CONST vec4i_const V_CI_MASK1101 = { 0xFFFFFFFF, 0xFFFFFFFF, 0, 0xFFFFFFFF }; + DECL_VEC_CONST vec4i_const V_CI_MASK1110 = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0 }; DECL_VEC_CONST vec4i_const V_CI_MASK1111 = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; #elif _TARGET_SIMD_NEON @@ -153,19 +154,20 @@ #define V_C_UNIT_0011 DECL_VECFLOAT4( 0.0f, 0.0f, 1.0f, 1.0f ) #define V_CI_MASK0000 vdupq_n_s32(0) - #define V_CI_MASK1000 DECL_VECUINT4( -1, 0, 0, 0 ) - #define V_CI_MASK0100 DECL_VECUINT4( 0, -1, 0, 0 ) - #define V_CI_MASK0010 DECL_VECUINT4( 0, 0, -1, 0 ) #define V_CI_MASK0001 DECL_VECUINT4( 0, 0, 0, -1 ) - #define V_CI_MASK1100 DECL_VECUINT4( -1, -1, 0, 0 ) - #define V_CI_MASK0110 DECL_VECUINT4( 0, -1, -1, 0 ) + #define V_CI_MASK0010 DECL_VECUINT4( 0, 0, -1, 0 ) #define V_CI_MASK0011 DECL_VECUINT4( 0, 0, -1, -1 ) - #define V_CI_MASK1010 DECL_VECUINT4( -1, 0, -1, 0 ) + #define V_CI_MASK0100 DECL_VECUINT4( 0, -1, 0, 0 ) #define V_CI_MASK0101 DECL_VECUINT4( 0, -1, 0, -1 ) - #define V_CI_MASK1110 DECL_VECUINT4( -1, -1, -1, 0 ) - #define V_CI_MASK1101 DECL_VECUINT4( -1, -1, 0, -1 ) - #define V_CI_MASK1011 DECL_VECUINT4( -1, 0, -1, -1 ) + #define V_CI_MASK0110 DECL_VECUINT4( 0, -1, -1, 0 ) #define V_CI_MASK0111 DECL_VECUINT4( 0, -1, -1, -1 ) + #define V_CI_MASK1000 DECL_VECUINT4( -1, 0, 0, 0 ) + #define V_CI_MASK1001 DECL_VECUINT4( -1, 0, 0, -1 ) + #define V_CI_MASK1010 DECL_VECUINT4( -1, 0, -1, 0 ) + #define V_CI_MASK1011 DECL_VECUINT4( -1, 0, -1, -1 ) + #define V_CI_MASK1100 DECL_VECUINT4( -1, -1, 0, 0 ) + #define V_CI_MASK1101 DECL_VECUINT4( -1, -1, 0, -1 ) + #define V_CI_MASK1110 DECL_VECUINT4( -1, -1, -1, 0 ) #define V_CI_MASK1111 DECL_VECUINT4( -1, -1, -1, -1 ) #endif diff --git a/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.cpp b/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.cpp index 149bee7e9..d82618433 100644 --- a/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.cpp +++ b/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.cpp @@ -308,6 +308,7 @@ bool FileTextEdit::OnImGui(bool windowIsOpen) if (ImGui::BeginPopup("code_editor_find_popup")) { ImGui::Checkbox("Case sensitive", &ctrlfCaseSensitive); + ImGui::Checkbox("Whole words", &ctrlfWholeWords); if (requestingFindPopup) ImGui::SetKeyboardFocusHere(); ImGui::InputText("Search for", ctrlfTextToFind, FIND_POPUP_TEXT_FIELD_LENGTH, ImGuiInputTextFlags_AutoSelectAll); @@ -315,7 +316,7 @@ bool FileTextEdit::OnImGui(bool windowIsOpen) if ((ImGui::Button("Find next") || ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyPressed(ImGuiKey_KeypadEnter)) && toFindTextSize > 0) { editor->ClearExtraCursors(); - if (editor->SelectNextOccurrenceOf(ctrlfTextToFind, toFindTextSize, ctrlfCaseSensitive)) + if (editor->SelectNextOccurrenceOf(ctrlfTextToFind, toFindTextSize, ctrlfCaseSensitive, ctrlfWholeWords)) { int nextOccurrenceLine, _; editor->GetCursorPosition(nextOccurrenceLine, _); @@ -338,6 +339,7 @@ bool FileTextEdit::OnImGui(bool windowIsOpen) if (ImGui::BeginPopup("code_editor_replace_popup")) { ImGui::Checkbox("Case sensitive", &ctrlfCaseSensitive); + ImGui::Checkbox("Whole words", &ctrlfWholeWords); if (requestingFindPopup) ImGui::SetKeyboardFocusHere(); ImGui::InputText("Search for", ctrlfTextToFind, FIND_POPUP_TEXT_FIELD_LENGTH, ImGuiInputTextFlags_AutoSelectAll); @@ -347,7 +349,7 @@ bool FileTextEdit::OnImGui(bool windowIsOpen) if ((ImGui::Button("Replace") || ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyPressed(ImGuiKey_KeypadEnter)) && toFindTextSize > 0) { editor->ClearExtraCursors(); - if (editor->Replace(ctrlfTextToFind, toFindTextSize, ctrlfTextToReplace, toReplaceTextSize, ctrlfCaseSensitive, false)) + if (editor->Replace(ctrlfTextToFind, toFindTextSize, ctrlfTextToReplace, toReplaceTextSize, ctrlfCaseSensitive, ctrlfWholeWords, false)) { int nextOccurrenceLine, _; editor->GetCursorPosition(nextOccurrenceLine, _); @@ -357,7 +359,7 @@ bool FileTextEdit::OnImGui(bool windowIsOpen) ImGui::SameLine(); if (ImGui::Button("Replace all") && toFindTextSize > 0) { - if (editor->Replace(ctrlfTextToFind, toFindTextSize, ctrlfTextToReplace, toReplaceTextSize, ctrlfCaseSensitive, true)) + if (editor->Replace(ctrlfTextToFind, toFindTextSize, ctrlfTextToReplace, toReplaceTextSize, ctrlfCaseSensitive, ctrlfWholeWords, true)) { int nextOccurrenceLine, _; editor->GetCursorPosition(nextOccurrenceLine, _); diff --git a/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.h b/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.h index 4fc223578..3f3011da9 100644 --- a/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.h +++ b/prog/3rdPartyLibs/ImGuiColorTextEdit/FileTextEdit.h @@ -54,6 +54,9 @@ struct FileTextEdit editorRequests.push_back(request); } + TextEditor* getEditor() { return editor; } + eastl::string getAssociatedFile() { return associatedFile; } + private: // Commands @@ -83,6 +86,7 @@ struct FileTextEdit char ctrlfTextToFind[FIND_POPUP_TEXT_FIELD_LENGTH] = ""; char ctrlfTextToReplace[FIND_POPUP_TEXT_FIELD_LENGTH] = ""; bool ctrlfCaseSensitive = false; + bool ctrlfWholeWords = false; static eastl::unordered_map extensionToLanguageDefinition; static eastl::unordered_map languageDefinitionToName; diff --git a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp index 558a0cc9c..84597d9ce 100644 --- a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp +++ b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp @@ -110,22 +110,22 @@ void TextEditor::SelectRegion(int aStartLine, int aStartChar, int aEndLine, int SetSelection(aStartLine, aStartChar, aEndLine, aEndChar); } -bool TextEditor::SelectNextOccurrenceOf(const char* aText, int aTextSize, bool aCaseSensitive) +bool TextEditor::SelectNextOccurrenceOf(const char* aText, int aTextSize, bool aCaseSensitive, bool aWholeWords) { ClearSelections(); ClearExtraCursors(); - return SelectNextOccurrenceOf(aText, aTextSize, -1, aCaseSensitive); + return SelectNextOccurrenceOf(aText, aTextSize, -1, aCaseSensitive, aWholeWords); } -void TextEditor::SelectAllOccurrencesOf(const char* aText, int aTextSize, bool aCaseSensitive) +void TextEditor::SelectAllOccurrencesOf(const char* aText, int aTextSize, bool aCaseSensitive, bool aWholeWords) { ClearSelections(); ClearExtraCursors(); - SelectNextOccurrenceOf(aText, aTextSize, -1, aCaseSensitive); + SelectNextOccurrenceOf(aText, aTextSize, -1, aCaseSensitive, aWholeWords); Coordinates startPos = mState.mCursors[mState.GetLastAddedCursorIndex()].mInteractiveEnd; while (true) { - AddCursorForNextOccurrence(aCaseSensitive); + AddCursorForNextOccurrence(aCaseSensitive, aWholeWords); Coordinates lastAddedPos = mState.mCursors[mState.GetLastAddedCursorIndex()].mInteractiveEnd; if (lastAddedPos == startPos) break; @@ -1223,12 +1223,12 @@ void TextEditor::SetSelection(int aStartLine, int aStartChar, int aEndLine, int SetSelection(startCoords, endCoords, aCursor); } -bool TextEditor::SelectNextOccurrenceOf(const char* aText, int aTextSize, int aCursor, bool aCaseSensitive) +bool TextEditor::SelectNextOccurrenceOf(const char* aText, int aTextSize, int aCursor, bool aCaseSensitive, bool aWholeWords) { if (aCursor == -1) aCursor = mState.mCurrentCursor; Coordinates nextStart, nextEnd; - if (!FindNextOccurrence(aText, aTextSize, mState.mCursors[aCursor].mInteractiveEnd, nextStart, nextEnd, aCaseSensitive)) + if (!FindNextOccurrence(aText, aTextSize, mState.mCursors[aCursor].mInteractiveEnd, nextStart, nextEnd, aCaseSensitive, aWholeWords)) return false; SetSelection(nextStart, nextEnd, aCursor); EnsureCursorVisible(aCursor, true); @@ -1236,22 +1236,22 @@ bool TextEditor::SelectNextOccurrenceOf(const char* aText, int aTextSize, int aC } -bool TextEditor::Replace(const char* find, int findLength, const char * replaceWith, int replaceLength, bool aCaseSensitive, bool all) +bool TextEditor::Replace(const char* find, int findLength, const char * replaceWith, int replaceLength, bool aCaseSensitive, bool aWholeWords, bool all) { (void)replaceLength; - bool replaceOccured = false; + bool replaceOccurred = false; do { int aCursor = mState.mCurrentCursor; Coordinates nextStart, nextEnd; - if (!FindNextOccurrence(find, findLength, mState.mCursors[aCursor].mInteractiveEnd, nextStart, nextEnd, aCaseSensitive)) + if (!FindNextOccurrence(find, findLength, mState.mCursors[aCursor].mInteractiveEnd, nextStart, nextEnd, aCaseSensitive, aWholeWords)) break; SetSelection(nextStart, nextEnd, aCursor); PasteText(replaceWith); - replaceOccured = true; + replaceOccurred = true; if (!all && nextStart != mState.mCursors[aCursor].mInteractiveEnd) SetSelection(nextStart, mState.mCursors[aCursor].mInteractiveEnd, aCursor); @@ -1260,11 +1260,11 @@ bool TextEditor::Replace(const char* find, int findLength, const char * replaceW } while (all); - return replaceOccured; + return replaceOccurred; } -void TextEditor::AddCursorForNextOccurrence(bool aCaseSensitive) +void TextEditor::AddCursorForNextOccurrence(bool aCaseSensitive, bool aWholeWords) { const Cursor& currentCursor = mState.mCursors[mState.GetLastAddedCursorIndex()]; if (currentCursor.GetSelectionStart() == currentCursor.GetSelectionEnd()) @@ -1282,7 +1282,7 @@ void TextEditor::AddCursorForNextOccurrence(bool aCaseSensitive) EnsureCursorVisible(-1, true); } -bool TextEditor::FindNextOccurrence(const char* aText, int aTextSize, const Coordinates& aFrom, Coordinates& outStart, Coordinates& outEnd, bool aCaseSensitive) +bool TextEditor::FindNextOccurrence(const char* aText, int aTextSize, const Coordinates& aFrom, Coordinates& outStart, Coordinates& outEnd, bool aCaseSensitive, bool aWholeWords) { EASTL_ASSERT(aTextSize > 0); bool fmatches = false; @@ -1326,9 +1326,28 @@ bool TextEditor::FindNextOccurrence(const char* aText, int aTextSize, const Coor matches = i == aTextSize; if (matches) { - outStart = { fline, GetCharacterColumn(fline, findex) }; - outEnd = { fline + lineOffset, GetCharacterColumn(fline + lineOffset, currentCharIndex) }; - return true; + if (aWholeWords) + { + if (findex > 0) + { + char charBefore = mLines[fline][findex - 1].mChar; + if (CharIsWordChar(charBefore)) + matches = false; + } + if (matches && findex + aTextSize < mLines[fline].size()) + { + char charAfter = mLines[fline][findex + aTextSize].mChar; + if (CharIsWordChar(charAfter)) + matches = false; + } + } + + if (matches) + { + outStart = { fline, GetCharacterColumn(fline, findex) }; + outEnd = { fline + lineOffset, GetCharacterColumn(fline + lineOffset, currentCharIndex) }; + return true; + } } } @@ -1915,6 +1934,17 @@ int TextEditor::GetLineMaxColumn(int aLine, int aLimit) const TextEditor::Line& TextEditor::InsertLine(int aIndex) { EASTL_ASSERT(!mReadOnly); + + int atTheEOL = !mLines.empty() && (mLines[max(aIndex - 1, 0)].size() == mState.mCursors[0].mInteractiveEnd.mColumn) ? 1 : 0; + + for (auto&& err : mErrorMarkers) + if (err.line >= aIndex + atTheEOL) + err.line++; + + for (int& bp : mBreakpoints) + if (bp >= aIndex + atTheEOL) + bp++; + auto& result = *mLines.insert(mLines.begin() + aIndex, Line()); for (int c = 0; c <= mState.mCurrentCursor; c++) // handle multiple cursors @@ -1943,6 +1973,20 @@ void TextEditor::RemoveLine(int aIndex, const eastl::set* aHandledCursors) SetCursorPosition({ mState.mCursors[c].mInteractiveEnd.mLine - 1, mState.mCursors[c].mInteractiveEnd.mColumn }, c); } } + + mErrorMarkers.erase(eastl::remove_if(mErrorMarkers.begin(), mErrorMarkers.end(), + [aIndex](const ErrorMarker& aMarker) { return aMarker.line == aIndex + 1; }), mErrorMarkers.end()); + + for (auto && err : mErrorMarkers) + if (err.line >= aIndex) + err.line--; + + mBreakpoints.erase(eastl::remove_if(mBreakpoints.begin(), mBreakpoints.end(), + [aIndex](int aMarker) { return aMarker == aIndex + 1; }), mBreakpoints.end()); + + for (int & bp : mBreakpoints) + if (bp >= aIndex) + bp--; } void TextEditor::RemoveLines(int aStart, int aEnd) @@ -1964,6 +2008,21 @@ void TextEditor::RemoveLines(int aStart, int aEnd) SetCursorPosition({ targetLine , mState.mCursors[c].mInteractiveEnd.mColumn }, c); } } + + mErrorMarkers.erase(eastl::remove_if(mErrorMarkers.begin(), mErrorMarkers.end(), + [aStart, aEnd](const ErrorMarker& aMarker) { return aMarker.line > aStart - 1 && aMarker.line < aEnd; }), mErrorMarkers.end()); + + for (auto && err : mErrorMarkers) + if (err.line >= aEnd) + err.line -= (aEnd - aStart); + + mBreakpoints.erase(eastl::remove_if(mBreakpoints.begin(), mBreakpoints.end(), + [aStart, aEnd](int aMarker) { return aMarker > aStart - 1 && aMarker < aEnd; }), mBreakpoints.end()); + + for (int & bp : mBreakpoints) + if (bp >= aEnd) + bp -= (aEnd - aStart); + } void TextEditor::DeleteRange(const Coordinates& aStart, const Coordinates& aEnd) @@ -2402,6 +2461,39 @@ void TextEditor::Render(bool aParentIsFocused) mPalette[(int)PaletteIndex::Selection]); } + // Draw breakpoints + auto start = ImVec2(lineStartScreenPos.x + mTextStart, lineStartScreenPos.y); + + auto breakpointIt = eastl::find(mBreakpoints.begin(), mBreakpoints.end(), lineNo + 1); + if (breakpointIt != mBreakpoints.end()) + { + auto end = ImVec2(lineStartScreenPos.x + mTextStart, lineStartScreenPos.y + mCharAdvance.y); + drawList->AddRectFilled(start, end, mPalette[(int)PaletteIndex::Breakpoint]); + } + + // Draw error markers + auto errorIt = eastl::find_if(mErrorMarkers.begin(), mErrorMarkers.end(), + [lineNo](const ErrorMarker& aMarker) { return aMarker.line == lineNo + 1; }); + + if (errorIt != mErrorMarkers.end()) + { + auto end = ImVec2(lineStartScreenPos.x + mTextStart + 4000, lineStartScreenPos.y + mCharAdvance.y); + drawList->AddRectFilled(start, end, mPalette[(int)PaletteIndex::ErrorMarker]); + + if (ImGui::IsMouseHoveringRect(lineStartScreenPos, end)) + { + ImGui::BeginTooltip(); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.2f, 0.2f, 1.0f)); + ImGui::Text("Error at line %d:", errorIt->line); + ImGui::PopStyleColor(); + ImGui::Separator(); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 0.2f, 1.0f)); + ImGui::Text("%s", errorIt->text.c_str()); + ImGui::PopStyleColor(); + ImGui::EndTooltip(); + } + } + // Draw line number (right aligned) if (mShowLineNumbers) { diff --git a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.h b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.h index 5b3825cb6..ed787557a 100644 --- a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.h +++ b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.h @@ -32,6 +32,16 @@ class IMGUI_API TextEditor FirstVisibleLine, Centered, LastVisibleLine }; + struct ErrorMarker + { + int line = -1; + int column = -1; + eastl::string text; + }; + + typedef eastl::vector ErrorMarkers; + typedef eastl::vector Breakpoints; + inline void SetReadOnlyEnabled(bool aValue) { mReadOnly = aValue; } inline bool IsReadOnlyEnabled() const { return mReadOnly; } inline void SetAutoIndentEnabled(bool aValue) { mAutoIndent = aValue; } @@ -60,9 +70,9 @@ class IMGUI_API TextEditor void SelectAll(); void SelectLine(int aLine); void SelectRegion(int aStartLine, int aStartChar, int aEndLine, int aEndChar); - bool SelectNextOccurrenceOf(const char* aText, int aTextSize, bool aCaseSensitive = true); - void SelectAllOccurrencesOf(const char* aText, int aTextSize, bool aCaseSensitive = true); - bool Replace(const char * find, int findLength, const char * replaceWith, int replaceLength, bool aCaseSensitive, bool all); + bool SelectNextOccurrenceOf(const char* aText, int aTextSize, bool aCaseSensitive = true, bool aWholeWords = false); + void SelectAllOccurrencesOf(const char* aText, int aTextSize, bool aCaseSensitive = true, bool aWholeWords = false); + bool Replace(const char * find, int findLength, const char * replaceWith, int replaceLength, bool aCaseSensitive, bool aWholeWords, bool all); bool AnyCursorHasSelection() const; bool AllCursorsHaveSelection() const; void ClearExtraCursors(); @@ -101,6 +111,9 @@ class IMGUI_API TextEditor void GetSuitableTextToFind(char * result, int max_size); + Breakpoints mBreakpoints; + ErrorMarkers mErrorMarkers; + private: // ------------- Generic utils ------------- // @@ -345,9 +358,9 @@ class IMGUI_API TextEditor void SetSelection(Coordinates aStart, Coordinates aEnd, int aCursor = -1); void SetSelection(int aStartLine, int aStartChar, int aEndLine, int aEndChar, int aCursor = -1); - bool SelectNextOccurrenceOf(const char* aText, int aTextSize, int aCursor = -1, bool aCaseSensitive = true); - void AddCursorForNextOccurrence(bool aCaseSensitive = true); - bool FindNextOccurrence(const char* aText, int aTextSize, const Coordinates& aFrom, Coordinates& outStart, Coordinates& outEnd, bool aCaseSensitive = true); + bool SelectNextOccurrenceOf(const char* aText, int aTextSize, int aCursor = -1, bool aCaseSensitive = true, bool aWholeWords = false); + void AddCursorForNextOccurrence(bool aCaseSensitive = true, bool aWholeWords = false); + bool FindNextOccurrence(const char* aText, int aTextSize, const Coordinates& aFrom, Coordinates& outStart, Coordinates& outEnd, bool aCaseSensitive = true, bool aWholeWords = false); bool FindMatchingBracket(int aLine, int aCharIndex, Coordinates& out); void ChangeCurrentLinesIndentation(bool aIncrease); void ChangeSingleLineIndentation(UndoRecord &u, int line, bool aIncrease); @@ -447,7 +460,7 @@ class IMGUI_API TextEditor int mColorRangeMin = 0; int mColorRangeMax = 0; bool mCheckComments = true; - PaletteId mPaletteId; + PaletteId mPaletteId; Palette mPalette; LanguageDefinitionId mLanguageDefinitionId; const LanguageDefinition* mLanguageDefinition = nullptr; diff --git a/prog/3rdPartyLibs/ssr/ffx_sssr.h b/prog/3rdPartyLibs/ssr/ffx_sssr.h index b0f7721c5..7d0eb24a8 100644 --- a/prog/3rdPartyLibs/ssr/ffx_sssr.h +++ b/prog/3rdPartyLibs/ssr/ffx_sssr.h @@ -39,7 +39,7 @@ void FFX_SSSR_InitialAdvanceRay(float3 origin, float3 direction, float3 inv_dire bool FFX_SSSR_AdvanceRay(float3 origin, float3 direction, float3 inv_direction, float2 current_mip_position, float2 current_mip_resolution_inv, float2 floor_offset, float2 uv_offset, float surface_z, inout float3 position, inout float current_t, bool hit_validation) { // Skip tile if view space depth is below the finest surface thickness - bool below_surface = hit_validation && (position.z * 1.01 < surface_z); + bool below_surface = hit_validation && (linearize_z(position.z, zn_zfar.zw) > linearize_z(surface_z, zn_zfar.zw) * 1.01); // Create boundary planes float2 xy_plane = floor(current_mip_position) + floor_offset; diff --git a/prog/3rdPartyLibs/vulkan/include/GLSL.std.450.h b/prog/3rdPartyLibs/vulkan/include/GLSL.std.450.h index 54cc00e9a..0594f907a 100644 --- a/prog/3rdPartyLibs/vulkan/include/GLSL.std.450.h +++ b/prog/3rdPartyLibs/vulkan/include/GLSL.std.450.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2016 The Khronos Group Inc. +** Copyright (c) 2014-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/include/OpenCL.std.h b/prog/3rdPartyLibs/vulkan/include/OpenCL.std.h index 2745e30df..ed74f203e 100644 --- a/prog/3rdPartyLibs/vulkan/include/OpenCL.std.h +++ b/prog/3rdPartyLibs/vulkan/include/OpenCL.std.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2015-2019 The Khronos Group Inc. +** Copyright (c) 2015-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.h b/prog/3rdPartyLibs/vulkan/include/spirv.h index c15736e25..42790e0d0 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.h +++ b/prog/3rdPartyLibs/vulkan/include/spirv.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2020 The Khronos Group Inc. +** Copyright (c) 2014-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -31,7 +31,7 @@ /* ** Enumeration tokens for SPIR-V, in various styles: -** C, C++, C++11, JSON, Lua, Python, C#, D +** C, C++, C++11, JSON, Lua, Python, C#, D, Beef ** ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -41,6 +41,8 @@ ** - C# will use enum classes in the Specification class located in the "Spv" namespace, ** e.g.: Spv.Specification.SourceLanguage.GLSL ** - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +** - Beef will use enum classes in the Specification class located in the "Spv" namespace, +** e.g.: Spv.Specification.SourceLanguage.GLSL ** ** Some tokens act like mask values, which can be OR'd together, ** while others are mutually exclusive. The mask-like ones have @@ -70,6 +72,12 @@ typedef enum SpvSourceLanguage_ { SpvSourceLanguageOpenCL_CPP = 4, SpvSourceLanguageHLSL = 5, SpvSourceLanguageCPP_for_OpenCL = 6, + SpvSourceLanguageSYCL = 7, + SpvSourceLanguageHERO_C = 8, + SpvSourceLanguageNZSL = 9, + SpvSourceLanguageWGSL = 10, + SpvSourceLanguageSlang = 11, + SpvSourceLanguageZig = 12, SpvSourceLanguageMax = 0x7fffffff, } SpvSourceLanguage; @@ -95,6 +103,8 @@ typedef enum SpvExecutionModel_ { SpvExecutionModelMissNV = 5317, SpvExecutionModelCallableKHR = 5318, SpvExecutionModelCallableNV = 5318, + SpvExecutionModelTaskEXT = 5364, + SpvExecutionModelMeshEXT = 5365, SpvExecutionModelMax = 0x7fffffff, } SpvExecutionModel; @@ -155,6 +165,9 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeSubgroupsPerWorkgroupId = 37, SpvExecutionModeLocalSizeId = 38, SpvExecutionModeLocalSizeHintId = 39, + SpvExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + SpvExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + SpvExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, SpvExecutionModeSubgroupUniformControlFlowKHR = 4421, SpvExecutionModePostDepthCoverage = 4446, SpvExecutionModeDenormPreserve = 4459, @@ -162,11 +175,28 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeSignedZeroInfNanPreserve = 4461, SpvExecutionModeRoundingModeRTE = 4462, SpvExecutionModeRoundingModeRTZ = 4463, + SpvExecutionModeEarlyAndLateFragmentTestsAMD = 5017, SpvExecutionModeStencilRefReplacingEXT = 5027, + SpvExecutionModeCoalescingAMDX = 5069, + SpvExecutionModeMaxNodeRecursionAMDX = 5071, + SpvExecutionModeStaticNumWorkgroupsAMDX = 5072, + SpvExecutionModeShaderIndexAMDX = 5073, + SpvExecutionModeMaxNumWorkgroupsAMDX = 5077, + SpvExecutionModeStencilRefUnchangedFrontAMD = 5079, + SpvExecutionModeStencilRefGreaterFrontAMD = 5080, + SpvExecutionModeStencilRefLessFrontAMD = 5081, + SpvExecutionModeStencilRefUnchangedBackAMD = 5082, + SpvExecutionModeStencilRefGreaterBackAMD = 5083, + SpvExecutionModeStencilRefLessBackAMD = 5084, + SpvExecutionModeQuadDerivativesKHR = 5088, + SpvExecutionModeRequireFullQuadsKHR = 5089, + SpvExecutionModeOutputLinesEXT = 5269, SpvExecutionModeOutputLinesNV = 5269, + SpvExecutionModeOutputPrimitivesEXT = 5270, SpvExecutionModeOutputPrimitivesNV = 5270, SpvExecutionModeDerivativeGroupQuadsNV = 5289, SpvExecutionModeDerivativeGroupLinearNV = 5290, + SpvExecutionModeOutputTrianglesEXT = 5298, SpvExecutionModeOutputTrianglesNV = 5298, SpvExecutionModePixelInterlockOrderedEXT = 5366, SpvExecutionModePixelInterlockUnorderedEXT = 5367, @@ -184,6 +214,14 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeNoGlobalOffsetINTEL = 5895, SpvExecutionModeNumSIMDWorkitemsINTEL = 5896, SpvExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + SpvExecutionModeMaximallyReconvergesKHR = 6023, + SpvExecutionModeFPFastMathDefault = 6028, + SpvExecutionModeStreamingInterfaceINTEL = 6154, + SpvExecutionModeRegisterMapInterfaceINTEL = 6160, + SpvExecutionModeNamedBarrierCountINTEL = 6417, + SpvExecutionModeMaximumRegistersINTEL = 6461, + SpvExecutionModeMaximumRegistersIdINTEL = 6462, + SpvExecutionModeNamedMaximumRegistersINTEL = 6463, SpvExecutionModeMax = 0x7fffffff, } SpvExecutionMode; @@ -201,6 +239,9 @@ typedef enum SpvStorageClass_ { SpvStorageClassAtomicCounter = 10, SpvStorageClassImage = 11, SpvStorageClassStorageBuffer = 12, + SpvStorageClassTileImageEXT = 4172, + SpvStorageClassNodePayloadAMDX = 5068, + SpvStorageClassNodeOutputPayloadAMDX = 5076, SpvStorageClassCallableDataKHR = 5328, SpvStorageClassCallableDataNV = 5328, SpvStorageClassIncomingCallableDataKHR = 5329, @@ -215,6 +256,8 @@ typedef enum SpvStorageClass_ { SpvStorageClassShaderRecordBufferNV = 5343, SpvStorageClassPhysicalStorageBuffer = 5349, SpvStorageClassPhysicalStorageBufferEXT = 5349, + SpvStorageClassHitObjectAttributeNV = 5385, + SpvStorageClassTaskPayloadWorkgroupEXT = 5402, SpvStorageClassCodeSectionINTEL = 5605, SpvStorageClassDeviceOnlyINTEL = 5936, SpvStorageClassHostOnlyINTEL = 5937, @@ -229,6 +272,7 @@ typedef enum SpvDim_ { SpvDimRect = 4, SpvDimBuffer = 5, SpvDimSubpassData = 6, + SpvDimTileImageDataEXT = 4173, SpvDimMax = 0x7fffffff, } SpvDim; @@ -335,6 +379,8 @@ typedef enum SpvImageChannelDataType_ { SpvImageChannelDataTypeFloat = 14, SpvImageChannelDataTypeUnormInt24 = 15, SpvImageChannelDataTypeUnormInt101010_2 = 16, + SpvImageChannelDataTypeUnsignedIntRaw10EXT = 19, + SpvImageChannelDataTypeUnsignedIntRaw12EXT = 20, SpvImageChannelDataTypeMax = 0x7fffffff, } SpvImageChannelDataType; @@ -392,8 +438,11 @@ typedef enum SpvFPFastMathModeShift_ { SpvFPFastMathModeNSZShift = 2, SpvFPFastMathModeAllowRecipShift = 3, SpvFPFastMathModeFastShift = 4, + SpvFPFastMathModeAllowContractShift = 16, SpvFPFastMathModeAllowContractFastINTELShift = 16, + SpvFPFastMathModeAllowReassocShift = 17, SpvFPFastMathModeAllowReassocINTELShift = 17, + SpvFPFastMathModeAllowTransformShift = 18, SpvFPFastMathModeMax = 0x7fffffff, } SpvFPFastMathModeShift; @@ -404,8 +453,11 @@ typedef enum SpvFPFastMathModeMask_ { SpvFPFastMathModeNSZMask = 0x00000004, SpvFPFastMathModeAllowRecipMask = 0x00000008, SpvFPFastMathModeFastMask = 0x00000010, + SpvFPFastMathModeAllowContractMask = 0x00010000, SpvFPFastMathModeAllowContractFastINTELMask = 0x00010000, + SpvFPFastMathModeAllowReassocMask = 0x00020000, SpvFPFastMathModeAllowReassocINTELMask = 0x00020000, + SpvFPFastMathModeAllowTransformMask = 0x00040000, } SpvFPFastMathModeMask; typedef enum SpvFPRoundingMode_ { @@ -439,6 +491,7 @@ typedef enum SpvFunctionParameterAttribute_ { SpvFunctionParameterAttributeNoCapture = 5, SpvFunctionParameterAttributeNoWrite = 6, SpvFunctionParameterAttributeNoReadWrite = 7, + SpvFunctionParameterAttributeRuntimeAlignedINTEL = 5940, SpvFunctionParameterAttributeMax = 0x7fffffff, } SpvFunctionParameterAttribute; @@ -492,11 +545,19 @@ typedef enum SpvDecoration_ { SpvDecorationMaxByteOffsetId = 47, SpvDecorationNoSignedWrap = 4469, SpvDecorationNoUnsignedWrap = 4470, + SpvDecorationWeightTextureQCOM = 4487, + SpvDecorationBlockMatchTextureQCOM = 4488, + SpvDecorationBlockMatchSamplerQCOM = 4499, SpvDecorationExplicitInterpAMD = 4999, + SpvDecorationNodeSharesPayloadLimitsWithAMDX = 5019, + SpvDecorationNodeMaxPayloadsAMDX = 5020, + SpvDecorationTrackFinishWritingAMDX = 5078, + SpvDecorationPayloadNodeNameAMDX = 5091, SpvDecorationOverrideCoverageNV = 5248, SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationPerPrimitiveEXT = 5271, SpvDecorationPerPrimitiveNV = 5271, SpvDecorationPerViewNV = 5272, SpvDecorationPerTaskNV = 5273, @@ -508,6 +569,7 @@ typedef enum SpvDecoration_ { SpvDecorationRestrictPointerEXT = 5355, SpvDecorationAliasedPointer = 5356, SpvDecorationAliasedPointerEXT = 5356, + SpvDecorationHitObjectShaderRecordBufferNV = 5386, SpvDecorationBindlessSamplerNV = 5398, SpvDecorationBindlessImageNV = 5399, SpvDecorationBoundSamplerNV = 5400, @@ -540,18 +602,45 @@ typedef enum SpvDecoration_ { SpvDecorationMergeINTEL = 5834, SpvDecorationBankBitsINTEL = 5835, SpvDecorationForcePow2DepthINTEL = 5836, + SpvDecorationStridesizeINTEL = 5883, + SpvDecorationWordsizeINTEL = 5884, + SpvDecorationTrueDualPortINTEL = 5885, SpvDecorationBurstCoalesceINTEL = 5899, SpvDecorationCacheSizeINTEL = 5900, SpvDecorationDontStaticallyCoalesceINTEL = 5901, SpvDecorationPrefetchINTEL = 5902, SpvDecorationStallEnableINTEL = 5905, SpvDecorationFuseLoopsInFunctionINTEL = 5907, + SpvDecorationMathOpDSPModeINTEL = 5909, + SpvDecorationAliasScopeINTEL = 5914, + SpvDecorationNoAliasINTEL = 5915, + SpvDecorationInitiationIntervalINTEL = 5917, + SpvDecorationMaxConcurrencyINTEL = 5918, + SpvDecorationPipelineEnableINTEL = 5919, SpvDecorationBufferLocationINTEL = 5921, SpvDecorationIOPipeStorageINTEL = 5944, SpvDecorationFunctionFloatingPointModeINTEL = 6080, SpvDecorationSingleElementVectorINTEL = 6085, SpvDecorationVectorComputeCallableFunctionINTEL = 6087, SpvDecorationMediaBlockIOINTEL = 6140, + SpvDecorationStallFreeINTEL = 6151, + SpvDecorationFPMaxErrorDecorationINTEL = 6170, + SpvDecorationLatencyControlLabelINTEL = 6172, + SpvDecorationLatencyControlConstraintINTEL = 6173, + SpvDecorationConduitKernelArgumentINTEL = 6175, + SpvDecorationRegisterMapKernelArgumentINTEL = 6176, + SpvDecorationMMHostInterfaceAddressWidthINTEL = 6177, + SpvDecorationMMHostInterfaceDataWidthINTEL = 6178, + SpvDecorationMMHostInterfaceLatencyINTEL = 6179, + SpvDecorationMMHostInterfaceReadWriteModeINTEL = 6180, + SpvDecorationMMHostInterfaceMaxBurstINTEL = 6181, + SpvDecorationMMHostInterfaceWaitRequestINTEL = 6182, + SpvDecorationStableKernelArgumentINTEL = 6183, + SpvDecorationHostAccessINTEL = 6188, + SpvDecorationInitModeINTEL = 6190, + SpvDecorationImplementInRegisterMapINTEL = 6191, + SpvDecorationCacheControlLoadINTEL = 6442, + SpvDecorationCacheControlStoreINTEL = 6443, SpvDecorationMax = 0x7fffffff, } SpvDecoration; @@ -597,6 +686,11 @@ typedef enum SpvBuiltIn_ { SpvBuiltInSubgroupLocalInvocationId = 41, SpvBuiltInVertexIndex = 42, SpvBuiltInInstanceIndex = 43, + SpvBuiltInCoreIDARM = 4160, + SpvBuiltInCoreCountARM = 4161, + SpvBuiltInCoreMaxIDARM = 4162, + SpvBuiltInWarpIDARM = 4163, + SpvBuiltInWarpMaxIDARM = 4164, SpvBuiltInSubgroupEqMask = 4416, SpvBuiltInSubgroupEqMaskKHR = 4416, SpvBuiltInSubgroupGeMask = 4417, @@ -622,6 +716,8 @@ typedef enum SpvBuiltIn_ { SpvBuiltInBaryCoordSmoothSampleAMD = 4997, SpvBuiltInBaryCoordPullModelAMD = 4998, SpvBuiltInFragStencilRefEXT = 5014, + SpvBuiltInCoalescedInputCountAMDX = 5021, + SpvBuiltInShaderIndexAMDX = 5073, SpvBuiltInViewportMaskNV = 5253, SpvBuiltInSecondaryPositionNV = 5257, SpvBuiltInSecondaryViewportMaskNV = 5258, @@ -644,6 +740,10 @@ typedef enum SpvBuiltIn_ { SpvBuiltInFragmentSizeNV = 5292, SpvBuiltInFragInvocationCountEXT = 5293, SpvBuiltInInvocationsPerPixelNV = 5293, + SpvBuiltInPrimitivePointIndicesEXT = 5294, + SpvBuiltInPrimitiveLineIndicesEXT = 5295, + SpvBuiltInPrimitiveTriangleIndicesEXT = 5296, + SpvBuiltInCullPrimitiveEXT = 5299, SpvBuiltInLaunchIdKHR = 5319, SpvBuiltInLaunchIdNV = 5319, SpvBuiltInLaunchSizeKHR = 5320, @@ -670,6 +770,9 @@ typedef enum SpvBuiltIn_ { SpvBuiltInHitKindKHR = 5333, SpvBuiltInHitKindNV = 5333, SpvBuiltInCurrentRayTimeNV = 5334, + SpvBuiltInHitTriangleVertexPositionsKHR = 5335, + SpvBuiltInHitMicroTriangleVertexPositionsNV = 5337, + SpvBuiltInHitMicroTriangleVertexBarycentricsNV = 5344, SpvBuiltInIncomingRayFlagsKHR = 5351, SpvBuiltInIncomingRayFlagsNV = 5351, SpvBuiltInRayGeometryIndexKHR = 5352, @@ -677,6 +780,9 @@ typedef enum SpvBuiltIn_ { SpvBuiltInSMCountNV = 5375, SpvBuiltInWarpIDNV = 5376, SpvBuiltInSMIDNV = 5377, + SpvBuiltInHitKindFrontFacingMicroTriangleNV = 5405, + SpvBuiltInHitKindBackFacingMicroTriangleNV = 5406, + SpvBuiltInCullMaskKHR = 6021, SpvBuiltInMax = 0x7fffffff, } SpvBuiltIn; @@ -710,6 +816,8 @@ typedef enum SpvLoopControlShift_ { SpvLoopControlMaxInterleavingINTELShift = 21, SpvLoopControlSpeculatedIterationsINTELShift = 22, SpvLoopControlNoFusionINTELShift = 23, + SpvLoopControlLoopCountINTELShift = 24, + SpvLoopControlMaxReinvocationDelayINTELShift = 25, SpvLoopControlMax = 0x7fffffff, } SpvLoopControlShift; @@ -732,6 +840,8 @@ typedef enum SpvLoopControlMask_ { SpvLoopControlMaxInterleavingINTELMask = 0x00200000, SpvLoopControlSpeculatedIterationsINTELMask = 0x00400000, SpvLoopControlNoFusionINTELMask = 0x00800000, + SpvLoopControlLoopCountINTELMask = 0x01000000, + SpvLoopControlMaxReinvocationDelayINTELMask = 0x02000000, } SpvLoopControlMask; typedef enum SpvFunctionControlShift_ { @@ -804,6 +914,8 @@ typedef enum SpvMemoryAccessShift_ { SpvMemoryAccessMakePointerVisibleKHRShift = 4, SpvMemoryAccessNonPrivatePointerShift = 5, SpvMemoryAccessNonPrivatePointerKHRShift = 5, + SpvMemoryAccessAliasScopeINTELMaskShift = 16, + SpvMemoryAccessNoAliasINTELMaskShift = 17, SpvMemoryAccessMax = 0x7fffffff, } SpvMemoryAccessShift; @@ -818,6 +930,8 @@ typedef enum SpvMemoryAccessMask_ { SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, SpvMemoryAccessNonPrivatePointerMask = 0x00000020, SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, + SpvMemoryAccessAliasScopeINTELMaskMask = 0x00010000, + SpvMemoryAccessNoAliasINTELMaskMask = 0x00020000, } SpvMemoryAccessMask; typedef enum SpvScope_ { @@ -931,6 +1045,11 @@ typedef enum SpvCapability_ { SpvCapabilityShaderLayer = 69, SpvCapabilityShaderViewportIndex = 70, SpvCapabilityUniformDecoration = 71, + SpvCapabilityCoreBuiltinsARM = 4165, + SpvCapabilityTileImageColorReadAccessEXT = 4166, + SpvCapabilityTileImageDepthReadAccessEXT = 4167, + SpvCapabilityTileImageStencilReadAccessEXT = 4168, + SpvCapabilityCooperativeMatrixLayoutsARM = 4201, SpvCapabilityFragmentShadingRateKHR = 4422, SpvCapabilitySubgroupBallotKHR = 4423, SpvCapabilityDrawParameters = 4427, @@ -962,6 +1081,10 @@ typedef enum SpvCapability_ { SpvCapabilityRayQueryKHR = 4472, SpvCapabilityRayTraversalPrimitiveCullingKHR = 4478, SpvCapabilityRayTracingKHR = 4479, + SpvCapabilityTextureSampleWeightedQCOM = 4484, + SpvCapabilityTextureBoxFilterQCOM = 4485, + SpvCapabilityTextureBlockMatchQCOM = 4486, + SpvCapabilityTextureBlockMatch2QCOM = 4498, SpvCapabilityFloat16ImageAMD = 5008, SpvCapabilityImageGatherBiasLodAMD = 5009, SpvCapabilityFragmentMaskAMD = 5010, @@ -969,6 +1092,8 @@ typedef enum SpvCapability_ { SpvCapabilityImageReadWriteLodAMD = 5015, SpvCapabilityInt64ImageEXT = 5016, SpvCapabilityShaderClockKHR = 5055, + SpvCapabilityShaderEnqueueAMDX = 5067, + SpvCapabilityQuadControlKHR = 5087, SpvCapabilitySampleMaskOverrideCoverageNV = 5249, SpvCapabilityGeometryShaderPassthroughNV = 5251, SpvCapabilityShaderViewportIndexLayerEXT = 5254, @@ -979,6 +1104,7 @@ typedef enum SpvCapability_ { SpvCapabilityFragmentFullyCoveredEXT = 5265, SpvCapabilityMeshShadingNV = 5266, SpvCapabilityImageFootprintNV = 5282, + SpvCapabilityMeshShadingEXT = 5283, SpvCapabilityFragmentBarycentricKHR = 5284, SpvCapabilityFragmentBarycentricNV = 5284, SpvCapabilityComputeDerivativeGroupQuadsNV = 5288, @@ -1009,6 +1135,7 @@ typedef enum SpvCapability_ { SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SpvCapabilityRayTracingPositionFetchKHR = 5336, SpvCapabilityRayTracingNV = 5340, SpvCapabilityRayTracingMotionBlurNV = 5341, SpvCapabilityVulkanMemoryModel = 5345, @@ -1026,7 +1153,14 @@ typedef enum SpvCapability_ { SpvCapabilityFragmentShaderPixelInterlockEXT = 5378, SpvCapabilityDemoteToHelperInvocation = 5379, SpvCapabilityDemoteToHelperInvocationEXT = 5379, + SpvCapabilityDisplacementMicromapNV = 5380, + SpvCapabilityRayTracingOpacityMicromapEXT = 5381, + SpvCapabilityShaderInvocationReorderNV = 5383, SpvCapabilityBindlessTextureNV = 5390, + SpvCapabilityRayQueryPositionFetchKHR = 5391, + SpvCapabilityAtomicFloat16VectorNV = 5404, + SpvCapabilityRayTracingDisplacementMicromapNV = 5409, + SpvCapabilityRawAccessChainsNV = 5414, SpvCapabilitySubgroupShuffleINTEL = 5568, SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, SpvCapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1059,9 +1193,13 @@ typedef enum SpvCapability_ { SpvCapabilityFPGAMemoryAccessesINTEL = 5898, SpvCapabilityFPGAClusterAttributesINTEL = 5904, SpvCapabilityLoopFuseINTEL = 5906, + SpvCapabilityFPGADSPControlINTEL = 5908, + SpvCapabilityMemoryAccessAliasingINTEL = 5910, + SpvCapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, SpvCapabilityFPGABufferLocationINTEL = 5920, SpvCapabilityArbitraryPrecisionFixedPointINTEL = 5922, SpvCapabilityUSMStorageClassesINTEL = 5935, + SpvCapabilityRuntimeAlignedAttributeINTEL = 5939, SpvCapabilityIOPipesINTEL = 5943, SpvCapabilityBlockingPipesINTEL = 5945, SpvCapabilityFPGARegINTEL = 5948, @@ -1073,13 +1211,31 @@ typedef enum SpvCapability_ { SpvCapabilityDotProductInput4x8BitPackedKHR = 6018, SpvCapabilityDotProduct = 6019, SpvCapabilityDotProductKHR = 6019, + SpvCapabilityRayCullMaskKHR = 6020, + SpvCapabilityCooperativeMatrixKHR = 6022, + SpvCapabilityReplicatedCompositesEXT = 6024, SpvCapabilityBitInstructions = 6025, + SpvCapabilityGroupNonUniformRotateKHR = 6026, + SpvCapabilityFloatControls2 = 6029, SpvCapabilityAtomicFloat32AddEXT = 6033, SpvCapabilityAtomicFloat64AddEXT = 6034, - SpvCapabilityLongConstantCompositeINTEL = 6089, + SpvCapabilityLongCompositesINTEL = 6089, SpvCapabilityOptNoneINTEL = 6094, SpvCapabilityAtomicFloat16AddEXT = 6095, SpvCapabilityDebugInfoModuleINTEL = 6114, + SpvCapabilityBFloat16ConversionINTEL = 6115, + SpvCapabilitySplitBarrierINTEL = 6141, + SpvCapabilityFPGAClusterAttributesV2INTEL = 6150, + SpvCapabilityFPGAKernelAttributesv2INTEL = 6161, + SpvCapabilityFPMaxErrorINTEL = 6169, + SpvCapabilityFPGALatencyControlINTEL = 6171, + SpvCapabilityFPGAArgumentInterfacesINTEL = 6174, + SpvCapabilityGlobalVariableHostAccessINTEL = 6187, + SpvCapabilityGlobalVariableFPGADecorationsINTEL = 6189, + SpvCapabilityGroupUniformArithmeticKHR = 6400, + SpvCapabilityMaskedGatherScatterINTEL = 6427, + SpvCapabilityCacheControlsINTEL = 6441, + SpvCapabilityRegisterLimitsINTEL = 6460, SpvCapabilityMax = 0x7fffffff, } SpvCapability; @@ -1094,6 +1250,7 @@ typedef enum SpvRayFlagsShift_ { SpvRayFlagsCullNoOpaqueKHRShift = 7, SpvRayFlagsSkipTrianglesKHRShift = 8, SpvRayFlagsSkipAABBsKHRShift = 9, + SpvRayFlagsForceOpacityMicromap2StateEXTShift = 10, SpvRayFlagsMax = 0x7fffffff, } SpvRayFlagsShift; @@ -1109,6 +1266,7 @@ typedef enum SpvRayFlagsMask_ { SpvRayFlagsCullNoOpaqueKHRMask = 0x00000080, SpvRayFlagsSkipTrianglesKHRMask = 0x00000100, SpvRayFlagsSkipAABBsKHRMask = 0x00000200, + SpvRayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, } SpvRayFlagsMask; typedef enum SpvRayQueryIntersection_ { @@ -1184,6 +1342,87 @@ typedef enum SpvPackedVectorFormat_ { SpvPackedVectorFormatMax = 0x7fffffff, } SpvPackedVectorFormat; +typedef enum SpvCooperativeMatrixOperandsShift_ { + SpvCooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3, + SpvCooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4, + SpvCooperativeMatrixOperandsMax = 0x7fffffff, +} SpvCooperativeMatrixOperandsShift; + +typedef enum SpvCooperativeMatrixOperandsMask_ { + SpvCooperativeMatrixOperandsMaskNone = 0, + SpvCooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008, + SpvCooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010, +} SpvCooperativeMatrixOperandsMask; + +typedef enum SpvCooperativeMatrixLayout_ { + SpvCooperativeMatrixLayoutRowMajorKHR = 0, + SpvCooperativeMatrixLayoutColumnMajorKHR = 1, + SpvCooperativeMatrixLayoutRowBlockedInterleavedARM = 4202, + SpvCooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203, + SpvCooperativeMatrixLayoutMax = 0x7fffffff, +} SpvCooperativeMatrixLayout; + +typedef enum SpvCooperativeMatrixUse_ { + SpvCooperativeMatrixUseMatrixAKHR = 0, + SpvCooperativeMatrixUseMatrixBKHR = 1, + SpvCooperativeMatrixUseMatrixAccumulatorKHR = 2, + SpvCooperativeMatrixUseMax = 0x7fffffff, +} SpvCooperativeMatrixUse; + +typedef enum SpvInitializationModeQualifier_ { + SpvInitializationModeQualifierInitOnDeviceReprogramINTEL = 0, + SpvInitializationModeQualifierInitOnDeviceResetINTEL = 1, + SpvInitializationModeQualifierMax = 0x7fffffff, +} SpvInitializationModeQualifier; + +typedef enum SpvHostAccessQualifier_ { + SpvHostAccessQualifierNoneINTEL = 0, + SpvHostAccessQualifierReadINTEL = 1, + SpvHostAccessQualifierWriteINTEL = 2, + SpvHostAccessQualifierReadWriteINTEL = 3, + SpvHostAccessQualifierMax = 0x7fffffff, +} SpvHostAccessQualifier; + +typedef enum SpvLoadCacheControl_ { + SpvLoadCacheControlUncachedINTEL = 0, + SpvLoadCacheControlCachedINTEL = 1, + SpvLoadCacheControlStreamingINTEL = 2, + SpvLoadCacheControlInvalidateAfterReadINTEL = 3, + SpvLoadCacheControlConstCachedINTEL = 4, + SpvLoadCacheControlMax = 0x7fffffff, +} SpvLoadCacheControl; + +typedef enum SpvStoreCacheControl_ { + SpvStoreCacheControlUncachedINTEL = 0, + SpvStoreCacheControlWriteThroughINTEL = 1, + SpvStoreCacheControlWriteBackINTEL = 2, + SpvStoreCacheControlStreamingINTEL = 3, + SpvStoreCacheControlMax = 0x7fffffff, +} SpvStoreCacheControl; + +typedef enum SpvNamedMaximumNumberOfRegisters_ { + SpvNamedMaximumNumberOfRegistersAutoINTEL = 0, + SpvNamedMaximumNumberOfRegistersMax = 0x7fffffff, +} SpvNamedMaximumNumberOfRegisters; + +typedef enum SpvRawAccessChainOperandsShift_ { + SpvRawAccessChainOperandsRobustnessPerComponentNVShift = 0, + SpvRawAccessChainOperandsRobustnessPerElementNVShift = 1, + SpvRawAccessChainOperandsMax = 0x7fffffff, +} SpvRawAccessChainOperandsShift; + +typedef enum SpvRawAccessChainOperandsMask_ { + SpvRawAccessChainOperandsMaskNone = 0, + SpvRawAccessChainOperandsRobustnessPerComponentNVMask = 0x00000001, + SpvRawAccessChainOperandsRobustnessPerElementNVMask = 0x00000002, +} SpvRawAccessChainOperandsMask; + typedef enum SpvOp_ { SpvOpNop = 0, SpvOpUndef = 1, @@ -1529,13 +1768,18 @@ typedef enum SpvOp_ { SpvOpPtrEqual = 401, SpvOpPtrNotEqual = 402, SpvOpPtrDiff = 403, + SpvOpColorAttachmentReadEXT = 4160, + SpvOpDepthAttachmentReadEXT = 4161, + SpvOpStencilAttachmentReadEXT = 4162, SpvOpTerminateInvocation = 4416, SpvOpSubgroupBallotKHR = 4421, SpvOpSubgroupFirstInvocationKHR = 4422, SpvOpSubgroupAllKHR = 4428, SpvOpSubgroupAnyKHR = 4429, SpvOpSubgroupAllEqualKHR = 4430, + SpvOpGroupNonUniformRotateKHR = 4431, SpvOpSubgroupReadInvocationKHR = 4432, + SpvOpExtInstWithForwardRefsKHR = 4433, SpvOpTraceRayKHR = 4445, SpvOpExecuteCallableKHR = 4446, SpvOpConvertUToAccelerationStructureKHR = 4447, @@ -1553,6 +1797,14 @@ typedef enum SpvOp_ { SpvOpUDotAccSatKHR = 4454, SpvOpSUDotAccSat = 4455, SpvOpSUDotAccSatKHR = 4455, + SpvOpTypeCooperativeMatrixKHR = 4456, + SpvOpCooperativeMatrixLoadKHR = 4457, + SpvOpCooperativeMatrixStoreKHR = 4458, + SpvOpCooperativeMatrixMulAddKHR = 4459, + SpvOpCooperativeMatrixLengthKHR = 4460, + SpvOpConstantCompositeReplicateEXT = 4461, + SpvOpSpecConstantCompositeReplicateEXT = 4462, + SpvOpCompositeConstructReplicateEXT = 4463, SpvOpTypeRayQueryKHR = 4472, SpvOpRayQueryInitializeKHR = 4473, SpvOpRayQueryTerminateKHR = 4474, @@ -1560,6 +1812,14 @@ typedef enum SpvOp_ { SpvOpRayQueryConfirmIntersectionKHR = 4476, SpvOpRayQueryProceedKHR = 4477, SpvOpRayQueryGetIntersectionTypeKHR = 4479, + SpvOpImageSampleWeightedQCOM = 4480, + SpvOpImageBoxFilterQCOM = 4481, + SpvOpImageBlockMatchSSDQCOM = 4482, + SpvOpImageBlockMatchSADQCOM = 4483, + SpvOpImageBlockMatchWindowSSDQCOM = 4500, + SpvOpImageBlockMatchWindowSADQCOM = 4501, + SpvOpImageBlockMatchGatherSSDQCOM = 4502, + SpvOpImageBlockMatchGatherSADQCOM = 4503, SpvOpGroupIAddNonUniformAMD = 5000, SpvOpGroupFAddNonUniformAMD = 5001, SpvOpGroupFMinNonUniformAMD = 5002, @@ -1571,9 +1831,51 @@ typedef enum SpvOp_ { SpvOpFragmentMaskFetchAMD = 5011, SpvOpFragmentFetchAMD = 5012, SpvOpReadClockKHR = 5056, + SpvOpFinalizeNodePayloadsAMDX = 5075, + SpvOpFinishWritingNodePayloadAMDX = 5078, + SpvOpInitializeNodePayloadsAMDX = 5090, + SpvOpGroupNonUniformQuadAllKHR = 5110, + SpvOpGroupNonUniformQuadAnyKHR = 5111, + SpvOpHitObjectRecordHitMotionNV = 5249, + SpvOpHitObjectRecordHitWithIndexMotionNV = 5250, + SpvOpHitObjectRecordMissMotionNV = 5251, + SpvOpHitObjectGetWorldToObjectNV = 5252, + SpvOpHitObjectGetObjectToWorldNV = 5253, + SpvOpHitObjectGetObjectRayDirectionNV = 5254, + SpvOpHitObjectGetObjectRayOriginNV = 5255, + SpvOpHitObjectTraceRayMotionNV = 5256, + SpvOpHitObjectGetShaderRecordBufferHandleNV = 5257, + SpvOpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + SpvOpHitObjectRecordEmptyNV = 5259, + SpvOpHitObjectTraceRayNV = 5260, + SpvOpHitObjectRecordHitNV = 5261, + SpvOpHitObjectRecordHitWithIndexNV = 5262, + SpvOpHitObjectRecordMissNV = 5263, + SpvOpHitObjectExecuteShaderNV = 5264, + SpvOpHitObjectGetCurrentTimeNV = 5265, + SpvOpHitObjectGetAttributesNV = 5266, + SpvOpHitObjectGetHitKindNV = 5267, + SpvOpHitObjectGetPrimitiveIndexNV = 5268, + SpvOpHitObjectGetGeometryIndexNV = 5269, + SpvOpHitObjectGetInstanceIdNV = 5270, + SpvOpHitObjectGetInstanceCustomIndexNV = 5271, + SpvOpHitObjectGetWorldRayDirectionNV = 5272, + SpvOpHitObjectGetWorldRayOriginNV = 5273, + SpvOpHitObjectGetRayTMaxNV = 5274, + SpvOpHitObjectGetRayTMinNV = 5275, + SpvOpHitObjectIsEmptyNV = 5276, + SpvOpHitObjectIsHitNV = 5277, + SpvOpHitObjectIsMissNV = 5278, + SpvOpReorderThreadWithHitObjectNV = 5279, + SpvOpReorderThreadWithHintNV = 5280, + SpvOpTypeHitObjectNV = 5281, SpvOpImageSampleFootprintNV = 5283, + SpvOpEmitMeshTasksEXT = 5294, + SpvOpSetMeshOutputsEXT = 5295, SpvOpGroupNonUniformPartitionNV = 5296, SpvOpWritePackedPrimitiveIndices4x8NV = 5299, + SpvOpFetchMicroTriangleVertexPositionNV = 5300, + SpvOpFetchMicroTriangleVertexBarycentricNV = 5301, SpvOpReportIntersectionKHR = 5334, SpvOpReportIntersectionNV = 5334, SpvOpIgnoreIntersectionNV = 5335, @@ -1581,6 +1883,7 @@ typedef enum SpvOp_ { SpvOpTraceNV = 5337, SpvOpTraceMotionNV = 5338, SpvOpTraceRayMotionNV = 5339, + SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, SpvOpTypeAccelerationStructureKHR = 5341, SpvOpTypeAccelerationStructureNV = 5341, SpvOpExecuteCallableNV = 5344, @@ -1601,6 +1904,7 @@ typedef enum SpvOp_ { SpvOpConvertUToSampledImageNV = 5395, SpvOpConvertSampledImageToUNV = 5396, SpvOpSamplerImageAddressingModeNV = 5397, + SpvOpRawAccessChainNV = 5398, SpvOpSubgroupShuffleINTEL = 5571, SpvOpSubgroupShuffleDownINTEL = 5572, SpvOpSubgroupShuffleUpINTEL = 5573, @@ -1801,6 +2105,9 @@ typedef enum SpvOp_ { SpvOpArbitraryFloatPowRINTEL = 5881, SpvOpArbitraryFloatPowNINTEL = 5882, SpvOpLoopControlINTEL = 5887, + SpvOpAliasDomainDeclINTEL = 5911, + SpvOpAliasScopeDeclINTEL = 5912, + SpvOpAliasScopeListDeclINTEL = 5913, SpvOpFixedSqrtINTEL = 5923, SpvOpFixedRecipINTEL = 5924, SpvOpFixedRsqrtINTEL = 5925, @@ -1839,10 +2146,28 @@ typedef enum SpvOp_ { SpvOpTypeStructContinuedINTEL = 6090, SpvOpConstantCompositeContinuedINTEL = 6091, SpvOpSpecConstantCompositeContinuedINTEL = 6092, + SpvOpCompositeConstructContinuedINTEL = 6096, + SpvOpConvertFToBF16INTEL = 6116, + SpvOpConvertBF16ToFINTEL = 6117, + SpvOpControlBarrierArriveINTEL = 6142, + SpvOpControlBarrierWaitINTEL = 6143, + SpvOpGroupIMulKHR = 6401, + SpvOpGroupFMulKHR = 6402, + SpvOpGroupBitwiseAndKHR = 6403, + SpvOpGroupBitwiseOrKHR = 6404, + SpvOpGroupBitwiseXorKHR = 6405, + SpvOpGroupLogicalAndKHR = 6406, + SpvOpGroupLogicalOrKHR = 6407, + SpvOpGroupLogicalXorKHR = 6408, + SpvOpMaskedGatherINTEL = 6428, + SpvOpMaskedScatterINTEL = 6429, SpvOpMax = 0x7fffffff, } SpvOp; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2191,13 +2516,18 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpPtrEqual: *hasResult = true; *hasResultType = true; break; case SpvOpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case SpvOpPtrDiff: *hasResult = true; *hasResultType = true; break; + case SpvOpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case SpvOpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case SpvOpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case SpvOpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case SpvOpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2209,6 +2539,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpSDotAccSat: *hasResult = true; *hasResultType = true; break; case SpvOpUDotAccSat: *hasResult = true; *hasResultType = true; break; case SpvOpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case SpvOpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case SpvOpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case SpvOpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2216,6 +2554,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2227,16 +2573,59 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case SpvOpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case SpvOpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case SpvOpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case SpvOpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case SpvOpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case SpvOpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case SpvOpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case SpvOpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case SpvOpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case SpvOpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case SpvOpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case SpvOpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2254,6 +2643,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case SpvOpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case SpvOpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case SpvOpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2452,6 +2842,9 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case SpvOpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case SpvOpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case SpvOpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2490,8 +2883,1804 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case SpvOpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case SpvOpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; + } +} +inline const char* SpvSourceLanguageToString(SpvSourceLanguage value) { + switch (value) { + case SpvSourceLanguageUnknown: return "Unknown"; + case SpvSourceLanguageESSL: return "ESSL"; + case SpvSourceLanguageGLSL: return "GLSL"; + case SpvSourceLanguageOpenCL_C: return "OpenCL_C"; + case SpvSourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SpvSourceLanguageHLSL: return "HLSL"; + case SpvSourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SpvSourceLanguageSYCL: return "SYCL"; + case SpvSourceLanguageHERO_C: return "HERO_C"; + case SpvSourceLanguageNZSL: return "NZSL"; + case SpvSourceLanguageWGSL: return "WGSL"; + case SpvSourceLanguageSlang: return "Slang"; + case SpvSourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* SpvExecutionModelToString(SpvExecutionModel value) { + switch (value) { + case SpvExecutionModelVertex: return "Vertex"; + case SpvExecutionModelTessellationControl: return "TessellationControl"; + case SpvExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case SpvExecutionModelGeometry: return "Geometry"; + case SpvExecutionModelFragment: return "Fragment"; + case SpvExecutionModelGLCompute: return "GLCompute"; + case SpvExecutionModelKernel: return "Kernel"; + case SpvExecutionModelTaskNV: return "TaskNV"; + case SpvExecutionModelMeshNV: return "MeshNV"; + case SpvExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case SpvExecutionModelIntersectionKHR: return "IntersectionKHR"; + case SpvExecutionModelAnyHitKHR: return "AnyHitKHR"; + case SpvExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case SpvExecutionModelMissKHR: return "MissKHR"; + case SpvExecutionModelCallableKHR: return "CallableKHR"; + case SpvExecutionModelTaskEXT: return "TaskEXT"; + case SpvExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* SpvAddressingModelToString(SpvAddressingModel value) { + switch (value) { + case SpvAddressingModelLogical: return "Logical"; + case SpvAddressingModelPhysical32: return "Physical32"; + case SpvAddressingModelPhysical64: return "Physical64"; + case SpvAddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* SpvMemoryModelToString(SpvMemoryModel value) { + switch (value) { + case SpvMemoryModelSimple: return "Simple"; + case SpvMemoryModelGLSL450: return "GLSL450"; + case SpvMemoryModelOpenCL: return "OpenCL"; + case SpvMemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* SpvExecutionModeToString(SpvExecutionMode value) { + switch (value) { + case SpvExecutionModeInvocations: return "Invocations"; + case SpvExecutionModeSpacingEqual: return "SpacingEqual"; + case SpvExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case SpvExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case SpvExecutionModeVertexOrderCw: return "VertexOrderCw"; + case SpvExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case SpvExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case SpvExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case SpvExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case SpvExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case SpvExecutionModePointMode: return "PointMode"; + case SpvExecutionModeXfb: return "Xfb"; + case SpvExecutionModeDepthReplacing: return "DepthReplacing"; + case SpvExecutionModeDepthGreater: return "DepthGreater"; + case SpvExecutionModeDepthLess: return "DepthLess"; + case SpvExecutionModeDepthUnchanged: return "DepthUnchanged"; + case SpvExecutionModeLocalSize: return "LocalSize"; + case SpvExecutionModeLocalSizeHint: return "LocalSizeHint"; + case SpvExecutionModeInputPoints: return "InputPoints"; + case SpvExecutionModeInputLines: return "InputLines"; + case SpvExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case SpvExecutionModeTriangles: return "Triangles"; + case SpvExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case SpvExecutionModeQuads: return "Quads"; + case SpvExecutionModeIsolines: return "Isolines"; + case SpvExecutionModeOutputVertices: return "OutputVertices"; + case SpvExecutionModeOutputPoints: return "OutputPoints"; + case SpvExecutionModeOutputLineStrip: return "OutputLineStrip"; + case SpvExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case SpvExecutionModeVecTypeHint: return "VecTypeHint"; + case SpvExecutionModeContractionOff: return "ContractionOff"; + case SpvExecutionModeInitializer: return "Initializer"; + case SpvExecutionModeFinalizer: return "Finalizer"; + case SpvExecutionModeSubgroupSize: return "SubgroupSize"; + case SpvExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case SpvExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case SpvExecutionModeLocalSizeId: return "LocalSizeId"; + case SpvExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case SpvExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case SpvExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case SpvExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case SpvExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case SpvExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case SpvExecutionModeDenormPreserve: return "DenormPreserve"; + case SpvExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case SpvExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case SpvExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case SpvExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case SpvExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case SpvExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case SpvExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case SpvExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case SpvExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case SpvExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case SpvExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case SpvExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case SpvExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case SpvExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case SpvExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case SpvExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case SpvExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case SpvExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case SpvExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case SpvExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case SpvExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case SpvExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case SpvExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case SpvExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case SpvExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case SpvExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case SpvExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case SpvExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case SpvExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case SpvExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case SpvExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case SpvExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case SpvExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case SpvExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case SpvExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case SpvExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case SpvExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case SpvExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case SpvExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case SpvExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case SpvExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case SpvExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case SpvExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case SpvExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case SpvExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case SpvExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case SpvExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case SpvExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvStorageClassToString(SpvStorageClass value) { + switch (value) { + case SpvStorageClassUniformConstant: return "UniformConstant"; + case SpvStorageClassInput: return "Input"; + case SpvStorageClassUniform: return "Uniform"; + case SpvStorageClassOutput: return "Output"; + case SpvStorageClassWorkgroup: return "Workgroup"; + case SpvStorageClassCrossWorkgroup: return "CrossWorkgroup"; + case SpvStorageClassPrivate: return "Private"; + case SpvStorageClassFunction: return "Function"; + case SpvStorageClassGeneric: return "Generic"; + case SpvStorageClassPushConstant: return "PushConstant"; + case SpvStorageClassAtomicCounter: return "AtomicCounter"; + case SpvStorageClassImage: return "Image"; + case SpvStorageClassStorageBuffer: return "StorageBuffer"; + case SpvStorageClassTileImageEXT: return "TileImageEXT"; + case SpvStorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case SpvStorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case SpvStorageClassCallableDataKHR: return "CallableDataKHR"; + case SpvStorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case SpvStorageClassRayPayloadKHR: return "RayPayloadKHR"; + case SpvStorageClassHitAttributeKHR: return "HitAttributeKHR"; + case SpvStorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case SpvStorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case SpvStorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case SpvStorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case SpvStorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case SpvStorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case SpvStorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case SpvStorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvDimToString(SpvDim value) { + switch (value) { + case SpvDim1D: return "1D"; + case SpvDim2D: return "2D"; + case SpvDim3D: return "3D"; + case SpvDimCube: return "Cube"; + case SpvDimRect: return "Rect"; + case SpvDimBuffer: return "Buffer"; + case SpvDimSubpassData: return "SubpassData"; + case SpvDimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SpvSamplerAddressingModeToString(SpvSamplerAddressingMode value) { + switch (value) { + case SpvSamplerAddressingModeNone: return "None"; + case SpvSamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SpvSamplerAddressingModeClamp: return "Clamp"; + case SpvSamplerAddressingModeRepeat: return "Repeat"; + case SpvSamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SpvSamplerFilterModeToString(SpvSamplerFilterMode value) { + switch (value) { + case SpvSamplerFilterModeNearest: return "Nearest"; + case SpvSamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* SpvImageFormatToString(SpvImageFormat value) { + switch (value) { + case SpvImageFormatUnknown: return "Unknown"; + case SpvImageFormatRgba32f: return "Rgba32f"; + case SpvImageFormatRgba16f: return "Rgba16f"; + case SpvImageFormatR32f: return "R32f"; + case SpvImageFormatRgba8: return "Rgba8"; + case SpvImageFormatRgba8Snorm: return "Rgba8Snorm"; + case SpvImageFormatRg32f: return "Rg32f"; + case SpvImageFormatRg16f: return "Rg16f"; + case SpvImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case SpvImageFormatR16f: return "R16f"; + case SpvImageFormatRgba16: return "Rgba16"; + case SpvImageFormatRgb10A2: return "Rgb10A2"; + case SpvImageFormatRg16: return "Rg16"; + case SpvImageFormatRg8: return "Rg8"; + case SpvImageFormatR16: return "R16"; + case SpvImageFormatR8: return "R8"; + case SpvImageFormatRgba16Snorm: return "Rgba16Snorm"; + case SpvImageFormatRg16Snorm: return "Rg16Snorm"; + case SpvImageFormatRg8Snorm: return "Rg8Snorm"; + case SpvImageFormatR16Snorm: return "R16Snorm"; + case SpvImageFormatR8Snorm: return "R8Snorm"; + case SpvImageFormatRgba32i: return "Rgba32i"; + case SpvImageFormatRgba16i: return "Rgba16i"; + case SpvImageFormatRgba8i: return "Rgba8i"; + case SpvImageFormatR32i: return "R32i"; + case SpvImageFormatRg32i: return "Rg32i"; + case SpvImageFormatRg16i: return "Rg16i"; + case SpvImageFormatRg8i: return "Rg8i"; + case SpvImageFormatR16i: return "R16i"; + case SpvImageFormatR8i: return "R8i"; + case SpvImageFormatRgba32ui: return "Rgba32ui"; + case SpvImageFormatRgba16ui: return "Rgba16ui"; + case SpvImageFormatRgba8ui: return "Rgba8ui"; + case SpvImageFormatR32ui: return "R32ui"; + case SpvImageFormatRgb10a2ui: return "Rgb10a2ui"; + case SpvImageFormatRg32ui: return "Rg32ui"; + case SpvImageFormatRg16ui: return "Rg16ui"; + case SpvImageFormatRg8ui: return "Rg8ui"; + case SpvImageFormatR16ui: return "R16ui"; + case SpvImageFormatR8ui: return "R8ui"; + case SpvImageFormatR64ui: return "R64ui"; + case SpvImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* SpvImageChannelOrderToString(SpvImageChannelOrder value) { + switch (value) { + case SpvImageChannelOrderR: return "R"; + case SpvImageChannelOrderA: return "A"; + case SpvImageChannelOrderRG: return "RG"; + case SpvImageChannelOrderRA: return "RA"; + case SpvImageChannelOrderRGB: return "RGB"; + case SpvImageChannelOrderRGBA: return "RGBA"; + case SpvImageChannelOrderBGRA: return "BGRA"; + case SpvImageChannelOrderARGB: return "ARGB"; + case SpvImageChannelOrderIntensity: return "Intensity"; + case SpvImageChannelOrderLuminance: return "Luminance"; + case SpvImageChannelOrderRx: return "Rx"; + case SpvImageChannelOrderRGx: return "RGx"; + case SpvImageChannelOrderRGBx: return "RGBx"; + case SpvImageChannelOrderDepth: return "Depth"; + case SpvImageChannelOrderDepthStencil: return "DepthStencil"; + case SpvImageChannelOrdersRGB: return "sRGB"; + case SpvImageChannelOrdersRGBx: return "sRGBx"; + case SpvImageChannelOrdersRGBA: return "sRGBA"; + case SpvImageChannelOrdersBGRA: return "sBGRA"; + case SpvImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* SpvImageChannelDataTypeToString(SpvImageChannelDataType value) { + switch (value) { + case SpvImageChannelDataTypeSnormInt8: return "SnormInt8"; + case SpvImageChannelDataTypeSnormInt16: return "SnormInt16"; + case SpvImageChannelDataTypeUnormInt8: return "UnormInt8"; + case SpvImageChannelDataTypeUnormInt16: return "UnormInt16"; + case SpvImageChannelDataTypeUnormShort565: return "UnormShort565"; + case SpvImageChannelDataTypeUnormShort555: return "UnormShort555"; + case SpvImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case SpvImageChannelDataTypeSignedInt8: return "SignedInt8"; + case SpvImageChannelDataTypeSignedInt16: return "SignedInt16"; + case SpvImageChannelDataTypeSignedInt32: return "SignedInt32"; + case SpvImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case SpvImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case SpvImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case SpvImageChannelDataTypeHalfFloat: return "HalfFloat"; + case SpvImageChannelDataTypeFloat: return "Float"; + case SpvImageChannelDataTypeUnormInt24: return "UnormInt24"; + case SpvImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case SpvImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case SpvImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; } } + +inline const char* SpvFPRoundingModeToString(SpvFPRoundingMode value) { + switch (value) { + case SpvFPRoundingModeRTE: return "RTE"; + case SpvFPRoundingModeRTZ: return "RTZ"; + case SpvFPRoundingModeRTP: return "RTP"; + case SpvFPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* SpvLinkageTypeToString(SpvLinkageType value) { + switch (value) { + case SpvLinkageTypeExport: return "Export"; + case SpvLinkageTypeImport: return "Import"; + case SpvLinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; + } +} + +inline const char* SpvAccessQualifierToString(SpvAccessQualifier value) { + switch (value) { + case SpvAccessQualifierReadOnly: return "ReadOnly"; + case SpvAccessQualifierWriteOnly: return "WriteOnly"; + case SpvAccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* SpvFunctionParameterAttributeToString(SpvFunctionParameterAttribute value) { + switch (value) { + case SpvFunctionParameterAttributeZext: return "Zext"; + case SpvFunctionParameterAttributeSext: return "Sext"; + case SpvFunctionParameterAttributeByVal: return "ByVal"; + case SpvFunctionParameterAttributeSret: return "Sret"; + case SpvFunctionParameterAttributeNoAlias: return "NoAlias"; + case SpvFunctionParameterAttributeNoCapture: return "NoCapture"; + case SpvFunctionParameterAttributeNoWrite: return "NoWrite"; + case SpvFunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case SpvFunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvDecorationToString(SpvDecoration value) { + switch (value) { + case SpvDecorationRelaxedPrecision: return "RelaxedPrecision"; + case SpvDecorationSpecId: return "SpecId"; + case SpvDecorationBlock: return "Block"; + case SpvDecorationBufferBlock: return "BufferBlock"; + case SpvDecorationRowMajor: return "RowMajor"; + case SpvDecorationColMajor: return "ColMajor"; + case SpvDecorationArrayStride: return "ArrayStride"; + case SpvDecorationMatrixStride: return "MatrixStride"; + case SpvDecorationGLSLShared: return "GLSLShared"; + case SpvDecorationGLSLPacked: return "GLSLPacked"; + case SpvDecorationCPacked: return "CPacked"; + case SpvDecorationBuiltIn: return "BuiltIn"; + case SpvDecorationNoPerspective: return "NoPerspective"; + case SpvDecorationFlat: return "Flat"; + case SpvDecorationPatch: return "Patch"; + case SpvDecorationCentroid: return "Centroid"; + case SpvDecorationSample: return "Sample"; + case SpvDecorationInvariant: return "Invariant"; + case SpvDecorationRestrict: return "Restrict"; + case SpvDecorationAliased: return "Aliased"; + case SpvDecorationVolatile: return "Volatile"; + case SpvDecorationConstant: return "Constant"; + case SpvDecorationCoherent: return "Coherent"; + case SpvDecorationNonWritable: return "NonWritable"; + case SpvDecorationNonReadable: return "NonReadable"; + case SpvDecorationUniform: return "Uniform"; + case SpvDecorationUniformId: return "UniformId"; + case SpvDecorationSaturatedConversion: return "SaturatedConversion"; + case SpvDecorationStream: return "Stream"; + case SpvDecorationLocation: return "Location"; + case SpvDecorationComponent: return "Component"; + case SpvDecorationIndex: return "Index"; + case SpvDecorationBinding: return "Binding"; + case SpvDecorationDescriptorSet: return "DescriptorSet"; + case SpvDecorationOffset: return "Offset"; + case SpvDecorationXfbBuffer: return "XfbBuffer"; + case SpvDecorationXfbStride: return "XfbStride"; + case SpvDecorationFuncParamAttr: return "FuncParamAttr"; + case SpvDecorationFPRoundingMode: return "FPRoundingMode"; + case SpvDecorationFPFastMathMode: return "FPFastMathMode"; + case SpvDecorationLinkageAttributes: return "LinkageAttributes"; + case SpvDecorationNoContraction: return "NoContraction"; + case SpvDecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case SpvDecorationAlignment: return "Alignment"; + case SpvDecorationMaxByteOffset: return "MaxByteOffset"; + case SpvDecorationAlignmentId: return "AlignmentId"; + case SpvDecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case SpvDecorationNoSignedWrap: return "NoSignedWrap"; + case SpvDecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case SpvDecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case SpvDecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case SpvDecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case SpvDecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case SpvDecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case SpvDecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case SpvDecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case SpvDecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case SpvDecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case SpvDecorationPassthroughNV: return "PassthroughNV"; + case SpvDecorationViewportRelativeNV: return "ViewportRelativeNV"; + case SpvDecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case SpvDecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case SpvDecorationPerViewNV: return "PerViewNV"; + case SpvDecorationPerTaskNV: return "PerTaskNV"; + case SpvDecorationPerVertexKHR: return "PerVertexKHR"; + case SpvDecorationNonUniform: return "NonUniform"; + case SpvDecorationRestrictPointer: return "RestrictPointer"; + case SpvDecorationAliasedPointer: return "AliasedPointer"; + case SpvDecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case SpvDecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case SpvDecorationBindlessImageNV: return "BindlessImageNV"; + case SpvDecorationBoundSamplerNV: return "BoundSamplerNV"; + case SpvDecorationBoundImageNV: return "BoundImageNV"; + case SpvDecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case SpvDecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case SpvDecorationClobberINTEL: return "ClobberINTEL"; + case SpvDecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case SpvDecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case SpvDecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case SpvDecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case SpvDecorationStackCallINTEL: return "StackCallINTEL"; + case SpvDecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case SpvDecorationCounterBuffer: return "CounterBuffer"; + case SpvDecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case SpvDecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case SpvDecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case SpvDecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case SpvDecorationRegisterINTEL: return "RegisterINTEL"; + case SpvDecorationMemoryINTEL: return "MemoryINTEL"; + case SpvDecorationNumbanksINTEL: return "NumbanksINTEL"; + case SpvDecorationBankwidthINTEL: return "BankwidthINTEL"; + case SpvDecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case SpvDecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case SpvDecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case SpvDecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case SpvDecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case SpvDecorationMergeINTEL: return "MergeINTEL"; + case SpvDecorationBankBitsINTEL: return "BankBitsINTEL"; + case SpvDecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case SpvDecorationStridesizeINTEL: return "StridesizeINTEL"; + case SpvDecorationWordsizeINTEL: return "WordsizeINTEL"; + case SpvDecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case SpvDecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case SpvDecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case SpvDecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case SpvDecorationPrefetchINTEL: return "PrefetchINTEL"; + case SpvDecorationStallEnableINTEL: return "StallEnableINTEL"; + case SpvDecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case SpvDecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case SpvDecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case SpvDecorationNoAliasINTEL: return "NoAliasINTEL"; + case SpvDecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case SpvDecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case SpvDecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case SpvDecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case SpvDecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case SpvDecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case SpvDecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case SpvDecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case SpvDecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case SpvDecorationStallFreeINTEL: return "StallFreeINTEL"; + case SpvDecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case SpvDecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case SpvDecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case SpvDecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case SpvDecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case SpvDecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case SpvDecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case SpvDecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case SpvDecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case SpvDecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case SpvDecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case SpvDecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case SpvDecorationHostAccessINTEL: return "HostAccessINTEL"; + case SpvDecorationInitModeINTEL: return "InitModeINTEL"; + case SpvDecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case SpvDecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case SpvDecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvBuiltInToString(SpvBuiltIn value) { + switch (value) { + case SpvBuiltInPosition: return "Position"; + case SpvBuiltInPointSize: return "PointSize"; + case SpvBuiltInClipDistance: return "ClipDistance"; + case SpvBuiltInCullDistance: return "CullDistance"; + case SpvBuiltInVertexId: return "VertexId"; + case SpvBuiltInInstanceId: return "InstanceId"; + case SpvBuiltInPrimitiveId: return "PrimitiveId"; + case SpvBuiltInInvocationId: return "InvocationId"; + case SpvBuiltInLayer: return "Layer"; + case SpvBuiltInViewportIndex: return "ViewportIndex"; + case SpvBuiltInTessLevelOuter: return "TessLevelOuter"; + case SpvBuiltInTessLevelInner: return "TessLevelInner"; + case SpvBuiltInTessCoord: return "TessCoord"; + case SpvBuiltInPatchVertices: return "PatchVertices"; + case SpvBuiltInFragCoord: return "FragCoord"; + case SpvBuiltInPointCoord: return "PointCoord"; + case SpvBuiltInFrontFacing: return "FrontFacing"; + case SpvBuiltInSampleId: return "SampleId"; + case SpvBuiltInSamplePosition: return "SamplePosition"; + case SpvBuiltInSampleMask: return "SampleMask"; + case SpvBuiltInFragDepth: return "FragDepth"; + case SpvBuiltInHelperInvocation: return "HelperInvocation"; + case SpvBuiltInNumWorkgroups: return "NumWorkgroups"; + case SpvBuiltInWorkgroupSize: return "WorkgroupSize"; + case SpvBuiltInWorkgroupId: return "WorkgroupId"; + case SpvBuiltInLocalInvocationId: return "LocalInvocationId"; + case SpvBuiltInGlobalInvocationId: return "GlobalInvocationId"; + case SpvBuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case SpvBuiltInWorkDim: return "WorkDim"; + case SpvBuiltInGlobalSize: return "GlobalSize"; + case SpvBuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case SpvBuiltInGlobalOffset: return "GlobalOffset"; + case SpvBuiltInGlobalLinearId: return "GlobalLinearId"; + case SpvBuiltInSubgroupSize: return "SubgroupSize"; + case SpvBuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case SpvBuiltInNumSubgroups: return "NumSubgroups"; + case SpvBuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case SpvBuiltInSubgroupId: return "SubgroupId"; + case SpvBuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case SpvBuiltInVertexIndex: return "VertexIndex"; + case SpvBuiltInInstanceIndex: return "InstanceIndex"; + case SpvBuiltInCoreIDARM: return "CoreIDARM"; + case SpvBuiltInCoreCountARM: return "CoreCountARM"; + case SpvBuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case SpvBuiltInWarpIDARM: return "WarpIDARM"; + case SpvBuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case SpvBuiltInSubgroupEqMask: return "SubgroupEqMask"; + case SpvBuiltInSubgroupGeMask: return "SubgroupGeMask"; + case SpvBuiltInSubgroupGtMask: return "SubgroupGtMask"; + case SpvBuiltInSubgroupLeMask: return "SubgroupLeMask"; + case SpvBuiltInSubgroupLtMask: return "SubgroupLtMask"; + case SpvBuiltInBaseVertex: return "BaseVertex"; + case SpvBuiltInBaseInstance: return "BaseInstance"; + case SpvBuiltInDrawIndex: return "DrawIndex"; + case SpvBuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case SpvBuiltInDeviceIndex: return "DeviceIndex"; + case SpvBuiltInViewIndex: return "ViewIndex"; + case SpvBuiltInShadingRateKHR: return "ShadingRateKHR"; + case SpvBuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case SpvBuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case SpvBuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case SpvBuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case SpvBuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case SpvBuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case SpvBuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case SpvBuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case SpvBuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case SpvBuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case SpvBuiltInViewportMaskNV: return "ViewportMaskNV"; + case SpvBuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case SpvBuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case SpvBuiltInPositionPerViewNV: return "PositionPerViewNV"; + case SpvBuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case SpvBuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case SpvBuiltInTaskCountNV: return "TaskCountNV"; + case SpvBuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case SpvBuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case SpvBuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case SpvBuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case SpvBuiltInLayerPerViewNV: return "LayerPerViewNV"; + case SpvBuiltInMeshViewCountNV: return "MeshViewCountNV"; + case SpvBuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case SpvBuiltInBaryCoordKHR: return "BaryCoordKHR"; + case SpvBuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case SpvBuiltInFragSizeEXT: return "FragSizeEXT"; + case SpvBuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case SpvBuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case SpvBuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case SpvBuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case SpvBuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case SpvBuiltInLaunchIdKHR: return "LaunchIdKHR"; + case SpvBuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case SpvBuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case SpvBuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case SpvBuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case SpvBuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case SpvBuiltInRayTminKHR: return "RayTminKHR"; + case SpvBuiltInRayTmaxKHR: return "RayTmaxKHR"; + case SpvBuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case SpvBuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case SpvBuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case SpvBuiltInHitTNV: return "HitTNV"; + case SpvBuiltInHitKindKHR: return "HitKindKHR"; + case SpvBuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case SpvBuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case SpvBuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case SpvBuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case SpvBuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case SpvBuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case SpvBuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case SpvBuiltInSMCountNV: return "SMCountNV"; + case SpvBuiltInWarpIDNV: return "WarpIDNV"; + case SpvBuiltInSMIDNV: return "SMIDNV"; + case SpvBuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case SpvBuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case SpvBuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvScopeToString(SpvScope value) { + switch (value) { + case SpvScopeCrossDevice: return "CrossDevice"; + case SpvScopeDevice: return "Device"; + case SpvScopeWorkgroup: return "Workgroup"; + case SpvScopeSubgroup: return "Subgroup"; + case SpvScopeInvocation: return "Invocation"; + case SpvScopeQueueFamily: return "QueueFamily"; + case SpvScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvGroupOperationToString(SpvGroupOperation value) { + switch (value) { + case SpvGroupOperationReduce: return "Reduce"; + case SpvGroupOperationInclusiveScan: return "InclusiveScan"; + case SpvGroupOperationExclusiveScan: return "ExclusiveScan"; + case SpvGroupOperationClusteredReduce: return "ClusteredReduce"; + case SpvGroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case SpvGroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case SpvGroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* SpvKernelEnqueueFlagsToString(SpvKernelEnqueueFlags value) { + switch (value) { + case SpvKernelEnqueueFlagsNoWait: return "NoWait"; + case SpvKernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case SpvKernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* SpvCapabilityToString(SpvCapability value) { + switch (value) { + case SpvCapabilityMatrix: return "Matrix"; + case SpvCapabilityShader: return "Shader"; + case SpvCapabilityGeometry: return "Geometry"; + case SpvCapabilityTessellation: return "Tessellation"; + case SpvCapabilityAddresses: return "Addresses"; + case SpvCapabilityLinkage: return "Linkage"; + case SpvCapabilityKernel: return "Kernel"; + case SpvCapabilityVector16: return "Vector16"; + case SpvCapabilityFloat16Buffer: return "Float16Buffer"; + case SpvCapabilityFloat16: return "Float16"; + case SpvCapabilityFloat64: return "Float64"; + case SpvCapabilityInt64: return "Int64"; + case SpvCapabilityInt64Atomics: return "Int64Atomics"; + case SpvCapabilityImageBasic: return "ImageBasic"; + case SpvCapabilityImageReadWrite: return "ImageReadWrite"; + case SpvCapabilityImageMipmap: return "ImageMipmap"; + case SpvCapabilityPipes: return "Pipes"; + case SpvCapabilityGroups: return "Groups"; + case SpvCapabilityDeviceEnqueue: return "DeviceEnqueue"; + case SpvCapabilityLiteralSampler: return "LiteralSampler"; + case SpvCapabilityAtomicStorage: return "AtomicStorage"; + case SpvCapabilityInt16: return "Int16"; + case SpvCapabilityTessellationPointSize: return "TessellationPointSize"; + case SpvCapabilityGeometryPointSize: return "GeometryPointSize"; + case SpvCapabilityImageGatherExtended: return "ImageGatherExtended"; + case SpvCapabilityStorageImageMultisample: return "StorageImageMultisample"; + case SpvCapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case SpvCapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case SpvCapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case SpvCapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case SpvCapabilityClipDistance: return "ClipDistance"; + case SpvCapabilityCullDistance: return "CullDistance"; + case SpvCapabilityImageCubeArray: return "ImageCubeArray"; + case SpvCapabilitySampleRateShading: return "SampleRateShading"; + case SpvCapabilityImageRect: return "ImageRect"; + case SpvCapabilitySampledRect: return "SampledRect"; + case SpvCapabilityGenericPointer: return "GenericPointer"; + case SpvCapabilityInt8: return "Int8"; + case SpvCapabilityInputAttachment: return "InputAttachment"; + case SpvCapabilitySparseResidency: return "SparseResidency"; + case SpvCapabilityMinLod: return "MinLod"; + case SpvCapabilitySampled1D: return "Sampled1D"; + case SpvCapabilityImage1D: return "Image1D"; + case SpvCapabilitySampledCubeArray: return "SampledCubeArray"; + case SpvCapabilitySampledBuffer: return "SampledBuffer"; + case SpvCapabilityImageBuffer: return "ImageBuffer"; + case SpvCapabilityImageMSArray: return "ImageMSArray"; + case SpvCapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case SpvCapabilityImageQuery: return "ImageQuery"; + case SpvCapabilityDerivativeControl: return "DerivativeControl"; + case SpvCapabilityInterpolationFunction: return "InterpolationFunction"; + case SpvCapabilityTransformFeedback: return "TransformFeedback"; + case SpvCapabilityGeometryStreams: return "GeometryStreams"; + case SpvCapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case SpvCapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case SpvCapabilityMultiViewport: return "MultiViewport"; + case SpvCapabilitySubgroupDispatch: return "SubgroupDispatch"; + case SpvCapabilityNamedBarrier: return "NamedBarrier"; + case SpvCapabilityPipeStorage: return "PipeStorage"; + case SpvCapabilityGroupNonUniform: return "GroupNonUniform"; + case SpvCapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case SpvCapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case SpvCapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case SpvCapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case SpvCapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case SpvCapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case SpvCapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case SpvCapabilityShaderLayer: return "ShaderLayer"; + case SpvCapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case SpvCapabilityUniformDecoration: return "UniformDecoration"; + case SpvCapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case SpvCapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case SpvCapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case SpvCapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case SpvCapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case SpvCapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case SpvCapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case SpvCapabilityDrawParameters: return "DrawParameters"; + case SpvCapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case SpvCapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case SpvCapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case SpvCapabilityStorageUniform16: return "StorageUniform16"; + case SpvCapabilityStoragePushConstant16: return "StoragePushConstant16"; + case SpvCapabilityStorageInputOutput16: return "StorageInputOutput16"; + case SpvCapabilityDeviceGroup: return "DeviceGroup"; + case SpvCapabilityMultiView: return "MultiView"; + case SpvCapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case SpvCapabilityVariablePointers: return "VariablePointers"; + case SpvCapabilityAtomicStorageOps: return "AtomicStorageOps"; + case SpvCapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case SpvCapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case SpvCapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case SpvCapabilityStoragePushConstant8: return "StoragePushConstant8"; + case SpvCapabilityDenormPreserve: return "DenormPreserve"; + case SpvCapabilityDenormFlushToZero: return "DenormFlushToZero"; + case SpvCapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case SpvCapabilityRoundingModeRTE: return "RoundingModeRTE"; + case SpvCapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case SpvCapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case SpvCapabilityRayQueryKHR: return "RayQueryKHR"; + case SpvCapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case SpvCapabilityRayTracingKHR: return "RayTracingKHR"; + case SpvCapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case SpvCapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case SpvCapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case SpvCapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case SpvCapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case SpvCapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case SpvCapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case SpvCapabilityStencilExportEXT: return "StencilExportEXT"; + case SpvCapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case SpvCapabilityInt64ImageEXT: return "Int64ImageEXT"; + case SpvCapabilityShaderClockKHR: return "ShaderClockKHR"; + case SpvCapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case SpvCapabilityQuadControlKHR: return "QuadControlKHR"; + case SpvCapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case SpvCapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case SpvCapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case SpvCapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case SpvCapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case SpvCapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case SpvCapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case SpvCapabilityMeshShadingNV: return "MeshShadingNV"; + case SpvCapabilityImageFootprintNV: return "ImageFootprintNV"; + case SpvCapabilityMeshShadingEXT: return "MeshShadingEXT"; + case SpvCapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case SpvCapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case SpvCapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case SpvCapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case SpvCapabilityShaderNonUniform: return "ShaderNonUniform"; + case SpvCapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case SpvCapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case SpvCapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case SpvCapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case SpvCapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case SpvCapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case SpvCapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case SpvCapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case SpvCapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case SpvCapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case SpvCapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case SpvCapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case SpvCapabilityRayTracingNV: return "RayTracingNV"; + case SpvCapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case SpvCapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case SpvCapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case SpvCapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case SpvCapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case SpvCapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case SpvCapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case SpvCapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case SpvCapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case SpvCapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case SpvCapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case SpvCapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case SpvCapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case SpvCapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case SpvCapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case SpvCapabilityBindlessTextureNV: return "BindlessTextureNV"; + case SpvCapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case SpvCapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case SpvCapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case SpvCapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case SpvCapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case SpvCapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case SpvCapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case SpvCapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case SpvCapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case SpvCapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case SpvCapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case SpvCapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case SpvCapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case SpvCapabilityAsmINTEL: return "AsmINTEL"; + case SpvCapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case SpvCapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case SpvCapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case SpvCapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case SpvCapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case SpvCapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case SpvCapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case SpvCapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case SpvCapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case SpvCapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case SpvCapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case SpvCapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case SpvCapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case SpvCapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case SpvCapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case SpvCapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case SpvCapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case SpvCapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case SpvCapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case SpvCapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case SpvCapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case SpvCapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case SpvCapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case SpvCapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case SpvCapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case SpvCapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case SpvCapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case SpvCapabilityIOPipesINTEL: return "IOPipesINTEL"; + case SpvCapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case SpvCapabilityFPGARegINTEL: return "FPGARegINTEL"; + case SpvCapabilityDotProductInputAll: return "DotProductInputAll"; + case SpvCapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case SpvCapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case SpvCapabilityDotProduct: return "DotProduct"; + case SpvCapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case SpvCapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case SpvCapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case SpvCapabilityBitInstructions: return "BitInstructions"; + case SpvCapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case SpvCapabilityFloatControls2: return "FloatControls2"; + case SpvCapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case SpvCapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case SpvCapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case SpvCapabilityOptNoneINTEL: return "OptNoneINTEL"; + case SpvCapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case SpvCapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case SpvCapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case SpvCapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case SpvCapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case SpvCapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case SpvCapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case SpvCapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case SpvCapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case SpvCapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case SpvCapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case SpvCapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case SpvCapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case SpvCapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case SpvCapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryIntersectionToString(SpvRayQueryIntersection value) { + switch (value) { + case SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryCommittedIntersectionTypeToString(SpvRayQueryCommittedIntersectionType value) { + switch (value) { + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryCandidateIntersectionTypeToString(SpvRayQueryCandidateIntersectionType value) { + switch (value) { + case SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvFPDenormModeToString(SpvFPDenormMode value) { + switch (value) { + case SpvFPDenormModePreserve: return "Preserve"; + case SpvFPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* SpvFPOperationModeToString(SpvFPOperationMode value) { + switch (value) { + case SpvFPOperationModeIEEE: return "IEEE"; + case SpvFPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* SpvQuantizationModesToString(SpvQuantizationModes value) { + switch (value) { + case SpvQuantizationModesTRN: return "TRN"; + case SpvQuantizationModesTRN_ZERO: return "TRN_ZERO"; + case SpvQuantizationModesRND: return "RND"; + case SpvQuantizationModesRND_ZERO: return "RND_ZERO"; + case SpvQuantizationModesRND_INF: return "RND_INF"; + case SpvQuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case SpvQuantizationModesRND_CONV: return "RND_CONV"; + case SpvQuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* SpvOverflowModesToString(SpvOverflowModes value) { + switch (value) { + case SpvOverflowModesWRAP: return "WRAP"; + case SpvOverflowModesSAT: return "SAT"; + case SpvOverflowModesSAT_ZERO: return "SAT_ZERO"; + case SpvOverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* SpvPackedVectorFormatToString(SpvPackedVectorFormat value) { + switch (value) { + case SpvPackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* SpvCooperativeMatrixLayoutToString(SpvCooperativeMatrixLayout value) { + switch (value) { + case SpvCooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case SpvCooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case SpvCooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case SpvCooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* SpvCooperativeMatrixUseToString(SpvCooperativeMatrixUse value) { + switch (value) { + case SpvCooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case SpvCooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case SpvCooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvInitializationModeQualifierToString(SpvInitializationModeQualifier value) { + switch (value) { + case SpvInitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case SpvInitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvHostAccessQualifierToString(SpvHostAccessQualifier value) { + switch (value) { + case SpvHostAccessQualifierNoneINTEL: return "NoneINTEL"; + case SpvHostAccessQualifierReadINTEL: return "ReadINTEL"; + case SpvHostAccessQualifierWriteINTEL: return "WriteINTEL"; + case SpvHostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvLoadCacheControlToString(SpvLoadCacheControl value) { + switch (value) { + case SpvLoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case SpvLoadCacheControlCachedINTEL: return "CachedINTEL"; + case SpvLoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case SpvLoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case SpvLoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvStoreCacheControlToString(SpvStoreCacheControl value) { + switch (value) { + case SpvStoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case SpvStoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case SpvStoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case SpvStoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvNamedMaximumNumberOfRegistersToString(SpvNamedMaximumNumberOfRegisters value) { + switch (value) { + case SpvNamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvOpToString(SpvOp value) { + switch (value) { + case SpvOpNop: return "OpNop"; + case SpvOpUndef: return "OpUndef"; + case SpvOpSourceContinued: return "OpSourceContinued"; + case SpvOpSource: return "OpSource"; + case SpvOpSourceExtension: return "OpSourceExtension"; + case SpvOpName: return "OpName"; + case SpvOpMemberName: return "OpMemberName"; + case SpvOpString: return "OpString"; + case SpvOpLine: return "OpLine"; + case SpvOpExtension: return "OpExtension"; + case SpvOpExtInstImport: return "OpExtInstImport"; + case SpvOpExtInst: return "OpExtInst"; + case SpvOpMemoryModel: return "OpMemoryModel"; + case SpvOpEntryPoint: return "OpEntryPoint"; + case SpvOpExecutionMode: return "OpExecutionMode"; + case SpvOpCapability: return "OpCapability"; + case SpvOpTypeVoid: return "OpTypeVoid"; + case SpvOpTypeBool: return "OpTypeBool"; + case SpvOpTypeInt: return "OpTypeInt"; + case SpvOpTypeFloat: return "OpTypeFloat"; + case SpvOpTypeVector: return "OpTypeVector"; + case SpvOpTypeMatrix: return "OpTypeMatrix"; + case SpvOpTypeImage: return "OpTypeImage"; + case SpvOpTypeSampler: return "OpTypeSampler"; + case SpvOpTypeSampledImage: return "OpTypeSampledImage"; + case SpvOpTypeArray: return "OpTypeArray"; + case SpvOpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case SpvOpTypeStruct: return "OpTypeStruct"; + case SpvOpTypeOpaque: return "OpTypeOpaque"; + case SpvOpTypePointer: return "OpTypePointer"; + case SpvOpTypeFunction: return "OpTypeFunction"; + case SpvOpTypeEvent: return "OpTypeEvent"; + case SpvOpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case SpvOpTypeReserveId: return "OpTypeReserveId"; + case SpvOpTypeQueue: return "OpTypeQueue"; + case SpvOpTypePipe: return "OpTypePipe"; + case SpvOpTypeForwardPointer: return "OpTypeForwardPointer"; + case SpvOpConstantTrue: return "OpConstantTrue"; + case SpvOpConstantFalse: return "OpConstantFalse"; + case SpvOpConstant: return "OpConstant"; + case SpvOpConstantComposite: return "OpConstantComposite"; + case SpvOpConstantSampler: return "OpConstantSampler"; + case SpvOpConstantNull: return "OpConstantNull"; + case SpvOpSpecConstantTrue: return "OpSpecConstantTrue"; + case SpvOpSpecConstantFalse: return "OpSpecConstantFalse"; + case SpvOpSpecConstant: return "OpSpecConstant"; + case SpvOpSpecConstantComposite: return "OpSpecConstantComposite"; + case SpvOpSpecConstantOp: return "OpSpecConstantOp"; + case SpvOpFunction: return "OpFunction"; + case SpvOpFunctionParameter: return "OpFunctionParameter"; + case SpvOpFunctionEnd: return "OpFunctionEnd"; + case SpvOpFunctionCall: return "OpFunctionCall"; + case SpvOpVariable: return "OpVariable"; + case SpvOpImageTexelPointer: return "OpImageTexelPointer"; + case SpvOpLoad: return "OpLoad"; + case SpvOpStore: return "OpStore"; + case SpvOpCopyMemory: return "OpCopyMemory"; + case SpvOpCopyMemorySized: return "OpCopyMemorySized"; + case SpvOpAccessChain: return "OpAccessChain"; + case SpvOpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case SpvOpPtrAccessChain: return "OpPtrAccessChain"; + case SpvOpArrayLength: return "OpArrayLength"; + case SpvOpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case SpvOpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case SpvOpDecorate: return "OpDecorate"; + case SpvOpMemberDecorate: return "OpMemberDecorate"; + case SpvOpDecorationGroup: return "OpDecorationGroup"; + case SpvOpGroupDecorate: return "OpGroupDecorate"; + case SpvOpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case SpvOpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case SpvOpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case SpvOpVectorShuffle: return "OpVectorShuffle"; + case SpvOpCompositeConstruct: return "OpCompositeConstruct"; + case SpvOpCompositeExtract: return "OpCompositeExtract"; + case SpvOpCompositeInsert: return "OpCompositeInsert"; + case SpvOpCopyObject: return "OpCopyObject"; + case SpvOpTranspose: return "OpTranspose"; + case SpvOpSampledImage: return "OpSampledImage"; + case SpvOpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case SpvOpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case SpvOpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case SpvOpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case SpvOpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case SpvOpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case SpvOpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case SpvOpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case SpvOpImageFetch: return "OpImageFetch"; + case SpvOpImageGather: return "OpImageGather"; + case SpvOpImageDrefGather: return "OpImageDrefGather"; + case SpvOpImageRead: return "OpImageRead"; + case SpvOpImageWrite: return "OpImageWrite"; + case SpvOpImage: return "OpImage"; + case SpvOpImageQueryFormat: return "OpImageQueryFormat"; + case SpvOpImageQueryOrder: return "OpImageQueryOrder"; + case SpvOpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case SpvOpImageQuerySize: return "OpImageQuerySize"; + case SpvOpImageQueryLod: return "OpImageQueryLod"; + case SpvOpImageQueryLevels: return "OpImageQueryLevels"; + case SpvOpImageQuerySamples: return "OpImageQuerySamples"; + case SpvOpConvertFToU: return "OpConvertFToU"; + case SpvOpConvertFToS: return "OpConvertFToS"; + case SpvOpConvertSToF: return "OpConvertSToF"; + case SpvOpConvertUToF: return "OpConvertUToF"; + case SpvOpUConvert: return "OpUConvert"; + case SpvOpSConvert: return "OpSConvert"; + case SpvOpFConvert: return "OpFConvert"; + case SpvOpQuantizeToF16: return "OpQuantizeToF16"; + case SpvOpConvertPtrToU: return "OpConvertPtrToU"; + case SpvOpSatConvertSToU: return "OpSatConvertSToU"; + case SpvOpSatConvertUToS: return "OpSatConvertUToS"; + case SpvOpConvertUToPtr: return "OpConvertUToPtr"; + case SpvOpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case SpvOpGenericCastToPtr: return "OpGenericCastToPtr"; + case SpvOpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case SpvOpBitcast: return "OpBitcast"; + case SpvOpSNegate: return "OpSNegate"; + case SpvOpFNegate: return "OpFNegate"; + case SpvOpIAdd: return "OpIAdd"; + case SpvOpFAdd: return "OpFAdd"; + case SpvOpISub: return "OpISub"; + case SpvOpFSub: return "OpFSub"; + case SpvOpIMul: return "OpIMul"; + case SpvOpFMul: return "OpFMul"; + case SpvOpUDiv: return "OpUDiv"; + case SpvOpSDiv: return "OpSDiv"; + case SpvOpFDiv: return "OpFDiv"; + case SpvOpUMod: return "OpUMod"; + case SpvOpSRem: return "OpSRem"; + case SpvOpSMod: return "OpSMod"; + case SpvOpFRem: return "OpFRem"; + case SpvOpFMod: return "OpFMod"; + case SpvOpVectorTimesScalar: return "OpVectorTimesScalar"; + case SpvOpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case SpvOpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case SpvOpMatrixTimesVector: return "OpMatrixTimesVector"; + case SpvOpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case SpvOpOuterProduct: return "OpOuterProduct"; + case SpvOpDot: return "OpDot"; + case SpvOpIAddCarry: return "OpIAddCarry"; + case SpvOpISubBorrow: return "OpISubBorrow"; + case SpvOpUMulExtended: return "OpUMulExtended"; + case SpvOpSMulExtended: return "OpSMulExtended"; + case SpvOpAny: return "OpAny"; + case SpvOpAll: return "OpAll"; + case SpvOpIsNan: return "OpIsNan"; + case SpvOpIsInf: return "OpIsInf"; + case SpvOpIsFinite: return "OpIsFinite"; + case SpvOpIsNormal: return "OpIsNormal"; + case SpvOpSignBitSet: return "OpSignBitSet"; + case SpvOpLessOrGreater: return "OpLessOrGreater"; + case SpvOpOrdered: return "OpOrdered"; + case SpvOpUnordered: return "OpUnordered"; + case SpvOpLogicalEqual: return "OpLogicalEqual"; + case SpvOpLogicalNotEqual: return "OpLogicalNotEqual"; + case SpvOpLogicalOr: return "OpLogicalOr"; + case SpvOpLogicalAnd: return "OpLogicalAnd"; + case SpvOpLogicalNot: return "OpLogicalNot"; + case SpvOpSelect: return "OpSelect"; + case SpvOpIEqual: return "OpIEqual"; + case SpvOpINotEqual: return "OpINotEqual"; + case SpvOpUGreaterThan: return "OpUGreaterThan"; + case SpvOpSGreaterThan: return "OpSGreaterThan"; + case SpvOpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case SpvOpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case SpvOpULessThan: return "OpULessThan"; + case SpvOpSLessThan: return "OpSLessThan"; + case SpvOpULessThanEqual: return "OpULessThanEqual"; + case SpvOpSLessThanEqual: return "OpSLessThanEqual"; + case SpvOpFOrdEqual: return "OpFOrdEqual"; + case SpvOpFUnordEqual: return "OpFUnordEqual"; + case SpvOpFOrdNotEqual: return "OpFOrdNotEqual"; + case SpvOpFUnordNotEqual: return "OpFUnordNotEqual"; + case SpvOpFOrdLessThan: return "OpFOrdLessThan"; + case SpvOpFUnordLessThan: return "OpFUnordLessThan"; + case SpvOpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case SpvOpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case SpvOpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case SpvOpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case SpvOpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case SpvOpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case SpvOpShiftRightLogical: return "OpShiftRightLogical"; + case SpvOpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case SpvOpShiftLeftLogical: return "OpShiftLeftLogical"; + case SpvOpBitwiseOr: return "OpBitwiseOr"; + case SpvOpBitwiseXor: return "OpBitwiseXor"; + case SpvOpBitwiseAnd: return "OpBitwiseAnd"; + case SpvOpNot: return "OpNot"; + case SpvOpBitFieldInsert: return "OpBitFieldInsert"; + case SpvOpBitFieldSExtract: return "OpBitFieldSExtract"; + case SpvOpBitFieldUExtract: return "OpBitFieldUExtract"; + case SpvOpBitReverse: return "OpBitReverse"; + case SpvOpBitCount: return "OpBitCount"; + case SpvOpDPdx: return "OpDPdx"; + case SpvOpDPdy: return "OpDPdy"; + case SpvOpFwidth: return "OpFwidth"; + case SpvOpDPdxFine: return "OpDPdxFine"; + case SpvOpDPdyFine: return "OpDPdyFine"; + case SpvOpFwidthFine: return "OpFwidthFine"; + case SpvOpDPdxCoarse: return "OpDPdxCoarse"; + case SpvOpDPdyCoarse: return "OpDPdyCoarse"; + case SpvOpFwidthCoarse: return "OpFwidthCoarse"; + case SpvOpEmitVertex: return "OpEmitVertex"; + case SpvOpEndPrimitive: return "OpEndPrimitive"; + case SpvOpEmitStreamVertex: return "OpEmitStreamVertex"; + case SpvOpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case SpvOpControlBarrier: return "OpControlBarrier"; + case SpvOpMemoryBarrier: return "OpMemoryBarrier"; + case SpvOpAtomicLoad: return "OpAtomicLoad"; + case SpvOpAtomicStore: return "OpAtomicStore"; + case SpvOpAtomicExchange: return "OpAtomicExchange"; + case SpvOpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case SpvOpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case SpvOpAtomicIIncrement: return "OpAtomicIIncrement"; + case SpvOpAtomicIDecrement: return "OpAtomicIDecrement"; + case SpvOpAtomicIAdd: return "OpAtomicIAdd"; + case SpvOpAtomicISub: return "OpAtomicISub"; + case SpvOpAtomicSMin: return "OpAtomicSMin"; + case SpvOpAtomicUMin: return "OpAtomicUMin"; + case SpvOpAtomicSMax: return "OpAtomicSMax"; + case SpvOpAtomicUMax: return "OpAtomicUMax"; + case SpvOpAtomicAnd: return "OpAtomicAnd"; + case SpvOpAtomicOr: return "OpAtomicOr"; + case SpvOpAtomicXor: return "OpAtomicXor"; + case SpvOpPhi: return "OpPhi"; + case SpvOpLoopMerge: return "OpLoopMerge"; + case SpvOpSelectionMerge: return "OpSelectionMerge"; + case SpvOpLabel: return "OpLabel"; + case SpvOpBranch: return "OpBranch"; + case SpvOpBranchConditional: return "OpBranchConditional"; + case SpvOpSwitch: return "OpSwitch"; + case SpvOpKill: return "OpKill"; + case SpvOpReturn: return "OpReturn"; + case SpvOpReturnValue: return "OpReturnValue"; + case SpvOpUnreachable: return "OpUnreachable"; + case SpvOpLifetimeStart: return "OpLifetimeStart"; + case SpvOpLifetimeStop: return "OpLifetimeStop"; + case SpvOpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case SpvOpGroupWaitEvents: return "OpGroupWaitEvents"; + case SpvOpGroupAll: return "OpGroupAll"; + case SpvOpGroupAny: return "OpGroupAny"; + case SpvOpGroupBroadcast: return "OpGroupBroadcast"; + case SpvOpGroupIAdd: return "OpGroupIAdd"; + case SpvOpGroupFAdd: return "OpGroupFAdd"; + case SpvOpGroupFMin: return "OpGroupFMin"; + case SpvOpGroupUMin: return "OpGroupUMin"; + case SpvOpGroupSMin: return "OpGroupSMin"; + case SpvOpGroupFMax: return "OpGroupFMax"; + case SpvOpGroupUMax: return "OpGroupUMax"; + case SpvOpGroupSMax: return "OpGroupSMax"; + case SpvOpReadPipe: return "OpReadPipe"; + case SpvOpWritePipe: return "OpWritePipe"; + case SpvOpReservedReadPipe: return "OpReservedReadPipe"; + case SpvOpReservedWritePipe: return "OpReservedWritePipe"; + case SpvOpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case SpvOpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case SpvOpCommitReadPipe: return "OpCommitReadPipe"; + case SpvOpCommitWritePipe: return "OpCommitWritePipe"; + case SpvOpIsValidReserveId: return "OpIsValidReserveId"; + case SpvOpGetNumPipePackets: return "OpGetNumPipePackets"; + case SpvOpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case SpvOpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case SpvOpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case SpvOpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case SpvOpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case SpvOpEnqueueMarker: return "OpEnqueueMarker"; + case SpvOpEnqueueKernel: return "OpEnqueueKernel"; + case SpvOpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case SpvOpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case SpvOpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case SpvOpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case SpvOpRetainEvent: return "OpRetainEvent"; + case SpvOpReleaseEvent: return "OpReleaseEvent"; + case SpvOpCreateUserEvent: return "OpCreateUserEvent"; + case SpvOpIsValidEvent: return "OpIsValidEvent"; + case SpvOpSetUserEventStatus: return "OpSetUserEventStatus"; + case SpvOpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case SpvOpGetDefaultQueue: return "OpGetDefaultQueue"; + case SpvOpBuildNDRange: return "OpBuildNDRange"; + case SpvOpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case SpvOpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case SpvOpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case SpvOpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case SpvOpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case SpvOpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case SpvOpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case SpvOpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case SpvOpImageSparseFetch: return "OpImageSparseFetch"; + case SpvOpImageSparseGather: return "OpImageSparseGather"; + case SpvOpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case SpvOpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case SpvOpNoLine: return "OpNoLine"; + case SpvOpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case SpvOpAtomicFlagClear: return "OpAtomicFlagClear"; + case SpvOpImageSparseRead: return "OpImageSparseRead"; + case SpvOpSizeOf: return "OpSizeOf"; + case SpvOpTypePipeStorage: return "OpTypePipeStorage"; + case SpvOpConstantPipeStorage: return "OpConstantPipeStorage"; + case SpvOpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case SpvOpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case SpvOpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case SpvOpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case SpvOpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case SpvOpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case SpvOpModuleProcessed: return "OpModuleProcessed"; + case SpvOpExecutionModeId: return "OpExecutionModeId"; + case SpvOpDecorateId: return "OpDecorateId"; + case SpvOpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case SpvOpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case SpvOpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case SpvOpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case SpvOpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case SpvOpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case SpvOpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case SpvOpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case SpvOpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case SpvOpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case SpvOpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case SpvOpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case SpvOpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case SpvOpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case SpvOpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case SpvOpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case SpvOpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case SpvOpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case SpvOpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case SpvOpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case SpvOpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case SpvOpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case SpvOpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case SpvOpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case SpvOpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case SpvOpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case SpvOpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case SpvOpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case SpvOpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case SpvOpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case SpvOpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case SpvOpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case SpvOpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case SpvOpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case SpvOpCopyLogical: return "OpCopyLogical"; + case SpvOpPtrEqual: return "OpPtrEqual"; + case SpvOpPtrNotEqual: return "OpPtrNotEqual"; + case SpvOpPtrDiff: return "OpPtrDiff"; + case SpvOpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case SpvOpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case SpvOpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case SpvOpTerminateInvocation: return "OpTerminateInvocation"; + case SpvOpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case SpvOpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case SpvOpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case SpvOpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case SpvOpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case SpvOpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case SpvOpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case SpvOpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case SpvOpTraceRayKHR: return "OpTraceRayKHR"; + case SpvOpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case SpvOpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case SpvOpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case SpvOpTerminateRayKHR: return "OpTerminateRayKHR"; + case SpvOpSDot: return "OpSDot"; + case SpvOpUDot: return "OpUDot"; + case SpvOpSUDot: return "OpSUDot"; + case SpvOpSDotAccSat: return "OpSDotAccSat"; + case SpvOpUDotAccSat: return "OpUDotAccSat"; + case SpvOpSUDotAccSat: return "OpSUDotAccSat"; + case SpvOpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case SpvOpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case SpvOpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case SpvOpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case SpvOpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case SpvOpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case SpvOpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case SpvOpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case SpvOpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case SpvOpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case SpvOpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case SpvOpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case SpvOpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case SpvOpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case SpvOpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case SpvOpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case SpvOpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case SpvOpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case SpvOpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case SpvOpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case SpvOpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case SpvOpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case SpvOpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case SpvOpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case SpvOpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case SpvOpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case SpvOpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case SpvOpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case SpvOpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case SpvOpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case SpvOpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case SpvOpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case SpvOpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case SpvOpReadClockKHR: return "OpReadClockKHR"; + case SpvOpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case SpvOpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case SpvOpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case SpvOpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case SpvOpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case SpvOpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case SpvOpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case SpvOpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case SpvOpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case SpvOpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case SpvOpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case SpvOpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case SpvOpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case SpvOpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case SpvOpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case SpvOpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case SpvOpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case SpvOpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case SpvOpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case SpvOpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case SpvOpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case SpvOpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case SpvOpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case SpvOpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case SpvOpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case SpvOpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case SpvOpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case SpvOpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case SpvOpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case SpvOpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case SpvOpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case SpvOpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case SpvOpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case SpvOpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case SpvOpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case SpvOpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case SpvOpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case SpvOpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case SpvOpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case SpvOpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case SpvOpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case SpvOpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case SpvOpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case SpvOpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case SpvOpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case SpvOpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case SpvOpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case SpvOpTerminateRayNV: return "OpTerminateRayNV"; + case SpvOpTraceNV: return "OpTraceNV"; + case SpvOpTraceMotionNV: return "OpTraceMotionNV"; + case SpvOpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case SpvOpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case SpvOpExecuteCallableNV: return "OpExecuteCallableNV"; + case SpvOpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case SpvOpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case SpvOpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case SpvOpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case SpvOpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case SpvOpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case SpvOpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case SpvOpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case SpvOpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case SpvOpConvertUToImageNV: return "OpConvertUToImageNV"; + case SpvOpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case SpvOpConvertImageToUNV: return "OpConvertImageToUNV"; + case SpvOpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case SpvOpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case SpvOpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case SpvOpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case SpvOpRawAccessChainNV: return "OpRawAccessChainNV"; + case SpvOpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case SpvOpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case SpvOpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case SpvOpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case SpvOpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case SpvOpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case SpvOpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case SpvOpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case SpvOpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case SpvOpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case SpvOpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case SpvOpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case SpvOpAbsISubINTEL: return "OpAbsISubINTEL"; + case SpvOpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case SpvOpIAddSatINTEL: return "OpIAddSatINTEL"; + case SpvOpUAddSatINTEL: return "OpUAddSatINTEL"; + case SpvOpIAverageINTEL: return "OpIAverageINTEL"; + case SpvOpUAverageINTEL: return "OpUAverageINTEL"; + case SpvOpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case SpvOpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case SpvOpISubSatINTEL: return "OpISubSatINTEL"; + case SpvOpUSubSatINTEL: return "OpUSubSatINTEL"; + case SpvOpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case SpvOpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case SpvOpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case SpvOpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case SpvOpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case SpvOpAsmINTEL: return "OpAsmINTEL"; + case SpvOpAsmCallINTEL: return "OpAsmCallINTEL"; + case SpvOpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case SpvOpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case SpvOpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case SpvOpExpectKHR: return "OpExpectKHR"; + case SpvOpDecorateString: return "OpDecorateString"; + case SpvOpMemberDecorateString: return "OpMemberDecorateString"; + case SpvOpVmeImageINTEL: return "OpVmeImageINTEL"; + case SpvOpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case SpvOpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case SpvOpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case SpvOpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case SpvOpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case SpvOpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case SpvOpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case SpvOpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case SpvOpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case SpvOpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case SpvOpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case SpvOpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case SpvOpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case SpvOpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case SpvOpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case SpvOpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case SpvOpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case SpvOpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case SpvOpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case SpvOpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case SpvOpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case SpvOpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case SpvOpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case SpvOpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case SpvOpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case SpvOpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case SpvOpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case SpvOpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case SpvOpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case SpvOpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case SpvOpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case SpvOpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case SpvOpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case SpvOpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case SpvOpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case SpvOpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case SpvOpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case SpvOpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case SpvOpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case SpvOpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case SpvOpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case SpvOpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case SpvOpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case SpvOpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case SpvOpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case SpvOpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case SpvOpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case SpvOpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case SpvOpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case SpvOpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case SpvOpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case SpvOpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case SpvOpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case SpvOpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case SpvOpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case SpvOpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case SpvOpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case SpvOpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case SpvOpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case SpvOpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case SpvOpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case SpvOpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case SpvOpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case SpvOpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case SpvOpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case SpvOpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case SpvOpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case SpvOpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case SpvOpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case SpvOpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case SpvOpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case SpvOpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case SpvOpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case SpvOpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case SpvOpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case SpvOpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case SpvOpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case SpvOpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case SpvOpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case SpvOpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case SpvOpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case SpvOpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case SpvOpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case SpvOpLoopControlINTEL: return "OpLoopControlINTEL"; + case SpvOpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case SpvOpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case SpvOpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case SpvOpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case SpvOpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case SpvOpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case SpvOpFixedSinINTEL: return "OpFixedSinINTEL"; + case SpvOpFixedCosINTEL: return "OpFixedCosINTEL"; + case SpvOpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case SpvOpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case SpvOpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case SpvOpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case SpvOpFixedLogINTEL: return "OpFixedLogINTEL"; + case SpvOpFixedExpINTEL: return "OpFixedExpINTEL"; + case SpvOpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case SpvOpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case SpvOpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case SpvOpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case SpvOpFPGARegINTEL: return "OpFPGARegINTEL"; + case SpvOpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case SpvOpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case SpvOpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case SpvOpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case SpvOpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case SpvOpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case SpvOpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case SpvOpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case SpvOpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case SpvOpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case SpvOpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case SpvOpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case SpvOpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case SpvOpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case SpvOpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case SpvOpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case SpvOpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case SpvOpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case SpvOpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case SpvOpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case SpvOpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case SpvOpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case SpvOpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case SpvOpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case SpvOpGroupIMulKHR: return "OpGroupIMulKHR"; + case SpvOpGroupFMulKHR: return "OpGroupFMulKHR"; + case SpvOpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case SpvOpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case SpvOpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case SpvOpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case SpvOpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case SpvOpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case SpvOpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case SpvOpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ #endif diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.hpp b/prog/3rdPartyLibs/vulkan/include/spirv.hpp index 3d500ebbd..2ebc38742 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.hpp +++ b/prog/3rdPartyLibs/vulkan/include/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. +// Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -66,6 +68,12 @@ enum SourceLanguage { SourceLanguageOpenCL_CPP = 4, SourceLanguageHLSL = 5, SourceLanguageCPP_for_OpenCL = 6, + SourceLanguageSYCL = 7, + SourceLanguageHERO_C = 8, + SourceLanguageNZSL = 9, + SourceLanguageWGSL = 10, + SourceLanguageSlang = 11, + SourceLanguageZig = 12, SourceLanguageMax = 0x7fffffff, }; @@ -91,6 +99,8 @@ enum ExecutionModel { ExecutionModelMissNV = 5317, ExecutionModelCallableKHR = 5318, ExecutionModelCallableNV = 5318, + ExecutionModelTaskEXT = 5364, + ExecutionModelMeshEXT = 5365, ExecutionModelMax = 0x7fffffff, }; @@ -151,6 +161,9 @@ enum ExecutionMode { ExecutionModeSubgroupsPerWorkgroupId = 37, ExecutionModeLocalSizeId = 38, ExecutionModeLocalSizeHintId = 39, + ExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, ExecutionModeSubgroupUniformControlFlowKHR = 4421, ExecutionModePostDepthCoverage = 4446, ExecutionModeDenormPreserve = 4459, @@ -158,11 +171,28 @@ enum ExecutionMode { ExecutionModeSignedZeroInfNanPreserve = 4461, ExecutionModeRoundingModeRTE = 4462, ExecutionModeRoundingModeRTZ = 4463, + ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, ExecutionModeStencilRefReplacingEXT = 5027, + ExecutionModeCoalescingAMDX = 5069, + ExecutionModeMaxNodeRecursionAMDX = 5071, + ExecutionModeStaticNumWorkgroupsAMDX = 5072, + ExecutionModeShaderIndexAMDX = 5073, + ExecutionModeMaxNumWorkgroupsAMDX = 5077, + ExecutionModeStencilRefUnchangedFrontAMD = 5079, + ExecutionModeStencilRefGreaterFrontAMD = 5080, + ExecutionModeStencilRefLessFrontAMD = 5081, + ExecutionModeStencilRefUnchangedBackAMD = 5082, + ExecutionModeStencilRefGreaterBackAMD = 5083, + ExecutionModeStencilRefLessBackAMD = 5084, + ExecutionModeQuadDerivativesKHR = 5088, + ExecutionModeRequireFullQuadsKHR = 5089, + ExecutionModeOutputLinesEXT = 5269, ExecutionModeOutputLinesNV = 5269, + ExecutionModeOutputPrimitivesEXT = 5270, ExecutionModeOutputPrimitivesNV = 5270, ExecutionModeDerivativeGroupQuadsNV = 5289, ExecutionModeDerivativeGroupLinearNV = 5290, + ExecutionModeOutputTrianglesEXT = 5298, ExecutionModeOutputTrianglesNV = 5298, ExecutionModePixelInterlockOrderedEXT = 5366, ExecutionModePixelInterlockUnorderedEXT = 5367, @@ -180,6 +210,14 @@ enum ExecutionMode { ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + ExecutionModeMaximallyReconvergesKHR = 6023, + ExecutionModeFPFastMathDefault = 6028, + ExecutionModeStreamingInterfaceINTEL = 6154, + ExecutionModeRegisterMapInterfaceINTEL = 6160, + ExecutionModeNamedBarrierCountINTEL = 6417, + ExecutionModeMaximumRegistersINTEL = 6461, + ExecutionModeMaximumRegistersIdINTEL = 6462, + ExecutionModeNamedMaximumRegistersINTEL = 6463, ExecutionModeMax = 0x7fffffff, }; @@ -197,6 +235,9 @@ enum StorageClass { StorageClassAtomicCounter = 10, StorageClassImage = 11, StorageClassStorageBuffer = 12, + StorageClassTileImageEXT = 4172, + StorageClassNodePayloadAMDX = 5068, + StorageClassNodeOutputPayloadAMDX = 5076, StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, @@ -211,6 +252,8 @@ enum StorageClass { StorageClassShaderRecordBufferNV = 5343, StorageClassPhysicalStorageBuffer = 5349, StorageClassPhysicalStorageBufferEXT = 5349, + StorageClassHitObjectAttributeNV = 5385, + StorageClassTaskPayloadWorkgroupEXT = 5402, StorageClassCodeSectionINTEL = 5605, StorageClassDeviceOnlyINTEL = 5936, StorageClassHostOnlyINTEL = 5937, @@ -225,6 +268,7 @@ enum Dim { DimRect = 4, DimBuffer = 5, DimSubpassData = 6, + DimTileImageDataEXT = 4173, DimMax = 0x7fffffff, }; @@ -331,6 +375,8 @@ enum ImageChannelDataType { ImageChannelDataTypeFloat = 14, ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt101010_2 = 16, + ImageChannelDataTypeUnsignedIntRaw10EXT = 19, + ImageChannelDataTypeUnsignedIntRaw12EXT = 20, ImageChannelDataTypeMax = 0x7fffffff, }; @@ -388,8 +434,11 @@ enum FPFastMathModeShift { FPFastMathModeNSZShift = 2, FPFastMathModeAllowRecipShift = 3, FPFastMathModeFastShift = 4, + FPFastMathModeAllowContractShift = 16, FPFastMathModeAllowContractFastINTELShift = 16, + FPFastMathModeAllowReassocShift = 17, FPFastMathModeAllowReassocINTELShift = 17, + FPFastMathModeAllowTransformShift = 18, FPFastMathModeMax = 0x7fffffff, }; @@ -400,8 +449,11 @@ enum FPFastMathModeMask { FPFastMathModeNSZMask = 0x00000004, FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeFastMask = 0x00000010, + FPFastMathModeAllowContractMask = 0x00010000, FPFastMathModeAllowContractFastINTELMask = 0x00010000, + FPFastMathModeAllowReassocMask = 0x00020000, FPFastMathModeAllowReassocINTELMask = 0x00020000, + FPFastMathModeAllowTransformMask = 0x00040000, }; enum FPRoundingMode { @@ -435,6 +487,7 @@ enum FunctionParameterAttribute { FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoReadWrite = 7, + FunctionParameterAttributeRuntimeAlignedINTEL = 5940, FunctionParameterAttributeMax = 0x7fffffff, }; @@ -488,11 +541,19 @@ enum Decoration { DecorationMaxByteOffsetId = 47, DecorationNoSignedWrap = 4469, DecorationNoUnsignedWrap = 4470, + DecorationWeightTextureQCOM = 4487, + DecorationBlockMatchTextureQCOM = 4488, + DecorationBlockMatchSamplerQCOM = 4499, DecorationExplicitInterpAMD = 4999, + DecorationNodeSharesPayloadLimitsWithAMDX = 5019, + DecorationNodeMaxPayloadsAMDX = 5020, + DecorationTrackFinishWritingAMDX = 5078, + DecorationPayloadNodeNameAMDX = 5091, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationPerPrimitiveEXT = 5271, DecorationPerPrimitiveNV = 5271, DecorationPerViewNV = 5272, DecorationPerTaskNV = 5273, @@ -504,6 +565,7 @@ enum Decoration { DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, + DecorationHitObjectShaderRecordBufferNV = 5386, DecorationBindlessSamplerNV = 5398, DecorationBindlessImageNV = 5399, DecorationBoundSamplerNV = 5400, @@ -536,18 +598,45 @@ enum Decoration { DecorationMergeINTEL = 5834, DecorationBankBitsINTEL = 5835, DecorationForcePow2DepthINTEL = 5836, + DecorationStridesizeINTEL = 5883, + DecorationWordsizeINTEL = 5884, + DecorationTrueDualPortINTEL = 5885, DecorationBurstCoalesceINTEL = 5899, DecorationCacheSizeINTEL = 5900, DecorationDontStaticallyCoalesceINTEL = 5901, DecorationPrefetchINTEL = 5902, DecorationStallEnableINTEL = 5905, DecorationFuseLoopsInFunctionINTEL = 5907, + DecorationMathOpDSPModeINTEL = 5909, + DecorationAliasScopeINTEL = 5914, + DecorationNoAliasINTEL = 5915, + DecorationInitiationIntervalINTEL = 5917, + DecorationMaxConcurrencyINTEL = 5918, + DecorationPipelineEnableINTEL = 5919, DecorationBufferLocationINTEL = 5921, DecorationIOPipeStorageINTEL = 5944, DecorationFunctionFloatingPointModeINTEL = 6080, DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMediaBlockIOINTEL = 6140, + DecorationStallFreeINTEL = 6151, + DecorationFPMaxErrorDecorationINTEL = 6170, + DecorationLatencyControlLabelINTEL = 6172, + DecorationLatencyControlConstraintINTEL = 6173, + DecorationConduitKernelArgumentINTEL = 6175, + DecorationRegisterMapKernelArgumentINTEL = 6176, + DecorationMMHostInterfaceAddressWidthINTEL = 6177, + DecorationMMHostInterfaceDataWidthINTEL = 6178, + DecorationMMHostInterfaceLatencyINTEL = 6179, + DecorationMMHostInterfaceReadWriteModeINTEL = 6180, + DecorationMMHostInterfaceMaxBurstINTEL = 6181, + DecorationMMHostInterfaceWaitRequestINTEL = 6182, + DecorationStableKernelArgumentINTEL = 6183, + DecorationHostAccessINTEL = 6188, + DecorationInitModeINTEL = 6190, + DecorationImplementInRegisterMapINTEL = 6191, + DecorationCacheControlLoadINTEL = 6442, + DecorationCacheControlStoreINTEL = 6443, DecorationMax = 0x7fffffff, }; @@ -593,6 +682,11 @@ enum BuiltIn { BuiltInSubgroupLocalInvocationId = 41, BuiltInVertexIndex = 42, BuiltInInstanceIndex = 43, + BuiltInCoreIDARM = 4160, + BuiltInCoreCountARM = 4161, + BuiltInCoreMaxIDARM = 4162, + BuiltInWarpIDARM = 4163, + BuiltInWarpMaxIDARM = 4164, BuiltInSubgroupEqMask = 4416, BuiltInSubgroupEqMaskKHR = 4416, BuiltInSubgroupGeMask = 4417, @@ -618,6 +712,8 @@ enum BuiltIn { BuiltInBaryCoordSmoothSampleAMD = 4997, BuiltInBaryCoordPullModelAMD = 4998, BuiltInFragStencilRefEXT = 5014, + BuiltInCoalescedInputCountAMDX = 5021, + BuiltInShaderIndexAMDX = 5073, BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, @@ -640,6 +736,10 @@ enum BuiltIn { BuiltInFragmentSizeNV = 5292, BuiltInFragInvocationCountEXT = 5293, BuiltInInvocationsPerPixelNV = 5293, + BuiltInPrimitivePointIndicesEXT = 5294, + BuiltInPrimitiveLineIndicesEXT = 5295, + BuiltInPrimitiveTriangleIndicesEXT = 5296, + BuiltInCullPrimitiveEXT = 5299, BuiltInLaunchIdKHR = 5319, BuiltInLaunchIdNV = 5319, BuiltInLaunchSizeKHR = 5320, @@ -666,6 +766,9 @@ enum BuiltIn { BuiltInHitKindKHR = 5333, BuiltInHitKindNV = 5333, BuiltInCurrentRayTimeNV = 5334, + BuiltInHitTriangleVertexPositionsKHR = 5335, + BuiltInHitMicroTriangleVertexPositionsNV = 5337, + BuiltInHitMicroTriangleVertexBarycentricsNV = 5344, BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, @@ -673,6 +776,9 @@ enum BuiltIn { BuiltInSMCountNV = 5375, BuiltInWarpIDNV = 5376, BuiltInSMIDNV = 5377, + BuiltInHitKindFrontFacingMicroTriangleNV = 5405, + BuiltInHitKindBackFacingMicroTriangleNV = 5406, + BuiltInCullMaskKHR = 6021, BuiltInMax = 0x7fffffff, }; @@ -706,6 +812,8 @@ enum LoopControlShift { LoopControlMaxInterleavingINTELShift = 21, LoopControlSpeculatedIterationsINTELShift = 22, LoopControlNoFusionINTELShift = 23, + LoopControlLoopCountINTELShift = 24, + LoopControlMaxReinvocationDelayINTELShift = 25, LoopControlMax = 0x7fffffff, }; @@ -728,6 +836,8 @@ enum LoopControlMask { LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlSpeculatedIterationsINTELMask = 0x00400000, LoopControlNoFusionINTELMask = 0x00800000, + LoopControlLoopCountINTELMask = 0x01000000, + LoopControlMaxReinvocationDelayINTELMask = 0x02000000, }; enum FunctionControlShift { @@ -800,6 +910,8 @@ enum MemoryAccessShift { MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessNonPrivatePointerShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5, + MemoryAccessAliasScopeINTELMaskShift = 16, + MemoryAccessNoAliasINTELMaskShift = 17, MemoryAccessMax = 0x7fffffff, }; @@ -814,6 +926,8 @@ enum MemoryAccessMask { MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessNonPrivatePointerMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020, + MemoryAccessAliasScopeINTELMaskMask = 0x00010000, + MemoryAccessNoAliasINTELMaskMask = 0x00020000, }; enum Scope { @@ -927,6 +1041,11 @@ enum Capability { CapabilityShaderLayer = 69, CapabilityShaderViewportIndex = 70, CapabilityUniformDecoration = 71, + CapabilityCoreBuiltinsARM = 4165, + CapabilityTileImageColorReadAccessEXT = 4166, + CapabilityTileImageDepthReadAccessEXT = 4167, + CapabilityTileImageStencilReadAccessEXT = 4168, + CapabilityCooperativeMatrixLayoutsARM = 4201, CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, @@ -958,6 +1077,10 @@ enum Capability { CapabilityRayQueryKHR = 4472, CapabilityRayTraversalPrimitiveCullingKHR = 4478, CapabilityRayTracingKHR = 4479, + CapabilityTextureSampleWeightedQCOM = 4484, + CapabilityTextureBoxFilterQCOM = 4485, + CapabilityTextureBlockMatchQCOM = 4486, + CapabilityTextureBlockMatch2QCOM = 4498, CapabilityFloat16ImageAMD = 5008, CapabilityImageGatherBiasLodAMD = 5009, CapabilityFragmentMaskAMD = 5010, @@ -965,6 +1088,8 @@ enum Capability { CapabilityImageReadWriteLodAMD = 5015, CapabilityInt64ImageEXT = 5016, CapabilityShaderClockKHR = 5055, + CapabilityShaderEnqueueAMDX = 5067, + CapabilityQuadControlKHR = 5087, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, CapabilityShaderViewportIndexLayerEXT = 5254, @@ -975,6 +1100,7 @@ enum Capability { CapabilityFragmentFullyCoveredEXT = 5265, CapabilityMeshShadingNV = 5266, CapabilityImageFootprintNV = 5282, + CapabilityMeshShadingEXT = 5283, CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, CapabilityComputeDerivativeGroupQuadsNV = 5288, @@ -1005,6 +1131,7 @@ enum Capability { CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilityRayTracingPositionFetchKHR = 5336, CapabilityRayTracingNV = 5340, CapabilityRayTracingMotionBlurNV = 5341, CapabilityVulkanMemoryModel = 5345, @@ -1022,7 +1149,14 @@ enum Capability { CapabilityFragmentShaderPixelInterlockEXT = 5378, CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocationEXT = 5379, + CapabilityDisplacementMicromapNV = 5380, + CapabilityRayTracingOpacityMicromapEXT = 5381, + CapabilityShaderInvocationReorderNV = 5383, CapabilityBindlessTextureNV = 5390, + CapabilityRayQueryPositionFetchKHR = 5391, + CapabilityAtomicFloat16VectorNV = 5404, + CapabilityRayTracingDisplacementMicromapNV = 5409, + CapabilityRawAccessChainsNV = 5414, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1055,9 +1189,13 @@ enum Capability { CapabilityFPGAMemoryAccessesINTEL = 5898, CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityLoopFuseINTEL = 5906, + CapabilityFPGADSPControlINTEL = 5908, + CapabilityMemoryAccessAliasingINTEL = 5910, + CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, CapabilityFPGABufferLocationINTEL = 5920, CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityUSMStorageClassesINTEL = 5935, + CapabilityRuntimeAlignedAttributeINTEL = 5939, CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, @@ -1069,13 +1207,31 @@ enum Capability { CapabilityDotProductInput4x8BitPackedKHR = 6018, CapabilityDotProduct = 6019, CapabilityDotProductKHR = 6019, + CapabilityRayCullMaskKHR = 6020, + CapabilityCooperativeMatrixKHR = 6022, + CapabilityReplicatedCompositesEXT = 6024, CapabilityBitInstructions = 6025, + CapabilityGroupNonUniformRotateKHR = 6026, + CapabilityFloatControls2 = 6029, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, - CapabilityLongConstantCompositeINTEL = 6089, + CapabilityLongCompositesINTEL = 6089, CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, CapabilityDebugInfoModuleINTEL = 6114, + CapabilityBFloat16ConversionINTEL = 6115, + CapabilitySplitBarrierINTEL = 6141, + CapabilityFPGAClusterAttributesV2INTEL = 6150, + CapabilityFPGAKernelAttributesv2INTEL = 6161, + CapabilityFPMaxErrorINTEL = 6169, + CapabilityFPGALatencyControlINTEL = 6171, + CapabilityFPGAArgumentInterfacesINTEL = 6174, + CapabilityGlobalVariableHostAccessINTEL = 6187, + CapabilityGlobalVariableFPGADecorationsINTEL = 6189, + CapabilityGroupUniformArithmeticKHR = 6400, + CapabilityMaskedGatherScatterINTEL = 6427, + CapabilityCacheControlsINTEL = 6441, + CapabilityRegisterLimitsINTEL = 6460, CapabilityMax = 0x7fffffff, }; @@ -1090,6 +1246,7 @@ enum RayFlagsShift { RayFlagsCullNoOpaqueKHRShift = 7, RayFlagsSkipTrianglesKHRShift = 8, RayFlagsSkipAABBsKHRShift = 9, + RayFlagsForceOpacityMicromap2StateEXTShift = 10, RayFlagsMax = 0x7fffffff, }; @@ -1105,6 +1262,7 @@ enum RayFlagsMask { RayFlagsCullNoOpaqueKHRMask = 0x00000080, RayFlagsSkipTrianglesKHRMask = 0x00000100, RayFlagsSkipAABBsKHRMask = 0x00000200, + RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, }; enum RayQueryIntersection { @@ -1180,6 +1338,87 @@ enum PackedVectorFormat { PackedVectorFormatMax = 0x7fffffff, }; +enum CooperativeMatrixOperandsShift { + CooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3, + CooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4, + CooperativeMatrixOperandsMax = 0x7fffffff, +}; + +enum CooperativeMatrixOperandsMask { + CooperativeMatrixOperandsMaskNone = 0, + CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008, + CooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010, +}; + +enum CooperativeMatrixLayout { + CooperativeMatrixLayoutRowMajorKHR = 0, + CooperativeMatrixLayoutColumnMajorKHR = 1, + CooperativeMatrixLayoutRowBlockedInterleavedARM = 4202, + CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203, + CooperativeMatrixLayoutMax = 0x7fffffff, +}; + +enum CooperativeMatrixUse { + CooperativeMatrixUseMatrixAKHR = 0, + CooperativeMatrixUseMatrixBKHR = 1, + CooperativeMatrixUseMatrixAccumulatorKHR = 2, + CooperativeMatrixUseMax = 0x7fffffff, +}; + +enum InitializationModeQualifier { + InitializationModeQualifierInitOnDeviceReprogramINTEL = 0, + InitializationModeQualifierInitOnDeviceResetINTEL = 1, + InitializationModeQualifierMax = 0x7fffffff, +}; + +enum HostAccessQualifier { + HostAccessQualifierNoneINTEL = 0, + HostAccessQualifierReadINTEL = 1, + HostAccessQualifierWriteINTEL = 2, + HostAccessQualifierReadWriteINTEL = 3, + HostAccessQualifierMax = 0x7fffffff, +}; + +enum LoadCacheControl { + LoadCacheControlUncachedINTEL = 0, + LoadCacheControlCachedINTEL = 1, + LoadCacheControlStreamingINTEL = 2, + LoadCacheControlInvalidateAfterReadINTEL = 3, + LoadCacheControlConstCachedINTEL = 4, + LoadCacheControlMax = 0x7fffffff, +}; + +enum StoreCacheControl { + StoreCacheControlUncachedINTEL = 0, + StoreCacheControlWriteThroughINTEL = 1, + StoreCacheControlWriteBackINTEL = 2, + StoreCacheControlStreamingINTEL = 3, + StoreCacheControlMax = 0x7fffffff, +}; + +enum NamedMaximumNumberOfRegisters { + NamedMaximumNumberOfRegistersAutoINTEL = 0, + NamedMaximumNumberOfRegistersMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsShift { + RawAccessChainOperandsRobustnessPerComponentNVShift = 0, + RawAccessChainOperandsRobustnessPerElementNVShift = 1, + RawAccessChainOperandsMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsMask { + RawAccessChainOperandsMaskNone = 0, + RawAccessChainOperandsRobustnessPerComponentNVMask = 0x00000001, + RawAccessChainOperandsRobustnessPerElementNVMask = 0x00000002, +}; + enum Op { OpNop = 0, OpUndef = 1, @@ -1525,13 +1764,18 @@ enum Op { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1549,6 +1793,14 @@ enum Op { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1556,6 +1808,14 @@ enum Op { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1567,9 +1827,51 @@ enum Op { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1577,6 +1879,7 @@ enum Op { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1597,6 +1900,7 @@ enum Op { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1797,6 +2101,9 @@ enum Op { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1835,10 +2142,28 @@ enum Op { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, OpMax = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2187,13 +2512,18 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2205,6 +2535,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2212,6 +2550,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2223,16 +2569,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case OpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case OpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2250,6 +2639,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2448,6 +2838,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2486,22 +2879,1856 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; } } +inline const char* SourceLanguageToString(SourceLanguage value) { + switch (value) { + case SourceLanguageUnknown: return "Unknown"; + case SourceLanguageESSL: return "ESSL"; + case SourceLanguageGLSL: return "GLSL"; + case SourceLanguageOpenCL_C: return "OpenCL_C"; + case SourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguageHLSL: return "HLSL"; + case SourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguageSYCL: return "SYCL"; + case SourceLanguageHERO_C: return "HERO_C"; + case SourceLanguageNZSL: return "NZSL"; + case SourceLanguageWGSL: return "WGSL"; + case SourceLanguageSlang: return "Slang"; + case SourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModelToString(ExecutionModel value) { + switch (value) { + case ExecutionModelVertex: return "Vertex"; + case ExecutionModelTessellationControl: return "TessellationControl"; + case ExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModelGeometry: return "Geometry"; + case ExecutionModelFragment: return "Fragment"; + case ExecutionModelGLCompute: return "GLCompute"; + case ExecutionModelKernel: return "Kernel"; + case ExecutionModelTaskNV: return "TaskNV"; + case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModelIntersectionKHR: return "IntersectionKHR"; + case ExecutionModelAnyHitKHR: return "AnyHitKHR"; + case ExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModelMissKHR: return "MissKHR"; + case ExecutionModelCallableKHR: return "CallableKHR"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* AddressingModelToString(AddressingModel value) { + switch (value) { + case AddressingModelLogical: return "Logical"; + case AddressingModelPhysical32: return "Physical32"; + case AddressingModelPhysical64: return "Physical64"; + case AddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* MemoryModelToString(MemoryModel value) { + switch (value) { + case MemoryModelSimple: return "Simple"; + case MemoryModelGLSL450: return "GLSL450"; + case MemoryModelOpenCL: return "OpenCL"; + case MemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModeToString(ExecutionMode value) { + switch (value) { + case ExecutionModeInvocations: return "Invocations"; + case ExecutionModeSpacingEqual: return "SpacingEqual"; + case ExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionModeVertexOrderCw: return "VertexOrderCw"; + case ExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case ExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case ExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case ExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case ExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionModePointMode: return "PointMode"; + case ExecutionModeXfb: return "Xfb"; + case ExecutionModeDepthReplacing: return "DepthReplacing"; + case ExecutionModeDepthGreater: return "DepthGreater"; + case ExecutionModeDepthLess: return "DepthLess"; + case ExecutionModeDepthUnchanged: return "DepthUnchanged"; + case ExecutionModeLocalSize: return "LocalSize"; + case ExecutionModeLocalSizeHint: return "LocalSizeHint"; + case ExecutionModeInputPoints: return "InputPoints"; + case ExecutionModeInputLines: return "InputLines"; + case ExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionModeTriangles: return "Triangles"; + case ExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionModeQuads: return "Quads"; + case ExecutionModeIsolines: return "Isolines"; + case ExecutionModeOutputVertices: return "OutputVertices"; + case ExecutionModeOutputPoints: return "OutputPoints"; + case ExecutionModeOutputLineStrip: return "OutputLineStrip"; + case ExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionModeVecTypeHint: return "VecTypeHint"; + case ExecutionModeContractionOff: return "ContractionOff"; + case ExecutionModeInitializer: return "Initializer"; + case ExecutionModeFinalizer: return "Finalizer"; + case ExecutionModeSubgroupSize: return "SubgroupSize"; + case ExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case ExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case ExecutionModeLocalSizeId: return "LocalSizeId"; + case ExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case ExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case ExecutionModeDenormPreserve: return "DenormPreserve"; + case ExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case ExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case ExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case ExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case ExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case ExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case ExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* StorageClassToString(StorageClass value) { + switch (value) { + case StorageClassUniformConstant: return "UniformConstant"; + case StorageClassInput: return "Input"; + case StorageClassUniform: return "Uniform"; + case StorageClassOutput: return "Output"; + case StorageClassWorkgroup: return "Workgroup"; + case StorageClassCrossWorkgroup: return "CrossWorkgroup"; + case StorageClassPrivate: return "Private"; + case StorageClassFunction: return "Function"; + case StorageClassGeneric: return "Generic"; + case StorageClassPushConstant: return "PushConstant"; + case StorageClassAtomicCounter: return "AtomicCounter"; + case StorageClassImage: return "Image"; + case StorageClassStorageBuffer: return "StorageBuffer"; + case StorageClassTileImageEXT: return "TileImageEXT"; + case StorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case StorageClassCallableDataKHR: return "CallableDataKHR"; + case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClassRayPayloadKHR: return "RayPayloadKHR"; + case StorageClassHitAttributeKHR: return "HitAttributeKHR"; + case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* DimToString(Dim value) { + switch (value) { + case Dim1D: return "1D"; + case Dim2D: return "2D"; + case Dim3D: return "3D"; + case DimCube: return "Cube"; + case DimRect: return "Rect"; + case DimBuffer: return "Buffer"; + case DimSubpassData: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { + switch (value) { + case SamplerAddressingModeNone: return "None"; + case SamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SamplerAddressingModeClamp: return "Clamp"; + case SamplerAddressingModeRepeat: return "Repeat"; + case SamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SamplerFilterModeToString(SamplerFilterMode value) { + switch (value) { + case SamplerFilterModeNearest: return "Nearest"; + case SamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* ImageFormatToString(ImageFormat value) { + switch (value) { + case ImageFormatUnknown: return "Unknown"; + case ImageFormatRgba32f: return "Rgba32f"; + case ImageFormatRgba16f: return "Rgba16f"; + case ImageFormatR32f: return "R32f"; + case ImageFormatRgba8: return "Rgba8"; + case ImageFormatRgba8Snorm: return "Rgba8Snorm"; + case ImageFormatRg32f: return "Rg32f"; + case ImageFormatRg16f: return "Rg16f"; + case ImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case ImageFormatR16f: return "R16f"; + case ImageFormatRgba16: return "Rgba16"; + case ImageFormatRgb10A2: return "Rgb10A2"; + case ImageFormatRg16: return "Rg16"; + case ImageFormatRg8: return "Rg8"; + case ImageFormatR16: return "R16"; + case ImageFormatR8: return "R8"; + case ImageFormatRgba16Snorm: return "Rgba16Snorm"; + case ImageFormatRg16Snorm: return "Rg16Snorm"; + case ImageFormatRg8Snorm: return "Rg8Snorm"; + case ImageFormatR16Snorm: return "R16Snorm"; + case ImageFormatR8Snorm: return "R8Snorm"; + case ImageFormatRgba32i: return "Rgba32i"; + case ImageFormatRgba16i: return "Rgba16i"; + case ImageFormatRgba8i: return "Rgba8i"; + case ImageFormatR32i: return "R32i"; + case ImageFormatRg32i: return "Rg32i"; + case ImageFormatRg16i: return "Rg16i"; + case ImageFormatRg8i: return "Rg8i"; + case ImageFormatR16i: return "R16i"; + case ImageFormatR8i: return "R8i"; + case ImageFormatRgba32ui: return "Rgba32ui"; + case ImageFormatRgba16ui: return "Rgba16ui"; + case ImageFormatRgba8ui: return "Rgba8ui"; + case ImageFormatR32ui: return "R32ui"; + case ImageFormatRgb10a2ui: return "Rgb10a2ui"; + case ImageFormatRg32ui: return "Rg32ui"; + case ImageFormatRg16ui: return "Rg16ui"; + case ImageFormatRg8ui: return "Rg8ui"; + case ImageFormatR16ui: return "R16ui"; + case ImageFormatR8ui: return "R8ui"; + case ImageFormatR64ui: return "R64ui"; + case ImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelOrderToString(ImageChannelOrder value) { + switch (value) { + case ImageChannelOrderR: return "R"; + case ImageChannelOrderA: return "A"; + case ImageChannelOrderRG: return "RG"; + case ImageChannelOrderRA: return "RA"; + case ImageChannelOrderRGB: return "RGB"; + case ImageChannelOrderRGBA: return "RGBA"; + case ImageChannelOrderBGRA: return "BGRA"; + case ImageChannelOrderARGB: return "ARGB"; + case ImageChannelOrderIntensity: return "Intensity"; + case ImageChannelOrderLuminance: return "Luminance"; + case ImageChannelOrderRx: return "Rx"; + case ImageChannelOrderRGx: return "RGx"; + case ImageChannelOrderRGBx: return "RGBx"; + case ImageChannelOrderDepth: return "Depth"; + case ImageChannelOrderDepthStencil: return "DepthStencil"; + case ImageChannelOrdersRGB: return "sRGB"; + case ImageChannelOrdersRGBx: return "sRGBx"; + case ImageChannelOrdersRGBA: return "sRGBA"; + case ImageChannelOrdersBGRA: return "sBGRA"; + case ImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { + switch (value) { + case ImageChannelDataTypeSnormInt8: return "SnormInt8"; + case ImageChannelDataTypeSnormInt16: return "SnormInt16"; + case ImageChannelDataTypeUnormInt8: return "UnormInt8"; + case ImageChannelDataTypeUnormInt16: return "UnormInt16"; + case ImageChannelDataTypeUnormShort565: return "UnormShort565"; + case ImageChannelDataTypeUnormShort555: return "UnormShort555"; + case ImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case ImageChannelDataTypeSignedInt8: return "SignedInt8"; + case ImageChannelDataTypeSignedInt16: return "SignedInt16"; + case ImageChannelDataTypeSignedInt32: return "SignedInt32"; + case ImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case ImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case ImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case ImageChannelDataTypeHalfFloat: return "HalfFloat"; + case ImageChannelDataTypeFloat: return "Float"; + case ImageChannelDataTypeUnormInt24: return "UnormInt24"; + case ImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; + } +} + +inline const char* FPRoundingModeToString(FPRoundingMode value) { + switch (value) { + case FPRoundingModeRTE: return "RTE"; + case FPRoundingModeRTZ: return "RTZ"; + case FPRoundingModeRTP: return "RTP"; + case FPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* LinkageTypeToString(LinkageType value) { + switch (value) { + case LinkageTypeExport: return "Export"; + case LinkageTypeImport: return "Import"; + case LinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; + } +} + +inline const char* AccessQualifierToString(AccessQualifier value) { + switch (value) { + case AccessQualifierReadOnly: return "ReadOnly"; + case AccessQualifierWriteOnly: return "WriteOnly"; + case AccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { + switch (value) { + case FunctionParameterAttributeZext: return "Zext"; + case FunctionParameterAttributeSext: return "Sext"; + case FunctionParameterAttributeByVal: return "ByVal"; + case FunctionParameterAttributeSret: return "Sret"; + case FunctionParameterAttributeNoAlias: return "NoAlias"; + case FunctionParameterAttributeNoCapture: return "NoCapture"; + case FunctionParameterAttributeNoWrite: return "NoWrite"; + case FunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case FunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* DecorationToString(Decoration value) { + switch (value) { + case DecorationRelaxedPrecision: return "RelaxedPrecision"; + case DecorationSpecId: return "SpecId"; + case DecorationBlock: return "Block"; + case DecorationBufferBlock: return "BufferBlock"; + case DecorationRowMajor: return "RowMajor"; + case DecorationColMajor: return "ColMajor"; + case DecorationArrayStride: return "ArrayStride"; + case DecorationMatrixStride: return "MatrixStride"; + case DecorationGLSLShared: return "GLSLShared"; + case DecorationGLSLPacked: return "GLSLPacked"; + case DecorationCPacked: return "CPacked"; + case DecorationBuiltIn: return "BuiltIn"; + case DecorationNoPerspective: return "NoPerspective"; + case DecorationFlat: return "Flat"; + case DecorationPatch: return "Patch"; + case DecorationCentroid: return "Centroid"; + case DecorationSample: return "Sample"; + case DecorationInvariant: return "Invariant"; + case DecorationRestrict: return "Restrict"; + case DecorationAliased: return "Aliased"; + case DecorationVolatile: return "Volatile"; + case DecorationConstant: return "Constant"; + case DecorationCoherent: return "Coherent"; + case DecorationNonWritable: return "NonWritable"; + case DecorationNonReadable: return "NonReadable"; + case DecorationUniform: return "Uniform"; + case DecorationUniformId: return "UniformId"; + case DecorationSaturatedConversion: return "SaturatedConversion"; + case DecorationStream: return "Stream"; + case DecorationLocation: return "Location"; + case DecorationComponent: return "Component"; + case DecorationIndex: return "Index"; + case DecorationBinding: return "Binding"; + case DecorationDescriptorSet: return "DescriptorSet"; + case DecorationOffset: return "Offset"; + case DecorationXfbBuffer: return "XfbBuffer"; + case DecorationXfbStride: return "XfbStride"; + case DecorationFuncParamAttr: return "FuncParamAttr"; + case DecorationFPRoundingMode: return "FPRoundingMode"; + case DecorationFPFastMathMode: return "FPFastMathMode"; + case DecorationLinkageAttributes: return "LinkageAttributes"; + case DecorationNoContraction: return "NoContraction"; + case DecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case DecorationAlignment: return "Alignment"; + case DecorationMaxByteOffset: return "MaxByteOffset"; + case DecorationAlignmentId: return "AlignmentId"; + case DecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case DecorationNoSignedWrap: return "NoSignedWrap"; + case DecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case DecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case DecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case DecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case DecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case DecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case DecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case DecorationPerViewNV: return "PerViewNV"; + case DecorationPerTaskNV: return "PerTaskNV"; + case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationNonUniform: return "NonUniform"; + case DecorationRestrictPointer: return "RestrictPointer"; + case DecorationAliasedPointer: return "AliasedPointer"; + case DecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case DecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case DecorationBindlessImageNV: return "BindlessImageNV"; + case DecorationBoundSamplerNV: return "BoundSamplerNV"; + case DecorationBoundImageNV: return "BoundImageNV"; + case DecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case DecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case DecorationClobberINTEL: return "ClobberINTEL"; + case DecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case DecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case DecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case DecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case DecorationStackCallINTEL: return "StackCallINTEL"; + case DecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case DecorationCounterBuffer: return "CounterBuffer"; + case DecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case DecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case DecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case DecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case DecorationRegisterINTEL: return "RegisterINTEL"; + case DecorationMemoryINTEL: return "MemoryINTEL"; + case DecorationNumbanksINTEL: return "NumbanksINTEL"; + case DecorationBankwidthINTEL: return "BankwidthINTEL"; + case DecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case DecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case DecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case DecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case DecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case DecorationMergeINTEL: return "MergeINTEL"; + case DecorationBankBitsINTEL: return "BankBitsINTEL"; + case DecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case DecorationStridesizeINTEL: return "StridesizeINTEL"; + case DecorationWordsizeINTEL: return "WordsizeINTEL"; + case DecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case DecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case DecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case DecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case DecorationPrefetchINTEL: return "PrefetchINTEL"; + case DecorationStallEnableINTEL: return "StallEnableINTEL"; + case DecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case DecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case DecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case DecorationNoAliasINTEL: return "NoAliasINTEL"; + case DecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case DecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case DecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case DecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case DecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case DecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case DecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case DecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case DecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case DecorationStallFreeINTEL: return "StallFreeINTEL"; + case DecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case DecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case DecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case DecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case DecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case DecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case DecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case DecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case DecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case DecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case DecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case DecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case DecorationHostAccessINTEL: return "HostAccessINTEL"; + case DecorationInitModeINTEL: return "InitModeINTEL"; + case DecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case DecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case DecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* BuiltInToString(BuiltIn value) { + switch (value) { + case BuiltInPosition: return "Position"; + case BuiltInPointSize: return "PointSize"; + case BuiltInClipDistance: return "ClipDistance"; + case BuiltInCullDistance: return "CullDistance"; + case BuiltInVertexId: return "VertexId"; + case BuiltInInstanceId: return "InstanceId"; + case BuiltInPrimitiveId: return "PrimitiveId"; + case BuiltInInvocationId: return "InvocationId"; + case BuiltInLayer: return "Layer"; + case BuiltInViewportIndex: return "ViewportIndex"; + case BuiltInTessLevelOuter: return "TessLevelOuter"; + case BuiltInTessLevelInner: return "TessLevelInner"; + case BuiltInTessCoord: return "TessCoord"; + case BuiltInPatchVertices: return "PatchVertices"; + case BuiltInFragCoord: return "FragCoord"; + case BuiltInPointCoord: return "PointCoord"; + case BuiltInFrontFacing: return "FrontFacing"; + case BuiltInSampleId: return "SampleId"; + case BuiltInSamplePosition: return "SamplePosition"; + case BuiltInSampleMask: return "SampleMask"; + case BuiltInFragDepth: return "FragDepth"; + case BuiltInHelperInvocation: return "HelperInvocation"; + case BuiltInNumWorkgroups: return "NumWorkgroups"; + case BuiltInWorkgroupSize: return "WorkgroupSize"; + case BuiltInWorkgroupId: return "WorkgroupId"; + case BuiltInLocalInvocationId: return "LocalInvocationId"; + case BuiltInGlobalInvocationId: return "GlobalInvocationId"; + case BuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case BuiltInWorkDim: return "WorkDim"; + case BuiltInGlobalSize: return "GlobalSize"; + case BuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case BuiltInGlobalOffset: return "GlobalOffset"; + case BuiltInGlobalLinearId: return "GlobalLinearId"; + case BuiltInSubgroupSize: return "SubgroupSize"; + case BuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case BuiltInNumSubgroups: return "NumSubgroups"; + case BuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case BuiltInSubgroupId: return "SubgroupId"; + case BuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case BuiltInVertexIndex: return "VertexIndex"; + case BuiltInInstanceIndex: return "InstanceIndex"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case BuiltInSubgroupEqMask: return "SubgroupEqMask"; + case BuiltInSubgroupGeMask: return "SubgroupGeMask"; + case BuiltInSubgroupGtMask: return "SubgroupGtMask"; + case BuiltInSubgroupLeMask: return "SubgroupLeMask"; + case BuiltInSubgroupLtMask: return "SubgroupLtMask"; + case BuiltInBaseVertex: return "BaseVertex"; + case BuiltInBaseInstance: return "BaseInstance"; + case BuiltInDrawIndex: return "DrawIndex"; + case BuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case BuiltInDeviceIndex: return "DeviceIndex"; + case BuiltInViewIndex: return "ViewIndex"; + case BuiltInShadingRateKHR: return "ShadingRateKHR"; + case BuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case BuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case BuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case BuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case BuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case BuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case BuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case BuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case BuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case BuiltInViewportMaskNV: return "ViewportMaskNV"; + case BuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case BuiltInPositionPerViewNV: return "PositionPerViewNV"; + case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case BuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case BuiltInTaskCountNV: return "TaskCountNV"; + case BuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case BuiltInLayerPerViewNV: return "LayerPerViewNV"; + case BuiltInMeshViewCountNV: return "MeshViewCountNV"; + case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case BuiltInBaryCoordKHR: return "BaryCoordKHR"; + case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInFragSizeEXT: return "FragSizeEXT"; + case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltInLaunchIdKHR: return "LaunchIdKHR"; + case BuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case BuiltInRayTminKHR: return "RayTminKHR"; + case BuiltInRayTmaxKHR: return "RayTmaxKHR"; + case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case BuiltInHitTNV: return "HitTNV"; + case BuiltInHitKindKHR: return "HitKindKHR"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case BuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case BuiltInSMCountNV: return "SMCountNV"; + case BuiltInWarpIDNV: return "WarpIDNV"; + case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* ScopeToString(Scope value) { + switch (value) { + case ScopeCrossDevice: return "CrossDevice"; + case ScopeDevice: return "Device"; + case ScopeWorkgroup: return "Workgroup"; + case ScopeSubgroup: return "Subgroup"; + case ScopeInvocation: return "Invocation"; + case ScopeQueueFamily: return "QueueFamily"; + case ScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* GroupOperationToString(GroupOperation value) { + switch (value) { + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { + switch (value) { + case KernelEnqueueFlagsNoWait: return "NoWait"; + case KernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case KernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* CapabilityToString(Capability value) { + switch (value) { + case CapabilityMatrix: return "Matrix"; + case CapabilityShader: return "Shader"; + case CapabilityGeometry: return "Geometry"; + case CapabilityTessellation: return "Tessellation"; + case CapabilityAddresses: return "Addresses"; + case CapabilityLinkage: return "Linkage"; + case CapabilityKernel: return "Kernel"; + case CapabilityVector16: return "Vector16"; + case CapabilityFloat16Buffer: return "Float16Buffer"; + case CapabilityFloat16: return "Float16"; + case CapabilityFloat64: return "Float64"; + case CapabilityInt64: return "Int64"; + case CapabilityInt64Atomics: return "Int64Atomics"; + case CapabilityImageBasic: return "ImageBasic"; + case CapabilityImageReadWrite: return "ImageReadWrite"; + case CapabilityImageMipmap: return "ImageMipmap"; + case CapabilityPipes: return "Pipes"; + case CapabilityGroups: return "Groups"; + case CapabilityDeviceEnqueue: return "DeviceEnqueue"; + case CapabilityLiteralSampler: return "LiteralSampler"; + case CapabilityAtomicStorage: return "AtomicStorage"; + case CapabilityInt16: return "Int16"; + case CapabilityTessellationPointSize: return "TessellationPointSize"; + case CapabilityGeometryPointSize: return "GeometryPointSize"; + case CapabilityImageGatherExtended: return "ImageGatherExtended"; + case CapabilityStorageImageMultisample: return "StorageImageMultisample"; + case CapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case CapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case CapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case CapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case CapabilityClipDistance: return "ClipDistance"; + case CapabilityCullDistance: return "CullDistance"; + case CapabilityImageCubeArray: return "ImageCubeArray"; + case CapabilitySampleRateShading: return "SampleRateShading"; + case CapabilityImageRect: return "ImageRect"; + case CapabilitySampledRect: return "SampledRect"; + case CapabilityGenericPointer: return "GenericPointer"; + case CapabilityInt8: return "Int8"; + case CapabilityInputAttachment: return "InputAttachment"; + case CapabilitySparseResidency: return "SparseResidency"; + case CapabilityMinLod: return "MinLod"; + case CapabilitySampled1D: return "Sampled1D"; + case CapabilityImage1D: return "Image1D"; + case CapabilitySampledCubeArray: return "SampledCubeArray"; + case CapabilitySampledBuffer: return "SampledBuffer"; + case CapabilityImageBuffer: return "ImageBuffer"; + case CapabilityImageMSArray: return "ImageMSArray"; + case CapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case CapabilityImageQuery: return "ImageQuery"; + case CapabilityDerivativeControl: return "DerivativeControl"; + case CapabilityInterpolationFunction: return "InterpolationFunction"; + case CapabilityTransformFeedback: return "TransformFeedback"; + case CapabilityGeometryStreams: return "GeometryStreams"; + case CapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case CapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case CapabilityMultiViewport: return "MultiViewport"; + case CapabilitySubgroupDispatch: return "SubgroupDispatch"; + case CapabilityNamedBarrier: return "NamedBarrier"; + case CapabilityPipeStorage: return "PipeStorage"; + case CapabilityGroupNonUniform: return "GroupNonUniform"; + case CapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case CapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case CapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case CapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case CapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case CapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case CapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case CapabilityShaderLayer: return "ShaderLayer"; + case CapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case CapabilityUniformDecoration: return "UniformDecoration"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case CapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; + case CapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case CapabilityVariablePointers: return "VariablePointers"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case CapabilityStoragePushConstant8: return "StoragePushConstant8"; + case CapabilityDenormPreserve: return "DenormPreserve"; + case CapabilityDenormFlushToZero: return "DenormFlushToZero"; + case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case CapabilityRoundingModeRTE: return "RoundingModeRTE"; + case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingKHR: return "RayTracingKHR"; + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case CapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case CapabilityInt64ImageEXT: return "Int64ImageEXT"; + case CapabilityShaderClockKHR: return "ShaderClockKHR"; + case CapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case CapabilityQuadControlKHR: return "QuadControlKHR"; + case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case CapabilityMeshShadingNV: return "MeshShadingNV"; + case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; + case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case CapabilityShaderNonUniform: return "ShaderNonUniform"; + case CapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case CapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case CapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case CapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case CapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case CapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case CapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case CapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case CapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case CapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case CapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case CapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case CapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case CapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case CapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case CapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case CapabilityBindlessTextureNV: return "BindlessTextureNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case CapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case CapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case CapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case CapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case CapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case CapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case CapabilityAsmINTEL: return "AsmINTEL"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case CapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case CapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case CapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case CapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case CapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case CapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case CapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case CapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case CapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case CapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case CapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case CapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case CapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case CapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case CapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case CapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case CapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case CapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case CapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case CapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case CapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case CapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case CapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case CapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case CapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case CapabilityIOPipesINTEL: return "IOPipesINTEL"; + case CapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case CapabilityFPGARegINTEL: return "FPGARegINTEL"; + case CapabilityDotProductInputAll: return "DotProductInputAll"; + case CapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case CapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case CapabilityDotProduct: return "DotProduct"; + case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case CapabilityBitInstructions: return "BitInstructions"; + case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case CapabilityFloatControls2: return "FloatControls2"; + case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case CapabilityOptNoneINTEL: return "OptNoneINTEL"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case CapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case CapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case CapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case CapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case CapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case CapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case CapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case CapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case CapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case CapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case CapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case CapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case CapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case CapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { + switch (value) { + case RayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { + switch (value) { + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { + switch (value) { + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* FPDenormModeToString(FPDenormMode value) { + switch (value) { + case FPDenormModePreserve: return "Preserve"; + case FPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* FPOperationModeToString(FPOperationMode value) { + switch (value) { + case FPOperationModeIEEE: return "IEEE"; + case FPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* QuantizationModesToString(QuantizationModes value) { + switch (value) { + case QuantizationModesTRN: return "TRN"; + case QuantizationModesTRN_ZERO: return "TRN_ZERO"; + case QuantizationModesRND: return "RND"; + case QuantizationModesRND_ZERO: return "RND_ZERO"; + case QuantizationModesRND_INF: return "RND_INF"; + case QuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModesRND_CONV: return "RND_CONV"; + case QuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* OverflowModesToString(OverflowModes value) { + switch (value) { + case OverflowModesWRAP: return "WRAP"; + case OverflowModesSAT: return "SAT"; + case OverflowModesSAT_ZERO: return "SAT_ZERO"; + case OverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* PackedVectorFormatToString(PackedVectorFormat value) { + switch (value) { + case PackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { + switch (value) { + case CooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { + switch (value) { + case CooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { + switch (value) { + case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* HostAccessQualifierToString(HostAccessQualifier value) { + switch (value) { + case HostAccessQualifierNoneINTEL: return "NoneINTEL"; + case HostAccessQualifierReadINTEL: return "ReadINTEL"; + case HostAccessQualifierWriteINTEL: return "WriteINTEL"; + case HostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* LoadCacheControlToString(LoadCacheControl value) { + switch (value) { + case LoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case LoadCacheControlCachedINTEL: return "CachedINTEL"; + case LoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case LoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* StoreCacheControlToString(StoreCacheControl value) { + switch (value) { + case StoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case StoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { + switch (value) { + case NamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* OpToString(Op value) { + switch (value) { + case OpNop: return "OpNop"; + case OpUndef: return "OpUndef"; + case OpSourceContinued: return "OpSourceContinued"; + case OpSource: return "OpSource"; + case OpSourceExtension: return "OpSourceExtension"; + case OpName: return "OpName"; + case OpMemberName: return "OpMemberName"; + case OpString: return "OpString"; + case OpLine: return "OpLine"; + case OpExtension: return "OpExtension"; + case OpExtInstImport: return "OpExtInstImport"; + case OpExtInst: return "OpExtInst"; + case OpMemoryModel: return "OpMemoryModel"; + case OpEntryPoint: return "OpEntryPoint"; + case OpExecutionMode: return "OpExecutionMode"; + case OpCapability: return "OpCapability"; + case OpTypeVoid: return "OpTypeVoid"; + case OpTypeBool: return "OpTypeBool"; + case OpTypeInt: return "OpTypeInt"; + case OpTypeFloat: return "OpTypeFloat"; + case OpTypeVector: return "OpTypeVector"; + case OpTypeMatrix: return "OpTypeMatrix"; + case OpTypeImage: return "OpTypeImage"; + case OpTypeSampler: return "OpTypeSampler"; + case OpTypeSampledImage: return "OpTypeSampledImage"; + case OpTypeArray: return "OpTypeArray"; + case OpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case OpTypeStruct: return "OpTypeStruct"; + case OpTypeOpaque: return "OpTypeOpaque"; + case OpTypePointer: return "OpTypePointer"; + case OpTypeFunction: return "OpTypeFunction"; + case OpTypeEvent: return "OpTypeEvent"; + case OpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case OpTypeReserveId: return "OpTypeReserveId"; + case OpTypeQueue: return "OpTypeQueue"; + case OpTypePipe: return "OpTypePipe"; + case OpTypeForwardPointer: return "OpTypeForwardPointer"; + case OpConstantTrue: return "OpConstantTrue"; + case OpConstantFalse: return "OpConstantFalse"; + case OpConstant: return "OpConstant"; + case OpConstantComposite: return "OpConstantComposite"; + case OpConstantSampler: return "OpConstantSampler"; + case OpConstantNull: return "OpConstantNull"; + case OpSpecConstantTrue: return "OpSpecConstantTrue"; + case OpSpecConstantFalse: return "OpSpecConstantFalse"; + case OpSpecConstant: return "OpSpecConstant"; + case OpSpecConstantComposite: return "OpSpecConstantComposite"; + case OpSpecConstantOp: return "OpSpecConstantOp"; + case OpFunction: return "OpFunction"; + case OpFunctionParameter: return "OpFunctionParameter"; + case OpFunctionEnd: return "OpFunctionEnd"; + case OpFunctionCall: return "OpFunctionCall"; + case OpVariable: return "OpVariable"; + case OpImageTexelPointer: return "OpImageTexelPointer"; + case OpLoad: return "OpLoad"; + case OpStore: return "OpStore"; + case OpCopyMemory: return "OpCopyMemory"; + case OpCopyMemorySized: return "OpCopyMemorySized"; + case OpAccessChain: return "OpAccessChain"; + case OpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case OpPtrAccessChain: return "OpPtrAccessChain"; + case OpArrayLength: return "OpArrayLength"; + case OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case OpDecorate: return "OpDecorate"; + case OpMemberDecorate: return "OpMemberDecorate"; + case OpDecorationGroup: return "OpDecorationGroup"; + case OpGroupDecorate: return "OpGroupDecorate"; + case OpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case OpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case OpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case OpVectorShuffle: return "OpVectorShuffle"; + case OpCompositeConstruct: return "OpCompositeConstruct"; + case OpCompositeExtract: return "OpCompositeExtract"; + case OpCompositeInsert: return "OpCompositeInsert"; + case OpCopyObject: return "OpCopyObject"; + case OpTranspose: return "OpTranspose"; + case OpSampledImage: return "OpSampledImage"; + case OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case OpImageFetch: return "OpImageFetch"; + case OpImageGather: return "OpImageGather"; + case OpImageDrefGather: return "OpImageDrefGather"; + case OpImageRead: return "OpImageRead"; + case OpImageWrite: return "OpImageWrite"; + case OpImage: return "OpImage"; + case OpImageQueryFormat: return "OpImageQueryFormat"; + case OpImageQueryOrder: return "OpImageQueryOrder"; + case OpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case OpImageQuerySize: return "OpImageQuerySize"; + case OpImageQueryLod: return "OpImageQueryLod"; + case OpImageQueryLevels: return "OpImageQueryLevels"; + case OpImageQuerySamples: return "OpImageQuerySamples"; + case OpConvertFToU: return "OpConvertFToU"; + case OpConvertFToS: return "OpConvertFToS"; + case OpConvertSToF: return "OpConvertSToF"; + case OpConvertUToF: return "OpConvertUToF"; + case OpUConvert: return "OpUConvert"; + case OpSConvert: return "OpSConvert"; + case OpFConvert: return "OpFConvert"; + case OpQuantizeToF16: return "OpQuantizeToF16"; + case OpConvertPtrToU: return "OpConvertPtrToU"; + case OpSatConvertSToU: return "OpSatConvertSToU"; + case OpSatConvertUToS: return "OpSatConvertUToS"; + case OpConvertUToPtr: return "OpConvertUToPtr"; + case OpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case OpGenericCastToPtr: return "OpGenericCastToPtr"; + case OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case OpBitcast: return "OpBitcast"; + case OpSNegate: return "OpSNegate"; + case OpFNegate: return "OpFNegate"; + case OpIAdd: return "OpIAdd"; + case OpFAdd: return "OpFAdd"; + case OpISub: return "OpISub"; + case OpFSub: return "OpFSub"; + case OpIMul: return "OpIMul"; + case OpFMul: return "OpFMul"; + case OpUDiv: return "OpUDiv"; + case OpSDiv: return "OpSDiv"; + case OpFDiv: return "OpFDiv"; + case OpUMod: return "OpUMod"; + case OpSRem: return "OpSRem"; + case OpSMod: return "OpSMod"; + case OpFRem: return "OpFRem"; + case OpFMod: return "OpFMod"; + case OpVectorTimesScalar: return "OpVectorTimesScalar"; + case OpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case OpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case OpMatrixTimesVector: return "OpMatrixTimesVector"; + case OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case OpOuterProduct: return "OpOuterProduct"; + case OpDot: return "OpDot"; + case OpIAddCarry: return "OpIAddCarry"; + case OpISubBorrow: return "OpISubBorrow"; + case OpUMulExtended: return "OpUMulExtended"; + case OpSMulExtended: return "OpSMulExtended"; + case OpAny: return "OpAny"; + case OpAll: return "OpAll"; + case OpIsNan: return "OpIsNan"; + case OpIsInf: return "OpIsInf"; + case OpIsFinite: return "OpIsFinite"; + case OpIsNormal: return "OpIsNormal"; + case OpSignBitSet: return "OpSignBitSet"; + case OpLessOrGreater: return "OpLessOrGreater"; + case OpOrdered: return "OpOrdered"; + case OpUnordered: return "OpUnordered"; + case OpLogicalEqual: return "OpLogicalEqual"; + case OpLogicalNotEqual: return "OpLogicalNotEqual"; + case OpLogicalOr: return "OpLogicalOr"; + case OpLogicalAnd: return "OpLogicalAnd"; + case OpLogicalNot: return "OpLogicalNot"; + case OpSelect: return "OpSelect"; + case OpIEqual: return "OpIEqual"; + case OpINotEqual: return "OpINotEqual"; + case OpUGreaterThan: return "OpUGreaterThan"; + case OpSGreaterThan: return "OpSGreaterThan"; + case OpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case OpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case OpULessThan: return "OpULessThan"; + case OpSLessThan: return "OpSLessThan"; + case OpULessThanEqual: return "OpULessThanEqual"; + case OpSLessThanEqual: return "OpSLessThanEqual"; + case OpFOrdEqual: return "OpFOrdEqual"; + case OpFUnordEqual: return "OpFUnordEqual"; + case OpFOrdNotEqual: return "OpFOrdNotEqual"; + case OpFUnordNotEqual: return "OpFUnordNotEqual"; + case OpFOrdLessThan: return "OpFOrdLessThan"; + case OpFUnordLessThan: return "OpFUnordLessThan"; + case OpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case OpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case OpShiftRightLogical: return "OpShiftRightLogical"; + case OpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case OpShiftLeftLogical: return "OpShiftLeftLogical"; + case OpBitwiseOr: return "OpBitwiseOr"; + case OpBitwiseXor: return "OpBitwiseXor"; + case OpBitwiseAnd: return "OpBitwiseAnd"; + case OpNot: return "OpNot"; + case OpBitFieldInsert: return "OpBitFieldInsert"; + case OpBitFieldSExtract: return "OpBitFieldSExtract"; + case OpBitFieldUExtract: return "OpBitFieldUExtract"; + case OpBitReverse: return "OpBitReverse"; + case OpBitCount: return "OpBitCount"; + case OpDPdx: return "OpDPdx"; + case OpDPdy: return "OpDPdy"; + case OpFwidth: return "OpFwidth"; + case OpDPdxFine: return "OpDPdxFine"; + case OpDPdyFine: return "OpDPdyFine"; + case OpFwidthFine: return "OpFwidthFine"; + case OpDPdxCoarse: return "OpDPdxCoarse"; + case OpDPdyCoarse: return "OpDPdyCoarse"; + case OpFwidthCoarse: return "OpFwidthCoarse"; + case OpEmitVertex: return "OpEmitVertex"; + case OpEndPrimitive: return "OpEndPrimitive"; + case OpEmitStreamVertex: return "OpEmitStreamVertex"; + case OpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case OpControlBarrier: return "OpControlBarrier"; + case OpMemoryBarrier: return "OpMemoryBarrier"; + case OpAtomicLoad: return "OpAtomicLoad"; + case OpAtomicStore: return "OpAtomicStore"; + case OpAtomicExchange: return "OpAtomicExchange"; + case OpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case OpAtomicIIncrement: return "OpAtomicIIncrement"; + case OpAtomicIDecrement: return "OpAtomicIDecrement"; + case OpAtomicIAdd: return "OpAtomicIAdd"; + case OpAtomicISub: return "OpAtomicISub"; + case OpAtomicSMin: return "OpAtomicSMin"; + case OpAtomicUMin: return "OpAtomicUMin"; + case OpAtomicSMax: return "OpAtomicSMax"; + case OpAtomicUMax: return "OpAtomicUMax"; + case OpAtomicAnd: return "OpAtomicAnd"; + case OpAtomicOr: return "OpAtomicOr"; + case OpAtomicXor: return "OpAtomicXor"; + case OpPhi: return "OpPhi"; + case OpLoopMerge: return "OpLoopMerge"; + case OpSelectionMerge: return "OpSelectionMerge"; + case OpLabel: return "OpLabel"; + case OpBranch: return "OpBranch"; + case OpBranchConditional: return "OpBranchConditional"; + case OpSwitch: return "OpSwitch"; + case OpKill: return "OpKill"; + case OpReturn: return "OpReturn"; + case OpReturnValue: return "OpReturnValue"; + case OpUnreachable: return "OpUnreachable"; + case OpLifetimeStart: return "OpLifetimeStart"; + case OpLifetimeStop: return "OpLifetimeStop"; + case OpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case OpGroupWaitEvents: return "OpGroupWaitEvents"; + case OpGroupAll: return "OpGroupAll"; + case OpGroupAny: return "OpGroupAny"; + case OpGroupBroadcast: return "OpGroupBroadcast"; + case OpGroupIAdd: return "OpGroupIAdd"; + case OpGroupFAdd: return "OpGroupFAdd"; + case OpGroupFMin: return "OpGroupFMin"; + case OpGroupUMin: return "OpGroupUMin"; + case OpGroupSMin: return "OpGroupSMin"; + case OpGroupFMax: return "OpGroupFMax"; + case OpGroupUMax: return "OpGroupUMax"; + case OpGroupSMax: return "OpGroupSMax"; + case OpReadPipe: return "OpReadPipe"; + case OpWritePipe: return "OpWritePipe"; + case OpReservedReadPipe: return "OpReservedReadPipe"; + case OpReservedWritePipe: return "OpReservedWritePipe"; + case OpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case OpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case OpCommitReadPipe: return "OpCommitReadPipe"; + case OpCommitWritePipe: return "OpCommitWritePipe"; + case OpIsValidReserveId: return "OpIsValidReserveId"; + case OpGetNumPipePackets: return "OpGetNumPipePackets"; + case OpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case OpEnqueueMarker: return "OpEnqueueMarker"; + case OpEnqueueKernel: return "OpEnqueueKernel"; + case OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case OpRetainEvent: return "OpRetainEvent"; + case OpReleaseEvent: return "OpReleaseEvent"; + case OpCreateUserEvent: return "OpCreateUserEvent"; + case OpIsValidEvent: return "OpIsValidEvent"; + case OpSetUserEventStatus: return "OpSetUserEventStatus"; + case OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case OpGetDefaultQueue: return "OpGetDefaultQueue"; + case OpBuildNDRange: return "OpBuildNDRange"; + case OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case OpImageSparseFetch: return "OpImageSparseFetch"; + case OpImageSparseGather: return "OpImageSparseGather"; + case OpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case OpNoLine: return "OpNoLine"; + case OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case OpAtomicFlagClear: return "OpAtomicFlagClear"; + case OpImageSparseRead: return "OpImageSparseRead"; + case OpSizeOf: return "OpSizeOf"; + case OpTypePipeStorage: return "OpTypePipeStorage"; + case OpConstantPipeStorage: return "OpConstantPipeStorage"; + case OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case OpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpExecutionModeId: return "OpExecutionModeId"; + case OpDecorateId: return "OpDecorateId"; + case OpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case OpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case OpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case OpCopyLogical: return "OpCopyLogical"; + case OpPtrEqual: return "OpPtrEqual"; + case OpPtrNotEqual: return "OpPtrNotEqual"; + case OpPtrDiff: return "OpPtrDiff"; + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case OpTerminateInvocation: return "OpTerminateInvocation"; + case OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case OpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case OpTraceRayKHR: return "OpTraceRayKHR"; + case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case OpTerminateRayKHR: return "OpTerminateRayKHR"; + case OpSDot: return "OpSDot"; + case OpUDot: return "OpUDot"; + case OpSUDot: return "OpSUDot"; + case OpSDotAccSat: return "OpSDotAccSat"; + case OpUDotAccSat: return "OpUDotAccSat"; + case OpSUDotAccSat: return "OpSUDotAccSat"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case OpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case OpReadClockKHR: return "OpReadClockKHR"; + case OpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case OpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case OpTerminateRayNV: return "OpTerminateRayNV"; + case OpTraceNV: return "OpTraceNV"; + case OpTraceMotionNV: return "OpTraceMotionNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case OpExecuteCallableNV: return "OpExecuteCallableNV"; + case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpConvertUToImageNV: return "OpConvertUToImageNV"; + case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case OpConvertImageToUNV: return "OpConvertImageToUNV"; + case OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case OpRawAccessChainNV: return "OpRawAccessChainNV"; + case OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case OpAbsISubINTEL: return "OpAbsISubINTEL"; + case OpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case OpIAddSatINTEL: return "OpIAddSatINTEL"; + case OpUAddSatINTEL: return "OpUAddSatINTEL"; + case OpIAverageINTEL: return "OpIAverageINTEL"; + case OpUAverageINTEL: return "OpUAverageINTEL"; + case OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case OpISubSatINTEL: return "OpISubSatINTEL"; + case OpUSubSatINTEL: return "OpUSubSatINTEL"; + case OpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case OpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case OpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case OpAsmINTEL: return "OpAsmINTEL"; + case OpAsmCallINTEL: return "OpAsmCallINTEL"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case OpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case OpExpectKHR: return "OpExpectKHR"; + case OpDecorateString: return "OpDecorateString"; + case OpMemberDecorateString: return "OpMemberDecorateString"; + case OpVmeImageINTEL: return "OpVmeImageINTEL"; + case OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case OpLoopControlINTEL: return "OpLoopControlINTEL"; + case OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case OpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case OpFixedSinINTEL: return "OpFixedSinINTEL"; + case OpFixedCosINTEL: return "OpFixedCosINTEL"; + case OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case OpFixedLogINTEL: return "OpFixedLogINTEL"; + case OpFixedExpINTEL: return "OpFixedExpINTEL"; + case OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case OpFPGARegINTEL: return "OpFPGARegINTEL"; + case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case OpGroupIMulKHR: return "OpGroupIMulKHR"; + case OpGroupFMulKHR: return "OpGroupFMulKHR"; + case OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ -// Overload operator| for mask bit combining +// Overload bitwise operators for mask bit combining inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +inline RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } +inline RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } +inline RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } +inline RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.hpp11 b/prog/3rdPartyLibs/vulkan/include/spirv.hpp11 index f1fd764ec..25177a458 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.hpp11 +++ b/prog/3rdPartyLibs/vulkan/include/spirv.hpp11 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. +// Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -66,6 +68,12 @@ enum class SourceLanguage : unsigned { OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, Max = 0x7fffffff, }; @@ -91,6 +99,8 @@ enum class ExecutionModel : unsigned { MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, Max = 0x7fffffff, }; @@ -151,6 +161,9 @@ enum class ExecutionMode : unsigned { SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, @@ -158,11 +171,28 @@ enum class ExecutionMode : unsigned { SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, @@ -180,6 +210,14 @@ enum class ExecutionMode : unsigned { NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, Max = 0x7fffffff, }; @@ -197,6 +235,9 @@ enum class StorageClass : unsigned { AtomicCounter = 10, Image = 11, StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -211,6 +252,8 @@ enum class StorageClass : unsigned { ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, @@ -225,6 +268,7 @@ enum class Dim : unsigned { Rect = 4, Buffer = 5, SubpassData = 6, + TileImageDataEXT = 4173, Max = 0x7fffffff, }; @@ -331,6 +375,8 @@ enum class ImageChannelDataType : unsigned { Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, Max = 0x7fffffff, }; @@ -388,8 +434,11 @@ enum class FPFastMathModeShift : unsigned { NSZ = 2, AllowRecip = 3, Fast = 4, + AllowContract = 16, AllowContractFastINTEL = 16, + AllowReassoc = 17, AllowReassocINTEL = 17, + AllowTransform = 18, Max = 0x7fffffff, }; @@ -400,8 +449,11 @@ enum class FPFastMathModeMask : unsigned { NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, + AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, }; enum class FPRoundingMode : unsigned { @@ -435,6 +487,7 @@ enum class FunctionParameterAttribute : unsigned { NoCapture = 5, NoWrite = 6, NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, Max = 0x7fffffff, }; @@ -488,11 +541,19 @@ enum class Decoration : unsigned { MaxByteOffsetId = 47, NoSignedWrap = 4469, NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, @@ -504,6 +565,7 @@ enum class Decoration : unsigned { RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, @@ -536,18 +598,45 @@ enum class Decoration : unsigned { MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, Max = 0x7fffffff, }; @@ -593,6 +682,11 @@ enum class BuiltIn : unsigned { SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, @@ -618,6 +712,8 @@ enum class BuiltIn : unsigned { BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -640,6 +736,10 @@ enum class BuiltIn : unsigned { FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, @@ -666,6 +766,9 @@ enum class BuiltIn : unsigned { HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, @@ -673,6 +776,9 @@ enum class BuiltIn : unsigned { SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, Max = 0x7fffffff, }; @@ -706,6 +812,8 @@ enum class LoopControlShift : unsigned { MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, Max = 0x7fffffff, }; @@ -728,6 +836,8 @@ enum class LoopControlMask : unsigned { MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, }; enum class FunctionControlShift : unsigned { @@ -800,6 +910,8 @@ enum class MemoryAccessShift : unsigned { MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, Max = 0x7fffffff, }; @@ -814,6 +926,8 @@ enum class MemoryAccessMask : unsigned { MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, }; enum class Scope : unsigned { @@ -927,6 +1041,11 @@ enum class Capability : unsigned { ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, @@ -958,6 +1077,10 @@ enum class Capability : unsigned { RayQueryKHR = 4472, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, @@ -965,6 +1088,8 @@ enum class Capability : unsigned { ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, @@ -975,6 +1100,7 @@ enum class Capability : unsigned { FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, + MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsNV = 5288, @@ -1005,6 +1131,7 @@ enum class Capability : unsigned { UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, @@ -1022,7 +1149,14 @@ enum class Capability : unsigned { FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1055,9 +1189,13 @@ enum class Capability : unsigned { FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, @@ -1069,13 +1207,31 @@ enum class Capability : unsigned { DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, - LongConstantCompositeINTEL = 6089, + LongCompositesINTEL = 6089, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, Max = 0x7fffffff, }; @@ -1090,6 +1246,7 @@ enum class RayFlagsShift : unsigned { CullNoOpaqueKHR = 7, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, Max = 0x7fffffff, }; @@ -1105,6 +1262,7 @@ enum class RayFlagsMask : unsigned { CullNoOpaqueKHR = 0x00000080, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, }; enum class RayQueryIntersection : unsigned { @@ -1180,6 +1338,87 @@ enum class PackedVectorFormat : unsigned { Max = 0x7fffffff, }; +enum class CooperativeMatrixOperandsShift : unsigned { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + Max = 0x7fffffff, +}; + +enum class CooperativeMatrixOperandsMask : unsigned { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, +}; + +enum class CooperativeMatrixLayout : unsigned { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + Max = 0x7fffffff, +}; + +enum class CooperativeMatrixUse : unsigned { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + Max = 0x7fffffff, +}; + +enum class InitializationModeQualifier : unsigned { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + Max = 0x7fffffff, +}; + +enum class HostAccessQualifier : unsigned { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + Max = 0x7fffffff, +}; + +enum class LoadCacheControl : unsigned { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + Max = 0x7fffffff, +}; + +enum class StoreCacheControl : unsigned { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + Max = 0x7fffffff, +}; + +enum class NamedMaximumNumberOfRegisters : unsigned { + AutoINTEL = 0, + Max = 0x7fffffff, +}; + +enum class RawAccessChainOperandsShift : unsigned { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + Max = 0x7fffffff, +}; + +enum class RawAccessChainOperandsMask : unsigned { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, +}; + enum class Op : unsigned { OpNop = 0, OpUndef = 1, @@ -1525,13 +1764,18 @@ enum class Op : unsigned { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1549,6 +1793,14 @@ enum class Op : unsigned { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1556,6 +1808,14 @@ enum class Op : unsigned { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1567,9 +1827,51 @@ enum class Op : unsigned { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1577,6 +1879,7 @@ enum class Op : unsigned { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1597,6 +1900,7 @@ enum class Op : unsigned { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1797,6 +2101,9 @@ enum class Op : unsigned { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1835,10 +2142,28 @@ enum class Op : unsigned { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, Max = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2187,13 +2512,18 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpPtrEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case Op::OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case Op::OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case Op::OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2205,6 +2535,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case Op::OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case Op::OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case Op::OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case Op::OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2212,6 +2550,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2223,16 +2569,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case Op::OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case Op::OpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case Op::OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case Op::OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case Op::OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case Op::OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case Op::OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case Op::OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case Op::OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case Op::OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case Op::OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case Op::OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2250,6 +2639,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case Op::OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case Op::OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2448,6 +2838,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case Op::OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case Op::OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2486,22 +2879,1856 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; + } +} +inline const char* SourceLanguageToString(SourceLanguage value) { + switch (value) { + case SourceLanguageUnknown: return "Unknown"; + case SourceLanguageESSL: return "ESSL"; + case SourceLanguageGLSL: return "GLSL"; + case SourceLanguageOpenCL_C: return "OpenCL_C"; + case SourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguageHLSL: return "HLSL"; + case SourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguageSYCL: return "SYCL"; + case SourceLanguageHERO_C: return "HERO_C"; + case SourceLanguageNZSL: return "NZSL"; + case SourceLanguageWGSL: return "WGSL"; + case SourceLanguageSlang: return "Slang"; + case SourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModelToString(ExecutionModel value) { + switch (value) { + case ExecutionModelVertex: return "Vertex"; + case ExecutionModelTessellationControl: return "TessellationControl"; + case ExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModelGeometry: return "Geometry"; + case ExecutionModelFragment: return "Fragment"; + case ExecutionModelGLCompute: return "GLCompute"; + case ExecutionModelKernel: return "Kernel"; + case ExecutionModelTaskNV: return "TaskNV"; + case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModelIntersectionKHR: return "IntersectionKHR"; + case ExecutionModelAnyHitKHR: return "AnyHitKHR"; + case ExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModelMissKHR: return "MissKHR"; + case ExecutionModelCallableKHR: return "CallableKHR"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* AddressingModelToString(AddressingModel value) { + switch (value) { + case AddressingModelLogical: return "Logical"; + case AddressingModelPhysical32: return "Physical32"; + case AddressingModelPhysical64: return "Physical64"; + case AddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* MemoryModelToString(MemoryModel value) { + switch (value) { + case MemoryModelSimple: return "Simple"; + case MemoryModelGLSL450: return "GLSL450"; + case MemoryModelOpenCL: return "OpenCL"; + case MemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModeToString(ExecutionMode value) { + switch (value) { + case ExecutionModeInvocations: return "Invocations"; + case ExecutionModeSpacingEqual: return "SpacingEqual"; + case ExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionModeVertexOrderCw: return "VertexOrderCw"; + case ExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case ExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case ExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case ExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case ExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionModePointMode: return "PointMode"; + case ExecutionModeXfb: return "Xfb"; + case ExecutionModeDepthReplacing: return "DepthReplacing"; + case ExecutionModeDepthGreater: return "DepthGreater"; + case ExecutionModeDepthLess: return "DepthLess"; + case ExecutionModeDepthUnchanged: return "DepthUnchanged"; + case ExecutionModeLocalSize: return "LocalSize"; + case ExecutionModeLocalSizeHint: return "LocalSizeHint"; + case ExecutionModeInputPoints: return "InputPoints"; + case ExecutionModeInputLines: return "InputLines"; + case ExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionModeTriangles: return "Triangles"; + case ExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionModeQuads: return "Quads"; + case ExecutionModeIsolines: return "Isolines"; + case ExecutionModeOutputVertices: return "OutputVertices"; + case ExecutionModeOutputPoints: return "OutputPoints"; + case ExecutionModeOutputLineStrip: return "OutputLineStrip"; + case ExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionModeVecTypeHint: return "VecTypeHint"; + case ExecutionModeContractionOff: return "ContractionOff"; + case ExecutionModeInitializer: return "Initializer"; + case ExecutionModeFinalizer: return "Finalizer"; + case ExecutionModeSubgroupSize: return "SubgroupSize"; + case ExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case ExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case ExecutionModeLocalSizeId: return "LocalSizeId"; + case ExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case ExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case ExecutionModeDenormPreserve: return "DenormPreserve"; + case ExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case ExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case ExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case ExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case ExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case ExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case ExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* StorageClassToString(StorageClass value) { + switch (value) { + case StorageClassUniformConstant: return "UniformConstant"; + case StorageClassInput: return "Input"; + case StorageClassUniform: return "Uniform"; + case StorageClassOutput: return "Output"; + case StorageClassWorkgroup: return "Workgroup"; + case StorageClassCrossWorkgroup: return "CrossWorkgroup"; + case StorageClassPrivate: return "Private"; + case StorageClassFunction: return "Function"; + case StorageClassGeneric: return "Generic"; + case StorageClassPushConstant: return "PushConstant"; + case StorageClassAtomicCounter: return "AtomicCounter"; + case StorageClassImage: return "Image"; + case StorageClassStorageBuffer: return "StorageBuffer"; + case StorageClassTileImageEXT: return "TileImageEXT"; + case StorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case StorageClassCallableDataKHR: return "CallableDataKHR"; + case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClassRayPayloadKHR: return "RayPayloadKHR"; + case StorageClassHitAttributeKHR: return "HitAttributeKHR"; + case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* DimToString(Dim value) { + switch (value) { + case Dim1D: return "1D"; + case Dim2D: return "2D"; + case Dim3D: return "3D"; + case DimCube: return "Cube"; + case DimRect: return "Rect"; + case DimBuffer: return "Buffer"; + case DimSubpassData: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { + switch (value) { + case SamplerAddressingModeNone: return "None"; + case SamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SamplerAddressingModeClamp: return "Clamp"; + case SamplerAddressingModeRepeat: return "Repeat"; + case SamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SamplerFilterModeToString(SamplerFilterMode value) { + switch (value) { + case SamplerFilterModeNearest: return "Nearest"; + case SamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* ImageFormatToString(ImageFormat value) { + switch (value) { + case ImageFormatUnknown: return "Unknown"; + case ImageFormatRgba32f: return "Rgba32f"; + case ImageFormatRgba16f: return "Rgba16f"; + case ImageFormatR32f: return "R32f"; + case ImageFormatRgba8: return "Rgba8"; + case ImageFormatRgba8Snorm: return "Rgba8Snorm"; + case ImageFormatRg32f: return "Rg32f"; + case ImageFormatRg16f: return "Rg16f"; + case ImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case ImageFormatR16f: return "R16f"; + case ImageFormatRgba16: return "Rgba16"; + case ImageFormatRgb10A2: return "Rgb10A2"; + case ImageFormatRg16: return "Rg16"; + case ImageFormatRg8: return "Rg8"; + case ImageFormatR16: return "R16"; + case ImageFormatR8: return "R8"; + case ImageFormatRgba16Snorm: return "Rgba16Snorm"; + case ImageFormatRg16Snorm: return "Rg16Snorm"; + case ImageFormatRg8Snorm: return "Rg8Snorm"; + case ImageFormatR16Snorm: return "R16Snorm"; + case ImageFormatR8Snorm: return "R8Snorm"; + case ImageFormatRgba32i: return "Rgba32i"; + case ImageFormatRgba16i: return "Rgba16i"; + case ImageFormatRgba8i: return "Rgba8i"; + case ImageFormatR32i: return "R32i"; + case ImageFormatRg32i: return "Rg32i"; + case ImageFormatRg16i: return "Rg16i"; + case ImageFormatRg8i: return "Rg8i"; + case ImageFormatR16i: return "R16i"; + case ImageFormatR8i: return "R8i"; + case ImageFormatRgba32ui: return "Rgba32ui"; + case ImageFormatRgba16ui: return "Rgba16ui"; + case ImageFormatRgba8ui: return "Rgba8ui"; + case ImageFormatR32ui: return "R32ui"; + case ImageFormatRgb10a2ui: return "Rgb10a2ui"; + case ImageFormatRg32ui: return "Rg32ui"; + case ImageFormatRg16ui: return "Rg16ui"; + case ImageFormatRg8ui: return "Rg8ui"; + case ImageFormatR16ui: return "R16ui"; + case ImageFormatR8ui: return "R8ui"; + case ImageFormatR64ui: return "R64ui"; + case ImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelOrderToString(ImageChannelOrder value) { + switch (value) { + case ImageChannelOrderR: return "R"; + case ImageChannelOrderA: return "A"; + case ImageChannelOrderRG: return "RG"; + case ImageChannelOrderRA: return "RA"; + case ImageChannelOrderRGB: return "RGB"; + case ImageChannelOrderRGBA: return "RGBA"; + case ImageChannelOrderBGRA: return "BGRA"; + case ImageChannelOrderARGB: return "ARGB"; + case ImageChannelOrderIntensity: return "Intensity"; + case ImageChannelOrderLuminance: return "Luminance"; + case ImageChannelOrderRx: return "Rx"; + case ImageChannelOrderRGx: return "RGx"; + case ImageChannelOrderRGBx: return "RGBx"; + case ImageChannelOrderDepth: return "Depth"; + case ImageChannelOrderDepthStencil: return "DepthStencil"; + case ImageChannelOrdersRGB: return "sRGB"; + case ImageChannelOrdersRGBx: return "sRGBx"; + case ImageChannelOrdersRGBA: return "sRGBA"; + case ImageChannelOrdersBGRA: return "sBGRA"; + case ImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { + switch (value) { + case ImageChannelDataTypeSnormInt8: return "SnormInt8"; + case ImageChannelDataTypeSnormInt16: return "SnormInt16"; + case ImageChannelDataTypeUnormInt8: return "UnormInt8"; + case ImageChannelDataTypeUnormInt16: return "UnormInt16"; + case ImageChannelDataTypeUnormShort565: return "UnormShort565"; + case ImageChannelDataTypeUnormShort555: return "UnormShort555"; + case ImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case ImageChannelDataTypeSignedInt8: return "SignedInt8"; + case ImageChannelDataTypeSignedInt16: return "SignedInt16"; + case ImageChannelDataTypeSignedInt32: return "SignedInt32"; + case ImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case ImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case ImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case ImageChannelDataTypeHalfFloat: return "HalfFloat"; + case ImageChannelDataTypeFloat: return "Float"; + case ImageChannelDataTypeUnormInt24: return "UnormInt24"; + case ImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; + } +} + +inline const char* FPRoundingModeToString(FPRoundingMode value) { + switch (value) { + case FPRoundingModeRTE: return "RTE"; + case FPRoundingModeRTZ: return "RTZ"; + case FPRoundingModeRTP: return "RTP"; + case FPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* LinkageTypeToString(LinkageType value) { + switch (value) { + case LinkageTypeExport: return "Export"; + case LinkageTypeImport: return "Import"; + case LinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; } } + +inline const char* AccessQualifierToString(AccessQualifier value) { + switch (value) { + case AccessQualifierReadOnly: return "ReadOnly"; + case AccessQualifierWriteOnly: return "WriteOnly"; + case AccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { + switch (value) { + case FunctionParameterAttributeZext: return "Zext"; + case FunctionParameterAttributeSext: return "Sext"; + case FunctionParameterAttributeByVal: return "ByVal"; + case FunctionParameterAttributeSret: return "Sret"; + case FunctionParameterAttributeNoAlias: return "NoAlias"; + case FunctionParameterAttributeNoCapture: return "NoCapture"; + case FunctionParameterAttributeNoWrite: return "NoWrite"; + case FunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case FunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* DecorationToString(Decoration value) { + switch (value) { + case DecorationRelaxedPrecision: return "RelaxedPrecision"; + case DecorationSpecId: return "SpecId"; + case DecorationBlock: return "Block"; + case DecorationBufferBlock: return "BufferBlock"; + case DecorationRowMajor: return "RowMajor"; + case DecorationColMajor: return "ColMajor"; + case DecorationArrayStride: return "ArrayStride"; + case DecorationMatrixStride: return "MatrixStride"; + case DecorationGLSLShared: return "GLSLShared"; + case DecorationGLSLPacked: return "GLSLPacked"; + case DecorationCPacked: return "CPacked"; + case DecorationBuiltIn: return "BuiltIn"; + case DecorationNoPerspective: return "NoPerspective"; + case DecorationFlat: return "Flat"; + case DecorationPatch: return "Patch"; + case DecorationCentroid: return "Centroid"; + case DecorationSample: return "Sample"; + case DecorationInvariant: return "Invariant"; + case DecorationRestrict: return "Restrict"; + case DecorationAliased: return "Aliased"; + case DecorationVolatile: return "Volatile"; + case DecorationConstant: return "Constant"; + case DecorationCoherent: return "Coherent"; + case DecorationNonWritable: return "NonWritable"; + case DecorationNonReadable: return "NonReadable"; + case DecorationUniform: return "Uniform"; + case DecorationUniformId: return "UniformId"; + case DecorationSaturatedConversion: return "SaturatedConversion"; + case DecorationStream: return "Stream"; + case DecorationLocation: return "Location"; + case DecorationComponent: return "Component"; + case DecorationIndex: return "Index"; + case DecorationBinding: return "Binding"; + case DecorationDescriptorSet: return "DescriptorSet"; + case DecorationOffset: return "Offset"; + case DecorationXfbBuffer: return "XfbBuffer"; + case DecorationXfbStride: return "XfbStride"; + case DecorationFuncParamAttr: return "FuncParamAttr"; + case DecorationFPRoundingMode: return "FPRoundingMode"; + case DecorationFPFastMathMode: return "FPFastMathMode"; + case DecorationLinkageAttributes: return "LinkageAttributes"; + case DecorationNoContraction: return "NoContraction"; + case DecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case DecorationAlignment: return "Alignment"; + case DecorationMaxByteOffset: return "MaxByteOffset"; + case DecorationAlignmentId: return "AlignmentId"; + case DecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case DecorationNoSignedWrap: return "NoSignedWrap"; + case DecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case DecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case DecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case DecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case DecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case DecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case DecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case DecorationPerViewNV: return "PerViewNV"; + case DecorationPerTaskNV: return "PerTaskNV"; + case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationNonUniform: return "NonUniform"; + case DecorationRestrictPointer: return "RestrictPointer"; + case DecorationAliasedPointer: return "AliasedPointer"; + case DecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case DecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case DecorationBindlessImageNV: return "BindlessImageNV"; + case DecorationBoundSamplerNV: return "BoundSamplerNV"; + case DecorationBoundImageNV: return "BoundImageNV"; + case DecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case DecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case DecorationClobberINTEL: return "ClobberINTEL"; + case DecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case DecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case DecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case DecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case DecorationStackCallINTEL: return "StackCallINTEL"; + case DecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case DecorationCounterBuffer: return "CounterBuffer"; + case DecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case DecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case DecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case DecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case DecorationRegisterINTEL: return "RegisterINTEL"; + case DecorationMemoryINTEL: return "MemoryINTEL"; + case DecorationNumbanksINTEL: return "NumbanksINTEL"; + case DecorationBankwidthINTEL: return "BankwidthINTEL"; + case DecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case DecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case DecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case DecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case DecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case DecorationMergeINTEL: return "MergeINTEL"; + case DecorationBankBitsINTEL: return "BankBitsINTEL"; + case DecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case DecorationStridesizeINTEL: return "StridesizeINTEL"; + case DecorationWordsizeINTEL: return "WordsizeINTEL"; + case DecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case DecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case DecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case DecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case DecorationPrefetchINTEL: return "PrefetchINTEL"; + case DecorationStallEnableINTEL: return "StallEnableINTEL"; + case DecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case DecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case DecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case DecorationNoAliasINTEL: return "NoAliasINTEL"; + case DecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case DecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case DecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case DecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case DecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case DecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case DecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case DecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case DecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case DecorationStallFreeINTEL: return "StallFreeINTEL"; + case DecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case DecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case DecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case DecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case DecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case DecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case DecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case DecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case DecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case DecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case DecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case DecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case DecorationHostAccessINTEL: return "HostAccessINTEL"; + case DecorationInitModeINTEL: return "InitModeINTEL"; + case DecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case DecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case DecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* BuiltInToString(BuiltIn value) { + switch (value) { + case BuiltInPosition: return "Position"; + case BuiltInPointSize: return "PointSize"; + case BuiltInClipDistance: return "ClipDistance"; + case BuiltInCullDistance: return "CullDistance"; + case BuiltInVertexId: return "VertexId"; + case BuiltInInstanceId: return "InstanceId"; + case BuiltInPrimitiveId: return "PrimitiveId"; + case BuiltInInvocationId: return "InvocationId"; + case BuiltInLayer: return "Layer"; + case BuiltInViewportIndex: return "ViewportIndex"; + case BuiltInTessLevelOuter: return "TessLevelOuter"; + case BuiltInTessLevelInner: return "TessLevelInner"; + case BuiltInTessCoord: return "TessCoord"; + case BuiltInPatchVertices: return "PatchVertices"; + case BuiltInFragCoord: return "FragCoord"; + case BuiltInPointCoord: return "PointCoord"; + case BuiltInFrontFacing: return "FrontFacing"; + case BuiltInSampleId: return "SampleId"; + case BuiltInSamplePosition: return "SamplePosition"; + case BuiltInSampleMask: return "SampleMask"; + case BuiltInFragDepth: return "FragDepth"; + case BuiltInHelperInvocation: return "HelperInvocation"; + case BuiltInNumWorkgroups: return "NumWorkgroups"; + case BuiltInWorkgroupSize: return "WorkgroupSize"; + case BuiltInWorkgroupId: return "WorkgroupId"; + case BuiltInLocalInvocationId: return "LocalInvocationId"; + case BuiltInGlobalInvocationId: return "GlobalInvocationId"; + case BuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case BuiltInWorkDim: return "WorkDim"; + case BuiltInGlobalSize: return "GlobalSize"; + case BuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case BuiltInGlobalOffset: return "GlobalOffset"; + case BuiltInGlobalLinearId: return "GlobalLinearId"; + case BuiltInSubgroupSize: return "SubgroupSize"; + case BuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case BuiltInNumSubgroups: return "NumSubgroups"; + case BuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case BuiltInSubgroupId: return "SubgroupId"; + case BuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case BuiltInVertexIndex: return "VertexIndex"; + case BuiltInInstanceIndex: return "InstanceIndex"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case BuiltInSubgroupEqMask: return "SubgroupEqMask"; + case BuiltInSubgroupGeMask: return "SubgroupGeMask"; + case BuiltInSubgroupGtMask: return "SubgroupGtMask"; + case BuiltInSubgroupLeMask: return "SubgroupLeMask"; + case BuiltInSubgroupLtMask: return "SubgroupLtMask"; + case BuiltInBaseVertex: return "BaseVertex"; + case BuiltInBaseInstance: return "BaseInstance"; + case BuiltInDrawIndex: return "DrawIndex"; + case BuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case BuiltInDeviceIndex: return "DeviceIndex"; + case BuiltInViewIndex: return "ViewIndex"; + case BuiltInShadingRateKHR: return "ShadingRateKHR"; + case BuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case BuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case BuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case BuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case BuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case BuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case BuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case BuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case BuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case BuiltInViewportMaskNV: return "ViewportMaskNV"; + case BuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case BuiltInPositionPerViewNV: return "PositionPerViewNV"; + case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case BuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case BuiltInTaskCountNV: return "TaskCountNV"; + case BuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case BuiltInLayerPerViewNV: return "LayerPerViewNV"; + case BuiltInMeshViewCountNV: return "MeshViewCountNV"; + case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case BuiltInBaryCoordKHR: return "BaryCoordKHR"; + case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInFragSizeEXT: return "FragSizeEXT"; + case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltInLaunchIdKHR: return "LaunchIdKHR"; + case BuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case BuiltInRayTminKHR: return "RayTminKHR"; + case BuiltInRayTmaxKHR: return "RayTmaxKHR"; + case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case BuiltInHitTNV: return "HitTNV"; + case BuiltInHitKindKHR: return "HitKindKHR"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case BuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case BuiltInSMCountNV: return "SMCountNV"; + case BuiltInWarpIDNV: return "WarpIDNV"; + case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* ScopeToString(Scope value) { + switch (value) { + case ScopeCrossDevice: return "CrossDevice"; + case ScopeDevice: return "Device"; + case ScopeWorkgroup: return "Workgroup"; + case ScopeSubgroup: return "Subgroup"; + case ScopeInvocation: return "Invocation"; + case ScopeQueueFamily: return "QueueFamily"; + case ScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* GroupOperationToString(GroupOperation value) { + switch (value) { + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { + switch (value) { + case KernelEnqueueFlagsNoWait: return "NoWait"; + case KernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case KernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* CapabilityToString(Capability value) { + switch (value) { + case CapabilityMatrix: return "Matrix"; + case CapabilityShader: return "Shader"; + case CapabilityGeometry: return "Geometry"; + case CapabilityTessellation: return "Tessellation"; + case CapabilityAddresses: return "Addresses"; + case CapabilityLinkage: return "Linkage"; + case CapabilityKernel: return "Kernel"; + case CapabilityVector16: return "Vector16"; + case CapabilityFloat16Buffer: return "Float16Buffer"; + case CapabilityFloat16: return "Float16"; + case CapabilityFloat64: return "Float64"; + case CapabilityInt64: return "Int64"; + case CapabilityInt64Atomics: return "Int64Atomics"; + case CapabilityImageBasic: return "ImageBasic"; + case CapabilityImageReadWrite: return "ImageReadWrite"; + case CapabilityImageMipmap: return "ImageMipmap"; + case CapabilityPipes: return "Pipes"; + case CapabilityGroups: return "Groups"; + case CapabilityDeviceEnqueue: return "DeviceEnqueue"; + case CapabilityLiteralSampler: return "LiteralSampler"; + case CapabilityAtomicStorage: return "AtomicStorage"; + case CapabilityInt16: return "Int16"; + case CapabilityTessellationPointSize: return "TessellationPointSize"; + case CapabilityGeometryPointSize: return "GeometryPointSize"; + case CapabilityImageGatherExtended: return "ImageGatherExtended"; + case CapabilityStorageImageMultisample: return "StorageImageMultisample"; + case CapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case CapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case CapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case CapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case CapabilityClipDistance: return "ClipDistance"; + case CapabilityCullDistance: return "CullDistance"; + case CapabilityImageCubeArray: return "ImageCubeArray"; + case CapabilitySampleRateShading: return "SampleRateShading"; + case CapabilityImageRect: return "ImageRect"; + case CapabilitySampledRect: return "SampledRect"; + case CapabilityGenericPointer: return "GenericPointer"; + case CapabilityInt8: return "Int8"; + case CapabilityInputAttachment: return "InputAttachment"; + case CapabilitySparseResidency: return "SparseResidency"; + case CapabilityMinLod: return "MinLod"; + case CapabilitySampled1D: return "Sampled1D"; + case CapabilityImage1D: return "Image1D"; + case CapabilitySampledCubeArray: return "SampledCubeArray"; + case CapabilitySampledBuffer: return "SampledBuffer"; + case CapabilityImageBuffer: return "ImageBuffer"; + case CapabilityImageMSArray: return "ImageMSArray"; + case CapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case CapabilityImageQuery: return "ImageQuery"; + case CapabilityDerivativeControl: return "DerivativeControl"; + case CapabilityInterpolationFunction: return "InterpolationFunction"; + case CapabilityTransformFeedback: return "TransformFeedback"; + case CapabilityGeometryStreams: return "GeometryStreams"; + case CapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case CapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case CapabilityMultiViewport: return "MultiViewport"; + case CapabilitySubgroupDispatch: return "SubgroupDispatch"; + case CapabilityNamedBarrier: return "NamedBarrier"; + case CapabilityPipeStorage: return "PipeStorage"; + case CapabilityGroupNonUniform: return "GroupNonUniform"; + case CapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case CapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case CapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case CapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case CapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case CapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case CapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case CapabilityShaderLayer: return "ShaderLayer"; + case CapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case CapabilityUniformDecoration: return "UniformDecoration"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case CapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; + case CapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case CapabilityVariablePointers: return "VariablePointers"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case CapabilityStoragePushConstant8: return "StoragePushConstant8"; + case CapabilityDenormPreserve: return "DenormPreserve"; + case CapabilityDenormFlushToZero: return "DenormFlushToZero"; + case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case CapabilityRoundingModeRTE: return "RoundingModeRTE"; + case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingKHR: return "RayTracingKHR"; + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case CapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case CapabilityInt64ImageEXT: return "Int64ImageEXT"; + case CapabilityShaderClockKHR: return "ShaderClockKHR"; + case CapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case CapabilityQuadControlKHR: return "QuadControlKHR"; + case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case CapabilityMeshShadingNV: return "MeshShadingNV"; + case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; + case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case CapabilityShaderNonUniform: return "ShaderNonUniform"; + case CapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case CapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case CapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case CapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case CapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case CapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case CapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case CapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case CapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case CapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case CapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case CapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case CapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case CapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case CapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case CapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case CapabilityBindlessTextureNV: return "BindlessTextureNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case CapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case CapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case CapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case CapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case CapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case CapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case CapabilityAsmINTEL: return "AsmINTEL"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case CapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case CapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case CapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case CapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case CapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case CapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case CapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case CapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case CapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case CapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case CapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case CapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case CapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case CapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case CapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case CapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case CapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case CapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case CapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case CapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case CapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case CapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case CapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case CapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case CapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case CapabilityIOPipesINTEL: return "IOPipesINTEL"; + case CapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case CapabilityFPGARegINTEL: return "FPGARegINTEL"; + case CapabilityDotProductInputAll: return "DotProductInputAll"; + case CapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case CapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case CapabilityDotProduct: return "DotProduct"; + case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case CapabilityBitInstructions: return "BitInstructions"; + case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case CapabilityFloatControls2: return "FloatControls2"; + case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case CapabilityOptNoneINTEL: return "OptNoneINTEL"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case CapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case CapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case CapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case CapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case CapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case CapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case CapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case CapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case CapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case CapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case CapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case CapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case CapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case CapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { + switch (value) { + case RayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { + switch (value) { + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { + switch (value) { + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* FPDenormModeToString(FPDenormMode value) { + switch (value) { + case FPDenormModePreserve: return "Preserve"; + case FPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* FPOperationModeToString(FPOperationMode value) { + switch (value) { + case FPOperationModeIEEE: return "IEEE"; + case FPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* QuantizationModesToString(QuantizationModes value) { + switch (value) { + case QuantizationModesTRN: return "TRN"; + case QuantizationModesTRN_ZERO: return "TRN_ZERO"; + case QuantizationModesRND: return "RND"; + case QuantizationModesRND_ZERO: return "RND_ZERO"; + case QuantizationModesRND_INF: return "RND_INF"; + case QuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModesRND_CONV: return "RND_CONV"; + case QuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* OverflowModesToString(OverflowModes value) { + switch (value) { + case OverflowModesWRAP: return "WRAP"; + case OverflowModesSAT: return "SAT"; + case OverflowModesSAT_ZERO: return "SAT_ZERO"; + case OverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* PackedVectorFormatToString(PackedVectorFormat value) { + switch (value) { + case PackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { + switch (value) { + case CooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { + switch (value) { + case CooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { + switch (value) { + case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* HostAccessQualifierToString(HostAccessQualifier value) { + switch (value) { + case HostAccessQualifierNoneINTEL: return "NoneINTEL"; + case HostAccessQualifierReadINTEL: return "ReadINTEL"; + case HostAccessQualifierWriteINTEL: return "WriteINTEL"; + case HostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* LoadCacheControlToString(LoadCacheControl value) { + switch (value) { + case LoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case LoadCacheControlCachedINTEL: return "CachedINTEL"; + case LoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case LoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* StoreCacheControlToString(StoreCacheControl value) { + switch (value) { + case StoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case StoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { + switch (value) { + case NamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* OpToString(Op value) { + switch (value) { + case OpNop: return "OpNop"; + case OpUndef: return "OpUndef"; + case OpSourceContinued: return "OpSourceContinued"; + case OpSource: return "OpSource"; + case OpSourceExtension: return "OpSourceExtension"; + case OpName: return "OpName"; + case OpMemberName: return "OpMemberName"; + case OpString: return "OpString"; + case OpLine: return "OpLine"; + case OpExtension: return "OpExtension"; + case OpExtInstImport: return "OpExtInstImport"; + case OpExtInst: return "OpExtInst"; + case OpMemoryModel: return "OpMemoryModel"; + case OpEntryPoint: return "OpEntryPoint"; + case OpExecutionMode: return "OpExecutionMode"; + case OpCapability: return "OpCapability"; + case OpTypeVoid: return "OpTypeVoid"; + case OpTypeBool: return "OpTypeBool"; + case OpTypeInt: return "OpTypeInt"; + case OpTypeFloat: return "OpTypeFloat"; + case OpTypeVector: return "OpTypeVector"; + case OpTypeMatrix: return "OpTypeMatrix"; + case OpTypeImage: return "OpTypeImage"; + case OpTypeSampler: return "OpTypeSampler"; + case OpTypeSampledImage: return "OpTypeSampledImage"; + case OpTypeArray: return "OpTypeArray"; + case OpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case OpTypeStruct: return "OpTypeStruct"; + case OpTypeOpaque: return "OpTypeOpaque"; + case OpTypePointer: return "OpTypePointer"; + case OpTypeFunction: return "OpTypeFunction"; + case OpTypeEvent: return "OpTypeEvent"; + case OpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case OpTypeReserveId: return "OpTypeReserveId"; + case OpTypeQueue: return "OpTypeQueue"; + case OpTypePipe: return "OpTypePipe"; + case OpTypeForwardPointer: return "OpTypeForwardPointer"; + case OpConstantTrue: return "OpConstantTrue"; + case OpConstantFalse: return "OpConstantFalse"; + case OpConstant: return "OpConstant"; + case OpConstantComposite: return "OpConstantComposite"; + case OpConstantSampler: return "OpConstantSampler"; + case OpConstantNull: return "OpConstantNull"; + case OpSpecConstantTrue: return "OpSpecConstantTrue"; + case OpSpecConstantFalse: return "OpSpecConstantFalse"; + case OpSpecConstant: return "OpSpecConstant"; + case OpSpecConstantComposite: return "OpSpecConstantComposite"; + case OpSpecConstantOp: return "OpSpecConstantOp"; + case OpFunction: return "OpFunction"; + case OpFunctionParameter: return "OpFunctionParameter"; + case OpFunctionEnd: return "OpFunctionEnd"; + case OpFunctionCall: return "OpFunctionCall"; + case OpVariable: return "OpVariable"; + case OpImageTexelPointer: return "OpImageTexelPointer"; + case OpLoad: return "OpLoad"; + case OpStore: return "OpStore"; + case OpCopyMemory: return "OpCopyMemory"; + case OpCopyMemorySized: return "OpCopyMemorySized"; + case OpAccessChain: return "OpAccessChain"; + case OpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case OpPtrAccessChain: return "OpPtrAccessChain"; + case OpArrayLength: return "OpArrayLength"; + case OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case OpDecorate: return "OpDecorate"; + case OpMemberDecorate: return "OpMemberDecorate"; + case OpDecorationGroup: return "OpDecorationGroup"; + case OpGroupDecorate: return "OpGroupDecorate"; + case OpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case OpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case OpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case OpVectorShuffle: return "OpVectorShuffle"; + case OpCompositeConstruct: return "OpCompositeConstruct"; + case OpCompositeExtract: return "OpCompositeExtract"; + case OpCompositeInsert: return "OpCompositeInsert"; + case OpCopyObject: return "OpCopyObject"; + case OpTranspose: return "OpTranspose"; + case OpSampledImage: return "OpSampledImage"; + case OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case OpImageFetch: return "OpImageFetch"; + case OpImageGather: return "OpImageGather"; + case OpImageDrefGather: return "OpImageDrefGather"; + case OpImageRead: return "OpImageRead"; + case OpImageWrite: return "OpImageWrite"; + case OpImage: return "OpImage"; + case OpImageQueryFormat: return "OpImageQueryFormat"; + case OpImageQueryOrder: return "OpImageQueryOrder"; + case OpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case OpImageQuerySize: return "OpImageQuerySize"; + case OpImageQueryLod: return "OpImageQueryLod"; + case OpImageQueryLevels: return "OpImageQueryLevels"; + case OpImageQuerySamples: return "OpImageQuerySamples"; + case OpConvertFToU: return "OpConvertFToU"; + case OpConvertFToS: return "OpConvertFToS"; + case OpConvertSToF: return "OpConvertSToF"; + case OpConvertUToF: return "OpConvertUToF"; + case OpUConvert: return "OpUConvert"; + case OpSConvert: return "OpSConvert"; + case OpFConvert: return "OpFConvert"; + case OpQuantizeToF16: return "OpQuantizeToF16"; + case OpConvertPtrToU: return "OpConvertPtrToU"; + case OpSatConvertSToU: return "OpSatConvertSToU"; + case OpSatConvertUToS: return "OpSatConvertUToS"; + case OpConvertUToPtr: return "OpConvertUToPtr"; + case OpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case OpGenericCastToPtr: return "OpGenericCastToPtr"; + case OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case OpBitcast: return "OpBitcast"; + case OpSNegate: return "OpSNegate"; + case OpFNegate: return "OpFNegate"; + case OpIAdd: return "OpIAdd"; + case OpFAdd: return "OpFAdd"; + case OpISub: return "OpISub"; + case OpFSub: return "OpFSub"; + case OpIMul: return "OpIMul"; + case OpFMul: return "OpFMul"; + case OpUDiv: return "OpUDiv"; + case OpSDiv: return "OpSDiv"; + case OpFDiv: return "OpFDiv"; + case OpUMod: return "OpUMod"; + case OpSRem: return "OpSRem"; + case OpSMod: return "OpSMod"; + case OpFRem: return "OpFRem"; + case OpFMod: return "OpFMod"; + case OpVectorTimesScalar: return "OpVectorTimesScalar"; + case OpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case OpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case OpMatrixTimesVector: return "OpMatrixTimesVector"; + case OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case OpOuterProduct: return "OpOuterProduct"; + case OpDot: return "OpDot"; + case OpIAddCarry: return "OpIAddCarry"; + case OpISubBorrow: return "OpISubBorrow"; + case OpUMulExtended: return "OpUMulExtended"; + case OpSMulExtended: return "OpSMulExtended"; + case OpAny: return "OpAny"; + case OpAll: return "OpAll"; + case OpIsNan: return "OpIsNan"; + case OpIsInf: return "OpIsInf"; + case OpIsFinite: return "OpIsFinite"; + case OpIsNormal: return "OpIsNormal"; + case OpSignBitSet: return "OpSignBitSet"; + case OpLessOrGreater: return "OpLessOrGreater"; + case OpOrdered: return "OpOrdered"; + case OpUnordered: return "OpUnordered"; + case OpLogicalEqual: return "OpLogicalEqual"; + case OpLogicalNotEqual: return "OpLogicalNotEqual"; + case OpLogicalOr: return "OpLogicalOr"; + case OpLogicalAnd: return "OpLogicalAnd"; + case OpLogicalNot: return "OpLogicalNot"; + case OpSelect: return "OpSelect"; + case OpIEqual: return "OpIEqual"; + case OpINotEqual: return "OpINotEqual"; + case OpUGreaterThan: return "OpUGreaterThan"; + case OpSGreaterThan: return "OpSGreaterThan"; + case OpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case OpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case OpULessThan: return "OpULessThan"; + case OpSLessThan: return "OpSLessThan"; + case OpULessThanEqual: return "OpULessThanEqual"; + case OpSLessThanEqual: return "OpSLessThanEqual"; + case OpFOrdEqual: return "OpFOrdEqual"; + case OpFUnordEqual: return "OpFUnordEqual"; + case OpFOrdNotEqual: return "OpFOrdNotEqual"; + case OpFUnordNotEqual: return "OpFUnordNotEqual"; + case OpFOrdLessThan: return "OpFOrdLessThan"; + case OpFUnordLessThan: return "OpFUnordLessThan"; + case OpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case OpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case OpShiftRightLogical: return "OpShiftRightLogical"; + case OpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case OpShiftLeftLogical: return "OpShiftLeftLogical"; + case OpBitwiseOr: return "OpBitwiseOr"; + case OpBitwiseXor: return "OpBitwiseXor"; + case OpBitwiseAnd: return "OpBitwiseAnd"; + case OpNot: return "OpNot"; + case OpBitFieldInsert: return "OpBitFieldInsert"; + case OpBitFieldSExtract: return "OpBitFieldSExtract"; + case OpBitFieldUExtract: return "OpBitFieldUExtract"; + case OpBitReverse: return "OpBitReverse"; + case OpBitCount: return "OpBitCount"; + case OpDPdx: return "OpDPdx"; + case OpDPdy: return "OpDPdy"; + case OpFwidth: return "OpFwidth"; + case OpDPdxFine: return "OpDPdxFine"; + case OpDPdyFine: return "OpDPdyFine"; + case OpFwidthFine: return "OpFwidthFine"; + case OpDPdxCoarse: return "OpDPdxCoarse"; + case OpDPdyCoarse: return "OpDPdyCoarse"; + case OpFwidthCoarse: return "OpFwidthCoarse"; + case OpEmitVertex: return "OpEmitVertex"; + case OpEndPrimitive: return "OpEndPrimitive"; + case OpEmitStreamVertex: return "OpEmitStreamVertex"; + case OpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case OpControlBarrier: return "OpControlBarrier"; + case OpMemoryBarrier: return "OpMemoryBarrier"; + case OpAtomicLoad: return "OpAtomicLoad"; + case OpAtomicStore: return "OpAtomicStore"; + case OpAtomicExchange: return "OpAtomicExchange"; + case OpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case OpAtomicIIncrement: return "OpAtomicIIncrement"; + case OpAtomicIDecrement: return "OpAtomicIDecrement"; + case OpAtomicIAdd: return "OpAtomicIAdd"; + case OpAtomicISub: return "OpAtomicISub"; + case OpAtomicSMin: return "OpAtomicSMin"; + case OpAtomicUMin: return "OpAtomicUMin"; + case OpAtomicSMax: return "OpAtomicSMax"; + case OpAtomicUMax: return "OpAtomicUMax"; + case OpAtomicAnd: return "OpAtomicAnd"; + case OpAtomicOr: return "OpAtomicOr"; + case OpAtomicXor: return "OpAtomicXor"; + case OpPhi: return "OpPhi"; + case OpLoopMerge: return "OpLoopMerge"; + case OpSelectionMerge: return "OpSelectionMerge"; + case OpLabel: return "OpLabel"; + case OpBranch: return "OpBranch"; + case OpBranchConditional: return "OpBranchConditional"; + case OpSwitch: return "OpSwitch"; + case OpKill: return "OpKill"; + case OpReturn: return "OpReturn"; + case OpReturnValue: return "OpReturnValue"; + case OpUnreachable: return "OpUnreachable"; + case OpLifetimeStart: return "OpLifetimeStart"; + case OpLifetimeStop: return "OpLifetimeStop"; + case OpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case OpGroupWaitEvents: return "OpGroupWaitEvents"; + case OpGroupAll: return "OpGroupAll"; + case OpGroupAny: return "OpGroupAny"; + case OpGroupBroadcast: return "OpGroupBroadcast"; + case OpGroupIAdd: return "OpGroupIAdd"; + case OpGroupFAdd: return "OpGroupFAdd"; + case OpGroupFMin: return "OpGroupFMin"; + case OpGroupUMin: return "OpGroupUMin"; + case OpGroupSMin: return "OpGroupSMin"; + case OpGroupFMax: return "OpGroupFMax"; + case OpGroupUMax: return "OpGroupUMax"; + case OpGroupSMax: return "OpGroupSMax"; + case OpReadPipe: return "OpReadPipe"; + case OpWritePipe: return "OpWritePipe"; + case OpReservedReadPipe: return "OpReservedReadPipe"; + case OpReservedWritePipe: return "OpReservedWritePipe"; + case OpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case OpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case OpCommitReadPipe: return "OpCommitReadPipe"; + case OpCommitWritePipe: return "OpCommitWritePipe"; + case OpIsValidReserveId: return "OpIsValidReserveId"; + case OpGetNumPipePackets: return "OpGetNumPipePackets"; + case OpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case OpEnqueueMarker: return "OpEnqueueMarker"; + case OpEnqueueKernel: return "OpEnqueueKernel"; + case OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case OpRetainEvent: return "OpRetainEvent"; + case OpReleaseEvent: return "OpReleaseEvent"; + case OpCreateUserEvent: return "OpCreateUserEvent"; + case OpIsValidEvent: return "OpIsValidEvent"; + case OpSetUserEventStatus: return "OpSetUserEventStatus"; + case OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case OpGetDefaultQueue: return "OpGetDefaultQueue"; + case OpBuildNDRange: return "OpBuildNDRange"; + case OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case OpImageSparseFetch: return "OpImageSparseFetch"; + case OpImageSparseGather: return "OpImageSparseGather"; + case OpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case OpNoLine: return "OpNoLine"; + case OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case OpAtomicFlagClear: return "OpAtomicFlagClear"; + case OpImageSparseRead: return "OpImageSparseRead"; + case OpSizeOf: return "OpSizeOf"; + case OpTypePipeStorage: return "OpTypePipeStorage"; + case OpConstantPipeStorage: return "OpConstantPipeStorage"; + case OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case OpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpExecutionModeId: return "OpExecutionModeId"; + case OpDecorateId: return "OpDecorateId"; + case OpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case OpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case OpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case OpCopyLogical: return "OpCopyLogical"; + case OpPtrEqual: return "OpPtrEqual"; + case OpPtrNotEqual: return "OpPtrNotEqual"; + case OpPtrDiff: return "OpPtrDiff"; + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case OpTerminateInvocation: return "OpTerminateInvocation"; + case OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case OpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case OpTraceRayKHR: return "OpTraceRayKHR"; + case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case OpTerminateRayKHR: return "OpTerminateRayKHR"; + case OpSDot: return "OpSDot"; + case OpUDot: return "OpUDot"; + case OpSUDot: return "OpSUDot"; + case OpSDotAccSat: return "OpSDotAccSat"; + case OpUDotAccSat: return "OpUDotAccSat"; + case OpSUDotAccSat: return "OpSUDotAccSat"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case OpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case OpReadClockKHR: return "OpReadClockKHR"; + case OpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case OpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case OpTerminateRayNV: return "OpTerminateRayNV"; + case OpTraceNV: return "OpTraceNV"; + case OpTraceMotionNV: return "OpTraceMotionNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case OpExecuteCallableNV: return "OpExecuteCallableNV"; + case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpConvertUToImageNV: return "OpConvertUToImageNV"; + case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case OpConvertImageToUNV: return "OpConvertImageToUNV"; + case OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case OpRawAccessChainNV: return "OpRawAccessChainNV"; + case OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case OpAbsISubINTEL: return "OpAbsISubINTEL"; + case OpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case OpIAddSatINTEL: return "OpIAddSatINTEL"; + case OpUAddSatINTEL: return "OpUAddSatINTEL"; + case OpIAverageINTEL: return "OpIAverageINTEL"; + case OpUAverageINTEL: return "OpUAverageINTEL"; + case OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case OpISubSatINTEL: return "OpISubSatINTEL"; + case OpUSubSatINTEL: return "OpUSubSatINTEL"; + case OpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case OpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case OpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case OpAsmINTEL: return "OpAsmINTEL"; + case OpAsmCallINTEL: return "OpAsmCallINTEL"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case OpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case OpExpectKHR: return "OpExpectKHR"; + case OpDecorateString: return "OpDecorateString"; + case OpMemberDecorateString: return "OpMemberDecorateString"; + case OpVmeImageINTEL: return "OpVmeImageINTEL"; + case OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case OpLoopControlINTEL: return "OpLoopControlINTEL"; + case OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case OpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case OpFixedSinINTEL: return "OpFixedSinINTEL"; + case OpFixedCosINTEL: return "OpFixedCosINTEL"; + case OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case OpFixedLogINTEL: return "OpFixedLogINTEL"; + case OpFixedExpINTEL: return "OpFixedExpINTEL"; + case OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case OpFPGARegINTEL: return "OpFPGARegINTEL"; + case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case OpGroupIMulKHR: return "OpGroupIMulKHR"; + case OpGroupFMulKHR: return "OpGroupFMulKHR"; + case OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } -inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } -inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +// Overload bitwise operators for mask bit combining + +constexpr ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +constexpr ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +constexpr ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } +constexpr FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +constexpr FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +constexpr FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +constexpr FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } +constexpr SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +constexpr SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +constexpr SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +constexpr SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } +constexpr LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +constexpr LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +constexpr LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +constexpr LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } +constexpr FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +constexpr FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +constexpr FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +constexpr FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } +constexpr MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +constexpr MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +constexpr MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +constexpr MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } +constexpr MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +constexpr MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +constexpr MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +constexpr MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } +constexpr KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +constexpr KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +constexpr KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +constexpr KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } +constexpr RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +constexpr RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +constexpr RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +constexpr RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } +constexpr FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +constexpr FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +constexpr FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +constexpr FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +constexpr CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +constexpr RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } +constexpr RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } +constexpr RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.json b/prog/3rdPartyLibs/vulkan/include/spirv.json index e80d3bd6e..430c74f5e 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.json +++ b/prog/3rdPartyLibs/vulkan/include/spirv.json @@ -6,7 +6,7 @@ "Comment": [ [ - "Copyright (c) 2014-2020 The Khronos Group Inc.", + "Copyright (c) 2014-2024 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -36,7 +36,7 @@ ], [ "Enumeration tokens for SPIR-V, in various styles:", - " C, C++, C++11, JSON, Lua, Python, C#, D", + " C, C++, C++11, JSON, Lua, Python, C#, D, Beef", "", "- C will have tokens with a \"Spv\" prefix, e.g.: SpvSourceLanguageGLSL", "- C++ will have tokens in the \"spv\" name space, e.g.: spv::SourceLanguageGLSL", @@ -46,6 +46,8 @@ "- C# will use enum classes in the Specification class located in the \"Spv\" namespace,", " e.g.: Spv.Specification.SourceLanguage.GLSL", "- D will have tokens under the \"spv\" module, e.g: spv.SourceLanguage.GLSL", + "- Beef will use enum classes in the Specification class located in the \"Spv\" namespace,", + " e.g.: Spv.Specification.SourceLanguage.GLSL", "", "Some tokens act like mask values, which can be OR'd together,", "while others are mutually exclusive. The mask-like ones have", @@ -72,7 +74,13 @@ "OpenCL_C": 3, "OpenCL_CPP": 4, "HLSL": 5, - "CPP_for_OpenCL": 6 + "CPP_for_OpenCL": 6, + "SYCL": 7, + "HERO_C": 8, + "NZSL": 9, + "WGSL": 10, + "Slang": 11, + "Zig": 12 } }, { @@ -100,7 +108,9 @@ "MissKHR": 5317, "MissNV": 5317, "CallableKHR": 5318, - "CallableNV": 5318 + "CallableNV": 5318, + "TaskEXT": 5364, + "MeshEXT": 5365 } }, { @@ -170,6 +180,9 @@ "SubgroupsPerWorkgroupId": 37, "LocalSizeId": 38, "LocalSizeHintId": 39, + "NonCoherentColorAttachmentReadEXT": 4169, + "NonCoherentDepthAttachmentReadEXT": 4170, + "NonCoherentStencilAttachmentReadEXT": 4171, "SubgroupUniformControlFlowKHR": 4421, "PostDepthCoverage": 4446, "DenormPreserve": 4459, @@ -177,11 +190,28 @@ "SignedZeroInfNanPreserve": 4461, "RoundingModeRTE": 4462, "RoundingModeRTZ": 4463, + "EarlyAndLateFragmentTestsAMD": 5017, "StencilRefReplacingEXT": 5027, + "CoalescingAMDX": 5069, + "MaxNodeRecursionAMDX": 5071, + "StaticNumWorkgroupsAMDX": 5072, + "ShaderIndexAMDX": 5073, + "MaxNumWorkgroupsAMDX": 5077, + "StencilRefUnchangedFrontAMD": 5079, + "StencilRefGreaterFrontAMD": 5080, + "StencilRefLessFrontAMD": 5081, + "StencilRefUnchangedBackAMD": 5082, + "StencilRefGreaterBackAMD": 5083, + "StencilRefLessBackAMD": 5084, + "QuadDerivativesKHR": 5088, + "RequireFullQuadsKHR": 5089, + "OutputLinesEXT": 5269, "OutputLinesNV": 5269, + "OutputPrimitivesEXT": 5270, "OutputPrimitivesNV": 5270, "DerivativeGroupQuadsNV": 5289, "DerivativeGroupLinearNV": 5290, + "OutputTrianglesEXT": 5298, "OutputTrianglesNV": 5298, "PixelInterlockOrderedEXT": 5366, "PixelInterlockUnorderedEXT": 5367, @@ -198,7 +228,15 @@ "MaxWorkDimINTEL": 5894, "NoGlobalOffsetINTEL": 5895, "NumSIMDWorkitemsINTEL": 5896, - "SchedulerTargetFmaxMhzINTEL": 5903 + "SchedulerTargetFmaxMhzINTEL": 5903, + "MaximallyReconvergesKHR": 6023, + "FPFastMathDefault": 6028, + "StreamingInterfaceINTEL": 6154, + "RegisterMapInterfaceINTEL": 6160, + "NamedBarrierCountINTEL": 6417, + "MaximumRegistersINTEL": 6461, + "MaximumRegistersIdINTEL": 6462, + "NamedMaximumRegistersINTEL": 6463 } }, { @@ -219,6 +257,9 @@ "AtomicCounter": 10, "Image": 11, "StorageBuffer": 12, + "TileImageEXT": 4172, + "NodePayloadAMDX": 5068, + "NodeOutputPayloadAMDX": 5076, "CallableDataKHR": 5328, "CallableDataNV": 5328, "IncomingCallableDataKHR": 5329, @@ -233,6 +274,8 @@ "ShaderRecordBufferNV": 5343, "PhysicalStorageBuffer": 5349, "PhysicalStorageBufferEXT": 5349, + "HitObjectAttributeNV": 5385, + "TaskPayloadWorkgroupEXT": 5402, "CodeSectionINTEL": 5605, "DeviceOnlyINTEL": 5936, "HostOnlyINTEL": 5937 @@ -249,7 +292,8 @@ "Cube": 3, "Rect": 4, "Buffer": 5, - "SubpassData": 6 + "SubpassData": 6, + "TileImageDataEXT": 4173 } }, { @@ -370,7 +414,9 @@ "HalfFloat": 13, "Float": 14, "UnormInt24": 15, - "UnormInt101010_2": 16 + "UnormInt101010_2": 16, + "UnsignedIntRaw10EXT": 19, + "UnsignedIntRaw12EXT": 20 } }, { @@ -410,8 +456,11 @@ "NSZ": 2, "AllowRecip": 3, "Fast": 4, + "AllowContract": 16, "AllowContractFastINTEL": 16, - "AllowReassocINTEL": 17 + "AllowReassoc": 17, + "AllowReassocINTEL": 17, + "AllowTransform": 18 } }, { @@ -457,7 +506,8 @@ "NoAlias": 4, "NoCapture": 5, "NoWrite": 6, - "NoReadWrite": 7 + "NoReadWrite": 7, + "RuntimeAlignedINTEL": 5940 } }, { @@ -514,11 +564,19 @@ "MaxByteOffsetId": 47, "NoSignedWrap": 4469, "NoUnsignedWrap": 4470, + "WeightTextureQCOM": 4487, + "BlockMatchTextureQCOM": 4488, + "BlockMatchSamplerQCOM": 4499, "ExplicitInterpAMD": 4999, + "NodeSharesPayloadLimitsWithAMDX": 5019, + "NodeMaxPayloadsAMDX": 5020, + "TrackFinishWritingAMDX": 5078, + "PayloadNodeNameAMDX": 5091, "OverrideCoverageNV": 5248, "PassthroughNV": 5250, "ViewportRelativeNV": 5252, "SecondaryViewportRelativeNV": 5256, + "PerPrimitiveEXT": 5271, "PerPrimitiveNV": 5271, "PerViewNV": 5272, "PerTaskNV": 5273, @@ -530,6 +588,7 @@ "RestrictPointerEXT": 5355, "AliasedPointer": 5356, "AliasedPointerEXT": 5356, + "HitObjectShaderRecordBufferNV": 5386, "BindlessSamplerNV": 5398, "BindlessImageNV": 5399, "BoundSamplerNV": 5400, @@ -562,18 +621,45 @@ "MergeINTEL": 5834, "BankBitsINTEL": 5835, "ForcePow2DepthINTEL": 5836, + "StridesizeINTEL": 5883, + "WordsizeINTEL": 5884, + "TrueDualPortINTEL": 5885, "BurstCoalesceINTEL": 5899, "CacheSizeINTEL": 5900, "DontStaticallyCoalesceINTEL": 5901, "PrefetchINTEL": 5902, "StallEnableINTEL": 5905, "FuseLoopsInFunctionINTEL": 5907, + "MathOpDSPModeINTEL": 5909, + "AliasScopeINTEL": 5914, + "NoAliasINTEL": 5915, + "InitiationIntervalINTEL": 5917, + "MaxConcurrencyINTEL": 5918, + "PipelineEnableINTEL": 5919, "BufferLocationINTEL": 5921, "IOPipeStorageINTEL": 5944, "FunctionFloatingPointModeINTEL": 6080, "SingleElementVectorINTEL": 6085, "VectorComputeCallableFunctionINTEL": 6087, - "MediaBlockIOINTEL": 6140 + "MediaBlockIOINTEL": 6140, + "StallFreeINTEL": 6151, + "FPMaxErrorDecorationINTEL": 6170, + "LatencyControlLabelINTEL": 6172, + "LatencyControlConstraintINTEL": 6173, + "ConduitKernelArgumentINTEL": 6175, + "RegisterMapKernelArgumentINTEL": 6176, + "MMHostInterfaceAddressWidthINTEL": 6177, + "MMHostInterfaceDataWidthINTEL": 6178, + "MMHostInterfaceLatencyINTEL": 6179, + "MMHostInterfaceReadWriteModeINTEL": 6180, + "MMHostInterfaceMaxBurstINTEL": 6181, + "MMHostInterfaceWaitRequestINTEL": 6182, + "StableKernelArgumentINTEL": 6183, + "HostAccessINTEL": 6188, + "InitModeINTEL": 6190, + "ImplementInRegisterMapINTEL": 6191, + "CacheControlLoadINTEL": 6442, + "CacheControlStoreINTEL": 6443 } }, { @@ -622,6 +708,11 @@ "SubgroupLocalInvocationId": 41, "VertexIndex": 42, "InstanceIndex": 43, + "CoreIDARM": 4160, + "CoreCountARM": 4161, + "CoreMaxIDARM": 4162, + "WarpIDARM": 4163, + "WarpMaxIDARM": 4164, "SubgroupEqMask": 4416, "SubgroupEqMaskKHR": 4416, "SubgroupGeMask": 4417, @@ -647,6 +738,8 @@ "BaryCoordSmoothSampleAMD": 4997, "BaryCoordPullModelAMD": 4998, "FragStencilRefEXT": 5014, + "CoalescedInputCountAMDX": 5021, + "ShaderIndexAMDX": 5073, "ViewportMaskNV": 5253, "SecondaryPositionNV": 5257, "SecondaryViewportMaskNV": 5258, @@ -669,6 +762,10 @@ "FragmentSizeNV": 5292, "FragInvocationCountEXT": 5293, "InvocationsPerPixelNV": 5293, + "PrimitivePointIndicesEXT": 5294, + "PrimitiveLineIndicesEXT": 5295, + "PrimitiveTriangleIndicesEXT": 5296, + "CullPrimitiveEXT": 5299, "LaunchIdKHR": 5319, "LaunchIdNV": 5319, "LaunchSizeKHR": 5320, @@ -695,13 +792,19 @@ "HitKindKHR": 5333, "HitKindNV": 5333, "CurrentRayTimeNV": 5334, + "HitTriangleVertexPositionsKHR": 5335, + "HitMicroTriangleVertexPositionsNV": 5337, + "HitMicroTriangleVertexBarycentricsNV": 5344, "IncomingRayFlagsKHR": 5351, "IncomingRayFlagsNV": 5351, "RayGeometryIndexKHR": 5352, "WarpsPerSMNV": 5374, "SMCountNV": 5375, "WarpIDNV": 5376, - "SMIDNV": 5377 + "SMIDNV": 5377, + "HitKindFrontFacingMicroTriangleNV": 5405, + "HitKindBackFacingMicroTriangleNV": 5406, + "CullMaskKHR": 6021 } }, { @@ -734,7 +837,9 @@ "LoopCoalesceINTEL": 20, "MaxInterleavingINTEL": 21, "SpeculatedIterationsINTEL": 22, - "NoFusionINTEL": 23 + "NoFusionINTEL": 23, + "LoopCountINTEL": 24, + "MaxReinvocationDelayINTEL": 25 } }, { @@ -786,7 +891,9 @@ "MakePointerVisible": 4, "MakePointerVisibleKHR": 4, "NonPrivatePointer": 5, - "NonPrivatePointerKHR": 5 + "NonPrivatePointerKHR": 5, + "AliasScopeINTELMask": 16, + "NoAliasINTELMask": 17 } }, { @@ -911,6 +1018,11 @@ "ShaderLayer": 69, "ShaderViewportIndex": 70, "UniformDecoration": 71, + "CoreBuiltinsARM": 4165, + "TileImageColorReadAccessEXT": 4166, + "TileImageDepthReadAccessEXT": 4167, + "TileImageStencilReadAccessEXT": 4168, + "CooperativeMatrixLayoutsARM": 4201, "FragmentShadingRateKHR": 4422, "SubgroupBallotKHR": 4423, "DrawParameters": 4427, @@ -942,6 +1054,10 @@ "RayQueryKHR": 4472, "RayTraversalPrimitiveCullingKHR": 4478, "RayTracingKHR": 4479, + "TextureSampleWeightedQCOM": 4484, + "TextureBoxFilterQCOM": 4485, + "TextureBlockMatchQCOM": 4486, + "TextureBlockMatch2QCOM": 4498, "Float16ImageAMD": 5008, "ImageGatherBiasLodAMD": 5009, "FragmentMaskAMD": 5010, @@ -949,6 +1065,8 @@ "ImageReadWriteLodAMD": 5015, "Int64ImageEXT": 5016, "ShaderClockKHR": 5055, + "ShaderEnqueueAMDX": 5067, + "QuadControlKHR": 5087, "SampleMaskOverrideCoverageNV": 5249, "GeometryShaderPassthroughNV": 5251, "ShaderViewportIndexLayerEXT": 5254, @@ -959,6 +1077,7 @@ "FragmentFullyCoveredEXT": 5265, "MeshShadingNV": 5266, "ImageFootprintNV": 5282, + "MeshShadingEXT": 5283, "FragmentBarycentricKHR": 5284, "FragmentBarycentricNV": 5284, "ComputeDerivativeGroupQuadsNV": 5288, @@ -989,6 +1108,7 @@ "UniformTexelBufferArrayNonUniformIndexingEXT": 5311, "StorageTexelBufferArrayNonUniformIndexing": 5312, "StorageTexelBufferArrayNonUniformIndexingEXT": 5312, + "RayTracingPositionFetchKHR": 5336, "RayTracingNV": 5340, "RayTracingMotionBlurNV": 5341, "VulkanMemoryModel": 5345, @@ -1006,7 +1126,14 @@ "FragmentShaderPixelInterlockEXT": 5378, "DemoteToHelperInvocation": 5379, "DemoteToHelperInvocationEXT": 5379, + "DisplacementMicromapNV": 5380, + "RayTracingOpacityMicromapEXT": 5381, + "ShaderInvocationReorderNV": 5383, "BindlessTextureNV": 5390, + "RayQueryPositionFetchKHR": 5391, + "AtomicFloat16VectorNV": 5404, + "RayTracingDisplacementMicromapNV": 5409, + "RawAccessChainsNV": 5414, "SubgroupShuffleINTEL": 5568, "SubgroupBufferBlockIOINTEL": 5569, "SubgroupImageBlockIOINTEL": 5570, @@ -1039,9 +1166,13 @@ "FPGAMemoryAccessesINTEL": 5898, "FPGAClusterAttributesINTEL": 5904, "LoopFuseINTEL": 5906, + "FPGADSPControlINTEL": 5908, + "MemoryAccessAliasingINTEL": 5910, + "FPGAInvocationPipeliningAttributesINTEL": 5916, "FPGABufferLocationINTEL": 5920, "ArbitraryPrecisionFixedPointINTEL": 5922, "USMStorageClassesINTEL": 5935, + "RuntimeAlignedAttributeINTEL": 5939, "IOPipesINTEL": 5943, "BlockingPipesINTEL": 5945, "FPGARegINTEL": 5948, @@ -1053,13 +1184,31 @@ "DotProductInput4x8BitPackedKHR": 6018, "DotProduct": 6019, "DotProductKHR": 6019, + "RayCullMaskKHR": 6020, + "CooperativeMatrixKHR": 6022, + "ReplicatedCompositesEXT": 6024, "BitInstructions": 6025, + "GroupNonUniformRotateKHR": 6026, + "FloatControls2": 6029, "AtomicFloat32AddEXT": 6033, "AtomicFloat64AddEXT": 6034, - "LongConstantCompositeINTEL": 6089, + "LongCompositesINTEL": 6089, "OptNoneINTEL": 6094, "AtomicFloat16AddEXT": 6095, - "DebugInfoModuleINTEL": 6114 + "DebugInfoModuleINTEL": 6114, + "BFloat16ConversionINTEL": 6115, + "SplitBarrierINTEL": 6141, + "FPGAClusterAttributesV2INTEL": 6150, + "FPGAKernelAttributesv2INTEL": 6161, + "FPMaxErrorINTEL": 6169, + "FPGALatencyControlINTEL": 6171, + "FPGAArgumentInterfacesINTEL": 6174, + "GlobalVariableHostAccessINTEL": 6187, + "GlobalVariableFPGADecorationsINTEL": 6189, + "GroupUniformArithmeticKHR": 6400, + "MaskedGatherScatterINTEL": 6427, + "CacheControlsINTEL": 6441, + "RegisterLimitsINTEL": 6460 } }, { @@ -1076,7 +1225,8 @@ "CullOpaqueKHR": 6, "CullNoOpaqueKHR": 7, "SkipTrianglesKHR": 8, - "SkipAABBsKHR": 9 + "SkipAABBsKHR": 9, + "ForceOpacityMicromap2StateEXT": 10 } }, { @@ -1171,6 +1321,99 @@ "PackedVectorFormat4x8BitKHR": 0 } }, + { + "Name": "CooperativeMatrixOperands", + "Type": "Bit", + "Values": + { + "MatrixASignedComponentsKHR": 0, + "MatrixBSignedComponentsKHR": 1, + "MatrixCSignedComponentsKHR": 2, + "MatrixResultSignedComponentsKHR": 3, + "SaturatingAccumulationKHR": 4 + } + }, + { + "Name": "CooperativeMatrixLayout", + "Type": "Value", + "Values": + { + "RowMajorKHR": 0, + "ColumnMajorKHR": 1, + "RowBlockedInterleavedARM": 4202, + "ColumnBlockedInterleavedARM": 4203 + } + }, + { + "Name": "CooperativeMatrixUse", + "Type": "Value", + "Values": + { + "MatrixAKHR": 0, + "MatrixBKHR": 1, + "MatrixAccumulatorKHR": 2 + } + }, + { + "Name": "InitializationModeQualifier", + "Type": "Value", + "Values": + { + "InitOnDeviceReprogramINTEL": 0, + "InitOnDeviceResetINTEL": 1 + } + }, + { + "Name": "HostAccessQualifier", + "Type": "Value", + "Values": + { + "NoneINTEL": 0, + "ReadINTEL": 1, + "WriteINTEL": 2, + "ReadWriteINTEL": 3 + } + }, + { + "Name": "LoadCacheControl", + "Type": "Value", + "Values": + { + "UncachedINTEL": 0, + "CachedINTEL": 1, + "StreamingINTEL": 2, + "InvalidateAfterReadINTEL": 3, + "ConstCachedINTEL": 4 + } + }, + { + "Name": "StoreCacheControl", + "Type": "Value", + "Values": + { + "UncachedINTEL": 0, + "WriteThroughINTEL": 1, + "WriteBackINTEL": 2, + "StreamingINTEL": 3 + } + }, + { + "Name": "NamedMaximumNumberOfRegisters", + "Type": "Value", + "Values": + { + "AutoINTEL": 0 + } + }, + { + "Name": "RawAccessChainOperands", + "Type": "Bit", + "Values": + { + "RobustnessPerComponentNV": 0, + "RobustnessPerElementNV": 1 + } + }, { "Name": "Op", "Type": "Value", @@ -1520,13 +1763,18 @@ "OpPtrEqual": 401, "OpPtrNotEqual": 402, "OpPtrDiff": 403, + "OpColorAttachmentReadEXT": 4160, + "OpDepthAttachmentReadEXT": 4161, + "OpStencilAttachmentReadEXT": 4162, "OpTerminateInvocation": 4416, "OpSubgroupBallotKHR": 4421, "OpSubgroupFirstInvocationKHR": 4422, "OpSubgroupAllKHR": 4428, "OpSubgroupAnyKHR": 4429, "OpSubgroupAllEqualKHR": 4430, + "OpGroupNonUniformRotateKHR": 4431, "OpSubgroupReadInvocationKHR": 4432, + "OpExtInstWithForwardRefsKHR": 4433, "OpTraceRayKHR": 4445, "OpExecuteCallableKHR": 4446, "OpConvertUToAccelerationStructureKHR": 4447, @@ -1544,6 +1792,14 @@ "OpUDotAccSatKHR": 4454, "OpSUDotAccSat": 4455, "OpSUDotAccSatKHR": 4455, + "OpTypeCooperativeMatrixKHR": 4456, + "OpCooperativeMatrixLoadKHR": 4457, + "OpCooperativeMatrixStoreKHR": 4458, + "OpCooperativeMatrixMulAddKHR": 4459, + "OpCooperativeMatrixLengthKHR": 4460, + "OpConstantCompositeReplicateEXT": 4461, + "OpSpecConstantCompositeReplicateEXT": 4462, + "OpCompositeConstructReplicateEXT": 4463, "OpTypeRayQueryKHR": 4472, "OpRayQueryInitializeKHR": 4473, "OpRayQueryTerminateKHR": 4474, @@ -1551,6 +1807,14 @@ "OpRayQueryConfirmIntersectionKHR": 4476, "OpRayQueryProceedKHR": 4477, "OpRayQueryGetIntersectionTypeKHR": 4479, + "OpImageSampleWeightedQCOM": 4480, + "OpImageBoxFilterQCOM": 4481, + "OpImageBlockMatchSSDQCOM": 4482, + "OpImageBlockMatchSADQCOM": 4483, + "OpImageBlockMatchWindowSSDQCOM": 4500, + "OpImageBlockMatchWindowSADQCOM": 4501, + "OpImageBlockMatchGatherSSDQCOM": 4502, + "OpImageBlockMatchGatherSADQCOM": 4503, "OpGroupIAddNonUniformAMD": 5000, "OpGroupFAddNonUniformAMD": 5001, "OpGroupFMinNonUniformAMD": 5002, @@ -1562,9 +1826,51 @@ "OpFragmentMaskFetchAMD": 5011, "OpFragmentFetchAMD": 5012, "OpReadClockKHR": 5056, + "OpFinalizeNodePayloadsAMDX": 5075, + "OpFinishWritingNodePayloadAMDX": 5078, + "OpInitializeNodePayloadsAMDX": 5090, + "OpGroupNonUniformQuadAllKHR": 5110, + "OpGroupNonUniformQuadAnyKHR": 5111, + "OpHitObjectRecordHitMotionNV": 5249, + "OpHitObjectRecordHitWithIndexMotionNV": 5250, + "OpHitObjectRecordMissMotionNV": 5251, + "OpHitObjectGetWorldToObjectNV": 5252, + "OpHitObjectGetObjectToWorldNV": 5253, + "OpHitObjectGetObjectRayDirectionNV": 5254, + "OpHitObjectGetObjectRayOriginNV": 5255, + "OpHitObjectTraceRayMotionNV": 5256, + "OpHitObjectGetShaderRecordBufferHandleNV": 5257, + "OpHitObjectGetShaderBindingTableRecordIndexNV": 5258, + "OpHitObjectRecordEmptyNV": 5259, + "OpHitObjectTraceRayNV": 5260, + "OpHitObjectRecordHitNV": 5261, + "OpHitObjectRecordHitWithIndexNV": 5262, + "OpHitObjectRecordMissNV": 5263, + "OpHitObjectExecuteShaderNV": 5264, + "OpHitObjectGetCurrentTimeNV": 5265, + "OpHitObjectGetAttributesNV": 5266, + "OpHitObjectGetHitKindNV": 5267, + "OpHitObjectGetPrimitiveIndexNV": 5268, + "OpHitObjectGetGeometryIndexNV": 5269, + "OpHitObjectGetInstanceIdNV": 5270, + "OpHitObjectGetInstanceCustomIndexNV": 5271, + "OpHitObjectGetWorldRayDirectionNV": 5272, + "OpHitObjectGetWorldRayOriginNV": 5273, + "OpHitObjectGetRayTMaxNV": 5274, + "OpHitObjectGetRayTMinNV": 5275, + "OpHitObjectIsEmptyNV": 5276, + "OpHitObjectIsHitNV": 5277, + "OpHitObjectIsMissNV": 5278, + "OpReorderThreadWithHitObjectNV": 5279, + "OpReorderThreadWithHintNV": 5280, + "OpTypeHitObjectNV": 5281, "OpImageSampleFootprintNV": 5283, + "OpEmitMeshTasksEXT": 5294, + "OpSetMeshOutputsEXT": 5295, "OpGroupNonUniformPartitionNV": 5296, "OpWritePackedPrimitiveIndices4x8NV": 5299, + "OpFetchMicroTriangleVertexPositionNV": 5300, + "OpFetchMicroTriangleVertexBarycentricNV": 5301, "OpReportIntersectionKHR": 5334, "OpReportIntersectionNV": 5334, "OpIgnoreIntersectionNV": 5335, @@ -1572,6 +1878,7 @@ "OpTraceNV": 5337, "OpTraceMotionNV": 5338, "OpTraceRayMotionNV": 5339, + "OpRayQueryGetIntersectionTriangleVertexPositionsKHR": 5340, "OpTypeAccelerationStructureKHR": 5341, "OpTypeAccelerationStructureNV": 5341, "OpExecuteCallableNV": 5344, @@ -1592,6 +1899,7 @@ "OpConvertUToSampledImageNV": 5395, "OpConvertSampledImageToUNV": 5396, "OpSamplerImageAddressingModeNV": 5397, + "OpRawAccessChainNV": 5398, "OpSubgroupShuffleINTEL": 5571, "OpSubgroupShuffleDownINTEL": 5572, "OpSubgroupShuffleUpINTEL": 5573, @@ -1792,6 +2100,9 @@ "OpArbitraryFloatPowRINTEL": 5881, "OpArbitraryFloatPowNINTEL": 5882, "OpLoopControlINTEL": 5887, + "OpAliasDomainDeclINTEL": 5911, + "OpAliasScopeDeclINTEL": 5912, + "OpAliasScopeListDeclINTEL": 5913, "OpFixedSqrtINTEL": 5923, "OpFixedRecipINTEL": 5924, "OpFixedRsqrtINTEL": 5925, @@ -1829,7 +2140,22 @@ "OpTypeBufferSurfaceINTEL": 6086, "OpTypeStructContinuedINTEL": 6090, "OpConstantCompositeContinuedINTEL": 6091, - "OpSpecConstantCompositeContinuedINTEL": 6092 + "OpSpecConstantCompositeContinuedINTEL": 6092, + "OpCompositeConstructContinuedINTEL": 6096, + "OpConvertFToBF16INTEL": 6116, + "OpConvertBF16ToFINTEL": 6117, + "OpControlBarrierArriveINTEL": 6142, + "OpControlBarrierWaitINTEL": 6143, + "OpGroupIMulKHR": 6401, + "OpGroupFMulKHR": 6402, + "OpGroupBitwiseAndKHR": 6403, + "OpGroupBitwiseOrKHR": 6404, + "OpGroupBitwiseXorKHR": 6405, + "OpGroupLogicalAndKHR": 6406, + "OpGroupLogicalOrKHR": 6407, + "OpGroupLogicalXorKHR": 6408, + "OpMaskedGatherINTEL": 6428, + "OpMaskedScatterINTEL": 6429 } } ] diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.lua b/prog/3rdPartyLibs/vulkan/include/spirv.lua index 2f5e803b8..8f3ded005 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.lua +++ b/prog/3rdPartyLibs/vulkan/include/spirv.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2020 The Khronos Group Inc. +-- Copyright (c) 2014-2024 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ -- the Binary Section of the SPIR-V specification. -- Enumeration tokens for SPIR-V, in various styles: --- C, C++, C++11, JSON, Lua, Python, C#, D +-- C, C++, C++11, JSON, Lua, Python, C#, D, Beef -- -- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ -- - C# will use enum classes in the Specification class located in the "Spv" namespace, -- e.g.: Spv.Specification.SourceLanguage.GLSL -- - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +-- - Beef will use enum classes in the Specification class located in the "Spv" namespace, +-- e.g.: Spv.Specification.SourceLanguage.GLSL -- -- Some tokens act like mask values, which can be OR'd together, -- while others are mutually exclusive. The mask-like ones have @@ -57,6 +59,12 @@ spv = { OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, }, ExecutionModel = { @@ -81,6 +89,8 @@ spv = { MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, }, AddressingModel = { @@ -138,6 +148,9 @@ spv = { SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, @@ -145,11 +158,28 @@ spv = { SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, @@ -167,6 +197,14 @@ spv = { NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, }, StorageClass = { @@ -183,6 +221,9 @@ spv = { AtomicCounter = 10, Image = 11, StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -197,6 +238,8 @@ spv = { ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, @@ -210,6 +253,7 @@ spv = { Rect = 4, Buffer = 5, SubpassData = 6, + TileImageDataEXT = 4173, }, SamplerAddressingMode = { @@ -311,6 +355,8 @@ spv = { Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, }, ImageOperandsShift = { @@ -366,8 +412,11 @@ spv = { NSZ = 2, AllowRecip = 3, Fast = 4, + AllowContract = 16, AllowContractFastINTEL = 16, + AllowReassoc = 17, AllowReassocINTEL = 17, + AllowTransform = 18, }, FPFastMathModeMask = { @@ -377,8 +426,11 @@ spv = { NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, + AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, }, FPRoundingMode = { @@ -409,6 +461,7 @@ spv = { NoCapture = 5, NoWrite = 6, NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, }, Decoration = { @@ -461,11 +514,19 @@ spv = { MaxByteOffsetId = 47, NoSignedWrap = 4469, NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, @@ -477,6 +538,7 @@ spv = { RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, @@ -509,18 +571,45 @@ spv = { MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, }, BuiltIn = { @@ -565,6 +654,11 @@ spv = { SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, @@ -590,6 +684,8 @@ spv = { BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -612,6 +708,10 @@ spv = { FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, @@ -638,6 +738,9 @@ spv = { HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, @@ -645,6 +748,9 @@ spv = { SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, }, SelectionControlShift = { @@ -676,6 +782,8 @@ spv = { MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, }, LoopControlMask = { @@ -697,6 +805,8 @@ spv = { MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, }, FunctionControlShift = { @@ -767,6 +877,8 @@ spv = { MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, }, MemoryAccessMask = { @@ -780,6 +892,8 @@ spv = { MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, }, Scope = { @@ -889,6 +1003,11 @@ spv = { ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, @@ -920,6 +1039,10 @@ spv = { RayQueryKHR = 4472, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, @@ -927,6 +1050,8 @@ spv = { ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, @@ -937,6 +1062,7 @@ spv = { FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, + MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsNV = 5288, @@ -967,6 +1093,7 @@ spv = { UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, @@ -984,7 +1111,14 @@ spv = { FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1017,9 +1151,13 @@ spv = { FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, @@ -1031,13 +1169,31 @@ spv = { DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, - LongConstantCompositeINTEL = 6089, + LongCompositesINTEL = 6089, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, }, RayFlagsShift = { @@ -1051,6 +1207,7 @@ spv = { CullNoOpaqueKHR = 7, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, }, RayFlagsMask = { @@ -1065,6 +1222,7 @@ spv = { CullNoOpaqueKHR = 0x00000080, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, }, RayQueryIntersection = { @@ -1131,6 +1289,78 @@ spv = { PackedVectorFormat4x8BitKHR = 0, }, + CooperativeMatrixOperandsShift = { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + }, + + CooperativeMatrixOperandsMask = { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, + }, + + CooperativeMatrixLayout = { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + }, + + CooperativeMatrixUse = { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + }, + + InitializationModeQualifier = { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + }, + + HostAccessQualifier = { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + }, + + LoadCacheControl = { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + }, + + StoreCacheControl = { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + }, + + NamedMaximumNumberOfRegisters = { + AutoINTEL = 0, + }, + + RawAccessChainOperandsShift = { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + }, + + RawAccessChainOperandsMask = { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, + }, + Op = { OpNop = 0, OpUndef = 1, @@ -1476,13 +1706,18 @@ spv = { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1500,6 +1735,14 @@ spv = { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1507,6 +1750,14 @@ spv = { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1518,9 +1769,51 @@ spv = { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1528,6 +1821,7 @@ spv = { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1548,6 +1842,7 @@ spv = { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1748,6 +2043,9 @@ spv = { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1786,6 +2084,21 @@ spv = { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, }, } diff --git a/prog/3rdPartyLibs/vulkan/include/spirv.py b/prog/3rdPartyLibs/vulkan/include/spirv.py index 7aee89f63..23c0fccac 100644 --- a/prog/3rdPartyLibs/vulkan/include/spirv.py +++ b/prog/3rdPartyLibs/vulkan/include/spirv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2020 The Khronos Group Inc. +# Copyright (c) 2014-2024 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ # the Binary Section of the SPIR-V specification. # Enumeration tokens for SPIR-V, in various styles: -# C, C++, C++11, JSON, Lua, Python, C#, D +# C, C++, C++11, JSON, Lua, Python, C#, D, Beef # # - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL # - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ # - C# will use enum classes in the Specification class located in the "Spv" namespace, # e.g.: Spv.Specification.SourceLanguage.GLSL # - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +# - Beef will use enum classes in the Specification class located in the "Spv" namespace, +# e.g.: Spv.Specification.SourceLanguage.GLSL # # Some tokens act like mask values, which can be OR'd together, # while others are mutually exclusive. The mask-like ones have @@ -57,6 +59,12 @@ 'OpenCL_CPP' : 4, 'HLSL' : 5, 'CPP_for_OpenCL' : 6, + 'SYCL' : 7, + 'HERO_C' : 8, + 'NZSL' : 9, + 'WGSL' : 10, + 'Slang' : 11, + 'Zig' : 12, }, 'ExecutionModel' : { @@ -81,6 +89,8 @@ 'MissNV' : 5317, 'CallableKHR' : 5318, 'CallableNV' : 5318, + 'TaskEXT' : 5364, + 'MeshEXT' : 5365, }, 'AddressingModel' : { @@ -138,6 +148,9 @@ 'SubgroupsPerWorkgroupId' : 37, 'LocalSizeId' : 38, 'LocalSizeHintId' : 39, + 'NonCoherentColorAttachmentReadEXT' : 4169, + 'NonCoherentDepthAttachmentReadEXT' : 4170, + 'NonCoherentStencilAttachmentReadEXT' : 4171, 'SubgroupUniformControlFlowKHR' : 4421, 'PostDepthCoverage' : 4446, 'DenormPreserve' : 4459, @@ -145,11 +158,28 @@ 'SignedZeroInfNanPreserve' : 4461, 'RoundingModeRTE' : 4462, 'RoundingModeRTZ' : 4463, + 'EarlyAndLateFragmentTestsAMD' : 5017, 'StencilRefReplacingEXT' : 5027, + 'CoalescingAMDX' : 5069, + 'MaxNodeRecursionAMDX' : 5071, + 'StaticNumWorkgroupsAMDX' : 5072, + 'ShaderIndexAMDX' : 5073, + 'MaxNumWorkgroupsAMDX' : 5077, + 'StencilRefUnchangedFrontAMD' : 5079, + 'StencilRefGreaterFrontAMD' : 5080, + 'StencilRefLessFrontAMD' : 5081, + 'StencilRefUnchangedBackAMD' : 5082, + 'StencilRefGreaterBackAMD' : 5083, + 'StencilRefLessBackAMD' : 5084, + 'QuadDerivativesKHR' : 5088, + 'RequireFullQuadsKHR' : 5089, + 'OutputLinesEXT' : 5269, 'OutputLinesNV' : 5269, + 'OutputPrimitivesEXT' : 5270, 'OutputPrimitivesNV' : 5270, 'DerivativeGroupQuadsNV' : 5289, 'DerivativeGroupLinearNV' : 5290, + 'OutputTrianglesEXT' : 5298, 'OutputTrianglesNV' : 5298, 'PixelInterlockOrderedEXT' : 5366, 'PixelInterlockUnorderedEXT' : 5367, @@ -167,6 +197,14 @@ 'NoGlobalOffsetINTEL' : 5895, 'NumSIMDWorkitemsINTEL' : 5896, 'SchedulerTargetFmaxMhzINTEL' : 5903, + 'MaximallyReconvergesKHR' : 6023, + 'FPFastMathDefault' : 6028, + 'StreamingInterfaceINTEL' : 6154, + 'RegisterMapInterfaceINTEL' : 6160, + 'NamedBarrierCountINTEL' : 6417, + 'MaximumRegistersINTEL' : 6461, + 'MaximumRegistersIdINTEL' : 6462, + 'NamedMaximumRegistersINTEL' : 6463, }, 'StorageClass' : { @@ -183,6 +221,9 @@ 'AtomicCounter' : 10, 'Image' : 11, 'StorageBuffer' : 12, + 'TileImageEXT' : 4172, + 'NodePayloadAMDX' : 5068, + 'NodeOutputPayloadAMDX' : 5076, 'CallableDataKHR' : 5328, 'CallableDataNV' : 5328, 'IncomingCallableDataKHR' : 5329, @@ -197,6 +238,8 @@ 'ShaderRecordBufferNV' : 5343, 'PhysicalStorageBuffer' : 5349, 'PhysicalStorageBufferEXT' : 5349, + 'HitObjectAttributeNV' : 5385, + 'TaskPayloadWorkgroupEXT' : 5402, 'CodeSectionINTEL' : 5605, 'DeviceOnlyINTEL' : 5936, 'HostOnlyINTEL' : 5937, @@ -210,6 +253,7 @@ 'Rect' : 4, 'Buffer' : 5, 'SubpassData' : 6, + 'TileImageDataEXT' : 4173, }, 'SamplerAddressingMode' : { @@ -311,6 +355,8 @@ 'Float' : 14, 'UnormInt24' : 15, 'UnormInt101010_2' : 16, + 'UnsignedIntRaw10EXT' : 19, + 'UnsignedIntRaw12EXT' : 20, }, 'ImageOperandsShift' : { @@ -366,8 +412,11 @@ 'NSZ' : 2, 'AllowRecip' : 3, 'Fast' : 4, + 'AllowContract' : 16, 'AllowContractFastINTEL' : 16, + 'AllowReassoc' : 17, 'AllowReassocINTEL' : 17, + 'AllowTransform' : 18, }, 'FPFastMathModeMask' : { @@ -377,8 +426,11 @@ 'NSZ' : 0x00000004, 'AllowRecip' : 0x00000008, 'Fast' : 0x00000010, + 'AllowContract' : 0x00010000, 'AllowContractFastINTEL' : 0x00010000, + 'AllowReassoc' : 0x00020000, 'AllowReassocINTEL' : 0x00020000, + 'AllowTransform' : 0x00040000, }, 'FPRoundingMode' : { @@ -409,6 +461,7 @@ 'NoCapture' : 5, 'NoWrite' : 6, 'NoReadWrite' : 7, + 'RuntimeAlignedINTEL' : 5940, }, 'Decoration' : { @@ -461,11 +514,19 @@ 'MaxByteOffsetId' : 47, 'NoSignedWrap' : 4469, 'NoUnsignedWrap' : 4470, + 'WeightTextureQCOM' : 4487, + 'BlockMatchTextureQCOM' : 4488, + 'BlockMatchSamplerQCOM' : 4499, 'ExplicitInterpAMD' : 4999, + 'NodeSharesPayloadLimitsWithAMDX' : 5019, + 'NodeMaxPayloadsAMDX' : 5020, + 'TrackFinishWritingAMDX' : 5078, + 'PayloadNodeNameAMDX' : 5091, 'OverrideCoverageNV' : 5248, 'PassthroughNV' : 5250, 'ViewportRelativeNV' : 5252, 'SecondaryViewportRelativeNV' : 5256, + 'PerPrimitiveEXT' : 5271, 'PerPrimitiveNV' : 5271, 'PerViewNV' : 5272, 'PerTaskNV' : 5273, @@ -477,6 +538,7 @@ 'RestrictPointerEXT' : 5355, 'AliasedPointer' : 5356, 'AliasedPointerEXT' : 5356, + 'HitObjectShaderRecordBufferNV' : 5386, 'BindlessSamplerNV' : 5398, 'BindlessImageNV' : 5399, 'BoundSamplerNV' : 5400, @@ -509,18 +571,45 @@ 'MergeINTEL' : 5834, 'BankBitsINTEL' : 5835, 'ForcePow2DepthINTEL' : 5836, + 'StridesizeINTEL' : 5883, + 'WordsizeINTEL' : 5884, + 'TrueDualPortINTEL' : 5885, 'BurstCoalesceINTEL' : 5899, 'CacheSizeINTEL' : 5900, 'DontStaticallyCoalesceINTEL' : 5901, 'PrefetchINTEL' : 5902, 'StallEnableINTEL' : 5905, 'FuseLoopsInFunctionINTEL' : 5907, + 'MathOpDSPModeINTEL' : 5909, + 'AliasScopeINTEL' : 5914, + 'NoAliasINTEL' : 5915, + 'InitiationIntervalINTEL' : 5917, + 'MaxConcurrencyINTEL' : 5918, + 'PipelineEnableINTEL' : 5919, 'BufferLocationINTEL' : 5921, 'IOPipeStorageINTEL' : 5944, 'FunctionFloatingPointModeINTEL' : 6080, 'SingleElementVectorINTEL' : 6085, 'VectorComputeCallableFunctionINTEL' : 6087, 'MediaBlockIOINTEL' : 6140, + 'StallFreeINTEL' : 6151, + 'FPMaxErrorDecorationINTEL' : 6170, + 'LatencyControlLabelINTEL' : 6172, + 'LatencyControlConstraintINTEL' : 6173, + 'ConduitKernelArgumentINTEL' : 6175, + 'RegisterMapKernelArgumentINTEL' : 6176, + 'MMHostInterfaceAddressWidthINTEL' : 6177, + 'MMHostInterfaceDataWidthINTEL' : 6178, + 'MMHostInterfaceLatencyINTEL' : 6179, + 'MMHostInterfaceReadWriteModeINTEL' : 6180, + 'MMHostInterfaceMaxBurstINTEL' : 6181, + 'MMHostInterfaceWaitRequestINTEL' : 6182, + 'StableKernelArgumentINTEL' : 6183, + 'HostAccessINTEL' : 6188, + 'InitModeINTEL' : 6190, + 'ImplementInRegisterMapINTEL' : 6191, + 'CacheControlLoadINTEL' : 6442, + 'CacheControlStoreINTEL' : 6443, }, 'BuiltIn' : { @@ -565,6 +654,11 @@ 'SubgroupLocalInvocationId' : 41, 'VertexIndex' : 42, 'InstanceIndex' : 43, + 'CoreIDARM' : 4160, + 'CoreCountARM' : 4161, + 'CoreMaxIDARM' : 4162, + 'WarpIDARM' : 4163, + 'WarpMaxIDARM' : 4164, 'SubgroupEqMask' : 4416, 'SubgroupEqMaskKHR' : 4416, 'SubgroupGeMask' : 4417, @@ -590,6 +684,8 @@ 'BaryCoordSmoothSampleAMD' : 4997, 'BaryCoordPullModelAMD' : 4998, 'FragStencilRefEXT' : 5014, + 'CoalescedInputCountAMDX' : 5021, + 'ShaderIndexAMDX' : 5073, 'ViewportMaskNV' : 5253, 'SecondaryPositionNV' : 5257, 'SecondaryViewportMaskNV' : 5258, @@ -612,6 +708,10 @@ 'FragmentSizeNV' : 5292, 'FragInvocationCountEXT' : 5293, 'InvocationsPerPixelNV' : 5293, + 'PrimitivePointIndicesEXT' : 5294, + 'PrimitiveLineIndicesEXT' : 5295, + 'PrimitiveTriangleIndicesEXT' : 5296, + 'CullPrimitiveEXT' : 5299, 'LaunchIdKHR' : 5319, 'LaunchIdNV' : 5319, 'LaunchSizeKHR' : 5320, @@ -638,6 +738,9 @@ 'HitKindKHR' : 5333, 'HitKindNV' : 5333, 'CurrentRayTimeNV' : 5334, + 'HitTriangleVertexPositionsKHR' : 5335, + 'HitMicroTriangleVertexPositionsNV' : 5337, + 'HitMicroTriangleVertexBarycentricsNV' : 5344, 'IncomingRayFlagsKHR' : 5351, 'IncomingRayFlagsNV' : 5351, 'RayGeometryIndexKHR' : 5352, @@ -645,6 +748,9 @@ 'SMCountNV' : 5375, 'WarpIDNV' : 5376, 'SMIDNV' : 5377, + 'HitKindFrontFacingMicroTriangleNV' : 5405, + 'HitKindBackFacingMicroTriangleNV' : 5406, + 'CullMaskKHR' : 6021, }, 'SelectionControlShift' : { @@ -676,6 +782,8 @@ 'MaxInterleavingINTEL' : 21, 'SpeculatedIterationsINTEL' : 22, 'NoFusionINTEL' : 23, + 'LoopCountINTEL' : 24, + 'MaxReinvocationDelayINTEL' : 25, }, 'LoopControlMask' : { @@ -697,6 +805,8 @@ 'MaxInterleavingINTEL' : 0x00200000, 'SpeculatedIterationsINTEL' : 0x00400000, 'NoFusionINTEL' : 0x00800000, + 'LoopCountINTEL' : 0x01000000, + 'MaxReinvocationDelayINTEL' : 0x02000000, }, 'FunctionControlShift' : { @@ -767,6 +877,8 @@ 'MakePointerVisibleKHR' : 4, 'NonPrivatePointer' : 5, 'NonPrivatePointerKHR' : 5, + 'AliasScopeINTELMask' : 16, + 'NoAliasINTELMask' : 17, }, 'MemoryAccessMask' : { @@ -780,6 +892,8 @@ 'MakePointerVisibleKHR' : 0x00000010, 'NonPrivatePointer' : 0x00000020, 'NonPrivatePointerKHR' : 0x00000020, + 'AliasScopeINTELMask' : 0x00010000, + 'NoAliasINTELMask' : 0x00020000, }, 'Scope' : { @@ -889,6 +1003,11 @@ 'ShaderLayer' : 69, 'ShaderViewportIndex' : 70, 'UniformDecoration' : 71, + 'CoreBuiltinsARM' : 4165, + 'TileImageColorReadAccessEXT' : 4166, + 'TileImageDepthReadAccessEXT' : 4167, + 'TileImageStencilReadAccessEXT' : 4168, + 'CooperativeMatrixLayoutsARM' : 4201, 'FragmentShadingRateKHR' : 4422, 'SubgroupBallotKHR' : 4423, 'DrawParameters' : 4427, @@ -920,6 +1039,10 @@ 'RayQueryKHR' : 4472, 'RayTraversalPrimitiveCullingKHR' : 4478, 'RayTracingKHR' : 4479, + 'TextureSampleWeightedQCOM' : 4484, + 'TextureBoxFilterQCOM' : 4485, + 'TextureBlockMatchQCOM' : 4486, + 'TextureBlockMatch2QCOM' : 4498, 'Float16ImageAMD' : 5008, 'ImageGatherBiasLodAMD' : 5009, 'FragmentMaskAMD' : 5010, @@ -927,6 +1050,8 @@ 'ImageReadWriteLodAMD' : 5015, 'Int64ImageEXT' : 5016, 'ShaderClockKHR' : 5055, + 'ShaderEnqueueAMDX' : 5067, + 'QuadControlKHR' : 5087, 'SampleMaskOverrideCoverageNV' : 5249, 'GeometryShaderPassthroughNV' : 5251, 'ShaderViewportIndexLayerEXT' : 5254, @@ -937,6 +1062,7 @@ 'FragmentFullyCoveredEXT' : 5265, 'MeshShadingNV' : 5266, 'ImageFootprintNV' : 5282, + 'MeshShadingEXT' : 5283, 'FragmentBarycentricKHR' : 5284, 'FragmentBarycentricNV' : 5284, 'ComputeDerivativeGroupQuadsNV' : 5288, @@ -967,6 +1093,7 @@ 'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311, 'StorageTexelBufferArrayNonUniformIndexing' : 5312, 'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312, + 'RayTracingPositionFetchKHR' : 5336, 'RayTracingNV' : 5340, 'RayTracingMotionBlurNV' : 5341, 'VulkanMemoryModel' : 5345, @@ -984,7 +1111,14 @@ 'FragmentShaderPixelInterlockEXT' : 5378, 'DemoteToHelperInvocation' : 5379, 'DemoteToHelperInvocationEXT' : 5379, + 'DisplacementMicromapNV' : 5380, + 'RayTracingOpacityMicromapEXT' : 5381, + 'ShaderInvocationReorderNV' : 5383, 'BindlessTextureNV' : 5390, + 'RayQueryPositionFetchKHR' : 5391, + 'AtomicFloat16VectorNV' : 5404, + 'RayTracingDisplacementMicromapNV' : 5409, + 'RawAccessChainsNV' : 5414, 'SubgroupShuffleINTEL' : 5568, 'SubgroupBufferBlockIOINTEL' : 5569, 'SubgroupImageBlockIOINTEL' : 5570, @@ -1017,9 +1151,13 @@ 'FPGAMemoryAccessesINTEL' : 5898, 'FPGAClusterAttributesINTEL' : 5904, 'LoopFuseINTEL' : 5906, + 'FPGADSPControlINTEL' : 5908, + 'MemoryAccessAliasingINTEL' : 5910, + 'FPGAInvocationPipeliningAttributesINTEL' : 5916, 'FPGABufferLocationINTEL' : 5920, 'ArbitraryPrecisionFixedPointINTEL' : 5922, 'USMStorageClassesINTEL' : 5935, + 'RuntimeAlignedAttributeINTEL' : 5939, 'IOPipesINTEL' : 5943, 'BlockingPipesINTEL' : 5945, 'FPGARegINTEL' : 5948, @@ -1031,13 +1169,31 @@ 'DotProductInput4x8BitPackedKHR' : 6018, 'DotProduct' : 6019, 'DotProductKHR' : 6019, + 'RayCullMaskKHR' : 6020, + 'CooperativeMatrixKHR' : 6022, + 'ReplicatedCompositesEXT' : 6024, 'BitInstructions' : 6025, + 'GroupNonUniformRotateKHR' : 6026, + 'FloatControls2' : 6029, 'AtomicFloat32AddEXT' : 6033, 'AtomicFloat64AddEXT' : 6034, - 'LongConstantCompositeINTEL' : 6089, + 'LongCompositesINTEL' : 6089, 'OptNoneINTEL' : 6094, 'AtomicFloat16AddEXT' : 6095, 'DebugInfoModuleINTEL' : 6114, + 'BFloat16ConversionINTEL' : 6115, + 'SplitBarrierINTEL' : 6141, + 'FPGAClusterAttributesV2INTEL' : 6150, + 'FPGAKernelAttributesv2INTEL' : 6161, + 'FPMaxErrorINTEL' : 6169, + 'FPGALatencyControlINTEL' : 6171, + 'FPGAArgumentInterfacesINTEL' : 6174, + 'GlobalVariableHostAccessINTEL' : 6187, + 'GlobalVariableFPGADecorationsINTEL' : 6189, + 'GroupUniformArithmeticKHR' : 6400, + 'MaskedGatherScatterINTEL' : 6427, + 'CacheControlsINTEL' : 6441, + 'RegisterLimitsINTEL' : 6460, }, 'RayFlagsShift' : { @@ -1051,6 +1207,7 @@ 'CullNoOpaqueKHR' : 7, 'SkipTrianglesKHR' : 8, 'SkipAABBsKHR' : 9, + 'ForceOpacityMicromap2StateEXT' : 10, }, 'RayFlagsMask' : { @@ -1065,6 +1222,7 @@ 'CullNoOpaqueKHR' : 0x00000080, 'SkipTrianglesKHR' : 0x00000100, 'SkipAABBsKHR' : 0x00000200, + 'ForceOpacityMicromap2StateEXT' : 0x00000400, }, 'RayQueryIntersection' : { @@ -1131,6 +1289,78 @@ 'PackedVectorFormat4x8BitKHR' : 0, }, + 'CooperativeMatrixOperandsShift' : { + 'MatrixASignedComponentsKHR' : 0, + 'MatrixBSignedComponentsKHR' : 1, + 'MatrixCSignedComponentsKHR' : 2, + 'MatrixResultSignedComponentsKHR' : 3, + 'SaturatingAccumulationKHR' : 4, + }, + + 'CooperativeMatrixOperandsMask' : { + 'MaskNone' : 0, + 'MatrixASignedComponentsKHR' : 0x00000001, + 'MatrixBSignedComponentsKHR' : 0x00000002, + 'MatrixCSignedComponentsKHR' : 0x00000004, + 'MatrixResultSignedComponentsKHR' : 0x00000008, + 'SaturatingAccumulationKHR' : 0x00000010, + }, + + 'CooperativeMatrixLayout' : { + 'RowMajorKHR' : 0, + 'ColumnMajorKHR' : 1, + 'RowBlockedInterleavedARM' : 4202, + 'ColumnBlockedInterleavedARM' : 4203, + }, + + 'CooperativeMatrixUse' : { + 'MatrixAKHR' : 0, + 'MatrixBKHR' : 1, + 'MatrixAccumulatorKHR' : 2, + }, + + 'InitializationModeQualifier' : { + 'InitOnDeviceReprogramINTEL' : 0, + 'InitOnDeviceResetINTEL' : 1, + }, + + 'HostAccessQualifier' : { + 'NoneINTEL' : 0, + 'ReadINTEL' : 1, + 'WriteINTEL' : 2, + 'ReadWriteINTEL' : 3, + }, + + 'LoadCacheControl' : { + 'UncachedINTEL' : 0, + 'CachedINTEL' : 1, + 'StreamingINTEL' : 2, + 'InvalidateAfterReadINTEL' : 3, + 'ConstCachedINTEL' : 4, + }, + + 'StoreCacheControl' : { + 'UncachedINTEL' : 0, + 'WriteThroughINTEL' : 1, + 'WriteBackINTEL' : 2, + 'StreamingINTEL' : 3, + }, + + 'NamedMaximumNumberOfRegisters' : { + 'AutoINTEL' : 0, + }, + + 'RawAccessChainOperandsShift' : { + 'RobustnessPerComponentNV' : 0, + 'RobustnessPerElementNV' : 1, + }, + + 'RawAccessChainOperandsMask' : { + 'MaskNone' : 0, + 'RobustnessPerComponentNV' : 0x00000001, + 'RobustnessPerElementNV' : 0x00000002, + }, + 'Op' : { 'OpNop' : 0, 'OpUndef' : 1, @@ -1476,13 +1706,18 @@ 'OpPtrEqual' : 401, 'OpPtrNotEqual' : 402, 'OpPtrDiff' : 403, + 'OpColorAttachmentReadEXT' : 4160, + 'OpDepthAttachmentReadEXT' : 4161, + 'OpStencilAttachmentReadEXT' : 4162, 'OpTerminateInvocation' : 4416, 'OpSubgroupBallotKHR' : 4421, 'OpSubgroupFirstInvocationKHR' : 4422, 'OpSubgroupAllKHR' : 4428, 'OpSubgroupAnyKHR' : 4429, 'OpSubgroupAllEqualKHR' : 4430, + 'OpGroupNonUniformRotateKHR' : 4431, 'OpSubgroupReadInvocationKHR' : 4432, + 'OpExtInstWithForwardRefsKHR' : 4433, 'OpTraceRayKHR' : 4445, 'OpExecuteCallableKHR' : 4446, 'OpConvertUToAccelerationStructureKHR' : 4447, @@ -1500,6 +1735,14 @@ 'OpUDotAccSatKHR' : 4454, 'OpSUDotAccSat' : 4455, 'OpSUDotAccSatKHR' : 4455, + 'OpTypeCooperativeMatrixKHR' : 4456, + 'OpCooperativeMatrixLoadKHR' : 4457, + 'OpCooperativeMatrixStoreKHR' : 4458, + 'OpCooperativeMatrixMulAddKHR' : 4459, + 'OpCooperativeMatrixLengthKHR' : 4460, + 'OpConstantCompositeReplicateEXT' : 4461, + 'OpSpecConstantCompositeReplicateEXT' : 4462, + 'OpCompositeConstructReplicateEXT' : 4463, 'OpTypeRayQueryKHR' : 4472, 'OpRayQueryInitializeKHR' : 4473, 'OpRayQueryTerminateKHR' : 4474, @@ -1507,6 +1750,14 @@ 'OpRayQueryConfirmIntersectionKHR' : 4476, 'OpRayQueryProceedKHR' : 4477, 'OpRayQueryGetIntersectionTypeKHR' : 4479, + 'OpImageSampleWeightedQCOM' : 4480, + 'OpImageBoxFilterQCOM' : 4481, + 'OpImageBlockMatchSSDQCOM' : 4482, + 'OpImageBlockMatchSADQCOM' : 4483, + 'OpImageBlockMatchWindowSSDQCOM' : 4500, + 'OpImageBlockMatchWindowSADQCOM' : 4501, + 'OpImageBlockMatchGatherSSDQCOM' : 4502, + 'OpImageBlockMatchGatherSADQCOM' : 4503, 'OpGroupIAddNonUniformAMD' : 5000, 'OpGroupFAddNonUniformAMD' : 5001, 'OpGroupFMinNonUniformAMD' : 5002, @@ -1518,9 +1769,51 @@ 'OpFragmentMaskFetchAMD' : 5011, 'OpFragmentFetchAMD' : 5012, 'OpReadClockKHR' : 5056, + 'OpFinalizeNodePayloadsAMDX' : 5075, + 'OpFinishWritingNodePayloadAMDX' : 5078, + 'OpInitializeNodePayloadsAMDX' : 5090, + 'OpGroupNonUniformQuadAllKHR' : 5110, + 'OpGroupNonUniformQuadAnyKHR' : 5111, + 'OpHitObjectRecordHitMotionNV' : 5249, + 'OpHitObjectRecordHitWithIndexMotionNV' : 5250, + 'OpHitObjectRecordMissMotionNV' : 5251, + 'OpHitObjectGetWorldToObjectNV' : 5252, + 'OpHitObjectGetObjectToWorldNV' : 5253, + 'OpHitObjectGetObjectRayDirectionNV' : 5254, + 'OpHitObjectGetObjectRayOriginNV' : 5255, + 'OpHitObjectTraceRayMotionNV' : 5256, + 'OpHitObjectGetShaderRecordBufferHandleNV' : 5257, + 'OpHitObjectGetShaderBindingTableRecordIndexNV' : 5258, + 'OpHitObjectRecordEmptyNV' : 5259, + 'OpHitObjectTraceRayNV' : 5260, + 'OpHitObjectRecordHitNV' : 5261, + 'OpHitObjectRecordHitWithIndexNV' : 5262, + 'OpHitObjectRecordMissNV' : 5263, + 'OpHitObjectExecuteShaderNV' : 5264, + 'OpHitObjectGetCurrentTimeNV' : 5265, + 'OpHitObjectGetAttributesNV' : 5266, + 'OpHitObjectGetHitKindNV' : 5267, + 'OpHitObjectGetPrimitiveIndexNV' : 5268, + 'OpHitObjectGetGeometryIndexNV' : 5269, + 'OpHitObjectGetInstanceIdNV' : 5270, + 'OpHitObjectGetInstanceCustomIndexNV' : 5271, + 'OpHitObjectGetWorldRayDirectionNV' : 5272, + 'OpHitObjectGetWorldRayOriginNV' : 5273, + 'OpHitObjectGetRayTMaxNV' : 5274, + 'OpHitObjectGetRayTMinNV' : 5275, + 'OpHitObjectIsEmptyNV' : 5276, + 'OpHitObjectIsHitNV' : 5277, + 'OpHitObjectIsMissNV' : 5278, + 'OpReorderThreadWithHitObjectNV' : 5279, + 'OpReorderThreadWithHintNV' : 5280, + 'OpTypeHitObjectNV' : 5281, 'OpImageSampleFootprintNV' : 5283, + 'OpEmitMeshTasksEXT' : 5294, + 'OpSetMeshOutputsEXT' : 5295, 'OpGroupNonUniformPartitionNV' : 5296, 'OpWritePackedPrimitiveIndices4x8NV' : 5299, + 'OpFetchMicroTriangleVertexPositionNV' : 5300, + 'OpFetchMicroTriangleVertexBarycentricNV' : 5301, 'OpReportIntersectionKHR' : 5334, 'OpReportIntersectionNV' : 5334, 'OpIgnoreIntersectionNV' : 5335, @@ -1528,6 +1821,7 @@ 'OpTraceNV' : 5337, 'OpTraceMotionNV' : 5338, 'OpTraceRayMotionNV' : 5339, + 'OpRayQueryGetIntersectionTriangleVertexPositionsKHR' : 5340, 'OpTypeAccelerationStructureKHR' : 5341, 'OpTypeAccelerationStructureNV' : 5341, 'OpExecuteCallableNV' : 5344, @@ -1548,6 +1842,7 @@ 'OpConvertUToSampledImageNV' : 5395, 'OpConvertSampledImageToUNV' : 5396, 'OpSamplerImageAddressingModeNV' : 5397, + 'OpRawAccessChainNV' : 5398, 'OpSubgroupShuffleINTEL' : 5571, 'OpSubgroupShuffleDownINTEL' : 5572, 'OpSubgroupShuffleUpINTEL' : 5573, @@ -1748,6 +2043,9 @@ 'OpArbitraryFloatPowRINTEL' : 5881, 'OpArbitraryFloatPowNINTEL' : 5882, 'OpLoopControlINTEL' : 5887, + 'OpAliasDomainDeclINTEL' : 5911, + 'OpAliasScopeDeclINTEL' : 5912, + 'OpAliasScopeListDeclINTEL' : 5913, 'OpFixedSqrtINTEL' : 5923, 'OpFixedRecipINTEL' : 5924, 'OpFixedRsqrtINTEL' : 5925, @@ -1786,6 +2084,21 @@ 'OpTypeStructContinuedINTEL' : 6090, 'OpConstantCompositeContinuedINTEL' : 6091, 'OpSpecConstantCompositeContinuedINTEL' : 6092, + 'OpCompositeConstructContinuedINTEL' : 6096, + 'OpConvertFToBF16INTEL' : 6116, + 'OpConvertBF16ToFINTEL' : 6117, + 'OpControlBarrierArriveINTEL' : 6142, + 'OpControlBarrierWaitINTEL' : 6143, + 'OpGroupIMulKHR' : 6401, + 'OpGroupFMulKHR' : 6402, + 'OpGroupBitwiseAndKHR' : 6403, + 'OpGroupBitwiseOrKHR' : 6404, + 'OpGroupBitwiseXorKHR' : 6405, + 'OpGroupLogicalAndKHR' : 6406, + 'OpGroupLogicalOrKHR' : 6407, + 'OpGroupLogicalXorKHR' : 6408, + 'OpMaskedGatherINTEL' : 6428, + 'OpMaskedScatterINTEL' : 6429, }, } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.cs b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.cs new file mode 100644 index 000000000..de325cc4a --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.0/spirv.cs @@ -0,0 +1,993 @@ +// Copyright (c) 2014-2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python, C# +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// - C# will use enum classes in the Specification class located in the "Spv" namespace, e.g.: Spv.Specification.SourceLanguage.GLSL +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +namespace Spv +{ + + public static class Specification + { + public const uint MagicNumber = 0x07230203; + public const uint Version = 0x00010000; + public const uint Revision = 12; + public const uint OpCodeMask = 0xffff; + public const uint WordCountShift = 16; + + public enum SourceLanguage + { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + } + + public enum ExecutionModel + { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + } + + public enum AddressingModel + { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + } + + public enum MemoryModel + { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + } + + public enum ExecutionMode + { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + PostDepthCoverage = 4446, + StencilRefReplacingEXT = 5027, + } + + public enum StorageClass + { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + } + + public enum Dim + { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + } + + public enum SamplerAddressingMode + { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + } + + public enum SamplerFilterMode + { + Nearest = 0, + Linear = 1, + } + + public enum ImageFormat + { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + } + + public enum ImageChannelOrder + { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + } + + public enum ImageChannelDataType + { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + } + + public enum ImageOperandsShift + { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + } + + public enum ImageOperandsMask + { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + } + + public enum FPFastMathModeShift + { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + } + + public enum FPFastMathModeMask + { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + } + + public enum FPRoundingMode + { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + } + + public enum LinkageType + { + Export = 0, + Import = 1, + } + + public enum AccessQualifier + { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + } + + public enum FunctionParameterAttribute + { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + } + + public enum Decoration + { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + ExplicitInterpAMD = 4999, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + } + + public enum BuiltIn + { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + SubgroupEqMaskKHR = 4416, + SubgroupGeMaskKHR = 4417, + SubgroupGtMaskKHR = 4418, + SubgroupLeMaskKHR = 4419, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + DeviceIndex = 4438, + ViewIndex = 4440, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + } + + public enum SelectionControlShift + { + Flatten = 0, + DontFlatten = 1, + } + + public enum SelectionControlMask + { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, + } + + public enum LoopControlShift + { + Unroll = 0, + DontUnroll = 1, + } + + public enum LoopControlMask + { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + } + + public enum FunctionControlShift + { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + } + + public enum FunctionControlMask + { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + } + + public enum MemorySemanticsShift + { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + } + + public enum MemorySemanticsMask + { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + } + + public enum MemoryAccessShift + { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + } + + public enum MemoryAccessMask + { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + } + + public enum Scope + { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + } + + public enum GroupOperation + { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + } + + public enum KernelEnqueueFlags + { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + } + + public enum KernelProfilingInfoShift + { + CmdExecTime = 0, + } + + public enum KernelProfilingInfoMask + { + MaskNone = 0, + CmdExecTime = 0x00000001, + } + + public enum Capability + { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + } + + public enum Op + { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpDecorateId = 332, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + } + } +} + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.cs b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.cs new file mode 100644 index 000000000..99194e514 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.1/spirv.cs @@ -0,0 +1,1015 @@ +// Copyright (c) 2014-2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python, C# +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// - C# will use enum classes in the Specification class located in the "Spv" namespace, e.g.: Spv.Specification.SourceLanguage.GLSL +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +namespace Spv +{ + + public static class Specification + { + public const uint MagicNumber = 0x07230203; + public const uint Version = 0x00010100; + public const uint Revision = 8; + public const uint OpCodeMask = 0xffff; + public const uint WordCountShift = 16; + + public enum SourceLanguage + { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + } + + public enum ExecutionModel + { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + } + + public enum AddressingModel + { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + } + + public enum MemoryModel + { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + } + + public enum ExecutionMode + { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + PostDepthCoverage = 4446, + StencilRefReplacingEXT = 5027, + } + + public enum StorageClass + { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + } + + public enum Dim + { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + } + + public enum SamplerAddressingMode + { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + } + + public enum SamplerFilterMode + { + Nearest = 0, + Linear = 1, + } + + public enum ImageFormat + { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + } + + public enum ImageChannelOrder + { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + } + + public enum ImageChannelDataType + { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + } + + public enum ImageOperandsShift + { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + } + + public enum ImageOperandsMask + { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + } + + public enum FPFastMathModeShift + { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + } + + public enum FPFastMathModeMask + { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + } + + public enum FPRoundingMode + { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + } + + public enum LinkageType + { + Export = 0, + Import = 1, + } + + public enum AccessQualifier + { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + } + + public enum FunctionParameterAttribute + { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + } + + public enum Decoration + { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + ExplicitInterpAMD = 4999, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + } + + public enum BuiltIn + { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + SubgroupEqMaskKHR = 4416, + SubgroupGeMaskKHR = 4417, + SubgroupGtMaskKHR = 4418, + SubgroupLeMaskKHR = 4419, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + DeviceIndex = 4438, + ViewIndex = 4440, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + } + + public enum SelectionControlShift + { + Flatten = 0, + DontFlatten = 1, + } + + public enum SelectionControlMask + { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, + } + + public enum LoopControlShift + { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + } + + public enum LoopControlMask + { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + } + + public enum FunctionControlShift + { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + } + + public enum FunctionControlMask + { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + } + + public enum MemorySemanticsShift + { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + } + + public enum MemorySemanticsMask + { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + } + + public enum MemoryAccessShift + { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + } + + public enum MemoryAccessMask + { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + } + + public enum Scope + { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + } + + public enum GroupOperation + { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + } + + public enum KernelEnqueueFlags + { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + } + + public enum KernelProfilingInfoShift + { + CmdExecTime = 0, + } + + public enum KernelProfilingInfoMask + { + MaskNone = 0, + CmdExecTime = 0x00000001, + } + + public enum Capability + { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + } + + public enum Op + { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpDecorateId = 332, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + } + } +} + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.cs b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.cs new file mode 100644 index 000000000..493303d6a --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/1.2/spirv.cs @@ -0,0 +1,1021 @@ +// Copyright (c) 2014-2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python, C# +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// - C# will use enum classes in the Specification class located in the "Spv" namespace, e.g.: Spv.Specification.SourceLanguage.GLSL +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +namespace Spv +{ + + public static class Specification + { + public const uint MagicNumber = 0x07230203; + public const uint Version = 0x00010200; + public const uint Revision = 2; + public const uint OpCodeMask = 0xffff; + public const uint WordCountShift = 16; + + public enum SourceLanguage + { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + } + + public enum ExecutionModel + { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + } + + public enum AddressingModel + { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + } + + public enum MemoryModel + { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + } + + public enum ExecutionMode + { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + PostDepthCoverage = 4446, + StencilRefReplacingEXT = 5027, + } + + public enum StorageClass + { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + } + + public enum Dim + { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + } + + public enum SamplerAddressingMode + { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + } + + public enum SamplerFilterMode + { + Nearest = 0, + Linear = 1, + } + + public enum ImageFormat + { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + } + + public enum ImageChannelOrder + { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + } + + public enum ImageChannelDataType + { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + } + + public enum ImageOperandsShift + { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + } + + public enum ImageOperandsMask + { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + } + + public enum FPFastMathModeShift + { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + } + + public enum FPFastMathModeMask + { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + } + + public enum FPRoundingMode + { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + } + + public enum LinkageType + { + Export = 0, + Import = 1, + } + + public enum AccessQualifier + { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + } + + public enum FunctionParameterAttribute + { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + } + + public enum Decoration + { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + ExplicitInterpAMD = 4999, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + } + + public enum BuiltIn + { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + SubgroupEqMaskKHR = 4416, + SubgroupGeMaskKHR = 4417, + SubgroupGtMaskKHR = 4418, + SubgroupLeMaskKHR = 4419, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + DeviceIndex = 4438, + ViewIndex = 4440, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + } + + public enum SelectionControlShift + { + Flatten = 0, + DontFlatten = 1, + } + + public enum SelectionControlMask + { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, + } + + public enum LoopControlShift + { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + } + + public enum LoopControlMask + { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + } + + public enum FunctionControlShift + { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + } + + public enum FunctionControlMask + { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + } + + public enum MemorySemanticsShift + { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + } + + public enum MemorySemanticsMask + { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + } + + public enum MemoryAccessShift + { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + } + + public enum MemoryAccessMask + { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + } + + public enum Scope + { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + } + + public enum GroupOperation + { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + } + + public enum KernelEnqueueFlags + { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + } + + public enum KernelProfilingInfoShift + { + CmdExecTime = 0, + } + + public enum KernelProfilingInfoMask + { + MaskNone = 0, + CmdExecTime = 0x00000001, + } + + public enum Capability + { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + } + + public enum Op + { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateStringGOOGLE = 5633, + } + } +} + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml index 6b578a590..f9b23ac41 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/spir-v.xml @@ -1,7 +1,7 @@ @@ -137,13 +147,17 @@ + + + + - + @@ -166,13 +180,17 @@ + + + + - + @@ -192,8 +210,8 @@ - - + + @@ -233,7 +251,8 @@ - + + @@ -252,8 +271,8 @@ - - + + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h new file mode 100644 index 000000000..e626a7a95 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_gcn_shader.h @@ -0,0 +1,52 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_AMD_gcn_shader_H_ +#define SPIRV_UNIFIED1_AMD_gcn_shader_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + AMD_gcn_shaderRevision = 2, + AMD_gcn_shaderRevision_BitWidthPadding = 0x7fffffff +}; + +enum AMD_gcn_shaderInstructions { + AMD_gcn_shaderCubeFaceIndexAMD = 1, + AMD_gcn_shaderCubeFaceCoordAMD = 2, + AMD_gcn_shaderTimeAMD = 3, + AMD_gcn_shaderInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_AMD_gcn_shader_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h new file mode 100644 index 000000000..563c0b622 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_ballot.h @@ -0,0 +1,53 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_AMD_shader_ballot_H_ +#define SPIRV_UNIFIED1_AMD_shader_ballot_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + AMD_shader_ballotRevision = 5, + AMD_shader_ballotRevision_BitWidthPadding = 0x7fffffff +}; + +enum AMD_shader_ballotInstructions { + AMD_shader_ballotSwizzleInvocationsAMD = 1, + AMD_shader_ballotSwizzleInvocationsMaskedAMD = 2, + AMD_shader_ballotWriteInvocationAMD = 3, + AMD_shader_ballotMbcntAMD = 4, + AMD_shader_ballotInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_AMD_shader_ballot_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h new file mode 100644 index 000000000..e663330c1 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h @@ -0,0 +1,50 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_ +#define SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + AMD_shader_explicit_vertex_parameterRevision = 4, + AMD_shader_explicit_vertex_parameterRevision_BitWidthPadding = 0x7fffffff +}; + +enum AMD_shader_explicit_vertex_parameterInstructions { + AMD_shader_explicit_vertex_parameterInterpolateAtVertexAMD = 1, + AMD_shader_explicit_vertex_parameterInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h new file mode 100644 index 000000000..dd51c5fc8 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/AMD_shader_trinary_minmax.h @@ -0,0 +1,58 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_ +#define SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + AMD_shader_trinary_minmaxRevision = 4, + AMD_shader_trinary_minmaxRevision_BitWidthPadding = 0x7fffffff +}; + +enum AMD_shader_trinary_minmaxInstructions { + AMD_shader_trinary_minmaxFMin3AMD = 1, + AMD_shader_trinary_minmaxUMin3AMD = 2, + AMD_shader_trinary_minmaxSMin3AMD = 3, + AMD_shader_trinary_minmaxFMax3AMD = 4, + AMD_shader_trinary_minmaxUMax3AMD = 5, + AMD_shader_trinary_minmaxSMax3AMD = 6, + AMD_shader_trinary_minmaxFMid3AMD = 7, + AMD_shader_trinary_minmaxUMid3AMD = 8, + AMD_shader_trinary_minmaxSMid3AMD = 9, + AMD_shader_trinary_minmaxInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h index 4657556bf..a3c0af456 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/DebugInfo.h @@ -1,4 +1,4 @@ -// Copyright (c) 2017 The Khronos Group Inc. +// Copyright (c) 2017-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h index 54cc00e9a..0594f907a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/GLSL.std.450.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2016 The Khronos Group Inc. +** Copyright (c) 2014-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h index 380dc21b8..b6c27fa9b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticClspvReflection.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020 The Khronos Group Inc. +// Copyright (c) 2020-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the @@ -33,7 +33,7 @@ extern "C" { #endif enum { - NonSemanticClspvReflectionRevision = 2, + NonSemanticClspvReflectionRevision = 6, NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff }; @@ -63,10 +63,33 @@ enum NonSemanticClspvReflectionInstructions { NonSemanticClspvReflectionLiteralSampler = 23, NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24, NonSemanticClspvReflectionSpecConstantSubgroupMaxSize = 25, + NonSemanticClspvReflectionArgumentPointerPushConstant = 26, + NonSemanticClspvReflectionArgumentPointerUniform = 27, + NonSemanticClspvReflectionProgramScopeVariablesStorageBuffer = 28, + NonSemanticClspvReflectionProgramScopeVariablePointerRelocation = 29, + NonSemanticClspvReflectionImageArgumentInfoChannelOrderPushConstant = 30, + NonSemanticClspvReflectionImageArgumentInfoChannelDataTypePushConstant = 31, + NonSemanticClspvReflectionImageArgumentInfoChannelOrderUniform = 32, + NonSemanticClspvReflectionImageArgumentInfoChannelDataTypeUniform = 33, + NonSemanticClspvReflectionArgumentStorageTexelBuffer = 34, + NonSemanticClspvReflectionArgumentUniformTexelBuffer = 35, + NonSemanticClspvReflectionConstantDataPointerPushConstant = 36, + NonSemanticClspvReflectionProgramScopeVariablePointerPushConstant = 37, + NonSemanticClspvReflectionPrintfInfo = 38, + NonSemanticClspvReflectionPrintfBufferStorageBuffer = 39, + NonSemanticClspvReflectionPrintfBufferPointerPushConstant = 40, + NonSemanticClspvReflectionNormalizedSamplerMaskPushConstant = 41, NonSemanticClspvReflectionInstructionsMax = 0x7fffffff }; +enum NonSemanticClspvReflectionKernelPropertyFlags { + NonSemanticClspvReflectionNone = 0x0, + NonSemanticClspvReflectionMayUsePrintf = 0x1, + NonSemanticClspvReflectionKernelPropertyFlagsMax = 0x7fffffff +}; + + #ifdef __cplusplus } #endif diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugBreak.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugBreak.h new file mode 100644 index 000000000..8604fe784 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugBreak.h @@ -0,0 +1,50 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_NonSemanticDebugBreak_H_ +#define SPIRV_UNIFIED1_NonSemanticDebugBreak_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + NonSemanticDebugBreakRevision = 1, + NonSemanticDebugBreakRevision_BitWidthPadding = 0x7fffffff +}; + +enum NonSemanticDebugBreakInstructions { + NonSemanticDebugBreakDebugBreak = 1, + NonSemanticDebugBreakInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_NonSemanticDebugBreak_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h index 83796d75e..bc24683ec 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticDebugPrintf.h @@ -1,4 +1,4 @@ -// Copyright (c) 2020 The Khronos Group Inc. +// Copyright (c) 2020-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h index c52f32f80..b276b560c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticShaderDebugInfo100.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticVkspReflection.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticVkspReflection.h new file mode 100644 index 000000000..331a3d95d --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/NonSemanticVkspReflection.h @@ -0,0 +1,57 @@ +// Copyright (c) 2020-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS +// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS +// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT +// https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +// + +#ifndef SPIRV_UNIFIED1_NonSemanticVkspReflection_H_ +#define SPIRV_UNIFIED1_NonSemanticVkspReflection_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + NonSemanticVkspReflectionRevision = 2, + NonSemanticVkspReflectionRevision_BitWidthPadding = 0x7fffffff +}; + +enum NonSemanticVkspReflectionInstructions { + NonSemanticVkspReflectionConfiguration = 1, + NonSemanticVkspReflectionStartCounter = 2, + NonSemanticVkspReflectionStopCounter = 3, + NonSemanticVkspReflectionPushConstants = 4, + NonSemanticVkspReflectionSpecializationMapEntry = 5, + NonSemanticVkspReflectionDescriptorSetBuffer = 6, + NonSemanticVkspReflectionDescriptorSetImage = 7, + NonSemanticVkspReflectionDescriptorSetSampler = 8, + NonSemanticVkspReflectionInstructionsMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_NonSemanticVkspReflection_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h index 2745e30df..ed74f203e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCL.std.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2015-2019 The Khronos Group Inc. +** Copyright (c) 2015-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h index e3847c902..ffbd16f1d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/OpenCLDebugInfo100.h @@ -1,4 +1,4 @@ -// Copyright (c) 2018 The Khronos Group Inc. +// Copyright (c) 2018-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json new file mode 100644 index 000000000..918a9e547 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json @@ -0,0 +1,572 @@ +{ + "copyright" : [ + "Copyright (c) 2017-2024 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 100, + "revision" : 1, + "instructions" : [ + { + "opname" : "DebugInfoNone", + "opcode" : 0 + }, + { + "opname" : "DebugCompilationUnit", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Version'" }, + { "kind" : "LiteralInteger", "name" : "'DWARF Version'" } + ] + }, + { + "opname" : "DebugTypeBasic", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" } + ] + }, + { + "opname" : "DebugTypePointer", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "StorageClass", "name" : "'Storage Class'" }, + { "kind" : "DebugInfoFlags", "name" : "'Literal Flags'" } + ] + }, + { + "opname" : "DebugTypeQualifier", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" } + ] + }, + { + "opname" : "DebugTypeArray", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeVector", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "LiteralInteger", "name" : "'Component Count'" } + ] + }, + { + "opname" : "DebugTypedef", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeFunction", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "name" : "'Paramter Types'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeEnum", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Underlying Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeComposite", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "DebugCompositeType", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeMember", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugTypeInheritance", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'Child'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypePtrToMember", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'Member Type'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeTemplate", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeTemplateParameter", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Actual Type'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateTemplateParameter", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Template Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateParameterPack", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugGlobalVariable", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugFunctionDeclaration", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugFunction", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "LiteralInteger", "name" : "'Scope Line'" }, + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlock", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlockDiscriminator", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "LiteralInteger", "name" : "'Discriminator'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugScope", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugNoScope", + "opcode" : 24 + }, + { + "opname" : "DebugInlinedAt", + "opcode" : 25, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLocalVariable", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugInlinedVariable", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Inlined'" } + ] + }, + { + "opname" : "DebugDeclare", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Expression'" } + ] + }, + { + "opname" : "DebugValue", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Expression'" }, + { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugOperation", + "opcode" : 30, + "operands" : [ + { "kind" : "DebugOperation", "name" : "'OpCode'" }, + { "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugExpression", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugMacroDef", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugMacroUndef", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Macro'" } + ] + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "DebugInfoFlags", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "FlagIsProtected", + "value" : "0x01" + }, + { + "enumerant" : "FlagIsPrivate", + "value" : "0x02" + }, + { + "enumerant" : "FlagIsPublic", + "value" : "0x03" + }, + { + "enumerant" : "FlagIsLocal", + "value" : "0x04" + }, + { + "enumerant" : "FlagIsDefinition", + "value" : "0x08" + }, + { + "enumerant" : "FlagFwdDecl", + "value" : "0x10" + }, + { + "enumerant" : "FlagArtificial", + "value" : "0x20" + }, + { + "enumerant" : "FlagExplicit", + "value" : "0x40" + }, + { + "enumerant" : "FlagPrototyped", + "value" : "0x80" + }, + { + "enumerant" : "FlagObjectPointer", + "value" : "0x100" + }, + { + "enumerant" : "FlagStaticMember", + "value" : "0x200" + }, + { + "enumerant" : "FlagIndirectVariable", + "value" : "0x400" + }, + { + "enumerant" : "FlagLValueReference", + "value" : "0x800" + }, + { + "enumerant" : "FlagRValueReference", + "value" : "0x1000" + }, + { + "enumerant" : "FlagIsOptimized", + "value" : "0x2000" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugBaseTypeAttributeEncoding", + "enumerants" : [ + { + "enumerant" : "Unspecified", + "value" : "0" + }, + { + "enumerant" : "Address", + "value" : "1" + }, + { + "enumerant" : "Boolean", + "value" : "2" + }, + { + "enumerant" : "Float", + "value" : "4" + }, + { + "enumerant" : "Signed", + "value" : "5" + }, + { + "enumerant" : "SignedChar", + "value" : "6" + }, + { + "enumerant" : "Unsigned", + "value" : "7" + }, + { + "enumerant" : "UnsignedChar", + "value" : "8" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugCompositeType", + "enumerants" : [ + { + "enumerant" : "Class", + "value" : "0" + }, + { + "enumerant" : "Structure", + "value" : "1" + }, + { + "enumerant" : "Union", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugTypeQualifier", + "enumerants" : [ + { + "enumerant" : "ConstType", + "value" : "0" + }, + { + "enumerant" : "VolatileType", + "value" : "1" + }, + { + "enumerant" : "RestrictType", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugOperation", + "enumerants" : [ + { + "enumerant" : "Deref", + "value" : "0" + }, + { + "enumerant" : "Plus", + "value" : "1" + }, + { + "enumerant" : "Minus", + "value" : "2" + }, + { + "enumerant" : "PlusUconst", + "value" : "3", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "BitPiece", + "value" : "4", + "parameters" : [ + { "kind" : "LiteralInteger" }, + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "Swap", + "value" : "5" + }, + { + "enumerant" : "Xderef", + "value" : "6" + }, + { + "enumerant" : "StackValue", + "value" : "7" + }, + { + "enumerant" : "Constu", + "value" : "8", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + } + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json index 3d9f39e76..ac8fc6dda 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json @@ -1,6 +1,6 @@ { "copyright" : [ - "Copyright (c) 2014-2016 The Khronos Group Inc.", + "Copyright (c) 2014-2024 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json new file mode 100644 index 000000000..cfccc80b6 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json @@ -0,0 +1,426 @@ +{ + "revision" : 6, + "instructions" : [ + { + "opname" : "Kernel", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Name" }, + { "kind" : "IdRef", "name" : "NumArguments", "quantifier" : "?" }, + { "kind" : "IdRef", "name" : "Flags", "quantifier" : "?" }, + { "kind" : "IdRef", "name" : "Attributes", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentInfo", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "Name" }, + { "kind" : "IdRef", "name" : "Type Name", "quantifier" : "?" }, + { "kind" : "IdRef", "name" : "Address Qualifier", "quantifier" : "?" }, + { "kind" : "IdRef", "name" : "Access Qualifier", "quantifier" : "?" }, + { "kind" : "IdRef", "name" : "Type Qualifier", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentStorageBuffer", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentUniform", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentPodStorageBuffer", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentPodUniform", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentPodPushConstant", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentSampledImage", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentStorageImage", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentSampler", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentWorkgroup", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "SpecId" }, + { "kind" : "IdRef", "name" : "ElemSize" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "SpecConstantWorkgroupSize", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "X" }, + { "kind" : "IdRef", "name" : "Y" }, + { "kind" : "IdRef", "name" : "Z" } + ] + }, + { + "opname" : "SpecConstantGlobalOffset", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "X" }, + { "kind" : "IdRef", "name" : "Y" }, + { "kind" : "IdRef", "name" : "Z" } + ] + }, + { + "opname" : "SpecConstantWorkDim", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "Dim" } + ] + }, + { + "opname" : "PushConstantGlobalOffset", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "PushConstantEnqueuedLocalSize", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "PushConstantGlobalSize", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "PushConstantRegionOffset", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "PushConstantNumWorkgroups", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "PushConstantRegionGroupOffset", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ConstantDataStorageBuffer", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "ConstantDataUniform", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "LiteralSampler", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Mask" } + ] + }, + { + "opname" : "PropertyRequiredWorkgroupSize", + "opcode" : 24, + "operands" : [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "X" }, + { "kind" : "IdRef", "name" : "Y" }, + { "kind" : "IdRef", "name" : "Z" } + ] + }, + { + "opname" : "SpecConstantSubgroupMaxSize", + "opcode" : 25, + "operands" : [ + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ArgumentPointerPushConstant", + "opcode" : 26, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentPointerUniform", + "opcode" : 27, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ProgramScopeVariablesStorageBuffer", + "opcode" : 28, + "operands": [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "ProgramScopeVariablePointerRelocation", + "opcode" : 29, + "operands": [ + { "kind" : "IdRef", "name" : "ObjectOffset" }, + { "kind" : "IdRef", "name" : "PointerOffset" }, + { "kind" : "IdRef", "name" : "PointerSize" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelOrderPushConstant", + "opcode" : 30, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelDataTypePushConstant", + "opcode" : 31, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelOrderUniform", + "opcode" : 32, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelDataTypeUniform", + "opcode" : 33, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ArgumentStorageTexelBuffer", + "opcode" : 34, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentUniformTexelBuffer", + "opcode" : 35, + "operands" : [ + { "kind" : "IdRef", "name" : "Decl" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ConstantDataPointerPushConstant", + "opcode" : 36, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset"}, + { "kind" : "IdRef", "name" : "Size"}, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "ProgramScopeVariablePointerPushConstant", + "opcode" : 37, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset"}, + { "kind" : "IdRef", "name" : "Size"}, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "PrintfInfo", + "opcode" : 38, + "operands" : [ + { "kind" : "IdRef", "name" : "PrintfID" }, + { "kind" : "IdRef", "name" : "FormatString" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "ArgumentSizes"} + ] + }, + { + "opname" : "PrintfBufferStorageBuffer", + "opcode" : 39, + "operands" : [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "BufferSize"} + ] + }, + { + "opname" : "PrintfBufferPointerPushConstant", + "opcode" : 40, + "operands" : [ + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size"}, + { "kind" : "IdRef", "name" : "BufferSize"} + ] + }, + { + "opname" : "NormalizedSamplerMaskPushConstant", + "opcode" : 41, + "operands" : [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "KernelPropertyFlags", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0" + }, + { + "enumerant" : "MayUsePrintf", + "value" : "0x1" + } + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugbreak.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugbreak.grammar.json new file mode 100644 index 000000000..ae2888338 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugbreak.grammar.json @@ -0,0 +1,9 @@ +{ + "revision" : 1, + "instructions" : [ + { + "opname" : "DebugBreak", + "opcode" : 1 + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json new file mode 100644 index 000000000..71fa7112c --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json @@ -0,0 +1,13 @@ +{ + "revision" : 1, + "instructions" : [ + { + "opname" : "DebugPrintf", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'Format'" }, + { "kind" : "IdRef", "quantifier" : "*" } + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json new file mode 100644 index 000000000..1eb2859a1 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json @@ -0,0 +1,713 @@ +{ + "copyright" : [ + "Copyright (c) 2018-2024 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 100, + "revision" : 6, + "instructions" : [ + { + "opname" : "DebugInfoNone", + "opcode" : 0 + }, + { + "opname" : "DebugCompilationUnit", + "opcode" : 1, + "operands" : [ + { "kind" : "IdRef", "name" : "'Version'" }, + { "kind" : "IdRef", "name" : "'DWARF Version'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Language'" } + ] + }, + { + "opname" : "DebugTypeBasic", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "IdRef", "name" : "'Encoding'" }, + { "kind" : "IdRef", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypePointer", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Storage Class'" }, + { "kind" : "IdRef", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypeQualifier", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Type Qualifier'" } + ] + }, + { + "opname" : "DebugTypeArray", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeVector", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Component Count'" } + ] + }, + { + "opname" : "DebugTypedef", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeFunction", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeEnum", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Underlying Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeComposite", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeMember", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugTypeInheritance", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "IdRef", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypePtrToMember", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'Member Type'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeTemplate", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeTemplateParameter", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Actual Type'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateTemplateParameter", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Template Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateParameterPack", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugGlobalVariable", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugFunctionDeclaration", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugFunction", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Scope Line'" }, + { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlock", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlockDiscriminator", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Discriminator'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugScope", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugNoScope", + "opcode" : 24 + }, + { + "opname" : "DebugInlinedAt", + "opcode" : 25, + "operands" : [ + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLocalVariable", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Arg Number'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugInlinedVariable", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Inlined'" } + ] + }, + { + "opname" : "DebugDeclare", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Expression'" }, + { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugValue", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Expression'" }, + { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugOperation", + "opcode" : 30, + "operands" : [ + { "kind" : "IdRef", "name" : "'OpCode'" }, + { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugExpression", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugMacroDef", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugMacroUndef", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Macro'" } + ] + }, + { + "opname" : "DebugImportedEntity", + "opcode" : 34, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Entity'" }, + { "kind" : "IdRef", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugSource", + "opcode" : 35, + "operands" : [ + { "kind" : "IdRef", "name" : "'File'" }, + { "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugFunctionDefinition", + "opcode" : 101, + "operands" : [ + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "name" : "'Definition'" } + ] + }, + { + "opname" : "DebugSourceContinued", + "opcode" : 102, + "operands" : [ + { "kind" : "IdRef", "name" : "'Text'" } + ] + }, + { + "opname" : "DebugLine", + "opcode" : 103, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Line Start'" }, + { "kind" : "IdRef", "name" : "'Line End'" }, + { "kind" : "IdRef", "name" : "'Column Start'" }, + { "kind" : "IdRef", "name" : "'Column End'" } + ] + }, + { + "opname" : "DebugNoLine", + "opcode" : 104 + }, + { + "opname" : "DebugBuildIdentifier", + "opcode" : 105, + "operands" : [ + { "kind" : "IdRef", "name" : "'Identifier'" }, + { "kind" : "IdRef", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugStoragePath", + "opcode" : 106, + "operands" : [ + { "kind" : "IdRef", "name" : "'Path'" } + ] + }, + { + "opname" : "DebugEntryPoint", + "opcode" : 107, + "operands" : [ + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "IdRef", "name" : "'Compilation Unit'" }, + { "kind" : "IdRef", "name" : "'Compiler Signature'" }, + { "kind" : "IdRef", "name" : "'Command-line Arguments'" } + ] + }, + { + "opname" : "DebugTypeMatrix", + "opcode" : 108, + "operands" : [ + { "kind" : "IdRef", "name" : "'Vector Type'" }, + { "kind" : "IdRef", "name" : "'Vector Count'" }, + { "kind" : "IdRef", "name" : "'Column Major'" } + ] + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "DebugInfoFlags", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "FlagIsProtected", + "value" : "0x01" + }, + { + "enumerant" : "FlagIsPrivate", + "value" : "0x02" + }, + { + "enumerant" : "FlagIsPublic", + "value" : "0x03" + }, + { + "enumerant" : "FlagIsLocal", + "value" : "0x04" + }, + { + "enumerant" : "FlagIsDefinition", + "value" : "0x08" + }, + { + "enumerant" : "FlagFwdDecl", + "value" : "0x10" + }, + { + "enumerant" : "FlagArtificial", + "value" : "0x20" + }, + { + "enumerant" : "FlagExplicit", + "value" : "0x40" + }, + { + "enumerant" : "FlagPrototyped", + "value" : "0x80" + }, + { + "enumerant" : "FlagObjectPointer", + "value" : "0x100" + }, + { + "enumerant" : "FlagStaticMember", + "value" : "0x200" + }, + { + "enumerant" : "FlagIndirectVariable", + "value" : "0x400" + }, + { + "enumerant" : "FlagLValueReference", + "value" : "0x800" + }, + { + "enumerant" : "FlagRValueReference", + "value" : "0x1000" + }, + { + "enumerant" : "FlagIsOptimized", + "value" : "0x2000" + }, + { + "enumerant" : "FlagIsEnumClass", + "value" : "0x4000" + }, + { + "enumerant" : "FlagTypePassByValue", + "value" : "0x8000" + }, + { + "enumerant" : "FlagTypePassByReference", + "value" : "0x10000" + }, + { + "enumerant" : "FlagUnknownPhysicalLayout", + "value" : "0x20000" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "BuildIdentifierFlags", + "enumerants" : [ + { + "enumerant" : "IdentifierPossibleDuplicates", + "value" : "0x01" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugBaseTypeAttributeEncoding", + "enumerants" : [ + { + "enumerant" : "Unspecified", + "value" : "0" + }, + { + "enumerant" : "Address", + "value" : "1" + }, + { + "enumerant" : "Boolean", + "value" : "2" + }, + { + "enumerant" : "Float", + "value" : "3" + }, + { + "enumerant" : "Signed", + "value" : "4" + }, + { + "enumerant" : "SignedChar", + "value" : "5" + }, + { + "enumerant" : "Unsigned", + "value" : "6" + }, + { + "enumerant" : "UnsignedChar", + "value" : "7" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugCompositeType", + "enumerants" : [ + { + "enumerant" : "Class", + "value" : "0" + }, + { + "enumerant" : "Structure", + "value" : "1" + }, + { + "enumerant" : "Union", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugTypeQualifier", + "enumerants" : [ + { + "enumerant" : "ConstType", + "value" : "0" + }, + { + "enumerant" : "VolatileType", + "value" : "1" + }, + { + "enumerant" : "RestrictType", + "value" : "2" + }, + { + "enumerant" : "AtomicType", + "value" : "3" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugOperation", + "enumerants" : [ + { + "enumerant" : "Deref", + "value" : "0" + }, + { + "enumerant" : "Plus", + "value" : "1" + }, + { + "enumerant" : "Minus", + "value" : "2" + }, + { + "enumerant" : "PlusUconst", + "value" : "3", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "BitPiece", + "value" : "4", + "parameters" : [ + { "kind" : "IdRef" }, + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Swap", + "value" : "5" + }, + { + "enumerant" : "Xderef", + "value" : "6" + }, + { + "enumerant" : "StackValue", + "value" : "7" + }, + { + "enumerant" : "Constu", + "value" : "8", + "parameters" : [ + { "kind" : "IdRef" } + ] + }, + { + "enumerant" : "Fragment", + "value" : "9", + "parameters" : [ + { "kind" : "IdRef" }, + { "kind" : "IdRef" } + ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugImportedEntity", + "enumerants" : [ + { + "enumerant" : "ImportedModule", + "value" : "0" + }, + { + "enumerant" : "ImportedDeclaration", + "value" : "1" + } + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.vkspreflection.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.vkspreflection.grammar.json new file mode 100644 index 000000000..379457b9e --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.vkspreflection.grammar.json @@ -0,0 +1,136 @@ +{ + "revision" : 2, + "instructions" : [ + { + "opname" : "Configuration", + "opcode" : 1, + "operands" : [ + {"kind" : "LiteralString", "name" : "enabledExtensionNames" }, + {"kind" : "LiteralInteger", "name" : "specializationInfoDataSize" }, + {"kind" : "LiteralString", "name" : "specializationInfoData" }, + {"kind" : "LiteralString", "name" : "shaderName" }, + {"kind" : "LiteralString", "name" : "EntryPoint" }, + {"kind" : "LiteralInteger", "name" : "groupCountX" }, + {"kind" : "LiteralInteger", "name" : "groupCountY" }, + {"kind" : "LiteralInteger", "name" : "groupCountZ" }, + {"kind" : "LiteralInteger", "name" : "dispatchId" } + ] + }, + { + "opname" : "StartCounter", + "opcode" : 2, + "operands" : [ + {"kind" : "LiteralString", "name" : "name" } + ] + }, + { + "opname" : "StopCounter", + "opcode" : 3, + "operands" : [ + {"kind" : "IdRef", "name" : "counter" } + ] + }, + { + "opname" : "PushConstants", + "opcode" : 4, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "offset" }, + { "kind" : "LiteralInteger", "name" : "size" }, + { "kind" : "LiteralString", "name" : "pValues" }, + { "kind" : "LiteralInteger", "name" : "stageFlags" } + ] + }, + { + "opname" : "SpecializationMapEntry", + "opcode" : 5, + "operands" : [ + {"kind" : "LiteralInteger", "name" : "constantID" }, + {"kind" : "LiteralInteger", "name" : "offset" }, + {"kind" : "LiteralInteger", "name" : "size" } + ] + }, + { + "opname" : "DescriptorSetBuffer", + "opcode" : 6, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "ds" }, + { "kind" : "LiteralInteger", "name" : "binding" }, + { "kind" : "LiteralInteger", "name" : "type" }, + { "kind" : "LiteralInteger", "name" : "flags" }, + { "kind" : "LiteralInteger", "name" : "queueFamilyIndexCount" }, + { "kind" : "LiteralInteger", "name" : "sharingMode" }, + { "kind" : "LiteralInteger", "name" : "size" }, + { "kind" : "LiteralInteger", "name" : "usage" }, + { "kind" : "LiteralInteger", "name" : "range" }, + { "kind" : "LiteralInteger", "name" : "offset" }, + { "kind" : "LiteralInteger", "name" : "memorySize" }, + { "kind" : "LiteralInteger", "name" : "memoryType" }, + { "kind" : "LiteralInteger", "name" : "bindOffset" } + ] + }, + { + "opname" : "DescriptorSetImage", + "opcode" : 7, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "ds" }, + { "kind" : "LiteralInteger", "name" : "binding" }, + { "kind" : "LiteralInteger", "name" : "type" }, + { "kind" : "LiteralInteger", "name" : "imageLayout"}, + { "kind" : "LiteralInteger", "name" : "imageFlags"}, + { "kind" : "LiteralInteger", "name" : "imageType"}, + { "kind" : "LiteralInteger", "name" : "imageformat"}, + { "kind" : "LiteralInteger", "name" : "width"}, + { "kind" : "LiteralInteger", "name" : "height"}, + { "kind" : "LiteralInteger", "name" : "depth"}, + { "kind" : "LiteralInteger", "name" : "mipLevels"}, + { "kind" : "LiteralInteger", "name" : "arrayLayers"}, + { "kind" : "LiteralInteger", "name" : "samples"}, + { "kind" : "LiteralInteger", "name" : "tiling"}, + { "kind" : "LiteralInteger", "name" : "usage"}, + { "kind" : "LiteralInteger", "name" : "sharingMode"}, + { "kind" : "LiteralInteger", "name" : "queueFamilyIndexCount"}, + { "kind" : "LiteralInteger", "name" : "initialLayout"}, + { "kind" : "LiteralInteger", "name" : "aspectMask"}, + { "kind" : "LiteralInteger", "name" : "baseMipLevel"}, + { "kind" : "LiteralInteger", "name" : "levelCount"}, + { "kind" : "LiteralInteger", "name" : "baseArrayLayer"}, + { "kind" : "LiteralInteger", "name" : "layerCount"}, + { "kind" : "LiteralInteger", "name" : "viewFlags"}, + { "kind" : "LiteralInteger", "name" : "viewType"}, + { "kind" : "LiteralInteger", "name" : "viewFormat"}, + { "kind" : "LiteralInteger", "name" : "component_a"}, + { "kind" : "LiteralInteger", "name" : "component_b"}, + { "kind" : "LiteralInteger", "name" : "component_g"}, + { "kind" : "LiteralInteger", "name" : "component_r"}, + { "kind" : "LiteralInteger", "name" : "memorySize" }, + { "kind" : "LiteralInteger", "name" : "memoryType" }, + { "kind" : "LiteralInteger", "name" : "bindOffset"} + ] + }, + { + "opname" : "DescriptorSetSampler", + "opcode" : 8, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "ds" }, + { "kind" : "LiteralInteger", "name" : "binding" }, + { "kind" : "LiteralInteger", "name" : "type" }, + { "kind" : "LiteralInteger", "name" : "flags"}, + { "kind" : "LiteralInteger", "name" : "magFilter"}, + { "kind" : "LiteralInteger", "name" : "minFilter"}, + { "kind" : "LiteralInteger", "name" : "mipmapMode"}, + { "kind" : "LiteralInteger", "name" : "addressModeU"}, + { "kind" : "LiteralInteger", "name" : "addressModeV"}, + { "kind" : "LiteralInteger", "name" : "addressModeW"}, + { "kind" : "LiteralFloat", "name" : "mipLodBias"}, + { "kind" : "LiteralInteger", "name" : "anisotropyEnable"}, + { "kind" : "LiteralFloat", "name" : "maxAnisotropy"}, + { "kind" : "LiteralInteger", "name" : "compareEnable"}, + { "kind" : "LiteralInteger", "name" : "compareOp"}, + { "kind" : "LiteralFloat", "name" : "minLod"}, + { "kind" : "LiteralFloat", "name" : "maxLod"}, + { "kind" : "LiteralInteger", "name" : "borderColor"}, + { "kind" : "LiteralInteger", "name" : "unnormalizedCoordinates"} + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json new file mode 100644 index 000000000..53b001c53 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json @@ -0,0 +1,651 @@ +{ + "copyright" : [ + "Copyright (c) 2018-2024 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "version" : 200, + "revision" : 2, + "instructions" : [ + { + "opname" : "DebugInfoNone", + "opcode" : 0 + }, + { + "opname" : "DebugCompilationUnit", + "opcode" : 1, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "'Version'" }, + { "kind" : "LiteralInteger", "name" : "'DWARF Version'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "SourceLanguage", "name" : "'Language'" } + ] + }, + { + "opname" : "DebugTypeBasic", + "opcode" : 2, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" } + ] + }, + { + "opname" : "DebugTypePointer", + "opcode" : 3, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "StorageClass", "name" : "'Storage Class'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypeQualifier", + "opcode" : 4, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" } + ] + }, + { + "opname" : "DebugTypeArray", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeVector", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "LiteralInteger", "name" : "'Component Count'" } + ] + }, + { + "opname" : "DebugTypedef", + "opcode" : 7, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Base Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeFunction", + "opcode" : 8, + "operands" : [ + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeEnum", + "opcode" : 9, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Underlying Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeComposite", + "opcode" : 10, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "DebugCompositeType", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeMember", + "opcode" : 11, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugTypeInheritance", + "opcode" : 12, + "operands" : [ + { "kind" : "IdRef", "name" : "'Child'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugTypePtrToMember", + "opcode" : 13, + "operands" : [ + { "kind" : "IdRef", "name" : "'Member Type'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugTypeTemplate", + "opcode" : 14, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugTypeTemplateParameter", + "opcode" : 15, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Actual Type'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateTemplateParameter", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Template Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ] + }, + { + "opname" : "DebugTypeTemplateParameterPack", + "opcode" : 17, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugGlobalVariable", + "opcode" : 18, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugFunctionDeclaration", + "opcode" : 19, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" } + ] + }, + { + "opname" : "DebugFunction", + "opcode" : 20, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Linkage Name'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "LiteralInteger", "name" : "'Scope Line'" }, + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlock", + "opcode" : 21, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLexicalBlockDiscriminator", + "opcode" : 22, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Discriminator'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugScope", + "opcode" : 23, + "operands" : [ + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugNoScope", + "opcode" : 24 + }, + { + "opname" : "DebugInlinedAt", + "opcode" : 25, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugLocalVariable", + "opcode" : 26, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "DebugInfoFlags", "name" : "'Flags'" }, + { "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugInlinedVariable", + "opcode" : 27, + "operands" : [ + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Inlined'" } + ] + }, + { + "opname" : "DebugDeclare", + "opcode" : 28, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Variable'" }, + { "kind" : "IdRef", "name" : "'Expression'" } + ] + }, + { + "opname" : "DebugValue", + "opcode" : 29, + "operands" : [ + { "kind" : "IdRef", "name" : "'Local Variable'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Expression'" }, + { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugOperation", + "opcode" : 30, + "operands" : [ + { "kind" : "DebugOperation", "name" : "'OpCode'" }, + { "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugExpression", + "opcode" : 31, + "operands" : [ + { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" } + ] + }, + { + "opname" : "DebugMacroDef", + "opcode" : 32, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugMacroUndef", + "opcode" : 33, + "operands" : [ + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'Macro'" } + ] + }, + { + "opname" : "DebugImportedEntity", + "opcode" : 34, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "DebugImportedEntity", "name" : "'Tag'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Entity'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" }, + { "kind" : "IdRef", "name" : "'Parent'" } + ] + }, + { + "opname" : "DebugSource", + "opcode" : 35, + "operands" : [ + { "kind" : "IdRef", "name" : "'File'" }, + { "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" } + ] + }, + { + "opname" : "DebugModuleINTEL", + "opcode" : 36, + "operands" : [ + { "kind" : "IdRef", "name" : "'Name'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Parent'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "IdRef", "name" : "'ConfigurationMacros'" }, + { "kind" : "IdRef", "name" : "'IncludePath'" }, + { "kind" : "IdRef", "name" : "'APINotesFile'" }, + { "kind" : "LiteralInteger", "name" : "'IsDeclaration'" } + ], + "capability" : "DebugInfoModuleINTEL" + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "DebugInfoFlags", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "FlagIsProtected", + "value" : "0x01" + }, + { + "enumerant" : "FlagIsPrivate", + "value" : "0x02" + }, + { + "enumerant" : "FlagIsPublic", + "value" : "0x03" + }, + { + "enumerant" : "FlagIsLocal", + "value" : "0x04" + }, + { + "enumerant" : "FlagIsDefinition", + "value" : "0x08" + }, + { + "enumerant" : "FlagFwdDecl", + "value" : "0x10" + }, + { + "enumerant" : "FlagArtificial", + "value" : "0x20" + }, + { + "enumerant" : "FlagExplicit", + "value" : "0x40" + }, + { + "enumerant" : "FlagPrototyped", + "value" : "0x80" + }, + { + "enumerant" : "FlagObjectPointer", + "value" : "0x100" + }, + { + "enumerant" : "FlagStaticMember", + "value" : "0x200" + }, + { + "enumerant" : "FlagIndirectVariable", + "value" : "0x400" + }, + { + "enumerant" : "FlagLValueReference", + "value" : "0x800" + }, + { + "enumerant" : "FlagRValueReference", + "value" : "0x1000" + }, + { + "enumerant" : "FlagIsOptimized", + "value" : "0x2000" + }, + { + "enumerant" : "FlagIsEnumClass", + "value" : "0x4000" + }, + { + "enumerant" : "FlagTypePassByValue", + "value" : "0x8000" + }, + { + "enumerant" : "FlagTypePassByReference", + "value" : "0x10000" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugBaseTypeAttributeEncoding", + "enumerants" : [ + { + "enumerant" : "Unspecified", + "value" : "0" + }, + { + "enumerant" : "Address", + "value" : "1" + }, + { + "enumerant" : "Boolean", + "value" : "2" + }, + { + "enumerant" : "Float", + "value" : "3" + }, + { + "enumerant" : "Signed", + "value" : "4" + }, + { + "enumerant" : "SignedChar", + "value" : "5" + }, + { + "enumerant" : "Unsigned", + "value" : "6" + }, + { + "enumerant" : "UnsignedChar", + "value" : "7" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugCompositeType", + "enumerants" : [ + { + "enumerant" : "Class", + "value" : "0" + }, + { + "enumerant" : "Structure", + "value" : "1" + }, + { + "enumerant" : "Union", + "value" : "2" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugTypeQualifier", + "enumerants" : [ + { + "enumerant" : "ConstType", + "value" : "0" + }, + { + "enumerant" : "VolatileType", + "value" : "1" + }, + { + "enumerant" : "RestrictType", + "value" : "2" + }, + { + "enumerant" : "AtomicType", + "value" : "3" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugOperation", + "enumerants" : [ + { + "enumerant" : "Deref", + "value" : "0" + }, + { + "enumerant" : "Plus", + "value" : "1" + }, + { + "enumerant" : "Minus", + "value" : "2" + }, + { + "enumerant" : "PlusUconst", + "value" : "3", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "BitPiece", + "value" : "4", + "parameters" : [ + { "kind" : "LiteralInteger" }, + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "Swap", + "value" : "5" + }, + { + "enumerant" : "Xderef", + "value" : "6" + }, + { + "enumerant" : "StackValue", + "value" : "7" + }, + { + "enumerant" : "Constu", + "value" : "8", + "parameters" : [ + { "kind" : "LiteralInteger" } + ] + }, + { + "enumerant" : "Fragment", + "value" : "9", + "parameters" : [ + { "kind" : "LiteralInteger" }, + { "kind" : "LiteralInteger" } + ] + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "DebugImportedEntity", + "enumerants" : [ + { + "enumerant" : "ImportedModule", + "value" : "0" + }, + { + "enumerant" : "ImportedDeclaration", + "value" : "1" + } + ] + } + ] +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json index 4fe45060b..21b7876b0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json @@ -1,6 +1,6 @@ { "copyright" : [ - "Copyright (c) 2014-2016 The Khronos Group Inc.", + "Copyright (c) 2014-2024 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.bf b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.bf new file mode 100644 index 000000000..d14f43f8d --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.bf @@ -0,0 +1,2172 @@ +// Copyright (c) 2014-2024 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// - C# will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL +// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +namespace Spv +{ + using System; + + public static class Specification + { + public const uint32 MagicNumber = 0x07230203; + public const uint32 Version = 0x00010600; + public const uint32 Revision = 1; + public const uint32 OpCodeMask = 0xffff; + public const uint32 WordCountShift = 16; + + [AllowDuplicates, CRepr] public enum SourceLanguage + { + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, + } + + [AllowDuplicates, CRepr] public enum ExecutionModel + { + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + TaskNV = 5267, + MeshNV = 5268, + RayGenerationKHR = 5313, + RayGenerationNV = 5313, + IntersectionKHR = 5314, + IntersectionNV = 5314, + AnyHitKHR = 5315, + AnyHitNV = 5315, + ClosestHitKHR = 5316, + ClosestHitNV = 5316, + MissKHR = 5317, + MissNV = 5317, + CallableKHR = 5318, + CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, + } + + [AllowDuplicates, CRepr] public enum AddressingModel + { + Logical = 0, + Physical32 = 1, + Physical64 = 2, + PhysicalStorageBuffer64 = 5348, + PhysicalStorageBuffer64EXT = 5348, + } + + [AllowDuplicates, CRepr] public enum MemoryModel + { + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + Vulkan = 3, + VulkanKHR = 3, + } + + [AllowDuplicates, CRepr] public enum ExecutionMode + { + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, + SubgroupUniformControlFlowKHR = 4421, + PostDepthCoverage = 4446, + DenormPreserve = 4459, + DenormFlushToZero = 4460, + SignedZeroInfNanPreserve = 4461, + RoundingModeRTE = 4462, + RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, + StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, + OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, + OutputPrimitivesNV = 5270, + DerivativeGroupQuadsNV = 5289, + DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, + OutputTrianglesNV = 5298, + PixelInterlockOrderedEXT = 5366, + PixelInterlockUnorderedEXT = 5367, + SampleInterlockOrderedEXT = 5368, + SampleInterlockUnorderedEXT = 5369, + ShadingRateInterlockOrderedEXT = 5370, + ShadingRateInterlockUnorderedEXT = 5371, + SharedLocalMemorySizeINTEL = 5618, + RoundingModeRTPINTEL = 5620, + RoundingModeRTNINTEL = 5621, + FloatingPointModeALTINTEL = 5622, + FloatingPointModeIEEEINTEL = 5623, + MaxWorkgroupSizeINTEL = 5893, + MaxWorkDimINTEL = 5894, + NoGlobalOffsetINTEL = 5895, + NumSIMDWorkitemsINTEL = 5896, + SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, + } + + [AllowDuplicates, CRepr] public enum StorageClass + { + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, + CallableDataKHR = 5328, + CallableDataNV = 5328, + IncomingCallableDataKHR = 5329, + IncomingCallableDataNV = 5329, + RayPayloadKHR = 5338, + RayPayloadNV = 5338, + HitAttributeKHR = 5339, + HitAttributeNV = 5339, + IncomingRayPayloadKHR = 5342, + IncomingRayPayloadNV = 5342, + ShaderRecordBufferKHR = 5343, + ShaderRecordBufferNV = 5343, + PhysicalStorageBuffer = 5349, + PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, + CodeSectionINTEL = 5605, + DeviceOnlyINTEL = 5936, + HostOnlyINTEL = 5937, + } + + [AllowDuplicates, CRepr] public enum Dim + { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + TileImageDataEXT = 4173, + } + + [AllowDuplicates, CRepr] public enum SamplerAddressingMode + { + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, + } + + [AllowDuplicates, CRepr] public enum SamplerFilterMode + { + Nearest = 0, + Linear = 1, + } + + [AllowDuplicates, CRepr] public enum ImageFormat + { + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + R64ui = 40, + R64i = 41, + } + + [AllowDuplicates, CRepr] public enum ImageChannelOrder + { + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, + } + + [AllowDuplicates, CRepr] public enum ImageChannelDataType + { + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, + } + + [AllowDuplicates, CRepr] public enum ImageOperandsShift + { + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + MakeTexelAvailable = 8, + MakeTexelAvailableKHR = 8, + MakeTexelVisible = 9, + MakeTexelVisibleKHR = 9, + NonPrivateTexel = 10, + NonPrivateTexelKHR = 10, + VolatileTexel = 11, + VolatileTexelKHR = 11, + SignExtend = 12, + ZeroExtend = 13, + Nontemporal = 14, + Offsets = 16, + } + + [AllowDuplicates, CRepr] public enum ImageOperandsMask + { + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + MakeTexelAvailable = 0x00000100, + MakeTexelAvailableKHR = 0x00000100, + MakeTexelVisible = 0x00000200, + MakeTexelVisibleKHR = 0x00000200, + NonPrivateTexel = 0x00000400, + NonPrivateTexelKHR = 0x00000400, + VolatileTexel = 0x00000800, + VolatileTexelKHR = 0x00000800, + SignExtend = 0x00001000, + ZeroExtend = 0x00002000, + Nontemporal = 0x00004000, + Offsets = 0x00010000, + } + + [AllowDuplicates, CRepr] public enum FPFastMathModeShift + { + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + AllowContract = 16, + AllowContractFastINTEL = 16, + AllowReassoc = 17, + AllowReassocINTEL = 17, + AllowTransform = 18, + } + + [AllowDuplicates, CRepr] public enum FPFastMathModeMask + { + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + AllowContract = 0x00010000, + AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, + AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, + } + + [AllowDuplicates, CRepr] public enum FPRoundingMode + { + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, + } + + [AllowDuplicates, CRepr] public enum LinkageType + { + Export = 0, + Import = 1, + LinkOnceODR = 2, + } + + [AllowDuplicates, CRepr] public enum AccessQualifier + { + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, + } + + [AllowDuplicates, CRepr] public enum FunctionParameterAttribute + { + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, + } + + [AllowDuplicates, CRepr] public enum Decoration + { + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + UniformId = 27, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + NoSignedWrap = 4469, + NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, + ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, + PerPrimitiveNV = 5271, + PerViewNV = 5272, + PerTaskNV = 5273, + PerVertexKHR = 5285, + PerVertexNV = 5285, + NonUniform = 5300, + NonUniformEXT = 5300, + RestrictPointer = 5355, + RestrictPointerEXT = 5355, + AliasedPointer = 5356, + AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, + BindlessSamplerNV = 5398, + BindlessImageNV = 5399, + BoundSamplerNV = 5400, + BoundImageNV = 5401, + SIMTCallINTEL = 5599, + ReferencedIndirectlyINTEL = 5602, + ClobberINTEL = 5607, + SideEffectsINTEL = 5608, + VectorComputeVariableINTEL = 5624, + FuncParamIOKindINTEL = 5625, + VectorComputeFunctionINTEL = 5626, + StackCallINTEL = 5627, + GlobalVariableOffsetINTEL = 5628, + CounterBuffer = 5634, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + UserSemantic = 5635, + UserTypeGOOGLE = 5636, + FunctionRoundingModeINTEL = 5822, + FunctionDenormModeINTEL = 5823, + RegisterINTEL = 5825, + MemoryINTEL = 5826, + NumbanksINTEL = 5827, + BankwidthINTEL = 5828, + MaxPrivateCopiesINTEL = 5829, + SinglepumpINTEL = 5830, + DoublepumpINTEL = 5831, + MaxReplicatesINTEL = 5832, + SimpleDualPortINTEL = 5833, + MergeINTEL = 5834, + BankBitsINTEL = 5835, + ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, + BurstCoalesceINTEL = 5899, + CacheSizeINTEL = 5900, + DontStaticallyCoalesceINTEL = 5901, + PrefetchINTEL = 5902, + StallEnableINTEL = 5905, + FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, + BufferLocationINTEL = 5921, + IOPipeStorageINTEL = 5944, + FunctionFloatingPointModeINTEL = 6080, + SingleElementVectorINTEL = 6085, + VectorComputeCallableFunctionINTEL = 6087, + MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, + } + + [AllowDuplicates, CRepr] public enum BuiltIn + { + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, + SubgroupEqMask = 4416, + SubgroupEqMaskKHR = 4416, + SubgroupGeMask = 4417, + SubgroupGeMaskKHR = 4417, + SubgroupGtMask = 4418, + SubgroupGtMaskKHR = 4418, + SubgroupLeMask = 4419, + SubgroupLeMaskKHR = 4419, + SubgroupLtMask = 4420, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + PrimitiveShadingRateKHR = 4432, + DeviceIndex = 4438, + ViewIndex = 4440, + ShadingRateKHR = 4444, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + FullyCoveredEXT = 5264, + TaskCountNV = 5274, + PrimitiveCountNV = 5275, + PrimitiveIndicesNV = 5276, + ClipDistancePerViewNV = 5277, + CullDistancePerViewNV = 5278, + LayerPerViewNV = 5279, + MeshViewCountNV = 5280, + MeshViewIndicesNV = 5281, + BaryCoordKHR = 5286, + BaryCoordNV = 5286, + BaryCoordNoPerspKHR = 5287, + BaryCoordNoPerspNV = 5287, + FragSizeEXT = 5292, + FragmentSizeNV = 5292, + FragInvocationCountEXT = 5293, + InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, + LaunchIdKHR = 5319, + LaunchIdNV = 5319, + LaunchSizeKHR = 5320, + LaunchSizeNV = 5320, + WorldRayOriginKHR = 5321, + WorldRayOriginNV = 5321, + WorldRayDirectionKHR = 5322, + WorldRayDirectionNV = 5322, + ObjectRayOriginKHR = 5323, + ObjectRayOriginNV = 5323, + ObjectRayDirectionKHR = 5324, + ObjectRayDirectionNV = 5324, + RayTminKHR = 5325, + RayTminNV = 5325, + RayTmaxKHR = 5326, + RayTmaxNV = 5326, + InstanceCustomIndexKHR = 5327, + InstanceCustomIndexNV = 5327, + ObjectToWorldKHR = 5330, + ObjectToWorldNV = 5330, + WorldToObjectKHR = 5331, + WorldToObjectNV = 5331, + HitTNV = 5332, + HitKindKHR = 5333, + HitKindNV = 5333, + CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, + IncomingRayFlagsKHR = 5351, + IncomingRayFlagsNV = 5351, + RayGeometryIndexKHR = 5352, + WarpsPerSMNV = 5374, + SMCountNV = 5375, + WarpIDNV = 5376, + SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, + } + + [AllowDuplicates, CRepr] public enum SelectionControlShift + { + Flatten = 0, + DontFlatten = 1, + } + + [AllowDuplicates, CRepr] public enum SelectionControlMask + { + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, + } + + [AllowDuplicates, CRepr] public enum LoopControlShift + { + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + MinIterations = 4, + MaxIterations = 5, + IterationMultiple = 6, + PeelCount = 7, + PartialCount = 8, + InitiationIntervalINTEL = 16, + MaxConcurrencyINTEL = 17, + DependencyArrayINTEL = 18, + PipelineEnableINTEL = 19, + LoopCoalesceINTEL = 20, + MaxInterleavingINTEL = 21, + SpeculatedIterationsINTEL = 22, + NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, + } + + [AllowDuplicates, CRepr] public enum LoopControlMask + { + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + MinIterations = 0x00000010, + MaxIterations = 0x00000020, + IterationMultiple = 0x00000040, + PeelCount = 0x00000080, + PartialCount = 0x00000100, + InitiationIntervalINTEL = 0x00010000, + MaxConcurrencyINTEL = 0x00020000, + DependencyArrayINTEL = 0x00040000, + PipelineEnableINTEL = 0x00080000, + LoopCoalesceINTEL = 0x00100000, + MaxInterleavingINTEL = 0x00200000, + SpeculatedIterationsINTEL = 0x00400000, + NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, + } + + [AllowDuplicates, CRepr] public enum FunctionControlShift + { + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + OptNoneINTEL = 16, + } + + [AllowDuplicates, CRepr] public enum FunctionControlMask + { + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + OptNoneINTEL = 0x00010000, + } + + [AllowDuplicates, CRepr] public enum MemorySemanticsShift + { + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + OutputMemory = 12, + OutputMemoryKHR = 12, + MakeAvailable = 13, + MakeAvailableKHR = 13, + MakeVisible = 14, + MakeVisibleKHR = 14, + Volatile = 15, + } + + [AllowDuplicates, CRepr] public enum MemorySemanticsMask + { + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + OutputMemory = 0x00001000, + OutputMemoryKHR = 0x00001000, + MakeAvailable = 0x00002000, + MakeAvailableKHR = 0x00002000, + MakeVisible = 0x00004000, + MakeVisibleKHR = 0x00004000, + Volatile = 0x00008000, + } + + [AllowDuplicates, CRepr] public enum MemoryAccessShift + { + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + MakePointerAvailable = 3, + MakePointerAvailableKHR = 3, + MakePointerVisible = 4, + MakePointerVisibleKHR = 4, + NonPrivatePointer = 5, + NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, + } + + [AllowDuplicates, CRepr] public enum MemoryAccessMask + { + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + MakePointerAvailable = 0x00000008, + MakePointerAvailableKHR = 0x00000008, + MakePointerVisible = 0x00000010, + MakePointerVisibleKHR = 0x00000010, + NonPrivatePointer = 0x00000020, + NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, + } + + [AllowDuplicates, CRepr] public enum Scope + { + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + QueueFamily = 5, + QueueFamilyKHR = 5, + ShaderCallKHR = 6, + } + + [AllowDuplicates, CRepr] public enum GroupOperation + { + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + ClusteredReduce = 3, + PartitionedReduceNV = 6, + PartitionedInclusiveScanNV = 7, + PartitionedExclusiveScanNV = 8, + } + + [AllowDuplicates, CRepr] public enum KernelEnqueueFlags + { + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, + } + + [AllowDuplicates, CRepr] public enum KernelProfilingInfoShift + { + CmdExecTime = 0, + } + + [AllowDuplicates, CRepr] public enum KernelProfilingInfoMask + { + MaskNone = 0, + CmdExecTime = 0x00000001, + } + + [AllowDuplicates, CRepr] public enum Capability + { + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + GroupNonUniform = 61, + GroupNonUniformVote = 62, + GroupNonUniformArithmetic = 63, + GroupNonUniformBallot = 64, + GroupNonUniformShuffle = 65, + GroupNonUniformShuffleRelative = 66, + GroupNonUniformClustered = 67, + GroupNonUniformQuad = 68, + ShaderLayer = 69, + ShaderViewportIndex = 70, + UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, + FragmentShadingRateKHR = 4422, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + WorkgroupMemoryExplicitLayoutKHR = 4428, + WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, + WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + StorageBuffer8BitAccess = 4448, + UniformAndStorageBuffer8BitAccess = 4449, + StoragePushConstant8 = 4450, + DenormPreserve = 4464, + DenormFlushToZero = 4465, + SignedZeroInfNanPreserve = 4466, + RoundingModeRTE = 4467, + RoundingModeRTZ = 4468, + RayQueryProvisionalKHR = 4471, + RayQueryKHR = 4472, + RayTraversalPrimitiveCullingKHR = 4478, + RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, + Float16ImageAMD = 5008, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + Int64ImageEXT = 5016, + ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + FragmentFullyCoveredEXT = 5265, + MeshShadingNV = 5266, + ImageFootprintNV = 5282, + MeshShadingEXT = 5283, + FragmentBarycentricKHR = 5284, + FragmentBarycentricNV = 5284, + ComputeDerivativeGroupQuadsNV = 5288, + FragmentDensityEXT = 5291, + ShadingRateNV = 5291, + GroupNonUniformPartitionedNV = 5297, + ShaderNonUniform = 5301, + ShaderNonUniformEXT = 5301, + RuntimeDescriptorArray = 5302, + RuntimeDescriptorArrayEXT = 5302, + InputAttachmentArrayDynamicIndexing = 5303, + InputAttachmentArrayDynamicIndexingEXT = 5303, + UniformTexelBufferArrayDynamicIndexing = 5304, + UniformTexelBufferArrayDynamicIndexingEXT = 5304, + StorageTexelBufferArrayDynamicIndexing = 5305, + StorageTexelBufferArrayDynamicIndexingEXT = 5305, + UniformBufferArrayNonUniformIndexing = 5306, + UniformBufferArrayNonUniformIndexingEXT = 5306, + SampledImageArrayNonUniformIndexing = 5307, + SampledImageArrayNonUniformIndexingEXT = 5307, + StorageBufferArrayNonUniformIndexing = 5308, + StorageBufferArrayNonUniformIndexingEXT = 5308, + StorageImageArrayNonUniformIndexing = 5309, + StorageImageArrayNonUniformIndexingEXT = 5309, + InputAttachmentArrayNonUniformIndexing = 5310, + InputAttachmentArrayNonUniformIndexingEXT = 5310, + UniformTexelBufferArrayNonUniformIndexing = 5311, + UniformTexelBufferArrayNonUniformIndexingEXT = 5311, + StorageTexelBufferArrayNonUniformIndexing = 5312, + StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, + RayTracingNV = 5340, + RayTracingMotionBlurNV = 5341, + VulkanMemoryModel = 5345, + VulkanMemoryModelKHR = 5345, + VulkanMemoryModelDeviceScope = 5346, + VulkanMemoryModelDeviceScopeKHR = 5346, + PhysicalStorageBufferAddresses = 5347, + PhysicalStorageBufferAddressesEXT = 5347, + ComputeDerivativeGroupLinearNV = 5350, + RayTracingProvisionalKHR = 5353, + CooperativeMatrixNV = 5357, + FragmentShaderSampleInterlockEXT = 5363, + FragmentShaderShadingRateInterlockEXT = 5372, + ShaderSMBuiltinsNV = 5373, + FragmentShaderPixelInterlockEXT = 5378, + DemoteToHelperInvocation = 5379, + DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, + BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + SubgroupImageMediaBlockIOINTEL = 5579, + RoundToInfinityINTEL = 5582, + FloatingPointModeINTEL = 5583, + IntegerFunctions2INTEL = 5584, + FunctionPointersINTEL = 5603, + IndirectReferencesINTEL = 5604, + AsmINTEL = 5606, + AtomicFloat32MinMaxEXT = 5612, + AtomicFloat64MinMaxEXT = 5613, + AtomicFloat16MinMaxEXT = 5616, + VectorComputeINTEL = 5617, + VectorAnyINTEL = 5619, + ExpectAssumeKHR = 5629, + SubgroupAvcMotionEstimationINTEL = 5696, + SubgroupAvcMotionEstimationIntraINTEL = 5697, + SubgroupAvcMotionEstimationChromaINTEL = 5698, + VariableLengthArrayINTEL = 5817, + FunctionFloatControlINTEL = 5821, + FPGAMemoryAttributesINTEL = 5824, + FPFastMathModeINTEL = 5837, + ArbitraryPrecisionIntegersINTEL = 5844, + ArbitraryPrecisionFloatingPointINTEL = 5845, + UnstructuredLoopControlsINTEL = 5886, + FPGALoopControlsINTEL = 5888, + KernelAttributesINTEL = 5892, + FPGAKernelAttributesINTEL = 5897, + FPGAMemoryAccessesINTEL = 5898, + FPGAClusterAttributesINTEL = 5904, + LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, + FPGABufferLocationINTEL = 5920, + ArbitraryPrecisionFixedPointINTEL = 5922, + USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, + IOPipesINTEL = 5943, + BlockingPipesINTEL = 5945, + FPGARegINTEL = 5948, + DotProductInputAll = 6016, + DotProductInputAllKHR = 6016, + DotProductInput4x8Bit = 6017, + DotProductInput4x8BitKHR = 6017, + DotProductInput4x8BitPacked = 6018, + DotProductInput4x8BitPackedKHR = 6018, + DotProduct = 6019, + DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, + BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, + AtomicFloat32AddEXT = 6033, + AtomicFloat64AddEXT = 6034, + LongCompositesINTEL = 6089, + OptNoneINTEL = 6094, + AtomicFloat16AddEXT = 6095, + DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, + } + + [AllowDuplicates, CRepr] public enum RayFlagsShift + { + OpaqueKHR = 0, + NoOpaqueKHR = 1, + TerminateOnFirstHitKHR = 2, + SkipClosestHitShaderKHR = 3, + CullBackFacingTrianglesKHR = 4, + CullFrontFacingTrianglesKHR = 5, + CullOpaqueKHR = 6, + CullNoOpaqueKHR = 7, + SkipTrianglesKHR = 8, + SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, + } + + [AllowDuplicates, CRepr] public enum RayFlagsMask + { + MaskNone = 0, + OpaqueKHR = 0x00000001, + NoOpaqueKHR = 0x00000002, + TerminateOnFirstHitKHR = 0x00000004, + SkipClosestHitShaderKHR = 0x00000008, + CullBackFacingTrianglesKHR = 0x00000010, + CullFrontFacingTrianglesKHR = 0x00000020, + CullOpaqueKHR = 0x00000040, + CullNoOpaqueKHR = 0x00000080, + SkipTrianglesKHR = 0x00000100, + SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, + } + + [AllowDuplicates, CRepr] public enum RayQueryIntersection + { + RayQueryCandidateIntersectionKHR = 0, + RayQueryCommittedIntersectionKHR = 1, + } + + [AllowDuplicates, CRepr] public enum RayQueryCommittedIntersectionType + { + RayQueryCommittedIntersectionNoneKHR = 0, + RayQueryCommittedIntersectionTriangleKHR = 1, + RayQueryCommittedIntersectionGeneratedKHR = 2, + } + + [AllowDuplicates, CRepr] public enum RayQueryCandidateIntersectionType + { + RayQueryCandidateIntersectionTriangleKHR = 0, + RayQueryCandidateIntersectionAABBKHR = 1, + } + + [AllowDuplicates, CRepr] public enum FragmentShadingRateShift + { + Vertical2Pixels = 0, + Vertical4Pixels = 1, + Horizontal2Pixels = 2, + Horizontal4Pixels = 3, + } + + [AllowDuplicates, CRepr] public enum FragmentShadingRateMask + { + MaskNone = 0, + Vertical2Pixels = 0x00000001, + Vertical4Pixels = 0x00000002, + Horizontal2Pixels = 0x00000004, + Horizontal4Pixels = 0x00000008, + } + + [AllowDuplicates, CRepr] public enum FPDenormMode + { + Preserve = 0, + FlushToZero = 1, + } + + [AllowDuplicates, CRepr] public enum FPOperationMode + { + IEEE = 0, + ALT = 1, + } + + [AllowDuplicates, CRepr] public enum QuantizationModes + { + TRN = 0, + TRN_ZERO = 1, + RND = 2, + RND_ZERO = 3, + RND_INF = 4, + RND_MIN_INF = 5, + RND_CONV = 6, + RND_CONV_ODD = 7, + } + + [AllowDuplicates, CRepr] public enum OverflowModes + { + WRAP = 0, + SAT = 1, + SAT_ZERO = 2, + SAT_SYM = 3, + } + + [AllowDuplicates, CRepr] public enum PackedVectorFormat + { + PackedVectorFormat4x8Bit = 0, + PackedVectorFormat4x8BitKHR = 0, + } + + [AllowDuplicates, CRepr] public enum CooperativeMatrixOperandsShift + { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + } + + [AllowDuplicates, CRepr] public enum CooperativeMatrixOperandsMask + { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, + } + + [AllowDuplicates, CRepr] public enum CooperativeMatrixLayout + { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + } + + [AllowDuplicates, CRepr] public enum CooperativeMatrixUse + { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + } + + [AllowDuplicates, CRepr] public enum InitializationModeQualifier + { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + } + + [AllowDuplicates, CRepr] public enum HostAccessQualifier + { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + } + + [AllowDuplicates, CRepr] public enum LoadCacheControl + { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + } + + [AllowDuplicates, CRepr] public enum StoreCacheControl + { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + } + + [AllowDuplicates, CRepr] public enum NamedMaximumNumberOfRegisters + { + AutoINTEL = 0, + } + + [AllowDuplicates, CRepr] public enum RawAccessChainOperandsShift + { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + } + + [AllowDuplicates, CRepr] public enum RawAccessChainOperandsMask + { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, + } + + [AllowDuplicates, CRepr] public enum Op + { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpCopyLogical = 400, + OpPtrEqual = 401, + OpPtrNotEqual = 402, + OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, + OpTerminateInvocation = 4416, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, + OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, + OpTraceRayKHR = 4445, + OpExecuteCallableKHR = 4446, + OpConvertUToAccelerationStructureKHR = 4447, + OpIgnoreIntersectionKHR = 4448, + OpTerminateRayKHR = 4449, + OpSDot = 4450, + OpSDotKHR = 4450, + OpUDot = 4451, + OpUDotKHR = 4451, + OpSUDot = 4452, + OpSUDotKHR = 4452, + OpSDotAccSat = 4453, + OpSDotAccSatKHR = 4453, + OpUDotAccSat = 4454, + OpUDotAccSatKHR = 4454, + OpSUDotAccSat = 4455, + OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, + OpTypeRayQueryKHR = 4472, + OpRayQueryInitializeKHR = 4473, + OpRayQueryTerminateKHR = 4474, + OpRayQueryGenerateIntersectionKHR = 4475, + OpRayQueryConfirmIntersectionKHR = 4476, + OpRayQueryProceedKHR = 4477, + OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, + OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, + OpGroupNonUniformPartitionNV = 5296, + OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpReportIntersectionKHR = 5334, + OpReportIntersectionNV = 5334, + OpIgnoreIntersectionNV = 5335, + OpTerminateRayNV = 5336, + OpTraceNV = 5337, + OpTraceMotionNV = 5338, + OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, + OpTypeAccelerationStructureKHR = 5341, + OpTypeAccelerationStructureNV = 5341, + OpExecuteCallableNV = 5344, + OpTypeCooperativeMatrixNV = 5358, + OpCooperativeMatrixLoadNV = 5359, + OpCooperativeMatrixStoreNV = 5360, + OpCooperativeMatrixMulAddNV = 5361, + OpCooperativeMatrixLengthNV = 5362, + OpBeginInvocationInterlockEXT = 5364, + OpEndInvocationInterlockEXT = 5365, + OpDemoteToHelperInvocation = 5380, + OpDemoteToHelperInvocationEXT = 5380, + OpIsHelperInvocationEXT = 5381, + OpConvertUToImageNV = 5391, + OpConvertUToSamplerNV = 5392, + OpConvertImageToUNV = 5393, + OpConvertSamplerToUNV = 5394, + OpConvertUToSampledImageNV = 5395, + OpConvertSampledImageToUNV = 5396, + OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpSubgroupImageMediaBlockReadINTEL = 5580, + OpSubgroupImageMediaBlockWriteINTEL = 5581, + OpUCountLeadingZerosINTEL = 5585, + OpUCountTrailingZerosINTEL = 5586, + OpAbsISubINTEL = 5587, + OpAbsUSubINTEL = 5588, + OpIAddSatINTEL = 5589, + OpUAddSatINTEL = 5590, + OpIAverageINTEL = 5591, + OpUAverageINTEL = 5592, + OpIAverageRoundedINTEL = 5593, + OpUAverageRoundedINTEL = 5594, + OpISubSatINTEL = 5595, + OpUSubSatINTEL = 5596, + OpIMul32x16INTEL = 5597, + OpUMul32x16INTEL = 5598, + OpConstantFunctionPointerINTEL = 5600, + OpFunctionPointerCallINTEL = 5601, + OpAsmTargetINTEL = 5609, + OpAsmINTEL = 5610, + OpAsmCallINTEL = 5611, + OpAtomicFMinEXT = 5614, + OpAtomicFMaxEXT = 5615, + OpAssumeTrueKHR = 5630, + OpExpectKHR = 5631, + OpDecorateString = 5632, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateString = 5633, + OpMemberDecorateStringGOOGLE = 5633, + OpVmeImageINTEL = 5699, + OpTypeVmeImageINTEL = 5700, + OpTypeAvcImePayloadINTEL = 5701, + OpTypeAvcRefPayloadINTEL = 5702, + OpTypeAvcSicPayloadINTEL = 5703, + OpTypeAvcMcePayloadINTEL = 5704, + OpTypeAvcMceResultINTEL = 5705, + OpTypeAvcImeResultINTEL = 5706, + OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, + OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, + OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, + OpTypeAvcImeDualReferenceStreaminINTEL = 5710, + OpTypeAvcRefResultINTEL = 5711, + OpTypeAvcSicResultINTEL = 5712, + OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, + OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, + OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, + OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, + OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, + OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, + OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, + OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, + OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, + OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, + OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, + OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, + OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, + OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, + OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, + OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, + OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, + OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, + OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, + OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, + OpSubgroupAvcMceConvertToImeResultINTEL = 5733, + OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, + OpSubgroupAvcMceConvertToRefResultINTEL = 5735, + OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, + OpSubgroupAvcMceConvertToSicResultINTEL = 5737, + OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, + OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, + OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, + OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, + OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, + OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, + OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, + OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, + OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, + OpSubgroupAvcImeInitializeINTEL = 5747, + OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, + OpSubgroupAvcImeSetDualReferenceINTEL = 5749, + OpSubgroupAvcImeRefWindowSizeINTEL = 5750, + OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, + OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, + OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, + OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, + OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, + OpSubgroupAvcImeSetWeightedSadINTEL = 5756, + OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, + OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, + OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, + OpSubgroupAvcImeConvertToMceResultINTEL = 5765, + OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, + OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, + OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, + OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, + OpSubgroupAvcImeGetBorderReachedINTEL = 5776, + OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, + OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, + OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, + OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, + OpSubgroupAvcFmeInitializeINTEL = 5781, + OpSubgroupAvcBmeInitializeINTEL = 5782, + OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, + OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, + OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, + OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, + OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, + OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, + OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, + OpSubgroupAvcRefConvertToMceResultINTEL = 5790, + OpSubgroupAvcSicInitializeINTEL = 5791, + OpSubgroupAvcSicConfigureSkcINTEL = 5792, + OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, + OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, + OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, + OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, + OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, + OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, + OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, + OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, + OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, + OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, + OpSubgroupAvcSicEvaluateIpeINTEL = 5803, + OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, + OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, + OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, + OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, + OpSubgroupAvcSicConvertToMceResultINTEL = 5808, + OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, + OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, + OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, + OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, + OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, + OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, + OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, + OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, + OpVariableLengthArrayINTEL = 5818, + OpSaveMemoryINTEL = 5819, + OpRestoreMemoryINTEL = 5820, + OpArbitraryFloatSinCosPiINTEL = 5840, + OpArbitraryFloatCastINTEL = 5841, + OpArbitraryFloatCastFromIntINTEL = 5842, + OpArbitraryFloatCastToIntINTEL = 5843, + OpArbitraryFloatAddINTEL = 5846, + OpArbitraryFloatSubINTEL = 5847, + OpArbitraryFloatMulINTEL = 5848, + OpArbitraryFloatDivINTEL = 5849, + OpArbitraryFloatGTINTEL = 5850, + OpArbitraryFloatGEINTEL = 5851, + OpArbitraryFloatLTINTEL = 5852, + OpArbitraryFloatLEINTEL = 5853, + OpArbitraryFloatEQINTEL = 5854, + OpArbitraryFloatRecipINTEL = 5855, + OpArbitraryFloatRSqrtINTEL = 5856, + OpArbitraryFloatCbrtINTEL = 5857, + OpArbitraryFloatHypotINTEL = 5858, + OpArbitraryFloatSqrtINTEL = 5859, + OpArbitraryFloatLogINTEL = 5860, + OpArbitraryFloatLog2INTEL = 5861, + OpArbitraryFloatLog10INTEL = 5862, + OpArbitraryFloatLog1pINTEL = 5863, + OpArbitraryFloatExpINTEL = 5864, + OpArbitraryFloatExp2INTEL = 5865, + OpArbitraryFloatExp10INTEL = 5866, + OpArbitraryFloatExpm1INTEL = 5867, + OpArbitraryFloatSinINTEL = 5868, + OpArbitraryFloatCosINTEL = 5869, + OpArbitraryFloatSinCosINTEL = 5870, + OpArbitraryFloatSinPiINTEL = 5871, + OpArbitraryFloatCosPiINTEL = 5872, + OpArbitraryFloatASinINTEL = 5873, + OpArbitraryFloatASinPiINTEL = 5874, + OpArbitraryFloatACosINTEL = 5875, + OpArbitraryFloatACosPiINTEL = 5876, + OpArbitraryFloatATanINTEL = 5877, + OpArbitraryFloatATanPiINTEL = 5878, + OpArbitraryFloatATan2INTEL = 5879, + OpArbitraryFloatPowINTEL = 5880, + OpArbitraryFloatPowRINTEL = 5881, + OpArbitraryFloatPowNINTEL = 5882, + OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, + OpFixedSqrtINTEL = 5923, + OpFixedRecipINTEL = 5924, + OpFixedRsqrtINTEL = 5925, + OpFixedSinINTEL = 5926, + OpFixedCosINTEL = 5927, + OpFixedSinCosINTEL = 5928, + OpFixedSinPiINTEL = 5929, + OpFixedCosPiINTEL = 5930, + OpFixedSinCosPiINTEL = 5931, + OpFixedLogINTEL = 5932, + OpFixedExpINTEL = 5933, + OpPtrCastToCrossWorkgroupINTEL = 5934, + OpCrossWorkgroupCastToPtrINTEL = 5938, + OpReadPipeBlockingINTEL = 5946, + OpWritePipeBlockingINTEL = 5947, + OpFPGARegINTEL = 5949, + OpRayQueryGetRayTMinKHR = 6016, + OpRayQueryGetRayFlagsKHR = 6017, + OpRayQueryGetIntersectionTKHR = 6018, + OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, + OpRayQueryGetIntersectionInstanceIdKHR = 6020, + OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, + OpRayQueryGetIntersectionGeometryIndexKHR = 6022, + OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, + OpRayQueryGetIntersectionBarycentricsKHR = 6024, + OpRayQueryGetIntersectionFrontFaceKHR = 6025, + OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, + OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, + OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, + OpRayQueryGetWorldRayDirectionKHR = 6029, + OpRayQueryGetWorldRayOriginKHR = 6030, + OpRayQueryGetIntersectionObjectToWorldKHR = 6031, + OpRayQueryGetIntersectionWorldToObjectKHR = 6032, + OpAtomicFAddEXT = 6035, + OpTypeBufferSurfaceINTEL = 6086, + OpTypeStructContinuedINTEL = 6090, + OpConstantCompositeContinuedINTEL = 6091, + OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, + } + } +} + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json index b252bfe2d..980b5dc3a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json @@ -1,6 +1,6 @@ { "copyright" : [ - "Copyright (c) 2014-2020 The Khronos Group Inc.", + "Copyright (c) 2014-2024 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -137,7 +137,8 @@ { "opname" : "OpNop", "class" : "Miscellaneous", - "opcode" : 0 + "opcode" : 0, + "version" : "1.0" }, { "opname" : "OpUndef", @@ -146,7 +147,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version" : "1.0" }, { "opname" : "OpSourceContinued", @@ -154,7 +156,8 @@ "opcode" : 2, "operands" : [ { "kind" : "LiteralString", "name" : "'Continued Source'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSource", @@ -165,7 +168,8 @@ { "kind" : "LiteralInteger", "name" : "'Version'" }, { "kind" : "IdRef", "quantifier" : "?", "name" : "'File'" }, { "kind" : "LiteralString", "quantifier" : "?", "name" : "'Source'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSourceExtension", @@ -173,7 +177,8 @@ "opcode" : 4, "operands" : [ { "kind" : "LiteralString", "name" : "'Extension'" } - ] + ], + "version": "1.0" }, { "opname" : "OpName", @@ -182,7 +187,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Target'" }, { "kind" : "LiteralString", "name" : "'Name'" } - ] + ], + "version": "1.0" }, { "opname" : "OpMemberName", @@ -192,7 +198,8 @@ { "kind" : "IdRef", "name" : "'Type'" }, { "kind" : "LiteralInteger", "name" : "'Member'" }, { "kind" : "LiteralString", "name" : "'Name'" } - ] + ], + "version": "1.0" }, { "opname" : "OpString", @@ -201,7 +208,8 @@ "operands" : [ { "kind" : "IdResult" }, { "kind" : "LiteralString", "name" : "'String'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLine", @@ -211,7 +219,8 @@ { "kind" : "IdRef", "name" : "'File'" }, { "kind" : "LiteralInteger", "name" : "'Line'" }, { "kind" : "LiteralInteger", "name" : "'Column'" } - ] + ], + "version": "1.0" }, { "opname" : "OpExtension", @@ -219,7 +228,8 @@ "opcode" : 10, "operands" : [ { "kind" : "LiteralString", "name" : "'Name'" } - ] + ], + "version": "1.0" }, { "opname" : "OpExtInstImport", @@ -228,7 +238,8 @@ "operands" : [ { "kind" : "IdResult" }, { "kind" : "LiteralString", "name" : "'Name'" } - ] + ], + "version": "1.0" }, { "opname" : "OpExtInst", @@ -240,7 +251,8 @@ { "kind" : "IdRef", "name" : "'Set'" }, { "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." } - ] + ], + "version": "1.0" }, { "opname" : "OpMemoryModel", @@ -249,7 +261,8 @@ "operands" : [ { "kind" : "AddressingModel" }, { "kind" : "MemoryModel" } - ] + ], + "version": "1.0" }, { "opname" : "OpEntryPoint", @@ -260,7 +273,8 @@ { "kind" : "IdRef", "name" : "'Entry Point'" }, { "kind" : "LiteralString", "name" : "'Name'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Interface'" } - ] + ], + "version": "1.0" }, { "opname" : "OpExecutionMode", @@ -269,7 +283,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Entry Point'" }, { "kind" : "ExecutionMode", "name" : "'Mode'" } - ] + ], + "version": "1.0" }, { "opname" : "OpCapability", @@ -277,7 +292,8 @@ "opcode" : 17, "operands" : [ { "kind" : "Capability", "name" : "'Capability'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeVoid", @@ -285,7 +301,8 @@ "opcode" : 19, "operands" : [ { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeBool", @@ -293,7 +310,8 @@ "opcode" : 20, "operands" : [ { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeInt", @@ -303,7 +321,8 @@ { "kind" : "IdResult" }, { "kind" : "LiteralInteger", "name" : "'Width'" }, { "kind" : "LiteralInteger", "name" : "'Signedness'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeFloat", @@ -312,7 +331,8 @@ "operands" : [ { "kind" : "IdResult" }, { "kind" : "LiteralInteger", "name" : "'Width'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeVector", @@ -322,7 +342,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Component Type'" }, { "kind" : "LiteralInteger", "name" : "'Component Count'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeMatrix", @@ -333,7 +354,8 @@ { "kind" : "IdRef", "name" : "'Column Type'" }, { "kind" : "LiteralInteger", "name" : "'Column Count'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpTypeImage", @@ -349,7 +371,8 @@ { "kind" : "LiteralInteger", "name" : "'Sampled'" }, { "kind" : "ImageFormat" }, { "kind" : "AccessQualifier", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeSampler", @@ -357,7 +380,8 @@ "opcode" : 26, "operands" : [ { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeSampledImage", @@ -366,7 +390,8 @@ "operands" : [ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image Type'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeArray", @@ -376,7 +401,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Element Type'" }, { "kind" : "IdRef", "name" : "'Length'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeRuntimeArray", @@ -386,7 +412,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Element Type'" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpTypeStruct", @@ -395,7 +422,8 @@ "operands" : [ { "kind" : "IdResult" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeOpaque", @@ -405,7 +433,8 @@ { "kind" : "IdResult" }, { "kind" : "LiteralString", "name" : "The name of the opaque type." } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpTypePointer", @@ -415,7 +444,8 @@ { "kind" : "IdResult" }, { "kind" : "StorageClass" }, { "kind" : "IdRef", "name" : "'Type'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeFunction", @@ -425,7 +455,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Return Type'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..." } - ] + ], + "version": "1.0" }, { "opname" : "OpTypeEvent", @@ -434,7 +465,8 @@ "operands" : [ { "kind" : "IdResult" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpTypeDeviceEvent", @@ -443,7 +475,8 @@ "operands" : [ { "kind" : "IdResult" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpTypeReserveId", @@ -452,7 +485,8 @@ "operands" : [ { "kind" : "IdResult" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpTypeQueue", @@ -461,7 +495,8 @@ "operands" : [ { "kind" : "IdResult" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpTypePipe", @@ -471,7 +506,8 @@ { "kind" : "IdResult" }, { "kind" : "AccessQualifier", "name" : "'Qualifier'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpTypeForwardPointer", @@ -484,7 +520,8 @@ "capabilities" : [ "Addresses", "PhysicalStorageBufferAddresses" - ] + ], + "version": "1.0" }, { "opname" : "OpConstantTrue", @@ -493,7 +530,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpConstantFalse", @@ -502,7 +540,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpConstant", @@ -512,7 +551,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConstantComposite", @@ -522,7 +562,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConstantSampler", @@ -535,7 +576,8 @@ { "kind" : "LiteralInteger", "name" : "'Param'" }, { "kind" : "SamplerFilterMode" } ], - "capabilities" : [ "LiteralSampler" ] + "capabilities" : [ "LiteralSampler" ], + "version": "1.0" }, { "opname" : "OpConstantNull", @@ -544,7 +586,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpSpecConstantTrue", @@ -553,7 +596,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpSpecConstantFalse", @@ -562,7 +606,8 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpSpecConstant", @@ -572,7 +617,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSpecConstantComposite", @@ -582,7 +628,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSpecConstantOp", @@ -592,7 +639,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "LiteralSpecConstantOpInteger", "name" : "'Opcode'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFunction", @@ -603,7 +651,8 @@ { "kind" : "IdResult" }, { "kind" : "FunctionControl" }, { "kind" : "IdRef", "name" : "'Function Type'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFunctionParameter", @@ -612,12 +661,14 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpFunctionEnd", "class" : "Function", - "opcode" : 56 + "opcode" : 56, + "version" : "1.0" }, { "opname" : "OpFunctionCall", @@ -628,7 +679,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Function'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Argument 0', +\n'Argument 1', +\n..." } - ] + ], + "version": "1.0" }, { "opname" : "OpVariable", @@ -639,7 +691,8 @@ { "kind" : "IdResult" }, { "kind" : "StorageClass" }, { "kind" : "IdRef", "quantifier" : "?", "name" : "'Initializer'" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageTexelPointer", @@ -651,7 +704,8 @@ { "kind" : "IdRef", "name" : "'Image'" }, { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "IdRef", "name" : "'Sample'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLoad", @@ -662,7 +716,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "MemoryAccess", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpStore", @@ -672,7 +727,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "IdRef", "name" : "'Object'" }, { "kind" : "MemoryAccess", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpCopyMemory", @@ -683,7 +739,8 @@ { "kind" : "IdRef", "name" : "'Source'" }, { "kind" : "MemoryAccess", "quantifier" : "?" }, { "kind" : "MemoryAccess", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpCopyMemorySized", @@ -696,7 +753,8 @@ { "kind" : "MemoryAccess", "quantifier" : "?" }, { "kind" : "MemoryAccess", "quantifier" : "?" } ], - "capabilities" : [ "Addresses" ] + "capabilities" : [ "Addresses" ], + "version": "1.0" }, { "opname" : "OpAccessChain", @@ -707,7 +765,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } - ] + ], + "version": "1.0" }, { "opname" : "OpInBoundsAccessChain", @@ -718,7 +777,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } - ] + ], + "version": "1.0" }, { "opname" : "OpPtrAccessChain", @@ -736,7 +796,8 @@ "VariablePointers", "VariablePointersStorageBuffer", "PhysicalStorageBufferAddresses" - ] + ], + "version": "1.0" }, { "opname" : "OpArrayLength", @@ -748,7 +809,8 @@ { "kind" : "IdRef", "name" : "'Structure'" }, { "kind" : "LiteralInteger", "name" : "'Array member'" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpGenericPtrMemSemantics", @@ -759,7 +821,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Pointer'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpInBoundsPtrAccessChain", @@ -772,7 +835,8 @@ { "kind" : "IdRef", "name" : "'Element'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } ], - "capabilities" : [ "Addresses" ] + "capabilities" : [ "Addresses" ], + "version": "1.0" }, { "opname" : "OpDecorate", @@ -781,7 +845,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Target'" }, { "kind" : "Decoration" } - ] + ], + "version": "1.0" }, { "opname" : "OpMemberDecorate", @@ -791,7 +856,8 @@ { "kind" : "IdRef", "name" : "'Structure Type'" }, { "kind" : "LiteralInteger", "name" : "'Member'" }, { "kind" : "Decoration" } - ] + ], + "version": "1.0" }, { "opname" : "OpDecorationGroup", @@ -799,7 +865,8 @@ "opcode" : 73, "operands" : [ { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpGroupDecorate", @@ -808,7 +875,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Decoration Group'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Targets'" } - ] + ], + "version": "1.0" }, { "opname" : "OpGroupMemberDecorate", @@ -817,7 +885,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Decoration Group'" }, { "kind" : "PairIdRefLiteralInteger", "quantifier" : "*", "name" : "'Targets'" } - ] + ], + "version": "1.0" }, { "opname" : "OpVectorExtractDynamic", @@ -828,7 +897,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Vector'" }, { "kind" : "IdRef", "name" : "'Index'" } - ] + ], + "version": "1.0" }, { "opname" : "OpVectorInsertDynamic", @@ -840,7 +910,8 @@ { "kind" : "IdRef", "name" : "'Vector'" }, { "kind" : "IdRef", "name" : "'Component'" }, { "kind" : "IdRef", "name" : "'Index'" } - ] + ], + "version": "1.0" }, { "opname" : "OpVectorShuffle", @@ -852,7 +923,8 @@ { "kind" : "IdRef", "name" : "'Vector 1'" }, { "kind" : "IdRef", "name" : "'Vector 2'" }, { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Components'" } - ] + ], + "version": "1.0" }, { "opname" : "OpCompositeConstruct", @@ -862,7 +934,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } - ] + ], + "version": "1.0" }, { "opname" : "OpCompositeExtract", @@ -873,7 +946,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Composite'" }, { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } - ] + ], + "version": "1.0" }, { "opname" : "OpCompositeInsert", @@ -885,7 +959,8 @@ { "kind" : "IdRef", "name" : "'Object'" }, { "kind" : "IdRef", "name" : "'Composite'" }, { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } - ] + ], + "version": "1.0" }, { "opname" : "OpCopyObject", @@ -895,7 +970,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpTranspose", @@ -906,7 +982,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Matrix'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpSampledImage", @@ -917,7 +994,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" }, { "kind" : "IdRef", "name" : "'Sampler'" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageSampleImplicitLod", @@ -930,7 +1008,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleExplicitLod", @@ -942,7 +1021,8 @@ { "kind" : "IdRef", "name" : "'Sampled Image'" }, { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageSampleDrefImplicitLod", @@ -956,7 +1036,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleDrefExplicitLod", @@ -970,7 +1051,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleProjImplicitLod", @@ -983,7 +1065,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleProjExplicitLod", @@ -996,7 +1079,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleProjDrefImplicitLod", @@ -1010,7 +1094,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageSampleProjDrefExplicitLod", @@ -1024,7 +1109,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageFetch", @@ -1036,7 +1122,8 @@ { "kind" : "IdRef", "name" : "'Image'" }, { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageGather", @@ -1050,7 +1137,8 @@ { "kind" : "IdRef", "name" : "'Component'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageDrefGather", @@ -1064,7 +1152,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpImageRead", @@ -1076,7 +1165,8 @@ { "kind" : "IdRef", "name" : "'Image'" }, { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageWrite", @@ -1087,7 +1177,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "IdRef", "name" : "'Texel'" }, { "kind" : "ImageOperands", "quantifier" : "?" } - ] + ], + "version": "1.0" }, { "opname" : "OpImage", @@ -1097,7 +1188,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Sampled Image'" } - ] + ], + "version": "1.0" }, { "opname" : "OpImageQueryFormat", @@ -1108,7 +1200,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpImageQueryOrder", @@ -1119,7 +1212,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpImageQuerySizeLod", @@ -1131,7 +1225,8 @@ { "kind" : "IdRef", "name" : "'Image'" }, { "kind" : "IdRef", "name" : "'Level of Detail'" } ], - "capabilities" : [ "Kernel", "ImageQuery" ] + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" }, { "opname" : "OpImageQuerySize", @@ -1142,7 +1237,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" } ], - "capabilities" : [ "Kernel", "ImageQuery" ] + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" }, { "opname" : "OpImageQueryLod", @@ -1154,7 +1250,8 @@ { "kind" : "IdRef", "name" : "'Sampled Image'" }, { "kind" : "IdRef", "name" : "'Coordinate'" } ], - "capabilities" : [ "ImageQuery" ] + "capabilities" : [ "ImageQuery" ], + "version": "1.0" }, { "opname" : "OpImageQueryLevels", @@ -1165,7 +1262,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" } ], - "capabilities" : [ "Kernel", "ImageQuery" ] + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" }, { "opname" : "OpImageQuerySamples", @@ -1176,7 +1274,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Image'" } ], - "capabilities" : [ "Kernel", "ImageQuery" ] + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" }, { "opname" : "OpConvertFToU", @@ -1186,7 +1285,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Float Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConvertFToS", @@ -1196,7 +1296,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Float Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConvertSToF", @@ -1206,7 +1307,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Signed Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConvertUToF", @@ -1216,7 +1318,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Unsigned Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUConvert", @@ -1226,7 +1329,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Unsigned Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSConvert", @@ -1236,7 +1340,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Signed Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFConvert", @@ -1246,7 +1351,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Float Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpQuantizeToF16", @@ -1256,7 +1362,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpConvertPtrToU", @@ -1270,7 +1377,8 @@ "capabilities" : [ "Addresses", "PhysicalStorageBufferAddresses" - ] + ], + "version": "1.0" }, { "opname" : "OpSatConvertSToU", @@ -1281,7 +1389,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Signed Value'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpSatConvertUToS", @@ -1292,7 +1401,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Unsigned Value'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpConvertUToPtr", @@ -1306,7 +1416,8 @@ "capabilities" : [ "Addresses", "PhysicalStorageBufferAddresses" - ] + ], + "version": "1.0" }, { "opname" : "OpPtrCastToGeneric", @@ -1317,7 +1428,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Pointer'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpGenericCastToPtr", @@ -1328,7 +1440,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Pointer'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpGenericCastToPtrExplicit", @@ -1340,7 +1453,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "StorageClass", "name" : "'Storage'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpBitcast", @@ -1350,7 +1464,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSNegate", @@ -1360,7 +1475,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFNegate", @@ -1370,7 +1486,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIAdd", @@ -1381,7 +1498,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFAdd", @@ -1392,7 +1510,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpISub", @@ -1403,7 +1522,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFSub", @@ -1414,7 +1534,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIMul", @@ -1425,7 +1546,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFMul", @@ -1436,7 +1558,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUDiv", @@ -1447,7 +1570,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSDiv", @@ -1458,7 +1582,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFDiv", @@ -1469,7 +1594,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUMod", @@ -1480,7 +1606,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSRem", @@ -1491,7 +1618,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSMod", @@ -1502,7 +1630,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFRem", @@ -1513,7 +1642,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFMod", @@ -1524,7 +1654,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpVectorTimesScalar", @@ -1535,7 +1666,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Vector'" }, { "kind" : "IdRef", "name" : "'Scalar'" } - ] + ], + "version": "1.0" }, { "opname" : "OpMatrixTimesScalar", @@ -1547,7 +1679,8 @@ { "kind" : "IdRef", "name" : "'Matrix'" }, { "kind" : "IdRef", "name" : "'Scalar'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpVectorTimesMatrix", @@ -1559,7 +1692,8 @@ { "kind" : "IdRef", "name" : "'Vector'" }, { "kind" : "IdRef", "name" : "'Matrix'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpMatrixTimesVector", @@ -1571,7 +1705,8 @@ { "kind" : "IdRef", "name" : "'Matrix'" }, { "kind" : "IdRef", "name" : "'Vector'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpMatrixTimesMatrix", @@ -1583,7 +1718,8 @@ { "kind" : "IdRef", "name" : "'LeftMatrix'" }, { "kind" : "IdRef", "name" : "'RightMatrix'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpOuterProduct", @@ -1595,7 +1731,8 @@ { "kind" : "IdRef", "name" : "'Vector 1'" }, { "kind" : "IdRef", "name" : "'Vector 2'" } ], - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "opname" : "OpDot", @@ -1606,7 +1743,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Vector 1'" }, { "kind" : "IdRef", "name" : "'Vector 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIAddCarry", @@ -1617,7 +1755,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpISubBorrow", @@ -1628,7 +1767,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUMulExtended", @@ -1639,7 +1779,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSMulExtended", @@ -1650,7 +1791,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAny", @@ -1660,7 +1802,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Vector'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAll", @@ -1670,7 +1813,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Vector'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIsNan", @@ -1680,7 +1824,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'x'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIsInf", @@ -1690,7 +1835,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'x'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIsFinite", @@ -1701,7 +1847,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'x'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpIsNormal", @@ -1712,7 +1859,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'x'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpSignBitSet", @@ -1723,7 +1871,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'x'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpLessOrGreater", @@ -1736,6 +1885,7 @@ { "kind" : "IdRef", "name" : "'y'" } ], "capabilities" : [ "Kernel" ], + "version" : "1.0", "lastVersion" : "1.5" }, { @@ -1748,7 +1898,8 @@ { "kind" : "IdRef", "name" : "'x'" }, { "kind" : "IdRef", "name" : "'y'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpUnordered", @@ -1760,7 +1911,8 @@ { "kind" : "IdRef", "name" : "'x'" }, { "kind" : "IdRef", "name" : "'y'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpLogicalEqual", @@ -1771,7 +1923,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLogicalNotEqual", @@ -1782,7 +1935,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLogicalOr", @@ -1793,7 +1947,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLogicalAnd", @@ -1804,7 +1959,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version" : "1.0" }, { "opname" : "OpLogicalNot", @@ -1814,7 +1970,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSelect", @@ -1826,7 +1983,8 @@ { "kind" : "IdRef", "name" : "'Condition'" }, { "kind" : "IdRef", "name" : "'Object 1'" }, { "kind" : "IdRef", "name" : "'Object 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpIEqual", @@ -1837,7 +1995,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpINotEqual", @@ -1848,7 +2007,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUGreaterThan", @@ -1859,7 +2019,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSGreaterThan", @@ -1870,7 +2031,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUGreaterThanEqual", @@ -1881,7 +2043,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSGreaterThanEqual", @@ -1892,7 +2055,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpULessThan", @@ -1903,7 +2067,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSLessThan", @@ -1914,7 +2079,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpULessThanEqual", @@ -1925,7 +2091,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSLessThanEqual", @@ -1936,7 +2103,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdEqual", @@ -1947,7 +2115,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordEqual", @@ -1958,7 +2127,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdNotEqual", @@ -1969,7 +2139,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordNotEqual", @@ -1980,7 +2151,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdLessThan", @@ -1991,7 +2163,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordLessThan", @@ -2002,7 +2175,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdGreaterThan", @@ -2013,7 +2187,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordGreaterThan", @@ -2024,7 +2199,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdLessThanEqual", @@ -2035,7 +2211,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordLessThanEqual", @@ -2046,7 +2223,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFOrdGreaterThanEqual", @@ -2057,7 +2235,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpFUnordGreaterThanEqual", @@ -2068,7 +2247,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpShiftRightLogical", @@ -2079,7 +2259,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" }, { "kind" : "IdRef", "name" : "'Shift'" } - ] + ], + "version": "1.0" }, { "opname" : "OpShiftRightArithmetic", @@ -2090,7 +2271,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" }, { "kind" : "IdRef", "name" : "'Shift'" } - ] + ], + "version": "1.0" }, { "opname" : "OpShiftLeftLogical", @@ -2101,7 +2283,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" }, { "kind" : "IdRef", "name" : "'Shift'" } - ] + ], + "version": "1.0" }, { "opname" : "OpBitwiseOr", @@ -2112,7 +2295,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpBitwiseXor", @@ -2123,7 +2307,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpBitwiseAnd", @@ -2134,7 +2319,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand 1'" }, { "kind" : "IdRef", "name" : "'Operand 2'" } - ] + ], + "version": "1.0" }, { "opname" : "OpNot", @@ -2144,7 +2330,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Operand'" } - ] + ], + "version": "1.0" }, { "opname" : "OpBitFieldInsert", @@ -2158,7 +2345,8 @@ { "kind" : "IdRef", "name" : "'Offset'" }, { "kind" : "IdRef", "name" : "'Count'" } ], - "capabilities" : [ "Shader", "BitInstructions" ] + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" }, { "opname" : "OpBitFieldSExtract", @@ -2171,7 +2359,8 @@ { "kind" : "IdRef", "name" : "'Offset'" }, { "kind" : "IdRef", "name" : "'Count'" } ], - "capabilities" : [ "Shader", "BitInstructions" ] + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" }, { "opname" : "OpBitFieldUExtract", @@ -2184,7 +2373,8 @@ { "kind" : "IdRef", "name" : "'Offset'" }, { "kind" : "IdRef", "name" : "'Count'" } ], - "capabilities" : [ "Shader", "BitInstructions" ] + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" }, { "opname" : "OpBitReverse", @@ -2195,7 +2385,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" } ], - "capabilities" : [ "Shader", "BitInstructions" ] + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" }, { "opname" : "OpBitCount", @@ -2205,7 +2396,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Base'" } - ] + ], + "version": "1.0" }, { "opname" : "OpDPdx", @@ -2216,7 +2408,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpDPdy", @@ -2227,7 +2420,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpFwidth", @@ -2238,7 +2432,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpDPdxFine", @@ -2249,7 +2444,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpDPdyFine", @@ -2260,7 +2456,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpFwidthFine", @@ -2271,7 +2468,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpDPdxCoarse", @@ -2282,7 +2480,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpDPdyCoarse", @@ -2293,7 +2492,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpFwidthCoarse", @@ -2304,19 +2504,22 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'P'" } ], - "capabilities" : [ "DerivativeControl" ] + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" }, { "opname" : "OpEmitVertex", "class" : "Primitive", "opcode" : 218, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "opname" : "OpEndPrimitive", "class" : "Primitive", "opcode" : 219, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "opname" : "OpEmitStreamVertex", @@ -2325,7 +2528,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Stream'" } ], - "capabilities" : [ "GeometryStreams" ] + "capabilities" : [ "GeometryStreams" ], + "version": "1.0" }, { "opname" : "OpEndStreamPrimitive", @@ -2334,7 +2538,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Stream'" } ], - "capabilities" : [ "GeometryStreams" ] + "capabilities" : [ "GeometryStreams" ], + "version": "1.0" }, { "opname" : "OpControlBarrier", @@ -2344,7 +2549,8 @@ { "kind" : "IdScope", "name" : "'Execution'" }, { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } - ] + ], + "version": "1.0" }, { "opname" : "OpMemoryBarrier", @@ -2353,7 +2559,8 @@ "operands" : [ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicLoad", @@ -2365,7 +2572,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicStore", @@ -2376,7 +2584,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicExchange", @@ -2389,7 +2598,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicCompareExchange", @@ -2404,7 +2614,8 @@ { "kind" : "IdMemorySemantics", "name" : "'Unequal'" }, { "kind" : "IdRef", "name" : "'Value'" }, { "kind" : "IdRef", "name" : "'Comparator'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicCompareExchangeWeak", @@ -2421,6 +2632,7 @@ { "kind" : "IdRef", "name" : "'Comparator'" } ], "capabilities" : [ "Kernel" ], + "version" : "1.0", "lastVersion" : "1.3" }, { @@ -2433,7 +2645,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicIDecrement", @@ -2445,7 +2658,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicIAdd", @@ -2458,7 +2672,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicISub", @@ -2471,7 +2686,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicSMin", @@ -2484,7 +2700,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicUMin", @@ -2497,7 +2714,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicSMax", @@ -2510,7 +2728,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicUMax", @@ -2523,7 +2742,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicAnd", @@ -2536,7 +2756,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicOr", @@ -2549,7 +2770,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpAtomicXor", @@ -2562,7 +2784,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpPhi", @@ -2572,7 +2795,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, { "kind" : "PairIdRefIdRef", "quantifier" : "*", "name" : "'Variable, Parent, ...'" } - ] + ], + "version": "1.0" }, { "opname" : "OpLoopMerge", @@ -2582,7 +2806,8 @@ { "kind" : "IdRef", "name" : "'Merge Block'" }, { "kind" : "IdRef", "name" : "'Continue Target'" }, { "kind" : "LoopControl" } - ] + ], + "version": "1.0" }, { "opname" : "OpSelectionMerge", @@ -2591,7 +2816,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Merge Block'" }, { "kind" : "SelectionControl" } - ] + ], + "version": "1.0" }, { "opname" : "OpLabel", @@ -2599,7 +2825,8 @@ "opcode" : 248, "operands" : [ { "kind" : "IdResult" } - ] + ], + "version": "1.0" }, { "opname" : "OpBranch", @@ -2607,7 +2834,8 @@ "opcode" : 249, "operands" : [ { "kind" : "IdRef", "name" : "'Target Label'" } - ] + ], + "version": "1.0" }, { "opname" : "OpBranchConditional", @@ -2618,7 +2846,8 @@ { "kind" : "IdRef", "name" : "'True Label'" }, { "kind" : "IdRef", "name" : "'False Label'" }, { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Branch weights'" } - ] + ], + "version": "1.0" }, { "opname" : "OpSwitch", @@ -2628,18 +2857,21 @@ { "kind" : "IdRef", "name" : "'Selector'" }, { "kind" : "IdRef", "name" : "'Default'" }, { "kind" : "PairLiteralIntegerIdRef", "quantifier" : "*", "name" : "'Target'" } - ] + ], + "version": "1.0" }, { "opname" : "OpKill", "class" : "Control-Flow", "opcode" : 252, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "opname" : "OpReturn", "class" : "Control-Flow", - "opcode" : 253 + "opcode" : 253, + "version" : "1.0" }, { "opname" : "OpReturnValue", @@ -2647,12 +2879,14 @@ "opcode" : 254, "operands" : [ { "kind" : "IdRef", "name" : "'Value'" } - ] + ], + "version": "1.0" }, { "opname" : "OpUnreachable", "class" : "Control-Flow", - "opcode" : 255 + "opcode" : 255, + "version" : "1.0" }, { "opname" : "OpLifetimeStart", @@ -2662,7 +2896,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "LiteralInteger", "name" : "'Size'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpLifetimeStop", @@ -2672,7 +2907,8 @@ { "kind" : "IdRef", "name" : "'Pointer'" }, { "kind" : "LiteralInteger", "name" : "'Size'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpGroupAsyncCopy", @@ -2688,7 +2924,8 @@ { "kind" : "IdRef", "name" : "'Stride'" }, { "kind" : "IdRef", "name" : "'Event'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpGroupWaitEvents", @@ -2699,7 +2936,8 @@ { "kind" : "IdRef", "name" : "'Num Events'" }, { "kind" : "IdRef", "name" : "'Events List'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpGroupAll", @@ -2711,7 +2949,8 @@ { "kind" : "IdScope", "name" : "'Execution'" }, { "kind" : "IdRef", "name" : "'Predicate'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupAny", @@ -2723,7 +2962,8 @@ { "kind" : "IdScope", "name" : "'Execution'" }, { "kind" : "IdRef", "name" : "'Predicate'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupBroadcast", @@ -2736,7 +2976,8 @@ { "kind" : "IdRef", "name" : "'Value'" }, { "kind" : "IdRef", "name" : "'LocalId'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupIAdd", @@ -2749,7 +2990,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupFAdd", @@ -2762,7 +3004,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupFMin", @@ -2775,7 +3018,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupUMin", @@ -2788,7 +3032,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupSMin", @@ -2801,7 +3046,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupFMax", @@ -2814,7 +3060,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupUMax", @@ -2827,7 +3074,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpGroupSMax", @@ -2840,7 +3088,8 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ] + "capabilities" : [ "Groups" ], + "version": "1.0" }, { "opname" : "OpReadPipe", @@ -2854,7 +3103,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpWritePipe", @@ -2868,7 +3118,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpReservedReadPipe", @@ -2884,7 +3135,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpReservedWritePipe", @@ -2900,7 +3152,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpReserveReadPipePackets", @@ -2914,7 +3167,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpReserveWritePipePackets", @@ -2928,7 +3182,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpCommitReadPipe", @@ -2940,7 +3195,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpCommitWritePipe", @@ -2952,7 +3208,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpIsValidReserveId", @@ -2963,7 +3220,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Reserve Id'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGetNumPipePackets", @@ -2976,7 +3234,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGetMaxPipePackets", @@ -2989,7 +3248,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGroupReserveReadPipePackets", @@ -3004,7 +3264,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGroupReserveWritePipePackets", @@ -3019,7 +3280,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGroupCommitReadPipe", @@ -3032,7 +3294,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpGroupCommitWritePipe", @@ -3045,7 +3308,8 @@ { "kind" : "IdRef", "name" : "'Packet Size'" }, { "kind" : "IdRef", "name" : "'Packet Alignment'" } ], - "capabilities" : [ "Pipes" ] + "capabilities" : [ "Pipes" ], + "version": "1.0" }, { "opname" : "OpEnqueueMarker", @@ -3059,7 +3323,8 @@ { "kind" : "IdRef", "name" : "'Wait Events'" }, { "kind" : "IdRef", "name" : "'Ret Event'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpEnqueueKernel", @@ -3080,7 +3345,8 @@ { "kind" : "IdRef", "name" : "'Param Align'" }, { "kind" : "IdRef", "quantifier" : "*", "name" : "'Local Size'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpGetKernelNDrangeSubGroupCount", @@ -3095,7 +3361,8 @@ { "kind" : "IdRef", "name" : "'Param Size'" }, { "kind" : "IdRef", "name" : "'Param Align'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpGetKernelNDrangeMaxSubGroupSize", @@ -3110,7 +3377,8 @@ { "kind" : "IdRef", "name" : "'Param Size'" }, { "kind" : "IdRef", "name" : "'Param Align'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpGetKernelWorkGroupSize", @@ -3124,7 +3392,8 @@ { "kind" : "IdRef", "name" : "'Param Size'" }, { "kind" : "IdRef", "name" : "'Param Align'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpGetKernelPreferredWorkGroupSizeMultiple", @@ -3138,7 +3407,8 @@ { "kind" : "IdRef", "name" : "'Param Size'" }, { "kind" : "IdRef", "name" : "'Param Align'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpRetainEvent", @@ -3147,7 +3417,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Event'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpReleaseEvent", @@ -3156,7 +3427,8 @@ "operands" : [ { "kind" : "IdRef", "name" : "'Event'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpCreateUserEvent", @@ -3166,7 +3438,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpIsValidEvent", @@ -3177,7 +3450,8 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Event'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpSetUserEventStatus", @@ -3187,7 +3461,8 @@ { "kind" : "IdRef", "name" : "'Event'" }, { "kind" : "IdRef", "name" : "'Status'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpCaptureEventProfilingInfo", @@ -3198,7 +3473,8 @@ { "kind" : "IdRef", "name" : "'Profiling Info'" }, { "kind" : "IdRef", "name" : "'Value'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpGetDefaultQueue", @@ -3208,7 +3484,8 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpBuildNDRange", @@ -3221,7 +3498,8 @@ { "kind" : "IdRef", "name" : "'LocalWorkSize'" }, { "kind" : "IdRef", "name" : "'GlobalWorkOffset'" } ], - "capabilities" : [ "DeviceEnqueue" ] + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" }, { "opname" : "OpImageSparseSampleImplicitLod", @@ -3234,7 +3512,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseSampleExplicitLod", @@ -3247,7 +3526,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseSampleDrefImplicitLod", @@ -3261,7 +3541,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseSampleDrefExplicitLod", @@ -3275,7 +3556,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseSampleProjImplicitLod", @@ -3346,7 +3628,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseGather", @@ -3360,7 +3643,8 @@ { "kind" : "IdRef", "name" : "'Component'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseDrefGather", @@ -3374,7 +3658,8 @@ { "kind" : "IdRef", "name" : "'D~ref~'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpImageSparseTexelsResident", @@ -3385,12 +3670,14 @@ { "kind" : "IdResult" }, { "kind" : "IdRef", "name" : "'Resident Code'" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpNoLine", "class" : "Debug", - "opcode" : 317 + "opcode" : 317, + "version" : "1.0" }, { "opname" : "OpAtomicFlagTestAndSet", @@ -3403,7 +3690,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpAtomicFlagClear", @@ -3414,7 +3702,8 @@ { "kind" : "IdScope", "name" : "'Memory'" }, { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } ], - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "opname" : "OpImageSparseRead", @@ -3427,7 +3716,8 @@ { "kind" : "IdRef", "name" : "'Coordinate'" }, { "kind" : "ImageOperands", "quantifier" : "?" } ], - "capabilities" : [ "SparseResidency" ] + "capabilities" : [ "SparseResidency" ], + "version": "1.0" }, { "opname" : "OpSizeOf", @@ -4102,6 +4392,43 @@ "capabilities" : [ "Addresses", "VariablePointers", "VariablePointersStorageBuffer" ], "version" : "1.4" }, + { + "opname" : "OpColorAttachmentReadEXT", + "class" : "Image", + "opcode" : 4160, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Attachment'" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities": [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "opname" : "OpDepthAttachmentReadEXT", + "class" : "Image", + "opcode" : 4161, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities" : [ "TileImageDepthReadAccessEXT" ], + "version" : "None" + }, + { + "opname" : "OpStencilAttachmentReadEXT", + "class" : "Image", + "opcode" : 4162, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities" : [ "TileImageStencilReadAccessEXT" ], + "version" : "None" + }, { "opname" : "OpTerminateInvocation", "class" : "Control-Flow", @@ -4183,6 +4510,21 @@ "capabilities" : [ "SubgroupVoteKHR" ], "version" : "None" }, + { + "opname" : "OpGroupNonUniformRotateKHR", + "class" : "Group", + "opcode" : 4431, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformRotateKHR" ], + "version" : "None" + }, { "opname" : "OpSubgroupReadInvocationKHR", "class" : "Group", @@ -4197,6 +4539,20 @@ "extensions" : [ "SPV_KHR_shader_ballot" ], "version" : "None" }, + { + "opname" : "OpExtInstWithForwardRefsKHR", + "class" : "Extension", + "opcode" : 4433, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Set'" }, + { "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." } + ], + "extensions" : [ "SPV_KHR_relaxed_extended_instruction" ], + "version": "None" + }, { "opname" : "OpTraceRayKHR", "class" : "Reserved", @@ -4441,9 +4797,116 @@ "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, + { + "opname" : "OpTypeCooperativeMatrixKHR", + "class" : "Type-Declaration", + "opcode" : 4456, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Component Type'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Rows'" }, + { "kind" : "IdRef", "name" : "'Columns'" }, + { "kind" : "IdRef", "name" : "'Use'" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLoadKHR", + "class" : "Memory", + "opcode" : 4457, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'MemoryLayout'" }, + { "kind" : "IdRef", "name" : "'Stride'", "quantifier": "?" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixStoreKHR", + "class" : "Memory", + "opcode" : 4458, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'MemoryLayout'" }, + { "kind" : "IdRef", "name" : "'Stride'", "quantifier": "?" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixMulAddKHR", + "class" : "Arithmetic", + "opcode" : 4459, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "IdRef", "name" : "'C'" }, + { "kind" : "CooperativeMatrixOperands", "name" : "'Cooperative Matrix Operands'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLengthKHR", + "class" : "Miscellaneous", + "opcode" : 4460, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Type'" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpConstantCompositeReplicateEXT", + "class" : "Constant-Creation", + "opcode" : 4461, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "ReplicatedCompositesEXT" ], + "version" : "None" + }, + { + "opname" : "OpSpecConstantCompositeReplicateEXT", + "class" : "Constant-Creation", + "opcode" : 4462, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "ReplicatedCompositesEXT" ], + "version" : "None" + }, + { + "opname" : "OpCompositeConstructReplicateEXT", + "class" : "Composite", + "opcode" : 4463, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "ReplicatedCompositesEXT" ], + "version" : "None" + }, { "opname" : "OpTypeRayQueryKHR", - "class" : "Reserved", + "class" : "Type-Declaration", "opcode" : 4472, "operands" : [ { "kind" : "IdResult" } @@ -4578,14 +5041,138 @@ "version" : "None" }, { - "opname" : "OpGroupIAddNonUniformAMD", - "class" : "Group", - "opcode" : 5000, + "opname" : "OpImageSampleWeightedQCOM", + "class" : "Image", + "opcode" : 4480, "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, - { "kind" : "IdScope", "name" : "'Execution'" }, - { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Texture'" }, + { "kind" : "IdRef", "name" : "'Coordinates'" }, + { "kind" : "IdRef", "name" : "'Weights'" } + ], + "capabilities" : [ "TextureSampleWeightedQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBoxFilterQCOM", + "class" : "Image", + "opcode" : 4481, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Texture'" }, + { "kind" : "IdRef", "name" : "'Coordinates'" }, + { "kind" : "IdRef", "name" : "'Box Size'" } + ], + "capabilities" : [ "TextureBoxFilterQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchSSDQCOM", + "class" : "Image", + "opcode" : 4482, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatchQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchSADQCOM", + "class" : "Image", + "opcode" : 4483, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatchQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchWindowSSDQCOM", + "class" : "Image", + "opcode" : 4500, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatch2QCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchWindowSADQCOM", + "class" : "Image", + "opcode" : 4501, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatch2QCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchGatherSSDQCOM", + "class" : "Image", + "opcode" : 4502, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatch2QCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchGatherSADQCOM", + "class" : "Image", + "opcode" : 4503, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatch2QCOM" ], + "version" : "None" + }, + { + "opname" : "OpGroupIAddNonUniformAMD", + "class" : "Group", + "opcode" : 5000, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], "capabilities" : [ "Groups" ], @@ -4693,50 +5280,563 @@ { "kind" : "GroupOperation", "name" : "'Operation'" }, { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "Groups" ], - "extensions" : [ "SPV_AMD_shader_ballot" ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpFragmentMaskFetchAMD", + "class" : "Reserved", + "opcode" : 5011, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpFragmentFetchAMD", + "class" : "Reserved", + "opcode" : 5012, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Fragment Index'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpReadClockKHR", + "class" : "Reserved", + "opcode" : 5056, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Scope'" } + ], + "capabilities" : [ "ShaderClockKHR" ], + "version" : "None" + }, + { + "opname" : "OpFinalizeNodePayloadsAMDX", + "class" : "Reserved", + "opcode" : 5075, + "operands" : [ + { "kind" : "IdRef", "name": "'Payload Array'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpFinishWritingNodePayloadAMDX", + "class" : "Reserved", + "opcode" : 5078, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name": "'Payload'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpInitializeNodePayloadsAMDX", + "class" : "Reserved", + "opcode" : 5090, + "operands" : [ + { "kind" : "IdRef", "name": "'Payload Array'" }, + { "kind" : "IdScope", "name": "'Visibility'" }, + { "kind" : "IdRef", "name": "'Payload Count'" }, + { "kind" : "IdRef", "name": "'Node Index'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpGroupNonUniformQuadAllKHR", + "class" : "Non-Uniform", + "opcode" : 5110, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "QuadControlKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupNonUniformQuadAnyKHR", + "class" : "Non-Uniform", + "opcode" : 5111, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "QuadControlKHR" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitMotionNV", + "class" : "Reserved", + "opcode" : 5249, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Record Stride'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitWithIndexMotionNV", + "class" : "Reserved", + "opcode" : 5250, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordMissMotionNV", + "class" : "Reserved", + "opcode" : 5251, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldToObjectNV", + "class" : "Reserved", + "opcode" : 5252, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectToWorldNV", + "class" : "Reserved", + "opcode" : 5253, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectRayDirectionNV", + "class" : "Reserved", + "opcode" : 5254, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectRayOriginNV", + "class" : "Reserved", + "opcode" : 5255, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectTraceRayMotionNV", + "class" : "Reserved", + "opcode" : 5256, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'"}, + { "kind" : "IdRef", "name" : "'RayFlags'"}, + { "kind" : "IdRef", "name" : "'Cullmask'"}, + { "kind" : "IdRef", "name" : "'SBT Record Offset'"}, + { "kind" : "IdRef", "name" : "'SBT Record Stride'"}, + { "kind" : "IdRef", "name" : "'Miss Index'"}, + { "kind" : "IdRef", "name" : "'Origin'"}, + { "kind" : "IdRef", "name" : "'TMin'"}, + { "kind" : "IdRef", "name" : "'Direction'"}, + { "kind" : "IdRef", "name" : "'TMax'"}, + { "kind" : "IdRef", "name" : "'Time'"}, + { "kind" : "IdRef", "name" : "'Payload'"} + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetShaderRecordBufferHandleNV", + "class" : "Reserved", + "opcode" : 5257, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetShaderBindingTableRecordIndexNV", + "class" : "Reserved", + "opcode" : 5258, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordEmptyNV", + "class" : "Reserved", + "opcode" : 5259, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectTraceRayNV", + "class" : "Reserved", + "opcode" : 5260, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'"}, + { "kind" : "IdRef", "name" : "'RayFlags'"}, + { "kind" : "IdRef", "name" : "'Cullmask'"}, + { "kind" : "IdRef", "name" : "'SBT Record Offset'"}, + { "kind" : "IdRef", "name" : "'SBT Record Stride'"}, + { "kind" : "IdRef", "name" : "'Miss Index'"}, + { "kind" : "IdRef", "name" : "'Origin'"}, + { "kind" : "IdRef", "name" : "'TMin'"}, + { "kind" : "IdRef", "name" : "'Direction'"}, + { "kind" : "IdRef", "name" : "'TMax'"}, + { "kind" : "IdRef", "name" : "'Payload'"} + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitNV", + "class" : "Reserved", + "opcode" : 5261, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Record Stride'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitWithIndexNV", + "class" : "Reserved", + "opcode" : 5262, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordMissNV", + "class" : "Reserved", + "opcode" : 5263, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectExecuteShaderNV", + "class" : "Reserved", + "opcode" : 5264, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetCurrentTimeNV", + "class" : "Reserved", + "opcode" : 5265, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetAttributesNV", + "class" : "Reserved", + "opcode" : 5266, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Hit Object Attribute'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetHitKindNV", + "class" : "Reserved", + "opcode" : 5267, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetPrimitiveIndexNV", + "class" : "Reserved", + "opcode" : 5268, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetGeometryIndexNV", + "class" : "Reserved", + "opcode" : 5269, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetInstanceIdNV", + "class" : "Reserved", + "opcode" : 5270, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetInstanceCustomIndexNV", + "class" : "Reserved", + "opcode" : 5271, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldRayDirectionNV", + "class" : "Reserved", + "opcode" : 5272, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldRayOriginNV", + "class" : "Reserved", + "opcode" : 5273, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetRayTMaxNV", + "class" : "Reserved", + "opcode" : 5274, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetRayTMinNV", + "class" : "Reserved", + "opcode" : 5275, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectIsEmptyNV", + "class" : "Reserved", + "opcode" : 5276, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectIsHitNV", + "class" : "Reserved", + "opcode" : 5277, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], "version" : "None" }, { - "opname" : "OpFragmentMaskFetchAMD", + "opname" : "OpHitObjectIsMissNV", "class" : "Reserved", - "opcode" : 5011, + "opcode" : 5278, "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Image'" }, - { "kind" : "IdRef", "name" : "'Coordinate'" } + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } ], - "capabilities" : [ "FragmentMaskAMD" ], - "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "capabilities" : [ "ShaderInvocationReorderNV" ], "version" : "None" }, { - "opname" : "OpFragmentFetchAMD", + "opname" : "OpReorderThreadWithHitObjectNV", "class" : "Reserved", - "opcode" : 5012, + "opcode" : 5279, "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Image'" }, - { "kind" : "IdRef", "name" : "'Coordinate'" }, - { "kind" : "IdRef", "name" : "'Fragment Index'" } + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Hint'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Bits'" } ], - "capabilities" : [ "FragmentMaskAMD" ], - "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "capabilities" : [ "ShaderInvocationReorderNV" ], "version" : "None" }, { - "opname" : "OpReadClockKHR", + "opname" : "OpReorderThreadWithHintNV", "class" : "Reserved", - "opcode" : 5056, + "opcode" : 5280, "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdScope", "name" : "'Scope'" } + { "kind" : "IdRef", "name" : "'Hint'" }, + { "kind" : "IdRef", "name" : "'Bits'" } ], - "capabilities" : [ "ShaderClockKHR" ], - "extensions" : [ "SPV_KHR_shader_clock" ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpTypeHitObjectNV", + "class" : "Type-Declaration", + "opcode" : 5281, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], "version" : "None" }, { @@ -4756,6 +5856,30 @@ "extensions" : [ "SPV_NV_shader_image_footprint" ], "version" : "None" }, + { + "opname" : "OpEmitMeshTasksEXT", + "class" : "Reserved", + "opcode" : 5294, + "operands" : [ + { "kind" : "IdRef", "name" : "'Group Count X'" }, + { "kind" : "IdRef", "name" : "'Group Count Y'" }, + { "kind" : "IdRef", "name" : "'Group Count Z'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Payload'" } + ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, + { + "opname" : "OpSetMeshOutputsEXT", + "class" : "Reserved", + "opcode" : 5295, + "operands" : [ + { "kind" : "IdRef", "name" : "'Vertex Count'" }, + { "kind" : "IdRef", "name" : "'Primitive Count'" } + ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, { "opname" : "OpGroupNonUniformPartitionNV", "class" : "Non-Uniform", @@ -4782,7 +5906,39 @@ "version" : "None" }, { - "opname" : "OpReportIntersectionNV", + "opname" : "OpFetchMicroTriangleVertexPositionNV", + "class" : "Reserved", + "opcode" : 5300, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Instance Id'" }, + { "kind" : "IdRef", "name" : "'Geometry Index'" }, + { "kind" : "IdRef", "name" : "'Primitive Index'" }, + { "kind" : "IdRef", "name" : "'Barycentric'" } + ], + "capabilities" : [ "DisplacementMicromapNV" ], + "version" : "None" + }, + { + "opname" : "OpFetchMicroTriangleVertexBarycentricNV", + "class" : "Reserved", + "opcode" : 5301, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Instance Id'" }, + { "kind" : "IdRef", "name" : "'Geometry Index'" }, + { "kind" : "IdRef", "name" : "'Primitive Index'" }, + { "kind" : "IdRef", "name" : "'Barycentric'" } + ], + "capabilities" : [ "DisplacementMicromapNV" ], + "version" : "None" + }, + { + "opname" : "OpReportIntersectionKHR", "class" : "Reserved", "opcode" : 5334, "operands" : [ @@ -4796,7 +5952,7 @@ "version" : "None" }, { - "opname" : "OpReportIntersectionKHR", + "opname" : "OpReportIntersectionNV", "class" : "Reserved", "opcode" : 5334, "operands" : [ @@ -4894,8 +6050,27 @@ "version" : "None" }, { - "opname" : "OpTypeAccelerationStructureNV", + "opname" : "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", "class" : "Reserved", + "opcode" : 5340, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryPositionFetchKHR" ], + "version" : "None" + }, + { + "opname" : "OpTypeAccelerationStructureKHR", + "class" : "Type-Declaration", "opcode" : 5341, "operands" : [ { "kind" : "IdResult" } @@ -4905,8 +6080,8 @@ "version" : "None" }, { - "opname" : "OpTypeAccelerationStructureKHR", - "class" : "Reserved", + "opname" : "OpTypeAccelerationStructureNV", + "class" : "Type-Declaration", "opcode" : 5341, "operands" : [ { "kind" : "IdResult" } @@ -4930,7 +6105,7 @@ }, { "opname" : "OpTypeCooperativeMatrixNV", - "class" : "Reserved", + "class" : "Type-Declaration", "opcode" : 5358, "operands" : [ { "kind" : "IdResult" }, @@ -5029,7 +6204,7 @@ "opname" : "OpDemoteToHelperInvocationEXT", "class" : "Control-Flow", "opcode" : 5380, - "capabilities" : [ "DemoteToHelperInvocation" ], + "capabilities" : [ "DemoteToHelperInvocationEXT" ], "version" : "1.6" }, { @@ -5126,6 +6301,24 @@ "capabilities" : [ "BindlessTextureNV" ], "version" : "None" }, + { + "opname" : "OpRawAccessChainNV", + "class" : "Memory", + "opcode" : 5398, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Byte stride'" }, + { "kind" : "IdRef", "name" : "'Element index'" }, + { "kind" : "IdRef", "name" : "'Byte offset'" }, + { "kind" : "RawAccessChainOperands", "quantifier" : "?" } + ], + "capabilities" : [ + "RawAccessChainsNV" + ], + "version" : "None" + }, { "opname" : "OpSubgroupShuffleINTEL", "class" : "Group", @@ -5515,7 +6708,7 @@ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } ], - "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT" ], + "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT", "AtomicFloat16VectorNV" ], "version" : "None" }, { @@ -5530,7 +6723,7 @@ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, { "kind" : "IdRef", "name" : "'Value'" } ], - "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT" ], + "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT", "AtomicFloat16VectorNV" ], "version" : "None" }, { @@ -7128,7 +8321,7 @@ "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Length'" } + { "kind" : "IdRef", "name" : "'Lenght'" } ], "capabilities" : [ "VariableLengthArrayINTEL" ], "version" : "None" @@ -7869,6 +9062,43 @@ "extensions" : [ "SPV_INTEL_unstructured_loop_controls" ], "version" : "None" }, + { + "opname" : "OpAliasDomainDeclINTEL", + "class" : "@exclude", + "opcode" : 5911, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Name'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "opname" : "OpAliasScopeDeclINTEL", + "class" : "@exclude", + "opcode" : 5912, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Alias Domain'"}, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Name'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "opname" : "OpAliasScopeListDeclINTEL", + "class" : "@exclude", + "opcode" : 5913, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'AliasScope1, AliasScope2, ...'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, { "opname" : "OpFixedSqrtINTEL", "class" : "@exclude", @@ -8454,63 +9684,263 @@ "version" : "None" }, { - "opname" : "OpAtomicFAddEXT", - "class" : "Atomic", - "opcode" : 6035, + "opname" : "OpAtomicFAddEXT", + "class" : "Atomic", + "opcode" : 6035, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "AtomicFloat16AddEXT", "AtomicFloat32AddEXT", "AtomicFloat64AddEXT", "AtomicFloat16VectorNV" ], + "extensions" : [ "SPV_EXT_shader_atomic_float_add" ], + "version" : "None" + }, + { + "opname" : "OpTypeBufferSurfaceINTEL", + "class" : "Type-Declaration", + "opcode" : 6086, + "operands" : [ + { "kind" : "IdResult" }, + { + "kind" : "AccessQualifier", + "name" : "'AccessQualifier'" + } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeStructContinuedINTEL", + "class" : "Type-Declaration", + "opcode" : 6090, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpConstantCompositeContinuedINTEL", + "class" : "Constant-Creation", + "opcode" : 6091, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSpecConstantCompositeContinuedINTEL", + "class" : "Constant-Creation", + "opcode" : 6092, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpCompositeConstructContinuedINTEL", + "class" : "Composite", + "opcode" : 6096, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version": "None" + }, + { + "opname" : "OpConvertFToBF16INTEL", + "class" : "Conversion", + "opcode" : 6116, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ], + "capabilities" : [ "BFloat16ConversionINTEL" ], + "version" : "None" + }, + { + "opname" : "OpConvertBF16ToFINTEL", + "class" : "Conversion", + "opcode" : 6117, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'BFloat16 Value'" } + ], + "capabilities" : [ "BFloat16ConversionINTEL" ], + "version" : "None" + }, + { + "opname" : "OpControlBarrierArriveINTEL", + "class" : "Barrier", + "opcode" : 6142, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "SplitBarrierINTEL" ], + "version" : "None" + }, + { + "opname" : "OpControlBarrierWaitINTEL", + "class" : "Barrier", + "opcode" : 6143, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "SplitBarrierINTEL" ], + "version" : "None" + }, + { + "opname" : "OpGroupIMulKHR", + "class" : "Group", + "opcode" : 6401, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMulKHR", + "class" : "Group", + "opcode" : 6402, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupBitwiseAndKHR", + "class" : "Group", + "opcode" : 6403, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupBitwiseOrKHR", + "class" : "Group", + "opcode" : 6404, "operands" : [ { "kind" : "IdResultType" }, { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Pointer'" }, - { "kind" : "IdScope", "name" : "'Memory'" }, - { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, - { "kind" : "IdRef", "name" : "'Value'" } + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "AtomicFloat16AddEXT", "AtomicFloat32AddEXT", "AtomicFloat64AddEXT" ], - "extensions" : [ "SPV_EXT_shader_atomic_float_add" ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], "version" : "None" }, { - "opname" : "OpTypeBufferSurfaceINTEL", - "class" : "Type-Declaration", - "opcode" : 6086, + "opname" : "OpGroupBitwiseXorKHR", + "class" : "Group", + "opcode" : 6405, "operands" : [ + { "kind" : "IdResultType" }, { "kind" : "IdResult" }, - { - "kind" : "AccessQualifier", - "name" : "'AccessQualifier'" - } + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "VectorComputeINTEL" ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], "version" : "None" }, { - "opname" : "OpTypeStructContinuedINTEL", - "class" : "Type-Declaration", - "opcode" : 6090, + "opname" : "OpGroupLogicalAndKHR", + "class" : "Group", + "opcode" : 6406, "operands" : [ - { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "LongConstantCompositeINTEL" ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], "version" : "None" }, { - "opname" : "OpConstantCompositeContinuedINTEL", - "class" : "Constant-Creation", - "opcode" : 6091, + "opname" : "OpGroupLogicalOrKHR", + "class" : "Group", + "opcode" : 6407, "operands" : [ - { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } ], - "capabilities" : [ "LongConstantCompositeINTEL" ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], "version" : "None" }, { - "opname" : "OpSpecConstantCompositeContinuedINTEL", - "class" : "Constant-Creation", - "opcode" : 6092, + "opname" : "OpGroupLogicalXorKHR", + "class" : "Group", + "opcode" : 6408, "operands" : [ - { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpMaskedGatherINTEL", + "class" : "Memory", + "opcode" : 6428, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'PtrVector'" }, + { "kind" : "LiteralInteger", "name" : "'Alignment'" }, + { "kind" : "IdRef", "name" : "'Mask'" }, + { "kind" : "IdRef", "name" : "'FillEmpty'" } + ], + "capabilities" : [ "MaskedGatherScatterINTEL" ], + "version" : "None" + }, + { + "opname" : "OpMaskedScatterINTEL", + "class" : "Memory", + "opcode" : 6429, + "operands" : [ + { "kind" : "IdRef", "name" : "'InputVector'" }, + { "kind" : "IdRef", "name" : "'PtrVector'" }, + { "kind" : "LiteralInteger", "name" : "'Alignment'" }, + { "kind" : "IdRef", "name" : "'Mask'" } ], - "capabilities" : [ "LongConstantCompositeINTEL" ], + "capabilities" : [ "MaskedGatherScatterINTEL" ], "version" : "None" } ], @@ -8529,14 +9959,16 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "Lod", "value" : "0x0002", "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "Grad", @@ -8544,14 +9976,16 @@ "parameters" : [ { "kind" : "IdRef" }, { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "ConstOffset", "value" : "0x0008", "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "Offset", @@ -8559,7 +9993,8 @@ "capabilities" : [ "ImageGatherExtended" ], "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "ConstOffsets", @@ -8567,14 +10002,16 @@ "capabilities" : [ "ImageGatherExtended" ], "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "Sample", "value" : "0x0040", "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "MinLod", @@ -8582,7 +10019,8 @@ "capabilities" : [ "MinLod" ], "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" }, { "enumerant" : "MakeTexelAvailable", @@ -8668,7 +10106,8 @@ "value" : "0x10000", "parameters" : [ { "kind" : "IdRef" } - ] + ], + "version": "1.0" } ] }, @@ -8678,38 +10117,62 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "NotNaN", - "value" : "0x0001" + "value" : "0x0001", + "version" : "1.0" }, { "enumerant" : "NotInf", - "value" : "0x0002" + "value" : "0x0002", + "version" : "1.0" }, { "enumerant" : "NSZ", - "value" : "0x0004" + "value" : "0x0004", + "version" : "1.0" }, { "enumerant" : "AllowRecip", - "value" : "0x0008" + "value" : "0x0008", + "version" : "1.0" }, { "enumerant" : "Fast", - "value" : "0x0010" + "value" : "0x0010", + "version" : "1.0" + }, + { + "enumerant" : "AllowContract", + "value" : "0x10000", + "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], + "version" : "None" }, { "enumerant" : "AllowContractFastINTEL", "value" : "0x10000", - "capabilities" : [ "FPFastMathModeINTEL" ], + "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "AllowReassoc", + "value" : "0x20000", + "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], "version" : "None" }, { "enumerant" : "AllowReassocINTEL", "value" : "0x20000", - "capabilities" : [ "FPFastMathModeINTEL" ], + "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "AllowTransform", + "value" : "0x40000", + "capabilities" : [ "FloatControls2" ], "version" : "None" } ] @@ -8720,15 +10183,18 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "Flatten", - "value" : "0x0001" + "value" : "0x0001", + "version" : "1.0" }, { "enumerant" : "DontFlatten", - "value" : "0x0002" + "value" : "0x0002", + "version" : "1.0" } ] }, @@ -8738,15 +10204,18 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "Unroll", - "value" : "0x0001" + "value" : "0x0001", + "version" : "1.0" }, { "enumerant" : "DontUnroll", - "value" : "0x0002" + "value" : "0x0002", + "version" : "1.0" }, { "enumerant" : "DependencyInfinite", @@ -8808,7 +10277,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8818,7 +10286,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8828,7 +10295,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8838,7 +10304,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8848,7 +10313,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8858,7 +10322,6 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { @@ -8868,17 +10331,30 @@ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" }, { "enumerant" : "NoFusionINTEL", "value" : "0x800000", + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LoopCountINTEL", + "value" : "0x1000000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxReinvocationDelayINTEL", + "value" : "0x2000000", "parameters" : [ { "kind" : "LiteralInteger" } ], "capabilities" : [ "FPGALoopControlsINTEL" ], - "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], "version" : "None" } ] @@ -8889,23 +10365,28 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "Inline", - "value" : "0x0001" + "value" : "0x0001", + "version" : "1.0" }, { "enumerant" : "DontInline", - "value" : "0x0002" + "value" : "0x0002", + "version" : "1.0" }, { "enumerant" : "Pure", - "value" : "0x0004" + "value" : "0x0004", + "version" : "1.0" }, { "enumerant" : "Const", - "value" : "0x0008" + "value" : "0x0008", + "version" : "1.0" }, { "enumerant" : "OptNoneINTEL", @@ -8921,53 +10402,65 @@ "enumerants" : [ { "enumerant" : "Relaxed", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "Acquire", - "value" : "0x0002" + "value" : "0x0002", + "version" : "1.0" }, { "enumerant" : "Release", - "value" : "0x0004" + "value" : "0x0004", + "version" : "1.0" }, { "enumerant" : "AcquireRelease", - "value" : "0x0008" + "value" : "0x0008", + "version" : "1.0" }, { "enumerant" : "SequentiallyConsistent", - "value" : "0x0010" + "value" : "0x0010", + "version" : "1.0" }, { "enumerant" : "UniformMemory", "value" : "0x0040", - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SubgroupMemory", - "value" : "0x0080" + "value" : "0x0080", + "version" : "1.0" }, { "enumerant" : "WorkgroupMemory", - "value" : "0x0100" + "value" : "0x0100", + "version" : "1.0" }, { "enumerant" : "CrossWorkgroupMemory", - "value" : "0x0200" + "value" : "0x0200", + "version" : "1.0" }, { "enumerant" : "AtomicCounterMemory", "value" : "0x0400", - "capabilities" : [ "AtomicStorage" ] + "capabilities" : [ "AtomicStorage" ], + "version": "1.0" }, { "enumerant" : "ImageMemory", - "value" : "0x0800" + "value" : "0x0800", + "version" : "1.0" }, { "enumerant" : "OutputMemory", @@ -9023,22 +10516,26 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "Volatile", - "value" : "0x0001" + "value" : "0x0001", + "version" : "1.0" }, { "enumerant" : "Aligned", "value" : "0x0002", "parameters" : [ { "kind" : "LiteralInteger" } - ] + ], + "version" : "1.0" }, { "enumerant" : "Nontemporal", - "value" : "0x0004" + "value" : "0x0004", + "version" : "1.0" }, { "enumerant" : "MakePointerAvailable", @@ -9090,6 +10587,26 @@ "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], "version" : "1.5" + }, + { + "enumerant" : "AliasScopeINTELMask", + "value" : "0x10000", + "parameters" : [ + { "kind" : "IdRef" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "enumerant" : "NoAliasINTELMask", + "parameters" : [ + { "kind" : "IdRef" } + ], + "value" : "0x20000", + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" } ] }, @@ -9099,12 +10616,14 @@ "enumerants" : [ { "enumerant" : "None", - "value" : "0x0000" + "value" : "0x0000", + "version" : "1.0" }, { "enumerant" : "CmdExecTime", "value" : "0x0001", - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" } ] }, @@ -9177,6 +10696,12 @@ "value" : "0x0200", "capabilities" : [ "RayTraversalPrimitiveCullingKHR" ], "version" : "None" + }, + { + "enumerant" : "ForceOpacityMicromap2StateEXT", + "value" : "0x0400", + "capabilities" : [ "RayTracingOpacityMicromapEXT" ], + "version" : "None" } ] }, @@ -9210,37 +10735,96 @@ } ] }, + { + "category" : "BitEnum", + "kind" : "RawAccessChainOperands", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "RobustnessPerComponentNV", + "value" : "0x0001", + "capabilities" : [ "RawAccessChainsNV" ], + "version" : "None" + }, + { + "enumerant" : "RobustnessPerElementNV", + "value" : "0x0002", + "capabilities" : [ "RawAccessChainsNV" ], + "version" : "None" + } + ] + }, { "category" : "ValueEnum", "kind" : "SourceLanguage", "enumerants" : [ { "enumerant" : "Unknown", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "ESSL", - "value" : 1 + "value" : 1, + "version" : "1.0" }, { "enumerant" : "GLSL", - "value" : 2 + "value" : 2, + "version" : "1.0" }, { "enumerant" : "OpenCL_C", - "value" : 3 + "value" : 3, + "version" : "1.0" }, { "enumerant" : "OpenCL_CPP", - "value" : 4 + "value" : 4, + "version" : "1.0" }, { "enumerant" : "HLSL", - "value" : 5 + "value" : 5, + "version" : "1.0" }, { "enumerant" : "CPP_for_OpenCL", - "value" : 6 + "value" : 6, + "version" : "1.0" + }, + { + "enumerant" : "SYCL", + "value" : 7, + "version" : "1.0" + }, + { + "enumerant" : "HERO_C", + "value" : 8, + "version" : "1.0" + }, + { + "enumerant" : "NZSL", + "value" : 9, + "version" : "1.0" + }, + { + "enumerant" : "WGSL", + "value" : 10, + "version" : "1.0" + }, + { + "enumerant" : "Slang", + "value" : 11, + "version" : "1.0" + }, + { + "enumerant" : "Zig", + "value" : 12, + "version" : "1.0" } ] }, @@ -9251,37 +10835,44 @@ { "enumerant" : "Vertex", "value" : 0, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "TessellationControl", "value" : 1, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "TessellationEvaluation", "value" : 2, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "Geometry", "value" : 3, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "Fragment", "value" : 4, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "GLCompute", "value" : 5, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Kernel", "value" : 6, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "TaskNV", @@ -9296,76 +10887,88 @@ "version" : "None" }, { - "enumerant" : "RayGenerationNV", + "enumerant" : "RayGenerationKHR", "value" : 5313, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "RayGenerationKHR", + "enumerant" : "RayGenerationNV", "value" : 5313, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IntersectionNV", + "enumerant" : "IntersectionKHR", "value" : 5314, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IntersectionKHR", + "enumerant" : "IntersectionNV", "value" : 5314, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "AnyHitNV", + "enumerant" : "AnyHitKHR", "value" : 5315, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "AnyHitKHR", + "enumerant" : "AnyHitNV", "value" : 5315, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "ClosestHitNV", + "enumerant" : "ClosestHitKHR", "value" : 5316, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "ClosestHitKHR", + "enumerant" : "ClosestHitNV", "value" : 5316, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "MissNV", + "enumerant" : "MissKHR", "value" : 5317, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "MissKHR", + "enumerant" : "MissNV", "value" : 5317, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "CallableNV", + "enumerant" : "CallableKHR", "value" : 5318, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "CallableKHR", + "enumerant" : "CallableNV", "value" : 5318, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" + }, + { + "enumerant" : "TaskEXT", + "value" : 5364, + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, + { + "enumerant" : "MeshEXT", + "value" : 5365, + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" } ] }, @@ -9375,17 +10978,20 @@ "enumerants" : [ { "enumerant" : "Logical", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "Physical32", "value" : 1, - "capabilities" : [ "Addresses" ] + "capabilities" : [ "Addresses" ], + "version": "1.0" }, { "enumerant" : "Physical64", "value" : 2, - "capabilities" : [ "Addresses" ] + "capabilities" : [ "Addresses" ], + "version": "1.0" }, { "enumerant" : "PhysicalStorageBuffer64", @@ -9410,17 +11016,20 @@ { "enumerant" : "Simple", "value" : 0, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "GLSL450", "value" : 1, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "OpenCL", "value" : 2, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Vulkan", @@ -9447,82 +11056,98 @@ "capabilities" : [ "Geometry" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Number of <>'" } - ] + ], + "version": "1.0" }, { "enumerant" : "SpacingEqual", "value" : 1, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "SpacingFractionalEven", "value" : 2, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "SpacingFractionalOdd", "value" : 3, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "VertexOrderCw", "value" : 4, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "VertexOrderCcw", "value" : 5, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "PixelCenterInteger", "value" : 6, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "OriginUpperLeft", "value" : 7, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "OriginLowerLeft", "value" : 8, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "EarlyFragmentTests", "value" : 9, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "PointMode", "value" : 10, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "Xfb", "value" : 11, - "capabilities" : [ "TransformFeedback" ] + "capabilities" : [ "TransformFeedback" ], + "version": "1.0" }, { "enumerant" : "DepthReplacing", "value" : 12, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "DepthGreater", "value" : 14, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "DepthLess", "value" : 15, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "DepthUnchanged", "value" : 16, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "LocalSize", @@ -9531,7 +11156,8 @@ { "kind" : "LiteralInteger", "name" : "'x size'" }, { "kind" : "LiteralInteger", "name" : "'y size'" }, { "kind" : "LiteralInteger", "name" : "'z size'" } - ] + ], + "version": "1.0" }, { "enumerant" : "LocalSizeHint", @@ -9541,65 +11167,77 @@ { "kind" : "LiteralInteger", "name" : "'x size'" }, { "kind" : "LiteralInteger", "name" : "'y size'" }, { "kind" : "LiteralInteger", "name" : "'z size'" } - ] + ], + "version": "1.0" }, { "enumerant" : "InputPoints", "value" : 19, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "InputLines", "value" : 20, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "InputLinesAdjacency", "value" : 21, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "Triangles", "value" : 22, - "capabilities" : [ "Geometry", "Tessellation" ] + "capabilities" : [ "Geometry", "Tessellation" ], + "version": "1.0" }, { "enumerant" : "InputTrianglesAdjacency", "value" : 23, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "Quads", "value" : 24, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "Isolines", "value" : 25, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "OutputVertices", "value" : 26, - "capabilities" : [ "Geometry", "Tessellation", "MeshShadingNV" ], + "capabilities" : [ "Geometry", "Tessellation", "MeshShadingNV", "MeshShadingEXT" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Vertex count'" } - ] + ], + "version": "1.0" }, { "enumerant" : "OutputPoints", "value" : 27, - "capabilities" : [ "Geometry", "MeshShadingNV" ] + "capabilities" : [ "Geometry", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" }, { "enumerant" : "OutputLineStrip", "value" : 28, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "OutputTriangleStrip", "value" : 29, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "VecTypeHint", @@ -9607,12 +11245,14 @@ "capabilities" : [ "Kernel" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Vector type'" } - ] + ], + "version": "1.0" }, { "enumerant" : "ContractionOff", "value" : 31, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Initializer", @@ -9674,6 +11314,24 @@ ], "version" : "1.2" }, + { + "enumerant" : "NonCoherentColorAttachmentReadEXT", + "value" : 4169, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NonCoherentDepthAttachmentReadEXT", + "value" : 4170, + "capabilities" : [ "TileImageDepthReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NonCoherentStencilAttachmentReadEXT", + "value" : 4171, + "capabilities" : [ "TileImageStencilReadAccessEXT" ], + "version" : "None" + }, { "enumerant" : "SubgroupUniformControlFlowKHR", "value" : 4421, @@ -9738,6 +11396,13 @@ ], "version" : "1.4" }, + { + "enumerant": "EarlyAndLateFragmentTestsAMD", + "value": 5017, + "capabilities": [ "Shader" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests" ], + "version": "None" + }, { "enumerant" : "StencilRefReplacingEXT", "value" : 5027, @@ -9745,21 +11410,138 @@ "extensions" : [ "SPV_EXT_shader_stencil_export" ], "version" : "None" }, + { + "enumerant" : "CoalescingAMDX", + "value" : 5069, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "MaxNodeRecursionAMDX", + "value" : 5071, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Number of recursions'" } + ], + "version" : "None" + }, + { + "enumerant" : "StaticNumWorkgroupsAMDX", + "value" : 5072, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "None" + }, + { + "enumerant" : "ShaderIndexAMDX", + "value" : 5073, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Shader Index'" } + ], + "version" : "None" + }, + { + "enumerant" : "MaxNumWorkgroupsAMDX", + "value" : 5077, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "None" + }, + { + "enumerant": "StencilRefUnchangedFrontAMD", + "value": 5079, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefGreaterFrontAMD", + "value": 5080, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefLessFrontAMD", + "value": 5081, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefUnchangedBackAMD", + "value": 5082, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefGreaterBackAMD", + "value": 5083, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefLessBackAMD", + "value": 5084, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "QuadDerivativesKHR", + "value": 5088, + "capabilities": [ "QuadControlKHR" ], + "version": "None" + }, + { + "enumerant" : "RequireFullQuadsKHR", + "value" : 5089, + "capabilities" : [ "QuadControlKHR" ], + "version" : "None" + }, + { + "enumerant" : "OutputLinesEXT", + "value" : 5269, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, { "enumerant" : "OutputLinesNV", "value" : 5269, - "capabilities" : [ "MeshShadingNV" ], - "extensions" : [ "SPV_NV_mesh_shader" ], + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "OutputPrimitivesEXT", + "value" : 5270, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Primitive count'" } + ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "None" }, { "enumerant" : "OutputPrimitivesNV", "value" : 5270, - "capabilities" : [ "MeshShadingNV" ], + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Primitive count'" } ], - "extensions" : [ "SPV_NV_mesh_shader" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "None" }, { @@ -9776,11 +11558,18 @@ "extensions" : [ "SPV_NV_compute_shader_derivatives" ], "version" : "None" }, + { + "enumerant" : "OutputTrianglesEXT", + "value" : 5298, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, { "enumerant" : "OutputTrianglesNV", "value" : 5298, - "capabilities" : [ "MeshShadingNV" ], - "extensions" : [ "SPV_NV_mesh_shader" ], + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "None" }, { @@ -9917,6 +11706,77 @@ ], "capabilities" : [ "FPGAKernelAttributesINTEL" ], "version" : "None" + }, + { + "enumerant" : "MaximallyReconvergesKHR", + "value" : 6023, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_maximal_reconvergence" ], + "version" : "None" + }, + { + "enumerant" : "FPFastMathDefault", + "value" : 6028, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Target Type'" }, + { "kind" : "IdRef", "name" : "'Fast-Math Mode'" } + ], + "capabilities" : [ "FloatControls2" ], + "version" : "None" + }, + { + "enumerant" : "StreamingInterfaceINTEL", + "value" : 6154, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'StallFreeReturn'" } + ], + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RegisterMapInterfaceINTEL", + "value" : 6160, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'WaitForDoneWrite'" } + ], + "capabilities" : [ "FPGAKernelAttributesv2INTEL" ], + "version" : "None" + }, + { + "enumerant" : "NamedBarrierCountINTEL", + "value" : 6417, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Barrier Count'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaximumRegistersINTEL", + "value" : 6461, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Number of Registers'" } + ], + "capabilities" : [ "RegisterLimitsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaximumRegistersIdINTEL", + "value" : 6462, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Number of Registers'" } + ], + "capabilities" : [ "RegisterLimitsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "NamedMaximumRegistersINTEL", + "value" : 6463, + "parameters" : [ + { "kind" : "NamedMaximumNumberOfRegisters", "name" : "'Named Maximum Number of Registers'" } + ], + "capabilities" : [ "RegisterLimitsINTEL" ], + "version" : "None" } ] }, @@ -9926,57 +11786,69 @@ "enumerants" : [ { "enumerant" : "UniformConstant", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "Input", - "value" : 1 + "value" : 1, + "version" : "1.0" }, { "enumerant" : "Uniform", "value" : 2, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Output", "value" : 3, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Workgroup", - "value" : 4 + "value" : 4, + "version" : "1.0" }, { "enumerant" : "CrossWorkgroup", - "value" : 5 + "value" : 5, + "version" : "1.0" }, { "enumerant" : "Private", "value" : 6, - "capabilities" : [ "Shader", "VectorComputeINTEL" ] + "capabilities" : [ "Shader", "VectorComputeINTEL" ], + "version": "1.0" }, { "enumerant" : "Function", - "value" : 7 + "value" : 7, + "version" : "1.0" }, { "enumerant" : "Generic", "value" : 8, - "capabilities" : [ "GenericPointer" ] + "capabilities" : [ "GenericPointer" ], + "version": "1.0" }, { "enumerant" : "PushConstant", "value" : 9, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "AtomicCounter", "value" : 10, - "capabilities" : [ "AtomicStorage" ] + "capabilities" : [ "AtomicStorage" ], + "version": "1.0" }, { "enumerant" : "Image", - "value" : 11 + "value" : 11, + "version" : "1.0" }, { "enumerant" : "StorageBuffer", @@ -9989,84 +11861,102 @@ "version" : "1.3" }, { - "enumerant" : "CallableDataNV", + "enumerant" : "TileImageEXT", + "value" : 4172, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NodePayloadAMDX", + "value" : 5068, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "NodeOutputPayloadAMDX", + "value" : 5076, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "CallableDataKHR", "value" : 5328, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "CallableDataKHR", + "enumerant" : "CallableDataNV", "value" : 5328, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IncomingCallableDataNV", + "enumerant" : "IncomingCallableDataKHR", "value" : 5329, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IncomingCallableDataKHR", + "enumerant" : "IncomingCallableDataNV", "value" : 5329, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "RayPayloadNV", + "enumerant" : "RayPayloadKHR", "value" : 5338, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "RayPayloadKHR", + "enumerant" : "RayPayloadNV", "value" : 5338, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "HitAttributeNV", + "enumerant" : "HitAttributeKHR", "value" : 5339, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "HitAttributeKHR", + "enumerant" : "HitAttributeNV", "value" : 5339, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IncomingRayPayloadNV", + "enumerant" : "IncomingRayPayloadKHR", "value" : 5342, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "IncomingRayPayloadKHR", + "enumerant" : "IncomingRayPayloadNV", "value" : 5342, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "ShaderRecordBufferNV", + "enumerant" : "ShaderRecordBufferKHR", "value" : 5343, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { - "enumerant" : "ShaderRecordBufferKHR", + "enumerant" : "ShaderRecordBufferNV", "value" : 5343, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -10086,6 +11976,19 @@ "capabilities" : [ "PhysicalStorageBufferAddresses" ], "version" : "1.5" }, + { + "enumerant" : "HitObjectAttributeNV", + "value" : 5385, + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "enumerant" : "TaskPayloadWorkgroupEXT", + "value" : 5402, + "extensions" : [ "SPV_EXT_mesh_shader" ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "1.4" + }, { "enumerant" : "CodeSectionINTEL", "value" : 5605, @@ -10120,36 +12023,48 @@ { "enumerant" : "1D", "value" : 0, - "capabilities" : [ "Sampled1D", "Image1D" ] + "capabilities" : [ "Sampled1D" ], + "version": "1.0" }, { "enumerant" : "2D", "value" : 1, - "capabilities" : [ "Shader", "Kernel", "ImageMSArray" ] + "version" : "1.0" }, { "enumerant" : "3D", - "value" : 2 + "value" : 2, + "version" : "1.0" }, { "enumerant" : "Cube", "value" : 3, - "capabilities" : [ "Shader", "ImageCubeArray" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rect", "value" : 4, - "capabilities" : [ "SampledRect", "ImageRect" ] + "capabilities" : [ "SampledRect" ], + "version": "1.0" }, { "enumerant" : "Buffer", "value" : 5, - "capabilities" : [ "SampledBuffer", "ImageBuffer" ] + "capabilities" : [ "SampledBuffer" ], + "version": "1.0" }, { "enumerant" : "SubpassData", "value" : 6, - "capabilities" : [ "InputAttachment" ] + "capabilities" : [ "InputAttachment" ], + "version": "1.0" + }, + { + "enumerant" : "TileImageDataEXT", + "value" : 4173, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" } ] }, @@ -10160,27 +12075,27 @@ { "enumerant" : "None", "value" : 0, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "ClampToEdge", "value" : 1, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Clamp", "value" : 2, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Repeat", "value" : 3, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RepeatMirrored", "value" : 4, - "capabilities" : [ "Kernel" ] + "version": "1.0" } ] }, @@ -10191,12 +12106,12 @@ { "enumerant" : "Nearest", "value" : 0, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Linear", "value" : 1, - "capabilities" : [ "Kernel" ] + "version": "1.0" } ] }, @@ -10206,212 +12121,254 @@ "enumerants" : [ { "enumerant" : "Unknown", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "Rgba32f", "value" : 1, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba16f", "value" : 2, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "R32f", "value" : 3, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba8", "value" : 4, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba8Snorm", "value" : 5, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rg32f", "value" : 6, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg16f", "value" : 7, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R11fG11fB10f", "value" : 8, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R16f", "value" : 9, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rgba16", "value" : 10, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rgb10A2", "value" : 11, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg16", "value" : 12, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg8", "value" : 13, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R16", "value" : 14, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R8", "value" : 15, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rgba16Snorm", "value" : 16, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg16Snorm", "value" : 17, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg8Snorm", "value" : 18, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R16Snorm", "value" : 19, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R8Snorm", "value" : 20, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rgba32i", "value" : 21, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba16i", "value" : 22, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba8i", "value" : 23, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "R32i", "value" : 24, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rg32i", "value" : 25, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg16i", "value" : 26, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg8i", "value" : 27, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R16i", "value" : 28, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R8i", "value" : 29, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rgba32ui", "value" : 30, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba16ui", "value" : 31, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgba8ui", "value" : 32, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "R32ui", "value" : 33, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Rgb10a2ui", "value" : 34, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg32ui", "value" : 35, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg16ui", "value" : 36, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "Rg8ui", "value" : 37, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R16ui", "value" : 38, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, { "enumerant" : "R8ui", "value" : 39, - "capabilities" : [ "StorageImageExtendedFormats" ] + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" }, - { + { "enumerant" : "R64ui", "value" : 40, - "capabilities" : [ "Int64ImageEXT" ] + "capabilities" : [ "Int64ImageEXT" ], + "version": "1.0" }, { "enumerant" : "R64i", "value" : 41, - "capabilities" : [ "Int64ImageEXT" ] + "capabilities" : [ "Int64ImageEXT" ], + "version": "1.0" } ] }, @@ -10422,102 +12379,102 @@ { "enumerant" : "R", "value" : 0, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "A", "value" : 1, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RG", "value" : 2, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RA", "value" : 3, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RGB", "value" : 4, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RGBA", "value" : 5, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "BGRA", "value" : 6, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "ARGB", "value" : 7, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Intensity", "value" : 8, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Luminance", "value" : 9, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Rx", "value" : 10, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RGx", "value" : 11, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "RGBx", "value" : 12, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Depth", "value" : 13, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "DepthStencil", "value" : 14, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "sRGB", "value" : 15, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "sRGBx", "value" : 16, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "sRGBA", "value" : 17, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "sBGRA", "value" : 18, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "ABGR", "value" : 19, - "capabilities" : [ "Kernel" ] + "version": "1.0" } ] }, @@ -10528,87 +12485,97 @@ { "enumerant" : "SnormInt8", "value" : 0, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "SnormInt16", "value" : 1, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormInt8", "value" : 2, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormInt16", "value" : 3, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormShort565", "value" : 4, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormShort555", "value" : 5, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormInt101010", "value" : 6, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "SignedInt8", "value" : 7, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "SignedInt16", "value" : 8, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "SignedInt32", "value" : 9, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnsignedInt8", "value" : 10, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnsignedInt16", "value" : 11, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnsignedInt32", "value" : 12, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "HalfFloat", "value" : 13, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "Float", "value" : 14, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormInt24", "value" : 15, - "capabilities" : [ "Kernel" ] + "version": "1.0" }, { "enumerant" : "UnormInt101010_2", "value" : 16, - "capabilities" : [ "Kernel" ] + "version": "1.0" + }, + { + "enumerant" : "UnsignedIntRaw10EXT", + "value" : 19, + "version": "1.0" + }, + { + "enumerant" : "UnsignedIntRaw12EXT", + "value" : 20, + "version": "1.0" } ] }, @@ -10618,19 +12585,23 @@ "enumerants" : [ { "enumerant" : "RTE", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "RTZ", - "value" : 1 + "value" : 1, + "version" : "1.0" }, { "enumerant" : "RTP", - "value" : 2 + "value" : 2, + "version" : "1.0" }, { "enumerant" : "RTN", - "value" : 3 + "value" : 3, + "version" : "1.0" } ] }, @@ -10649,7 +12620,7 @@ "value" : 1, "capabilities" : [ "FunctionFloatControlINTEL" ], "version" : "None" - } + } ] }, { @@ -10761,12 +12732,14 @@ { "enumerant" : "Export", "value" : 0, - "capabilities" : [ "Linkage" ] + "capabilities" : [ "Linkage" ], + "version": "1.0" }, { "enumerant" : "Import", "value" : 1, - "capabilities" : [ "Linkage" ] + "capabilities" : [ "Linkage" ], + "version": "1.0" }, { "enumerant" : "LinkOnceODR", @@ -10784,17 +12757,50 @@ { "enumerant" : "ReadOnly", "value" : 0, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "WriteOnly", "value" : 1, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ReadWrite", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "HostAccessQualifier", + "enumerants" : [ + { + "enumerant" : "NoneINTEL", + "value" : 0, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ReadINTEL", + "value" : 1, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteINTEL", + "value" : 2, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" }, { - "enumerant" : "ReadWrite", - "value" : 2, - "capabilities" : [ "Kernel" ] + "enumerant" : "ReadWriteINTEL", + "value" : 3, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" } ] }, @@ -10805,42 +12811,56 @@ { "enumerant" : "Zext", "value" : 0, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Sext", "value" : 1, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "ByVal", "value" : 2, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Sret", "value" : 3, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "NoAlias", "value" : 4, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "NoCapture", "value" : 5, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "NoWrite", "value" : 6, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "NoReadWrite", "value" : 7, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RuntimeAlignedINTEL", + "value" : 5940, + "capabilities" : [ "RuntimeAlignedAttributeINTEL" ], + "version": "1.0" } ] }, @@ -10851,7 +12871,8 @@ { "enumerant" : "RelaxedPrecision", "value" : 0, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SpecId", @@ -10859,28 +12880,33 @@ "capabilities" : [ "Shader", "Kernel" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Specialization Constant ID'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Block", "value" : 2, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "BufferBlock", "value" : 3, "capabilities" : [ "Shader" ], + "version": "1.0", "lastVersion" : "1.3" }, { "enumerant" : "RowMajor", "value" : 4, - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "enumerant" : "ColMajor", "value" : 5, - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "enumerant" : "ArrayStride", @@ -10888,7 +12914,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Array Stride'" } - ] + ], + "version": "1.0" }, { "enumerant" : "MatrixStride", @@ -10896,93 +12923,112 @@ "capabilities" : [ "Matrix" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Matrix Stride'" } - ] + ], + "version": "1.0" }, { "enumerant" : "GLSLShared", "value" : 8, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "GLSLPacked", "value" : 9, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "CPacked", "value" : 10, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "BuiltIn", "value" : 11, "parameters" : [ { "kind" : "BuiltIn" } - ] + ], + "version": "1.0" }, { "enumerant" : "NoPerspective", "value" : 13, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Flat", "value" : 14, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Patch", "value" : 15, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "Centroid", "value" : 16, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Sample", "value" : 17, - "capabilities" : [ "SampleRateShading" ] + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" }, { "enumerant" : "Invariant", "value" : 18, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Restrict", - "value" : 19 + "value" : 19, + "version" : "1.0" }, { "enumerant" : "Aliased", - "value" : 20 + "value" : 20, + "version" : "1.0" }, { "enumerant" : "Volatile", - "value" : 21 + "value" : 21, + "version" : "1.0" }, { "enumerant" : "Constant", "value" : 22, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Coherent", - "value" : 23 + "value" : 23, + "version": "1.0" }, { "enumerant" : "NonWritable", - "value" : 24 + "value" : 24, + "version": "1.0" }, { "enumerant" : "NonReadable", - "value" : 25 + "value" : 25, + "version": "1.0" }, { "enumerant" : "Uniform", "value" : 26, - "capabilities" : [ "Shader", "UniformDecoration" ] + "capabilities" : [ "Shader", "UniformDecoration" ], + "version": "1.0" }, { "enumerant" : "UniformId", @@ -10996,7 +13042,8 @@ { "enumerant" : "SaturatedConversion", "value" : 28, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Stream", @@ -11004,7 +13051,8 @@ "capabilities" : [ "GeometryStreams" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Stream Number'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Location", @@ -11012,7 +13060,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Location'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Component", @@ -11020,7 +13069,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Component'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Index", @@ -11028,7 +13078,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Index'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Binding", @@ -11036,7 +13087,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Binding Point'" } - ] + ], + "version": "1.0" }, { "enumerant" : "DescriptorSet", @@ -11044,7 +13096,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Descriptor Set'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Offset", @@ -11052,7 +13105,8 @@ "capabilities" : [ "Shader" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Byte Offset'" } - ] + ], + "version": "1.0" }, { "enumerant" : "XfbBuffer", @@ -11060,7 +13114,8 @@ "capabilities" : [ "TransformFeedback" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'XFB Buffer Number'" } - ] + ], + "version": "1.0" }, { "enumerant" : "XfbStride", @@ -11068,7 +13123,8 @@ "capabilities" : [ "TransformFeedback" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'XFB Stride'" } - ] + ], + "version": "1.0" }, { "enumerant" : "FuncParamAttr", @@ -11076,22 +13132,25 @@ "capabilities" : [ "Kernel" ], "parameters" : [ { "kind" : "FunctionParameterAttribute", "name" : "'Function Parameter Attribute'" } - ] + ], + "version": "1.0" }, { "enumerant" : "FPRoundingMode", "value" : 39, "parameters" : [ { "kind" : "FPRoundingMode", "name" : "'Floating-Point Rounding Mode'" } - ] + ], + "version": "1.0" }, { "enumerant" : "FPFastMathMode", "value" : 40, - "capabilities" : [ "Kernel" ], + "capabilities" : [ "Kernel", "FloatControls2" ], "parameters" : [ { "kind" : "FPFastMathMode", "name" : "'Fast-Math Mode'" } - ] + ], + "version": "1.0" }, { "enumerant" : "LinkageAttributes", @@ -11100,12 +13159,14 @@ "parameters" : [ { "kind" : "LiteralString", "name" : "'Name'" }, { "kind" : "LinkageType", "name" : "'Linkage Type'" } - ] + ], + "version": "1.0" }, { "enumerant" : "NoContraction", "value" : 42, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "InputAttachmentIndex", @@ -11113,7 +13174,8 @@ "capabilities" : [ "InputAttachment" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Attachment Index'" } - ] + ], + "version": "1.0" }, { "enumerant" : "Alignment", @@ -11121,7 +13183,8 @@ "capabilities" : [ "Kernel" ], "parameters" : [ { "kind" : "LiteralInteger", "name" : "'Alignment'" } - ] + ], + "version": "1.0" }, { "enumerant" : "MaxByteOffset", @@ -11162,12 +13225,63 @@ "extensions" : [ "SPV_KHR_no_integer_wrap_decoration" ], "version" : "1.4" }, + { + "enumerant" : "WeightTextureQCOM", + "value" : 4487, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "BlockMatchTextureQCOM", + "value" : 4488, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "BlockMatchSamplerQCOM", + "value" : 4499, + "extensions" : [ "SPV_QCOM_image_processing2" ], + "version" : "None" + }, { "enumerant" : "ExplicitInterpAMD", "value" : 4999, "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], "version" : "None" }, + { + "enumerant" : "NodeSharesPayloadLimitsWithAMDX", + "value" : 5019, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Payload Array'" } + ], + "version" : "None" + }, + { + "enumerant" : "NodeMaxPayloadsAMDX", + "value" : 5020, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Max number of payloads'" } + ], + "version" : "None" + }, + { + "enumerant" : "TrackFinishWritingAMDX", + "value" : 5078, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "PayloadNodeNameAMDX", + "value" : 5091, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Node Name'" } + ], + "version" : "None" + }, { "enumerant" : "OverrideCoverageNV", "value" : 5248, @@ -11198,11 +13312,18 @@ { "kind" : "LiteralInteger", "name" : "'Offset'" } ] }, + { + "enumerant" : "PerPrimitiveEXT", + "value" : 5271, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, { "enumerant" : "PerPrimitiveNV", "value" : 5271, - "capabilities" : [ "MeshShadingNV" ], - "extensions" : [ "SPV_NV_mesh_shader" ], + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "None" }, { @@ -11215,8 +13336,8 @@ { "enumerant" : "PerTaskNV", "value" : 5273, - "capabilities" : [ "MeshShadingNV" ], - "extensions" : [ "SPV_NV_mesh_shader" ], + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "None" }, { @@ -11274,6 +13395,12 @@ "extensions" : [ "SPV_EXT_physical_storage_buffer" ], "version" : "1.5" }, + { + "enumerant" : "HitObjectShaderRecordBufferNV", + "value" : 5386, + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, { "enumerant" : "BindlessSamplerNV", "value" : 5398, @@ -11537,6 +13664,30 @@ "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], "version" : "None" }, + { + "enumerant" : "StridesizeINTEL", + "value" : 5883, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Stride Size'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WordsizeINTEL", + "value" : 5884, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Word Size'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "TrueDualPortINTEL", + "value" : 5885, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, { "enumerant" : "BurstCoalesceINTEL", "value" : 5899, @@ -11574,55 +13725,265 @@ "version" : "None" }, { - "enumerant" : "FuseLoopsInFunctionINTEL", - "value" : 5907, - "capabilities" : [ "LoopFuseINTEL" ], + "enumerant" : "FuseLoopsInFunctionINTEL", + "value" : 5907, + "capabilities" : [ "LoopFuseINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MathOpDSPModeINTEL", + "value" : 5909, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Mode'" }, + { "kind" : "LiteralInteger", "name" : "'Propagate'" } + ], + "capabilities" : [ "FPGADSPControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "AliasScopeINTEL", + "value" : 5914, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Aliasing Scopes List'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "version" : "None" + }, + { + "enumerant" : "NoAliasINTEL", + "value" : 5915, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Aliasing Scopes List'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InitiationIntervalINTEL", + "value" : 5917, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cycles'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxConcurrencyINTEL", + "value" : 5918, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Invocations'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "PipelineEnableINTEL", + "value" : 5919, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Enable'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "BufferLocationINTEL", + "value" : 5921, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Buffer Location ID'" } + ], + "capabilities" : [ "FPGABufferLocationINTEL" ], + "version" : "None" + }, + { + "enumerant" : "IOPipeStorageINTEL", + "value" : 5944, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'IO Pipe ID'" } + ], + "capabilities" : [ "IOPipesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FunctionFloatingPointModeINTEL", + "value" : 6080, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" }, + { "kind" : "FPOperationMode", "name" : "'FP Operation Mode'" } + ], + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "SingleElementVectorINTEL", + "value" : 6085, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "VectorComputeCallableFunctionINTEL", + "value" : 6087, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MediaBlockIOINTEL", + "value" : 6140, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StallFreeINTEL", + "value" : 6151, + "capabilities" : [ "FPGAClusterAttributesV2INTEL" ], + "version" : "None" + }, + { + "enumerant" : "FPMaxErrorDecorationINTEL", + "value" : 6170, + "parameters" : [ + { "kind" : "LiteralFloat", "name" : "'Max Error'" } + ], + "capabilities" : [ "FPMaxErrorINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LatencyControlLabelINTEL", + "value" : 6172, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Latency Label'" } + ], + "capabilities" : [ "FPGALatencyControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LatencyControlConstraintINTEL", + "value" : 6173, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Relative To'" }, + { "kind" : "LiteralInteger", "name" : "'Control Type'" }, + { "kind" : "LiteralInteger", "name" : "'Relative Cycle'" } + ], + "capabilities" : [ "FPGALatencyControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ConduitKernelArgumentINTEL", + "value" : 6175, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RegisterMapKernelArgumentINTEL", + "value" : 6176, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceAddressWidthINTEL", + "value" : 6177, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'AddressWidth'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceDataWidthINTEL", + "value" : 6178, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'DataWidth'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceLatencyINTEL", + "value" : 6179, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Latency'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceReadWriteModeINTEL", + "value" : 6180, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "AccessQualifier", "name" : "'ReadWriteMode'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceMaxBurstINTEL", + "value" : 6181, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'MaxBurstCount'" } + ], "version" : "None" }, { - "enumerant" : "BufferLocationINTEL", - "value" : 5921, + "enumerant" : "MMHostInterfaceWaitRequestINTEL", + "value" : 6182, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], "parameters" : [ - { "kind" : "LiteralInteger", "name" : "'Buffer Location ID'" } + { "kind" : "LiteralInteger", "name" : "'Waitrequest'" } ], - "capabilities" : [ "FPGABufferLocationINTEL" ], "version" : "None" }, { - "enumerant" : "IOPipeStorageINTEL", - "value" : 5944, - "parameters" : [ - { "kind" : "LiteralInteger", "name" : "'IO Pipe ID'" } + "enumerant" : "StableKernelArgumentINTEL", + "value" : 6183, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "HostAccessINTEL", + "value" : 6188, + "parameters": [ + { "kind" : "HostAccessQualifier", "name" : "'Access'" }, + { "kind" : "LiteralString", "name" : "'Name'" } ], - "capabilities" : [ "IOPipesINTEL" ], + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], "version" : "None" }, { - "enumerant" : "FunctionFloatingPointModeINTEL", - "value" : 6080, - "parameters" : [ - { "kind" : "LiteralInteger", "name" : "'Target Width'" }, - { "kind" : "FPOperationMode", "name" : "'FP Operation Mode'" } + "enumerant" : "InitModeINTEL", + "value" : 6190, + "parameters": [ + { "kind" : "InitializationModeQualifier", "name" : "'Trigger'" } ], - "capabilities" : [ "FunctionFloatControlINTEL" ], + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], "version" : "None" }, { - "enumerant" : "SingleElementVectorINTEL", - "value" : 6085, - "capabilities" : [ "VectorComputeINTEL" ], + "enumerant" : "ImplementInRegisterMapINTEL", + "value" : 6191, + "parameters": [ + { "kind" : "LiteralInteger", "name" : "Value" } + ], + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], "version" : "None" }, { - "enumerant" : "VectorComputeCallableFunctionINTEL", - "value" : 6087, - "capabilities" : [ "VectorComputeINTEL" ], + "enumerant" : "CacheControlLoadINTEL", + "value" : 6442, + "capabilities" : [ "CacheControlsINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cache Level'" }, + { "kind" : "LoadCacheControl", "name" : "'Cache Control'" } + ], "version" : "None" }, { - "enumerant" : "MediaBlockIOINTEL", - "value" : 6140, - "capabilities" : [ "VectorComputeINTEL" ], + "enumerant" : "CacheControlStoreINTEL", + "value" : 6443, + "capabilities" : [ "CacheControlsINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cache Level'" }, + { "kind" : "StoreCacheControl", "name" : "'Cache Control'" } + ], "version" : "None" } ] @@ -11634,201 +13995,272 @@ { "enumerant" : "Position", "value" : 0, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "PointSize", "value" : 1, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "ClipDistance", "value" : 3, - "capabilities" : [ "ClipDistance" ] + "capabilities" : [ "ClipDistance" ], + "version": "1.0" }, { "enumerant" : "CullDistance", "value" : 4, - "capabilities" : [ "CullDistance" ] + "capabilities" : [ "CullDistance" ], + "version": "1.0" }, { "enumerant" : "VertexId", "value" : 5, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "InstanceId", "value" : 6, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "PrimitiveId", "value" : 7, - "capabilities" : [ "Geometry", "Tessellation", "RayTracingNV", "RayTracingKHR", "MeshShadingNV" ] + "capabilities" : [ "Geometry", "Tessellation", "RayTracingNV", "RayTracingKHR", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" }, { "enumerant" : "InvocationId", "value" : 8, - "capabilities" : [ "Geometry", "Tessellation" ] + "capabilities" : [ "Geometry", "Tessellation" ], + "version": "1.0" }, { "enumerant" : "Layer", "value" : 9, - "capabilities" : [ "Geometry", "ShaderLayer", "ShaderViewportIndexLayerEXT", "MeshShadingNV" ] + "capabilities" : [ "Geometry", "ShaderLayer", "ShaderViewportIndexLayerEXT", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" }, { "enumerant" : "ViewportIndex", "value" : 10, - "capabilities" : [ "MultiViewport", "ShaderViewportIndex", "ShaderViewportIndexLayerEXT", "MeshShadingNV" ] + "capabilities" : [ "MultiViewport", "ShaderViewportIndex", "ShaderViewportIndexLayerEXT", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" }, { "enumerant" : "TessLevelOuter", "value" : 11, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "TessLevelInner", "value" : 12, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "TessCoord", "value" : 13, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "PatchVertices", "value" : 14, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "FragCoord", "value" : 15, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "PointCoord", "value" : 16, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "FrontFacing", "value" : 17, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SampleId", "value" : 18, - "capabilities" : [ "SampleRateShading" ] + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" }, { "enumerant" : "SamplePosition", "value" : 19, - "capabilities" : [ "SampleRateShading" ] + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" }, { "enumerant" : "SampleMask", "value" : 20, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "FragDepth", "value" : 22, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "HelperInvocation", "value" : 23, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "NumWorkgroups", - "value" : 24 + "value" : 24, + "version" : "1.0" }, { "enumerant" : "WorkgroupSize", - "value" : 25 + "value" : 25, + "version" : "1.0" }, { "enumerant" : "WorkgroupId", - "value" : 26 + "value" : 26, + "version" : "1.0" }, { "enumerant" : "LocalInvocationId", - "value" : 27 + "value" : 27, + "version" : "1.0" }, { "enumerant" : "GlobalInvocationId", - "value" : 28 + "value" : 28, + "version" : "1.0" }, { "enumerant" : "LocalInvocationIndex", - "value" : 29 + "value" : 29, + "version" : "1.0" }, { "enumerant" : "WorkDim", "value" : 30, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "GlobalSize", "value" : 31, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "EnqueuedWorkgroupSize", "value" : 32, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "GlobalOffset", "value" : 33, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "GlobalLinearId", "value" : 34, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "SubgroupSize", "value" : 36, - "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ] + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ], + "version": "1.0" }, { "enumerant" : "SubgroupMaxSize", "value" : 37, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "NumSubgroups", "value" : 38, - "capabilities" : [ "Kernel", "GroupNonUniform" ] + "capabilities" : [ "Kernel", "GroupNonUniform" ], + "version": "1.0" }, { "enumerant" : "NumEnqueuedSubgroups", "value" : 39, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "SubgroupId", "value" : 40, - "capabilities" : [ "Kernel", "GroupNonUniform" ] + "capabilities" : [ "Kernel", "GroupNonUniform" ], + "version": "1.0" }, { "enumerant" : "SubgroupLocalInvocationId", "value" : 41, - "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ] + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ], + "version": "1.0" }, { "enumerant" : "VertexIndex", "value" : 42, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "InstanceIndex", "value" : 43, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "CoreIDARM", + "value" : 4160, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "CoreCountARM", + "value" : 4161, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "CoreMaxIDARM", + "value" : 4162, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "WarpIDARM", + "value" : 4163, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "WarpMaxIDARM", + "value" : 4164, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" }, { "enumerant" : "SubgroupEqMask", @@ -11912,8 +14344,8 @@ { "enumerant" : "DrawIndex", "value" : 4426, - "capabilities" : [ "DrawParameters", "MeshShadingNV" ], - "extensions" : [ "SPV_KHR_shader_draw_parameters", "SPV_NV_mesh_shader" ], + "capabilities" : [ "DrawParameters", "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters", "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], "version" : "1.3" }, { @@ -11993,6 +14425,18 @@ "extensions" : [ "SPV_EXT_shader_stencil_export" ], "version" : "None" }, + { + "enumerant" : "CoalescedInputCountAMDX", + "value" : 5021, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "ShaderIndexAMDX", + "value" : 5073, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, { "enumerant" : "ViewportMaskNV", "value" : 5253, @@ -12148,154 +14592,182 @@ "version" : "None" }, { - "enumerant" : "LaunchIdNV", + "enumerant" : "PrimitivePointIndicesEXT", + "value" : 5294, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveLineIndicesEXT", + "value" : 5295, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveTriangleIndicesEXT", + "value" : 5296, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "CullPrimitiveEXT", + "value" : 5299, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "LaunchIdKHR", "value" : 5319, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "LaunchIdKHR", + "enumerant" : "LaunchIdNV", "value" : 5319, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "LaunchSizeNV", + "enumerant" : "LaunchSizeKHR", "value" : 5320, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "LaunchSizeKHR", + "enumerant" : "LaunchSizeNV", "value" : 5320, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldRayOriginNV", + "enumerant" : "WorldRayOriginKHR", "value" : 5321, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldRayOriginKHR", + "enumerant" : "WorldRayOriginNV", "value" : 5321, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldRayDirectionNV", + "enumerant" : "WorldRayDirectionKHR", "value" : 5322, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldRayDirectionKHR", + "enumerant" : "WorldRayDirectionNV", "value" : 5322, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectRayOriginNV", + "enumerant" : "ObjectRayOriginKHR", "value" : 5323, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectRayOriginKHR", + "enumerant" : "ObjectRayOriginNV", "value" : 5323, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectRayDirectionNV", + "enumerant" : "ObjectRayDirectionKHR", "value" : 5324, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectRayDirectionKHR", + "enumerant" : "ObjectRayDirectionNV", "value" : 5324, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "RayTminNV", + "enumerant" : "RayTminKHR", "value" : 5325, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "RayTminKHR", + "enumerant" : "RayTminNV", "value" : 5325, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "RayTmaxNV", + "enumerant" : "RayTmaxKHR", "value" : 5326, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "RayTmaxKHR", + "enumerant" : "RayTmaxNV", "value" : 5326, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "InstanceCustomIndexNV", + "enumerant" : "InstanceCustomIndexKHR", "value" : 5327, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "InstanceCustomIndexKHR", + "enumerant" : "InstanceCustomIndexNV", "value" : 5327, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectToWorldNV", + "enumerant" : "ObjectToWorldKHR", "value" : 5330, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "ObjectToWorldKHR", + "enumerant" : "ObjectToWorldNV", "value" : 5330, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldToObjectNV", + "enumerant" : "WorldToObjectKHR", "value" : 5331, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "WorldToObjectKHR", + "enumerant" : "WorldToObjectNV", "value" : 5331, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -12309,14 +14781,14 @@ "version" : "None" }, { - "enumerant" : "HitKindNV", + "enumerant" : "HitKindKHR", "value" : 5333, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "HitKindKHR", + "enumerant" : "HitKindNV", "value" : 5333, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -12330,14 +14802,32 @@ "version" : "None" }, { - "enumerant" : "IncomingRayFlagsNV", + "enumerant" : "HitTriangleVertexPositionsKHR", + "value" : 5335, + "capabilities" : [ "RayTracingPositionFetchKHR" ], + "version" : "None" + }, + { + "enumerant" : "HitMicroTriangleVertexPositionsNV", + "value" : 5337, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "HitMicroTriangleVertexBarycentricsNV", + "value" : 5344, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "IncomingRayFlagsKHR", "value" : 5351, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "version" : "None" }, { - "enumerant" : "IncomingRayFlagsKHR", + "enumerant" : "IncomingRayFlagsNV", "value" : 5351, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -12377,6 +14867,25 @@ "capabilities" : [ "ShaderSMBuiltinsNV" ], "extensions" : [ "SPV_NV_shader_sm_builtins" ], "version" : "None" + }, + { + "enumerant" : "HitKindFrontFacingMicroTriangleNV", + "value" : 5405, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "HitKindBackFacingMicroTriangleNV", + "value" : 5406, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "CullMaskKHR", + "value" : 6021, + "capabilities" : [ "RayCullMaskKHR" ], + "extensions" : [ "SPV_KHR_ray_cull_mask" ], + "version" : "None" } ] }, @@ -12386,23 +14895,28 @@ "enumerants" : [ { "enumerant" : "CrossDevice", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "Device", - "value" : 1 + "value" : 1, + "version" : "1.0" }, { "enumerant" : "Workgroup", - "value" : 2 + "value" : 2, + "version" : "1.0" }, { "enumerant" : "Subgroup", - "value" : 3 + "value" : 3, + "version" : "1.0" }, { "enumerant" : "Invocation", - "value" : 4 + "value" : 4, + "version" : "1.0" }, { "enumerant" : "QueueFamily", @@ -12431,17 +14945,20 @@ { "enumerant" : "Reduce", "value" : 0, - "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" }, { "enumerant" : "InclusiveScan", "value" : 1, - "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" }, { "enumerant" : "ExclusiveScan", "value" : 2, - "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ] + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" }, { "enumerant" : "ClusteredReduce", @@ -12479,17 +14996,20 @@ { "enumerant" : "NoWait", "value" : 0, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "WaitKernel", "value" : 1, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "WaitWorkGroup", "value" : 2, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" } ] }, @@ -12499,272 +15019,328 @@ "enumerants" : [ { "enumerant" : "Matrix", - "value" : 0 + "value" : 0, + "version" : "1.0" }, { "enumerant" : "Shader", "value" : 1, - "capabilities" : [ "Matrix" ] + "capabilities" : [ "Matrix" ], + "version": "1.0" }, { "enumerant" : "Geometry", "value" : 2, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Tessellation", "value" : 3, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Addresses", - "value" : 4 + "value" : 4, + "version" : "1.0" }, { "enumerant" : "Linkage", - "value" : 5 + "value" : 5, + "version" : "1.0" }, { "enumerant" : "Kernel", - "value" : 6 + "value" : 6, + "version" : "1.0" }, { "enumerant" : "Vector16", "value" : 7, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Float16Buffer", "value" : 8, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Float16", - "value" : 9 + "value" : 9, + "version" : "1.0" }, { "enumerant" : "Float64", - "value" : 10 + "value" : 10, + "version" : "1.0" }, { "enumerant" : "Int64", - "value" : 11 + "value" : 11, + "version" : "1.0" }, { "enumerant" : "Int64Atomics", "value" : 12, - "capabilities" : [ "Int64" ] + "capabilities" : [ "Int64" ], + "version": "1.0" }, { "enumerant" : "ImageBasic", "value" : 13, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "ImageReadWrite", "value" : 14, - "capabilities" : [ "ImageBasic" ] + "capabilities" : [ "ImageBasic" ], + "version": "1.0" }, { "enumerant" : "ImageMipmap", "value" : 15, - "capabilities" : [ "ImageBasic" ] + "capabilities" : [ "ImageBasic" ], + "version": "1.0" }, { "enumerant" : "Pipes", "value" : 17, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "Groups", "value" : 18, - "extensions" : [ "SPV_AMD_shader_ballot" ] + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version": "1.0" }, { "enumerant" : "DeviceEnqueue", "value" : 19, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "LiteralSampler", "value" : 20, - "capabilities" : [ "Kernel" ] + "capabilities" : [ "Kernel" ], + "version": "1.0" }, { "enumerant" : "AtomicStorage", "value" : 21, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Int16", - "value" : 22 + "value" : 22, + "version" : "1.0" }, { "enumerant" : "TessellationPointSize", "value" : 23, - "capabilities" : [ "Tessellation" ] + "capabilities" : [ "Tessellation" ], + "version": "1.0" }, { "enumerant" : "GeometryPointSize", "value" : 24, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "ImageGatherExtended", "value" : 25, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "StorageImageMultisample", "value" : 27, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "UniformBufferArrayDynamicIndexing", "value" : 28, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SampledImageArrayDynamicIndexing", "value" : 29, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "StorageBufferArrayDynamicIndexing", "value" : 30, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "StorageImageArrayDynamicIndexing", "value" : 31, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "ClipDistance", "value" : 32, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "CullDistance", "value" : 33, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "ImageCubeArray", "value" : 34, - "capabilities" : [ "SampledCubeArray" ] + "capabilities" : [ "SampledCubeArray" ], + "version": "1.0" }, { "enumerant" : "SampleRateShading", "value" : 35, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "ImageRect", "value" : 36, - "capabilities" : [ "SampledRect" ] + "capabilities" : [ "SampledRect" ], + "version": "1.0" }, { "enumerant" : "SampledRect", "value" : 37, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "GenericPointer", "value" : 38, - "capabilities" : [ "Addresses" ] + "capabilities" : [ "Addresses" ], + "version": "1.0" }, { "enumerant" : "Int8", - "value" : 39 + "value" : 39, + "version" : "1.0" }, { "enumerant" : "InputAttachment", "value" : 40, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SparseResidency", "value" : 41, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "MinLod", "value" : 42, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "Sampled1D", - "value" : 43 + "value" : 43, + "version" : "1.0" }, { "enumerant" : "Image1D", "value" : 44, - "capabilities" : [ "Sampled1D" ] + "capabilities" : [ "Sampled1D" ], + "version": "1.0" }, { "enumerant" : "SampledCubeArray", "value" : 45, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "SampledBuffer", - "value" : 46 + "value" : 46, + "version" : "1.0" }, { "enumerant" : "ImageBuffer", "value" : 47, - "capabilities" : [ "SampledBuffer" ] + "capabilities" : [ "SampledBuffer" ], + "version": "1.0" }, { "enumerant" : "ImageMSArray", "value" : 48, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "StorageImageExtendedFormats", "value" : 49, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "ImageQuery", "value" : 50, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "DerivativeControl", "value" : 51, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "InterpolationFunction", "value" : 52, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "TransformFeedback", "value" : 53, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "GeometryStreams", "value" : 54, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "StorageImageReadWithoutFormat", "value" : 55, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "StorageImageWriteWithoutFormat", "value" : 56, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader" ], + "version": "1.0" }, { "enumerant" : "MultiViewport", "value" : 57, - "capabilities" : [ "Geometry" ] + "capabilities" : [ "Geometry" ], + "version": "1.0" }, { "enumerant" : "SubgroupDispatch", @@ -12846,6 +15422,36 @@ "value" : 71, "version" : "1.6" }, + { + "enumerant" : "CoreBuiltinsARM", + "value" : 4165, + "extensions" : [ "SPV_ARM_core_builtins" ], + "version": "None" + }, + { + "enumerant" : "TileImageColorReadAccessEXT", + "value" : 4166, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "TileImageDepthReadAccessEXT", + "value" : 4167, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "TileImageStencilReadAccessEXT", + "value" : 4168, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixLayoutsARM", + "value" : 4201, + "extensions" : [ "SPV_ARM_cooperative_matrix_layouts" ], + "version" : "None" + }, { "enumerant" : "FragmentShadingRateKHR", "value" : 4422, @@ -12883,7 +15489,7 @@ { "enumerant" : "WorkgroupMemoryExplicitLayout16BitAccessKHR", "value" : 4430, - "capabilities" : [ "Shader" ], + "capabilities" : [ "WorkgroupMemoryExplicitLayoutKHR" ], "extensions" : [ "SPV_KHR_workgroup_memory_explicit_layout" ], "version" : "None" }, @@ -13040,17 +15646,41 @@ "version" : "None" }, { - "enumerant" : "RayTraversalPrimitiveCullingKHR", - "value" : 4478, - "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], - "extensions" : [ "SPV_KHR_ray_query","SPV_KHR_ray_tracing" ], + "enumerant" : "RayTraversalPrimitiveCullingKHR", + "value" : 4478, + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_query","SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingKHR", + "value" : 4479, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "TextureSampleWeightedQCOM", + "value" : 4484, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "TextureBoxFilterQCOM", + "value" : 4485, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "TextureBlockMatchQCOM", + "value" : 4486, + "extensions" : [ "SPV_QCOM_image_processing" ], "version" : "None" }, { - "enumerant" : "RayTracingKHR", - "value" : 4479, - "capabilities" : [ "Shader" ], - "extensions" : [ "SPV_KHR_ray_tracing" ], + "enumerant" : "TextureBlockMatch2QCOM", + "value" : 4498, + "extensions" : [ "SPV_QCOM_image_processing2" ], "version" : "None" }, { @@ -13098,10 +15728,22 @@ { "enumerant" : "ShaderClockKHR", "value" : 5055, - "capabilities" : [ "Shader" ], "extensions" : [ "SPV_KHR_shader_clock" ], "version" : "None" }, + { + "enumerant" : "ShaderEnqueueAMDX", + "value" : 5067, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMDX_shader_enqueue" ], + "version" : "None" + }, + { + "enumerant" : "QuadControlKHR", + "value" : 5087, + "extensions" : [ "SPV_KHR_quad_control" ], + "version" : "None" + }, { "enumerant" : "SampleMaskOverrideCoverageNV", "value" : 5249, @@ -13171,6 +15813,13 @@ "extensions" : [ "SPV_NV_shader_image_footprint" ], "version" : "None" }, + { + "enumerant" : "MeshShadingEXT", + "value" : 5283, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, { "enumerant" : "FragmentBarycentricKHR", "value" : 5284, @@ -13365,6 +16014,13 @@ "extensions" : [ "SPV_EXT_descriptor_indexing" ], "version" : "1.5" }, + { + "enumerant" : "RayTracingPositionFetchKHR", + "value" : 5336, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ], + "version" : "None" + }, { "enumerant" : "RayTracingNV", "value" : 5340, @@ -13476,12 +16132,59 @@ "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], "version" : "1.6" }, + { + "enumerant" : "DisplacementMicromapNV", + "value" : 5380, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_displacement_micromap" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingOpacityMicromapEXT", + "value" : 5381, + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "extensions" : [ "SPV_EXT_opacity_micromap" ], + "version" : "None" + }, + { + "enumerant" : "ShaderInvocationReorderNV", + "value" : 5383, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_NV_shader_invocation_reorder" ], + "version" : "None" + }, { "enumerant" : "BindlessTextureNV", "value" : 5390, "extensions" : [ "SPV_NV_bindless_texture" ], "version" : "None" }, + { + "enumerant" : "RayQueryPositionFetchKHR", + "value" : 5391, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat16VectorNV", + "value" : 5404, + "extensions" : [ "SPV_NV_shader_atomic_fp16_vector" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingDisplacementMicromapNV", + "value" : 5409, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_NV_displacement_micromap" ], + "version" : "None" + }, + { + "enumerant" : "RawAccessChainsNV", + "value" : 5414, + "extensions" : [ "SPV_NV_raw_access_chains" ], + "version" : "None" + }, { "enumerant" : "SubgroupShuffleINTEL", "value" : 5568, @@ -13677,6 +16380,24 @@ "extensions" : [ "SPV_INTEL_loop_fuse" ], "version" : "None" }, + { + "enumerant" : "FPGADSPControlINTEL", + "value" : 5908, + "extensions" : [ "SPV_INTEL_fpga_dsp_control" ], + "version" : "None" + }, + { + "enumerant" : "MemoryAccessAliasingINTEL", + "value" : 5910, + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "enumerant" : "FPGAInvocationPipeliningAttributesINTEL", + "value" : 5916, + "extensions" : [ "SPV_INTEL_fpga_invocation_pipelining_attributes" ], + "version" : "None" + }, { "enumerant" : "FPGABufferLocationINTEL", "value" : 5920, @@ -13695,6 +16416,12 @@ "extensions" : [ "SPV_INTEL_usm_storage_classes" ], "version" : "None" }, + { + "enumerant" : "RuntimeAlignedAttributeINTEL", + "value" : 5939, + "extensions" : [ "SPV_INTEL_runtime_aligned" ], + "version" : "None" + }, { "enumerant" : "IOPipesINTEL", "value" : 5943, @@ -13759,12 +16486,43 @@ "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, + { + "enumerant" : "RayCullMaskKHR", + "value" : 6020, + "extensions" : [ "SPV_KHR_ray_cull_mask" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixKHR", + "value" : 6022, + "extensions" : [ "SPV_KHR_cooperative_matrix" ], + "version" : "None" + }, + { + "enumerant" : "ReplicatedCompositesEXT", + "value" : 6024, + "extensions" : [ "SPV_EXT_replicated_composites" ], + "version" : "None" + }, { "enumerant" : "BitInstructions", "value" : 6025, "extensions" : [ "SPV_KHR_bit_instructions" ], "version" : "None" }, + { + "enumerant" : "GroupNonUniformRotateKHR", + "value" : 6026, + "capabilities" : [ "GroupNonUniform" ], + "extensions" : [ "SPV_KHR_subgroup_rotate" ], + "version" : "None" + }, + { + "enumerant" : "FloatControls2", + "value" : 6029, + "extensions" : [ "SPV_KHR_float_controls2" ], + "version" : "None" + }, { "enumerant" : "AtomicFloat32AddEXT", "value" : 6033, @@ -13778,9 +16536,9 @@ "version" : "None" }, { - "enumerant" : "LongConstantCompositeINTEL", + "enumerant" : "LongCompositesINTEL", "value" : 6089, - "extensions" : [ "SPV_INTEL_long_constant_composite" ], + "extensions" : [ "SPV_INTEL_long_composites" ], "version" : "None" }, { @@ -13800,6 +16558,86 @@ "value" : 6114, "extensions" : [ "SPV_INTEL_debug_module" ], "version" : "None" + }, + { + "enumerant" : "BFloat16ConversionINTEL", + "value" : 6115, + "extensions" : [ "SPV_INTEL_bfloat16_conversion" ], + "version" : "None" + }, + { + "enumerant" : "SplitBarrierINTEL", + "value" : 6141, + "extensions" : [ "SPV_INTEL_split_barrier" ], + "version" : "None" + }, + { + "enumerant" : "FPGAClusterAttributesV2INTEL", + "value" : 6150, + "capabilities" : [ "FPGAClusterAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_cluster_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPGAKernelAttributesv2INTEL", + "value" : 6161, + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPMaxErrorINTEL", + "value" : 6169, + "extensions" : [ "SPV_INTEL_fp_max_error" ], + "version" : "None" + }, + { + "enumerant" : "FPGALatencyControlINTEL", + "value" : 6171, + "extensions" : [ "SPV_INTEL_fpga_latency_control" ], + "version" : "None" + }, + { + "enumerant" : "FPGAArgumentInterfacesINTEL", + "value" : 6174, + "extensions" : [ "SPV_INTEL_fpga_argument_interfaces" ], + "version" : "None" + }, + { + "enumerant" : "GlobalVariableHostAccessINTEL", + "value" : 6187, + "extensions": [ "SPV_INTEL_global_variable_host_access" ], + "version" : "None" + }, + { + "enumerant" : "GlobalVariableFPGADecorationsINTEL", + "value" : 6189, + "extensions": [ "SPV_INTEL_global_variable_fpga_decorations" ], + "version" : "None" + }, + { + "enumerant" : "GroupUniformArithmeticKHR", + "value" : 6400, + "extensions" : [ "SPV_KHR_uniform_group_instructions"], + "version" : "None" + }, + { + "enumerant" : "MaskedGatherScatterINTEL", + "value" : 6427, + "extensions" : [ "SPV_INTEL_masked_gather_scatter"], + "version" : "None" + }, + { + "enumerant" : "CacheControlsINTEL", + "value" : 6441, + "extensions" : [ "SPV_INTEL_cache_controls" ], + "version" : "None" + }, + { + "enumerant" : "RegisterLimitsINTEL", + "value" : 6460, + "extensions" : [ "SPV_INTEL_maximum_registers" ], + "version" : "None" } ] }, @@ -13880,6 +16718,185 @@ } ] }, + { + "category" : "BitEnum", + "kind" : "CooperativeMatrixOperands", + "enumerants" : [ + { + "enumerant" : "NoneKHR", + "value" : "0x0000", + "version" : "None" + }, + { + "enumerant" : "MatrixASignedComponentsKHR", + "value" : "0x0001", + "version" : "None" + }, + { + "enumerant" : "MatrixBSignedComponentsKHR", + "value" : "0x0002", + "version" : "None" + }, + { + "enumerant" : "MatrixCSignedComponentsKHR", + "value" : "0x0004", + "version" : "None" + }, + { + "enumerant" : "MatrixResultSignedComponentsKHR", + "value" : "0x0008", + "version" : "None" + }, + { + "enumerant" : "SaturatingAccumulationKHR", + "value" : "0x0010", + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "CooperativeMatrixLayout", + "enumerants" : [ + { + "enumerant" : "RowMajorKHR", + "value" : 0, + "version" : "None" + }, + { + "enumerant" : "ColumnMajorKHR", + "value" : 1, + "version" : "None" + }, + { + "enumerant" : "RowBlockedInterleavedARM", + "value" : 4202, + "version" : "None" + }, + { + "enumerant" : "ColumnBlockedInterleavedARM", + "value" : 4203, + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "CooperativeMatrixUse", + "enumerants" : [ + { + "enumerant" : "MatrixAKHR", + "value" : 0, + "version" : "None" + }, + { + "enumerant" : "MatrixBKHR", + "value" : 1, + "version" : "None" + }, + { + "enumerant" : "MatrixAccumulatorKHR", + "value" : 2, + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "InitializationModeQualifier", + "enumerants" : [ + { + "enumerant" : "InitOnDeviceReprogramINTEL", + "value" : 0, + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InitOnDeviceResetINTEL", + "value" : 1, + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "LoadCacheControl", + "enumerants" : [ + { + "enumerant" : "UncachedINTEL", + "value" : 0, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "CachedINTEL", + "value" : 1, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StreamingINTEL", + "value" : 2, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InvalidateAfterReadINTEL", + "value" : 3, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ConstCachedINTEL", + "value" : 4, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "StoreCacheControl", + "enumerants" : [ + { + "enumerant" : "UncachedINTEL", + "value" : 0, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteThroughINTEL", + "value" : 1, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteBackINTEL", + "value" : 2, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StreamingINTEL", + "value" : 3, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "NamedMaximumNumberOfRegisters", + "enumerants" : [ + { + "enumerant" : "AutoINTEL", + "value" : 0, + "capabilities" : [ "RegisterLimitsINTEL" ], + "version" : "None" + } + ] + }, { "category" : "Id", "kind" : "IdResultType", @@ -13915,6 +16932,11 @@ "kind" : "LiteralString", "doc" : "A null-terminated stream of characters consuming an integral number of words" }, + { + "category" : "Literal", + "kind" : "LiteralFloat", + "doc" : "A float consuming one word" + }, { "category" : "Literal", "kind" : "LiteralContextDependentNumber", diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs index 9cf00ece2..aaba96f34 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. +// Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -62,6 +64,12 @@ public enum SourceLanguage OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, } public enum ExecutionModel @@ -87,6 +95,8 @@ public enum ExecutionModel MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, } public enum AddressingModel @@ -147,6 +157,9 @@ public enum ExecutionMode SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, @@ -154,11 +167,28 @@ public enum ExecutionMode SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, @@ -176,6 +206,14 @@ public enum ExecutionMode NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, } public enum StorageClass @@ -193,6 +231,9 @@ public enum StorageClass AtomicCounter = 10, Image = 11, StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -207,6 +248,8 @@ public enum StorageClass ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, @@ -221,6 +264,7 @@ public enum Dim Rect = 4, Buffer = 5, SubpassData = 6, + TileImageDataEXT = 4173, } public enum SamplerAddressingMode @@ -327,6 +371,8 @@ public enum ImageChannelDataType Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, } public enum ImageOperandsShift @@ -385,8 +431,11 @@ public enum FPFastMathModeShift NSZ = 2, AllowRecip = 3, Fast = 4, + AllowContract = 16, AllowContractFastINTEL = 16, + AllowReassoc = 17, AllowReassocINTEL = 17, + AllowTransform = 18, } public enum FPFastMathModeMask @@ -397,8 +446,11 @@ public enum FPFastMathModeMask NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, + AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, } public enum FPRoundingMode @@ -433,6 +485,7 @@ public enum FunctionParameterAttribute NoCapture = 5, NoWrite = 6, NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, } public enum Decoration @@ -486,11 +539,19 @@ public enum Decoration MaxByteOffsetId = 47, NoSignedWrap = 4469, NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, @@ -502,6 +563,7 @@ public enum Decoration RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, @@ -534,18 +596,45 @@ public enum Decoration MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, } public enum BuiltIn @@ -591,6 +680,11 @@ public enum BuiltIn SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, @@ -616,6 +710,8 @@ public enum BuiltIn BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -638,6 +734,10 @@ public enum BuiltIn FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, @@ -664,6 +764,9 @@ public enum BuiltIn HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, @@ -671,6 +774,9 @@ public enum BuiltIn SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, } public enum SelectionControlShift @@ -705,6 +811,8 @@ public enum LoopControlShift MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, } public enum LoopControlMask @@ -727,6 +835,8 @@ public enum LoopControlMask MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, } public enum FunctionControlShift @@ -802,6 +912,8 @@ public enum MemoryAccessShift MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, } public enum MemoryAccessMask @@ -816,6 +928,8 @@ public enum MemoryAccessMask MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, } public enum Scope @@ -931,6 +1045,11 @@ public enum Capability ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, @@ -962,6 +1081,10 @@ public enum Capability RayQueryKHR = 4472, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, @@ -969,6 +1092,8 @@ public enum Capability ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, @@ -979,6 +1104,7 @@ public enum Capability FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, + MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsNV = 5288, @@ -1009,6 +1135,7 @@ public enum Capability UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, @@ -1026,7 +1153,14 @@ public enum Capability FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1059,9 +1193,13 @@ public enum Capability FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, @@ -1073,13 +1211,31 @@ public enum Capability DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, - LongConstantCompositeINTEL = 6089, + LongCompositesINTEL = 6089, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, } public enum RayFlagsShift @@ -1094,6 +1250,7 @@ public enum RayFlagsShift CullNoOpaqueKHR = 7, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, } public enum RayFlagsMask @@ -1109,6 +1266,7 @@ public enum RayFlagsMask CullNoOpaqueKHR = 0x00000080, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, } public enum RayQueryIntersection @@ -1185,6 +1343,89 @@ public enum PackedVectorFormat PackedVectorFormat4x8BitKHR = 0, } + public enum CooperativeMatrixOperandsShift + { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + } + + public enum CooperativeMatrixOperandsMask + { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, + } + + public enum CooperativeMatrixLayout + { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + } + + public enum CooperativeMatrixUse + { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + } + + public enum InitializationModeQualifier + { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + } + + public enum HostAccessQualifier + { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + } + + public enum LoadCacheControl + { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + } + + public enum StoreCacheControl + { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + } + + public enum NamedMaximumNumberOfRegisters + { + AutoINTEL = 0, + } + + public enum RawAccessChainOperandsShift + { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + } + + public enum RawAccessChainOperandsMask + { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, + } + public enum Op { OpNop = 0, @@ -1531,13 +1772,18 @@ public enum Op OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1555,6 +1801,14 @@ public enum Op OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1562,6 +1816,14 @@ public enum Op OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1573,9 +1835,51 @@ public enum Op OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1583,6 +1887,7 @@ public enum Op OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1603,6 +1908,7 @@ public enum Op OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1803,6 +2109,9 @@ public enum Op OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1841,6 +2150,21 @@ public enum Op OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, } } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h index c15736e25..42790e0d0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.h @@ -1,5 +1,5 @@ /* -** Copyright (c) 2014-2020 The Khronos Group Inc. +** Copyright (c) 2014-2024 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), @@ -31,7 +31,7 @@ /* ** Enumeration tokens for SPIR-V, in various styles: -** C, C++, C++11, JSON, Lua, Python, C#, D +** C, C++, C++11, JSON, Lua, Python, C#, D, Beef ** ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -41,6 +41,8 @@ ** - C# will use enum classes in the Specification class located in the "Spv" namespace, ** e.g.: Spv.Specification.SourceLanguage.GLSL ** - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +** - Beef will use enum classes in the Specification class located in the "Spv" namespace, +** e.g.: Spv.Specification.SourceLanguage.GLSL ** ** Some tokens act like mask values, which can be OR'd together, ** while others are mutually exclusive. The mask-like ones have @@ -70,6 +72,12 @@ typedef enum SpvSourceLanguage_ { SpvSourceLanguageOpenCL_CPP = 4, SpvSourceLanguageHLSL = 5, SpvSourceLanguageCPP_for_OpenCL = 6, + SpvSourceLanguageSYCL = 7, + SpvSourceLanguageHERO_C = 8, + SpvSourceLanguageNZSL = 9, + SpvSourceLanguageWGSL = 10, + SpvSourceLanguageSlang = 11, + SpvSourceLanguageZig = 12, SpvSourceLanguageMax = 0x7fffffff, } SpvSourceLanguage; @@ -95,6 +103,8 @@ typedef enum SpvExecutionModel_ { SpvExecutionModelMissNV = 5317, SpvExecutionModelCallableKHR = 5318, SpvExecutionModelCallableNV = 5318, + SpvExecutionModelTaskEXT = 5364, + SpvExecutionModelMeshEXT = 5365, SpvExecutionModelMax = 0x7fffffff, } SpvExecutionModel; @@ -155,6 +165,9 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeSubgroupsPerWorkgroupId = 37, SpvExecutionModeLocalSizeId = 38, SpvExecutionModeLocalSizeHintId = 39, + SpvExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + SpvExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + SpvExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, SpvExecutionModeSubgroupUniformControlFlowKHR = 4421, SpvExecutionModePostDepthCoverage = 4446, SpvExecutionModeDenormPreserve = 4459, @@ -162,11 +175,28 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeSignedZeroInfNanPreserve = 4461, SpvExecutionModeRoundingModeRTE = 4462, SpvExecutionModeRoundingModeRTZ = 4463, + SpvExecutionModeEarlyAndLateFragmentTestsAMD = 5017, SpvExecutionModeStencilRefReplacingEXT = 5027, + SpvExecutionModeCoalescingAMDX = 5069, + SpvExecutionModeMaxNodeRecursionAMDX = 5071, + SpvExecutionModeStaticNumWorkgroupsAMDX = 5072, + SpvExecutionModeShaderIndexAMDX = 5073, + SpvExecutionModeMaxNumWorkgroupsAMDX = 5077, + SpvExecutionModeStencilRefUnchangedFrontAMD = 5079, + SpvExecutionModeStencilRefGreaterFrontAMD = 5080, + SpvExecutionModeStencilRefLessFrontAMD = 5081, + SpvExecutionModeStencilRefUnchangedBackAMD = 5082, + SpvExecutionModeStencilRefGreaterBackAMD = 5083, + SpvExecutionModeStencilRefLessBackAMD = 5084, + SpvExecutionModeQuadDerivativesKHR = 5088, + SpvExecutionModeRequireFullQuadsKHR = 5089, + SpvExecutionModeOutputLinesEXT = 5269, SpvExecutionModeOutputLinesNV = 5269, + SpvExecutionModeOutputPrimitivesEXT = 5270, SpvExecutionModeOutputPrimitivesNV = 5270, SpvExecutionModeDerivativeGroupQuadsNV = 5289, SpvExecutionModeDerivativeGroupLinearNV = 5290, + SpvExecutionModeOutputTrianglesEXT = 5298, SpvExecutionModeOutputTrianglesNV = 5298, SpvExecutionModePixelInterlockOrderedEXT = 5366, SpvExecutionModePixelInterlockUnorderedEXT = 5367, @@ -184,6 +214,14 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeNoGlobalOffsetINTEL = 5895, SpvExecutionModeNumSIMDWorkitemsINTEL = 5896, SpvExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + SpvExecutionModeMaximallyReconvergesKHR = 6023, + SpvExecutionModeFPFastMathDefault = 6028, + SpvExecutionModeStreamingInterfaceINTEL = 6154, + SpvExecutionModeRegisterMapInterfaceINTEL = 6160, + SpvExecutionModeNamedBarrierCountINTEL = 6417, + SpvExecutionModeMaximumRegistersINTEL = 6461, + SpvExecutionModeMaximumRegistersIdINTEL = 6462, + SpvExecutionModeNamedMaximumRegistersINTEL = 6463, SpvExecutionModeMax = 0x7fffffff, } SpvExecutionMode; @@ -201,6 +239,9 @@ typedef enum SpvStorageClass_ { SpvStorageClassAtomicCounter = 10, SpvStorageClassImage = 11, SpvStorageClassStorageBuffer = 12, + SpvStorageClassTileImageEXT = 4172, + SpvStorageClassNodePayloadAMDX = 5068, + SpvStorageClassNodeOutputPayloadAMDX = 5076, SpvStorageClassCallableDataKHR = 5328, SpvStorageClassCallableDataNV = 5328, SpvStorageClassIncomingCallableDataKHR = 5329, @@ -215,6 +256,8 @@ typedef enum SpvStorageClass_ { SpvStorageClassShaderRecordBufferNV = 5343, SpvStorageClassPhysicalStorageBuffer = 5349, SpvStorageClassPhysicalStorageBufferEXT = 5349, + SpvStorageClassHitObjectAttributeNV = 5385, + SpvStorageClassTaskPayloadWorkgroupEXT = 5402, SpvStorageClassCodeSectionINTEL = 5605, SpvStorageClassDeviceOnlyINTEL = 5936, SpvStorageClassHostOnlyINTEL = 5937, @@ -229,6 +272,7 @@ typedef enum SpvDim_ { SpvDimRect = 4, SpvDimBuffer = 5, SpvDimSubpassData = 6, + SpvDimTileImageDataEXT = 4173, SpvDimMax = 0x7fffffff, } SpvDim; @@ -335,6 +379,8 @@ typedef enum SpvImageChannelDataType_ { SpvImageChannelDataTypeFloat = 14, SpvImageChannelDataTypeUnormInt24 = 15, SpvImageChannelDataTypeUnormInt101010_2 = 16, + SpvImageChannelDataTypeUnsignedIntRaw10EXT = 19, + SpvImageChannelDataTypeUnsignedIntRaw12EXT = 20, SpvImageChannelDataTypeMax = 0x7fffffff, } SpvImageChannelDataType; @@ -392,8 +438,11 @@ typedef enum SpvFPFastMathModeShift_ { SpvFPFastMathModeNSZShift = 2, SpvFPFastMathModeAllowRecipShift = 3, SpvFPFastMathModeFastShift = 4, + SpvFPFastMathModeAllowContractShift = 16, SpvFPFastMathModeAllowContractFastINTELShift = 16, + SpvFPFastMathModeAllowReassocShift = 17, SpvFPFastMathModeAllowReassocINTELShift = 17, + SpvFPFastMathModeAllowTransformShift = 18, SpvFPFastMathModeMax = 0x7fffffff, } SpvFPFastMathModeShift; @@ -404,8 +453,11 @@ typedef enum SpvFPFastMathModeMask_ { SpvFPFastMathModeNSZMask = 0x00000004, SpvFPFastMathModeAllowRecipMask = 0x00000008, SpvFPFastMathModeFastMask = 0x00000010, + SpvFPFastMathModeAllowContractMask = 0x00010000, SpvFPFastMathModeAllowContractFastINTELMask = 0x00010000, + SpvFPFastMathModeAllowReassocMask = 0x00020000, SpvFPFastMathModeAllowReassocINTELMask = 0x00020000, + SpvFPFastMathModeAllowTransformMask = 0x00040000, } SpvFPFastMathModeMask; typedef enum SpvFPRoundingMode_ { @@ -439,6 +491,7 @@ typedef enum SpvFunctionParameterAttribute_ { SpvFunctionParameterAttributeNoCapture = 5, SpvFunctionParameterAttributeNoWrite = 6, SpvFunctionParameterAttributeNoReadWrite = 7, + SpvFunctionParameterAttributeRuntimeAlignedINTEL = 5940, SpvFunctionParameterAttributeMax = 0x7fffffff, } SpvFunctionParameterAttribute; @@ -492,11 +545,19 @@ typedef enum SpvDecoration_ { SpvDecorationMaxByteOffsetId = 47, SpvDecorationNoSignedWrap = 4469, SpvDecorationNoUnsignedWrap = 4470, + SpvDecorationWeightTextureQCOM = 4487, + SpvDecorationBlockMatchTextureQCOM = 4488, + SpvDecorationBlockMatchSamplerQCOM = 4499, SpvDecorationExplicitInterpAMD = 4999, + SpvDecorationNodeSharesPayloadLimitsWithAMDX = 5019, + SpvDecorationNodeMaxPayloadsAMDX = 5020, + SpvDecorationTrackFinishWritingAMDX = 5078, + SpvDecorationPayloadNodeNameAMDX = 5091, SpvDecorationOverrideCoverageNV = 5248, SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, SpvDecorationSecondaryViewportRelativeNV = 5256, + SpvDecorationPerPrimitiveEXT = 5271, SpvDecorationPerPrimitiveNV = 5271, SpvDecorationPerViewNV = 5272, SpvDecorationPerTaskNV = 5273, @@ -508,6 +569,7 @@ typedef enum SpvDecoration_ { SpvDecorationRestrictPointerEXT = 5355, SpvDecorationAliasedPointer = 5356, SpvDecorationAliasedPointerEXT = 5356, + SpvDecorationHitObjectShaderRecordBufferNV = 5386, SpvDecorationBindlessSamplerNV = 5398, SpvDecorationBindlessImageNV = 5399, SpvDecorationBoundSamplerNV = 5400, @@ -540,18 +602,45 @@ typedef enum SpvDecoration_ { SpvDecorationMergeINTEL = 5834, SpvDecorationBankBitsINTEL = 5835, SpvDecorationForcePow2DepthINTEL = 5836, + SpvDecorationStridesizeINTEL = 5883, + SpvDecorationWordsizeINTEL = 5884, + SpvDecorationTrueDualPortINTEL = 5885, SpvDecorationBurstCoalesceINTEL = 5899, SpvDecorationCacheSizeINTEL = 5900, SpvDecorationDontStaticallyCoalesceINTEL = 5901, SpvDecorationPrefetchINTEL = 5902, SpvDecorationStallEnableINTEL = 5905, SpvDecorationFuseLoopsInFunctionINTEL = 5907, + SpvDecorationMathOpDSPModeINTEL = 5909, + SpvDecorationAliasScopeINTEL = 5914, + SpvDecorationNoAliasINTEL = 5915, + SpvDecorationInitiationIntervalINTEL = 5917, + SpvDecorationMaxConcurrencyINTEL = 5918, + SpvDecorationPipelineEnableINTEL = 5919, SpvDecorationBufferLocationINTEL = 5921, SpvDecorationIOPipeStorageINTEL = 5944, SpvDecorationFunctionFloatingPointModeINTEL = 6080, SpvDecorationSingleElementVectorINTEL = 6085, SpvDecorationVectorComputeCallableFunctionINTEL = 6087, SpvDecorationMediaBlockIOINTEL = 6140, + SpvDecorationStallFreeINTEL = 6151, + SpvDecorationFPMaxErrorDecorationINTEL = 6170, + SpvDecorationLatencyControlLabelINTEL = 6172, + SpvDecorationLatencyControlConstraintINTEL = 6173, + SpvDecorationConduitKernelArgumentINTEL = 6175, + SpvDecorationRegisterMapKernelArgumentINTEL = 6176, + SpvDecorationMMHostInterfaceAddressWidthINTEL = 6177, + SpvDecorationMMHostInterfaceDataWidthINTEL = 6178, + SpvDecorationMMHostInterfaceLatencyINTEL = 6179, + SpvDecorationMMHostInterfaceReadWriteModeINTEL = 6180, + SpvDecorationMMHostInterfaceMaxBurstINTEL = 6181, + SpvDecorationMMHostInterfaceWaitRequestINTEL = 6182, + SpvDecorationStableKernelArgumentINTEL = 6183, + SpvDecorationHostAccessINTEL = 6188, + SpvDecorationInitModeINTEL = 6190, + SpvDecorationImplementInRegisterMapINTEL = 6191, + SpvDecorationCacheControlLoadINTEL = 6442, + SpvDecorationCacheControlStoreINTEL = 6443, SpvDecorationMax = 0x7fffffff, } SpvDecoration; @@ -597,6 +686,11 @@ typedef enum SpvBuiltIn_ { SpvBuiltInSubgroupLocalInvocationId = 41, SpvBuiltInVertexIndex = 42, SpvBuiltInInstanceIndex = 43, + SpvBuiltInCoreIDARM = 4160, + SpvBuiltInCoreCountARM = 4161, + SpvBuiltInCoreMaxIDARM = 4162, + SpvBuiltInWarpIDARM = 4163, + SpvBuiltInWarpMaxIDARM = 4164, SpvBuiltInSubgroupEqMask = 4416, SpvBuiltInSubgroupEqMaskKHR = 4416, SpvBuiltInSubgroupGeMask = 4417, @@ -622,6 +716,8 @@ typedef enum SpvBuiltIn_ { SpvBuiltInBaryCoordSmoothSampleAMD = 4997, SpvBuiltInBaryCoordPullModelAMD = 4998, SpvBuiltInFragStencilRefEXT = 5014, + SpvBuiltInCoalescedInputCountAMDX = 5021, + SpvBuiltInShaderIndexAMDX = 5073, SpvBuiltInViewportMaskNV = 5253, SpvBuiltInSecondaryPositionNV = 5257, SpvBuiltInSecondaryViewportMaskNV = 5258, @@ -644,6 +740,10 @@ typedef enum SpvBuiltIn_ { SpvBuiltInFragmentSizeNV = 5292, SpvBuiltInFragInvocationCountEXT = 5293, SpvBuiltInInvocationsPerPixelNV = 5293, + SpvBuiltInPrimitivePointIndicesEXT = 5294, + SpvBuiltInPrimitiveLineIndicesEXT = 5295, + SpvBuiltInPrimitiveTriangleIndicesEXT = 5296, + SpvBuiltInCullPrimitiveEXT = 5299, SpvBuiltInLaunchIdKHR = 5319, SpvBuiltInLaunchIdNV = 5319, SpvBuiltInLaunchSizeKHR = 5320, @@ -670,6 +770,9 @@ typedef enum SpvBuiltIn_ { SpvBuiltInHitKindKHR = 5333, SpvBuiltInHitKindNV = 5333, SpvBuiltInCurrentRayTimeNV = 5334, + SpvBuiltInHitTriangleVertexPositionsKHR = 5335, + SpvBuiltInHitMicroTriangleVertexPositionsNV = 5337, + SpvBuiltInHitMicroTriangleVertexBarycentricsNV = 5344, SpvBuiltInIncomingRayFlagsKHR = 5351, SpvBuiltInIncomingRayFlagsNV = 5351, SpvBuiltInRayGeometryIndexKHR = 5352, @@ -677,6 +780,9 @@ typedef enum SpvBuiltIn_ { SpvBuiltInSMCountNV = 5375, SpvBuiltInWarpIDNV = 5376, SpvBuiltInSMIDNV = 5377, + SpvBuiltInHitKindFrontFacingMicroTriangleNV = 5405, + SpvBuiltInHitKindBackFacingMicroTriangleNV = 5406, + SpvBuiltInCullMaskKHR = 6021, SpvBuiltInMax = 0x7fffffff, } SpvBuiltIn; @@ -710,6 +816,8 @@ typedef enum SpvLoopControlShift_ { SpvLoopControlMaxInterleavingINTELShift = 21, SpvLoopControlSpeculatedIterationsINTELShift = 22, SpvLoopControlNoFusionINTELShift = 23, + SpvLoopControlLoopCountINTELShift = 24, + SpvLoopControlMaxReinvocationDelayINTELShift = 25, SpvLoopControlMax = 0x7fffffff, } SpvLoopControlShift; @@ -732,6 +840,8 @@ typedef enum SpvLoopControlMask_ { SpvLoopControlMaxInterleavingINTELMask = 0x00200000, SpvLoopControlSpeculatedIterationsINTELMask = 0x00400000, SpvLoopControlNoFusionINTELMask = 0x00800000, + SpvLoopControlLoopCountINTELMask = 0x01000000, + SpvLoopControlMaxReinvocationDelayINTELMask = 0x02000000, } SpvLoopControlMask; typedef enum SpvFunctionControlShift_ { @@ -804,6 +914,8 @@ typedef enum SpvMemoryAccessShift_ { SpvMemoryAccessMakePointerVisibleKHRShift = 4, SpvMemoryAccessNonPrivatePointerShift = 5, SpvMemoryAccessNonPrivatePointerKHRShift = 5, + SpvMemoryAccessAliasScopeINTELMaskShift = 16, + SpvMemoryAccessNoAliasINTELMaskShift = 17, SpvMemoryAccessMax = 0x7fffffff, } SpvMemoryAccessShift; @@ -818,6 +930,8 @@ typedef enum SpvMemoryAccessMask_ { SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, SpvMemoryAccessNonPrivatePointerMask = 0x00000020, SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, + SpvMemoryAccessAliasScopeINTELMaskMask = 0x00010000, + SpvMemoryAccessNoAliasINTELMaskMask = 0x00020000, } SpvMemoryAccessMask; typedef enum SpvScope_ { @@ -931,6 +1045,11 @@ typedef enum SpvCapability_ { SpvCapabilityShaderLayer = 69, SpvCapabilityShaderViewportIndex = 70, SpvCapabilityUniformDecoration = 71, + SpvCapabilityCoreBuiltinsARM = 4165, + SpvCapabilityTileImageColorReadAccessEXT = 4166, + SpvCapabilityTileImageDepthReadAccessEXT = 4167, + SpvCapabilityTileImageStencilReadAccessEXT = 4168, + SpvCapabilityCooperativeMatrixLayoutsARM = 4201, SpvCapabilityFragmentShadingRateKHR = 4422, SpvCapabilitySubgroupBallotKHR = 4423, SpvCapabilityDrawParameters = 4427, @@ -962,6 +1081,10 @@ typedef enum SpvCapability_ { SpvCapabilityRayQueryKHR = 4472, SpvCapabilityRayTraversalPrimitiveCullingKHR = 4478, SpvCapabilityRayTracingKHR = 4479, + SpvCapabilityTextureSampleWeightedQCOM = 4484, + SpvCapabilityTextureBoxFilterQCOM = 4485, + SpvCapabilityTextureBlockMatchQCOM = 4486, + SpvCapabilityTextureBlockMatch2QCOM = 4498, SpvCapabilityFloat16ImageAMD = 5008, SpvCapabilityImageGatherBiasLodAMD = 5009, SpvCapabilityFragmentMaskAMD = 5010, @@ -969,6 +1092,8 @@ typedef enum SpvCapability_ { SpvCapabilityImageReadWriteLodAMD = 5015, SpvCapabilityInt64ImageEXT = 5016, SpvCapabilityShaderClockKHR = 5055, + SpvCapabilityShaderEnqueueAMDX = 5067, + SpvCapabilityQuadControlKHR = 5087, SpvCapabilitySampleMaskOverrideCoverageNV = 5249, SpvCapabilityGeometryShaderPassthroughNV = 5251, SpvCapabilityShaderViewportIndexLayerEXT = 5254, @@ -979,6 +1104,7 @@ typedef enum SpvCapability_ { SpvCapabilityFragmentFullyCoveredEXT = 5265, SpvCapabilityMeshShadingNV = 5266, SpvCapabilityImageFootprintNV = 5282, + SpvCapabilityMeshShadingEXT = 5283, SpvCapabilityFragmentBarycentricKHR = 5284, SpvCapabilityFragmentBarycentricNV = 5284, SpvCapabilityComputeDerivativeGroupQuadsNV = 5288, @@ -1009,6 +1135,7 @@ typedef enum SpvCapability_ { SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SpvCapabilityRayTracingPositionFetchKHR = 5336, SpvCapabilityRayTracingNV = 5340, SpvCapabilityRayTracingMotionBlurNV = 5341, SpvCapabilityVulkanMemoryModel = 5345, @@ -1026,7 +1153,14 @@ typedef enum SpvCapability_ { SpvCapabilityFragmentShaderPixelInterlockEXT = 5378, SpvCapabilityDemoteToHelperInvocation = 5379, SpvCapabilityDemoteToHelperInvocationEXT = 5379, + SpvCapabilityDisplacementMicromapNV = 5380, + SpvCapabilityRayTracingOpacityMicromapEXT = 5381, + SpvCapabilityShaderInvocationReorderNV = 5383, SpvCapabilityBindlessTextureNV = 5390, + SpvCapabilityRayQueryPositionFetchKHR = 5391, + SpvCapabilityAtomicFloat16VectorNV = 5404, + SpvCapabilityRayTracingDisplacementMicromapNV = 5409, + SpvCapabilityRawAccessChainsNV = 5414, SpvCapabilitySubgroupShuffleINTEL = 5568, SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, SpvCapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1059,9 +1193,13 @@ typedef enum SpvCapability_ { SpvCapabilityFPGAMemoryAccessesINTEL = 5898, SpvCapabilityFPGAClusterAttributesINTEL = 5904, SpvCapabilityLoopFuseINTEL = 5906, + SpvCapabilityFPGADSPControlINTEL = 5908, + SpvCapabilityMemoryAccessAliasingINTEL = 5910, + SpvCapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, SpvCapabilityFPGABufferLocationINTEL = 5920, SpvCapabilityArbitraryPrecisionFixedPointINTEL = 5922, SpvCapabilityUSMStorageClassesINTEL = 5935, + SpvCapabilityRuntimeAlignedAttributeINTEL = 5939, SpvCapabilityIOPipesINTEL = 5943, SpvCapabilityBlockingPipesINTEL = 5945, SpvCapabilityFPGARegINTEL = 5948, @@ -1073,13 +1211,31 @@ typedef enum SpvCapability_ { SpvCapabilityDotProductInput4x8BitPackedKHR = 6018, SpvCapabilityDotProduct = 6019, SpvCapabilityDotProductKHR = 6019, + SpvCapabilityRayCullMaskKHR = 6020, + SpvCapabilityCooperativeMatrixKHR = 6022, + SpvCapabilityReplicatedCompositesEXT = 6024, SpvCapabilityBitInstructions = 6025, + SpvCapabilityGroupNonUniformRotateKHR = 6026, + SpvCapabilityFloatControls2 = 6029, SpvCapabilityAtomicFloat32AddEXT = 6033, SpvCapabilityAtomicFloat64AddEXT = 6034, - SpvCapabilityLongConstantCompositeINTEL = 6089, + SpvCapabilityLongCompositesINTEL = 6089, SpvCapabilityOptNoneINTEL = 6094, SpvCapabilityAtomicFloat16AddEXT = 6095, SpvCapabilityDebugInfoModuleINTEL = 6114, + SpvCapabilityBFloat16ConversionINTEL = 6115, + SpvCapabilitySplitBarrierINTEL = 6141, + SpvCapabilityFPGAClusterAttributesV2INTEL = 6150, + SpvCapabilityFPGAKernelAttributesv2INTEL = 6161, + SpvCapabilityFPMaxErrorINTEL = 6169, + SpvCapabilityFPGALatencyControlINTEL = 6171, + SpvCapabilityFPGAArgumentInterfacesINTEL = 6174, + SpvCapabilityGlobalVariableHostAccessINTEL = 6187, + SpvCapabilityGlobalVariableFPGADecorationsINTEL = 6189, + SpvCapabilityGroupUniformArithmeticKHR = 6400, + SpvCapabilityMaskedGatherScatterINTEL = 6427, + SpvCapabilityCacheControlsINTEL = 6441, + SpvCapabilityRegisterLimitsINTEL = 6460, SpvCapabilityMax = 0x7fffffff, } SpvCapability; @@ -1094,6 +1250,7 @@ typedef enum SpvRayFlagsShift_ { SpvRayFlagsCullNoOpaqueKHRShift = 7, SpvRayFlagsSkipTrianglesKHRShift = 8, SpvRayFlagsSkipAABBsKHRShift = 9, + SpvRayFlagsForceOpacityMicromap2StateEXTShift = 10, SpvRayFlagsMax = 0x7fffffff, } SpvRayFlagsShift; @@ -1109,6 +1266,7 @@ typedef enum SpvRayFlagsMask_ { SpvRayFlagsCullNoOpaqueKHRMask = 0x00000080, SpvRayFlagsSkipTrianglesKHRMask = 0x00000100, SpvRayFlagsSkipAABBsKHRMask = 0x00000200, + SpvRayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, } SpvRayFlagsMask; typedef enum SpvRayQueryIntersection_ { @@ -1184,6 +1342,87 @@ typedef enum SpvPackedVectorFormat_ { SpvPackedVectorFormatMax = 0x7fffffff, } SpvPackedVectorFormat; +typedef enum SpvCooperativeMatrixOperandsShift_ { + SpvCooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3, + SpvCooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4, + SpvCooperativeMatrixOperandsMax = 0x7fffffff, +} SpvCooperativeMatrixOperandsShift; + +typedef enum SpvCooperativeMatrixOperandsMask_ { + SpvCooperativeMatrixOperandsMaskNone = 0, + SpvCooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008, + SpvCooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010, +} SpvCooperativeMatrixOperandsMask; + +typedef enum SpvCooperativeMatrixLayout_ { + SpvCooperativeMatrixLayoutRowMajorKHR = 0, + SpvCooperativeMatrixLayoutColumnMajorKHR = 1, + SpvCooperativeMatrixLayoutRowBlockedInterleavedARM = 4202, + SpvCooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203, + SpvCooperativeMatrixLayoutMax = 0x7fffffff, +} SpvCooperativeMatrixLayout; + +typedef enum SpvCooperativeMatrixUse_ { + SpvCooperativeMatrixUseMatrixAKHR = 0, + SpvCooperativeMatrixUseMatrixBKHR = 1, + SpvCooperativeMatrixUseMatrixAccumulatorKHR = 2, + SpvCooperativeMatrixUseMax = 0x7fffffff, +} SpvCooperativeMatrixUse; + +typedef enum SpvInitializationModeQualifier_ { + SpvInitializationModeQualifierInitOnDeviceReprogramINTEL = 0, + SpvInitializationModeQualifierInitOnDeviceResetINTEL = 1, + SpvInitializationModeQualifierMax = 0x7fffffff, +} SpvInitializationModeQualifier; + +typedef enum SpvHostAccessQualifier_ { + SpvHostAccessQualifierNoneINTEL = 0, + SpvHostAccessQualifierReadINTEL = 1, + SpvHostAccessQualifierWriteINTEL = 2, + SpvHostAccessQualifierReadWriteINTEL = 3, + SpvHostAccessQualifierMax = 0x7fffffff, +} SpvHostAccessQualifier; + +typedef enum SpvLoadCacheControl_ { + SpvLoadCacheControlUncachedINTEL = 0, + SpvLoadCacheControlCachedINTEL = 1, + SpvLoadCacheControlStreamingINTEL = 2, + SpvLoadCacheControlInvalidateAfterReadINTEL = 3, + SpvLoadCacheControlConstCachedINTEL = 4, + SpvLoadCacheControlMax = 0x7fffffff, +} SpvLoadCacheControl; + +typedef enum SpvStoreCacheControl_ { + SpvStoreCacheControlUncachedINTEL = 0, + SpvStoreCacheControlWriteThroughINTEL = 1, + SpvStoreCacheControlWriteBackINTEL = 2, + SpvStoreCacheControlStreamingINTEL = 3, + SpvStoreCacheControlMax = 0x7fffffff, +} SpvStoreCacheControl; + +typedef enum SpvNamedMaximumNumberOfRegisters_ { + SpvNamedMaximumNumberOfRegistersAutoINTEL = 0, + SpvNamedMaximumNumberOfRegistersMax = 0x7fffffff, +} SpvNamedMaximumNumberOfRegisters; + +typedef enum SpvRawAccessChainOperandsShift_ { + SpvRawAccessChainOperandsRobustnessPerComponentNVShift = 0, + SpvRawAccessChainOperandsRobustnessPerElementNVShift = 1, + SpvRawAccessChainOperandsMax = 0x7fffffff, +} SpvRawAccessChainOperandsShift; + +typedef enum SpvRawAccessChainOperandsMask_ { + SpvRawAccessChainOperandsMaskNone = 0, + SpvRawAccessChainOperandsRobustnessPerComponentNVMask = 0x00000001, + SpvRawAccessChainOperandsRobustnessPerElementNVMask = 0x00000002, +} SpvRawAccessChainOperandsMask; + typedef enum SpvOp_ { SpvOpNop = 0, SpvOpUndef = 1, @@ -1529,13 +1768,18 @@ typedef enum SpvOp_ { SpvOpPtrEqual = 401, SpvOpPtrNotEqual = 402, SpvOpPtrDiff = 403, + SpvOpColorAttachmentReadEXT = 4160, + SpvOpDepthAttachmentReadEXT = 4161, + SpvOpStencilAttachmentReadEXT = 4162, SpvOpTerminateInvocation = 4416, SpvOpSubgroupBallotKHR = 4421, SpvOpSubgroupFirstInvocationKHR = 4422, SpvOpSubgroupAllKHR = 4428, SpvOpSubgroupAnyKHR = 4429, SpvOpSubgroupAllEqualKHR = 4430, + SpvOpGroupNonUniformRotateKHR = 4431, SpvOpSubgroupReadInvocationKHR = 4432, + SpvOpExtInstWithForwardRefsKHR = 4433, SpvOpTraceRayKHR = 4445, SpvOpExecuteCallableKHR = 4446, SpvOpConvertUToAccelerationStructureKHR = 4447, @@ -1553,6 +1797,14 @@ typedef enum SpvOp_ { SpvOpUDotAccSatKHR = 4454, SpvOpSUDotAccSat = 4455, SpvOpSUDotAccSatKHR = 4455, + SpvOpTypeCooperativeMatrixKHR = 4456, + SpvOpCooperativeMatrixLoadKHR = 4457, + SpvOpCooperativeMatrixStoreKHR = 4458, + SpvOpCooperativeMatrixMulAddKHR = 4459, + SpvOpCooperativeMatrixLengthKHR = 4460, + SpvOpConstantCompositeReplicateEXT = 4461, + SpvOpSpecConstantCompositeReplicateEXT = 4462, + SpvOpCompositeConstructReplicateEXT = 4463, SpvOpTypeRayQueryKHR = 4472, SpvOpRayQueryInitializeKHR = 4473, SpvOpRayQueryTerminateKHR = 4474, @@ -1560,6 +1812,14 @@ typedef enum SpvOp_ { SpvOpRayQueryConfirmIntersectionKHR = 4476, SpvOpRayQueryProceedKHR = 4477, SpvOpRayQueryGetIntersectionTypeKHR = 4479, + SpvOpImageSampleWeightedQCOM = 4480, + SpvOpImageBoxFilterQCOM = 4481, + SpvOpImageBlockMatchSSDQCOM = 4482, + SpvOpImageBlockMatchSADQCOM = 4483, + SpvOpImageBlockMatchWindowSSDQCOM = 4500, + SpvOpImageBlockMatchWindowSADQCOM = 4501, + SpvOpImageBlockMatchGatherSSDQCOM = 4502, + SpvOpImageBlockMatchGatherSADQCOM = 4503, SpvOpGroupIAddNonUniformAMD = 5000, SpvOpGroupFAddNonUniformAMD = 5001, SpvOpGroupFMinNonUniformAMD = 5002, @@ -1571,9 +1831,51 @@ typedef enum SpvOp_ { SpvOpFragmentMaskFetchAMD = 5011, SpvOpFragmentFetchAMD = 5012, SpvOpReadClockKHR = 5056, + SpvOpFinalizeNodePayloadsAMDX = 5075, + SpvOpFinishWritingNodePayloadAMDX = 5078, + SpvOpInitializeNodePayloadsAMDX = 5090, + SpvOpGroupNonUniformQuadAllKHR = 5110, + SpvOpGroupNonUniformQuadAnyKHR = 5111, + SpvOpHitObjectRecordHitMotionNV = 5249, + SpvOpHitObjectRecordHitWithIndexMotionNV = 5250, + SpvOpHitObjectRecordMissMotionNV = 5251, + SpvOpHitObjectGetWorldToObjectNV = 5252, + SpvOpHitObjectGetObjectToWorldNV = 5253, + SpvOpHitObjectGetObjectRayDirectionNV = 5254, + SpvOpHitObjectGetObjectRayOriginNV = 5255, + SpvOpHitObjectTraceRayMotionNV = 5256, + SpvOpHitObjectGetShaderRecordBufferHandleNV = 5257, + SpvOpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + SpvOpHitObjectRecordEmptyNV = 5259, + SpvOpHitObjectTraceRayNV = 5260, + SpvOpHitObjectRecordHitNV = 5261, + SpvOpHitObjectRecordHitWithIndexNV = 5262, + SpvOpHitObjectRecordMissNV = 5263, + SpvOpHitObjectExecuteShaderNV = 5264, + SpvOpHitObjectGetCurrentTimeNV = 5265, + SpvOpHitObjectGetAttributesNV = 5266, + SpvOpHitObjectGetHitKindNV = 5267, + SpvOpHitObjectGetPrimitiveIndexNV = 5268, + SpvOpHitObjectGetGeometryIndexNV = 5269, + SpvOpHitObjectGetInstanceIdNV = 5270, + SpvOpHitObjectGetInstanceCustomIndexNV = 5271, + SpvOpHitObjectGetWorldRayDirectionNV = 5272, + SpvOpHitObjectGetWorldRayOriginNV = 5273, + SpvOpHitObjectGetRayTMaxNV = 5274, + SpvOpHitObjectGetRayTMinNV = 5275, + SpvOpHitObjectIsEmptyNV = 5276, + SpvOpHitObjectIsHitNV = 5277, + SpvOpHitObjectIsMissNV = 5278, + SpvOpReorderThreadWithHitObjectNV = 5279, + SpvOpReorderThreadWithHintNV = 5280, + SpvOpTypeHitObjectNV = 5281, SpvOpImageSampleFootprintNV = 5283, + SpvOpEmitMeshTasksEXT = 5294, + SpvOpSetMeshOutputsEXT = 5295, SpvOpGroupNonUniformPartitionNV = 5296, SpvOpWritePackedPrimitiveIndices4x8NV = 5299, + SpvOpFetchMicroTriangleVertexPositionNV = 5300, + SpvOpFetchMicroTriangleVertexBarycentricNV = 5301, SpvOpReportIntersectionKHR = 5334, SpvOpReportIntersectionNV = 5334, SpvOpIgnoreIntersectionNV = 5335, @@ -1581,6 +1883,7 @@ typedef enum SpvOp_ { SpvOpTraceNV = 5337, SpvOpTraceMotionNV = 5338, SpvOpTraceRayMotionNV = 5339, + SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, SpvOpTypeAccelerationStructureKHR = 5341, SpvOpTypeAccelerationStructureNV = 5341, SpvOpExecuteCallableNV = 5344, @@ -1601,6 +1904,7 @@ typedef enum SpvOp_ { SpvOpConvertUToSampledImageNV = 5395, SpvOpConvertSampledImageToUNV = 5396, SpvOpSamplerImageAddressingModeNV = 5397, + SpvOpRawAccessChainNV = 5398, SpvOpSubgroupShuffleINTEL = 5571, SpvOpSubgroupShuffleDownINTEL = 5572, SpvOpSubgroupShuffleUpINTEL = 5573, @@ -1801,6 +2105,9 @@ typedef enum SpvOp_ { SpvOpArbitraryFloatPowRINTEL = 5881, SpvOpArbitraryFloatPowNINTEL = 5882, SpvOpLoopControlINTEL = 5887, + SpvOpAliasDomainDeclINTEL = 5911, + SpvOpAliasScopeDeclINTEL = 5912, + SpvOpAliasScopeListDeclINTEL = 5913, SpvOpFixedSqrtINTEL = 5923, SpvOpFixedRecipINTEL = 5924, SpvOpFixedRsqrtINTEL = 5925, @@ -1839,10 +2146,28 @@ typedef enum SpvOp_ { SpvOpTypeStructContinuedINTEL = 6090, SpvOpConstantCompositeContinuedINTEL = 6091, SpvOpSpecConstantCompositeContinuedINTEL = 6092, + SpvOpCompositeConstructContinuedINTEL = 6096, + SpvOpConvertFToBF16INTEL = 6116, + SpvOpConvertBF16ToFINTEL = 6117, + SpvOpControlBarrierArriveINTEL = 6142, + SpvOpControlBarrierWaitINTEL = 6143, + SpvOpGroupIMulKHR = 6401, + SpvOpGroupFMulKHR = 6402, + SpvOpGroupBitwiseAndKHR = 6403, + SpvOpGroupBitwiseOrKHR = 6404, + SpvOpGroupBitwiseXorKHR = 6405, + SpvOpGroupLogicalAndKHR = 6406, + SpvOpGroupLogicalOrKHR = 6407, + SpvOpGroupLogicalXorKHR = 6408, + SpvOpMaskedGatherINTEL = 6428, + SpvOpMaskedScatterINTEL = 6429, SpvOpMax = 0x7fffffff, } SpvOp; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2191,13 +2516,18 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpPtrEqual: *hasResult = true; *hasResultType = true; break; case SpvOpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case SpvOpPtrDiff: *hasResult = true; *hasResultType = true; break; + case SpvOpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case SpvOpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case SpvOpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case SpvOpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case SpvOpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2209,6 +2539,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpSDotAccSat: *hasResult = true; *hasResultType = true; break; case SpvOpUDotAccSat: *hasResult = true; *hasResultType = true; break; case SpvOpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case SpvOpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case SpvOpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case SpvOpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2216,6 +2554,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case SpvOpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2227,16 +2573,59 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case SpvOpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case SpvOpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case SpvOpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case SpvOpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case SpvOpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case SpvOpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case SpvOpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case SpvOpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case SpvOpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case SpvOpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case SpvOpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case SpvOpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case SpvOpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case SpvOpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2254,6 +2643,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case SpvOpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case SpvOpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case SpvOpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2452,6 +2842,9 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case SpvOpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case SpvOpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case SpvOpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case SpvOpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2490,8 +2883,1804 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case SpvOpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case SpvOpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case SpvOpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; + } +} +inline const char* SpvSourceLanguageToString(SpvSourceLanguage value) { + switch (value) { + case SpvSourceLanguageUnknown: return "Unknown"; + case SpvSourceLanguageESSL: return "ESSL"; + case SpvSourceLanguageGLSL: return "GLSL"; + case SpvSourceLanguageOpenCL_C: return "OpenCL_C"; + case SpvSourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SpvSourceLanguageHLSL: return "HLSL"; + case SpvSourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SpvSourceLanguageSYCL: return "SYCL"; + case SpvSourceLanguageHERO_C: return "HERO_C"; + case SpvSourceLanguageNZSL: return "NZSL"; + case SpvSourceLanguageWGSL: return "WGSL"; + case SpvSourceLanguageSlang: return "Slang"; + case SpvSourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* SpvExecutionModelToString(SpvExecutionModel value) { + switch (value) { + case SpvExecutionModelVertex: return "Vertex"; + case SpvExecutionModelTessellationControl: return "TessellationControl"; + case SpvExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case SpvExecutionModelGeometry: return "Geometry"; + case SpvExecutionModelFragment: return "Fragment"; + case SpvExecutionModelGLCompute: return "GLCompute"; + case SpvExecutionModelKernel: return "Kernel"; + case SpvExecutionModelTaskNV: return "TaskNV"; + case SpvExecutionModelMeshNV: return "MeshNV"; + case SpvExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case SpvExecutionModelIntersectionKHR: return "IntersectionKHR"; + case SpvExecutionModelAnyHitKHR: return "AnyHitKHR"; + case SpvExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case SpvExecutionModelMissKHR: return "MissKHR"; + case SpvExecutionModelCallableKHR: return "CallableKHR"; + case SpvExecutionModelTaskEXT: return "TaskEXT"; + case SpvExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* SpvAddressingModelToString(SpvAddressingModel value) { + switch (value) { + case SpvAddressingModelLogical: return "Logical"; + case SpvAddressingModelPhysical32: return "Physical32"; + case SpvAddressingModelPhysical64: return "Physical64"; + case SpvAddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* SpvMemoryModelToString(SpvMemoryModel value) { + switch (value) { + case SpvMemoryModelSimple: return "Simple"; + case SpvMemoryModelGLSL450: return "GLSL450"; + case SpvMemoryModelOpenCL: return "OpenCL"; + case SpvMemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* SpvExecutionModeToString(SpvExecutionMode value) { + switch (value) { + case SpvExecutionModeInvocations: return "Invocations"; + case SpvExecutionModeSpacingEqual: return "SpacingEqual"; + case SpvExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case SpvExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case SpvExecutionModeVertexOrderCw: return "VertexOrderCw"; + case SpvExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case SpvExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case SpvExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case SpvExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case SpvExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case SpvExecutionModePointMode: return "PointMode"; + case SpvExecutionModeXfb: return "Xfb"; + case SpvExecutionModeDepthReplacing: return "DepthReplacing"; + case SpvExecutionModeDepthGreater: return "DepthGreater"; + case SpvExecutionModeDepthLess: return "DepthLess"; + case SpvExecutionModeDepthUnchanged: return "DepthUnchanged"; + case SpvExecutionModeLocalSize: return "LocalSize"; + case SpvExecutionModeLocalSizeHint: return "LocalSizeHint"; + case SpvExecutionModeInputPoints: return "InputPoints"; + case SpvExecutionModeInputLines: return "InputLines"; + case SpvExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case SpvExecutionModeTriangles: return "Triangles"; + case SpvExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case SpvExecutionModeQuads: return "Quads"; + case SpvExecutionModeIsolines: return "Isolines"; + case SpvExecutionModeOutputVertices: return "OutputVertices"; + case SpvExecutionModeOutputPoints: return "OutputPoints"; + case SpvExecutionModeOutputLineStrip: return "OutputLineStrip"; + case SpvExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case SpvExecutionModeVecTypeHint: return "VecTypeHint"; + case SpvExecutionModeContractionOff: return "ContractionOff"; + case SpvExecutionModeInitializer: return "Initializer"; + case SpvExecutionModeFinalizer: return "Finalizer"; + case SpvExecutionModeSubgroupSize: return "SubgroupSize"; + case SpvExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case SpvExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case SpvExecutionModeLocalSizeId: return "LocalSizeId"; + case SpvExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case SpvExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case SpvExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case SpvExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case SpvExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case SpvExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case SpvExecutionModeDenormPreserve: return "DenormPreserve"; + case SpvExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case SpvExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case SpvExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case SpvExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case SpvExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case SpvExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case SpvExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case SpvExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case SpvExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case SpvExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case SpvExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case SpvExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case SpvExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case SpvExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case SpvExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case SpvExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case SpvExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case SpvExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case SpvExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case SpvExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case SpvExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case SpvExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case SpvExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case SpvExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case SpvExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case SpvExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case SpvExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case SpvExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case SpvExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case SpvExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case SpvExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case SpvExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case SpvExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case SpvExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case SpvExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case SpvExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case SpvExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case SpvExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case SpvExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case SpvExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case SpvExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case SpvExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case SpvExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case SpvExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case SpvExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case SpvExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case SpvExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case SpvExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvStorageClassToString(SpvStorageClass value) { + switch (value) { + case SpvStorageClassUniformConstant: return "UniformConstant"; + case SpvStorageClassInput: return "Input"; + case SpvStorageClassUniform: return "Uniform"; + case SpvStorageClassOutput: return "Output"; + case SpvStorageClassWorkgroup: return "Workgroup"; + case SpvStorageClassCrossWorkgroup: return "CrossWorkgroup"; + case SpvStorageClassPrivate: return "Private"; + case SpvStorageClassFunction: return "Function"; + case SpvStorageClassGeneric: return "Generic"; + case SpvStorageClassPushConstant: return "PushConstant"; + case SpvStorageClassAtomicCounter: return "AtomicCounter"; + case SpvStorageClassImage: return "Image"; + case SpvStorageClassStorageBuffer: return "StorageBuffer"; + case SpvStorageClassTileImageEXT: return "TileImageEXT"; + case SpvStorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case SpvStorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case SpvStorageClassCallableDataKHR: return "CallableDataKHR"; + case SpvStorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case SpvStorageClassRayPayloadKHR: return "RayPayloadKHR"; + case SpvStorageClassHitAttributeKHR: return "HitAttributeKHR"; + case SpvStorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case SpvStorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case SpvStorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case SpvStorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case SpvStorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case SpvStorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case SpvStorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case SpvStorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvDimToString(SpvDim value) { + switch (value) { + case SpvDim1D: return "1D"; + case SpvDim2D: return "2D"; + case SpvDim3D: return "3D"; + case SpvDimCube: return "Cube"; + case SpvDimRect: return "Rect"; + case SpvDimBuffer: return "Buffer"; + case SpvDimSubpassData: return "SubpassData"; + case SpvDimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SpvSamplerAddressingModeToString(SpvSamplerAddressingMode value) { + switch (value) { + case SpvSamplerAddressingModeNone: return "None"; + case SpvSamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SpvSamplerAddressingModeClamp: return "Clamp"; + case SpvSamplerAddressingModeRepeat: return "Repeat"; + case SpvSamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SpvSamplerFilterModeToString(SpvSamplerFilterMode value) { + switch (value) { + case SpvSamplerFilterModeNearest: return "Nearest"; + case SpvSamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* SpvImageFormatToString(SpvImageFormat value) { + switch (value) { + case SpvImageFormatUnknown: return "Unknown"; + case SpvImageFormatRgba32f: return "Rgba32f"; + case SpvImageFormatRgba16f: return "Rgba16f"; + case SpvImageFormatR32f: return "R32f"; + case SpvImageFormatRgba8: return "Rgba8"; + case SpvImageFormatRgba8Snorm: return "Rgba8Snorm"; + case SpvImageFormatRg32f: return "Rg32f"; + case SpvImageFormatRg16f: return "Rg16f"; + case SpvImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case SpvImageFormatR16f: return "R16f"; + case SpvImageFormatRgba16: return "Rgba16"; + case SpvImageFormatRgb10A2: return "Rgb10A2"; + case SpvImageFormatRg16: return "Rg16"; + case SpvImageFormatRg8: return "Rg8"; + case SpvImageFormatR16: return "R16"; + case SpvImageFormatR8: return "R8"; + case SpvImageFormatRgba16Snorm: return "Rgba16Snorm"; + case SpvImageFormatRg16Snorm: return "Rg16Snorm"; + case SpvImageFormatRg8Snorm: return "Rg8Snorm"; + case SpvImageFormatR16Snorm: return "R16Snorm"; + case SpvImageFormatR8Snorm: return "R8Snorm"; + case SpvImageFormatRgba32i: return "Rgba32i"; + case SpvImageFormatRgba16i: return "Rgba16i"; + case SpvImageFormatRgba8i: return "Rgba8i"; + case SpvImageFormatR32i: return "R32i"; + case SpvImageFormatRg32i: return "Rg32i"; + case SpvImageFormatRg16i: return "Rg16i"; + case SpvImageFormatRg8i: return "Rg8i"; + case SpvImageFormatR16i: return "R16i"; + case SpvImageFormatR8i: return "R8i"; + case SpvImageFormatRgba32ui: return "Rgba32ui"; + case SpvImageFormatRgba16ui: return "Rgba16ui"; + case SpvImageFormatRgba8ui: return "Rgba8ui"; + case SpvImageFormatR32ui: return "R32ui"; + case SpvImageFormatRgb10a2ui: return "Rgb10a2ui"; + case SpvImageFormatRg32ui: return "Rg32ui"; + case SpvImageFormatRg16ui: return "Rg16ui"; + case SpvImageFormatRg8ui: return "Rg8ui"; + case SpvImageFormatR16ui: return "R16ui"; + case SpvImageFormatR8ui: return "R8ui"; + case SpvImageFormatR64ui: return "R64ui"; + case SpvImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* SpvImageChannelOrderToString(SpvImageChannelOrder value) { + switch (value) { + case SpvImageChannelOrderR: return "R"; + case SpvImageChannelOrderA: return "A"; + case SpvImageChannelOrderRG: return "RG"; + case SpvImageChannelOrderRA: return "RA"; + case SpvImageChannelOrderRGB: return "RGB"; + case SpvImageChannelOrderRGBA: return "RGBA"; + case SpvImageChannelOrderBGRA: return "BGRA"; + case SpvImageChannelOrderARGB: return "ARGB"; + case SpvImageChannelOrderIntensity: return "Intensity"; + case SpvImageChannelOrderLuminance: return "Luminance"; + case SpvImageChannelOrderRx: return "Rx"; + case SpvImageChannelOrderRGx: return "RGx"; + case SpvImageChannelOrderRGBx: return "RGBx"; + case SpvImageChannelOrderDepth: return "Depth"; + case SpvImageChannelOrderDepthStencil: return "DepthStencil"; + case SpvImageChannelOrdersRGB: return "sRGB"; + case SpvImageChannelOrdersRGBx: return "sRGBx"; + case SpvImageChannelOrdersRGBA: return "sRGBA"; + case SpvImageChannelOrdersBGRA: return "sBGRA"; + case SpvImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* SpvImageChannelDataTypeToString(SpvImageChannelDataType value) { + switch (value) { + case SpvImageChannelDataTypeSnormInt8: return "SnormInt8"; + case SpvImageChannelDataTypeSnormInt16: return "SnormInt16"; + case SpvImageChannelDataTypeUnormInt8: return "UnormInt8"; + case SpvImageChannelDataTypeUnormInt16: return "UnormInt16"; + case SpvImageChannelDataTypeUnormShort565: return "UnormShort565"; + case SpvImageChannelDataTypeUnormShort555: return "UnormShort555"; + case SpvImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case SpvImageChannelDataTypeSignedInt8: return "SignedInt8"; + case SpvImageChannelDataTypeSignedInt16: return "SignedInt16"; + case SpvImageChannelDataTypeSignedInt32: return "SignedInt32"; + case SpvImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case SpvImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case SpvImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case SpvImageChannelDataTypeHalfFloat: return "HalfFloat"; + case SpvImageChannelDataTypeFloat: return "Float"; + case SpvImageChannelDataTypeUnormInt24: return "UnormInt24"; + case SpvImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case SpvImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case SpvImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; } } + +inline const char* SpvFPRoundingModeToString(SpvFPRoundingMode value) { + switch (value) { + case SpvFPRoundingModeRTE: return "RTE"; + case SpvFPRoundingModeRTZ: return "RTZ"; + case SpvFPRoundingModeRTP: return "RTP"; + case SpvFPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* SpvLinkageTypeToString(SpvLinkageType value) { + switch (value) { + case SpvLinkageTypeExport: return "Export"; + case SpvLinkageTypeImport: return "Import"; + case SpvLinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; + } +} + +inline const char* SpvAccessQualifierToString(SpvAccessQualifier value) { + switch (value) { + case SpvAccessQualifierReadOnly: return "ReadOnly"; + case SpvAccessQualifierWriteOnly: return "WriteOnly"; + case SpvAccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* SpvFunctionParameterAttributeToString(SpvFunctionParameterAttribute value) { + switch (value) { + case SpvFunctionParameterAttributeZext: return "Zext"; + case SpvFunctionParameterAttributeSext: return "Sext"; + case SpvFunctionParameterAttributeByVal: return "ByVal"; + case SpvFunctionParameterAttributeSret: return "Sret"; + case SpvFunctionParameterAttributeNoAlias: return "NoAlias"; + case SpvFunctionParameterAttributeNoCapture: return "NoCapture"; + case SpvFunctionParameterAttributeNoWrite: return "NoWrite"; + case SpvFunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case SpvFunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvDecorationToString(SpvDecoration value) { + switch (value) { + case SpvDecorationRelaxedPrecision: return "RelaxedPrecision"; + case SpvDecorationSpecId: return "SpecId"; + case SpvDecorationBlock: return "Block"; + case SpvDecorationBufferBlock: return "BufferBlock"; + case SpvDecorationRowMajor: return "RowMajor"; + case SpvDecorationColMajor: return "ColMajor"; + case SpvDecorationArrayStride: return "ArrayStride"; + case SpvDecorationMatrixStride: return "MatrixStride"; + case SpvDecorationGLSLShared: return "GLSLShared"; + case SpvDecorationGLSLPacked: return "GLSLPacked"; + case SpvDecorationCPacked: return "CPacked"; + case SpvDecorationBuiltIn: return "BuiltIn"; + case SpvDecorationNoPerspective: return "NoPerspective"; + case SpvDecorationFlat: return "Flat"; + case SpvDecorationPatch: return "Patch"; + case SpvDecorationCentroid: return "Centroid"; + case SpvDecorationSample: return "Sample"; + case SpvDecorationInvariant: return "Invariant"; + case SpvDecorationRestrict: return "Restrict"; + case SpvDecorationAliased: return "Aliased"; + case SpvDecorationVolatile: return "Volatile"; + case SpvDecorationConstant: return "Constant"; + case SpvDecorationCoherent: return "Coherent"; + case SpvDecorationNonWritable: return "NonWritable"; + case SpvDecorationNonReadable: return "NonReadable"; + case SpvDecorationUniform: return "Uniform"; + case SpvDecorationUniformId: return "UniformId"; + case SpvDecorationSaturatedConversion: return "SaturatedConversion"; + case SpvDecorationStream: return "Stream"; + case SpvDecorationLocation: return "Location"; + case SpvDecorationComponent: return "Component"; + case SpvDecorationIndex: return "Index"; + case SpvDecorationBinding: return "Binding"; + case SpvDecorationDescriptorSet: return "DescriptorSet"; + case SpvDecorationOffset: return "Offset"; + case SpvDecorationXfbBuffer: return "XfbBuffer"; + case SpvDecorationXfbStride: return "XfbStride"; + case SpvDecorationFuncParamAttr: return "FuncParamAttr"; + case SpvDecorationFPRoundingMode: return "FPRoundingMode"; + case SpvDecorationFPFastMathMode: return "FPFastMathMode"; + case SpvDecorationLinkageAttributes: return "LinkageAttributes"; + case SpvDecorationNoContraction: return "NoContraction"; + case SpvDecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case SpvDecorationAlignment: return "Alignment"; + case SpvDecorationMaxByteOffset: return "MaxByteOffset"; + case SpvDecorationAlignmentId: return "AlignmentId"; + case SpvDecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case SpvDecorationNoSignedWrap: return "NoSignedWrap"; + case SpvDecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case SpvDecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case SpvDecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case SpvDecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case SpvDecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case SpvDecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case SpvDecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case SpvDecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case SpvDecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case SpvDecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case SpvDecorationPassthroughNV: return "PassthroughNV"; + case SpvDecorationViewportRelativeNV: return "ViewportRelativeNV"; + case SpvDecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case SpvDecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case SpvDecorationPerViewNV: return "PerViewNV"; + case SpvDecorationPerTaskNV: return "PerTaskNV"; + case SpvDecorationPerVertexKHR: return "PerVertexKHR"; + case SpvDecorationNonUniform: return "NonUniform"; + case SpvDecorationRestrictPointer: return "RestrictPointer"; + case SpvDecorationAliasedPointer: return "AliasedPointer"; + case SpvDecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case SpvDecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case SpvDecorationBindlessImageNV: return "BindlessImageNV"; + case SpvDecorationBoundSamplerNV: return "BoundSamplerNV"; + case SpvDecorationBoundImageNV: return "BoundImageNV"; + case SpvDecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case SpvDecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case SpvDecorationClobberINTEL: return "ClobberINTEL"; + case SpvDecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case SpvDecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case SpvDecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case SpvDecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case SpvDecorationStackCallINTEL: return "StackCallINTEL"; + case SpvDecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case SpvDecorationCounterBuffer: return "CounterBuffer"; + case SpvDecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case SpvDecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case SpvDecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case SpvDecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case SpvDecorationRegisterINTEL: return "RegisterINTEL"; + case SpvDecorationMemoryINTEL: return "MemoryINTEL"; + case SpvDecorationNumbanksINTEL: return "NumbanksINTEL"; + case SpvDecorationBankwidthINTEL: return "BankwidthINTEL"; + case SpvDecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case SpvDecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case SpvDecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case SpvDecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case SpvDecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case SpvDecorationMergeINTEL: return "MergeINTEL"; + case SpvDecorationBankBitsINTEL: return "BankBitsINTEL"; + case SpvDecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case SpvDecorationStridesizeINTEL: return "StridesizeINTEL"; + case SpvDecorationWordsizeINTEL: return "WordsizeINTEL"; + case SpvDecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case SpvDecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case SpvDecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case SpvDecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case SpvDecorationPrefetchINTEL: return "PrefetchINTEL"; + case SpvDecorationStallEnableINTEL: return "StallEnableINTEL"; + case SpvDecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case SpvDecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case SpvDecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case SpvDecorationNoAliasINTEL: return "NoAliasINTEL"; + case SpvDecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case SpvDecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case SpvDecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case SpvDecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case SpvDecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case SpvDecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case SpvDecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case SpvDecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case SpvDecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case SpvDecorationStallFreeINTEL: return "StallFreeINTEL"; + case SpvDecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case SpvDecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case SpvDecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case SpvDecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case SpvDecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case SpvDecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case SpvDecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case SpvDecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case SpvDecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case SpvDecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case SpvDecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case SpvDecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case SpvDecorationHostAccessINTEL: return "HostAccessINTEL"; + case SpvDecorationInitModeINTEL: return "InitModeINTEL"; + case SpvDecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case SpvDecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case SpvDecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvBuiltInToString(SpvBuiltIn value) { + switch (value) { + case SpvBuiltInPosition: return "Position"; + case SpvBuiltInPointSize: return "PointSize"; + case SpvBuiltInClipDistance: return "ClipDistance"; + case SpvBuiltInCullDistance: return "CullDistance"; + case SpvBuiltInVertexId: return "VertexId"; + case SpvBuiltInInstanceId: return "InstanceId"; + case SpvBuiltInPrimitiveId: return "PrimitiveId"; + case SpvBuiltInInvocationId: return "InvocationId"; + case SpvBuiltInLayer: return "Layer"; + case SpvBuiltInViewportIndex: return "ViewportIndex"; + case SpvBuiltInTessLevelOuter: return "TessLevelOuter"; + case SpvBuiltInTessLevelInner: return "TessLevelInner"; + case SpvBuiltInTessCoord: return "TessCoord"; + case SpvBuiltInPatchVertices: return "PatchVertices"; + case SpvBuiltInFragCoord: return "FragCoord"; + case SpvBuiltInPointCoord: return "PointCoord"; + case SpvBuiltInFrontFacing: return "FrontFacing"; + case SpvBuiltInSampleId: return "SampleId"; + case SpvBuiltInSamplePosition: return "SamplePosition"; + case SpvBuiltInSampleMask: return "SampleMask"; + case SpvBuiltInFragDepth: return "FragDepth"; + case SpvBuiltInHelperInvocation: return "HelperInvocation"; + case SpvBuiltInNumWorkgroups: return "NumWorkgroups"; + case SpvBuiltInWorkgroupSize: return "WorkgroupSize"; + case SpvBuiltInWorkgroupId: return "WorkgroupId"; + case SpvBuiltInLocalInvocationId: return "LocalInvocationId"; + case SpvBuiltInGlobalInvocationId: return "GlobalInvocationId"; + case SpvBuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case SpvBuiltInWorkDim: return "WorkDim"; + case SpvBuiltInGlobalSize: return "GlobalSize"; + case SpvBuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case SpvBuiltInGlobalOffset: return "GlobalOffset"; + case SpvBuiltInGlobalLinearId: return "GlobalLinearId"; + case SpvBuiltInSubgroupSize: return "SubgroupSize"; + case SpvBuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case SpvBuiltInNumSubgroups: return "NumSubgroups"; + case SpvBuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case SpvBuiltInSubgroupId: return "SubgroupId"; + case SpvBuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case SpvBuiltInVertexIndex: return "VertexIndex"; + case SpvBuiltInInstanceIndex: return "InstanceIndex"; + case SpvBuiltInCoreIDARM: return "CoreIDARM"; + case SpvBuiltInCoreCountARM: return "CoreCountARM"; + case SpvBuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case SpvBuiltInWarpIDARM: return "WarpIDARM"; + case SpvBuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case SpvBuiltInSubgroupEqMask: return "SubgroupEqMask"; + case SpvBuiltInSubgroupGeMask: return "SubgroupGeMask"; + case SpvBuiltInSubgroupGtMask: return "SubgroupGtMask"; + case SpvBuiltInSubgroupLeMask: return "SubgroupLeMask"; + case SpvBuiltInSubgroupLtMask: return "SubgroupLtMask"; + case SpvBuiltInBaseVertex: return "BaseVertex"; + case SpvBuiltInBaseInstance: return "BaseInstance"; + case SpvBuiltInDrawIndex: return "DrawIndex"; + case SpvBuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case SpvBuiltInDeviceIndex: return "DeviceIndex"; + case SpvBuiltInViewIndex: return "ViewIndex"; + case SpvBuiltInShadingRateKHR: return "ShadingRateKHR"; + case SpvBuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case SpvBuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case SpvBuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case SpvBuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case SpvBuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case SpvBuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case SpvBuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case SpvBuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case SpvBuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case SpvBuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case SpvBuiltInViewportMaskNV: return "ViewportMaskNV"; + case SpvBuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case SpvBuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case SpvBuiltInPositionPerViewNV: return "PositionPerViewNV"; + case SpvBuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case SpvBuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case SpvBuiltInTaskCountNV: return "TaskCountNV"; + case SpvBuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case SpvBuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case SpvBuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case SpvBuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case SpvBuiltInLayerPerViewNV: return "LayerPerViewNV"; + case SpvBuiltInMeshViewCountNV: return "MeshViewCountNV"; + case SpvBuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case SpvBuiltInBaryCoordKHR: return "BaryCoordKHR"; + case SpvBuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case SpvBuiltInFragSizeEXT: return "FragSizeEXT"; + case SpvBuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case SpvBuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case SpvBuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case SpvBuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case SpvBuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case SpvBuiltInLaunchIdKHR: return "LaunchIdKHR"; + case SpvBuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case SpvBuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case SpvBuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case SpvBuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case SpvBuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case SpvBuiltInRayTminKHR: return "RayTminKHR"; + case SpvBuiltInRayTmaxKHR: return "RayTmaxKHR"; + case SpvBuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case SpvBuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case SpvBuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case SpvBuiltInHitTNV: return "HitTNV"; + case SpvBuiltInHitKindKHR: return "HitKindKHR"; + case SpvBuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case SpvBuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case SpvBuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case SpvBuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case SpvBuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case SpvBuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case SpvBuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case SpvBuiltInSMCountNV: return "SMCountNV"; + case SpvBuiltInWarpIDNV: return "WarpIDNV"; + case SpvBuiltInSMIDNV: return "SMIDNV"; + case SpvBuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case SpvBuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case SpvBuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvScopeToString(SpvScope value) { + switch (value) { + case SpvScopeCrossDevice: return "CrossDevice"; + case SpvScopeDevice: return "Device"; + case SpvScopeWorkgroup: return "Workgroup"; + case SpvScopeSubgroup: return "Subgroup"; + case SpvScopeInvocation: return "Invocation"; + case SpvScopeQueueFamily: return "QueueFamily"; + case SpvScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvGroupOperationToString(SpvGroupOperation value) { + switch (value) { + case SpvGroupOperationReduce: return "Reduce"; + case SpvGroupOperationInclusiveScan: return "InclusiveScan"; + case SpvGroupOperationExclusiveScan: return "ExclusiveScan"; + case SpvGroupOperationClusteredReduce: return "ClusteredReduce"; + case SpvGroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case SpvGroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case SpvGroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* SpvKernelEnqueueFlagsToString(SpvKernelEnqueueFlags value) { + switch (value) { + case SpvKernelEnqueueFlagsNoWait: return "NoWait"; + case SpvKernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case SpvKernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* SpvCapabilityToString(SpvCapability value) { + switch (value) { + case SpvCapabilityMatrix: return "Matrix"; + case SpvCapabilityShader: return "Shader"; + case SpvCapabilityGeometry: return "Geometry"; + case SpvCapabilityTessellation: return "Tessellation"; + case SpvCapabilityAddresses: return "Addresses"; + case SpvCapabilityLinkage: return "Linkage"; + case SpvCapabilityKernel: return "Kernel"; + case SpvCapabilityVector16: return "Vector16"; + case SpvCapabilityFloat16Buffer: return "Float16Buffer"; + case SpvCapabilityFloat16: return "Float16"; + case SpvCapabilityFloat64: return "Float64"; + case SpvCapabilityInt64: return "Int64"; + case SpvCapabilityInt64Atomics: return "Int64Atomics"; + case SpvCapabilityImageBasic: return "ImageBasic"; + case SpvCapabilityImageReadWrite: return "ImageReadWrite"; + case SpvCapabilityImageMipmap: return "ImageMipmap"; + case SpvCapabilityPipes: return "Pipes"; + case SpvCapabilityGroups: return "Groups"; + case SpvCapabilityDeviceEnqueue: return "DeviceEnqueue"; + case SpvCapabilityLiteralSampler: return "LiteralSampler"; + case SpvCapabilityAtomicStorage: return "AtomicStorage"; + case SpvCapabilityInt16: return "Int16"; + case SpvCapabilityTessellationPointSize: return "TessellationPointSize"; + case SpvCapabilityGeometryPointSize: return "GeometryPointSize"; + case SpvCapabilityImageGatherExtended: return "ImageGatherExtended"; + case SpvCapabilityStorageImageMultisample: return "StorageImageMultisample"; + case SpvCapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case SpvCapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case SpvCapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case SpvCapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case SpvCapabilityClipDistance: return "ClipDistance"; + case SpvCapabilityCullDistance: return "CullDistance"; + case SpvCapabilityImageCubeArray: return "ImageCubeArray"; + case SpvCapabilitySampleRateShading: return "SampleRateShading"; + case SpvCapabilityImageRect: return "ImageRect"; + case SpvCapabilitySampledRect: return "SampledRect"; + case SpvCapabilityGenericPointer: return "GenericPointer"; + case SpvCapabilityInt8: return "Int8"; + case SpvCapabilityInputAttachment: return "InputAttachment"; + case SpvCapabilitySparseResidency: return "SparseResidency"; + case SpvCapabilityMinLod: return "MinLod"; + case SpvCapabilitySampled1D: return "Sampled1D"; + case SpvCapabilityImage1D: return "Image1D"; + case SpvCapabilitySampledCubeArray: return "SampledCubeArray"; + case SpvCapabilitySampledBuffer: return "SampledBuffer"; + case SpvCapabilityImageBuffer: return "ImageBuffer"; + case SpvCapabilityImageMSArray: return "ImageMSArray"; + case SpvCapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case SpvCapabilityImageQuery: return "ImageQuery"; + case SpvCapabilityDerivativeControl: return "DerivativeControl"; + case SpvCapabilityInterpolationFunction: return "InterpolationFunction"; + case SpvCapabilityTransformFeedback: return "TransformFeedback"; + case SpvCapabilityGeometryStreams: return "GeometryStreams"; + case SpvCapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case SpvCapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case SpvCapabilityMultiViewport: return "MultiViewport"; + case SpvCapabilitySubgroupDispatch: return "SubgroupDispatch"; + case SpvCapabilityNamedBarrier: return "NamedBarrier"; + case SpvCapabilityPipeStorage: return "PipeStorage"; + case SpvCapabilityGroupNonUniform: return "GroupNonUniform"; + case SpvCapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case SpvCapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case SpvCapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case SpvCapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case SpvCapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case SpvCapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case SpvCapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case SpvCapabilityShaderLayer: return "ShaderLayer"; + case SpvCapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case SpvCapabilityUniformDecoration: return "UniformDecoration"; + case SpvCapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case SpvCapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case SpvCapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case SpvCapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case SpvCapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case SpvCapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case SpvCapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case SpvCapabilityDrawParameters: return "DrawParameters"; + case SpvCapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case SpvCapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case SpvCapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case SpvCapabilityStorageUniform16: return "StorageUniform16"; + case SpvCapabilityStoragePushConstant16: return "StoragePushConstant16"; + case SpvCapabilityStorageInputOutput16: return "StorageInputOutput16"; + case SpvCapabilityDeviceGroup: return "DeviceGroup"; + case SpvCapabilityMultiView: return "MultiView"; + case SpvCapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case SpvCapabilityVariablePointers: return "VariablePointers"; + case SpvCapabilityAtomicStorageOps: return "AtomicStorageOps"; + case SpvCapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case SpvCapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case SpvCapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case SpvCapabilityStoragePushConstant8: return "StoragePushConstant8"; + case SpvCapabilityDenormPreserve: return "DenormPreserve"; + case SpvCapabilityDenormFlushToZero: return "DenormFlushToZero"; + case SpvCapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case SpvCapabilityRoundingModeRTE: return "RoundingModeRTE"; + case SpvCapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case SpvCapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case SpvCapabilityRayQueryKHR: return "RayQueryKHR"; + case SpvCapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case SpvCapabilityRayTracingKHR: return "RayTracingKHR"; + case SpvCapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case SpvCapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case SpvCapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case SpvCapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case SpvCapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case SpvCapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case SpvCapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case SpvCapabilityStencilExportEXT: return "StencilExportEXT"; + case SpvCapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case SpvCapabilityInt64ImageEXT: return "Int64ImageEXT"; + case SpvCapabilityShaderClockKHR: return "ShaderClockKHR"; + case SpvCapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case SpvCapabilityQuadControlKHR: return "QuadControlKHR"; + case SpvCapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case SpvCapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case SpvCapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case SpvCapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case SpvCapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case SpvCapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case SpvCapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case SpvCapabilityMeshShadingNV: return "MeshShadingNV"; + case SpvCapabilityImageFootprintNV: return "ImageFootprintNV"; + case SpvCapabilityMeshShadingEXT: return "MeshShadingEXT"; + case SpvCapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case SpvCapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case SpvCapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case SpvCapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case SpvCapabilityShaderNonUniform: return "ShaderNonUniform"; + case SpvCapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case SpvCapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case SpvCapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case SpvCapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case SpvCapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case SpvCapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case SpvCapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case SpvCapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case SpvCapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case SpvCapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case SpvCapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case SpvCapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case SpvCapabilityRayTracingNV: return "RayTracingNV"; + case SpvCapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case SpvCapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case SpvCapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case SpvCapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case SpvCapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case SpvCapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case SpvCapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case SpvCapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case SpvCapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case SpvCapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case SpvCapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case SpvCapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case SpvCapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case SpvCapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case SpvCapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case SpvCapabilityBindlessTextureNV: return "BindlessTextureNV"; + case SpvCapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case SpvCapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case SpvCapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case SpvCapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case SpvCapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case SpvCapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case SpvCapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case SpvCapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case SpvCapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case SpvCapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case SpvCapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case SpvCapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case SpvCapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case SpvCapabilityAsmINTEL: return "AsmINTEL"; + case SpvCapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case SpvCapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case SpvCapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case SpvCapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case SpvCapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case SpvCapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case SpvCapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case SpvCapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case SpvCapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case SpvCapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case SpvCapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case SpvCapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case SpvCapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case SpvCapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case SpvCapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case SpvCapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case SpvCapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case SpvCapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case SpvCapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case SpvCapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case SpvCapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case SpvCapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case SpvCapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case SpvCapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case SpvCapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case SpvCapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case SpvCapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case SpvCapabilityIOPipesINTEL: return "IOPipesINTEL"; + case SpvCapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case SpvCapabilityFPGARegINTEL: return "FPGARegINTEL"; + case SpvCapabilityDotProductInputAll: return "DotProductInputAll"; + case SpvCapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case SpvCapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case SpvCapabilityDotProduct: return "DotProduct"; + case SpvCapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case SpvCapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case SpvCapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case SpvCapabilityBitInstructions: return "BitInstructions"; + case SpvCapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case SpvCapabilityFloatControls2: return "FloatControls2"; + case SpvCapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case SpvCapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case SpvCapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case SpvCapabilityOptNoneINTEL: return "OptNoneINTEL"; + case SpvCapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case SpvCapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case SpvCapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case SpvCapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case SpvCapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case SpvCapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case SpvCapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case SpvCapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case SpvCapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case SpvCapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case SpvCapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case SpvCapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case SpvCapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case SpvCapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case SpvCapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryIntersectionToString(SpvRayQueryIntersection value) { + switch (value) { + case SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryCommittedIntersectionTypeToString(SpvRayQueryCommittedIntersectionType value) { + switch (value) { + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvRayQueryCandidateIntersectionTypeToString(SpvRayQueryCandidateIntersectionType value) { + switch (value) { + case SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvFPDenormModeToString(SpvFPDenormMode value) { + switch (value) { + case SpvFPDenormModePreserve: return "Preserve"; + case SpvFPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* SpvFPOperationModeToString(SpvFPOperationMode value) { + switch (value) { + case SpvFPOperationModeIEEE: return "IEEE"; + case SpvFPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* SpvQuantizationModesToString(SpvQuantizationModes value) { + switch (value) { + case SpvQuantizationModesTRN: return "TRN"; + case SpvQuantizationModesTRN_ZERO: return "TRN_ZERO"; + case SpvQuantizationModesRND: return "RND"; + case SpvQuantizationModesRND_ZERO: return "RND_ZERO"; + case SpvQuantizationModesRND_INF: return "RND_INF"; + case SpvQuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case SpvQuantizationModesRND_CONV: return "RND_CONV"; + case SpvQuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* SpvOverflowModesToString(SpvOverflowModes value) { + switch (value) { + case SpvOverflowModesWRAP: return "WRAP"; + case SpvOverflowModesSAT: return "SAT"; + case SpvOverflowModesSAT_ZERO: return "SAT_ZERO"; + case SpvOverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* SpvPackedVectorFormatToString(SpvPackedVectorFormat value) { + switch (value) { + case SpvPackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* SpvCooperativeMatrixLayoutToString(SpvCooperativeMatrixLayout value) { + switch (value) { + case SpvCooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case SpvCooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case SpvCooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case SpvCooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* SpvCooperativeMatrixUseToString(SpvCooperativeMatrixUse value) { + switch (value) { + case SpvCooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case SpvCooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case SpvCooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* SpvInitializationModeQualifierToString(SpvInitializationModeQualifier value) { + switch (value) { + case SpvInitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case SpvInitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvHostAccessQualifierToString(SpvHostAccessQualifier value) { + switch (value) { + case SpvHostAccessQualifierNoneINTEL: return "NoneINTEL"; + case SpvHostAccessQualifierReadINTEL: return "ReadINTEL"; + case SpvHostAccessQualifierWriteINTEL: return "WriteINTEL"; + case SpvHostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvLoadCacheControlToString(SpvLoadCacheControl value) { + switch (value) { + case SpvLoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case SpvLoadCacheControlCachedINTEL: return "CachedINTEL"; + case SpvLoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case SpvLoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case SpvLoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvStoreCacheControlToString(SpvStoreCacheControl value) { + switch (value) { + case SpvStoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case SpvStoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case SpvStoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case SpvStoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvNamedMaximumNumberOfRegistersToString(SpvNamedMaximumNumberOfRegisters value) { + switch (value) { + case SpvNamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* SpvOpToString(SpvOp value) { + switch (value) { + case SpvOpNop: return "OpNop"; + case SpvOpUndef: return "OpUndef"; + case SpvOpSourceContinued: return "OpSourceContinued"; + case SpvOpSource: return "OpSource"; + case SpvOpSourceExtension: return "OpSourceExtension"; + case SpvOpName: return "OpName"; + case SpvOpMemberName: return "OpMemberName"; + case SpvOpString: return "OpString"; + case SpvOpLine: return "OpLine"; + case SpvOpExtension: return "OpExtension"; + case SpvOpExtInstImport: return "OpExtInstImport"; + case SpvOpExtInst: return "OpExtInst"; + case SpvOpMemoryModel: return "OpMemoryModel"; + case SpvOpEntryPoint: return "OpEntryPoint"; + case SpvOpExecutionMode: return "OpExecutionMode"; + case SpvOpCapability: return "OpCapability"; + case SpvOpTypeVoid: return "OpTypeVoid"; + case SpvOpTypeBool: return "OpTypeBool"; + case SpvOpTypeInt: return "OpTypeInt"; + case SpvOpTypeFloat: return "OpTypeFloat"; + case SpvOpTypeVector: return "OpTypeVector"; + case SpvOpTypeMatrix: return "OpTypeMatrix"; + case SpvOpTypeImage: return "OpTypeImage"; + case SpvOpTypeSampler: return "OpTypeSampler"; + case SpvOpTypeSampledImage: return "OpTypeSampledImage"; + case SpvOpTypeArray: return "OpTypeArray"; + case SpvOpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case SpvOpTypeStruct: return "OpTypeStruct"; + case SpvOpTypeOpaque: return "OpTypeOpaque"; + case SpvOpTypePointer: return "OpTypePointer"; + case SpvOpTypeFunction: return "OpTypeFunction"; + case SpvOpTypeEvent: return "OpTypeEvent"; + case SpvOpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case SpvOpTypeReserveId: return "OpTypeReserveId"; + case SpvOpTypeQueue: return "OpTypeQueue"; + case SpvOpTypePipe: return "OpTypePipe"; + case SpvOpTypeForwardPointer: return "OpTypeForwardPointer"; + case SpvOpConstantTrue: return "OpConstantTrue"; + case SpvOpConstantFalse: return "OpConstantFalse"; + case SpvOpConstant: return "OpConstant"; + case SpvOpConstantComposite: return "OpConstantComposite"; + case SpvOpConstantSampler: return "OpConstantSampler"; + case SpvOpConstantNull: return "OpConstantNull"; + case SpvOpSpecConstantTrue: return "OpSpecConstantTrue"; + case SpvOpSpecConstantFalse: return "OpSpecConstantFalse"; + case SpvOpSpecConstant: return "OpSpecConstant"; + case SpvOpSpecConstantComposite: return "OpSpecConstantComposite"; + case SpvOpSpecConstantOp: return "OpSpecConstantOp"; + case SpvOpFunction: return "OpFunction"; + case SpvOpFunctionParameter: return "OpFunctionParameter"; + case SpvOpFunctionEnd: return "OpFunctionEnd"; + case SpvOpFunctionCall: return "OpFunctionCall"; + case SpvOpVariable: return "OpVariable"; + case SpvOpImageTexelPointer: return "OpImageTexelPointer"; + case SpvOpLoad: return "OpLoad"; + case SpvOpStore: return "OpStore"; + case SpvOpCopyMemory: return "OpCopyMemory"; + case SpvOpCopyMemorySized: return "OpCopyMemorySized"; + case SpvOpAccessChain: return "OpAccessChain"; + case SpvOpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case SpvOpPtrAccessChain: return "OpPtrAccessChain"; + case SpvOpArrayLength: return "OpArrayLength"; + case SpvOpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case SpvOpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case SpvOpDecorate: return "OpDecorate"; + case SpvOpMemberDecorate: return "OpMemberDecorate"; + case SpvOpDecorationGroup: return "OpDecorationGroup"; + case SpvOpGroupDecorate: return "OpGroupDecorate"; + case SpvOpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case SpvOpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case SpvOpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case SpvOpVectorShuffle: return "OpVectorShuffle"; + case SpvOpCompositeConstruct: return "OpCompositeConstruct"; + case SpvOpCompositeExtract: return "OpCompositeExtract"; + case SpvOpCompositeInsert: return "OpCompositeInsert"; + case SpvOpCopyObject: return "OpCopyObject"; + case SpvOpTranspose: return "OpTranspose"; + case SpvOpSampledImage: return "OpSampledImage"; + case SpvOpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case SpvOpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case SpvOpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case SpvOpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case SpvOpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case SpvOpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case SpvOpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case SpvOpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case SpvOpImageFetch: return "OpImageFetch"; + case SpvOpImageGather: return "OpImageGather"; + case SpvOpImageDrefGather: return "OpImageDrefGather"; + case SpvOpImageRead: return "OpImageRead"; + case SpvOpImageWrite: return "OpImageWrite"; + case SpvOpImage: return "OpImage"; + case SpvOpImageQueryFormat: return "OpImageQueryFormat"; + case SpvOpImageQueryOrder: return "OpImageQueryOrder"; + case SpvOpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case SpvOpImageQuerySize: return "OpImageQuerySize"; + case SpvOpImageQueryLod: return "OpImageQueryLod"; + case SpvOpImageQueryLevels: return "OpImageQueryLevels"; + case SpvOpImageQuerySamples: return "OpImageQuerySamples"; + case SpvOpConvertFToU: return "OpConvertFToU"; + case SpvOpConvertFToS: return "OpConvertFToS"; + case SpvOpConvertSToF: return "OpConvertSToF"; + case SpvOpConvertUToF: return "OpConvertUToF"; + case SpvOpUConvert: return "OpUConvert"; + case SpvOpSConvert: return "OpSConvert"; + case SpvOpFConvert: return "OpFConvert"; + case SpvOpQuantizeToF16: return "OpQuantizeToF16"; + case SpvOpConvertPtrToU: return "OpConvertPtrToU"; + case SpvOpSatConvertSToU: return "OpSatConvertSToU"; + case SpvOpSatConvertUToS: return "OpSatConvertUToS"; + case SpvOpConvertUToPtr: return "OpConvertUToPtr"; + case SpvOpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case SpvOpGenericCastToPtr: return "OpGenericCastToPtr"; + case SpvOpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case SpvOpBitcast: return "OpBitcast"; + case SpvOpSNegate: return "OpSNegate"; + case SpvOpFNegate: return "OpFNegate"; + case SpvOpIAdd: return "OpIAdd"; + case SpvOpFAdd: return "OpFAdd"; + case SpvOpISub: return "OpISub"; + case SpvOpFSub: return "OpFSub"; + case SpvOpIMul: return "OpIMul"; + case SpvOpFMul: return "OpFMul"; + case SpvOpUDiv: return "OpUDiv"; + case SpvOpSDiv: return "OpSDiv"; + case SpvOpFDiv: return "OpFDiv"; + case SpvOpUMod: return "OpUMod"; + case SpvOpSRem: return "OpSRem"; + case SpvOpSMod: return "OpSMod"; + case SpvOpFRem: return "OpFRem"; + case SpvOpFMod: return "OpFMod"; + case SpvOpVectorTimesScalar: return "OpVectorTimesScalar"; + case SpvOpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case SpvOpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case SpvOpMatrixTimesVector: return "OpMatrixTimesVector"; + case SpvOpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case SpvOpOuterProduct: return "OpOuterProduct"; + case SpvOpDot: return "OpDot"; + case SpvOpIAddCarry: return "OpIAddCarry"; + case SpvOpISubBorrow: return "OpISubBorrow"; + case SpvOpUMulExtended: return "OpUMulExtended"; + case SpvOpSMulExtended: return "OpSMulExtended"; + case SpvOpAny: return "OpAny"; + case SpvOpAll: return "OpAll"; + case SpvOpIsNan: return "OpIsNan"; + case SpvOpIsInf: return "OpIsInf"; + case SpvOpIsFinite: return "OpIsFinite"; + case SpvOpIsNormal: return "OpIsNormal"; + case SpvOpSignBitSet: return "OpSignBitSet"; + case SpvOpLessOrGreater: return "OpLessOrGreater"; + case SpvOpOrdered: return "OpOrdered"; + case SpvOpUnordered: return "OpUnordered"; + case SpvOpLogicalEqual: return "OpLogicalEqual"; + case SpvOpLogicalNotEqual: return "OpLogicalNotEqual"; + case SpvOpLogicalOr: return "OpLogicalOr"; + case SpvOpLogicalAnd: return "OpLogicalAnd"; + case SpvOpLogicalNot: return "OpLogicalNot"; + case SpvOpSelect: return "OpSelect"; + case SpvOpIEqual: return "OpIEqual"; + case SpvOpINotEqual: return "OpINotEqual"; + case SpvOpUGreaterThan: return "OpUGreaterThan"; + case SpvOpSGreaterThan: return "OpSGreaterThan"; + case SpvOpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case SpvOpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case SpvOpULessThan: return "OpULessThan"; + case SpvOpSLessThan: return "OpSLessThan"; + case SpvOpULessThanEqual: return "OpULessThanEqual"; + case SpvOpSLessThanEqual: return "OpSLessThanEqual"; + case SpvOpFOrdEqual: return "OpFOrdEqual"; + case SpvOpFUnordEqual: return "OpFUnordEqual"; + case SpvOpFOrdNotEqual: return "OpFOrdNotEqual"; + case SpvOpFUnordNotEqual: return "OpFUnordNotEqual"; + case SpvOpFOrdLessThan: return "OpFOrdLessThan"; + case SpvOpFUnordLessThan: return "OpFUnordLessThan"; + case SpvOpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case SpvOpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case SpvOpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case SpvOpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case SpvOpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case SpvOpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case SpvOpShiftRightLogical: return "OpShiftRightLogical"; + case SpvOpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case SpvOpShiftLeftLogical: return "OpShiftLeftLogical"; + case SpvOpBitwiseOr: return "OpBitwiseOr"; + case SpvOpBitwiseXor: return "OpBitwiseXor"; + case SpvOpBitwiseAnd: return "OpBitwiseAnd"; + case SpvOpNot: return "OpNot"; + case SpvOpBitFieldInsert: return "OpBitFieldInsert"; + case SpvOpBitFieldSExtract: return "OpBitFieldSExtract"; + case SpvOpBitFieldUExtract: return "OpBitFieldUExtract"; + case SpvOpBitReverse: return "OpBitReverse"; + case SpvOpBitCount: return "OpBitCount"; + case SpvOpDPdx: return "OpDPdx"; + case SpvOpDPdy: return "OpDPdy"; + case SpvOpFwidth: return "OpFwidth"; + case SpvOpDPdxFine: return "OpDPdxFine"; + case SpvOpDPdyFine: return "OpDPdyFine"; + case SpvOpFwidthFine: return "OpFwidthFine"; + case SpvOpDPdxCoarse: return "OpDPdxCoarse"; + case SpvOpDPdyCoarse: return "OpDPdyCoarse"; + case SpvOpFwidthCoarse: return "OpFwidthCoarse"; + case SpvOpEmitVertex: return "OpEmitVertex"; + case SpvOpEndPrimitive: return "OpEndPrimitive"; + case SpvOpEmitStreamVertex: return "OpEmitStreamVertex"; + case SpvOpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case SpvOpControlBarrier: return "OpControlBarrier"; + case SpvOpMemoryBarrier: return "OpMemoryBarrier"; + case SpvOpAtomicLoad: return "OpAtomicLoad"; + case SpvOpAtomicStore: return "OpAtomicStore"; + case SpvOpAtomicExchange: return "OpAtomicExchange"; + case SpvOpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case SpvOpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case SpvOpAtomicIIncrement: return "OpAtomicIIncrement"; + case SpvOpAtomicIDecrement: return "OpAtomicIDecrement"; + case SpvOpAtomicIAdd: return "OpAtomicIAdd"; + case SpvOpAtomicISub: return "OpAtomicISub"; + case SpvOpAtomicSMin: return "OpAtomicSMin"; + case SpvOpAtomicUMin: return "OpAtomicUMin"; + case SpvOpAtomicSMax: return "OpAtomicSMax"; + case SpvOpAtomicUMax: return "OpAtomicUMax"; + case SpvOpAtomicAnd: return "OpAtomicAnd"; + case SpvOpAtomicOr: return "OpAtomicOr"; + case SpvOpAtomicXor: return "OpAtomicXor"; + case SpvOpPhi: return "OpPhi"; + case SpvOpLoopMerge: return "OpLoopMerge"; + case SpvOpSelectionMerge: return "OpSelectionMerge"; + case SpvOpLabel: return "OpLabel"; + case SpvOpBranch: return "OpBranch"; + case SpvOpBranchConditional: return "OpBranchConditional"; + case SpvOpSwitch: return "OpSwitch"; + case SpvOpKill: return "OpKill"; + case SpvOpReturn: return "OpReturn"; + case SpvOpReturnValue: return "OpReturnValue"; + case SpvOpUnreachable: return "OpUnreachable"; + case SpvOpLifetimeStart: return "OpLifetimeStart"; + case SpvOpLifetimeStop: return "OpLifetimeStop"; + case SpvOpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case SpvOpGroupWaitEvents: return "OpGroupWaitEvents"; + case SpvOpGroupAll: return "OpGroupAll"; + case SpvOpGroupAny: return "OpGroupAny"; + case SpvOpGroupBroadcast: return "OpGroupBroadcast"; + case SpvOpGroupIAdd: return "OpGroupIAdd"; + case SpvOpGroupFAdd: return "OpGroupFAdd"; + case SpvOpGroupFMin: return "OpGroupFMin"; + case SpvOpGroupUMin: return "OpGroupUMin"; + case SpvOpGroupSMin: return "OpGroupSMin"; + case SpvOpGroupFMax: return "OpGroupFMax"; + case SpvOpGroupUMax: return "OpGroupUMax"; + case SpvOpGroupSMax: return "OpGroupSMax"; + case SpvOpReadPipe: return "OpReadPipe"; + case SpvOpWritePipe: return "OpWritePipe"; + case SpvOpReservedReadPipe: return "OpReservedReadPipe"; + case SpvOpReservedWritePipe: return "OpReservedWritePipe"; + case SpvOpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case SpvOpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case SpvOpCommitReadPipe: return "OpCommitReadPipe"; + case SpvOpCommitWritePipe: return "OpCommitWritePipe"; + case SpvOpIsValidReserveId: return "OpIsValidReserveId"; + case SpvOpGetNumPipePackets: return "OpGetNumPipePackets"; + case SpvOpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case SpvOpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case SpvOpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case SpvOpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case SpvOpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case SpvOpEnqueueMarker: return "OpEnqueueMarker"; + case SpvOpEnqueueKernel: return "OpEnqueueKernel"; + case SpvOpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case SpvOpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case SpvOpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case SpvOpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case SpvOpRetainEvent: return "OpRetainEvent"; + case SpvOpReleaseEvent: return "OpReleaseEvent"; + case SpvOpCreateUserEvent: return "OpCreateUserEvent"; + case SpvOpIsValidEvent: return "OpIsValidEvent"; + case SpvOpSetUserEventStatus: return "OpSetUserEventStatus"; + case SpvOpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case SpvOpGetDefaultQueue: return "OpGetDefaultQueue"; + case SpvOpBuildNDRange: return "OpBuildNDRange"; + case SpvOpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case SpvOpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case SpvOpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case SpvOpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case SpvOpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case SpvOpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case SpvOpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case SpvOpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case SpvOpImageSparseFetch: return "OpImageSparseFetch"; + case SpvOpImageSparseGather: return "OpImageSparseGather"; + case SpvOpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case SpvOpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case SpvOpNoLine: return "OpNoLine"; + case SpvOpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case SpvOpAtomicFlagClear: return "OpAtomicFlagClear"; + case SpvOpImageSparseRead: return "OpImageSparseRead"; + case SpvOpSizeOf: return "OpSizeOf"; + case SpvOpTypePipeStorage: return "OpTypePipeStorage"; + case SpvOpConstantPipeStorage: return "OpConstantPipeStorage"; + case SpvOpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case SpvOpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case SpvOpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case SpvOpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case SpvOpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case SpvOpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case SpvOpModuleProcessed: return "OpModuleProcessed"; + case SpvOpExecutionModeId: return "OpExecutionModeId"; + case SpvOpDecorateId: return "OpDecorateId"; + case SpvOpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case SpvOpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case SpvOpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case SpvOpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case SpvOpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case SpvOpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case SpvOpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case SpvOpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case SpvOpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case SpvOpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case SpvOpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case SpvOpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case SpvOpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case SpvOpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case SpvOpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case SpvOpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case SpvOpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case SpvOpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case SpvOpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case SpvOpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case SpvOpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case SpvOpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case SpvOpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case SpvOpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case SpvOpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case SpvOpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case SpvOpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case SpvOpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case SpvOpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case SpvOpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case SpvOpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case SpvOpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case SpvOpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case SpvOpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case SpvOpCopyLogical: return "OpCopyLogical"; + case SpvOpPtrEqual: return "OpPtrEqual"; + case SpvOpPtrNotEqual: return "OpPtrNotEqual"; + case SpvOpPtrDiff: return "OpPtrDiff"; + case SpvOpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case SpvOpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case SpvOpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case SpvOpTerminateInvocation: return "OpTerminateInvocation"; + case SpvOpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case SpvOpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case SpvOpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case SpvOpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case SpvOpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case SpvOpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case SpvOpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case SpvOpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case SpvOpTraceRayKHR: return "OpTraceRayKHR"; + case SpvOpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case SpvOpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case SpvOpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case SpvOpTerminateRayKHR: return "OpTerminateRayKHR"; + case SpvOpSDot: return "OpSDot"; + case SpvOpUDot: return "OpUDot"; + case SpvOpSUDot: return "OpSUDot"; + case SpvOpSDotAccSat: return "OpSDotAccSat"; + case SpvOpUDotAccSat: return "OpUDotAccSat"; + case SpvOpSUDotAccSat: return "OpSUDotAccSat"; + case SpvOpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case SpvOpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case SpvOpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case SpvOpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case SpvOpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case SpvOpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case SpvOpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case SpvOpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case SpvOpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case SpvOpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case SpvOpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case SpvOpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case SpvOpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case SpvOpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case SpvOpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case SpvOpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case SpvOpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case SpvOpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case SpvOpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case SpvOpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case SpvOpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case SpvOpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case SpvOpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case SpvOpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case SpvOpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case SpvOpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case SpvOpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case SpvOpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case SpvOpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case SpvOpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case SpvOpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case SpvOpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case SpvOpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case SpvOpReadClockKHR: return "OpReadClockKHR"; + case SpvOpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case SpvOpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case SpvOpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case SpvOpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case SpvOpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case SpvOpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case SpvOpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case SpvOpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case SpvOpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case SpvOpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case SpvOpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case SpvOpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case SpvOpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case SpvOpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case SpvOpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case SpvOpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case SpvOpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case SpvOpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case SpvOpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case SpvOpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case SpvOpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case SpvOpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case SpvOpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case SpvOpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case SpvOpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case SpvOpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case SpvOpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case SpvOpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case SpvOpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case SpvOpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case SpvOpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case SpvOpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case SpvOpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case SpvOpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case SpvOpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case SpvOpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case SpvOpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case SpvOpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case SpvOpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case SpvOpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case SpvOpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case SpvOpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case SpvOpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case SpvOpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case SpvOpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case SpvOpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case SpvOpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case SpvOpTerminateRayNV: return "OpTerminateRayNV"; + case SpvOpTraceNV: return "OpTraceNV"; + case SpvOpTraceMotionNV: return "OpTraceMotionNV"; + case SpvOpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case SpvOpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case SpvOpExecuteCallableNV: return "OpExecuteCallableNV"; + case SpvOpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case SpvOpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case SpvOpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case SpvOpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case SpvOpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case SpvOpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case SpvOpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case SpvOpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case SpvOpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case SpvOpConvertUToImageNV: return "OpConvertUToImageNV"; + case SpvOpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case SpvOpConvertImageToUNV: return "OpConvertImageToUNV"; + case SpvOpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case SpvOpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case SpvOpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case SpvOpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case SpvOpRawAccessChainNV: return "OpRawAccessChainNV"; + case SpvOpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case SpvOpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case SpvOpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case SpvOpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case SpvOpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case SpvOpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case SpvOpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case SpvOpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case SpvOpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case SpvOpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case SpvOpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case SpvOpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case SpvOpAbsISubINTEL: return "OpAbsISubINTEL"; + case SpvOpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case SpvOpIAddSatINTEL: return "OpIAddSatINTEL"; + case SpvOpUAddSatINTEL: return "OpUAddSatINTEL"; + case SpvOpIAverageINTEL: return "OpIAverageINTEL"; + case SpvOpUAverageINTEL: return "OpUAverageINTEL"; + case SpvOpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case SpvOpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case SpvOpISubSatINTEL: return "OpISubSatINTEL"; + case SpvOpUSubSatINTEL: return "OpUSubSatINTEL"; + case SpvOpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case SpvOpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case SpvOpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case SpvOpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case SpvOpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case SpvOpAsmINTEL: return "OpAsmINTEL"; + case SpvOpAsmCallINTEL: return "OpAsmCallINTEL"; + case SpvOpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case SpvOpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case SpvOpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case SpvOpExpectKHR: return "OpExpectKHR"; + case SpvOpDecorateString: return "OpDecorateString"; + case SpvOpMemberDecorateString: return "OpMemberDecorateString"; + case SpvOpVmeImageINTEL: return "OpVmeImageINTEL"; + case SpvOpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case SpvOpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case SpvOpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case SpvOpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case SpvOpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case SpvOpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case SpvOpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case SpvOpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case SpvOpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case SpvOpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case SpvOpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case SpvOpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case SpvOpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case SpvOpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case SpvOpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case SpvOpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case SpvOpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case SpvOpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case SpvOpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case SpvOpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case SpvOpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case SpvOpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case SpvOpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case SpvOpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case SpvOpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case SpvOpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case SpvOpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case SpvOpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case SpvOpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case SpvOpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case SpvOpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case SpvOpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case SpvOpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case SpvOpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case SpvOpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case SpvOpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case SpvOpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case SpvOpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case SpvOpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case SpvOpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case SpvOpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case SpvOpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case SpvOpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case SpvOpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case SpvOpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case SpvOpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case SpvOpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case SpvOpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case SpvOpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case SpvOpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case SpvOpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case SpvOpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case SpvOpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case SpvOpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case SpvOpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case SpvOpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case SpvOpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case SpvOpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case SpvOpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case SpvOpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case SpvOpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case SpvOpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case SpvOpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case SpvOpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case SpvOpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case SpvOpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case SpvOpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case SpvOpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case SpvOpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case SpvOpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case SpvOpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case SpvOpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case SpvOpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case SpvOpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case SpvOpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case SpvOpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case SpvOpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case SpvOpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case SpvOpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case SpvOpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case SpvOpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case SpvOpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case SpvOpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case SpvOpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case SpvOpLoopControlINTEL: return "OpLoopControlINTEL"; + case SpvOpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case SpvOpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case SpvOpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case SpvOpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case SpvOpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case SpvOpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case SpvOpFixedSinINTEL: return "OpFixedSinINTEL"; + case SpvOpFixedCosINTEL: return "OpFixedCosINTEL"; + case SpvOpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case SpvOpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case SpvOpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case SpvOpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case SpvOpFixedLogINTEL: return "OpFixedLogINTEL"; + case SpvOpFixedExpINTEL: return "OpFixedExpINTEL"; + case SpvOpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case SpvOpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case SpvOpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case SpvOpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case SpvOpFPGARegINTEL: return "OpFPGARegINTEL"; + case SpvOpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case SpvOpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case SpvOpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case SpvOpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case SpvOpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case SpvOpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case SpvOpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case SpvOpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case SpvOpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case SpvOpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case SpvOpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case SpvOpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case SpvOpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case SpvOpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case SpvOpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case SpvOpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case SpvOpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case SpvOpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case SpvOpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case SpvOpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case SpvOpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case SpvOpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case SpvOpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case SpvOpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case SpvOpGroupIMulKHR: return "OpGroupIMulKHR"; + case SpvOpGroupFMulKHR: return "OpGroupFMulKHR"; + case SpvOpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case SpvOpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case SpvOpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case SpvOpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case SpvOpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case SpvOpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case SpvOpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case SpvOpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ #endif diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp index 3d500ebbd..2ebc38742 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. +// Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -66,6 +68,12 @@ enum SourceLanguage { SourceLanguageOpenCL_CPP = 4, SourceLanguageHLSL = 5, SourceLanguageCPP_for_OpenCL = 6, + SourceLanguageSYCL = 7, + SourceLanguageHERO_C = 8, + SourceLanguageNZSL = 9, + SourceLanguageWGSL = 10, + SourceLanguageSlang = 11, + SourceLanguageZig = 12, SourceLanguageMax = 0x7fffffff, }; @@ -91,6 +99,8 @@ enum ExecutionModel { ExecutionModelMissNV = 5317, ExecutionModelCallableKHR = 5318, ExecutionModelCallableNV = 5318, + ExecutionModelTaskEXT = 5364, + ExecutionModelMeshEXT = 5365, ExecutionModelMax = 0x7fffffff, }; @@ -151,6 +161,9 @@ enum ExecutionMode { ExecutionModeSubgroupsPerWorkgroupId = 37, ExecutionModeLocalSizeId = 38, ExecutionModeLocalSizeHintId = 39, + ExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, ExecutionModeSubgroupUniformControlFlowKHR = 4421, ExecutionModePostDepthCoverage = 4446, ExecutionModeDenormPreserve = 4459, @@ -158,11 +171,28 @@ enum ExecutionMode { ExecutionModeSignedZeroInfNanPreserve = 4461, ExecutionModeRoundingModeRTE = 4462, ExecutionModeRoundingModeRTZ = 4463, + ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, ExecutionModeStencilRefReplacingEXT = 5027, + ExecutionModeCoalescingAMDX = 5069, + ExecutionModeMaxNodeRecursionAMDX = 5071, + ExecutionModeStaticNumWorkgroupsAMDX = 5072, + ExecutionModeShaderIndexAMDX = 5073, + ExecutionModeMaxNumWorkgroupsAMDX = 5077, + ExecutionModeStencilRefUnchangedFrontAMD = 5079, + ExecutionModeStencilRefGreaterFrontAMD = 5080, + ExecutionModeStencilRefLessFrontAMD = 5081, + ExecutionModeStencilRefUnchangedBackAMD = 5082, + ExecutionModeStencilRefGreaterBackAMD = 5083, + ExecutionModeStencilRefLessBackAMD = 5084, + ExecutionModeQuadDerivativesKHR = 5088, + ExecutionModeRequireFullQuadsKHR = 5089, + ExecutionModeOutputLinesEXT = 5269, ExecutionModeOutputLinesNV = 5269, + ExecutionModeOutputPrimitivesEXT = 5270, ExecutionModeOutputPrimitivesNV = 5270, ExecutionModeDerivativeGroupQuadsNV = 5289, ExecutionModeDerivativeGroupLinearNV = 5290, + ExecutionModeOutputTrianglesEXT = 5298, ExecutionModeOutputTrianglesNV = 5298, ExecutionModePixelInterlockOrderedEXT = 5366, ExecutionModePixelInterlockUnorderedEXT = 5367, @@ -180,6 +210,14 @@ enum ExecutionMode { ExecutionModeNoGlobalOffsetINTEL = 5895, ExecutionModeNumSIMDWorkitemsINTEL = 5896, ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + ExecutionModeMaximallyReconvergesKHR = 6023, + ExecutionModeFPFastMathDefault = 6028, + ExecutionModeStreamingInterfaceINTEL = 6154, + ExecutionModeRegisterMapInterfaceINTEL = 6160, + ExecutionModeNamedBarrierCountINTEL = 6417, + ExecutionModeMaximumRegistersINTEL = 6461, + ExecutionModeMaximumRegistersIdINTEL = 6462, + ExecutionModeNamedMaximumRegistersINTEL = 6463, ExecutionModeMax = 0x7fffffff, }; @@ -197,6 +235,9 @@ enum StorageClass { StorageClassAtomicCounter = 10, StorageClassImage = 11, StorageClassStorageBuffer = 12, + StorageClassTileImageEXT = 4172, + StorageClassNodePayloadAMDX = 5068, + StorageClassNodeOutputPayloadAMDX = 5076, StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, @@ -211,6 +252,8 @@ enum StorageClass { StorageClassShaderRecordBufferNV = 5343, StorageClassPhysicalStorageBuffer = 5349, StorageClassPhysicalStorageBufferEXT = 5349, + StorageClassHitObjectAttributeNV = 5385, + StorageClassTaskPayloadWorkgroupEXT = 5402, StorageClassCodeSectionINTEL = 5605, StorageClassDeviceOnlyINTEL = 5936, StorageClassHostOnlyINTEL = 5937, @@ -225,6 +268,7 @@ enum Dim { DimRect = 4, DimBuffer = 5, DimSubpassData = 6, + DimTileImageDataEXT = 4173, DimMax = 0x7fffffff, }; @@ -331,6 +375,8 @@ enum ImageChannelDataType { ImageChannelDataTypeFloat = 14, ImageChannelDataTypeUnormInt24 = 15, ImageChannelDataTypeUnormInt101010_2 = 16, + ImageChannelDataTypeUnsignedIntRaw10EXT = 19, + ImageChannelDataTypeUnsignedIntRaw12EXT = 20, ImageChannelDataTypeMax = 0x7fffffff, }; @@ -388,8 +434,11 @@ enum FPFastMathModeShift { FPFastMathModeNSZShift = 2, FPFastMathModeAllowRecipShift = 3, FPFastMathModeFastShift = 4, + FPFastMathModeAllowContractShift = 16, FPFastMathModeAllowContractFastINTELShift = 16, + FPFastMathModeAllowReassocShift = 17, FPFastMathModeAllowReassocINTELShift = 17, + FPFastMathModeAllowTransformShift = 18, FPFastMathModeMax = 0x7fffffff, }; @@ -400,8 +449,11 @@ enum FPFastMathModeMask { FPFastMathModeNSZMask = 0x00000004, FPFastMathModeAllowRecipMask = 0x00000008, FPFastMathModeFastMask = 0x00000010, + FPFastMathModeAllowContractMask = 0x00010000, FPFastMathModeAllowContractFastINTELMask = 0x00010000, + FPFastMathModeAllowReassocMask = 0x00020000, FPFastMathModeAllowReassocINTELMask = 0x00020000, + FPFastMathModeAllowTransformMask = 0x00040000, }; enum FPRoundingMode { @@ -435,6 +487,7 @@ enum FunctionParameterAttribute { FunctionParameterAttributeNoCapture = 5, FunctionParameterAttributeNoWrite = 6, FunctionParameterAttributeNoReadWrite = 7, + FunctionParameterAttributeRuntimeAlignedINTEL = 5940, FunctionParameterAttributeMax = 0x7fffffff, }; @@ -488,11 +541,19 @@ enum Decoration { DecorationMaxByteOffsetId = 47, DecorationNoSignedWrap = 4469, DecorationNoUnsignedWrap = 4470, + DecorationWeightTextureQCOM = 4487, + DecorationBlockMatchTextureQCOM = 4488, + DecorationBlockMatchSamplerQCOM = 4499, DecorationExplicitInterpAMD = 4999, + DecorationNodeSharesPayloadLimitsWithAMDX = 5019, + DecorationNodeMaxPayloadsAMDX = 5020, + DecorationTrackFinishWritingAMDX = 5078, + DecorationPayloadNodeNameAMDX = 5091, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, DecorationSecondaryViewportRelativeNV = 5256, + DecorationPerPrimitiveEXT = 5271, DecorationPerPrimitiveNV = 5271, DecorationPerViewNV = 5272, DecorationPerTaskNV = 5273, @@ -504,6 +565,7 @@ enum Decoration { DecorationRestrictPointerEXT = 5355, DecorationAliasedPointer = 5356, DecorationAliasedPointerEXT = 5356, + DecorationHitObjectShaderRecordBufferNV = 5386, DecorationBindlessSamplerNV = 5398, DecorationBindlessImageNV = 5399, DecorationBoundSamplerNV = 5400, @@ -536,18 +598,45 @@ enum Decoration { DecorationMergeINTEL = 5834, DecorationBankBitsINTEL = 5835, DecorationForcePow2DepthINTEL = 5836, + DecorationStridesizeINTEL = 5883, + DecorationWordsizeINTEL = 5884, + DecorationTrueDualPortINTEL = 5885, DecorationBurstCoalesceINTEL = 5899, DecorationCacheSizeINTEL = 5900, DecorationDontStaticallyCoalesceINTEL = 5901, DecorationPrefetchINTEL = 5902, DecorationStallEnableINTEL = 5905, DecorationFuseLoopsInFunctionINTEL = 5907, + DecorationMathOpDSPModeINTEL = 5909, + DecorationAliasScopeINTEL = 5914, + DecorationNoAliasINTEL = 5915, + DecorationInitiationIntervalINTEL = 5917, + DecorationMaxConcurrencyINTEL = 5918, + DecorationPipelineEnableINTEL = 5919, DecorationBufferLocationINTEL = 5921, DecorationIOPipeStorageINTEL = 5944, DecorationFunctionFloatingPointModeINTEL = 6080, DecorationSingleElementVectorINTEL = 6085, DecorationVectorComputeCallableFunctionINTEL = 6087, DecorationMediaBlockIOINTEL = 6140, + DecorationStallFreeINTEL = 6151, + DecorationFPMaxErrorDecorationINTEL = 6170, + DecorationLatencyControlLabelINTEL = 6172, + DecorationLatencyControlConstraintINTEL = 6173, + DecorationConduitKernelArgumentINTEL = 6175, + DecorationRegisterMapKernelArgumentINTEL = 6176, + DecorationMMHostInterfaceAddressWidthINTEL = 6177, + DecorationMMHostInterfaceDataWidthINTEL = 6178, + DecorationMMHostInterfaceLatencyINTEL = 6179, + DecorationMMHostInterfaceReadWriteModeINTEL = 6180, + DecorationMMHostInterfaceMaxBurstINTEL = 6181, + DecorationMMHostInterfaceWaitRequestINTEL = 6182, + DecorationStableKernelArgumentINTEL = 6183, + DecorationHostAccessINTEL = 6188, + DecorationInitModeINTEL = 6190, + DecorationImplementInRegisterMapINTEL = 6191, + DecorationCacheControlLoadINTEL = 6442, + DecorationCacheControlStoreINTEL = 6443, DecorationMax = 0x7fffffff, }; @@ -593,6 +682,11 @@ enum BuiltIn { BuiltInSubgroupLocalInvocationId = 41, BuiltInVertexIndex = 42, BuiltInInstanceIndex = 43, + BuiltInCoreIDARM = 4160, + BuiltInCoreCountARM = 4161, + BuiltInCoreMaxIDARM = 4162, + BuiltInWarpIDARM = 4163, + BuiltInWarpMaxIDARM = 4164, BuiltInSubgroupEqMask = 4416, BuiltInSubgroupEqMaskKHR = 4416, BuiltInSubgroupGeMask = 4417, @@ -618,6 +712,8 @@ enum BuiltIn { BuiltInBaryCoordSmoothSampleAMD = 4997, BuiltInBaryCoordPullModelAMD = 4998, BuiltInFragStencilRefEXT = 5014, + BuiltInCoalescedInputCountAMDX = 5021, + BuiltInShaderIndexAMDX = 5073, BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, @@ -640,6 +736,10 @@ enum BuiltIn { BuiltInFragmentSizeNV = 5292, BuiltInFragInvocationCountEXT = 5293, BuiltInInvocationsPerPixelNV = 5293, + BuiltInPrimitivePointIndicesEXT = 5294, + BuiltInPrimitiveLineIndicesEXT = 5295, + BuiltInPrimitiveTriangleIndicesEXT = 5296, + BuiltInCullPrimitiveEXT = 5299, BuiltInLaunchIdKHR = 5319, BuiltInLaunchIdNV = 5319, BuiltInLaunchSizeKHR = 5320, @@ -666,6 +766,9 @@ enum BuiltIn { BuiltInHitKindKHR = 5333, BuiltInHitKindNV = 5333, BuiltInCurrentRayTimeNV = 5334, + BuiltInHitTriangleVertexPositionsKHR = 5335, + BuiltInHitMicroTriangleVertexPositionsNV = 5337, + BuiltInHitMicroTriangleVertexBarycentricsNV = 5344, BuiltInIncomingRayFlagsKHR = 5351, BuiltInIncomingRayFlagsNV = 5351, BuiltInRayGeometryIndexKHR = 5352, @@ -673,6 +776,9 @@ enum BuiltIn { BuiltInSMCountNV = 5375, BuiltInWarpIDNV = 5376, BuiltInSMIDNV = 5377, + BuiltInHitKindFrontFacingMicroTriangleNV = 5405, + BuiltInHitKindBackFacingMicroTriangleNV = 5406, + BuiltInCullMaskKHR = 6021, BuiltInMax = 0x7fffffff, }; @@ -706,6 +812,8 @@ enum LoopControlShift { LoopControlMaxInterleavingINTELShift = 21, LoopControlSpeculatedIterationsINTELShift = 22, LoopControlNoFusionINTELShift = 23, + LoopControlLoopCountINTELShift = 24, + LoopControlMaxReinvocationDelayINTELShift = 25, LoopControlMax = 0x7fffffff, }; @@ -728,6 +836,8 @@ enum LoopControlMask { LoopControlMaxInterleavingINTELMask = 0x00200000, LoopControlSpeculatedIterationsINTELMask = 0x00400000, LoopControlNoFusionINTELMask = 0x00800000, + LoopControlLoopCountINTELMask = 0x01000000, + LoopControlMaxReinvocationDelayINTELMask = 0x02000000, }; enum FunctionControlShift { @@ -800,6 +910,8 @@ enum MemoryAccessShift { MemoryAccessMakePointerVisibleKHRShift = 4, MemoryAccessNonPrivatePointerShift = 5, MemoryAccessNonPrivatePointerKHRShift = 5, + MemoryAccessAliasScopeINTELMaskShift = 16, + MemoryAccessNoAliasINTELMaskShift = 17, MemoryAccessMax = 0x7fffffff, }; @@ -814,6 +926,8 @@ enum MemoryAccessMask { MemoryAccessMakePointerVisibleKHRMask = 0x00000010, MemoryAccessNonPrivatePointerMask = 0x00000020, MemoryAccessNonPrivatePointerKHRMask = 0x00000020, + MemoryAccessAliasScopeINTELMaskMask = 0x00010000, + MemoryAccessNoAliasINTELMaskMask = 0x00020000, }; enum Scope { @@ -927,6 +1041,11 @@ enum Capability { CapabilityShaderLayer = 69, CapabilityShaderViewportIndex = 70, CapabilityUniformDecoration = 71, + CapabilityCoreBuiltinsARM = 4165, + CapabilityTileImageColorReadAccessEXT = 4166, + CapabilityTileImageDepthReadAccessEXT = 4167, + CapabilityTileImageStencilReadAccessEXT = 4168, + CapabilityCooperativeMatrixLayoutsARM = 4201, CapabilityFragmentShadingRateKHR = 4422, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, @@ -958,6 +1077,10 @@ enum Capability { CapabilityRayQueryKHR = 4472, CapabilityRayTraversalPrimitiveCullingKHR = 4478, CapabilityRayTracingKHR = 4479, + CapabilityTextureSampleWeightedQCOM = 4484, + CapabilityTextureBoxFilterQCOM = 4485, + CapabilityTextureBlockMatchQCOM = 4486, + CapabilityTextureBlockMatch2QCOM = 4498, CapabilityFloat16ImageAMD = 5008, CapabilityImageGatherBiasLodAMD = 5009, CapabilityFragmentMaskAMD = 5010, @@ -965,6 +1088,8 @@ enum Capability { CapabilityImageReadWriteLodAMD = 5015, CapabilityInt64ImageEXT = 5016, CapabilityShaderClockKHR = 5055, + CapabilityShaderEnqueueAMDX = 5067, + CapabilityQuadControlKHR = 5087, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, CapabilityShaderViewportIndexLayerEXT = 5254, @@ -975,6 +1100,7 @@ enum Capability { CapabilityFragmentFullyCoveredEXT = 5265, CapabilityMeshShadingNV = 5266, CapabilityImageFootprintNV = 5282, + CapabilityMeshShadingEXT = 5283, CapabilityFragmentBarycentricKHR = 5284, CapabilityFragmentBarycentricNV = 5284, CapabilityComputeDerivativeGroupQuadsNV = 5288, @@ -1005,6 +1131,7 @@ enum Capability { CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilityRayTracingPositionFetchKHR = 5336, CapabilityRayTracingNV = 5340, CapabilityRayTracingMotionBlurNV = 5341, CapabilityVulkanMemoryModel = 5345, @@ -1022,7 +1149,14 @@ enum Capability { CapabilityFragmentShaderPixelInterlockEXT = 5378, CapabilityDemoteToHelperInvocation = 5379, CapabilityDemoteToHelperInvocationEXT = 5379, + CapabilityDisplacementMicromapNV = 5380, + CapabilityRayTracingOpacityMicromapEXT = 5381, + CapabilityShaderInvocationReorderNV = 5383, CapabilityBindlessTextureNV = 5390, + CapabilityRayQueryPositionFetchKHR = 5391, + CapabilityAtomicFloat16VectorNV = 5404, + CapabilityRayTracingDisplacementMicromapNV = 5409, + CapabilityRawAccessChainsNV = 5414, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1055,9 +1189,13 @@ enum Capability { CapabilityFPGAMemoryAccessesINTEL = 5898, CapabilityFPGAClusterAttributesINTEL = 5904, CapabilityLoopFuseINTEL = 5906, + CapabilityFPGADSPControlINTEL = 5908, + CapabilityMemoryAccessAliasingINTEL = 5910, + CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, CapabilityFPGABufferLocationINTEL = 5920, CapabilityArbitraryPrecisionFixedPointINTEL = 5922, CapabilityUSMStorageClassesINTEL = 5935, + CapabilityRuntimeAlignedAttributeINTEL = 5939, CapabilityIOPipesINTEL = 5943, CapabilityBlockingPipesINTEL = 5945, CapabilityFPGARegINTEL = 5948, @@ -1069,13 +1207,31 @@ enum Capability { CapabilityDotProductInput4x8BitPackedKHR = 6018, CapabilityDotProduct = 6019, CapabilityDotProductKHR = 6019, + CapabilityRayCullMaskKHR = 6020, + CapabilityCooperativeMatrixKHR = 6022, + CapabilityReplicatedCompositesEXT = 6024, CapabilityBitInstructions = 6025, + CapabilityGroupNonUniformRotateKHR = 6026, + CapabilityFloatControls2 = 6029, CapabilityAtomicFloat32AddEXT = 6033, CapabilityAtomicFloat64AddEXT = 6034, - CapabilityLongConstantCompositeINTEL = 6089, + CapabilityLongCompositesINTEL = 6089, CapabilityOptNoneINTEL = 6094, CapabilityAtomicFloat16AddEXT = 6095, CapabilityDebugInfoModuleINTEL = 6114, + CapabilityBFloat16ConversionINTEL = 6115, + CapabilitySplitBarrierINTEL = 6141, + CapabilityFPGAClusterAttributesV2INTEL = 6150, + CapabilityFPGAKernelAttributesv2INTEL = 6161, + CapabilityFPMaxErrorINTEL = 6169, + CapabilityFPGALatencyControlINTEL = 6171, + CapabilityFPGAArgumentInterfacesINTEL = 6174, + CapabilityGlobalVariableHostAccessINTEL = 6187, + CapabilityGlobalVariableFPGADecorationsINTEL = 6189, + CapabilityGroupUniformArithmeticKHR = 6400, + CapabilityMaskedGatherScatterINTEL = 6427, + CapabilityCacheControlsINTEL = 6441, + CapabilityRegisterLimitsINTEL = 6460, CapabilityMax = 0x7fffffff, }; @@ -1090,6 +1246,7 @@ enum RayFlagsShift { RayFlagsCullNoOpaqueKHRShift = 7, RayFlagsSkipTrianglesKHRShift = 8, RayFlagsSkipAABBsKHRShift = 9, + RayFlagsForceOpacityMicromap2StateEXTShift = 10, RayFlagsMax = 0x7fffffff, }; @@ -1105,6 +1262,7 @@ enum RayFlagsMask { RayFlagsCullNoOpaqueKHRMask = 0x00000080, RayFlagsSkipTrianglesKHRMask = 0x00000100, RayFlagsSkipAABBsKHRMask = 0x00000200, + RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, }; enum RayQueryIntersection { @@ -1180,6 +1338,87 @@ enum PackedVectorFormat { PackedVectorFormatMax = 0x7fffffff, }; +enum CooperativeMatrixOperandsShift { + CooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3, + CooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4, + CooperativeMatrixOperandsMax = 0x7fffffff, +}; + +enum CooperativeMatrixOperandsMask { + CooperativeMatrixOperandsMaskNone = 0, + CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001, + CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002, + CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004, + CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008, + CooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010, +}; + +enum CooperativeMatrixLayout { + CooperativeMatrixLayoutRowMajorKHR = 0, + CooperativeMatrixLayoutColumnMajorKHR = 1, + CooperativeMatrixLayoutRowBlockedInterleavedARM = 4202, + CooperativeMatrixLayoutColumnBlockedInterleavedARM = 4203, + CooperativeMatrixLayoutMax = 0x7fffffff, +}; + +enum CooperativeMatrixUse { + CooperativeMatrixUseMatrixAKHR = 0, + CooperativeMatrixUseMatrixBKHR = 1, + CooperativeMatrixUseMatrixAccumulatorKHR = 2, + CooperativeMatrixUseMax = 0x7fffffff, +}; + +enum InitializationModeQualifier { + InitializationModeQualifierInitOnDeviceReprogramINTEL = 0, + InitializationModeQualifierInitOnDeviceResetINTEL = 1, + InitializationModeQualifierMax = 0x7fffffff, +}; + +enum HostAccessQualifier { + HostAccessQualifierNoneINTEL = 0, + HostAccessQualifierReadINTEL = 1, + HostAccessQualifierWriteINTEL = 2, + HostAccessQualifierReadWriteINTEL = 3, + HostAccessQualifierMax = 0x7fffffff, +}; + +enum LoadCacheControl { + LoadCacheControlUncachedINTEL = 0, + LoadCacheControlCachedINTEL = 1, + LoadCacheControlStreamingINTEL = 2, + LoadCacheControlInvalidateAfterReadINTEL = 3, + LoadCacheControlConstCachedINTEL = 4, + LoadCacheControlMax = 0x7fffffff, +}; + +enum StoreCacheControl { + StoreCacheControlUncachedINTEL = 0, + StoreCacheControlWriteThroughINTEL = 1, + StoreCacheControlWriteBackINTEL = 2, + StoreCacheControlStreamingINTEL = 3, + StoreCacheControlMax = 0x7fffffff, +}; + +enum NamedMaximumNumberOfRegisters { + NamedMaximumNumberOfRegistersAutoINTEL = 0, + NamedMaximumNumberOfRegistersMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsShift { + RawAccessChainOperandsRobustnessPerComponentNVShift = 0, + RawAccessChainOperandsRobustnessPerElementNVShift = 1, + RawAccessChainOperandsMax = 0x7fffffff, +}; + +enum RawAccessChainOperandsMask { + RawAccessChainOperandsMaskNone = 0, + RawAccessChainOperandsRobustnessPerComponentNVMask = 0x00000001, + RawAccessChainOperandsRobustnessPerElementNVMask = 0x00000002, +}; + enum Op { OpNop = 0, OpUndef = 1, @@ -1525,13 +1764,18 @@ enum Op { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1549,6 +1793,14 @@ enum Op { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1556,6 +1808,14 @@ enum Op { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1567,9 +1827,51 @@ enum Op { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1577,6 +1879,7 @@ enum Op { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1597,6 +1900,7 @@ enum Op { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1797,6 +2101,9 @@ enum Op { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1835,10 +2142,28 @@ enum Op { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, OpMax = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2187,13 +2512,18 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2205,6 +2535,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2212,6 +2550,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2223,16 +2569,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case OpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case OpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case OpTraceNV: *hasResult = false; *hasResultType = false; break; case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2250,6 +2639,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2448,6 +2838,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2486,22 +2879,1856 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; } } +inline const char* SourceLanguageToString(SourceLanguage value) { + switch (value) { + case SourceLanguageUnknown: return "Unknown"; + case SourceLanguageESSL: return "ESSL"; + case SourceLanguageGLSL: return "GLSL"; + case SourceLanguageOpenCL_C: return "OpenCL_C"; + case SourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguageHLSL: return "HLSL"; + case SourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguageSYCL: return "SYCL"; + case SourceLanguageHERO_C: return "HERO_C"; + case SourceLanguageNZSL: return "NZSL"; + case SourceLanguageWGSL: return "WGSL"; + case SourceLanguageSlang: return "Slang"; + case SourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModelToString(ExecutionModel value) { + switch (value) { + case ExecutionModelVertex: return "Vertex"; + case ExecutionModelTessellationControl: return "TessellationControl"; + case ExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModelGeometry: return "Geometry"; + case ExecutionModelFragment: return "Fragment"; + case ExecutionModelGLCompute: return "GLCompute"; + case ExecutionModelKernel: return "Kernel"; + case ExecutionModelTaskNV: return "TaskNV"; + case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModelIntersectionKHR: return "IntersectionKHR"; + case ExecutionModelAnyHitKHR: return "AnyHitKHR"; + case ExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModelMissKHR: return "MissKHR"; + case ExecutionModelCallableKHR: return "CallableKHR"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* AddressingModelToString(AddressingModel value) { + switch (value) { + case AddressingModelLogical: return "Logical"; + case AddressingModelPhysical32: return "Physical32"; + case AddressingModelPhysical64: return "Physical64"; + case AddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* MemoryModelToString(MemoryModel value) { + switch (value) { + case MemoryModelSimple: return "Simple"; + case MemoryModelGLSL450: return "GLSL450"; + case MemoryModelOpenCL: return "OpenCL"; + case MemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModeToString(ExecutionMode value) { + switch (value) { + case ExecutionModeInvocations: return "Invocations"; + case ExecutionModeSpacingEqual: return "SpacingEqual"; + case ExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionModeVertexOrderCw: return "VertexOrderCw"; + case ExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case ExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case ExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case ExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case ExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionModePointMode: return "PointMode"; + case ExecutionModeXfb: return "Xfb"; + case ExecutionModeDepthReplacing: return "DepthReplacing"; + case ExecutionModeDepthGreater: return "DepthGreater"; + case ExecutionModeDepthLess: return "DepthLess"; + case ExecutionModeDepthUnchanged: return "DepthUnchanged"; + case ExecutionModeLocalSize: return "LocalSize"; + case ExecutionModeLocalSizeHint: return "LocalSizeHint"; + case ExecutionModeInputPoints: return "InputPoints"; + case ExecutionModeInputLines: return "InputLines"; + case ExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionModeTriangles: return "Triangles"; + case ExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionModeQuads: return "Quads"; + case ExecutionModeIsolines: return "Isolines"; + case ExecutionModeOutputVertices: return "OutputVertices"; + case ExecutionModeOutputPoints: return "OutputPoints"; + case ExecutionModeOutputLineStrip: return "OutputLineStrip"; + case ExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionModeVecTypeHint: return "VecTypeHint"; + case ExecutionModeContractionOff: return "ContractionOff"; + case ExecutionModeInitializer: return "Initializer"; + case ExecutionModeFinalizer: return "Finalizer"; + case ExecutionModeSubgroupSize: return "SubgroupSize"; + case ExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case ExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case ExecutionModeLocalSizeId: return "LocalSizeId"; + case ExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case ExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case ExecutionModeDenormPreserve: return "DenormPreserve"; + case ExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case ExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case ExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case ExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case ExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case ExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case ExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* StorageClassToString(StorageClass value) { + switch (value) { + case StorageClassUniformConstant: return "UniformConstant"; + case StorageClassInput: return "Input"; + case StorageClassUniform: return "Uniform"; + case StorageClassOutput: return "Output"; + case StorageClassWorkgroup: return "Workgroup"; + case StorageClassCrossWorkgroup: return "CrossWorkgroup"; + case StorageClassPrivate: return "Private"; + case StorageClassFunction: return "Function"; + case StorageClassGeneric: return "Generic"; + case StorageClassPushConstant: return "PushConstant"; + case StorageClassAtomicCounter: return "AtomicCounter"; + case StorageClassImage: return "Image"; + case StorageClassStorageBuffer: return "StorageBuffer"; + case StorageClassTileImageEXT: return "TileImageEXT"; + case StorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case StorageClassCallableDataKHR: return "CallableDataKHR"; + case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClassRayPayloadKHR: return "RayPayloadKHR"; + case StorageClassHitAttributeKHR: return "HitAttributeKHR"; + case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* DimToString(Dim value) { + switch (value) { + case Dim1D: return "1D"; + case Dim2D: return "2D"; + case Dim3D: return "3D"; + case DimCube: return "Cube"; + case DimRect: return "Rect"; + case DimBuffer: return "Buffer"; + case DimSubpassData: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { + switch (value) { + case SamplerAddressingModeNone: return "None"; + case SamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SamplerAddressingModeClamp: return "Clamp"; + case SamplerAddressingModeRepeat: return "Repeat"; + case SamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SamplerFilterModeToString(SamplerFilterMode value) { + switch (value) { + case SamplerFilterModeNearest: return "Nearest"; + case SamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* ImageFormatToString(ImageFormat value) { + switch (value) { + case ImageFormatUnknown: return "Unknown"; + case ImageFormatRgba32f: return "Rgba32f"; + case ImageFormatRgba16f: return "Rgba16f"; + case ImageFormatR32f: return "R32f"; + case ImageFormatRgba8: return "Rgba8"; + case ImageFormatRgba8Snorm: return "Rgba8Snorm"; + case ImageFormatRg32f: return "Rg32f"; + case ImageFormatRg16f: return "Rg16f"; + case ImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case ImageFormatR16f: return "R16f"; + case ImageFormatRgba16: return "Rgba16"; + case ImageFormatRgb10A2: return "Rgb10A2"; + case ImageFormatRg16: return "Rg16"; + case ImageFormatRg8: return "Rg8"; + case ImageFormatR16: return "R16"; + case ImageFormatR8: return "R8"; + case ImageFormatRgba16Snorm: return "Rgba16Snorm"; + case ImageFormatRg16Snorm: return "Rg16Snorm"; + case ImageFormatRg8Snorm: return "Rg8Snorm"; + case ImageFormatR16Snorm: return "R16Snorm"; + case ImageFormatR8Snorm: return "R8Snorm"; + case ImageFormatRgba32i: return "Rgba32i"; + case ImageFormatRgba16i: return "Rgba16i"; + case ImageFormatRgba8i: return "Rgba8i"; + case ImageFormatR32i: return "R32i"; + case ImageFormatRg32i: return "Rg32i"; + case ImageFormatRg16i: return "Rg16i"; + case ImageFormatRg8i: return "Rg8i"; + case ImageFormatR16i: return "R16i"; + case ImageFormatR8i: return "R8i"; + case ImageFormatRgba32ui: return "Rgba32ui"; + case ImageFormatRgba16ui: return "Rgba16ui"; + case ImageFormatRgba8ui: return "Rgba8ui"; + case ImageFormatR32ui: return "R32ui"; + case ImageFormatRgb10a2ui: return "Rgb10a2ui"; + case ImageFormatRg32ui: return "Rg32ui"; + case ImageFormatRg16ui: return "Rg16ui"; + case ImageFormatRg8ui: return "Rg8ui"; + case ImageFormatR16ui: return "R16ui"; + case ImageFormatR8ui: return "R8ui"; + case ImageFormatR64ui: return "R64ui"; + case ImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelOrderToString(ImageChannelOrder value) { + switch (value) { + case ImageChannelOrderR: return "R"; + case ImageChannelOrderA: return "A"; + case ImageChannelOrderRG: return "RG"; + case ImageChannelOrderRA: return "RA"; + case ImageChannelOrderRGB: return "RGB"; + case ImageChannelOrderRGBA: return "RGBA"; + case ImageChannelOrderBGRA: return "BGRA"; + case ImageChannelOrderARGB: return "ARGB"; + case ImageChannelOrderIntensity: return "Intensity"; + case ImageChannelOrderLuminance: return "Luminance"; + case ImageChannelOrderRx: return "Rx"; + case ImageChannelOrderRGx: return "RGx"; + case ImageChannelOrderRGBx: return "RGBx"; + case ImageChannelOrderDepth: return "Depth"; + case ImageChannelOrderDepthStencil: return "DepthStencil"; + case ImageChannelOrdersRGB: return "sRGB"; + case ImageChannelOrdersRGBx: return "sRGBx"; + case ImageChannelOrdersRGBA: return "sRGBA"; + case ImageChannelOrdersBGRA: return "sBGRA"; + case ImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { + switch (value) { + case ImageChannelDataTypeSnormInt8: return "SnormInt8"; + case ImageChannelDataTypeSnormInt16: return "SnormInt16"; + case ImageChannelDataTypeUnormInt8: return "UnormInt8"; + case ImageChannelDataTypeUnormInt16: return "UnormInt16"; + case ImageChannelDataTypeUnormShort565: return "UnormShort565"; + case ImageChannelDataTypeUnormShort555: return "UnormShort555"; + case ImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case ImageChannelDataTypeSignedInt8: return "SignedInt8"; + case ImageChannelDataTypeSignedInt16: return "SignedInt16"; + case ImageChannelDataTypeSignedInt32: return "SignedInt32"; + case ImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case ImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case ImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case ImageChannelDataTypeHalfFloat: return "HalfFloat"; + case ImageChannelDataTypeFloat: return "Float"; + case ImageChannelDataTypeUnormInt24: return "UnormInt24"; + case ImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; + } +} + +inline const char* FPRoundingModeToString(FPRoundingMode value) { + switch (value) { + case FPRoundingModeRTE: return "RTE"; + case FPRoundingModeRTZ: return "RTZ"; + case FPRoundingModeRTP: return "RTP"; + case FPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* LinkageTypeToString(LinkageType value) { + switch (value) { + case LinkageTypeExport: return "Export"; + case LinkageTypeImport: return "Import"; + case LinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; + } +} + +inline const char* AccessQualifierToString(AccessQualifier value) { + switch (value) { + case AccessQualifierReadOnly: return "ReadOnly"; + case AccessQualifierWriteOnly: return "WriteOnly"; + case AccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { + switch (value) { + case FunctionParameterAttributeZext: return "Zext"; + case FunctionParameterAttributeSext: return "Sext"; + case FunctionParameterAttributeByVal: return "ByVal"; + case FunctionParameterAttributeSret: return "Sret"; + case FunctionParameterAttributeNoAlias: return "NoAlias"; + case FunctionParameterAttributeNoCapture: return "NoCapture"; + case FunctionParameterAttributeNoWrite: return "NoWrite"; + case FunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case FunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* DecorationToString(Decoration value) { + switch (value) { + case DecorationRelaxedPrecision: return "RelaxedPrecision"; + case DecorationSpecId: return "SpecId"; + case DecorationBlock: return "Block"; + case DecorationBufferBlock: return "BufferBlock"; + case DecorationRowMajor: return "RowMajor"; + case DecorationColMajor: return "ColMajor"; + case DecorationArrayStride: return "ArrayStride"; + case DecorationMatrixStride: return "MatrixStride"; + case DecorationGLSLShared: return "GLSLShared"; + case DecorationGLSLPacked: return "GLSLPacked"; + case DecorationCPacked: return "CPacked"; + case DecorationBuiltIn: return "BuiltIn"; + case DecorationNoPerspective: return "NoPerspective"; + case DecorationFlat: return "Flat"; + case DecorationPatch: return "Patch"; + case DecorationCentroid: return "Centroid"; + case DecorationSample: return "Sample"; + case DecorationInvariant: return "Invariant"; + case DecorationRestrict: return "Restrict"; + case DecorationAliased: return "Aliased"; + case DecorationVolatile: return "Volatile"; + case DecorationConstant: return "Constant"; + case DecorationCoherent: return "Coherent"; + case DecorationNonWritable: return "NonWritable"; + case DecorationNonReadable: return "NonReadable"; + case DecorationUniform: return "Uniform"; + case DecorationUniformId: return "UniformId"; + case DecorationSaturatedConversion: return "SaturatedConversion"; + case DecorationStream: return "Stream"; + case DecorationLocation: return "Location"; + case DecorationComponent: return "Component"; + case DecorationIndex: return "Index"; + case DecorationBinding: return "Binding"; + case DecorationDescriptorSet: return "DescriptorSet"; + case DecorationOffset: return "Offset"; + case DecorationXfbBuffer: return "XfbBuffer"; + case DecorationXfbStride: return "XfbStride"; + case DecorationFuncParamAttr: return "FuncParamAttr"; + case DecorationFPRoundingMode: return "FPRoundingMode"; + case DecorationFPFastMathMode: return "FPFastMathMode"; + case DecorationLinkageAttributes: return "LinkageAttributes"; + case DecorationNoContraction: return "NoContraction"; + case DecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case DecorationAlignment: return "Alignment"; + case DecorationMaxByteOffset: return "MaxByteOffset"; + case DecorationAlignmentId: return "AlignmentId"; + case DecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case DecorationNoSignedWrap: return "NoSignedWrap"; + case DecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case DecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case DecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case DecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case DecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case DecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case DecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case DecorationPerViewNV: return "PerViewNV"; + case DecorationPerTaskNV: return "PerTaskNV"; + case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationNonUniform: return "NonUniform"; + case DecorationRestrictPointer: return "RestrictPointer"; + case DecorationAliasedPointer: return "AliasedPointer"; + case DecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case DecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case DecorationBindlessImageNV: return "BindlessImageNV"; + case DecorationBoundSamplerNV: return "BoundSamplerNV"; + case DecorationBoundImageNV: return "BoundImageNV"; + case DecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case DecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case DecorationClobberINTEL: return "ClobberINTEL"; + case DecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case DecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case DecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case DecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case DecorationStackCallINTEL: return "StackCallINTEL"; + case DecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case DecorationCounterBuffer: return "CounterBuffer"; + case DecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case DecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case DecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case DecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case DecorationRegisterINTEL: return "RegisterINTEL"; + case DecorationMemoryINTEL: return "MemoryINTEL"; + case DecorationNumbanksINTEL: return "NumbanksINTEL"; + case DecorationBankwidthINTEL: return "BankwidthINTEL"; + case DecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case DecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case DecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case DecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case DecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case DecorationMergeINTEL: return "MergeINTEL"; + case DecorationBankBitsINTEL: return "BankBitsINTEL"; + case DecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case DecorationStridesizeINTEL: return "StridesizeINTEL"; + case DecorationWordsizeINTEL: return "WordsizeINTEL"; + case DecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case DecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case DecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case DecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case DecorationPrefetchINTEL: return "PrefetchINTEL"; + case DecorationStallEnableINTEL: return "StallEnableINTEL"; + case DecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case DecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case DecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case DecorationNoAliasINTEL: return "NoAliasINTEL"; + case DecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case DecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case DecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case DecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case DecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case DecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case DecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case DecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case DecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case DecorationStallFreeINTEL: return "StallFreeINTEL"; + case DecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case DecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case DecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case DecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case DecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case DecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case DecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case DecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case DecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case DecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case DecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case DecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case DecorationHostAccessINTEL: return "HostAccessINTEL"; + case DecorationInitModeINTEL: return "InitModeINTEL"; + case DecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case DecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case DecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* BuiltInToString(BuiltIn value) { + switch (value) { + case BuiltInPosition: return "Position"; + case BuiltInPointSize: return "PointSize"; + case BuiltInClipDistance: return "ClipDistance"; + case BuiltInCullDistance: return "CullDistance"; + case BuiltInVertexId: return "VertexId"; + case BuiltInInstanceId: return "InstanceId"; + case BuiltInPrimitiveId: return "PrimitiveId"; + case BuiltInInvocationId: return "InvocationId"; + case BuiltInLayer: return "Layer"; + case BuiltInViewportIndex: return "ViewportIndex"; + case BuiltInTessLevelOuter: return "TessLevelOuter"; + case BuiltInTessLevelInner: return "TessLevelInner"; + case BuiltInTessCoord: return "TessCoord"; + case BuiltInPatchVertices: return "PatchVertices"; + case BuiltInFragCoord: return "FragCoord"; + case BuiltInPointCoord: return "PointCoord"; + case BuiltInFrontFacing: return "FrontFacing"; + case BuiltInSampleId: return "SampleId"; + case BuiltInSamplePosition: return "SamplePosition"; + case BuiltInSampleMask: return "SampleMask"; + case BuiltInFragDepth: return "FragDepth"; + case BuiltInHelperInvocation: return "HelperInvocation"; + case BuiltInNumWorkgroups: return "NumWorkgroups"; + case BuiltInWorkgroupSize: return "WorkgroupSize"; + case BuiltInWorkgroupId: return "WorkgroupId"; + case BuiltInLocalInvocationId: return "LocalInvocationId"; + case BuiltInGlobalInvocationId: return "GlobalInvocationId"; + case BuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case BuiltInWorkDim: return "WorkDim"; + case BuiltInGlobalSize: return "GlobalSize"; + case BuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case BuiltInGlobalOffset: return "GlobalOffset"; + case BuiltInGlobalLinearId: return "GlobalLinearId"; + case BuiltInSubgroupSize: return "SubgroupSize"; + case BuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case BuiltInNumSubgroups: return "NumSubgroups"; + case BuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case BuiltInSubgroupId: return "SubgroupId"; + case BuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case BuiltInVertexIndex: return "VertexIndex"; + case BuiltInInstanceIndex: return "InstanceIndex"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case BuiltInSubgroupEqMask: return "SubgroupEqMask"; + case BuiltInSubgroupGeMask: return "SubgroupGeMask"; + case BuiltInSubgroupGtMask: return "SubgroupGtMask"; + case BuiltInSubgroupLeMask: return "SubgroupLeMask"; + case BuiltInSubgroupLtMask: return "SubgroupLtMask"; + case BuiltInBaseVertex: return "BaseVertex"; + case BuiltInBaseInstance: return "BaseInstance"; + case BuiltInDrawIndex: return "DrawIndex"; + case BuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case BuiltInDeviceIndex: return "DeviceIndex"; + case BuiltInViewIndex: return "ViewIndex"; + case BuiltInShadingRateKHR: return "ShadingRateKHR"; + case BuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case BuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case BuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case BuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case BuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case BuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case BuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case BuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case BuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case BuiltInViewportMaskNV: return "ViewportMaskNV"; + case BuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case BuiltInPositionPerViewNV: return "PositionPerViewNV"; + case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case BuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case BuiltInTaskCountNV: return "TaskCountNV"; + case BuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case BuiltInLayerPerViewNV: return "LayerPerViewNV"; + case BuiltInMeshViewCountNV: return "MeshViewCountNV"; + case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case BuiltInBaryCoordKHR: return "BaryCoordKHR"; + case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInFragSizeEXT: return "FragSizeEXT"; + case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltInLaunchIdKHR: return "LaunchIdKHR"; + case BuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case BuiltInRayTminKHR: return "RayTminKHR"; + case BuiltInRayTmaxKHR: return "RayTmaxKHR"; + case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case BuiltInHitTNV: return "HitTNV"; + case BuiltInHitKindKHR: return "HitKindKHR"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case BuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case BuiltInSMCountNV: return "SMCountNV"; + case BuiltInWarpIDNV: return "WarpIDNV"; + case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* ScopeToString(Scope value) { + switch (value) { + case ScopeCrossDevice: return "CrossDevice"; + case ScopeDevice: return "Device"; + case ScopeWorkgroup: return "Workgroup"; + case ScopeSubgroup: return "Subgroup"; + case ScopeInvocation: return "Invocation"; + case ScopeQueueFamily: return "QueueFamily"; + case ScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* GroupOperationToString(GroupOperation value) { + switch (value) { + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { + switch (value) { + case KernelEnqueueFlagsNoWait: return "NoWait"; + case KernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case KernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* CapabilityToString(Capability value) { + switch (value) { + case CapabilityMatrix: return "Matrix"; + case CapabilityShader: return "Shader"; + case CapabilityGeometry: return "Geometry"; + case CapabilityTessellation: return "Tessellation"; + case CapabilityAddresses: return "Addresses"; + case CapabilityLinkage: return "Linkage"; + case CapabilityKernel: return "Kernel"; + case CapabilityVector16: return "Vector16"; + case CapabilityFloat16Buffer: return "Float16Buffer"; + case CapabilityFloat16: return "Float16"; + case CapabilityFloat64: return "Float64"; + case CapabilityInt64: return "Int64"; + case CapabilityInt64Atomics: return "Int64Atomics"; + case CapabilityImageBasic: return "ImageBasic"; + case CapabilityImageReadWrite: return "ImageReadWrite"; + case CapabilityImageMipmap: return "ImageMipmap"; + case CapabilityPipes: return "Pipes"; + case CapabilityGroups: return "Groups"; + case CapabilityDeviceEnqueue: return "DeviceEnqueue"; + case CapabilityLiteralSampler: return "LiteralSampler"; + case CapabilityAtomicStorage: return "AtomicStorage"; + case CapabilityInt16: return "Int16"; + case CapabilityTessellationPointSize: return "TessellationPointSize"; + case CapabilityGeometryPointSize: return "GeometryPointSize"; + case CapabilityImageGatherExtended: return "ImageGatherExtended"; + case CapabilityStorageImageMultisample: return "StorageImageMultisample"; + case CapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case CapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case CapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case CapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case CapabilityClipDistance: return "ClipDistance"; + case CapabilityCullDistance: return "CullDistance"; + case CapabilityImageCubeArray: return "ImageCubeArray"; + case CapabilitySampleRateShading: return "SampleRateShading"; + case CapabilityImageRect: return "ImageRect"; + case CapabilitySampledRect: return "SampledRect"; + case CapabilityGenericPointer: return "GenericPointer"; + case CapabilityInt8: return "Int8"; + case CapabilityInputAttachment: return "InputAttachment"; + case CapabilitySparseResidency: return "SparseResidency"; + case CapabilityMinLod: return "MinLod"; + case CapabilitySampled1D: return "Sampled1D"; + case CapabilityImage1D: return "Image1D"; + case CapabilitySampledCubeArray: return "SampledCubeArray"; + case CapabilitySampledBuffer: return "SampledBuffer"; + case CapabilityImageBuffer: return "ImageBuffer"; + case CapabilityImageMSArray: return "ImageMSArray"; + case CapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case CapabilityImageQuery: return "ImageQuery"; + case CapabilityDerivativeControl: return "DerivativeControl"; + case CapabilityInterpolationFunction: return "InterpolationFunction"; + case CapabilityTransformFeedback: return "TransformFeedback"; + case CapabilityGeometryStreams: return "GeometryStreams"; + case CapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case CapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case CapabilityMultiViewport: return "MultiViewport"; + case CapabilitySubgroupDispatch: return "SubgroupDispatch"; + case CapabilityNamedBarrier: return "NamedBarrier"; + case CapabilityPipeStorage: return "PipeStorage"; + case CapabilityGroupNonUniform: return "GroupNonUniform"; + case CapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case CapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case CapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case CapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case CapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case CapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case CapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case CapabilityShaderLayer: return "ShaderLayer"; + case CapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case CapabilityUniformDecoration: return "UniformDecoration"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case CapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; + case CapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case CapabilityVariablePointers: return "VariablePointers"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case CapabilityStoragePushConstant8: return "StoragePushConstant8"; + case CapabilityDenormPreserve: return "DenormPreserve"; + case CapabilityDenormFlushToZero: return "DenormFlushToZero"; + case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case CapabilityRoundingModeRTE: return "RoundingModeRTE"; + case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingKHR: return "RayTracingKHR"; + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case CapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case CapabilityInt64ImageEXT: return "Int64ImageEXT"; + case CapabilityShaderClockKHR: return "ShaderClockKHR"; + case CapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case CapabilityQuadControlKHR: return "QuadControlKHR"; + case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case CapabilityMeshShadingNV: return "MeshShadingNV"; + case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; + case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case CapabilityShaderNonUniform: return "ShaderNonUniform"; + case CapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case CapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case CapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case CapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case CapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case CapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case CapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case CapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case CapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case CapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case CapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case CapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case CapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case CapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case CapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case CapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case CapabilityBindlessTextureNV: return "BindlessTextureNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case CapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case CapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case CapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case CapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case CapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case CapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case CapabilityAsmINTEL: return "AsmINTEL"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case CapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case CapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case CapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case CapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case CapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case CapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case CapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case CapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case CapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case CapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case CapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case CapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case CapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case CapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case CapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case CapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case CapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case CapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case CapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case CapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case CapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case CapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case CapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case CapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case CapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case CapabilityIOPipesINTEL: return "IOPipesINTEL"; + case CapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case CapabilityFPGARegINTEL: return "FPGARegINTEL"; + case CapabilityDotProductInputAll: return "DotProductInputAll"; + case CapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case CapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case CapabilityDotProduct: return "DotProduct"; + case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case CapabilityBitInstructions: return "BitInstructions"; + case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case CapabilityFloatControls2: return "FloatControls2"; + case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case CapabilityOptNoneINTEL: return "OptNoneINTEL"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case CapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case CapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case CapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case CapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case CapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case CapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case CapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case CapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case CapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case CapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case CapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case CapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case CapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case CapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { + switch (value) { + case RayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { + switch (value) { + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { + switch (value) { + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* FPDenormModeToString(FPDenormMode value) { + switch (value) { + case FPDenormModePreserve: return "Preserve"; + case FPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* FPOperationModeToString(FPOperationMode value) { + switch (value) { + case FPOperationModeIEEE: return "IEEE"; + case FPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* QuantizationModesToString(QuantizationModes value) { + switch (value) { + case QuantizationModesTRN: return "TRN"; + case QuantizationModesTRN_ZERO: return "TRN_ZERO"; + case QuantizationModesRND: return "RND"; + case QuantizationModesRND_ZERO: return "RND_ZERO"; + case QuantizationModesRND_INF: return "RND_INF"; + case QuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModesRND_CONV: return "RND_CONV"; + case QuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* OverflowModesToString(OverflowModes value) { + switch (value) { + case OverflowModesWRAP: return "WRAP"; + case OverflowModesSAT: return "SAT"; + case OverflowModesSAT_ZERO: return "SAT_ZERO"; + case OverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* PackedVectorFormatToString(PackedVectorFormat value) { + switch (value) { + case PackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { + switch (value) { + case CooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { + switch (value) { + case CooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { + switch (value) { + case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* HostAccessQualifierToString(HostAccessQualifier value) { + switch (value) { + case HostAccessQualifierNoneINTEL: return "NoneINTEL"; + case HostAccessQualifierReadINTEL: return "ReadINTEL"; + case HostAccessQualifierWriteINTEL: return "WriteINTEL"; + case HostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* LoadCacheControlToString(LoadCacheControl value) { + switch (value) { + case LoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case LoadCacheControlCachedINTEL: return "CachedINTEL"; + case LoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case LoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* StoreCacheControlToString(StoreCacheControl value) { + switch (value) { + case StoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case StoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { + switch (value) { + case NamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* OpToString(Op value) { + switch (value) { + case OpNop: return "OpNop"; + case OpUndef: return "OpUndef"; + case OpSourceContinued: return "OpSourceContinued"; + case OpSource: return "OpSource"; + case OpSourceExtension: return "OpSourceExtension"; + case OpName: return "OpName"; + case OpMemberName: return "OpMemberName"; + case OpString: return "OpString"; + case OpLine: return "OpLine"; + case OpExtension: return "OpExtension"; + case OpExtInstImport: return "OpExtInstImport"; + case OpExtInst: return "OpExtInst"; + case OpMemoryModel: return "OpMemoryModel"; + case OpEntryPoint: return "OpEntryPoint"; + case OpExecutionMode: return "OpExecutionMode"; + case OpCapability: return "OpCapability"; + case OpTypeVoid: return "OpTypeVoid"; + case OpTypeBool: return "OpTypeBool"; + case OpTypeInt: return "OpTypeInt"; + case OpTypeFloat: return "OpTypeFloat"; + case OpTypeVector: return "OpTypeVector"; + case OpTypeMatrix: return "OpTypeMatrix"; + case OpTypeImage: return "OpTypeImage"; + case OpTypeSampler: return "OpTypeSampler"; + case OpTypeSampledImage: return "OpTypeSampledImage"; + case OpTypeArray: return "OpTypeArray"; + case OpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case OpTypeStruct: return "OpTypeStruct"; + case OpTypeOpaque: return "OpTypeOpaque"; + case OpTypePointer: return "OpTypePointer"; + case OpTypeFunction: return "OpTypeFunction"; + case OpTypeEvent: return "OpTypeEvent"; + case OpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case OpTypeReserveId: return "OpTypeReserveId"; + case OpTypeQueue: return "OpTypeQueue"; + case OpTypePipe: return "OpTypePipe"; + case OpTypeForwardPointer: return "OpTypeForwardPointer"; + case OpConstantTrue: return "OpConstantTrue"; + case OpConstantFalse: return "OpConstantFalse"; + case OpConstant: return "OpConstant"; + case OpConstantComposite: return "OpConstantComposite"; + case OpConstantSampler: return "OpConstantSampler"; + case OpConstantNull: return "OpConstantNull"; + case OpSpecConstantTrue: return "OpSpecConstantTrue"; + case OpSpecConstantFalse: return "OpSpecConstantFalse"; + case OpSpecConstant: return "OpSpecConstant"; + case OpSpecConstantComposite: return "OpSpecConstantComposite"; + case OpSpecConstantOp: return "OpSpecConstantOp"; + case OpFunction: return "OpFunction"; + case OpFunctionParameter: return "OpFunctionParameter"; + case OpFunctionEnd: return "OpFunctionEnd"; + case OpFunctionCall: return "OpFunctionCall"; + case OpVariable: return "OpVariable"; + case OpImageTexelPointer: return "OpImageTexelPointer"; + case OpLoad: return "OpLoad"; + case OpStore: return "OpStore"; + case OpCopyMemory: return "OpCopyMemory"; + case OpCopyMemorySized: return "OpCopyMemorySized"; + case OpAccessChain: return "OpAccessChain"; + case OpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case OpPtrAccessChain: return "OpPtrAccessChain"; + case OpArrayLength: return "OpArrayLength"; + case OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case OpDecorate: return "OpDecorate"; + case OpMemberDecorate: return "OpMemberDecorate"; + case OpDecorationGroup: return "OpDecorationGroup"; + case OpGroupDecorate: return "OpGroupDecorate"; + case OpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case OpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case OpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case OpVectorShuffle: return "OpVectorShuffle"; + case OpCompositeConstruct: return "OpCompositeConstruct"; + case OpCompositeExtract: return "OpCompositeExtract"; + case OpCompositeInsert: return "OpCompositeInsert"; + case OpCopyObject: return "OpCopyObject"; + case OpTranspose: return "OpTranspose"; + case OpSampledImage: return "OpSampledImage"; + case OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case OpImageFetch: return "OpImageFetch"; + case OpImageGather: return "OpImageGather"; + case OpImageDrefGather: return "OpImageDrefGather"; + case OpImageRead: return "OpImageRead"; + case OpImageWrite: return "OpImageWrite"; + case OpImage: return "OpImage"; + case OpImageQueryFormat: return "OpImageQueryFormat"; + case OpImageQueryOrder: return "OpImageQueryOrder"; + case OpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case OpImageQuerySize: return "OpImageQuerySize"; + case OpImageQueryLod: return "OpImageQueryLod"; + case OpImageQueryLevels: return "OpImageQueryLevels"; + case OpImageQuerySamples: return "OpImageQuerySamples"; + case OpConvertFToU: return "OpConvertFToU"; + case OpConvertFToS: return "OpConvertFToS"; + case OpConvertSToF: return "OpConvertSToF"; + case OpConvertUToF: return "OpConvertUToF"; + case OpUConvert: return "OpUConvert"; + case OpSConvert: return "OpSConvert"; + case OpFConvert: return "OpFConvert"; + case OpQuantizeToF16: return "OpQuantizeToF16"; + case OpConvertPtrToU: return "OpConvertPtrToU"; + case OpSatConvertSToU: return "OpSatConvertSToU"; + case OpSatConvertUToS: return "OpSatConvertUToS"; + case OpConvertUToPtr: return "OpConvertUToPtr"; + case OpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case OpGenericCastToPtr: return "OpGenericCastToPtr"; + case OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case OpBitcast: return "OpBitcast"; + case OpSNegate: return "OpSNegate"; + case OpFNegate: return "OpFNegate"; + case OpIAdd: return "OpIAdd"; + case OpFAdd: return "OpFAdd"; + case OpISub: return "OpISub"; + case OpFSub: return "OpFSub"; + case OpIMul: return "OpIMul"; + case OpFMul: return "OpFMul"; + case OpUDiv: return "OpUDiv"; + case OpSDiv: return "OpSDiv"; + case OpFDiv: return "OpFDiv"; + case OpUMod: return "OpUMod"; + case OpSRem: return "OpSRem"; + case OpSMod: return "OpSMod"; + case OpFRem: return "OpFRem"; + case OpFMod: return "OpFMod"; + case OpVectorTimesScalar: return "OpVectorTimesScalar"; + case OpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case OpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case OpMatrixTimesVector: return "OpMatrixTimesVector"; + case OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case OpOuterProduct: return "OpOuterProduct"; + case OpDot: return "OpDot"; + case OpIAddCarry: return "OpIAddCarry"; + case OpISubBorrow: return "OpISubBorrow"; + case OpUMulExtended: return "OpUMulExtended"; + case OpSMulExtended: return "OpSMulExtended"; + case OpAny: return "OpAny"; + case OpAll: return "OpAll"; + case OpIsNan: return "OpIsNan"; + case OpIsInf: return "OpIsInf"; + case OpIsFinite: return "OpIsFinite"; + case OpIsNormal: return "OpIsNormal"; + case OpSignBitSet: return "OpSignBitSet"; + case OpLessOrGreater: return "OpLessOrGreater"; + case OpOrdered: return "OpOrdered"; + case OpUnordered: return "OpUnordered"; + case OpLogicalEqual: return "OpLogicalEqual"; + case OpLogicalNotEqual: return "OpLogicalNotEqual"; + case OpLogicalOr: return "OpLogicalOr"; + case OpLogicalAnd: return "OpLogicalAnd"; + case OpLogicalNot: return "OpLogicalNot"; + case OpSelect: return "OpSelect"; + case OpIEqual: return "OpIEqual"; + case OpINotEqual: return "OpINotEqual"; + case OpUGreaterThan: return "OpUGreaterThan"; + case OpSGreaterThan: return "OpSGreaterThan"; + case OpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case OpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case OpULessThan: return "OpULessThan"; + case OpSLessThan: return "OpSLessThan"; + case OpULessThanEqual: return "OpULessThanEqual"; + case OpSLessThanEqual: return "OpSLessThanEqual"; + case OpFOrdEqual: return "OpFOrdEqual"; + case OpFUnordEqual: return "OpFUnordEqual"; + case OpFOrdNotEqual: return "OpFOrdNotEqual"; + case OpFUnordNotEqual: return "OpFUnordNotEqual"; + case OpFOrdLessThan: return "OpFOrdLessThan"; + case OpFUnordLessThan: return "OpFUnordLessThan"; + case OpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case OpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case OpShiftRightLogical: return "OpShiftRightLogical"; + case OpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case OpShiftLeftLogical: return "OpShiftLeftLogical"; + case OpBitwiseOr: return "OpBitwiseOr"; + case OpBitwiseXor: return "OpBitwiseXor"; + case OpBitwiseAnd: return "OpBitwiseAnd"; + case OpNot: return "OpNot"; + case OpBitFieldInsert: return "OpBitFieldInsert"; + case OpBitFieldSExtract: return "OpBitFieldSExtract"; + case OpBitFieldUExtract: return "OpBitFieldUExtract"; + case OpBitReverse: return "OpBitReverse"; + case OpBitCount: return "OpBitCount"; + case OpDPdx: return "OpDPdx"; + case OpDPdy: return "OpDPdy"; + case OpFwidth: return "OpFwidth"; + case OpDPdxFine: return "OpDPdxFine"; + case OpDPdyFine: return "OpDPdyFine"; + case OpFwidthFine: return "OpFwidthFine"; + case OpDPdxCoarse: return "OpDPdxCoarse"; + case OpDPdyCoarse: return "OpDPdyCoarse"; + case OpFwidthCoarse: return "OpFwidthCoarse"; + case OpEmitVertex: return "OpEmitVertex"; + case OpEndPrimitive: return "OpEndPrimitive"; + case OpEmitStreamVertex: return "OpEmitStreamVertex"; + case OpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case OpControlBarrier: return "OpControlBarrier"; + case OpMemoryBarrier: return "OpMemoryBarrier"; + case OpAtomicLoad: return "OpAtomicLoad"; + case OpAtomicStore: return "OpAtomicStore"; + case OpAtomicExchange: return "OpAtomicExchange"; + case OpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case OpAtomicIIncrement: return "OpAtomicIIncrement"; + case OpAtomicIDecrement: return "OpAtomicIDecrement"; + case OpAtomicIAdd: return "OpAtomicIAdd"; + case OpAtomicISub: return "OpAtomicISub"; + case OpAtomicSMin: return "OpAtomicSMin"; + case OpAtomicUMin: return "OpAtomicUMin"; + case OpAtomicSMax: return "OpAtomicSMax"; + case OpAtomicUMax: return "OpAtomicUMax"; + case OpAtomicAnd: return "OpAtomicAnd"; + case OpAtomicOr: return "OpAtomicOr"; + case OpAtomicXor: return "OpAtomicXor"; + case OpPhi: return "OpPhi"; + case OpLoopMerge: return "OpLoopMerge"; + case OpSelectionMerge: return "OpSelectionMerge"; + case OpLabel: return "OpLabel"; + case OpBranch: return "OpBranch"; + case OpBranchConditional: return "OpBranchConditional"; + case OpSwitch: return "OpSwitch"; + case OpKill: return "OpKill"; + case OpReturn: return "OpReturn"; + case OpReturnValue: return "OpReturnValue"; + case OpUnreachable: return "OpUnreachable"; + case OpLifetimeStart: return "OpLifetimeStart"; + case OpLifetimeStop: return "OpLifetimeStop"; + case OpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case OpGroupWaitEvents: return "OpGroupWaitEvents"; + case OpGroupAll: return "OpGroupAll"; + case OpGroupAny: return "OpGroupAny"; + case OpGroupBroadcast: return "OpGroupBroadcast"; + case OpGroupIAdd: return "OpGroupIAdd"; + case OpGroupFAdd: return "OpGroupFAdd"; + case OpGroupFMin: return "OpGroupFMin"; + case OpGroupUMin: return "OpGroupUMin"; + case OpGroupSMin: return "OpGroupSMin"; + case OpGroupFMax: return "OpGroupFMax"; + case OpGroupUMax: return "OpGroupUMax"; + case OpGroupSMax: return "OpGroupSMax"; + case OpReadPipe: return "OpReadPipe"; + case OpWritePipe: return "OpWritePipe"; + case OpReservedReadPipe: return "OpReservedReadPipe"; + case OpReservedWritePipe: return "OpReservedWritePipe"; + case OpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case OpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case OpCommitReadPipe: return "OpCommitReadPipe"; + case OpCommitWritePipe: return "OpCommitWritePipe"; + case OpIsValidReserveId: return "OpIsValidReserveId"; + case OpGetNumPipePackets: return "OpGetNumPipePackets"; + case OpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case OpEnqueueMarker: return "OpEnqueueMarker"; + case OpEnqueueKernel: return "OpEnqueueKernel"; + case OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case OpRetainEvent: return "OpRetainEvent"; + case OpReleaseEvent: return "OpReleaseEvent"; + case OpCreateUserEvent: return "OpCreateUserEvent"; + case OpIsValidEvent: return "OpIsValidEvent"; + case OpSetUserEventStatus: return "OpSetUserEventStatus"; + case OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case OpGetDefaultQueue: return "OpGetDefaultQueue"; + case OpBuildNDRange: return "OpBuildNDRange"; + case OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case OpImageSparseFetch: return "OpImageSparseFetch"; + case OpImageSparseGather: return "OpImageSparseGather"; + case OpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case OpNoLine: return "OpNoLine"; + case OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case OpAtomicFlagClear: return "OpAtomicFlagClear"; + case OpImageSparseRead: return "OpImageSparseRead"; + case OpSizeOf: return "OpSizeOf"; + case OpTypePipeStorage: return "OpTypePipeStorage"; + case OpConstantPipeStorage: return "OpConstantPipeStorage"; + case OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case OpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpExecutionModeId: return "OpExecutionModeId"; + case OpDecorateId: return "OpDecorateId"; + case OpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case OpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case OpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case OpCopyLogical: return "OpCopyLogical"; + case OpPtrEqual: return "OpPtrEqual"; + case OpPtrNotEqual: return "OpPtrNotEqual"; + case OpPtrDiff: return "OpPtrDiff"; + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case OpTerminateInvocation: return "OpTerminateInvocation"; + case OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case OpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case OpTraceRayKHR: return "OpTraceRayKHR"; + case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case OpTerminateRayKHR: return "OpTerminateRayKHR"; + case OpSDot: return "OpSDot"; + case OpUDot: return "OpUDot"; + case OpSUDot: return "OpSUDot"; + case OpSDotAccSat: return "OpSDotAccSat"; + case OpUDotAccSat: return "OpUDotAccSat"; + case OpSUDotAccSat: return "OpSUDotAccSat"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case OpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case OpReadClockKHR: return "OpReadClockKHR"; + case OpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case OpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case OpTerminateRayNV: return "OpTerminateRayNV"; + case OpTraceNV: return "OpTraceNV"; + case OpTraceMotionNV: return "OpTraceMotionNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case OpExecuteCallableNV: return "OpExecuteCallableNV"; + case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpConvertUToImageNV: return "OpConvertUToImageNV"; + case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case OpConvertImageToUNV: return "OpConvertImageToUNV"; + case OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case OpRawAccessChainNV: return "OpRawAccessChainNV"; + case OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case OpAbsISubINTEL: return "OpAbsISubINTEL"; + case OpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case OpIAddSatINTEL: return "OpIAddSatINTEL"; + case OpUAddSatINTEL: return "OpUAddSatINTEL"; + case OpIAverageINTEL: return "OpIAverageINTEL"; + case OpUAverageINTEL: return "OpUAverageINTEL"; + case OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case OpISubSatINTEL: return "OpISubSatINTEL"; + case OpUSubSatINTEL: return "OpUSubSatINTEL"; + case OpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case OpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case OpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case OpAsmINTEL: return "OpAsmINTEL"; + case OpAsmCallINTEL: return "OpAsmCallINTEL"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case OpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case OpExpectKHR: return "OpExpectKHR"; + case OpDecorateString: return "OpDecorateString"; + case OpMemberDecorateString: return "OpMemberDecorateString"; + case OpVmeImageINTEL: return "OpVmeImageINTEL"; + case OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case OpLoopControlINTEL: return "OpLoopControlINTEL"; + case OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case OpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case OpFixedSinINTEL: return "OpFixedSinINTEL"; + case OpFixedCosINTEL: return "OpFixedCosINTEL"; + case OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case OpFixedLogINTEL: return "OpFixedLogINTEL"; + case OpFixedExpINTEL: return "OpFixedExpINTEL"; + case OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case OpFPGARegINTEL: return "OpFPGARegINTEL"; + case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case OpGroupIMulKHR: return "OpGroupIMulKHR"; + case OpGroupFMulKHR: return "OpGroupFMulKHR"; + case OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ -// Overload operator| for mask bit combining +// Overload bitwise operators for mask bit combining inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +inline RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } +inline RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } +inline RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } +inline RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 index f1fd764ec..25177a458 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.hpp11 @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. +// Copyright (c) 2014-2024 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ // the Binary Section of the SPIR-V specification. // Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef // // - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL // - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ // - C# will use enum classes in the Specification class located in the "Spv" namespace, // e.g.: Spv.Specification.SourceLanguage.GLSL // - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL // // Some tokens act like mask values, which can be OR'd together, // while others are mutually exclusive. The mask-like ones have @@ -66,6 +68,12 @@ enum class SourceLanguage : unsigned { OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, Max = 0x7fffffff, }; @@ -91,6 +99,8 @@ enum class ExecutionModel : unsigned { MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, Max = 0x7fffffff, }; @@ -151,6 +161,9 @@ enum class ExecutionMode : unsigned { SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, @@ -158,11 +171,28 @@ enum class ExecutionMode : unsigned { SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, @@ -180,6 +210,14 @@ enum class ExecutionMode : unsigned { NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, Max = 0x7fffffff, }; @@ -197,6 +235,9 @@ enum class StorageClass : unsigned { AtomicCounter = 10, Image = 11, StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -211,6 +252,8 @@ enum class StorageClass : unsigned { ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, @@ -225,6 +268,7 @@ enum class Dim : unsigned { Rect = 4, Buffer = 5, SubpassData = 6, + TileImageDataEXT = 4173, Max = 0x7fffffff, }; @@ -331,6 +375,8 @@ enum class ImageChannelDataType : unsigned { Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, Max = 0x7fffffff, }; @@ -388,8 +434,11 @@ enum class FPFastMathModeShift : unsigned { NSZ = 2, AllowRecip = 3, Fast = 4, + AllowContract = 16, AllowContractFastINTEL = 16, + AllowReassoc = 17, AllowReassocINTEL = 17, + AllowTransform = 18, Max = 0x7fffffff, }; @@ -400,8 +449,11 @@ enum class FPFastMathModeMask : unsigned { NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, + AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, }; enum class FPRoundingMode : unsigned { @@ -435,6 +487,7 @@ enum class FunctionParameterAttribute : unsigned { NoCapture = 5, NoWrite = 6, NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, Max = 0x7fffffff, }; @@ -488,11 +541,19 @@ enum class Decoration : unsigned { MaxByteOffsetId = 47, NoSignedWrap = 4469, NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, @@ -504,6 +565,7 @@ enum class Decoration : unsigned { RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, @@ -536,18 +598,45 @@ enum class Decoration : unsigned { MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, Max = 0x7fffffff, }; @@ -593,6 +682,11 @@ enum class BuiltIn : unsigned { SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, @@ -618,6 +712,8 @@ enum class BuiltIn : unsigned { BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -640,6 +736,10 @@ enum class BuiltIn : unsigned { FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, @@ -666,6 +766,9 @@ enum class BuiltIn : unsigned { HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, @@ -673,6 +776,9 @@ enum class BuiltIn : unsigned { SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, Max = 0x7fffffff, }; @@ -706,6 +812,8 @@ enum class LoopControlShift : unsigned { MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, Max = 0x7fffffff, }; @@ -728,6 +836,8 @@ enum class LoopControlMask : unsigned { MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, }; enum class FunctionControlShift : unsigned { @@ -800,6 +910,8 @@ enum class MemoryAccessShift : unsigned { MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, Max = 0x7fffffff, }; @@ -814,6 +926,8 @@ enum class MemoryAccessMask : unsigned { MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, }; enum class Scope : unsigned { @@ -927,6 +1041,11 @@ enum class Capability : unsigned { ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, @@ -958,6 +1077,10 @@ enum class Capability : unsigned { RayQueryKHR = 4472, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, @@ -965,6 +1088,8 @@ enum class Capability : unsigned { ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, @@ -975,6 +1100,7 @@ enum class Capability : unsigned { FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, + MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsNV = 5288, @@ -1005,6 +1131,7 @@ enum class Capability : unsigned { UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, @@ -1022,7 +1149,14 @@ enum class Capability : unsigned { FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1055,9 +1189,13 @@ enum class Capability : unsigned { FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, @@ -1069,13 +1207,31 @@ enum class Capability : unsigned { DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, - LongConstantCompositeINTEL = 6089, + LongCompositesINTEL = 6089, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, Max = 0x7fffffff, }; @@ -1090,6 +1246,7 @@ enum class RayFlagsShift : unsigned { CullNoOpaqueKHR = 7, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, Max = 0x7fffffff, }; @@ -1105,6 +1262,7 @@ enum class RayFlagsMask : unsigned { CullNoOpaqueKHR = 0x00000080, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, }; enum class RayQueryIntersection : unsigned { @@ -1180,6 +1338,87 @@ enum class PackedVectorFormat : unsigned { Max = 0x7fffffff, }; +enum class CooperativeMatrixOperandsShift : unsigned { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + Max = 0x7fffffff, +}; + +enum class CooperativeMatrixOperandsMask : unsigned { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, +}; + +enum class CooperativeMatrixLayout : unsigned { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + Max = 0x7fffffff, +}; + +enum class CooperativeMatrixUse : unsigned { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + Max = 0x7fffffff, +}; + +enum class InitializationModeQualifier : unsigned { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + Max = 0x7fffffff, +}; + +enum class HostAccessQualifier : unsigned { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + Max = 0x7fffffff, +}; + +enum class LoadCacheControl : unsigned { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + Max = 0x7fffffff, +}; + +enum class StoreCacheControl : unsigned { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + Max = 0x7fffffff, +}; + +enum class NamedMaximumNumberOfRegisters : unsigned { + AutoINTEL = 0, + Max = 0x7fffffff, +}; + +enum class RawAccessChainOperandsShift : unsigned { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + Max = 0x7fffffff, +}; + +enum class RawAccessChainOperandsMask : unsigned { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, +}; + enum class Op : unsigned { OpNop = 0, OpUndef = 1, @@ -1525,13 +1764,18 @@ enum class Op : unsigned { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1549,6 +1793,14 @@ enum class Op : unsigned { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1556,6 +1808,14 @@ enum class Op : unsigned { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1567,9 +1827,51 @@ enum class Op : unsigned { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1577,6 +1879,7 @@ enum class Op : unsigned { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1597,6 +1900,7 @@ enum class Op : unsigned { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1797,6 +2101,9 @@ enum class Op : unsigned { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1835,10 +2142,28 @@ enum class Op : unsigned { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, Max = 0x7fffffff, }; #ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { *hasResult = *hasResultType = false; switch (opcode) { @@ -2187,13 +2512,18 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpPtrEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case Op::OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case Op::OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; case Op::OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpExtInstWithForwardRefsKHR: *hasResult = true; *hasResultType = true; break; case Op::OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; case Op::OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; case Op::OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; @@ -2205,6 +2535,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpSDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpUDotAccSat: *hasResult = true; *hasResultType = true; break; case Op::OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case Op::OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case Op::OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case Op::OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break; case Op::OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; case Op::OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; @@ -2212,6 +2550,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; case Op::OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; case Op::OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break; + case Op::OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break; case Op::OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; case Op::OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; @@ -2223,16 +2569,59 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; case Op::OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case Op::OpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break; + case Op::OpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break; + case Op::OpGroupNonUniformQuadAllKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupNonUniformQuadAnyKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case Op::OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case Op::OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case Op::OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case Op::OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case Op::OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case Op::OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case Op::OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; case Op::OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case Op::OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpFetchMicroTriangleVertexPositionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpFetchMicroTriangleVertexBarycentricNV: *hasResult = true; *hasResultType = true; break; + case Op::OpReportIntersectionKHR: *hasResult = true; *hasResultType = true; break; case Op::OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; case Op::OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpTypeAccelerationStructureKHR: *hasResult = true; *hasResultType = false; break; case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; @@ -2250,6 +2639,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; case Op::OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case Op::OpRawAccessChainNV: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; @@ -2448,6 +2838,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case Op::OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case Op::OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; case Op::OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; case Op::OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; @@ -2486,22 +2879,1856 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; case Op::OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpCompositeConstructContinuedINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpConvertBF16ToFINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case Op::OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + case Op::OpMaskedGatherINTEL: *hasResult = true; *hasResultType = true; break; + case Op::OpMaskedScatterINTEL: *hasResult = false; *hasResultType = false; break; + } +} +inline const char* SourceLanguageToString(SourceLanguage value) { + switch (value) { + case SourceLanguageUnknown: return "Unknown"; + case SourceLanguageESSL: return "ESSL"; + case SourceLanguageGLSL: return "GLSL"; + case SourceLanguageOpenCL_C: return "OpenCL_C"; + case SourceLanguageOpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguageHLSL: return "HLSL"; + case SourceLanguageCPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguageSYCL: return "SYCL"; + case SourceLanguageHERO_C: return "HERO_C"; + case SourceLanguageNZSL: return "NZSL"; + case SourceLanguageWGSL: return "WGSL"; + case SourceLanguageSlang: return "Slang"; + case SourceLanguageZig: return "Zig"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModelToString(ExecutionModel value) { + switch (value) { + case ExecutionModelVertex: return "Vertex"; + case ExecutionModelTessellationControl: return "TessellationControl"; + case ExecutionModelTessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModelGeometry: return "Geometry"; + case ExecutionModelFragment: return "Fragment"; + case ExecutionModelGLCompute: return "GLCompute"; + case ExecutionModelKernel: return "Kernel"; + case ExecutionModelTaskNV: return "TaskNV"; + case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelRayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModelIntersectionKHR: return "IntersectionKHR"; + case ExecutionModelAnyHitKHR: return "AnyHitKHR"; + case ExecutionModelClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModelMissKHR: return "MissKHR"; + case ExecutionModelCallableKHR: return "CallableKHR"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; + default: return "Unknown"; + } +} + +inline const char* AddressingModelToString(AddressingModel value) { + switch (value) { + case AddressingModelLogical: return "Logical"; + case AddressingModelPhysical32: return "Physical32"; + case AddressingModelPhysical64: return "Physical64"; + case AddressingModelPhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; + default: return "Unknown"; + } +} + +inline const char* MemoryModelToString(MemoryModel value) { + switch (value) { + case MemoryModelSimple: return "Simple"; + case MemoryModelGLSL450: return "GLSL450"; + case MemoryModelOpenCL: return "OpenCL"; + case MemoryModelVulkan: return "Vulkan"; + default: return "Unknown"; + } +} + +inline const char* ExecutionModeToString(ExecutionMode value) { + switch (value) { + case ExecutionModeInvocations: return "Invocations"; + case ExecutionModeSpacingEqual: return "SpacingEqual"; + case ExecutionModeSpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionModeSpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionModeVertexOrderCw: return "VertexOrderCw"; + case ExecutionModeVertexOrderCcw: return "VertexOrderCcw"; + case ExecutionModePixelCenterInteger: return "PixelCenterInteger"; + case ExecutionModeOriginUpperLeft: return "OriginUpperLeft"; + case ExecutionModeOriginLowerLeft: return "OriginLowerLeft"; + case ExecutionModeEarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionModePointMode: return "PointMode"; + case ExecutionModeXfb: return "Xfb"; + case ExecutionModeDepthReplacing: return "DepthReplacing"; + case ExecutionModeDepthGreater: return "DepthGreater"; + case ExecutionModeDepthLess: return "DepthLess"; + case ExecutionModeDepthUnchanged: return "DepthUnchanged"; + case ExecutionModeLocalSize: return "LocalSize"; + case ExecutionModeLocalSizeHint: return "LocalSizeHint"; + case ExecutionModeInputPoints: return "InputPoints"; + case ExecutionModeInputLines: return "InputLines"; + case ExecutionModeInputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionModeTriangles: return "Triangles"; + case ExecutionModeInputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionModeQuads: return "Quads"; + case ExecutionModeIsolines: return "Isolines"; + case ExecutionModeOutputVertices: return "OutputVertices"; + case ExecutionModeOutputPoints: return "OutputPoints"; + case ExecutionModeOutputLineStrip: return "OutputLineStrip"; + case ExecutionModeOutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionModeVecTypeHint: return "VecTypeHint"; + case ExecutionModeContractionOff: return "ContractionOff"; + case ExecutionModeInitializer: return "Initializer"; + case ExecutionModeFinalizer: return "Finalizer"; + case ExecutionModeSubgroupSize: return "SubgroupSize"; + case ExecutionModeSubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case ExecutionModeSubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case ExecutionModeLocalSizeId: return "LocalSizeId"; + case ExecutionModeLocalSizeHintId: return "LocalSizeHintId"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeSubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case ExecutionModePostDepthCoverage: return "PostDepthCoverage"; + case ExecutionModeDenormPreserve: return "DenormPreserve"; + case ExecutionModeDenormFlushToZero: return "DenormFlushToZero"; + case ExecutionModeSignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case ExecutionModeRoundingModeRTE: return "RoundingModeRTE"; + case ExecutionModeRoundingModeRTZ: return "RoundingModeRTZ"; + case ExecutionModeEarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionModeStencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionModeCoalescingAMDX: return "CoalescingAMDX"; + case ExecutionModeMaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionModeStaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionModeShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionModeMaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionModeStencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionModeStencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionModeStencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionModeStencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionModeStencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionModeStencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionModeQuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionModeRequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionModeOutputLinesEXT: return "OutputLinesEXT"; + case ExecutionModeOutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionModeDerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case ExecutionModeDerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case ExecutionModeOutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionModePixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionModePixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionModeSampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionModeSampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionModeShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionModeShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionModeSharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionModeRoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionModeRoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionModeFloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionModeFloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionModeMaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionModeMaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeSchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionModeMaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionModeFPFastMathDefault: return "FPFastMathDefault"; + case ExecutionModeStreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionModeRegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionModeNamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionModeMaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionModeMaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionModeNamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; + default: return "Unknown"; + } +} + +inline const char* StorageClassToString(StorageClass value) { + switch (value) { + case StorageClassUniformConstant: return "UniformConstant"; + case StorageClassInput: return "Input"; + case StorageClassUniform: return "Uniform"; + case StorageClassOutput: return "Output"; + case StorageClassWorkgroup: return "Workgroup"; + case StorageClassCrossWorkgroup: return "CrossWorkgroup"; + case StorageClassPrivate: return "Private"; + case StorageClassFunction: return "Function"; + case StorageClassGeneric: return "Generic"; + case StorageClassPushConstant: return "PushConstant"; + case StorageClassAtomicCounter: return "AtomicCounter"; + case StorageClassImage: return "Image"; + case StorageClassStorageBuffer: return "StorageBuffer"; + case StorageClassTileImageEXT: return "TileImageEXT"; + case StorageClassNodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClassNodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case StorageClassCallableDataKHR: return "CallableDataKHR"; + case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClassRayPayloadKHR: return "RayPayloadKHR"; + case StorageClassHitAttributeKHR: return "HitAttributeKHR"; + case StorageClassIncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClassShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClassPhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassCodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClassDeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClassHostOnlyINTEL: return "HostOnlyINTEL"; + default: return "Unknown"; + } +} + +inline const char* DimToString(Dim value) { + switch (value) { + case Dim1D: return "1D"; + case Dim2D: return "2D"; + case Dim3D: return "3D"; + case DimCube: return "Cube"; + case DimRect: return "Rect"; + case DimBuffer: return "Buffer"; + case DimSubpassData: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; + default: return "Unknown"; + } +} + +inline const char* SamplerAddressingModeToString(SamplerAddressingMode value) { + switch (value) { + case SamplerAddressingModeNone: return "None"; + case SamplerAddressingModeClampToEdge: return "ClampToEdge"; + case SamplerAddressingModeClamp: return "Clamp"; + case SamplerAddressingModeRepeat: return "Repeat"; + case SamplerAddressingModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + +inline const char* SamplerFilterModeToString(SamplerFilterMode value) { + switch (value) { + case SamplerFilterModeNearest: return "Nearest"; + case SamplerFilterModeLinear: return "Linear"; + default: return "Unknown"; + } +} + +inline const char* ImageFormatToString(ImageFormat value) { + switch (value) { + case ImageFormatUnknown: return "Unknown"; + case ImageFormatRgba32f: return "Rgba32f"; + case ImageFormatRgba16f: return "Rgba16f"; + case ImageFormatR32f: return "R32f"; + case ImageFormatRgba8: return "Rgba8"; + case ImageFormatRgba8Snorm: return "Rgba8Snorm"; + case ImageFormatRg32f: return "Rg32f"; + case ImageFormatRg16f: return "Rg16f"; + case ImageFormatR11fG11fB10f: return "R11fG11fB10f"; + case ImageFormatR16f: return "R16f"; + case ImageFormatRgba16: return "Rgba16"; + case ImageFormatRgb10A2: return "Rgb10A2"; + case ImageFormatRg16: return "Rg16"; + case ImageFormatRg8: return "Rg8"; + case ImageFormatR16: return "R16"; + case ImageFormatR8: return "R8"; + case ImageFormatRgba16Snorm: return "Rgba16Snorm"; + case ImageFormatRg16Snorm: return "Rg16Snorm"; + case ImageFormatRg8Snorm: return "Rg8Snorm"; + case ImageFormatR16Snorm: return "R16Snorm"; + case ImageFormatR8Snorm: return "R8Snorm"; + case ImageFormatRgba32i: return "Rgba32i"; + case ImageFormatRgba16i: return "Rgba16i"; + case ImageFormatRgba8i: return "Rgba8i"; + case ImageFormatR32i: return "R32i"; + case ImageFormatRg32i: return "Rg32i"; + case ImageFormatRg16i: return "Rg16i"; + case ImageFormatRg8i: return "Rg8i"; + case ImageFormatR16i: return "R16i"; + case ImageFormatR8i: return "R8i"; + case ImageFormatRgba32ui: return "Rgba32ui"; + case ImageFormatRgba16ui: return "Rgba16ui"; + case ImageFormatRgba8ui: return "Rgba8ui"; + case ImageFormatR32ui: return "R32ui"; + case ImageFormatRgb10a2ui: return "Rgb10a2ui"; + case ImageFormatRg32ui: return "Rg32ui"; + case ImageFormatRg16ui: return "Rg16ui"; + case ImageFormatRg8ui: return "Rg8ui"; + case ImageFormatR16ui: return "R16ui"; + case ImageFormatR8ui: return "R8ui"; + case ImageFormatR64ui: return "R64ui"; + case ImageFormatR64i: return "R64i"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelOrderToString(ImageChannelOrder value) { + switch (value) { + case ImageChannelOrderR: return "R"; + case ImageChannelOrderA: return "A"; + case ImageChannelOrderRG: return "RG"; + case ImageChannelOrderRA: return "RA"; + case ImageChannelOrderRGB: return "RGB"; + case ImageChannelOrderRGBA: return "RGBA"; + case ImageChannelOrderBGRA: return "BGRA"; + case ImageChannelOrderARGB: return "ARGB"; + case ImageChannelOrderIntensity: return "Intensity"; + case ImageChannelOrderLuminance: return "Luminance"; + case ImageChannelOrderRx: return "Rx"; + case ImageChannelOrderRGx: return "RGx"; + case ImageChannelOrderRGBx: return "RGBx"; + case ImageChannelOrderDepth: return "Depth"; + case ImageChannelOrderDepthStencil: return "DepthStencil"; + case ImageChannelOrdersRGB: return "sRGB"; + case ImageChannelOrdersRGBx: return "sRGBx"; + case ImageChannelOrdersRGBA: return "sRGBA"; + case ImageChannelOrdersBGRA: return "sBGRA"; + case ImageChannelOrderABGR: return "ABGR"; + default: return "Unknown"; + } +} + +inline const char* ImageChannelDataTypeToString(ImageChannelDataType value) { + switch (value) { + case ImageChannelDataTypeSnormInt8: return "SnormInt8"; + case ImageChannelDataTypeSnormInt16: return "SnormInt16"; + case ImageChannelDataTypeUnormInt8: return "UnormInt8"; + case ImageChannelDataTypeUnormInt16: return "UnormInt16"; + case ImageChannelDataTypeUnormShort565: return "UnormShort565"; + case ImageChannelDataTypeUnormShort555: return "UnormShort555"; + case ImageChannelDataTypeUnormInt101010: return "UnormInt101010"; + case ImageChannelDataTypeSignedInt8: return "SignedInt8"; + case ImageChannelDataTypeSignedInt16: return "SignedInt16"; + case ImageChannelDataTypeSignedInt32: return "SignedInt32"; + case ImageChannelDataTypeUnsignedInt8: return "UnsignedInt8"; + case ImageChannelDataTypeUnsignedInt16: return "UnsignedInt16"; + case ImageChannelDataTypeUnsignedInt32: return "UnsignedInt32"; + case ImageChannelDataTypeHalfFloat: return "HalfFloat"; + case ImageChannelDataTypeFloat: return "Float"; + case ImageChannelDataTypeUnormInt24: return "UnormInt24"; + case ImageChannelDataTypeUnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataTypeUnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataTypeUnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + default: return "Unknown"; + } +} + +inline const char* FPRoundingModeToString(FPRoundingMode value) { + switch (value) { + case FPRoundingModeRTE: return "RTE"; + case FPRoundingModeRTZ: return "RTZ"; + case FPRoundingModeRTP: return "RTP"; + case FPRoundingModeRTN: return "RTN"; + default: return "Unknown"; + } +} + +inline const char* LinkageTypeToString(LinkageType value) { + switch (value) { + case LinkageTypeExport: return "Export"; + case LinkageTypeImport: return "Import"; + case LinkageTypeLinkOnceODR: return "LinkOnceODR"; + default: return "Unknown"; } } + +inline const char* AccessQualifierToString(AccessQualifier value) { + switch (value) { + case AccessQualifierReadOnly: return "ReadOnly"; + case AccessQualifierWriteOnly: return "WriteOnly"; + case AccessQualifierReadWrite: return "ReadWrite"; + default: return "Unknown"; + } +} + +inline const char* FunctionParameterAttributeToString(FunctionParameterAttribute value) { + switch (value) { + case FunctionParameterAttributeZext: return "Zext"; + case FunctionParameterAttributeSext: return "Sext"; + case FunctionParameterAttributeByVal: return "ByVal"; + case FunctionParameterAttributeSret: return "Sret"; + case FunctionParameterAttributeNoAlias: return "NoAlias"; + case FunctionParameterAttributeNoCapture: return "NoCapture"; + case FunctionParameterAttributeNoWrite: return "NoWrite"; + case FunctionParameterAttributeNoReadWrite: return "NoReadWrite"; + case FunctionParameterAttributeRuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; + default: return "Unknown"; + } +} + +inline const char* DecorationToString(Decoration value) { + switch (value) { + case DecorationRelaxedPrecision: return "RelaxedPrecision"; + case DecorationSpecId: return "SpecId"; + case DecorationBlock: return "Block"; + case DecorationBufferBlock: return "BufferBlock"; + case DecorationRowMajor: return "RowMajor"; + case DecorationColMajor: return "ColMajor"; + case DecorationArrayStride: return "ArrayStride"; + case DecorationMatrixStride: return "MatrixStride"; + case DecorationGLSLShared: return "GLSLShared"; + case DecorationGLSLPacked: return "GLSLPacked"; + case DecorationCPacked: return "CPacked"; + case DecorationBuiltIn: return "BuiltIn"; + case DecorationNoPerspective: return "NoPerspective"; + case DecorationFlat: return "Flat"; + case DecorationPatch: return "Patch"; + case DecorationCentroid: return "Centroid"; + case DecorationSample: return "Sample"; + case DecorationInvariant: return "Invariant"; + case DecorationRestrict: return "Restrict"; + case DecorationAliased: return "Aliased"; + case DecorationVolatile: return "Volatile"; + case DecorationConstant: return "Constant"; + case DecorationCoherent: return "Coherent"; + case DecorationNonWritable: return "NonWritable"; + case DecorationNonReadable: return "NonReadable"; + case DecorationUniform: return "Uniform"; + case DecorationUniformId: return "UniformId"; + case DecorationSaturatedConversion: return "SaturatedConversion"; + case DecorationStream: return "Stream"; + case DecorationLocation: return "Location"; + case DecorationComponent: return "Component"; + case DecorationIndex: return "Index"; + case DecorationBinding: return "Binding"; + case DecorationDescriptorSet: return "DescriptorSet"; + case DecorationOffset: return "Offset"; + case DecorationXfbBuffer: return "XfbBuffer"; + case DecorationXfbStride: return "XfbStride"; + case DecorationFuncParamAttr: return "FuncParamAttr"; + case DecorationFPRoundingMode: return "FPRoundingMode"; + case DecorationFPFastMathMode: return "FPFastMathMode"; + case DecorationLinkageAttributes: return "LinkageAttributes"; + case DecorationNoContraction: return "NoContraction"; + case DecorationInputAttachmentIndex: return "InputAttachmentIndex"; + case DecorationAlignment: return "Alignment"; + case DecorationMaxByteOffset: return "MaxByteOffset"; + case DecorationAlignmentId: return "AlignmentId"; + case DecorationMaxByteOffsetId: return "MaxByteOffsetId"; + case DecorationNoSignedWrap: return "NoSignedWrap"; + case DecorationNoUnsignedWrap: return "NoUnsignedWrap"; + case DecorationWeightTextureQCOM: return "WeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case DecorationBlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationNodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case DecorationNodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case DecorationTrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case DecorationPayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; + case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; + case DecorationPassthroughNV: return "PassthroughNV"; + case DecorationViewportRelativeNV: return "ViewportRelativeNV"; + case DecorationSecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; + case DecorationPerPrimitiveEXT: return "PerPrimitiveEXT"; + case DecorationPerViewNV: return "PerViewNV"; + case DecorationPerTaskNV: return "PerTaskNV"; + case DecorationPerVertexKHR: return "PerVertexKHR"; + case DecorationNonUniform: return "NonUniform"; + case DecorationRestrictPointer: return "RestrictPointer"; + case DecorationAliasedPointer: return "AliasedPointer"; + case DecorationHitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; + case DecorationBindlessSamplerNV: return "BindlessSamplerNV"; + case DecorationBindlessImageNV: return "BindlessImageNV"; + case DecorationBoundSamplerNV: return "BoundSamplerNV"; + case DecorationBoundImageNV: return "BoundImageNV"; + case DecorationSIMTCallINTEL: return "SIMTCallINTEL"; + case DecorationReferencedIndirectlyINTEL: return "ReferencedIndirectlyINTEL"; + case DecorationClobberINTEL: return "ClobberINTEL"; + case DecorationSideEffectsINTEL: return "SideEffectsINTEL"; + case DecorationVectorComputeVariableINTEL: return "VectorComputeVariableINTEL"; + case DecorationFuncParamIOKindINTEL: return "FuncParamIOKindINTEL"; + case DecorationVectorComputeFunctionINTEL: return "VectorComputeFunctionINTEL"; + case DecorationStackCallINTEL: return "StackCallINTEL"; + case DecorationGlobalVariableOffsetINTEL: return "GlobalVariableOffsetINTEL"; + case DecorationCounterBuffer: return "CounterBuffer"; + case DecorationHlslSemanticGOOGLE: return "HlslSemanticGOOGLE"; + case DecorationUserTypeGOOGLE: return "UserTypeGOOGLE"; + case DecorationFunctionRoundingModeINTEL: return "FunctionRoundingModeINTEL"; + case DecorationFunctionDenormModeINTEL: return "FunctionDenormModeINTEL"; + case DecorationRegisterINTEL: return "RegisterINTEL"; + case DecorationMemoryINTEL: return "MemoryINTEL"; + case DecorationNumbanksINTEL: return "NumbanksINTEL"; + case DecorationBankwidthINTEL: return "BankwidthINTEL"; + case DecorationMaxPrivateCopiesINTEL: return "MaxPrivateCopiesINTEL"; + case DecorationSinglepumpINTEL: return "SinglepumpINTEL"; + case DecorationDoublepumpINTEL: return "DoublepumpINTEL"; + case DecorationMaxReplicatesINTEL: return "MaxReplicatesINTEL"; + case DecorationSimpleDualPortINTEL: return "SimpleDualPortINTEL"; + case DecorationMergeINTEL: return "MergeINTEL"; + case DecorationBankBitsINTEL: return "BankBitsINTEL"; + case DecorationForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case DecorationStridesizeINTEL: return "StridesizeINTEL"; + case DecorationWordsizeINTEL: return "WordsizeINTEL"; + case DecorationTrueDualPortINTEL: return "TrueDualPortINTEL"; + case DecorationBurstCoalesceINTEL: return "BurstCoalesceINTEL"; + case DecorationCacheSizeINTEL: return "CacheSizeINTEL"; + case DecorationDontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; + case DecorationPrefetchINTEL: return "PrefetchINTEL"; + case DecorationStallEnableINTEL: return "StallEnableINTEL"; + case DecorationFuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case DecorationMathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case DecorationAliasScopeINTEL: return "AliasScopeINTEL"; + case DecorationNoAliasINTEL: return "NoAliasINTEL"; + case DecorationInitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case DecorationMaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case DecorationPipelineEnableINTEL: return "PipelineEnableINTEL"; + case DecorationBufferLocationINTEL: return "BufferLocationINTEL"; + case DecorationIOPipeStorageINTEL: return "IOPipeStorageINTEL"; + case DecorationFunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; + case DecorationSingleElementVectorINTEL: return "SingleElementVectorINTEL"; + case DecorationVectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; + case DecorationMediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case DecorationStallFreeINTEL: return "StallFreeINTEL"; + case DecorationFPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case DecorationLatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case DecorationLatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case DecorationConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case DecorationRegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case DecorationMMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case DecorationMMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case DecorationMMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case DecorationMMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case DecorationMMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case DecorationMMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case DecorationStableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case DecorationHostAccessINTEL: return "HostAccessINTEL"; + case DecorationInitModeINTEL: return "InitModeINTEL"; + case DecorationImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case DecorationCacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case DecorationCacheControlStoreINTEL: return "CacheControlStoreINTEL"; + default: return "Unknown"; + } +} + +inline const char* BuiltInToString(BuiltIn value) { + switch (value) { + case BuiltInPosition: return "Position"; + case BuiltInPointSize: return "PointSize"; + case BuiltInClipDistance: return "ClipDistance"; + case BuiltInCullDistance: return "CullDistance"; + case BuiltInVertexId: return "VertexId"; + case BuiltInInstanceId: return "InstanceId"; + case BuiltInPrimitiveId: return "PrimitiveId"; + case BuiltInInvocationId: return "InvocationId"; + case BuiltInLayer: return "Layer"; + case BuiltInViewportIndex: return "ViewportIndex"; + case BuiltInTessLevelOuter: return "TessLevelOuter"; + case BuiltInTessLevelInner: return "TessLevelInner"; + case BuiltInTessCoord: return "TessCoord"; + case BuiltInPatchVertices: return "PatchVertices"; + case BuiltInFragCoord: return "FragCoord"; + case BuiltInPointCoord: return "PointCoord"; + case BuiltInFrontFacing: return "FrontFacing"; + case BuiltInSampleId: return "SampleId"; + case BuiltInSamplePosition: return "SamplePosition"; + case BuiltInSampleMask: return "SampleMask"; + case BuiltInFragDepth: return "FragDepth"; + case BuiltInHelperInvocation: return "HelperInvocation"; + case BuiltInNumWorkgroups: return "NumWorkgroups"; + case BuiltInWorkgroupSize: return "WorkgroupSize"; + case BuiltInWorkgroupId: return "WorkgroupId"; + case BuiltInLocalInvocationId: return "LocalInvocationId"; + case BuiltInGlobalInvocationId: return "GlobalInvocationId"; + case BuiltInLocalInvocationIndex: return "LocalInvocationIndex"; + case BuiltInWorkDim: return "WorkDim"; + case BuiltInGlobalSize: return "GlobalSize"; + case BuiltInEnqueuedWorkgroupSize: return "EnqueuedWorkgroupSize"; + case BuiltInGlobalOffset: return "GlobalOffset"; + case BuiltInGlobalLinearId: return "GlobalLinearId"; + case BuiltInSubgroupSize: return "SubgroupSize"; + case BuiltInSubgroupMaxSize: return "SubgroupMaxSize"; + case BuiltInNumSubgroups: return "NumSubgroups"; + case BuiltInNumEnqueuedSubgroups: return "NumEnqueuedSubgroups"; + case BuiltInSubgroupId: return "SubgroupId"; + case BuiltInSubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; + case BuiltInVertexIndex: return "VertexIndex"; + case BuiltInInstanceIndex: return "InstanceIndex"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "WarpMaxIDARM"; + case BuiltInSubgroupEqMask: return "SubgroupEqMask"; + case BuiltInSubgroupGeMask: return "SubgroupGeMask"; + case BuiltInSubgroupGtMask: return "SubgroupGtMask"; + case BuiltInSubgroupLeMask: return "SubgroupLeMask"; + case BuiltInSubgroupLtMask: return "SubgroupLtMask"; + case BuiltInBaseVertex: return "BaseVertex"; + case BuiltInBaseInstance: return "BaseInstance"; + case BuiltInDrawIndex: return "DrawIndex"; + case BuiltInPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case BuiltInDeviceIndex: return "DeviceIndex"; + case BuiltInViewIndex: return "ViewIndex"; + case BuiltInShadingRateKHR: return "ShadingRateKHR"; + case BuiltInBaryCoordNoPerspAMD: return "BaryCoordNoPerspAMD"; + case BuiltInBaryCoordNoPerspCentroidAMD: return "BaryCoordNoPerspCentroidAMD"; + case BuiltInBaryCoordNoPerspSampleAMD: return "BaryCoordNoPerspSampleAMD"; + case BuiltInBaryCoordSmoothAMD: return "BaryCoordSmoothAMD"; + case BuiltInBaryCoordSmoothCentroidAMD: return "BaryCoordSmoothCentroidAMD"; + case BuiltInBaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; + case BuiltInBaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; + case BuiltInFragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltInCoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case BuiltInShaderIndexAMDX: return "ShaderIndexAMDX"; + case BuiltInViewportMaskNV: return "ViewportMaskNV"; + case BuiltInSecondaryPositionNV: return "SecondaryPositionNV"; + case BuiltInSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; + case BuiltInPositionPerViewNV: return "PositionPerViewNV"; + case BuiltInViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case BuiltInFullyCoveredEXT: return "FullyCoveredEXT"; + case BuiltInTaskCountNV: return "TaskCountNV"; + case BuiltInPrimitiveCountNV: return "PrimitiveCountNV"; + case BuiltInPrimitiveIndicesNV: return "PrimitiveIndicesNV"; + case BuiltInClipDistancePerViewNV: return "ClipDistancePerViewNV"; + case BuiltInCullDistancePerViewNV: return "CullDistancePerViewNV"; + case BuiltInLayerPerViewNV: return "LayerPerViewNV"; + case BuiltInMeshViewCountNV: return "MeshViewCountNV"; + case BuiltInMeshViewIndicesNV: return "MeshViewIndicesNV"; + case BuiltInBaryCoordKHR: return "BaryCoordKHR"; + case BuiltInBaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; + case BuiltInFragSizeEXT: return "FragSizeEXT"; + case BuiltInFragInvocationCountEXT: return "FragInvocationCountEXT"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltInLaunchIdKHR: return "LaunchIdKHR"; + case BuiltInLaunchSizeKHR: return "LaunchSizeKHR"; + case BuiltInWorldRayOriginKHR: return "WorldRayOriginKHR"; + case BuiltInWorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case BuiltInObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case BuiltInObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case BuiltInRayTminKHR: return "RayTminKHR"; + case BuiltInRayTmaxKHR: return "RayTmaxKHR"; + case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltInWorldToObjectKHR: return "WorldToObjectKHR"; + case BuiltInHitTNV: return "HitTNV"; + case BuiltInHitKindKHR: return "HitKindKHR"; + case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInIncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; + case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; + case BuiltInWarpsPerSMNV: return "WarpsPerSMNV"; + case BuiltInSMCountNV: return "SMCountNV"; + case BuiltInWarpIDNV: return "WarpIDNV"; + case BuiltInSMIDNV: return "SMIDNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltInCullMaskKHR: return "CullMaskKHR"; + default: return "Unknown"; + } +} + +inline const char* ScopeToString(Scope value) { + switch (value) { + case ScopeCrossDevice: return "CrossDevice"; + case ScopeDevice: return "Device"; + case ScopeWorkgroup: return "Workgroup"; + case ScopeSubgroup: return "Subgroup"; + case ScopeInvocation: return "Invocation"; + case ScopeQueueFamily: return "QueueFamily"; + case ScopeShaderCallKHR: return "ShaderCallKHR"; + default: return "Unknown"; + } +} + +inline const char* GroupOperationToString(GroupOperation value) { + switch (value) { + case GroupOperationReduce: return "Reduce"; + case GroupOperationInclusiveScan: return "InclusiveScan"; + case GroupOperationExclusiveScan: return "ExclusiveScan"; + case GroupOperationClusteredReduce: return "ClusteredReduce"; + case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; + default: return "Unknown"; + } +} + +inline const char* KernelEnqueueFlagsToString(KernelEnqueueFlags value) { + switch (value) { + case KernelEnqueueFlagsNoWait: return "NoWait"; + case KernelEnqueueFlagsWaitKernel: return "WaitKernel"; + case KernelEnqueueFlagsWaitWorkGroup: return "WaitWorkGroup"; + default: return "Unknown"; + } +} + +inline const char* CapabilityToString(Capability value) { + switch (value) { + case CapabilityMatrix: return "Matrix"; + case CapabilityShader: return "Shader"; + case CapabilityGeometry: return "Geometry"; + case CapabilityTessellation: return "Tessellation"; + case CapabilityAddresses: return "Addresses"; + case CapabilityLinkage: return "Linkage"; + case CapabilityKernel: return "Kernel"; + case CapabilityVector16: return "Vector16"; + case CapabilityFloat16Buffer: return "Float16Buffer"; + case CapabilityFloat16: return "Float16"; + case CapabilityFloat64: return "Float64"; + case CapabilityInt64: return "Int64"; + case CapabilityInt64Atomics: return "Int64Atomics"; + case CapabilityImageBasic: return "ImageBasic"; + case CapabilityImageReadWrite: return "ImageReadWrite"; + case CapabilityImageMipmap: return "ImageMipmap"; + case CapabilityPipes: return "Pipes"; + case CapabilityGroups: return "Groups"; + case CapabilityDeviceEnqueue: return "DeviceEnqueue"; + case CapabilityLiteralSampler: return "LiteralSampler"; + case CapabilityAtomicStorage: return "AtomicStorage"; + case CapabilityInt16: return "Int16"; + case CapabilityTessellationPointSize: return "TessellationPointSize"; + case CapabilityGeometryPointSize: return "GeometryPointSize"; + case CapabilityImageGatherExtended: return "ImageGatherExtended"; + case CapabilityStorageImageMultisample: return "StorageImageMultisample"; + case CapabilityUniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; + case CapabilitySampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; + case CapabilityStorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; + case CapabilityStorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; + case CapabilityClipDistance: return "ClipDistance"; + case CapabilityCullDistance: return "CullDistance"; + case CapabilityImageCubeArray: return "ImageCubeArray"; + case CapabilitySampleRateShading: return "SampleRateShading"; + case CapabilityImageRect: return "ImageRect"; + case CapabilitySampledRect: return "SampledRect"; + case CapabilityGenericPointer: return "GenericPointer"; + case CapabilityInt8: return "Int8"; + case CapabilityInputAttachment: return "InputAttachment"; + case CapabilitySparseResidency: return "SparseResidency"; + case CapabilityMinLod: return "MinLod"; + case CapabilitySampled1D: return "Sampled1D"; + case CapabilityImage1D: return "Image1D"; + case CapabilitySampledCubeArray: return "SampledCubeArray"; + case CapabilitySampledBuffer: return "SampledBuffer"; + case CapabilityImageBuffer: return "ImageBuffer"; + case CapabilityImageMSArray: return "ImageMSArray"; + case CapabilityStorageImageExtendedFormats: return "StorageImageExtendedFormats"; + case CapabilityImageQuery: return "ImageQuery"; + case CapabilityDerivativeControl: return "DerivativeControl"; + case CapabilityInterpolationFunction: return "InterpolationFunction"; + case CapabilityTransformFeedback: return "TransformFeedback"; + case CapabilityGeometryStreams: return "GeometryStreams"; + case CapabilityStorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; + case CapabilityStorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; + case CapabilityMultiViewport: return "MultiViewport"; + case CapabilitySubgroupDispatch: return "SubgroupDispatch"; + case CapabilityNamedBarrier: return "NamedBarrier"; + case CapabilityPipeStorage: return "PipeStorage"; + case CapabilityGroupNonUniform: return "GroupNonUniform"; + case CapabilityGroupNonUniformVote: return "GroupNonUniformVote"; + case CapabilityGroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; + case CapabilityGroupNonUniformBallot: return "GroupNonUniformBallot"; + case CapabilityGroupNonUniformShuffle: return "GroupNonUniformShuffle"; + case CapabilityGroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; + case CapabilityGroupNonUniformClustered: return "GroupNonUniformClustered"; + case CapabilityGroupNonUniformQuad: return "GroupNonUniformQuad"; + case CapabilityShaderLayer: return "ShaderLayer"; + case CapabilityShaderViewportIndex: return "ShaderViewportIndex"; + case CapabilityUniformDecoration: return "UniformDecoration"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityCooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; + case CapabilitySubgroupBallotKHR: return "SubgroupBallotKHR"; + case CapabilityDrawParameters: return "DrawParameters"; + case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; + case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; + case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilitySubgroupVoteKHR: return "SubgroupVoteKHR"; + case CapabilityStorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; + case CapabilityStorageUniform16: return "StorageUniform16"; + case CapabilityStoragePushConstant16: return "StoragePushConstant16"; + case CapabilityStorageInputOutput16: return "StorageInputOutput16"; + case CapabilityDeviceGroup: return "DeviceGroup"; + case CapabilityMultiView: return "MultiView"; + case CapabilityVariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; + case CapabilityVariablePointers: return "VariablePointers"; + case CapabilityAtomicStorageOps: return "AtomicStorageOps"; + case CapabilitySampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; + case CapabilityStorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; + case CapabilityUniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; + case CapabilityStoragePushConstant8: return "StoragePushConstant8"; + case CapabilityDenormPreserve: return "DenormPreserve"; + case CapabilityDenormFlushToZero: return "DenormFlushToZero"; + case CapabilitySignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case CapabilityRoundingModeRTE: return "RoundingModeRTE"; + case CapabilityRoundingModeRTZ: return "RoundingModeRTZ"; + case CapabilityRayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; + case CapabilityRayQueryKHR: return "RayQueryKHR"; + case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingKHR: return "RayTracingKHR"; + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case CapabilityTextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; + case CapabilityFloat16ImageAMD: return "Float16ImageAMD"; + case CapabilityImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; + case CapabilityFragmentMaskAMD: return "FragmentMaskAMD"; + case CapabilityStencilExportEXT: return "StencilExportEXT"; + case CapabilityImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; + case CapabilityInt64ImageEXT: return "Int64ImageEXT"; + case CapabilityShaderClockKHR: return "ShaderClockKHR"; + case CapabilityShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case CapabilityQuadControlKHR: return "QuadControlKHR"; + case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; + case CapabilityGeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; + case CapabilityShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; + case CapabilityShaderViewportMaskNV: return "ShaderViewportMaskNV"; + case CapabilityShaderStereoViewNV: return "ShaderStereoViewNV"; + case CapabilityPerViewAttributesNV: return "PerViewAttributesNV"; + case CapabilityFragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; + case CapabilityMeshShadingNV: return "MeshShadingNV"; + case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; + case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; + case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; + case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; + case CapabilityGroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; + case CapabilityShaderNonUniform: return "ShaderNonUniform"; + case CapabilityRuntimeDescriptorArray: return "RuntimeDescriptorArray"; + case CapabilityInputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; + case CapabilityUniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; + case CapabilityStorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; + case CapabilityUniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; + case CapabilitySampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; + case CapabilityStorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; + case CapabilityStorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; + case CapabilityInputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; + case CapabilityUniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; + case CapabilityStorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityRayTracingNV: return "RayTracingNV"; + case CapabilityRayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; + case CapabilityVulkanMemoryModel: return "VulkanMemoryModel"; + case CapabilityVulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; + case CapabilityPhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; + case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; + case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; + case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityFragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; + case CapabilityFragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; + case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; + case CapabilityFragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; + case CapabilityDemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + case CapabilityBindlessTextureNV: return "BindlessTextureNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; + case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; + case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; + case CapabilitySubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; + case CapabilityRoundToInfinityINTEL: return "RoundToInfinityINTEL"; + case CapabilityFloatingPointModeINTEL: return "FloatingPointModeINTEL"; + case CapabilityIntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; + case CapabilityFunctionPointersINTEL: return "FunctionPointersINTEL"; + case CapabilityIndirectReferencesINTEL: return "IndirectReferencesINTEL"; + case CapabilityAsmINTEL: return "AsmINTEL"; + case CapabilityAtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; + case CapabilityAtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; + case CapabilityAtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; + case CapabilityVectorComputeINTEL: return "VectorComputeINTEL"; + case CapabilityVectorAnyINTEL: return "VectorAnyINTEL"; + case CapabilityExpectAssumeKHR: return "ExpectAssumeKHR"; + case CapabilitySubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; + case CapabilitySubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; + case CapabilitySubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; + case CapabilityVariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; + case CapabilityFunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; + case CapabilityFPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; + case CapabilityFPFastMathModeINTEL: return "FPFastMathModeINTEL"; + case CapabilityArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; + case CapabilityArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; + case CapabilityUnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; + case CapabilityFPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; + case CapabilityKernelAttributesINTEL: return "KernelAttributesINTEL"; + case CapabilityFPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; + case CapabilityFPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; + case CapabilityFPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; + case CapabilityLoopFuseINTEL: return "LoopFuseINTEL"; + case CapabilityFPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case CapabilityMemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case CapabilityFPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; + case CapabilityFPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; + case CapabilityArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; + case CapabilityUSMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case CapabilityRuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; + case CapabilityIOPipesINTEL: return "IOPipesINTEL"; + case CapabilityBlockingPipesINTEL: return "BlockingPipesINTEL"; + case CapabilityFPGARegINTEL: return "FPGARegINTEL"; + case CapabilityDotProductInputAll: return "DotProductInputAll"; + case CapabilityDotProductInput4x8Bit: return "DotProductInput4x8Bit"; + case CapabilityDotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; + case CapabilityDotProduct: return "DotProduct"; + case CapabilityRayCullMaskKHR: return "RayCullMaskKHR"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; + case CapabilityBitInstructions: return "BitInstructions"; + case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case CapabilityFloatControls2: return "FloatControls2"; + case CapabilityAtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; + case CapabilityAtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; + case CapabilityLongCompositesINTEL: return "LongCompositesINTEL"; + case CapabilityOptNoneINTEL: return "OptNoneINTEL"; + case CapabilityAtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; + case CapabilityDebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case CapabilityBFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case CapabilitySplitBarrierINTEL: return "SplitBarrierINTEL"; + case CapabilityFPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case CapabilityFPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case CapabilityFPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case CapabilityFPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case CapabilityFPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case CapabilityGlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case CapabilityGlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case CapabilityGroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case CapabilityMaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case CapabilityCacheControlsINTEL: return "CacheControlsINTEL"; + case CapabilityRegisterLimitsINTEL: return "RegisterLimitsINTEL"; + default: return "Unknown"; + } +} + +inline const char* RayQueryIntersectionToString(RayQueryIntersection value) { + switch (value) { + case RayQueryIntersectionRayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersectionRayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCommittedIntersectionTypeToString(RayQueryCommittedIntersectionType value) { + switch (value) { + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR: return "RayQueryCommittedIntersectionNoneKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR: return "RayQueryCommittedIntersectionTriangleKHR"; + case RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR: return "RayQueryCommittedIntersectionGeneratedKHR"; + default: return "Unknown"; + } +} + +inline const char* RayQueryCandidateIntersectionTypeToString(RayQueryCandidateIntersectionType value) { + switch (value) { + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR: return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + default: return "Unknown"; + } +} + +inline const char* FPDenormModeToString(FPDenormMode value) { + switch (value) { + case FPDenormModePreserve: return "Preserve"; + case FPDenormModeFlushToZero: return "FlushToZero"; + default: return "Unknown"; + } +} + +inline const char* FPOperationModeToString(FPOperationMode value) { + switch (value) { + case FPOperationModeIEEE: return "IEEE"; + case FPOperationModeALT: return "ALT"; + default: return "Unknown"; + } +} + +inline const char* QuantizationModesToString(QuantizationModes value) { + switch (value) { + case QuantizationModesTRN: return "TRN"; + case QuantizationModesTRN_ZERO: return "TRN_ZERO"; + case QuantizationModesRND: return "RND"; + case QuantizationModesRND_ZERO: return "RND_ZERO"; + case QuantizationModesRND_INF: return "RND_INF"; + case QuantizationModesRND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModesRND_CONV: return "RND_CONV"; + case QuantizationModesRND_CONV_ODD: return "RND_CONV_ODD"; + default: return "Unknown"; + } +} + +inline const char* OverflowModesToString(OverflowModes value) { + switch (value) { + case OverflowModesWRAP: return "WRAP"; + case OverflowModesSAT: return "SAT"; + case OverflowModesSAT_ZERO: return "SAT_ZERO"; + case OverflowModesSAT_SYM: return "SAT_SYM"; + default: return "Unknown"; + } +} + +inline const char* PackedVectorFormatToString(PackedVectorFormat value) { + switch (value) { + case PackedVectorFormatPackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixLayoutToString(CooperativeMatrixLayout value) { + switch (value) { + case CooperativeMatrixLayoutRowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayoutColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayoutRowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayoutColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; + default: return "Unknown"; + } +} + +inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { + switch (value) { + case CooperativeMatrixUseMatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUseMatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUseMatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; + default: return "Unknown"; + } +} + +inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { + switch (value) { + case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifierInitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; + default: return "Unknown"; + } +} + +inline const char* HostAccessQualifierToString(HostAccessQualifier value) { + switch (value) { + case HostAccessQualifierNoneINTEL: return "NoneINTEL"; + case HostAccessQualifierReadINTEL: return "ReadINTEL"; + case HostAccessQualifierWriteINTEL: return "WriteINTEL"; + case HostAccessQualifierReadWriteINTEL: return "ReadWriteINTEL"; + default: return "Unknown"; + } +} + +inline const char* LoadCacheControlToString(LoadCacheControl value) { + switch (value) { + case LoadCacheControlUncachedINTEL: return "UncachedINTEL"; + case LoadCacheControlCachedINTEL: return "CachedINTEL"; + case LoadCacheControlStreamingINTEL: return "StreamingINTEL"; + case LoadCacheControlInvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControlConstCachedINTEL: return "ConstCachedINTEL"; + default: return "Unknown"; + } +} + +inline const char* StoreCacheControlToString(StoreCacheControl value) { + switch (value) { + case StoreCacheControlUncachedINTEL: return "UncachedINTEL"; + case StoreCacheControlWriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControlWriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControlStreamingINTEL: return "StreamingINTEL"; + default: return "Unknown"; + } +} + +inline const char* NamedMaximumNumberOfRegistersToString(NamedMaximumNumberOfRegisters value) { + switch (value) { + case NamedMaximumNumberOfRegistersAutoINTEL: return "AutoINTEL"; + default: return "Unknown"; + } +} + +inline const char* OpToString(Op value) { + switch (value) { + case OpNop: return "OpNop"; + case OpUndef: return "OpUndef"; + case OpSourceContinued: return "OpSourceContinued"; + case OpSource: return "OpSource"; + case OpSourceExtension: return "OpSourceExtension"; + case OpName: return "OpName"; + case OpMemberName: return "OpMemberName"; + case OpString: return "OpString"; + case OpLine: return "OpLine"; + case OpExtension: return "OpExtension"; + case OpExtInstImport: return "OpExtInstImport"; + case OpExtInst: return "OpExtInst"; + case OpMemoryModel: return "OpMemoryModel"; + case OpEntryPoint: return "OpEntryPoint"; + case OpExecutionMode: return "OpExecutionMode"; + case OpCapability: return "OpCapability"; + case OpTypeVoid: return "OpTypeVoid"; + case OpTypeBool: return "OpTypeBool"; + case OpTypeInt: return "OpTypeInt"; + case OpTypeFloat: return "OpTypeFloat"; + case OpTypeVector: return "OpTypeVector"; + case OpTypeMatrix: return "OpTypeMatrix"; + case OpTypeImage: return "OpTypeImage"; + case OpTypeSampler: return "OpTypeSampler"; + case OpTypeSampledImage: return "OpTypeSampledImage"; + case OpTypeArray: return "OpTypeArray"; + case OpTypeRuntimeArray: return "OpTypeRuntimeArray"; + case OpTypeStruct: return "OpTypeStruct"; + case OpTypeOpaque: return "OpTypeOpaque"; + case OpTypePointer: return "OpTypePointer"; + case OpTypeFunction: return "OpTypeFunction"; + case OpTypeEvent: return "OpTypeEvent"; + case OpTypeDeviceEvent: return "OpTypeDeviceEvent"; + case OpTypeReserveId: return "OpTypeReserveId"; + case OpTypeQueue: return "OpTypeQueue"; + case OpTypePipe: return "OpTypePipe"; + case OpTypeForwardPointer: return "OpTypeForwardPointer"; + case OpConstantTrue: return "OpConstantTrue"; + case OpConstantFalse: return "OpConstantFalse"; + case OpConstant: return "OpConstant"; + case OpConstantComposite: return "OpConstantComposite"; + case OpConstantSampler: return "OpConstantSampler"; + case OpConstantNull: return "OpConstantNull"; + case OpSpecConstantTrue: return "OpSpecConstantTrue"; + case OpSpecConstantFalse: return "OpSpecConstantFalse"; + case OpSpecConstant: return "OpSpecConstant"; + case OpSpecConstantComposite: return "OpSpecConstantComposite"; + case OpSpecConstantOp: return "OpSpecConstantOp"; + case OpFunction: return "OpFunction"; + case OpFunctionParameter: return "OpFunctionParameter"; + case OpFunctionEnd: return "OpFunctionEnd"; + case OpFunctionCall: return "OpFunctionCall"; + case OpVariable: return "OpVariable"; + case OpImageTexelPointer: return "OpImageTexelPointer"; + case OpLoad: return "OpLoad"; + case OpStore: return "OpStore"; + case OpCopyMemory: return "OpCopyMemory"; + case OpCopyMemorySized: return "OpCopyMemorySized"; + case OpAccessChain: return "OpAccessChain"; + case OpInBoundsAccessChain: return "OpInBoundsAccessChain"; + case OpPtrAccessChain: return "OpPtrAccessChain"; + case OpArrayLength: return "OpArrayLength"; + case OpGenericPtrMemSemantics: return "OpGenericPtrMemSemantics"; + case OpInBoundsPtrAccessChain: return "OpInBoundsPtrAccessChain"; + case OpDecorate: return "OpDecorate"; + case OpMemberDecorate: return "OpMemberDecorate"; + case OpDecorationGroup: return "OpDecorationGroup"; + case OpGroupDecorate: return "OpGroupDecorate"; + case OpGroupMemberDecorate: return "OpGroupMemberDecorate"; + case OpVectorExtractDynamic: return "OpVectorExtractDynamic"; + case OpVectorInsertDynamic: return "OpVectorInsertDynamic"; + case OpVectorShuffle: return "OpVectorShuffle"; + case OpCompositeConstruct: return "OpCompositeConstruct"; + case OpCompositeExtract: return "OpCompositeExtract"; + case OpCompositeInsert: return "OpCompositeInsert"; + case OpCopyObject: return "OpCopyObject"; + case OpTranspose: return "OpTranspose"; + case OpSampledImage: return "OpSampledImage"; + case OpImageSampleImplicitLod: return "OpImageSampleImplicitLod"; + case OpImageSampleExplicitLod: return "OpImageSampleExplicitLod"; + case OpImageSampleDrefImplicitLod: return "OpImageSampleDrefImplicitLod"; + case OpImageSampleDrefExplicitLod: return "OpImageSampleDrefExplicitLod"; + case OpImageSampleProjImplicitLod: return "OpImageSampleProjImplicitLod"; + case OpImageSampleProjExplicitLod: return "OpImageSampleProjExplicitLod"; + case OpImageSampleProjDrefImplicitLod: return "OpImageSampleProjDrefImplicitLod"; + case OpImageSampleProjDrefExplicitLod: return "OpImageSampleProjDrefExplicitLod"; + case OpImageFetch: return "OpImageFetch"; + case OpImageGather: return "OpImageGather"; + case OpImageDrefGather: return "OpImageDrefGather"; + case OpImageRead: return "OpImageRead"; + case OpImageWrite: return "OpImageWrite"; + case OpImage: return "OpImage"; + case OpImageQueryFormat: return "OpImageQueryFormat"; + case OpImageQueryOrder: return "OpImageQueryOrder"; + case OpImageQuerySizeLod: return "OpImageQuerySizeLod"; + case OpImageQuerySize: return "OpImageQuerySize"; + case OpImageQueryLod: return "OpImageQueryLod"; + case OpImageQueryLevels: return "OpImageQueryLevels"; + case OpImageQuerySamples: return "OpImageQuerySamples"; + case OpConvertFToU: return "OpConvertFToU"; + case OpConvertFToS: return "OpConvertFToS"; + case OpConvertSToF: return "OpConvertSToF"; + case OpConvertUToF: return "OpConvertUToF"; + case OpUConvert: return "OpUConvert"; + case OpSConvert: return "OpSConvert"; + case OpFConvert: return "OpFConvert"; + case OpQuantizeToF16: return "OpQuantizeToF16"; + case OpConvertPtrToU: return "OpConvertPtrToU"; + case OpSatConvertSToU: return "OpSatConvertSToU"; + case OpSatConvertUToS: return "OpSatConvertUToS"; + case OpConvertUToPtr: return "OpConvertUToPtr"; + case OpPtrCastToGeneric: return "OpPtrCastToGeneric"; + case OpGenericCastToPtr: return "OpGenericCastToPtr"; + case OpGenericCastToPtrExplicit: return "OpGenericCastToPtrExplicit"; + case OpBitcast: return "OpBitcast"; + case OpSNegate: return "OpSNegate"; + case OpFNegate: return "OpFNegate"; + case OpIAdd: return "OpIAdd"; + case OpFAdd: return "OpFAdd"; + case OpISub: return "OpISub"; + case OpFSub: return "OpFSub"; + case OpIMul: return "OpIMul"; + case OpFMul: return "OpFMul"; + case OpUDiv: return "OpUDiv"; + case OpSDiv: return "OpSDiv"; + case OpFDiv: return "OpFDiv"; + case OpUMod: return "OpUMod"; + case OpSRem: return "OpSRem"; + case OpSMod: return "OpSMod"; + case OpFRem: return "OpFRem"; + case OpFMod: return "OpFMod"; + case OpVectorTimesScalar: return "OpVectorTimesScalar"; + case OpMatrixTimesScalar: return "OpMatrixTimesScalar"; + case OpVectorTimesMatrix: return "OpVectorTimesMatrix"; + case OpMatrixTimesVector: return "OpMatrixTimesVector"; + case OpMatrixTimesMatrix: return "OpMatrixTimesMatrix"; + case OpOuterProduct: return "OpOuterProduct"; + case OpDot: return "OpDot"; + case OpIAddCarry: return "OpIAddCarry"; + case OpISubBorrow: return "OpISubBorrow"; + case OpUMulExtended: return "OpUMulExtended"; + case OpSMulExtended: return "OpSMulExtended"; + case OpAny: return "OpAny"; + case OpAll: return "OpAll"; + case OpIsNan: return "OpIsNan"; + case OpIsInf: return "OpIsInf"; + case OpIsFinite: return "OpIsFinite"; + case OpIsNormal: return "OpIsNormal"; + case OpSignBitSet: return "OpSignBitSet"; + case OpLessOrGreater: return "OpLessOrGreater"; + case OpOrdered: return "OpOrdered"; + case OpUnordered: return "OpUnordered"; + case OpLogicalEqual: return "OpLogicalEqual"; + case OpLogicalNotEqual: return "OpLogicalNotEqual"; + case OpLogicalOr: return "OpLogicalOr"; + case OpLogicalAnd: return "OpLogicalAnd"; + case OpLogicalNot: return "OpLogicalNot"; + case OpSelect: return "OpSelect"; + case OpIEqual: return "OpIEqual"; + case OpINotEqual: return "OpINotEqual"; + case OpUGreaterThan: return "OpUGreaterThan"; + case OpSGreaterThan: return "OpSGreaterThan"; + case OpUGreaterThanEqual: return "OpUGreaterThanEqual"; + case OpSGreaterThanEqual: return "OpSGreaterThanEqual"; + case OpULessThan: return "OpULessThan"; + case OpSLessThan: return "OpSLessThan"; + case OpULessThanEqual: return "OpULessThanEqual"; + case OpSLessThanEqual: return "OpSLessThanEqual"; + case OpFOrdEqual: return "OpFOrdEqual"; + case OpFUnordEqual: return "OpFUnordEqual"; + case OpFOrdNotEqual: return "OpFOrdNotEqual"; + case OpFUnordNotEqual: return "OpFUnordNotEqual"; + case OpFOrdLessThan: return "OpFOrdLessThan"; + case OpFUnordLessThan: return "OpFUnordLessThan"; + case OpFOrdGreaterThan: return "OpFOrdGreaterThan"; + case OpFUnordGreaterThan: return "OpFUnordGreaterThan"; + case OpFOrdLessThanEqual: return "OpFOrdLessThanEqual"; + case OpFUnordLessThanEqual: return "OpFUnordLessThanEqual"; + case OpFOrdGreaterThanEqual: return "OpFOrdGreaterThanEqual"; + case OpFUnordGreaterThanEqual: return "OpFUnordGreaterThanEqual"; + case OpShiftRightLogical: return "OpShiftRightLogical"; + case OpShiftRightArithmetic: return "OpShiftRightArithmetic"; + case OpShiftLeftLogical: return "OpShiftLeftLogical"; + case OpBitwiseOr: return "OpBitwiseOr"; + case OpBitwiseXor: return "OpBitwiseXor"; + case OpBitwiseAnd: return "OpBitwiseAnd"; + case OpNot: return "OpNot"; + case OpBitFieldInsert: return "OpBitFieldInsert"; + case OpBitFieldSExtract: return "OpBitFieldSExtract"; + case OpBitFieldUExtract: return "OpBitFieldUExtract"; + case OpBitReverse: return "OpBitReverse"; + case OpBitCount: return "OpBitCount"; + case OpDPdx: return "OpDPdx"; + case OpDPdy: return "OpDPdy"; + case OpFwidth: return "OpFwidth"; + case OpDPdxFine: return "OpDPdxFine"; + case OpDPdyFine: return "OpDPdyFine"; + case OpFwidthFine: return "OpFwidthFine"; + case OpDPdxCoarse: return "OpDPdxCoarse"; + case OpDPdyCoarse: return "OpDPdyCoarse"; + case OpFwidthCoarse: return "OpFwidthCoarse"; + case OpEmitVertex: return "OpEmitVertex"; + case OpEndPrimitive: return "OpEndPrimitive"; + case OpEmitStreamVertex: return "OpEmitStreamVertex"; + case OpEndStreamPrimitive: return "OpEndStreamPrimitive"; + case OpControlBarrier: return "OpControlBarrier"; + case OpMemoryBarrier: return "OpMemoryBarrier"; + case OpAtomicLoad: return "OpAtomicLoad"; + case OpAtomicStore: return "OpAtomicStore"; + case OpAtomicExchange: return "OpAtomicExchange"; + case OpAtomicCompareExchange: return "OpAtomicCompareExchange"; + case OpAtomicCompareExchangeWeak: return "OpAtomicCompareExchangeWeak"; + case OpAtomicIIncrement: return "OpAtomicIIncrement"; + case OpAtomicIDecrement: return "OpAtomicIDecrement"; + case OpAtomicIAdd: return "OpAtomicIAdd"; + case OpAtomicISub: return "OpAtomicISub"; + case OpAtomicSMin: return "OpAtomicSMin"; + case OpAtomicUMin: return "OpAtomicUMin"; + case OpAtomicSMax: return "OpAtomicSMax"; + case OpAtomicUMax: return "OpAtomicUMax"; + case OpAtomicAnd: return "OpAtomicAnd"; + case OpAtomicOr: return "OpAtomicOr"; + case OpAtomicXor: return "OpAtomicXor"; + case OpPhi: return "OpPhi"; + case OpLoopMerge: return "OpLoopMerge"; + case OpSelectionMerge: return "OpSelectionMerge"; + case OpLabel: return "OpLabel"; + case OpBranch: return "OpBranch"; + case OpBranchConditional: return "OpBranchConditional"; + case OpSwitch: return "OpSwitch"; + case OpKill: return "OpKill"; + case OpReturn: return "OpReturn"; + case OpReturnValue: return "OpReturnValue"; + case OpUnreachable: return "OpUnreachable"; + case OpLifetimeStart: return "OpLifetimeStart"; + case OpLifetimeStop: return "OpLifetimeStop"; + case OpGroupAsyncCopy: return "OpGroupAsyncCopy"; + case OpGroupWaitEvents: return "OpGroupWaitEvents"; + case OpGroupAll: return "OpGroupAll"; + case OpGroupAny: return "OpGroupAny"; + case OpGroupBroadcast: return "OpGroupBroadcast"; + case OpGroupIAdd: return "OpGroupIAdd"; + case OpGroupFAdd: return "OpGroupFAdd"; + case OpGroupFMin: return "OpGroupFMin"; + case OpGroupUMin: return "OpGroupUMin"; + case OpGroupSMin: return "OpGroupSMin"; + case OpGroupFMax: return "OpGroupFMax"; + case OpGroupUMax: return "OpGroupUMax"; + case OpGroupSMax: return "OpGroupSMax"; + case OpReadPipe: return "OpReadPipe"; + case OpWritePipe: return "OpWritePipe"; + case OpReservedReadPipe: return "OpReservedReadPipe"; + case OpReservedWritePipe: return "OpReservedWritePipe"; + case OpReserveReadPipePackets: return "OpReserveReadPipePackets"; + case OpReserveWritePipePackets: return "OpReserveWritePipePackets"; + case OpCommitReadPipe: return "OpCommitReadPipe"; + case OpCommitWritePipe: return "OpCommitWritePipe"; + case OpIsValidReserveId: return "OpIsValidReserveId"; + case OpGetNumPipePackets: return "OpGetNumPipePackets"; + case OpGetMaxPipePackets: return "OpGetMaxPipePackets"; + case OpGroupReserveReadPipePackets: return "OpGroupReserveReadPipePackets"; + case OpGroupReserveWritePipePackets: return "OpGroupReserveWritePipePackets"; + case OpGroupCommitReadPipe: return "OpGroupCommitReadPipe"; + case OpGroupCommitWritePipe: return "OpGroupCommitWritePipe"; + case OpEnqueueMarker: return "OpEnqueueMarker"; + case OpEnqueueKernel: return "OpEnqueueKernel"; + case OpGetKernelNDrangeSubGroupCount: return "OpGetKernelNDrangeSubGroupCount"; + case OpGetKernelNDrangeMaxSubGroupSize: return "OpGetKernelNDrangeMaxSubGroupSize"; + case OpGetKernelWorkGroupSize: return "OpGetKernelWorkGroupSize"; + case OpGetKernelPreferredWorkGroupSizeMultiple: return "OpGetKernelPreferredWorkGroupSizeMultiple"; + case OpRetainEvent: return "OpRetainEvent"; + case OpReleaseEvent: return "OpReleaseEvent"; + case OpCreateUserEvent: return "OpCreateUserEvent"; + case OpIsValidEvent: return "OpIsValidEvent"; + case OpSetUserEventStatus: return "OpSetUserEventStatus"; + case OpCaptureEventProfilingInfo: return "OpCaptureEventProfilingInfo"; + case OpGetDefaultQueue: return "OpGetDefaultQueue"; + case OpBuildNDRange: return "OpBuildNDRange"; + case OpImageSparseSampleImplicitLod: return "OpImageSparseSampleImplicitLod"; + case OpImageSparseSampleExplicitLod: return "OpImageSparseSampleExplicitLod"; + case OpImageSparseSampleDrefImplicitLod: return "OpImageSparseSampleDrefImplicitLod"; + case OpImageSparseSampleDrefExplicitLod: return "OpImageSparseSampleDrefExplicitLod"; + case OpImageSparseSampleProjImplicitLod: return "OpImageSparseSampleProjImplicitLod"; + case OpImageSparseSampleProjExplicitLod: return "OpImageSparseSampleProjExplicitLod"; + case OpImageSparseSampleProjDrefImplicitLod: return "OpImageSparseSampleProjDrefImplicitLod"; + case OpImageSparseSampleProjDrefExplicitLod: return "OpImageSparseSampleProjDrefExplicitLod"; + case OpImageSparseFetch: return "OpImageSparseFetch"; + case OpImageSparseGather: return "OpImageSparseGather"; + case OpImageSparseDrefGather: return "OpImageSparseDrefGather"; + case OpImageSparseTexelsResident: return "OpImageSparseTexelsResident"; + case OpNoLine: return "OpNoLine"; + case OpAtomicFlagTestAndSet: return "OpAtomicFlagTestAndSet"; + case OpAtomicFlagClear: return "OpAtomicFlagClear"; + case OpImageSparseRead: return "OpImageSparseRead"; + case OpSizeOf: return "OpSizeOf"; + case OpTypePipeStorage: return "OpTypePipeStorage"; + case OpConstantPipeStorage: return "OpConstantPipeStorage"; + case OpCreatePipeFromPipeStorage: return "OpCreatePipeFromPipeStorage"; + case OpGetKernelLocalSizeForSubgroupCount: return "OpGetKernelLocalSizeForSubgroupCount"; + case OpGetKernelMaxNumSubgroups: return "OpGetKernelMaxNumSubgroups"; + case OpTypeNamedBarrier: return "OpTypeNamedBarrier"; + case OpNamedBarrierInitialize: return "OpNamedBarrierInitialize"; + case OpMemoryNamedBarrier: return "OpMemoryNamedBarrier"; + case OpModuleProcessed: return "OpModuleProcessed"; + case OpExecutionModeId: return "OpExecutionModeId"; + case OpDecorateId: return "OpDecorateId"; + case OpGroupNonUniformElect: return "OpGroupNonUniformElect"; + case OpGroupNonUniformAll: return "OpGroupNonUniformAll"; + case OpGroupNonUniformAny: return "OpGroupNonUniformAny"; + case OpGroupNonUniformAllEqual: return "OpGroupNonUniformAllEqual"; + case OpGroupNonUniformBroadcast: return "OpGroupNonUniformBroadcast"; + case OpGroupNonUniformBroadcastFirst: return "OpGroupNonUniformBroadcastFirst"; + case OpGroupNonUniformBallot: return "OpGroupNonUniformBallot"; + case OpGroupNonUniformInverseBallot: return "OpGroupNonUniformInverseBallot"; + case OpGroupNonUniformBallotBitExtract: return "OpGroupNonUniformBallotBitExtract"; + case OpGroupNonUniformBallotBitCount: return "OpGroupNonUniformBallotBitCount"; + case OpGroupNonUniformBallotFindLSB: return "OpGroupNonUniformBallotFindLSB"; + case OpGroupNonUniformBallotFindMSB: return "OpGroupNonUniformBallotFindMSB"; + case OpGroupNonUniformShuffle: return "OpGroupNonUniformShuffle"; + case OpGroupNonUniformShuffleXor: return "OpGroupNonUniformShuffleXor"; + case OpGroupNonUniformShuffleUp: return "OpGroupNonUniformShuffleUp"; + case OpGroupNonUniformShuffleDown: return "OpGroupNonUniformShuffleDown"; + case OpGroupNonUniformIAdd: return "OpGroupNonUniformIAdd"; + case OpGroupNonUniformFAdd: return "OpGroupNonUniformFAdd"; + case OpGroupNonUniformIMul: return "OpGroupNonUniformIMul"; + case OpGroupNonUniformFMul: return "OpGroupNonUniformFMul"; + case OpGroupNonUniformSMin: return "OpGroupNonUniformSMin"; + case OpGroupNonUniformUMin: return "OpGroupNonUniformUMin"; + case OpGroupNonUniformFMin: return "OpGroupNonUniformFMin"; + case OpGroupNonUniformSMax: return "OpGroupNonUniformSMax"; + case OpGroupNonUniformUMax: return "OpGroupNonUniformUMax"; + case OpGroupNonUniformFMax: return "OpGroupNonUniformFMax"; + case OpGroupNonUniformBitwiseAnd: return "OpGroupNonUniformBitwiseAnd"; + case OpGroupNonUniformBitwiseOr: return "OpGroupNonUniformBitwiseOr"; + case OpGroupNonUniformBitwiseXor: return "OpGroupNonUniformBitwiseXor"; + case OpGroupNonUniformLogicalAnd: return "OpGroupNonUniformLogicalAnd"; + case OpGroupNonUniformLogicalOr: return "OpGroupNonUniformLogicalOr"; + case OpGroupNonUniformLogicalXor: return "OpGroupNonUniformLogicalXor"; + case OpGroupNonUniformQuadBroadcast: return "OpGroupNonUniformQuadBroadcast"; + case OpGroupNonUniformQuadSwap: return "OpGroupNonUniformQuadSwap"; + case OpCopyLogical: return "OpCopyLogical"; + case OpPtrEqual: return "OpPtrEqual"; + case OpPtrNotEqual: return "OpPtrNotEqual"; + case OpPtrDiff: return "OpPtrDiff"; + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + case OpTerminateInvocation: return "OpTerminateInvocation"; + case OpSubgroupBallotKHR: return "OpSubgroupBallotKHR"; + case OpSubgroupFirstInvocationKHR: return "OpSubgroupFirstInvocationKHR"; + case OpSubgroupAllKHR: return "OpSubgroupAllKHR"; + case OpSubgroupAnyKHR: return "OpSubgroupAnyKHR"; + case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR"; + case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR"; + case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR"; + case OpExtInstWithForwardRefsKHR: return "OpExtInstWithForwardRefsKHR"; + case OpTraceRayKHR: return "OpTraceRayKHR"; + case OpExecuteCallableKHR: return "OpExecuteCallableKHR"; + case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR"; + case OpIgnoreIntersectionKHR: return "OpIgnoreIntersectionKHR"; + case OpTerminateRayKHR: return "OpTerminateRayKHR"; + case OpSDot: return "OpSDot"; + case OpUDot: return "OpUDot"; + case OpSUDot: return "OpSUDot"; + case OpSDotAccSat: return "OpSDotAccSat"; + case OpUDotAccSat: return "OpUDotAccSat"; + case OpSUDotAccSat: return "OpSUDotAccSat"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; + case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT"; + case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT"; + case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT"; + case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; + case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; + case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR"; + case OpRayQueryGenerateIntersectionKHR: return "OpRayQueryGenerateIntersectionKHR"; + case OpRayQueryConfirmIntersectionKHR: return "OpRayQueryConfirmIntersectionKHR"; + case OpRayQueryProceedKHR: return "OpRayQueryProceedKHR"; + case OpRayQueryGetIntersectionTypeKHR: return "OpRayQueryGetIntersectionTypeKHR"; + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchWindowSSDQCOM: return "OpImageBlockMatchWindowSSDQCOM"; + case OpImageBlockMatchWindowSADQCOM: return "OpImageBlockMatchWindowSADQCOM"; + case OpImageBlockMatchGatherSSDQCOM: return "OpImageBlockMatchGatherSSDQCOM"; + case OpImageBlockMatchGatherSADQCOM: return "OpImageBlockMatchGatherSADQCOM"; + case OpGroupIAddNonUniformAMD: return "OpGroupIAddNonUniformAMD"; + case OpGroupFAddNonUniformAMD: return "OpGroupFAddNonUniformAMD"; + case OpGroupFMinNonUniformAMD: return "OpGroupFMinNonUniformAMD"; + case OpGroupUMinNonUniformAMD: return "OpGroupUMinNonUniformAMD"; + case OpGroupSMinNonUniformAMD: return "OpGroupSMinNonUniformAMD"; + case OpGroupFMaxNonUniformAMD: return "OpGroupFMaxNonUniformAMD"; + case OpGroupUMaxNonUniformAMD: return "OpGroupUMaxNonUniformAMD"; + case OpGroupSMaxNonUniformAMD: return "OpGroupSMaxNonUniformAMD"; + case OpFragmentMaskFetchAMD: return "OpFragmentMaskFetchAMD"; + case OpFragmentFetchAMD: return "OpFragmentFetchAMD"; + case OpReadClockKHR: return "OpReadClockKHR"; + case OpFinalizeNodePayloadsAMDX: return "OpFinalizeNodePayloadsAMDX"; + case OpFinishWritingNodePayloadAMDX: return "OpFinishWritingNodePayloadAMDX"; + case OpInitializeNodePayloadsAMDX: return "OpInitializeNodePayloadsAMDX"; + case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; + case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetHitKindNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; + case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; + case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpReportIntersectionKHR: return "OpReportIntersectionKHR"; + case OpIgnoreIntersectionNV: return "OpIgnoreIntersectionNV"; + case OpTerminateRayNV: return "OpTerminateRayNV"; + case OpTraceNV: return "OpTraceNV"; + case OpTraceMotionNV: return "OpTraceMotionNV"; + case OpTraceRayMotionNV: return "OpTraceRayMotionNV"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; + case OpTypeAccelerationStructureKHR: return "OpTypeAccelerationStructureKHR"; + case OpExecuteCallableNV: return "OpExecuteCallableNV"; + case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; + case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; + case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; + case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; + case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; + case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; + case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpConvertUToImageNV: return "OpConvertUToImageNV"; + case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; + case OpConvertImageToUNV: return "OpConvertImageToUNV"; + case OpConvertSamplerToUNV: return "OpConvertSamplerToUNV"; + case OpConvertUToSampledImageNV: return "OpConvertUToSampledImageNV"; + case OpConvertSampledImageToUNV: return "OpConvertSampledImageToUNV"; + case OpSamplerImageAddressingModeNV: return "OpSamplerImageAddressingModeNV"; + case OpRawAccessChainNV: return "OpRawAccessChainNV"; + case OpSubgroupShuffleINTEL: return "OpSubgroupShuffleINTEL"; + case OpSubgroupShuffleDownINTEL: return "OpSubgroupShuffleDownINTEL"; + case OpSubgroupShuffleUpINTEL: return "OpSubgroupShuffleUpINTEL"; + case OpSubgroupShuffleXorINTEL: return "OpSubgroupShuffleXorINTEL"; + case OpSubgroupBlockReadINTEL: return "OpSubgroupBlockReadINTEL"; + case OpSubgroupBlockWriteINTEL: return "OpSubgroupBlockWriteINTEL"; + case OpSubgroupImageBlockReadINTEL: return "OpSubgroupImageBlockReadINTEL"; + case OpSubgroupImageBlockWriteINTEL: return "OpSubgroupImageBlockWriteINTEL"; + case OpSubgroupImageMediaBlockReadINTEL: return "OpSubgroupImageMediaBlockReadINTEL"; + case OpSubgroupImageMediaBlockWriteINTEL: return "OpSubgroupImageMediaBlockWriteINTEL"; + case OpUCountLeadingZerosINTEL: return "OpUCountLeadingZerosINTEL"; + case OpUCountTrailingZerosINTEL: return "OpUCountTrailingZerosINTEL"; + case OpAbsISubINTEL: return "OpAbsISubINTEL"; + case OpAbsUSubINTEL: return "OpAbsUSubINTEL"; + case OpIAddSatINTEL: return "OpIAddSatINTEL"; + case OpUAddSatINTEL: return "OpUAddSatINTEL"; + case OpIAverageINTEL: return "OpIAverageINTEL"; + case OpUAverageINTEL: return "OpUAverageINTEL"; + case OpIAverageRoundedINTEL: return "OpIAverageRoundedINTEL"; + case OpUAverageRoundedINTEL: return "OpUAverageRoundedINTEL"; + case OpISubSatINTEL: return "OpISubSatINTEL"; + case OpUSubSatINTEL: return "OpUSubSatINTEL"; + case OpIMul32x16INTEL: return "OpIMul32x16INTEL"; + case OpUMul32x16INTEL: return "OpUMul32x16INTEL"; + case OpConstantFunctionPointerINTEL: return "OpConstantFunctionPointerINTEL"; + case OpFunctionPointerCallINTEL: return "OpFunctionPointerCallINTEL"; + case OpAsmTargetINTEL: return "OpAsmTargetINTEL"; + case OpAsmINTEL: return "OpAsmINTEL"; + case OpAsmCallINTEL: return "OpAsmCallINTEL"; + case OpAtomicFMinEXT: return "OpAtomicFMinEXT"; + case OpAtomicFMaxEXT: return "OpAtomicFMaxEXT"; + case OpAssumeTrueKHR: return "OpAssumeTrueKHR"; + case OpExpectKHR: return "OpExpectKHR"; + case OpDecorateString: return "OpDecorateString"; + case OpMemberDecorateString: return "OpMemberDecorateString"; + case OpVmeImageINTEL: return "OpVmeImageINTEL"; + case OpTypeVmeImageINTEL: return "OpTypeVmeImageINTEL"; + case OpTypeAvcImePayloadINTEL: return "OpTypeAvcImePayloadINTEL"; + case OpTypeAvcRefPayloadINTEL: return "OpTypeAvcRefPayloadINTEL"; + case OpTypeAvcSicPayloadINTEL: return "OpTypeAvcSicPayloadINTEL"; + case OpTypeAvcMcePayloadINTEL: return "OpTypeAvcMcePayloadINTEL"; + case OpTypeAvcMceResultINTEL: return "OpTypeAvcMceResultINTEL"; + case OpTypeAvcImeResultINTEL: return "OpTypeAvcImeResultINTEL"; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: return "OpTypeAvcImeResultSingleReferenceStreamoutINTEL"; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: return "OpTypeAvcImeResultDualReferenceStreamoutINTEL"; + case OpTypeAvcImeSingleReferenceStreaminINTEL: return "OpTypeAvcImeSingleReferenceStreaminINTEL"; + case OpTypeAvcImeDualReferenceStreaminINTEL: return "OpTypeAvcImeDualReferenceStreaminINTEL"; + case OpTypeAvcRefResultINTEL: return "OpTypeAvcRefResultINTEL"; + case OpTypeAvcSicResultINTEL: return "OpTypeAvcSicResultINTEL"; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: return "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL"; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: return "OpSubgroupAvcMceSetInterShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: return "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: return "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL"; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: return "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL"; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: return "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL"; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: return "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL"; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: return "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL"; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: return "OpSubgroupAvcMceSetAcOnlyHaarINTEL"; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: return "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL"; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcMceConvertToImePayloadINTEL: return "OpSubgroupAvcMceConvertToImePayloadINTEL"; + case OpSubgroupAvcMceConvertToImeResultINTEL: return "OpSubgroupAvcMceConvertToImeResultINTEL"; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: return "OpSubgroupAvcMceConvertToRefPayloadINTEL"; + case OpSubgroupAvcMceConvertToRefResultINTEL: return "OpSubgroupAvcMceConvertToRefResultINTEL"; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: return "OpSubgroupAvcMceConvertToSicPayloadINTEL"; + case OpSubgroupAvcMceConvertToSicResultINTEL: return "OpSubgroupAvcMceConvertToSicResultINTEL"; + case OpSubgroupAvcMceGetMotionVectorsINTEL: return "OpSubgroupAvcMceGetMotionVectorsINTEL"; + case OpSubgroupAvcMceGetInterDistortionsINTEL: return "OpSubgroupAvcMceGetInterDistortionsINTEL"; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: return "OpSubgroupAvcMceGetBestInterDistortionsINTEL"; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: return "OpSubgroupAvcMceGetInterMajorShapeINTEL"; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: return "OpSubgroupAvcMceGetInterMinorShapeINTEL"; + case OpSubgroupAvcMceGetInterDirectionsINTEL: return "OpSubgroupAvcMceGetInterDirectionsINTEL"; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: return "OpSubgroupAvcMceGetInterMotionVectorCountINTEL"; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: return "OpSubgroupAvcMceGetInterReferenceIdsINTEL"; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: return "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL"; + case OpSubgroupAvcImeInitializeINTEL: return "OpSubgroupAvcImeInitializeINTEL"; + case OpSubgroupAvcImeSetSingleReferenceINTEL: return "OpSubgroupAvcImeSetSingleReferenceINTEL"; + case OpSubgroupAvcImeSetDualReferenceINTEL: return "OpSubgroupAvcImeSetDualReferenceINTEL"; + case OpSubgroupAvcImeRefWindowSizeINTEL: return "OpSubgroupAvcImeRefWindowSizeINTEL"; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: return "OpSubgroupAvcImeAdjustRefOffsetINTEL"; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: return "OpSubgroupAvcImeConvertToMcePayloadINTEL"; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: return "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL"; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: return "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL"; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: return "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL"; + case OpSubgroupAvcImeSetWeightedSadINTEL: return "OpSubgroupAvcImeSetWeightedSadINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: return "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL"; + case OpSubgroupAvcImeConvertToMceResultINTEL: return "OpSubgroupAvcImeConvertToMceResultINTEL"; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: return "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL"; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: return "OpSubgroupAvcImeGetDualReferenceStreaminINTEL"; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL"; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: return "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL"; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: return "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL"; + case OpSubgroupAvcImeGetBorderReachedINTEL: return "OpSubgroupAvcImeGetBorderReachedINTEL"; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: return "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL"; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: return "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL"; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: return "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL"; + case OpSubgroupAvcFmeInitializeINTEL: return "OpSubgroupAvcFmeInitializeINTEL"; + case OpSubgroupAvcBmeInitializeINTEL: return "OpSubgroupAvcBmeInitializeINTEL"; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: return "OpSubgroupAvcRefConvertToMcePayloadINTEL"; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: return "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL"; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: return "OpSubgroupAvcRefSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcRefConvertToMceResultINTEL: return "OpSubgroupAvcRefConvertToMceResultINTEL"; + case OpSubgroupAvcSicInitializeINTEL: return "OpSubgroupAvcSicInitializeINTEL"; + case OpSubgroupAvcSicConfigureSkcINTEL: return "OpSubgroupAvcSicConfigureSkcINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaINTEL"; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: return "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL"; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: return "OpSubgroupAvcSicGetMotionVectorMaskINTEL"; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: return "OpSubgroupAvcSicConvertToMcePayloadINTEL"; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: return "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL"; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: return "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL"; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: return "OpSubgroupAvcSicSetBilinearFilterEnableINTEL"; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: return "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL"; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: return "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL"; + case OpSubgroupAvcSicEvaluateIpeINTEL: return "OpSubgroupAvcSicEvaluateIpeINTEL"; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL"; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: return "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL"; + case OpSubgroupAvcSicConvertToMceResultINTEL: return "OpSubgroupAvcSicConvertToMceResultINTEL"; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: return "OpSubgroupAvcSicGetIpeLumaShapeINTEL"; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL"; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: return "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL"; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: return "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL"; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: return "OpSubgroupAvcSicGetIpeChromaModeINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL"; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: return "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL"; + case OpSubgroupAvcSicGetInterRawSadsINTEL: return "OpSubgroupAvcSicGetInterRawSadsINTEL"; + case OpVariableLengthArrayINTEL: return "OpVariableLengthArrayINTEL"; + case OpSaveMemoryINTEL: return "OpSaveMemoryINTEL"; + case OpRestoreMemoryINTEL: return "OpRestoreMemoryINTEL"; + case OpArbitraryFloatSinCosPiINTEL: return "OpArbitraryFloatSinCosPiINTEL"; + case OpArbitraryFloatCastINTEL: return "OpArbitraryFloatCastINTEL"; + case OpArbitraryFloatCastFromIntINTEL: return "OpArbitraryFloatCastFromIntINTEL"; + case OpArbitraryFloatCastToIntINTEL: return "OpArbitraryFloatCastToIntINTEL"; + case OpArbitraryFloatAddINTEL: return "OpArbitraryFloatAddINTEL"; + case OpArbitraryFloatSubINTEL: return "OpArbitraryFloatSubINTEL"; + case OpArbitraryFloatMulINTEL: return "OpArbitraryFloatMulINTEL"; + case OpArbitraryFloatDivINTEL: return "OpArbitraryFloatDivINTEL"; + case OpArbitraryFloatGTINTEL: return "OpArbitraryFloatGTINTEL"; + case OpArbitraryFloatGEINTEL: return "OpArbitraryFloatGEINTEL"; + case OpArbitraryFloatLTINTEL: return "OpArbitraryFloatLTINTEL"; + case OpArbitraryFloatLEINTEL: return "OpArbitraryFloatLEINTEL"; + case OpArbitraryFloatEQINTEL: return "OpArbitraryFloatEQINTEL"; + case OpArbitraryFloatRecipINTEL: return "OpArbitraryFloatRecipINTEL"; + case OpArbitraryFloatRSqrtINTEL: return "OpArbitraryFloatRSqrtINTEL"; + case OpArbitraryFloatCbrtINTEL: return "OpArbitraryFloatCbrtINTEL"; + case OpArbitraryFloatHypotINTEL: return "OpArbitraryFloatHypotINTEL"; + case OpArbitraryFloatSqrtINTEL: return "OpArbitraryFloatSqrtINTEL"; + case OpArbitraryFloatLogINTEL: return "OpArbitraryFloatLogINTEL"; + case OpArbitraryFloatLog2INTEL: return "OpArbitraryFloatLog2INTEL"; + case OpArbitraryFloatLog10INTEL: return "OpArbitraryFloatLog10INTEL"; + case OpArbitraryFloatLog1pINTEL: return "OpArbitraryFloatLog1pINTEL"; + case OpArbitraryFloatExpINTEL: return "OpArbitraryFloatExpINTEL"; + case OpArbitraryFloatExp2INTEL: return "OpArbitraryFloatExp2INTEL"; + case OpArbitraryFloatExp10INTEL: return "OpArbitraryFloatExp10INTEL"; + case OpArbitraryFloatExpm1INTEL: return "OpArbitraryFloatExpm1INTEL"; + case OpArbitraryFloatSinINTEL: return "OpArbitraryFloatSinINTEL"; + case OpArbitraryFloatCosINTEL: return "OpArbitraryFloatCosINTEL"; + case OpArbitraryFloatSinCosINTEL: return "OpArbitraryFloatSinCosINTEL"; + case OpArbitraryFloatSinPiINTEL: return "OpArbitraryFloatSinPiINTEL"; + case OpArbitraryFloatCosPiINTEL: return "OpArbitraryFloatCosPiINTEL"; + case OpArbitraryFloatASinINTEL: return "OpArbitraryFloatASinINTEL"; + case OpArbitraryFloatASinPiINTEL: return "OpArbitraryFloatASinPiINTEL"; + case OpArbitraryFloatACosINTEL: return "OpArbitraryFloatACosINTEL"; + case OpArbitraryFloatACosPiINTEL: return "OpArbitraryFloatACosPiINTEL"; + case OpArbitraryFloatATanINTEL: return "OpArbitraryFloatATanINTEL"; + case OpArbitraryFloatATanPiINTEL: return "OpArbitraryFloatATanPiINTEL"; + case OpArbitraryFloatATan2INTEL: return "OpArbitraryFloatATan2INTEL"; + case OpArbitraryFloatPowINTEL: return "OpArbitraryFloatPowINTEL"; + case OpArbitraryFloatPowRINTEL: return "OpArbitraryFloatPowRINTEL"; + case OpArbitraryFloatPowNINTEL: return "OpArbitraryFloatPowNINTEL"; + case OpLoopControlINTEL: return "OpLoopControlINTEL"; + case OpAliasDomainDeclINTEL: return "OpAliasDomainDeclINTEL"; + case OpAliasScopeDeclINTEL: return "OpAliasScopeDeclINTEL"; + case OpAliasScopeListDeclINTEL: return "OpAliasScopeListDeclINTEL"; + case OpFixedSqrtINTEL: return "OpFixedSqrtINTEL"; + case OpFixedRecipINTEL: return "OpFixedRecipINTEL"; + case OpFixedRsqrtINTEL: return "OpFixedRsqrtINTEL"; + case OpFixedSinINTEL: return "OpFixedSinINTEL"; + case OpFixedCosINTEL: return "OpFixedCosINTEL"; + case OpFixedSinCosINTEL: return "OpFixedSinCosINTEL"; + case OpFixedSinPiINTEL: return "OpFixedSinPiINTEL"; + case OpFixedCosPiINTEL: return "OpFixedCosPiINTEL"; + case OpFixedSinCosPiINTEL: return "OpFixedSinCosPiINTEL"; + case OpFixedLogINTEL: return "OpFixedLogINTEL"; + case OpFixedExpINTEL: return "OpFixedExpINTEL"; + case OpPtrCastToCrossWorkgroupINTEL: return "OpPtrCastToCrossWorkgroupINTEL"; + case OpCrossWorkgroupCastToPtrINTEL: return "OpCrossWorkgroupCastToPtrINTEL"; + case OpReadPipeBlockingINTEL: return "OpReadPipeBlockingINTEL"; + case OpWritePipeBlockingINTEL: return "OpWritePipeBlockingINTEL"; + case OpFPGARegINTEL: return "OpFPGARegINTEL"; + case OpRayQueryGetRayTMinKHR: return "OpRayQueryGetRayTMinKHR"; + case OpRayQueryGetRayFlagsKHR: return "OpRayQueryGetRayFlagsKHR"; + case OpRayQueryGetIntersectionTKHR: return "OpRayQueryGetIntersectionTKHR"; + case OpRayQueryGetIntersectionInstanceCustomIndexKHR: return "OpRayQueryGetIntersectionInstanceCustomIndexKHR"; + case OpRayQueryGetIntersectionInstanceIdKHR: return "OpRayQueryGetIntersectionInstanceIdKHR"; + case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: return "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR"; + case OpRayQueryGetIntersectionGeometryIndexKHR: return "OpRayQueryGetIntersectionGeometryIndexKHR"; + case OpRayQueryGetIntersectionPrimitiveIndexKHR: return "OpRayQueryGetIntersectionPrimitiveIndexKHR"; + case OpRayQueryGetIntersectionBarycentricsKHR: return "OpRayQueryGetIntersectionBarycentricsKHR"; + case OpRayQueryGetIntersectionFrontFaceKHR: return "OpRayQueryGetIntersectionFrontFaceKHR"; + case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: return "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR"; + case OpRayQueryGetIntersectionObjectRayDirectionKHR: return "OpRayQueryGetIntersectionObjectRayDirectionKHR"; + case OpRayQueryGetIntersectionObjectRayOriginKHR: return "OpRayQueryGetIntersectionObjectRayOriginKHR"; + case OpRayQueryGetWorldRayDirectionKHR: return "OpRayQueryGetWorldRayDirectionKHR"; + case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; + case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; + case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpAtomicFAddEXT: return "OpAtomicFAddEXT"; + case OpTypeBufferSurfaceINTEL: return "OpTypeBufferSurfaceINTEL"; + case OpTypeStructContinuedINTEL: return "OpTypeStructContinuedINTEL"; + case OpConstantCompositeContinuedINTEL: return "OpConstantCompositeContinuedINTEL"; + case OpSpecConstantCompositeContinuedINTEL: return "OpSpecConstantCompositeContinuedINTEL"; + case OpCompositeConstructContinuedINTEL: return "OpCompositeConstructContinuedINTEL"; + case OpConvertFToBF16INTEL: return "OpConvertFToBF16INTEL"; + case OpConvertBF16ToFINTEL: return "OpConvertBF16ToFINTEL"; + case OpControlBarrierArriveINTEL: return "OpControlBarrierArriveINTEL"; + case OpControlBarrierWaitINTEL: return "OpControlBarrierWaitINTEL"; + case OpGroupIMulKHR: return "OpGroupIMulKHR"; + case OpGroupFMulKHR: return "OpGroupFMulKHR"; + case OpGroupBitwiseAndKHR: return "OpGroupBitwiseAndKHR"; + case OpGroupBitwiseOrKHR: return "OpGroupBitwiseOrKHR"; + case OpGroupBitwiseXorKHR: return "OpGroupBitwiseXorKHR"; + case OpGroupLogicalAndKHR: return "OpGroupLogicalAndKHR"; + case OpGroupLogicalOrKHR: return "OpGroupLogicalOrKHR"; + case OpGroupLogicalXorKHR: return "OpGroupLogicalXorKHR"; + case OpMaskedGatherINTEL: return "OpMaskedGatherINTEL"; + case OpMaskedScatterINTEL: return "OpMaskedScatterINTEL"; + default: return "Unknown"; + } +} + #endif /* SPV_ENABLE_UTILITY_CODE */ -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } -inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } -inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +// Overload bitwise operators for mask bit combining + +constexpr ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +constexpr ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +constexpr ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } +constexpr FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +constexpr FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +constexpr FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +constexpr FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } +constexpr SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +constexpr SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +constexpr SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +constexpr SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } +constexpr LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +constexpr LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +constexpr LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +constexpr LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } +constexpr FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +constexpr FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +constexpr FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +constexpr FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } +constexpr MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +constexpr MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +constexpr MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +constexpr MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } +constexpr MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +constexpr MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +constexpr MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +constexpr MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } +constexpr KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +constexpr KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +constexpr KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +constexpr KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } +constexpr RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +constexpr RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +constexpr RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +constexpr RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } +constexpr FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +constexpr FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +constexpr FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +constexpr FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +constexpr CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +constexpr RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } +constexpr RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } +constexpr RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr RawAccessChainOperandsMask operator~(RawAccessChainOperandsMask a) { return RawAccessChainOperandsMask(~unsigned(a)); } } // end namespace spv diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json index e80d3bd6e..430c74f5e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.json @@ -6,7 +6,7 @@ "Comment": [ [ - "Copyright (c) 2014-2020 The Khronos Group Inc.", + "Copyright (c) 2014-2024 The Khronos Group Inc.", "", "Permission is hereby granted, free of charge, to any person obtaining a copy", "of this software and/or associated documentation files (the \"Materials\"),", @@ -36,7 +36,7 @@ ], [ "Enumeration tokens for SPIR-V, in various styles:", - " C, C++, C++11, JSON, Lua, Python, C#, D", + " C, C++, C++11, JSON, Lua, Python, C#, D, Beef", "", "- C will have tokens with a \"Spv\" prefix, e.g.: SpvSourceLanguageGLSL", "- C++ will have tokens in the \"spv\" name space, e.g.: spv::SourceLanguageGLSL", @@ -46,6 +46,8 @@ "- C# will use enum classes in the Specification class located in the \"Spv\" namespace,", " e.g.: Spv.Specification.SourceLanguage.GLSL", "- D will have tokens under the \"spv\" module, e.g: spv.SourceLanguage.GLSL", + "- Beef will use enum classes in the Specification class located in the \"Spv\" namespace,", + " e.g.: Spv.Specification.SourceLanguage.GLSL", "", "Some tokens act like mask values, which can be OR'd together,", "while others are mutually exclusive. The mask-like ones have", @@ -72,7 +74,13 @@ "OpenCL_C": 3, "OpenCL_CPP": 4, "HLSL": 5, - "CPP_for_OpenCL": 6 + "CPP_for_OpenCL": 6, + "SYCL": 7, + "HERO_C": 8, + "NZSL": 9, + "WGSL": 10, + "Slang": 11, + "Zig": 12 } }, { @@ -100,7 +108,9 @@ "MissKHR": 5317, "MissNV": 5317, "CallableKHR": 5318, - "CallableNV": 5318 + "CallableNV": 5318, + "TaskEXT": 5364, + "MeshEXT": 5365 } }, { @@ -170,6 +180,9 @@ "SubgroupsPerWorkgroupId": 37, "LocalSizeId": 38, "LocalSizeHintId": 39, + "NonCoherentColorAttachmentReadEXT": 4169, + "NonCoherentDepthAttachmentReadEXT": 4170, + "NonCoherentStencilAttachmentReadEXT": 4171, "SubgroupUniformControlFlowKHR": 4421, "PostDepthCoverage": 4446, "DenormPreserve": 4459, @@ -177,11 +190,28 @@ "SignedZeroInfNanPreserve": 4461, "RoundingModeRTE": 4462, "RoundingModeRTZ": 4463, + "EarlyAndLateFragmentTestsAMD": 5017, "StencilRefReplacingEXT": 5027, + "CoalescingAMDX": 5069, + "MaxNodeRecursionAMDX": 5071, + "StaticNumWorkgroupsAMDX": 5072, + "ShaderIndexAMDX": 5073, + "MaxNumWorkgroupsAMDX": 5077, + "StencilRefUnchangedFrontAMD": 5079, + "StencilRefGreaterFrontAMD": 5080, + "StencilRefLessFrontAMD": 5081, + "StencilRefUnchangedBackAMD": 5082, + "StencilRefGreaterBackAMD": 5083, + "StencilRefLessBackAMD": 5084, + "QuadDerivativesKHR": 5088, + "RequireFullQuadsKHR": 5089, + "OutputLinesEXT": 5269, "OutputLinesNV": 5269, + "OutputPrimitivesEXT": 5270, "OutputPrimitivesNV": 5270, "DerivativeGroupQuadsNV": 5289, "DerivativeGroupLinearNV": 5290, + "OutputTrianglesEXT": 5298, "OutputTrianglesNV": 5298, "PixelInterlockOrderedEXT": 5366, "PixelInterlockUnorderedEXT": 5367, @@ -198,7 +228,15 @@ "MaxWorkDimINTEL": 5894, "NoGlobalOffsetINTEL": 5895, "NumSIMDWorkitemsINTEL": 5896, - "SchedulerTargetFmaxMhzINTEL": 5903 + "SchedulerTargetFmaxMhzINTEL": 5903, + "MaximallyReconvergesKHR": 6023, + "FPFastMathDefault": 6028, + "StreamingInterfaceINTEL": 6154, + "RegisterMapInterfaceINTEL": 6160, + "NamedBarrierCountINTEL": 6417, + "MaximumRegistersINTEL": 6461, + "MaximumRegistersIdINTEL": 6462, + "NamedMaximumRegistersINTEL": 6463 } }, { @@ -219,6 +257,9 @@ "AtomicCounter": 10, "Image": 11, "StorageBuffer": 12, + "TileImageEXT": 4172, + "NodePayloadAMDX": 5068, + "NodeOutputPayloadAMDX": 5076, "CallableDataKHR": 5328, "CallableDataNV": 5328, "IncomingCallableDataKHR": 5329, @@ -233,6 +274,8 @@ "ShaderRecordBufferNV": 5343, "PhysicalStorageBuffer": 5349, "PhysicalStorageBufferEXT": 5349, + "HitObjectAttributeNV": 5385, + "TaskPayloadWorkgroupEXT": 5402, "CodeSectionINTEL": 5605, "DeviceOnlyINTEL": 5936, "HostOnlyINTEL": 5937 @@ -249,7 +292,8 @@ "Cube": 3, "Rect": 4, "Buffer": 5, - "SubpassData": 6 + "SubpassData": 6, + "TileImageDataEXT": 4173 } }, { @@ -370,7 +414,9 @@ "HalfFloat": 13, "Float": 14, "UnormInt24": 15, - "UnormInt101010_2": 16 + "UnormInt101010_2": 16, + "UnsignedIntRaw10EXT": 19, + "UnsignedIntRaw12EXT": 20 } }, { @@ -410,8 +456,11 @@ "NSZ": 2, "AllowRecip": 3, "Fast": 4, + "AllowContract": 16, "AllowContractFastINTEL": 16, - "AllowReassocINTEL": 17 + "AllowReassoc": 17, + "AllowReassocINTEL": 17, + "AllowTransform": 18 } }, { @@ -457,7 +506,8 @@ "NoAlias": 4, "NoCapture": 5, "NoWrite": 6, - "NoReadWrite": 7 + "NoReadWrite": 7, + "RuntimeAlignedINTEL": 5940 } }, { @@ -514,11 +564,19 @@ "MaxByteOffsetId": 47, "NoSignedWrap": 4469, "NoUnsignedWrap": 4470, + "WeightTextureQCOM": 4487, + "BlockMatchTextureQCOM": 4488, + "BlockMatchSamplerQCOM": 4499, "ExplicitInterpAMD": 4999, + "NodeSharesPayloadLimitsWithAMDX": 5019, + "NodeMaxPayloadsAMDX": 5020, + "TrackFinishWritingAMDX": 5078, + "PayloadNodeNameAMDX": 5091, "OverrideCoverageNV": 5248, "PassthroughNV": 5250, "ViewportRelativeNV": 5252, "SecondaryViewportRelativeNV": 5256, + "PerPrimitiveEXT": 5271, "PerPrimitiveNV": 5271, "PerViewNV": 5272, "PerTaskNV": 5273, @@ -530,6 +588,7 @@ "RestrictPointerEXT": 5355, "AliasedPointer": 5356, "AliasedPointerEXT": 5356, + "HitObjectShaderRecordBufferNV": 5386, "BindlessSamplerNV": 5398, "BindlessImageNV": 5399, "BoundSamplerNV": 5400, @@ -562,18 +621,45 @@ "MergeINTEL": 5834, "BankBitsINTEL": 5835, "ForcePow2DepthINTEL": 5836, + "StridesizeINTEL": 5883, + "WordsizeINTEL": 5884, + "TrueDualPortINTEL": 5885, "BurstCoalesceINTEL": 5899, "CacheSizeINTEL": 5900, "DontStaticallyCoalesceINTEL": 5901, "PrefetchINTEL": 5902, "StallEnableINTEL": 5905, "FuseLoopsInFunctionINTEL": 5907, + "MathOpDSPModeINTEL": 5909, + "AliasScopeINTEL": 5914, + "NoAliasINTEL": 5915, + "InitiationIntervalINTEL": 5917, + "MaxConcurrencyINTEL": 5918, + "PipelineEnableINTEL": 5919, "BufferLocationINTEL": 5921, "IOPipeStorageINTEL": 5944, "FunctionFloatingPointModeINTEL": 6080, "SingleElementVectorINTEL": 6085, "VectorComputeCallableFunctionINTEL": 6087, - "MediaBlockIOINTEL": 6140 + "MediaBlockIOINTEL": 6140, + "StallFreeINTEL": 6151, + "FPMaxErrorDecorationINTEL": 6170, + "LatencyControlLabelINTEL": 6172, + "LatencyControlConstraintINTEL": 6173, + "ConduitKernelArgumentINTEL": 6175, + "RegisterMapKernelArgumentINTEL": 6176, + "MMHostInterfaceAddressWidthINTEL": 6177, + "MMHostInterfaceDataWidthINTEL": 6178, + "MMHostInterfaceLatencyINTEL": 6179, + "MMHostInterfaceReadWriteModeINTEL": 6180, + "MMHostInterfaceMaxBurstINTEL": 6181, + "MMHostInterfaceWaitRequestINTEL": 6182, + "StableKernelArgumentINTEL": 6183, + "HostAccessINTEL": 6188, + "InitModeINTEL": 6190, + "ImplementInRegisterMapINTEL": 6191, + "CacheControlLoadINTEL": 6442, + "CacheControlStoreINTEL": 6443 } }, { @@ -622,6 +708,11 @@ "SubgroupLocalInvocationId": 41, "VertexIndex": 42, "InstanceIndex": 43, + "CoreIDARM": 4160, + "CoreCountARM": 4161, + "CoreMaxIDARM": 4162, + "WarpIDARM": 4163, + "WarpMaxIDARM": 4164, "SubgroupEqMask": 4416, "SubgroupEqMaskKHR": 4416, "SubgroupGeMask": 4417, @@ -647,6 +738,8 @@ "BaryCoordSmoothSampleAMD": 4997, "BaryCoordPullModelAMD": 4998, "FragStencilRefEXT": 5014, + "CoalescedInputCountAMDX": 5021, + "ShaderIndexAMDX": 5073, "ViewportMaskNV": 5253, "SecondaryPositionNV": 5257, "SecondaryViewportMaskNV": 5258, @@ -669,6 +762,10 @@ "FragmentSizeNV": 5292, "FragInvocationCountEXT": 5293, "InvocationsPerPixelNV": 5293, + "PrimitivePointIndicesEXT": 5294, + "PrimitiveLineIndicesEXT": 5295, + "PrimitiveTriangleIndicesEXT": 5296, + "CullPrimitiveEXT": 5299, "LaunchIdKHR": 5319, "LaunchIdNV": 5319, "LaunchSizeKHR": 5320, @@ -695,13 +792,19 @@ "HitKindKHR": 5333, "HitKindNV": 5333, "CurrentRayTimeNV": 5334, + "HitTriangleVertexPositionsKHR": 5335, + "HitMicroTriangleVertexPositionsNV": 5337, + "HitMicroTriangleVertexBarycentricsNV": 5344, "IncomingRayFlagsKHR": 5351, "IncomingRayFlagsNV": 5351, "RayGeometryIndexKHR": 5352, "WarpsPerSMNV": 5374, "SMCountNV": 5375, "WarpIDNV": 5376, - "SMIDNV": 5377 + "SMIDNV": 5377, + "HitKindFrontFacingMicroTriangleNV": 5405, + "HitKindBackFacingMicroTriangleNV": 5406, + "CullMaskKHR": 6021 } }, { @@ -734,7 +837,9 @@ "LoopCoalesceINTEL": 20, "MaxInterleavingINTEL": 21, "SpeculatedIterationsINTEL": 22, - "NoFusionINTEL": 23 + "NoFusionINTEL": 23, + "LoopCountINTEL": 24, + "MaxReinvocationDelayINTEL": 25 } }, { @@ -786,7 +891,9 @@ "MakePointerVisible": 4, "MakePointerVisibleKHR": 4, "NonPrivatePointer": 5, - "NonPrivatePointerKHR": 5 + "NonPrivatePointerKHR": 5, + "AliasScopeINTELMask": 16, + "NoAliasINTELMask": 17 } }, { @@ -911,6 +1018,11 @@ "ShaderLayer": 69, "ShaderViewportIndex": 70, "UniformDecoration": 71, + "CoreBuiltinsARM": 4165, + "TileImageColorReadAccessEXT": 4166, + "TileImageDepthReadAccessEXT": 4167, + "TileImageStencilReadAccessEXT": 4168, + "CooperativeMatrixLayoutsARM": 4201, "FragmentShadingRateKHR": 4422, "SubgroupBallotKHR": 4423, "DrawParameters": 4427, @@ -942,6 +1054,10 @@ "RayQueryKHR": 4472, "RayTraversalPrimitiveCullingKHR": 4478, "RayTracingKHR": 4479, + "TextureSampleWeightedQCOM": 4484, + "TextureBoxFilterQCOM": 4485, + "TextureBlockMatchQCOM": 4486, + "TextureBlockMatch2QCOM": 4498, "Float16ImageAMD": 5008, "ImageGatherBiasLodAMD": 5009, "FragmentMaskAMD": 5010, @@ -949,6 +1065,8 @@ "ImageReadWriteLodAMD": 5015, "Int64ImageEXT": 5016, "ShaderClockKHR": 5055, + "ShaderEnqueueAMDX": 5067, + "QuadControlKHR": 5087, "SampleMaskOverrideCoverageNV": 5249, "GeometryShaderPassthroughNV": 5251, "ShaderViewportIndexLayerEXT": 5254, @@ -959,6 +1077,7 @@ "FragmentFullyCoveredEXT": 5265, "MeshShadingNV": 5266, "ImageFootprintNV": 5282, + "MeshShadingEXT": 5283, "FragmentBarycentricKHR": 5284, "FragmentBarycentricNV": 5284, "ComputeDerivativeGroupQuadsNV": 5288, @@ -989,6 +1108,7 @@ "UniformTexelBufferArrayNonUniformIndexingEXT": 5311, "StorageTexelBufferArrayNonUniformIndexing": 5312, "StorageTexelBufferArrayNonUniformIndexingEXT": 5312, + "RayTracingPositionFetchKHR": 5336, "RayTracingNV": 5340, "RayTracingMotionBlurNV": 5341, "VulkanMemoryModel": 5345, @@ -1006,7 +1126,14 @@ "FragmentShaderPixelInterlockEXT": 5378, "DemoteToHelperInvocation": 5379, "DemoteToHelperInvocationEXT": 5379, + "DisplacementMicromapNV": 5380, + "RayTracingOpacityMicromapEXT": 5381, + "ShaderInvocationReorderNV": 5383, "BindlessTextureNV": 5390, + "RayQueryPositionFetchKHR": 5391, + "AtomicFloat16VectorNV": 5404, + "RayTracingDisplacementMicromapNV": 5409, + "RawAccessChainsNV": 5414, "SubgroupShuffleINTEL": 5568, "SubgroupBufferBlockIOINTEL": 5569, "SubgroupImageBlockIOINTEL": 5570, @@ -1039,9 +1166,13 @@ "FPGAMemoryAccessesINTEL": 5898, "FPGAClusterAttributesINTEL": 5904, "LoopFuseINTEL": 5906, + "FPGADSPControlINTEL": 5908, + "MemoryAccessAliasingINTEL": 5910, + "FPGAInvocationPipeliningAttributesINTEL": 5916, "FPGABufferLocationINTEL": 5920, "ArbitraryPrecisionFixedPointINTEL": 5922, "USMStorageClassesINTEL": 5935, + "RuntimeAlignedAttributeINTEL": 5939, "IOPipesINTEL": 5943, "BlockingPipesINTEL": 5945, "FPGARegINTEL": 5948, @@ -1053,13 +1184,31 @@ "DotProductInput4x8BitPackedKHR": 6018, "DotProduct": 6019, "DotProductKHR": 6019, + "RayCullMaskKHR": 6020, + "CooperativeMatrixKHR": 6022, + "ReplicatedCompositesEXT": 6024, "BitInstructions": 6025, + "GroupNonUniformRotateKHR": 6026, + "FloatControls2": 6029, "AtomicFloat32AddEXT": 6033, "AtomicFloat64AddEXT": 6034, - "LongConstantCompositeINTEL": 6089, + "LongCompositesINTEL": 6089, "OptNoneINTEL": 6094, "AtomicFloat16AddEXT": 6095, - "DebugInfoModuleINTEL": 6114 + "DebugInfoModuleINTEL": 6114, + "BFloat16ConversionINTEL": 6115, + "SplitBarrierINTEL": 6141, + "FPGAClusterAttributesV2INTEL": 6150, + "FPGAKernelAttributesv2INTEL": 6161, + "FPMaxErrorINTEL": 6169, + "FPGALatencyControlINTEL": 6171, + "FPGAArgumentInterfacesINTEL": 6174, + "GlobalVariableHostAccessINTEL": 6187, + "GlobalVariableFPGADecorationsINTEL": 6189, + "GroupUniformArithmeticKHR": 6400, + "MaskedGatherScatterINTEL": 6427, + "CacheControlsINTEL": 6441, + "RegisterLimitsINTEL": 6460 } }, { @@ -1076,7 +1225,8 @@ "CullOpaqueKHR": 6, "CullNoOpaqueKHR": 7, "SkipTrianglesKHR": 8, - "SkipAABBsKHR": 9 + "SkipAABBsKHR": 9, + "ForceOpacityMicromap2StateEXT": 10 } }, { @@ -1171,6 +1321,99 @@ "PackedVectorFormat4x8BitKHR": 0 } }, + { + "Name": "CooperativeMatrixOperands", + "Type": "Bit", + "Values": + { + "MatrixASignedComponentsKHR": 0, + "MatrixBSignedComponentsKHR": 1, + "MatrixCSignedComponentsKHR": 2, + "MatrixResultSignedComponentsKHR": 3, + "SaturatingAccumulationKHR": 4 + } + }, + { + "Name": "CooperativeMatrixLayout", + "Type": "Value", + "Values": + { + "RowMajorKHR": 0, + "ColumnMajorKHR": 1, + "RowBlockedInterleavedARM": 4202, + "ColumnBlockedInterleavedARM": 4203 + } + }, + { + "Name": "CooperativeMatrixUse", + "Type": "Value", + "Values": + { + "MatrixAKHR": 0, + "MatrixBKHR": 1, + "MatrixAccumulatorKHR": 2 + } + }, + { + "Name": "InitializationModeQualifier", + "Type": "Value", + "Values": + { + "InitOnDeviceReprogramINTEL": 0, + "InitOnDeviceResetINTEL": 1 + } + }, + { + "Name": "HostAccessQualifier", + "Type": "Value", + "Values": + { + "NoneINTEL": 0, + "ReadINTEL": 1, + "WriteINTEL": 2, + "ReadWriteINTEL": 3 + } + }, + { + "Name": "LoadCacheControl", + "Type": "Value", + "Values": + { + "UncachedINTEL": 0, + "CachedINTEL": 1, + "StreamingINTEL": 2, + "InvalidateAfterReadINTEL": 3, + "ConstCachedINTEL": 4 + } + }, + { + "Name": "StoreCacheControl", + "Type": "Value", + "Values": + { + "UncachedINTEL": 0, + "WriteThroughINTEL": 1, + "WriteBackINTEL": 2, + "StreamingINTEL": 3 + } + }, + { + "Name": "NamedMaximumNumberOfRegisters", + "Type": "Value", + "Values": + { + "AutoINTEL": 0 + } + }, + { + "Name": "RawAccessChainOperands", + "Type": "Bit", + "Values": + { + "RobustnessPerComponentNV": 0, + "RobustnessPerElementNV": 1 + } + }, { "Name": "Op", "Type": "Value", @@ -1520,13 +1763,18 @@ "OpPtrEqual": 401, "OpPtrNotEqual": 402, "OpPtrDiff": 403, + "OpColorAttachmentReadEXT": 4160, + "OpDepthAttachmentReadEXT": 4161, + "OpStencilAttachmentReadEXT": 4162, "OpTerminateInvocation": 4416, "OpSubgroupBallotKHR": 4421, "OpSubgroupFirstInvocationKHR": 4422, "OpSubgroupAllKHR": 4428, "OpSubgroupAnyKHR": 4429, "OpSubgroupAllEqualKHR": 4430, + "OpGroupNonUniformRotateKHR": 4431, "OpSubgroupReadInvocationKHR": 4432, + "OpExtInstWithForwardRefsKHR": 4433, "OpTraceRayKHR": 4445, "OpExecuteCallableKHR": 4446, "OpConvertUToAccelerationStructureKHR": 4447, @@ -1544,6 +1792,14 @@ "OpUDotAccSatKHR": 4454, "OpSUDotAccSat": 4455, "OpSUDotAccSatKHR": 4455, + "OpTypeCooperativeMatrixKHR": 4456, + "OpCooperativeMatrixLoadKHR": 4457, + "OpCooperativeMatrixStoreKHR": 4458, + "OpCooperativeMatrixMulAddKHR": 4459, + "OpCooperativeMatrixLengthKHR": 4460, + "OpConstantCompositeReplicateEXT": 4461, + "OpSpecConstantCompositeReplicateEXT": 4462, + "OpCompositeConstructReplicateEXT": 4463, "OpTypeRayQueryKHR": 4472, "OpRayQueryInitializeKHR": 4473, "OpRayQueryTerminateKHR": 4474, @@ -1551,6 +1807,14 @@ "OpRayQueryConfirmIntersectionKHR": 4476, "OpRayQueryProceedKHR": 4477, "OpRayQueryGetIntersectionTypeKHR": 4479, + "OpImageSampleWeightedQCOM": 4480, + "OpImageBoxFilterQCOM": 4481, + "OpImageBlockMatchSSDQCOM": 4482, + "OpImageBlockMatchSADQCOM": 4483, + "OpImageBlockMatchWindowSSDQCOM": 4500, + "OpImageBlockMatchWindowSADQCOM": 4501, + "OpImageBlockMatchGatherSSDQCOM": 4502, + "OpImageBlockMatchGatherSADQCOM": 4503, "OpGroupIAddNonUniformAMD": 5000, "OpGroupFAddNonUniformAMD": 5001, "OpGroupFMinNonUniformAMD": 5002, @@ -1562,9 +1826,51 @@ "OpFragmentMaskFetchAMD": 5011, "OpFragmentFetchAMD": 5012, "OpReadClockKHR": 5056, + "OpFinalizeNodePayloadsAMDX": 5075, + "OpFinishWritingNodePayloadAMDX": 5078, + "OpInitializeNodePayloadsAMDX": 5090, + "OpGroupNonUniformQuadAllKHR": 5110, + "OpGroupNonUniformQuadAnyKHR": 5111, + "OpHitObjectRecordHitMotionNV": 5249, + "OpHitObjectRecordHitWithIndexMotionNV": 5250, + "OpHitObjectRecordMissMotionNV": 5251, + "OpHitObjectGetWorldToObjectNV": 5252, + "OpHitObjectGetObjectToWorldNV": 5253, + "OpHitObjectGetObjectRayDirectionNV": 5254, + "OpHitObjectGetObjectRayOriginNV": 5255, + "OpHitObjectTraceRayMotionNV": 5256, + "OpHitObjectGetShaderRecordBufferHandleNV": 5257, + "OpHitObjectGetShaderBindingTableRecordIndexNV": 5258, + "OpHitObjectRecordEmptyNV": 5259, + "OpHitObjectTraceRayNV": 5260, + "OpHitObjectRecordHitNV": 5261, + "OpHitObjectRecordHitWithIndexNV": 5262, + "OpHitObjectRecordMissNV": 5263, + "OpHitObjectExecuteShaderNV": 5264, + "OpHitObjectGetCurrentTimeNV": 5265, + "OpHitObjectGetAttributesNV": 5266, + "OpHitObjectGetHitKindNV": 5267, + "OpHitObjectGetPrimitiveIndexNV": 5268, + "OpHitObjectGetGeometryIndexNV": 5269, + "OpHitObjectGetInstanceIdNV": 5270, + "OpHitObjectGetInstanceCustomIndexNV": 5271, + "OpHitObjectGetWorldRayDirectionNV": 5272, + "OpHitObjectGetWorldRayOriginNV": 5273, + "OpHitObjectGetRayTMaxNV": 5274, + "OpHitObjectGetRayTMinNV": 5275, + "OpHitObjectIsEmptyNV": 5276, + "OpHitObjectIsHitNV": 5277, + "OpHitObjectIsMissNV": 5278, + "OpReorderThreadWithHitObjectNV": 5279, + "OpReorderThreadWithHintNV": 5280, + "OpTypeHitObjectNV": 5281, "OpImageSampleFootprintNV": 5283, + "OpEmitMeshTasksEXT": 5294, + "OpSetMeshOutputsEXT": 5295, "OpGroupNonUniformPartitionNV": 5296, "OpWritePackedPrimitiveIndices4x8NV": 5299, + "OpFetchMicroTriangleVertexPositionNV": 5300, + "OpFetchMicroTriangleVertexBarycentricNV": 5301, "OpReportIntersectionKHR": 5334, "OpReportIntersectionNV": 5334, "OpIgnoreIntersectionNV": 5335, @@ -1572,6 +1878,7 @@ "OpTraceNV": 5337, "OpTraceMotionNV": 5338, "OpTraceRayMotionNV": 5339, + "OpRayQueryGetIntersectionTriangleVertexPositionsKHR": 5340, "OpTypeAccelerationStructureKHR": 5341, "OpTypeAccelerationStructureNV": 5341, "OpExecuteCallableNV": 5344, @@ -1592,6 +1899,7 @@ "OpConvertUToSampledImageNV": 5395, "OpConvertSampledImageToUNV": 5396, "OpSamplerImageAddressingModeNV": 5397, + "OpRawAccessChainNV": 5398, "OpSubgroupShuffleINTEL": 5571, "OpSubgroupShuffleDownINTEL": 5572, "OpSubgroupShuffleUpINTEL": 5573, @@ -1792,6 +2100,9 @@ "OpArbitraryFloatPowRINTEL": 5881, "OpArbitraryFloatPowNINTEL": 5882, "OpLoopControlINTEL": 5887, + "OpAliasDomainDeclINTEL": 5911, + "OpAliasScopeDeclINTEL": 5912, + "OpAliasScopeListDeclINTEL": 5913, "OpFixedSqrtINTEL": 5923, "OpFixedRecipINTEL": 5924, "OpFixedRsqrtINTEL": 5925, @@ -1829,7 +2140,22 @@ "OpTypeBufferSurfaceINTEL": 6086, "OpTypeStructContinuedINTEL": 6090, "OpConstantCompositeContinuedINTEL": 6091, - "OpSpecConstantCompositeContinuedINTEL": 6092 + "OpSpecConstantCompositeContinuedINTEL": 6092, + "OpCompositeConstructContinuedINTEL": 6096, + "OpConvertFToBF16INTEL": 6116, + "OpConvertBF16ToFINTEL": 6117, + "OpControlBarrierArriveINTEL": 6142, + "OpControlBarrierWaitINTEL": 6143, + "OpGroupIMulKHR": 6401, + "OpGroupFMulKHR": 6402, + "OpGroupBitwiseAndKHR": 6403, + "OpGroupBitwiseOrKHR": 6404, + "OpGroupBitwiseXorKHR": 6405, + "OpGroupLogicalAndKHR": 6406, + "OpGroupLogicalOrKHR": 6407, + "OpGroupLogicalXorKHR": 6408, + "OpMaskedGatherINTEL": 6428, + "OpMaskedScatterINTEL": 6429 } } ] diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua index 2f5e803b8..8f3ded005 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2020 The Khronos Group Inc. +-- Copyright (c) 2014-2024 The Khronos Group Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ -- the Binary Section of the SPIR-V specification. -- Enumeration tokens for SPIR-V, in various styles: --- C, C++, C++11, JSON, Lua, Python, C#, D +-- C, C++, C++11, JSON, Lua, Python, C#, D, Beef -- -- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ -- - C# will use enum classes in the Specification class located in the "Spv" namespace, -- e.g.: Spv.Specification.SourceLanguage.GLSL -- - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +-- - Beef will use enum classes in the Specification class located in the "Spv" namespace, +-- e.g.: Spv.Specification.SourceLanguage.GLSL -- -- Some tokens act like mask values, which can be OR'd together, -- while others are mutually exclusive. The mask-like ones have @@ -57,6 +59,12 @@ spv = { OpenCL_CPP = 4, HLSL = 5, CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, }, ExecutionModel = { @@ -81,6 +89,8 @@ spv = { MissNV = 5317, CallableKHR = 5318, CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, }, AddressingModel = { @@ -138,6 +148,9 @@ spv = { SubgroupsPerWorkgroupId = 37, LocalSizeId = 38, LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, SubgroupUniformControlFlowKHR = 4421, PostDepthCoverage = 4446, DenormPreserve = 4459, @@ -145,11 +158,28 @@ spv = { SignedZeroInfNanPreserve = 4461, RoundingModeRTE = 4462, RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, OutputPrimitivesNV = 5270, DerivativeGroupQuadsNV = 5289, DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, OutputTrianglesNV = 5298, PixelInterlockOrderedEXT = 5366, PixelInterlockUnorderedEXT = 5367, @@ -167,6 +197,14 @@ spv = { NoGlobalOffsetINTEL = 5895, NumSIMDWorkitemsINTEL = 5896, SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, }, StorageClass = { @@ -183,6 +221,9 @@ spv = { AtomicCounter = 10, Image = 11, StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -197,6 +238,8 @@ spv = { ShaderRecordBufferNV = 5343, PhysicalStorageBuffer = 5349, PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, CodeSectionINTEL = 5605, DeviceOnlyINTEL = 5936, HostOnlyINTEL = 5937, @@ -210,6 +253,7 @@ spv = { Rect = 4, Buffer = 5, SubpassData = 6, + TileImageDataEXT = 4173, }, SamplerAddressingMode = { @@ -311,6 +355,8 @@ spv = { Float = 14, UnormInt24 = 15, UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, }, ImageOperandsShift = { @@ -366,8 +412,11 @@ spv = { NSZ = 2, AllowRecip = 3, Fast = 4, + AllowContract = 16, AllowContractFastINTEL = 16, + AllowReassoc = 17, AllowReassocINTEL = 17, + AllowTransform = 18, }, FPFastMathModeMask = { @@ -377,8 +426,11 @@ spv = { NSZ = 0x00000004, AllowRecip = 0x00000008, Fast = 0x00000010, + AllowContract = 0x00010000, AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, }, FPRoundingMode = { @@ -409,6 +461,7 @@ spv = { NoCapture = 5, NoWrite = 6, NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, }, Decoration = { @@ -461,11 +514,19 @@ spv = { MaxByteOffsetId = 47, NoSignedWrap = 4469, NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, PerPrimitiveNV = 5271, PerViewNV = 5272, PerTaskNV = 5273, @@ -477,6 +538,7 @@ spv = { RestrictPointerEXT = 5355, AliasedPointer = 5356, AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, BindlessSamplerNV = 5398, BindlessImageNV = 5399, BoundSamplerNV = 5400, @@ -509,18 +571,45 @@ spv = { MergeINTEL = 5834, BankBitsINTEL = 5835, ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, BurstCoalesceINTEL = 5899, CacheSizeINTEL = 5900, DontStaticallyCoalesceINTEL = 5901, PrefetchINTEL = 5902, StallEnableINTEL = 5905, FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, BufferLocationINTEL = 5921, IOPipeStorageINTEL = 5944, FunctionFloatingPointModeINTEL = 6080, SingleElementVectorINTEL = 6085, VectorComputeCallableFunctionINTEL = 6087, MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, }, BuiltIn = { @@ -565,6 +654,11 @@ spv = { SubgroupLocalInvocationId = 41, VertexIndex = 42, InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, SubgroupEqMask = 4416, SubgroupEqMaskKHR = 4416, SubgroupGeMask = 4417, @@ -590,6 +684,8 @@ spv = { BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -612,6 +708,10 @@ spv = { FragmentSizeNV = 5292, FragInvocationCountEXT = 5293, InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, LaunchIdKHR = 5319, LaunchIdNV = 5319, LaunchSizeKHR = 5320, @@ -638,6 +738,9 @@ spv = { HitKindKHR = 5333, HitKindNV = 5333, CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, IncomingRayFlagsKHR = 5351, IncomingRayFlagsNV = 5351, RayGeometryIndexKHR = 5352, @@ -645,6 +748,9 @@ spv = { SMCountNV = 5375, WarpIDNV = 5376, SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, }, SelectionControlShift = { @@ -676,6 +782,8 @@ spv = { MaxInterleavingINTEL = 21, SpeculatedIterationsINTEL = 22, NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, }, LoopControlMask = { @@ -697,6 +805,8 @@ spv = { MaxInterleavingINTEL = 0x00200000, SpeculatedIterationsINTEL = 0x00400000, NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, }, FunctionControlShift = { @@ -767,6 +877,8 @@ spv = { MakePointerVisibleKHR = 4, NonPrivatePointer = 5, NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, }, MemoryAccessMask = { @@ -780,6 +892,8 @@ spv = { MakePointerVisibleKHR = 0x00000010, NonPrivatePointer = 0x00000020, NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, }, Scope = { @@ -889,6 +1003,11 @@ spv = { ShaderLayer = 69, ShaderViewportIndex = 70, UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, FragmentShadingRateKHR = 4422, SubgroupBallotKHR = 4423, DrawParameters = 4427, @@ -920,6 +1039,10 @@ spv = { RayQueryKHR = 4472, RayTraversalPrimitiveCullingKHR = 4478, RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, Float16ImageAMD = 5008, ImageGatherBiasLodAMD = 5009, FragmentMaskAMD = 5010, @@ -927,6 +1050,8 @@ spv = { ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, ShaderViewportIndexLayerEXT = 5254, @@ -937,6 +1062,7 @@ spv = { FragmentFullyCoveredEXT = 5265, MeshShadingNV = 5266, ImageFootprintNV = 5282, + MeshShadingEXT = 5283, FragmentBarycentricKHR = 5284, FragmentBarycentricNV = 5284, ComputeDerivativeGroupQuadsNV = 5288, @@ -967,6 +1093,7 @@ spv = { UniformTexelBufferArrayNonUniformIndexingEXT = 5311, StorageTexelBufferArrayNonUniformIndexing = 5312, StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, RayTracingNV = 5340, RayTracingMotionBlurNV = 5341, VulkanMemoryModel = 5345, @@ -984,7 +1111,14 @@ spv = { FragmentShaderPixelInterlockEXT = 5378, DemoteToHelperInvocation = 5379, DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1017,9 +1151,13 @@ spv = { FPGAMemoryAccessesINTEL = 5898, FPGAClusterAttributesINTEL = 5904, LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, FPGABufferLocationINTEL = 5920, ArbitraryPrecisionFixedPointINTEL = 5922, USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, IOPipesINTEL = 5943, BlockingPipesINTEL = 5945, FPGARegINTEL = 5948, @@ -1031,13 +1169,31 @@ spv = { DotProductInput4x8BitPackedKHR = 6018, DotProduct = 6019, DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, AtomicFloat32AddEXT = 6033, AtomicFloat64AddEXT = 6034, - LongConstantCompositeINTEL = 6089, + LongCompositesINTEL = 6089, OptNoneINTEL = 6094, AtomicFloat16AddEXT = 6095, DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, }, RayFlagsShift = { @@ -1051,6 +1207,7 @@ spv = { CullNoOpaqueKHR = 7, SkipTrianglesKHR = 8, SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, }, RayFlagsMask = { @@ -1065,6 +1222,7 @@ spv = { CullNoOpaqueKHR = 0x00000080, SkipTrianglesKHR = 0x00000100, SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, }, RayQueryIntersection = { @@ -1131,6 +1289,78 @@ spv = { PackedVectorFormat4x8BitKHR = 0, }, + CooperativeMatrixOperandsShift = { + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, + }, + + CooperativeMatrixOperandsMask = { + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, + }, + + CooperativeMatrixLayout = { + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, + }, + + CooperativeMatrixUse = { + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, + }, + + InitializationModeQualifier = { + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, + }, + + HostAccessQualifier = { + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, + }, + + LoadCacheControl = { + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, + }, + + StoreCacheControl = { + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, + }, + + NamedMaximumNumberOfRegisters = { + AutoINTEL = 0, + }, + + RawAccessChainOperandsShift = { + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, + }, + + RawAccessChainOperandsMask = { + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, + }, + Op = { OpNop = 0, OpUndef = 1, @@ -1476,13 +1706,18 @@ spv = { OpPtrEqual = 401, OpPtrNotEqual = 402, OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, OpTerminateInvocation = 4416, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1500,6 +1735,14 @@ spv = { OpUDotAccSatKHR = 4454, OpSUDotAccSat = 4455, OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1507,6 +1750,14 @@ spv = { OpRayQueryConfirmIntersectionKHR = 4476, OpRayQueryProceedKHR = 4477, OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, OpGroupIAddNonUniformAMD = 5000, OpGroupFAddNonUniformAMD = 5001, OpGroupFMinNonUniformAMD = 5002, @@ -1518,9 +1769,51 @@ spv = { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, OpReportIntersectionKHR = 5334, OpReportIntersectionNV = 5334, OpIgnoreIntersectionNV = 5335, @@ -1528,6 +1821,7 @@ spv = { OpTraceNV = 5337, OpTraceMotionNV = 5338, OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpTypeAccelerationStructureNV = 5341, OpExecuteCallableNV = 5344, @@ -1548,6 +1842,7 @@ spv = { OpConvertUToSampledImageNV = 5395, OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -1748,6 +2043,9 @@ spv = { OpArbitraryFloatPowRINTEL = 5881, OpArbitraryFloatPowNINTEL = 5882, OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, OpFixedSqrtINTEL = 5923, OpFixedRecipINTEL = 5924, OpFixedRsqrtINTEL = 5925, @@ -1786,6 +2084,21 @@ spv = { OpTypeStructContinuedINTEL = 6090, OpConstantCompositeContinuedINTEL = 6091, OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, }, } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py index 7aee89f63..23c0fccac 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2020 The Khronos Group Inc. +# Copyright (c) 2014-2024 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and/or associated documentation files (the "Materials"), @@ -26,7 +26,7 @@ # the Binary Section of the SPIR-V specification. # Enumeration tokens for SPIR-V, in various styles: -# C, C++, C++11, JSON, Lua, Python, C#, D +# C, C++, C++11, JSON, Lua, Python, C#, D, Beef # # - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL # - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL @@ -36,6 +36,8 @@ # - C# will use enum classes in the Specification class located in the "Spv" namespace, # e.g.: Spv.Specification.SourceLanguage.GLSL # - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +# - Beef will use enum classes in the Specification class located in the "Spv" namespace, +# e.g.: Spv.Specification.SourceLanguage.GLSL # # Some tokens act like mask values, which can be OR'd together, # while others are mutually exclusive. The mask-like ones have @@ -57,6 +59,12 @@ 'OpenCL_CPP' : 4, 'HLSL' : 5, 'CPP_for_OpenCL' : 6, + 'SYCL' : 7, + 'HERO_C' : 8, + 'NZSL' : 9, + 'WGSL' : 10, + 'Slang' : 11, + 'Zig' : 12, }, 'ExecutionModel' : { @@ -81,6 +89,8 @@ 'MissNV' : 5317, 'CallableKHR' : 5318, 'CallableNV' : 5318, + 'TaskEXT' : 5364, + 'MeshEXT' : 5365, }, 'AddressingModel' : { @@ -138,6 +148,9 @@ 'SubgroupsPerWorkgroupId' : 37, 'LocalSizeId' : 38, 'LocalSizeHintId' : 39, + 'NonCoherentColorAttachmentReadEXT' : 4169, + 'NonCoherentDepthAttachmentReadEXT' : 4170, + 'NonCoherentStencilAttachmentReadEXT' : 4171, 'SubgroupUniformControlFlowKHR' : 4421, 'PostDepthCoverage' : 4446, 'DenormPreserve' : 4459, @@ -145,11 +158,28 @@ 'SignedZeroInfNanPreserve' : 4461, 'RoundingModeRTE' : 4462, 'RoundingModeRTZ' : 4463, + 'EarlyAndLateFragmentTestsAMD' : 5017, 'StencilRefReplacingEXT' : 5027, + 'CoalescingAMDX' : 5069, + 'MaxNodeRecursionAMDX' : 5071, + 'StaticNumWorkgroupsAMDX' : 5072, + 'ShaderIndexAMDX' : 5073, + 'MaxNumWorkgroupsAMDX' : 5077, + 'StencilRefUnchangedFrontAMD' : 5079, + 'StencilRefGreaterFrontAMD' : 5080, + 'StencilRefLessFrontAMD' : 5081, + 'StencilRefUnchangedBackAMD' : 5082, + 'StencilRefGreaterBackAMD' : 5083, + 'StencilRefLessBackAMD' : 5084, + 'QuadDerivativesKHR' : 5088, + 'RequireFullQuadsKHR' : 5089, + 'OutputLinesEXT' : 5269, 'OutputLinesNV' : 5269, + 'OutputPrimitivesEXT' : 5270, 'OutputPrimitivesNV' : 5270, 'DerivativeGroupQuadsNV' : 5289, 'DerivativeGroupLinearNV' : 5290, + 'OutputTrianglesEXT' : 5298, 'OutputTrianglesNV' : 5298, 'PixelInterlockOrderedEXT' : 5366, 'PixelInterlockUnorderedEXT' : 5367, @@ -167,6 +197,14 @@ 'NoGlobalOffsetINTEL' : 5895, 'NumSIMDWorkitemsINTEL' : 5896, 'SchedulerTargetFmaxMhzINTEL' : 5903, + 'MaximallyReconvergesKHR' : 6023, + 'FPFastMathDefault' : 6028, + 'StreamingInterfaceINTEL' : 6154, + 'RegisterMapInterfaceINTEL' : 6160, + 'NamedBarrierCountINTEL' : 6417, + 'MaximumRegistersINTEL' : 6461, + 'MaximumRegistersIdINTEL' : 6462, + 'NamedMaximumRegistersINTEL' : 6463, }, 'StorageClass' : { @@ -183,6 +221,9 @@ 'AtomicCounter' : 10, 'Image' : 11, 'StorageBuffer' : 12, + 'TileImageEXT' : 4172, + 'NodePayloadAMDX' : 5068, + 'NodeOutputPayloadAMDX' : 5076, 'CallableDataKHR' : 5328, 'CallableDataNV' : 5328, 'IncomingCallableDataKHR' : 5329, @@ -197,6 +238,8 @@ 'ShaderRecordBufferNV' : 5343, 'PhysicalStorageBuffer' : 5349, 'PhysicalStorageBufferEXT' : 5349, + 'HitObjectAttributeNV' : 5385, + 'TaskPayloadWorkgroupEXT' : 5402, 'CodeSectionINTEL' : 5605, 'DeviceOnlyINTEL' : 5936, 'HostOnlyINTEL' : 5937, @@ -210,6 +253,7 @@ 'Rect' : 4, 'Buffer' : 5, 'SubpassData' : 6, + 'TileImageDataEXT' : 4173, }, 'SamplerAddressingMode' : { @@ -311,6 +355,8 @@ 'Float' : 14, 'UnormInt24' : 15, 'UnormInt101010_2' : 16, + 'UnsignedIntRaw10EXT' : 19, + 'UnsignedIntRaw12EXT' : 20, }, 'ImageOperandsShift' : { @@ -366,8 +412,11 @@ 'NSZ' : 2, 'AllowRecip' : 3, 'Fast' : 4, + 'AllowContract' : 16, 'AllowContractFastINTEL' : 16, + 'AllowReassoc' : 17, 'AllowReassocINTEL' : 17, + 'AllowTransform' : 18, }, 'FPFastMathModeMask' : { @@ -377,8 +426,11 @@ 'NSZ' : 0x00000004, 'AllowRecip' : 0x00000008, 'Fast' : 0x00000010, + 'AllowContract' : 0x00010000, 'AllowContractFastINTEL' : 0x00010000, + 'AllowReassoc' : 0x00020000, 'AllowReassocINTEL' : 0x00020000, + 'AllowTransform' : 0x00040000, }, 'FPRoundingMode' : { @@ -409,6 +461,7 @@ 'NoCapture' : 5, 'NoWrite' : 6, 'NoReadWrite' : 7, + 'RuntimeAlignedINTEL' : 5940, }, 'Decoration' : { @@ -461,11 +514,19 @@ 'MaxByteOffsetId' : 47, 'NoSignedWrap' : 4469, 'NoUnsignedWrap' : 4470, + 'WeightTextureQCOM' : 4487, + 'BlockMatchTextureQCOM' : 4488, + 'BlockMatchSamplerQCOM' : 4499, 'ExplicitInterpAMD' : 4999, + 'NodeSharesPayloadLimitsWithAMDX' : 5019, + 'NodeMaxPayloadsAMDX' : 5020, + 'TrackFinishWritingAMDX' : 5078, + 'PayloadNodeNameAMDX' : 5091, 'OverrideCoverageNV' : 5248, 'PassthroughNV' : 5250, 'ViewportRelativeNV' : 5252, 'SecondaryViewportRelativeNV' : 5256, + 'PerPrimitiveEXT' : 5271, 'PerPrimitiveNV' : 5271, 'PerViewNV' : 5272, 'PerTaskNV' : 5273, @@ -477,6 +538,7 @@ 'RestrictPointerEXT' : 5355, 'AliasedPointer' : 5356, 'AliasedPointerEXT' : 5356, + 'HitObjectShaderRecordBufferNV' : 5386, 'BindlessSamplerNV' : 5398, 'BindlessImageNV' : 5399, 'BoundSamplerNV' : 5400, @@ -509,18 +571,45 @@ 'MergeINTEL' : 5834, 'BankBitsINTEL' : 5835, 'ForcePow2DepthINTEL' : 5836, + 'StridesizeINTEL' : 5883, + 'WordsizeINTEL' : 5884, + 'TrueDualPortINTEL' : 5885, 'BurstCoalesceINTEL' : 5899, 'CacheSizeINTEL' : 5900, 'DontStaticallyCoalesceINTEL' : 5901, 'PrefetchINTEL' : 5902, 'StallEnableINTEL' : 5905, 'FuseLoopsInFunctionINTEL' : 5907, + 'MathOpDSPModeINTEL' : 5909, + 'AliasScopeINTEL' : 5914, + 'NoAliasINTEL' : 5915, + 'InitiationIntervalINTEL' : 5917, + 'MaxConcurrencyINTEL' : 5918, + 'PipelineEnableINTEL' : 5919, 'BufferLocationINTEL' : 5921, 'IOPipeStorageINTEL' : 5944, 'FunctionFloatingPointModeINTEL' : 6080, 'SingleElementVectorINTEL' : 6085, 'VectorComputeCallableFunctionINTEL' : 6087, 'MediaBlockIOINTEL' : 6140, + 'StallFreeINTEL' : 6151, + 'FPMaxErrorDecorationINTEL' : 6170, + 'LatencyControlLabelINTEL' : 6172, + 'LatencyControlConstraintINTEL' : 6173, + 'ConduitKernelArgumentINTEL' : 6175, + 'RegisterMapKernelArgumentINTEL' : 6176, + 'MMHostInterfaceAddressWidthINTEL' : 6177, + 'MMHostInterfaceDataWidthINTEL' : 6178, + 'MMHostInterfaceLatencyINTEL' : 6179, + 'MMHostInterfaceReadWriteModeINTEL' : 6180, + 'MMHostInterfaceMaxBurstINTEL' : 6181, + 'MMHostInterfaceWaitRequestINTEL' : 6182, + 'StableKernelArgumentINTEL' : 6183, + 'HostAccessINTEL' : 6188, + 'InitModeINTEL' : 6190, + 'ImplementInRegisterMapINTEL' : 6191, + 'CacheControlLoadINTEL' : 6442, + 'CacheControlStoreINTEL' : 6443, }, 'BuiltIn' : { @@ -565,6 +654,11 @@ 'SubgroupLocalInvocationId' : 41, 'VertexIndex' : 42, 'InstanceIndex' : 43, + 'CoreIDARM' : 4160, + 'CoreCountARM' : 4161, + 'CoreMaxIDARM' : 4162, + 'WarpIDARM' : 4163, + 'WarpMaxIDARM' : 4164, 'SubgroupEqMask' : 4416, 'SubgroupEqMaskKHR' : 4416, 'SubgroupGeMask' : 4417, @@ -590,6 +684,8 @@ 'BaryCoordSmoothSampleAMD' : 4997, 'BaryCoordPullModelAMD' : 4998, 'FragStencilRefEXT' : 5014, + 'CoalescedInputCountAMDX' : 5021, + 'ShaderIndexAMDX' : 5073, 'ViewportMaskNV' : 5253, 'SecondaryPositionNV' : 5257, 'SecondaryViewportMaskNV' : 5258, @@ -612,6 +708,10 @@ 'FragmentSizeNV' : 5292, 'FragInvocationCountEXT' : 5293, 'InvocationsPerPixelNV' : 5293, + 'PrimitivePointIndicesEXT' : 5294, + 'PrimitiveLineIndicesEXT' : 5295, + 'PrimitiveTriangleIndicesEXT' : 5296, + 'CullPrimitiveEXT' : 5299, 'LaunchIdKHR' : 5319, 'LaunchIdNV' : 5319, 'LaunchSizeKHR' : 5320, @@ -638,6 +738,9 @@ 'HitKindKHR' : 5333, 'HitKindNV' : 5333, 'CurrentRayTimeNV' : 5334, + 'HitTriangleVertexPositionsKHR' : 5335, + 'HitMicroTriangleVertexPositionsNV' : 5337, + 'HitMicroTriangleVertexBarycentricsNV' : 5344, 'IncomingRayFlagsKHR' : 5351, 'IncomingRayFlagsNV' : 5351, 'RayGeometryIndexKHR' : 5352, @@ -645,6 +748,9 @@ 'SMCountNV' : 5375, 'WarpIDNV' : 5376, 'SMIDNV' : 5377, + 'HitKindFrontFacingMicroTriangleNV' : 5405, + 'HitKindBackFacingMicroTriangleNV' : 5406, + 'CullMaskKHR' : 6021, }, 'SelectionControlShift' : { @@ -676,6 +782,8 @@ 'MaxInterleavingINTEL' : 21, 'SpeculatedIterationsINTEL' : 22, 'NoFusionINTEL' : 23, + 'LoopCountINTEL' : 24, + 'MaxReinvocationDelayINTEL' : 25, }, 'LoopControlMask' : { @@ -697,6 +805,8 @@ 'MaxInterleavingINTEL' : 0x00200000, 'SpeculatedIterationsINTEL' : 0x00400000, 'NoFusionINTEL' : 0x00800000, + 'LoopCountINTEL' : 0x01000000, + 'MaxReinvocationDelayINTEL' : 0x02000000, }, 'FunctionControlShift' : { @@ -767,6 +877,8 @@ 'MakePointerVisibleKHR' : 4, 'NonPrivatePointer' : 5, 'NonPrivatePointerKHR' : 5, + 'AliasScopeINTELMask' : 16, + 'NoAliasINTELMask' : 17, }, 'MemoryAccessMask' : { @@ -780,6 +892,8 @@ 'MakePointerVisibleKHR' : 0x00000010, 'NonPrivatePointer' : 0x00000020, 'NonPrivatePointerKHR' : 0x00000020, + 'AliasScopeINTELMask' : 0x00010000, + 'NoAliasINTELMask' : 0x00020000, }, 'Scope' : { @@ -889,6 +1003,11 @@ 'ShaderLayer' : 69, 'ShaderViewportIndex' : 70, 'UniformDecoration' : 71, + 'CoreBuiltinsARM' : 4165, + 'TileImageColorReadAccessEXT' : 4166, + 'TileImageDepthReadAccessEXT' : 4167, + 'TileImageStencilReadAccessEXT' : 4168, + 'CooperativeMatrixLayoutsARM' : 4201, 'FragmentShadingRateKHR' : 4422, 'SubgroupBallotKHR' : 4423, 'DrawParameters' : 4427, @@ -920,6 +1039,10 @@ 'RayQueryKHR' : 4472, 'RayTraversalPrimitiveCullingKHR' : 4478, 'RayTracingKHR' : 4479, + 'TextureSampleWeightedQCOM' : 4484, + 'TextureBoxFilterQCOM' : 4485, + 'TextureBlockMatchQCOM' : 4486, + 'TextureBlockMatch2QCOM' : 4498, 'Float16ImageAMD' : 5008, 'ImageGatherBiasLodAMD' : 5009, 'FragmentMaskAMD' : 5010, @@ -927,6 +1050,8 @@ 'ImageReadWriteLodAMD' : 5015, 'Int64ImageEXT' : 5016, 'ShaderClockKHR' : 5055, + 'ShaderEnqueueAMDX' : 5067, + 'QuadControlKHR' : 5087, 'SampleMaskOverrideCoverageNV' : 5249, 'GeometryShaderPassthroughNV' : 5251, 'ShaderViewportIndexLayerEXT' : 5254, @@ -937,6 +1062,7 @@ 'FragmentFullyCoveredEXT' : 5265, 'MeshShadingNV' : 5266, 'ImageFootprintNV' : 5282, + 'MeshShadingEXT' : 5283, 'FragmentBarycentricKHR' : 5284, 'FragmentBarycentricNV' : 5284, 'ComputeDerivativeGroupQuadsNV' : 5288, @@ -967,6 +1093,7 @@ 'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311, 'StorageTexelBufferArrayNonUniformIndexing' : 5312, 'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312, + 'RayTracingPositionFetchKHR' : 5336, 'RayTracingNV' : 5340, 'RayTracingMotionBlurNV' : 5341, 'VulkanMemoryModel' : 5345, @@ -984,7 +1111,14 @@ 'FragmentShaderPixelInterlockEXT' : 5378, 'DemoteToHelperInvocation' : 5379, 'DemoteToHelperInvocationEXT' : 5379, + 'DisplacementMicromapNV' : 5380, + 'RayTracingOpacityMicromapEXT' : 5381, + 'ShaderInvocationReorderNV' : 5383, 'BindlessTextureNV' : 5390, + 'RayQueryPositionFetchKHR' : 5391, + 'AtomicFloat16VectorNV' : 5404, + 'RayTracingDisplacementMicromapNV' : 5409, + 'RawAccessChainsNV' : 5414, 'SubgroupShuffleINTEL' : 5568, 'SubgroupBufferBlockIOINTEL' : 5569, 'SubgroupImageBlockIOINTEL' : 5570, @@ -1017,9 +1151,13 @@ 'FPGAMemoryAccessesINTEL' : 5898, 'FPGAClusterAttributesINTEL' : 5904, 'LoopFuseINTEL' : 5906, + 'FPGADSPControlINTEL' : 5908, + 'MemoryAccessAliasingINTEL' : 5910, + 'FPGAInvocationPipeliningAttributesINTEL' : 5916, 'FPGABufferLocationINTEL' : 5920, 'ArbitraryPrecisionFixedPointINTEL' : 5922, 'USMStorageClassesINTEL' : 5935, + 'RuntimeAlignedAttributeINTEL' : 5939, 'IOPipesINTEL' : 5943, 'BlockingPipesINTEL' : 5945, 'FPGARegINTEL' : 5948, @@ -1031,13 +1169,31 @@ 'DotProductInput4x8BitPackedKHR' : 6018, 'DotProduct' : 6019, 'DotProductKHR' : 6019, + 'RayCullMaskKHR' : 6020, + 'CooperativeMatrixKHR' : 6022, + 'ReplicatedCompositesEXT' : 6024, 'BitInstructions' : 6025, + 'GroupNonUniformRotateKHR' : 6026, + 'FloatControls2' : 6029, 'AtomicFloat32AddEXT' : 6033, 'AtomicFloat64AddEXT' : 6034, - 'LongConstantCompositeINTEL' : 6089, + 'LongCompositesINTEL' : 6089, 'OptNoneINTEL' : 6094, 'AtomicFloat16AddEXT' : 6095, 'DebugInfoModuleINTEL' : 6114, + 'BFloat16ConversionINTEL' : 6115, + 'SplitBarrierINTEL' : 6141, + 'FPGAClusterAttributesV2INTEL' : 6150, + 'FPGAKernelAttributesv2INTEL' : 6161, + 'FPMaxErrorINTEL' : 6169, + 'FPGALatencyControlINTEL' : 6171, + 'FPGAArgumentInterfacesINTEL' : 6174, + 'GlobalVariableHostAccessINTEL' : 6187, + 'GlobalVariableFPGADecorationsINTEL' : 6189, + 'GroupUniformArithmeticKHR' : 6400, + 'MaskedGatherScatterINTEL' : 6427, + 'CacheControlsINTEL' : 6441, + 'RegisterLimitsINTEL' : 6460, }, 'RayFlagsShift' : { @@ -1051,6 +1207,7 @@ 'CullNoOpaqueKHR' : 7, 'SkipTrianglesKHR' : 8, 'SkipAABBsKHR' : 9, + 'ForceOpacityMicromap2StateEXT' : 10, }, 'RayFlagsMask' : { @@ -1065,6 +1222,7 @@ 'CullNoOpaqueKHR' : 0x00000080, 'SkipTrianglesKHR' : 0x00000100, 'SkipAABBsKHR' : 0x00000200, + 'ForceOpacityMicromap2StateEXT' : 0x00000400, }, 'RayQueryIntersection' : { @@ -1131,6 +1289,78 @@ 'PackedVectorFormat4x8BitKHR' : 0, }, + 'CooperativeMatrixOperandsShift' : { + 'MatrixASignedComponentsKHR' : 0, + 'MatrixBSignedComponentsKHR' : 1, + 'MatrixCSignedComponentsKHR' : 2, + 'MatrixResultSignedComponentsKHR' : 3, + 'SaturatingAccumulationKHR' : 4, + }, + + 'CooperativeMatrixOperandsMask' : { + 'MaskNone' : 0, + 'MatrixASignedComponentsKHR' : 0x00000001, + 'MatrixBSignedComponentsKHR' : 0x00000002, + 'MatrixCSignedComponentsKHR' : 0x00000004, + 'MatrixResultSignedComponentsKHR' : 0x00000008, + 'SaturatingAccumulationKHR' : 0x00000010, + }, + + 'CooperativeMatrixLayout' : { + 'RowMajorKHR' : 0, + 'ColumnMajorKHR' : 1, + 'RowBlockedInterleavedARM' : 4202, + 'ColumnBlockedInterleavedARM' : 4203, + }, + + 'CooperativeMatrixUse' : { + 'MatrixAKHR' : 0, + 'MatrixBKHR' : 1, + 'MatrixAccumulatorKHR' : 2, + }, + + 'InitializationModeQualifier' : { + 'InitOnDeviceReprogramINTEL' : 0, + 'InitOnDeviceResetINTEL' : 1, + }, + + 'HostAccessQualifier' : { + 'NoneINTEL' : 0, + 'ReadINTEL' : 1, + 'WriteINTEL' : 2, + 'ReadWriteINTEL' : 3, + }, + + 'LoadCacheControl' : { + 'UncachedINTEL' : 0, + 'CachedINTEL' : 1, + 'StreamingINTEL' : 2, + 'InvalidateAfterReadINTEL' : 3, + 'ConstCachedINTEL' : 4, + }, + + 'StoreCacheControl' : { + 'UncachedINTEL' : 0, + 'WriteThroughINTEL' : 1, + 'WriteBackINTEL' : 2, + 'StreamingINTEL' : 3, + }, + + 'NamedMaximumNumberOfRegisters' : { + 'AutoINTEL' : 0, + }, + + 'RawAccessChainOperandsShift' : { + 'RobustnessPerComponentNV' : 0, + 'RobustnessPerElementNV' : 1, + }, + + 'RawAccessChainOperandsMask' : { + 'MaskNone' : 0, + 'RobustnessPerComponentNV' : 0x00000001, + 'RobustnessPerElementNV' : 0x00000002, + }, + 'Op' : { 'OpNop' : 0, 'OpUndef' : 1, @@ -1476,13 +1706,18 @@ 'OpPtrEqual' : 401, 'OpPtrNotEqual' : 402, 'OpPtrDiff' : 403, + 'OpColorAttachmentReadEXT' : 4160, + 'OpDepthAttachmentReadEXT' : 4161, + 'OpStencilAttachmentReadEXT' : 4162, 'OpTerminateInvocation' : 4416, 'OpSubgroupBallotKHR' : 4421, 'OpSubgroupFirstInvocationKHR' : 4422, 'OpSubgroupAllKHR' : 4428, 'OpSubgroupAnyKHR' : 4429, 'OpSubgroupAllEqualKHR' : 4430, + 'OpGroupNonUniformRotateKHR' : 4431, 'OpSubgroupReadInvocationKHR' : 4432, + 'OpExtInstWithForwardRefsKHR' : 4433, 'OpTraceRayKHR' : 4445, 'OpExecuteCallableKHR' : 4446, 'OpConvertUToAccelerationStructureKHR' : 4447, @@ -1500,6 +1735,14 @@ 'OpUDotAccSatKHR' : 4454, 'OpSUDotAccSat' : 4455, 'OpSUDotAccSatKHR' : 4455, + 'OpTypeCooperativeMatrixKHR' : 4456, + 'OpCooperativeMatrixLoadKHR' : 4457, + 'OpCooperativeMatrixStoreKHR' : 4458, + 'OpCooperativeMatrixMulAddKHR' : 4459, + 'OpCooperativeMatrixLengthKHR' : 4460, + 'OpConstantCompositeReplicateEXT' : 4461, + 'OpSpecConstantCompositeReplicateEXT' : 4462, + 'OpCompositeConstructReplicateEXT' : 4463, 'OpTypeRayQueryKHR' : 4472, 'OpRayQueryInitializeKHR' : 4473, 'OpRayQueryTerminateKHR' : 4474, @@ -1507,6 +1750,14 @@ 'OpRayQueryConfirmIntersectionKHR' : 4476, 'OpRayQueryProceedKHR' : 4477, 'OpRayQueryGetIntersectionTypeKHR' : 4479, + 'OpImageSampleWeightedQCOM' : 4480, + 'OpImageBoxFilterQCOM' : 4481, + 'OpImageBlockMatchSSDQCOM' : 4482, + 'OpImageBlockMatchSADQCOM' : 4483, + 'OpImageBlockMatchWindowSSDQCOM' : 4500, + 'OpImageBlockMatchWindowSADQCOM' : 4501, + 'OpImageBlockMatchGatherSSDQCOM' : 4502, + 'OpImageBlockMatchGatherSADQCOM' : 4503, 'OpGroupIAddNonUniformAMD' : 5000, 'OpGroupFAddNonUniformAMD' : 5001, 'OpGroupFMinNonUniformAMD' : 5002, @@ -1518,9 +1769,51 @@ 'OpFragmentMaskFetchAMD' : 5011, 'OpFragmentFetchAMD' : 5012, 'OpReadClockKHR' : 5056, + 'OpFinalizeNodePayloadsAMDX' : 5075, + 'OpFinishWritingNodePayloadAMDX' : 5078, + 'OpInitializeNodePayloadsAMDX' : 5090, + 'OpGroupNonUniformQuadAllKHR' : 5110, + 'OpGroupNonUniformQuadAnyKHR' : 5111, + 'OpHitObjectRecordHitMotionNV' : 5249, + 'OpHitObjectRecordHitWithIndexMotionNV' : 5250, + 'OpHitObjectRecordMissMotionNV' : 5251, + 'OpHitObjectGetWorldToObjectNV' : 5252, + 'OpHitObjectGetObjectToWorldNV' : 5253, + 'OpHitObjectGetObjectRayDirectionNV' : 5254, + 'OpHitObjectGetObjectRayOriginNV' : 5255, + 'OpHitObjectTraceRayMotionNV' : 5256, + 'OpHitObjectGetShaderRecordBufferHandleNV' : 5257, + 'OpHitObjectGetShaderBindingTableRecordIndexNV' : 5258, + 'OpHitObjectRecordEmptyNV' : 5259, + 'OpHitObjectTraceRayNV' : 5260, + 'OpHitObjectRecordHitNV' : 5261, + 'OpHitObjectRecordHitWithIndexNV' : 5262, + 'OpHitObjectRecordMissNV' : 5263, + 'OpHitObjectExecuteShaderNV' : 5264, + 'OpHitObjectGetCurrentTimeNV' : 5265, + 'OpHitObjectGetAttributesNV' : 5266, + 'OpHitObjectGetHitKindNV' : 5267, + 'OpHitObjectGetPrimitiveIndexNV' : 5268, + 'OpHitObjectGetGeometryIndexNV' : 5269, + 'OpHitObjectGetInstanceIdNV' : 5270, + 'OpHitObjectGetInstanceCustomIndexNV' : 5271, + 'OpHitObjectGetWorldRayDirectionNV' : 5272, + 'OpHitObjectGetWorldRayOriginNV' : 5273, + 'OpHitObjectGetRayTMaxNV' : 5274, + 'OpHitObjectGetRayTMinNV' : 5275, + 'OpHitObjectIsEmptyNV' : 5276, + 'OpHitObjectIsHitNV' : 5277, + 'OpHitObjectIsMissNV' : 5278, + 'OpReorderThreadWithHitObjectNV' : 5279, + 'OpReorderThreadWithHintNV' : 5280, + 'OpTypeHitObjectNV' : 5281, 'OpImageSampleFootprintNV' : 5283, + 'OpEmitMeshTasksEXT' : 5294, + 'OpSetMeshOutputsEXT' : 5295, 'OpGroupNonUniformPartitionNV' : 5296, 'OpWritePackedPrimitiveIndices4x8NV' : 5299, + 'OpFetchMicroTriangleVertexPositionNV' : 5300, + 'OpFetchMicroTriangleVertexBarycentricNV' : 5301, 'OpReportIntersectionKHR' : 5334, 'OpReportIntersectionNV' : 5334, 'OpIgnoreIntersectionNV' : 5335, @@ -1528,6 +1821,7 @@ 'OpTraceNV' : 5337, 'OpTraceMotionNV' : 5338, 'OpTraceRayMotionNV' : 5339, + 'OpRayQueryGetIntersectionTriangleVertexPositionsKHR' : 5340, 'OpTypeAccelerationStructureKHR' : 5341, 'OpTypeAccelerationStructureNV' : 5341, 'OpExecuteCallableNV' : 5344, @@ -1548,6 +1842,7 @@ 'OpConvertUToSampledImageNV' : 5395, 'OpConvertSampledImageToUNV' : 5396, 'OpSamplerImageAddressingModeNV' : 5397, + 'OpRawAccessChainNV' : 5398, 'OpSubgroupShuffleINTEL' : 5571, 'OpSubgroupShuffleDownINTEL' : 5572, 'OpSubgroupShuffleUpINTEL' : 5573, @@ -1748,6 +2043,9 @@ 'OpArbitraryFloatPowRINTEL' : 5881, 'OpArbitraryFloatPowNINTEL' : 5882, 'OpLoopControlINTEL' : 5887, + 'OpAliasDomainDeclINTEL' : 5911, + 'OpAliasScopeDeclINTEL' : 5912, + 'OpAliasScopeListDeclINTEL' : 5913, 'OpFixedSqrtINTEL' : 5923, 'OpFixedRecipINTEL' : 5924, 'OpFixedRsqrtINTEL' : 5925, @@ -1786,6 +2084,21 @@ 'OpTypeStructContinuedINTEL' : 6090, 'OpConstantCompositeContinuedINTEL' : 6091, 'OpSpecConstantCompositeContinuedINTEL' : 6092, + 'OpCompositeConstructContinuedINTEL' : 6096, + 'OpConvertFToBF16INTEL' : 6116, + 'OpConvertBF16ToFINTEL' : 6117, + 'OpControlBarrierArriveINTEL' : 6142, + 'OpControlBarrierWaitINTEL' : 6143, + 'OpGroupIMulKHR' : 6401, + 'OpGroupFMulKHR' : 6402, + 'OpGroupBitwiseAndKHR' : 6403, + 'OpGroupBitwiseOrKHR' : 6404, + 'OpGroupBitwiseXorKHR' : 6405, + 'OpGroupLogicalAndKHR' : 6406, + 'OpGroupLogicalOrKHR' : 6407, + 'OpGroupLogicalXorKHR' : 6408, + 'OpMaskedGatherINTEL' : 6428, + 'OpMaskedScatterINTEL' : 6429, }, } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spv.d b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spv.d new file mode 100644 index 000000000..295678e83 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/external/spirv-headers/include/spirv/unified1/spv.d @@ -0,0 +1,2173 @@ +/+ + + Copyright (c) 2014-2024 The Khronos Group Inc. + + + + Permission is hereby granted, free of charge, to any person obtaining a copy + + of this software and/or associated documentation files (the "Materials"), + + to deal in the Materials without restriction, including without limitation + + the rights to use, copy, modify, merge, publish, distribute, sublicense, + + and/or sell copies of the Materials, and to permit persons to whom the + + Materials are furnished to do so, subject to the following conditions: + + + + The above copyright notice and this permission notice shall be included in + + all copies or substantial portions of the Materials. + + + + MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS + + STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND + + HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ + + + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + + FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS + + IN THE MATERIALS. + +/ + +/+ + + This header is automatically generated by the same tool that creates + + the Binary Section of the SPIR-V specification. + +/ + +/+ + + Enumeration tokens for SPIR-V, in various styles: + + C, C++, C++11, JSON, Lua, Python, C#, D, Beef + + + + - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL + + - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL + + - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL + + - Lua will use tables, e.g.: spv.SourceLanguage.GLSL + + - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] + + - C# will use enum classes in the Specification class located in the "Spv" namespace, + + e.g.: Spv.Specification.SourceLanguage.GLSL + + - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL + + - Beef will use enum classes in the Specification class located in the "Spv" namespace, + + e.g.: Spv.Specification.SourceLanguage.GLSL + + + + Some tokens act like mask values, which can be OR'd together, + + while others are mutually exclusive. The mask-like ones have + + "Mask" in their name, and a parallel enum that has the shift + + amount (1 << x) for each corresponding enumerant. + +/ + +module spv; + +enum uint MagicNumber = 0x07230203; +enum uint Version = 0x00010600; +enum uint Revision = 1; +enum uint OpCodeMask = 0xffff; +enum uint WordCountShift = 16; + +enum SourceLanguage : uint +{ + Unknown = 0, + ESSL = 1, + GLSL = 2, + OpenCL_C = 3, + OpenCL_CPP = 4, + HLSL = 5, + CPP_for_OpenCL = 6, + SYCL = 7, + HERO_C = 8, + NZSL = 9, + WGSL = 10, + Slang = 11, + Zig = 12, +} + +enum ExecutionModel : uint +{ + Vertex = 0, + TessellationControl = 1, + TessellationEvaluation = 2, + Geometry = 3, + Fragment = 4, + GLCompute = 5, + Kernel = 6, + TaskNV = 5267, + MeshNV = 5268, + RayGenerationKHR = 5313, + RayGenerationNV = 5313, + IntersectionKHR = 5314, + IntersectionNV = 5314, + AnyHitKHR = 5315, + AnyHitNV = 5315, + ClosestHitKHR = 5316, + ClosestHitNV = 5316, + MissKHR = 5317, + MissNV = 5317, + CallableKHR = 5318, + CallableNV = 5318, + TaskEXT = 5364, + MeshEXT = 5365, +} + +enum AddressingModel : uint +{ + Logical = 0, + Physical32 = 1, + Physical64 = 2, + PhysicalStorageBuffer64 = 5348, + PhysicalStorageBuffer64EXT = 5348, +} + +enum MemoryModel : uint +{ + Simple = 0, + GLSL450 = 1, + OpenCL = 2, + Vulkan = 3, + VulkanKHR = 3, +} + +enum ExecutionMode : uint +{ + Invocations = 0, + SpacingEqual = 1, + SpacingFractionalEven = 2, + SpacingFractionalOdd = 3, + VertexOrderCw = 4, + VertexOrderCcw = 5, + PixelCenterInteger = 6, + OriginUpperLeft = 7, + OriginLowerLeft = 8, + EarlyFragmentTests = 9, + PointMode = 10, + Xfb = 11, + DepthReplacing = 12, + DepthGreater = 14, + DepthLess = 15, + DepthUnchanged = 16, + LocalSize = 17, + LocalSizeHint = 18, + InputPoints = 19, + InputLines = 20, + InputLinesAdjacency = 21, + Triangles = 22, + InputTrianglesAdjacency = 23, + Quads = 24, + Isolines = 25, + OutputVertices = 26, + OutputPoints = 27, + OutputLineStrip = 28, + OutputTriangleStrip = 29, + VecTypeHint = 30, + ContractionOff = 31, + Initializer = 33, + Finalizer = 34, + SubgroupSize = 35, + SubgroupsPerWorkgroup = 36, + SubgroupsPerWorkgroupId = 37, + LocalSizeId = 38, + LocalSizeHintId = 39, + NonCoherentColorAttachmentReadEXT = 4169, + NonCoherentDepthAttachmentReadEXT = 4170, + NonCoherentStencilAttachmentReadEXT = 4171, + SubgroupUniformControlFlowKHR = 4421, + PostDepthCoverage = 4446, + DenormPreserve = 4459, + DenormFlushToZero = 4460, + SignedZeroInfNanPreserve = 4461, + RoundingModeRTE = 4462, + RoundingModeRTZ = 4463, + EarlyAndLateFragmentTestsAMD = 5017, + StencilRefReplacingEXT = 5027, + CoalescingAMDX = 5069, + MaxNodeRecursionAMDX = 5071, + StaticNumWorkgroupsAMDX = 5072, + ShaderIndexAMDX = 5073, + MaxNumWorkgroupsAMDX = 5077, + StencilRefUnchangedFrontAMD = 5079, + StencilRefGreaterFrontAMD = 5080, + StencilRefLessFrontAMD = 5081, + StencilRefUnchangedBackAMD = 5082, + StencilRefGreaterBackAMD = 5083, + StencilRefLessBackAMD = 5084, + QuadDerivativesKHR = 5088, + RequireFullQuadsKHR = 5089, + OutputLinesEXT = 5269, + OutputLinesNV = 5269, + OutputPrimitivesEXT = 5270, + OutputPrimitivesNV = 5270, + DerivativeGroupQuadsNV = 5289, + DerivativeGroupLinearNV = 5290, + OutputTrianglesEXT = 5298, + OutputTrianglesNV = 5298, + PixelInterlockOrderedEXT = 5366, + PixelInterlockUnorderedEXT = 5367, + SampleInterlockOrderedEXT = 5368, + SampleInterlockUnorderedEXT = 5369, + ShadingRateInterlockOrderedEXT = 5370, + ShadingRateInterlockUnorderedEXT = 5371, + SharedLocalMemorySizeINTEL = 5618, + RoundingModeRTPINTEL = 5620, + RoundingModeRTNINTEL = 5621, + FloatingPointModeALTINTEL = 5622, + FloatingPointModeIEEEINTEL = 5623, + MaxWorkgroupSizeINTEL = 5893, + MaxWorkDimINTEL = 5894, + NoGlobalOffsetINTEL = 5895, + NumSIMDWorkitemsINTEL = 5896, + SchedulerTargetFmaxMhzINTEL = 5903, + MaximallyReconvergesKHR = 6023, + FPFastMathDefault = 6028, + StreamingInterfaceINTEL = 6154, + RegisterMapInterfaceINTEL = 6160, + NamedBarrierCountINTEL = 6417, + MaximumRegistersINTEL = 6461, + MaximumRegistersIdINTEL = 6462, + NamedMaximumRegistersINTEL = 6463, +} + +enum StorageClass : uint +{ + UniformConstant = 0, + Input = 1, + Uniform = 2, + Output = 3, + Workgroup = 4, + CrossWorkgroup = 5, + Private = 6, + Function = 7, + Generic = 8, + PushConstant = 9, + AtomicCounter = 10, + Image = 11, + StorageBuffer = 12, + TileImageEXT = 4172, + NodePayloadAMDX = 5068, + NodeOutputPayloadAMDX = 5076, + CallableDataKHR = 5328, + CallableDataNV = 5328, + IncomingCallableDataKHR = 5329, + IncomingCallableDataNV = 5329, + RayPayloadKHR = 5338, + RayPayloadNV = 5338, + HitAttributeKHR = 5339, + HitAttributeNV = 5339, + IncomingRayPayloadKHR = 5342, + IncomingRayPayloadNV = 5342, + ShaderRecordBufferKHR = 5343, + ShaderRecordBufferNV = 5343, + PhysicalStorageBuffer = 5349, + PhysicalStorageBufferEXT = 5349, + HitObjectAttributeNV = 5385, + TaskPayloadWorkgroupEXT = 5402, + CodeSectionINTEL = 5605, + DeviceOnlyINTEL = 5936, + HostOnlyINTEL = 5937, +} + +enum Dim : uint +{ + _1D = 0, + _2D = 1, + _3D = 2, + Cube = 3, + Rect = 4, + Buffer = 5, + SubpassData = 6, + TileImageDataEXT = 4173, +} + +enum SamplerAddressingMode : uint +{ + None = 0, + ClampToEdge = 1, + Clamp = 2, + Repeat = 3, + RepeatMirrored = 4, +} + +enum SamplerFilterMode : uint +{ + Nearest = 0, + Linear = 1, +} + +enum ImageFormat : uint +{ + Unknown = 0, + Rgba32f = 1, + Rgba16f = 2, + R32f = 3, + Rgba8 = 4, + Rgba8Snorm = 5, + Rg32f = 6, + Rg16f = 7, + R11fG11fB10f = 8, + R16f = 9, + Rgba16 = 10, + Rgb10A2 = 11, + Rg16 = 12, + Rg8 = 13, + R16 = 14, + R8 = 15, + Rgba16Snorm = 16, + Rg16Snorm = 17, + Rg8Snorm = 18, + R16Snorm = 19, + R8Snorm = 20, + Rgba32i = 21, + Rgba16i = 22, + Rgba8i = 23, + R32i = 24, + Rg32i = 25, + Rg16i = 26, + Rg8i = 27, + R16i = 28, + R8i = 29, + Rgba32ui = 30, + Rgba16ui = 31, + Rgba8ui = 32, + R32ui = 33, + Rgb10a2ui = 34, + Rg32ui = 35, + Rg16ui = 36, + Rg8ui = 37, + R16ui = 38, + R8ui = 39, + R64ui = 40, + R64i = 41, +} + +enum ImageChannelOrder : uint +{ + R = 0, + A = 1, + RG = 2, + RA = 3, + RGB = 4, + RGBA = 5, + BGRA = 6, + ARGB = 7, + Intensity = 8, + Luminance = 9, + Rx = 10, + RGx = 11, + RGBx = 12, + Depth = 13, + DepthStencil = 14, + sRGB = 15, + sRGBx = 16, + sRGBA = 17, + sBGRA = 18, + ABGR = 19, +} + +enum ImageChannelDataType : uint +{ + SnormInt8 = 0, + SnormInt16 = 1, + UnormInt8 = 2, + UnormInt16 = 3, + UnormShort565 = 4, + UnormShort555 = 5, + UnormInt101010 = 6, + SignedInt8 = 7, + SignedInt16 = 8, + SignedInt32 = 9, + UnsignedInt8 = 10, + UnsignedInt16 = 11, + UnsignedInt32 = 12, + HalfFloat = 13, + Float = 14, + UnormInt24 = 15, + UnormInt101010_2 = 16, + UnsignedIntRaw10EXT = 19, + UnsignedIntRaw12EXT = 20, +} + +enum ImageOperandsShift : uint +{ + Bias = 0, + Lod = 1, + Grad = 2, + ConstOffset = 3, + Offset = 4, + ConstOffsets = 5, + Sample = 6, + MinLod = 7, + MakeTexelAvailable = 8, + MakeTexelAvailableKHR = 8, + MakeTexelVisible = 9, + MakeTexelVisibleKHR = 9, + NonPrivateTexel = 10, + NonPrivateTexelKHR = 10, + VolatileTexel = 11, + VolatileTexelKHR = 11, + SignExtend = 12, + ZeroExtend = 13, + Nontemporal = 14, + Offsets = 16, +} + +enum ImageOperandsMask : uint +{ + MaskNone = 0, + Bias = 0x00000001, + Lod = 0x00000002, + Grad = 0x00000004, + ConstOffset = 0x00000008, + Offset = 0x00000010, + ConstOffsets = 0x00000020, + Sample = 0x00000040, + MinLod = 0x00000080, + MakeTexelAvailable = 0x00000100, + MakeTexelAvailableKHR = 0x00000100, + MakeTexelVisible = 0x00000200, + MakeTexelVisibleKHR = 0x00000200, + NonPrivateTexel = 0x00000400, + NonPrivateTexelKHR = 0x00000400, + VolatileTexel = 0x00000800, + VolatileTexelKHR = 0x00000800, + SignExtend = 0x00001000, + ZeroExtend = 0x00002000, + Nontemporal = 0x00004000, + Offsets = 0x00010000, +} + +enum FPFastMathModeShift : uint +{ + NotNaN = 0, + NotInf = 1, + NSZ = 2, + AllowRecip = 3, + Fast = 4, + AllowContract = 16, + AllowContractFastINTEL = 16, + AllowReassoc = 17, + AllowReassocINTEL = 17, + AllowTransform = 18, +} + +enum FPFastMathModeMask : uint +{ + MaskNone = 0, + NotNaN = 0x00000001, + NotInf = 0x00000002, + NSZ = 0x00000004, + AllowRecip = 0x00000008, + Fast = 0x00000010, + AllowContract = 0x00010000, + AllowContractFastINTEL = 0x00010000, + AllowReassoc = 0x00020000, + AllowReassocINTEL = 0x00020000, + AllowTransform = 0x00040000, +} + +enum FPRoundingMode : uint +{ + RTE = 0, + RTZ = 1, + RTP = 2, + RTN = 3, +} + +enum LinkageType : uint +{ + Export = 0, + Import = 1, + LinkOnceODR = 2, +} + +enum AccessQualifier : uint +{ + ReadOnly = 0, + WriteOnly = 1, + ReadWrite = 2, +} + +enum FunctionParameterAttribute : uint +{ + Zext = 0, + Sext = 1, + ByVal = 2, + Sret = 3, + NoAlias = 4, + NoCapture = 5, + NoWrite = 6, + NoReadWrite = 7, + RuntimeAlignedINTEL = 5940, +} + +enum Decoration : uint +{ + RelaxedPrecision = 0, + SpecId = 1, + Block = 2, + BufferBlock = 3, + RowMajor = 4, + ColMajor = 5, + ArrayStride = 6, + MatrixStride = 7, + GLSLShared = 8, + GLSLPacked = 9, + CPacked = 10, + BuiltIn = 11, + NoPerspective = 13, + Flat = 14, + Patch = 15, + Centroid = 16, + Sample = 17, + Invariant = 18, + Restrict = 19, + Aliased = 20, + Volatile = 21, + Constant = 22, + Coherent = 23, + NonWritable = 24, + NonReadable = 25, + Uniform = 26, + UniformId = 27, + SaturatedConversion = 28, + Stream = 29, + Location = 30, + Component = 31, + Index = 32, + Binding = 33, + DescriptorSet = 34, + Offset = 35, + XfbBuffer = 36, + XfbStride = 37, + FuncParamAttr = 38, + FPRoundingMode = 39, + FPFastMathMode = 40, + LinkageAttributes = 41, + NoContraction = 42, + InputAttachmentIndex = 43, + Alignment = 44, + MaxByteOffset = 45, + AlignmentId = 46, + MaxByteOffsetId = 47, + NoSignedWrap = 4469, + NoUnsignedWrap = 4470, + WeightTextureQCOM = 4487, + BlockMatchTextureQCOM = 4488, + BlockMatchSamplerQCOM = 4499, + ExplicitInterpAMD = 4999, + NodeSharesPayloadLimitsWithAMDX = 5019, + NodeMaxPayloadsAMDX = 5020, + TrackFinishWritingAMDX = 5078, + PayloadNodeNameAMDX = 5091, + OverrideCoverageNV = 5248, + PassthroughNV = 5250, + ViewportRelativeNV = 5252, + SecondaryViewportRelativeNV = 5256, + PerPrimitiveEXT = 5271, + PerPrimitiveNV = 5271, + PerViewNV = 5272, + PerTaskNV = 5273, + PerVertexKHR = 5285, + PerVertexNV = 5285, + NonUniform = 5300, + NonUniformEXT = 5300, + RestrictPointer = 5355, + RestrictPointerEXT = 5355, + AliasedPointer = 5356, + AliasedPointerEXT = 5356, + HitObjectShaderRecordBufferNV = 5386, + BindlessSamplerNV = 5398, + BindlessImageNV = 5399, + BoundSamplerNV = 5400, + BoundImageNV = 5401, + SIMTCallINTEL = 5599, + ReferencedIndirectlyINTEL = 5602, + ClobberINTEL = 5607, + SideEffectsINTEL = 5608, + VectorComputeVariableINTEL = 5624, + FuncParamIOKindINTEL = 5625, + VectorComputeFunctionINTEL = 5626, + StackCallINTEL = 5627, + GlobalVariableOffsetINTEL = 5628, + CounterBuffer = 5634, + HlslCounterBufferGOOGLE = 5634, + HlslSemanticGOOGLE = 5635, + UserSemantic = 5635, + UserTypeGOOGLE = 5636, + FunctionRoundingModeINTEL = 5822, + FunctionDenormModeINTEL = 5823, + RegisterINTEL = 5825, + MemoryINTEL = 5826, + NumbanksINTEL = 5827, + BankwidthINTEL = 5828, + MaxPrivateCopiesINTEL = 5829, + SinglepumpINTEL = 5830, + DoublepumpINTEL = 5831, + MaxReplicatesINTEL = 5832, + SimpleDualPortINTEL = 5833, + MergeINTEL = 5834, + BankBitsINTEL = 5835, + ForcePow2DepthINTEL = 5836, + StridesizeINTEL = 5883, + WordsizeINTEL = 5884, + TrueDualPortINTEL = 5885, + BurstCoalesceINTEL = 5899, + CacheSizeINTEL = 5900, + DontStaticallyCoalesceINTEL = 5901, + PrefetchINTEL = 5902, + StallEnableINTEL = 5905, + FuseLoopsInFunctionINTEL = 5907, + MathOpDSPModeINTEL = 5909, + AliasScopeINTEL = 5914, + NoAliasINTEL = 5915, + InitiationIntervalINTEL = 5917, + MaxConcurrencyINTEL = 5918, + PipelineEnableINTEL = 5919, + BufferLocationINTEL = 5921, + IOPipeStorageINTEL = 5944, + FunctionFloatingPointModeINTEL = 6080, + SingleElementVectorINTEL = 6085, + VectorComputeCallableFunctionINTEL = 6087, + MediaBlockIOINTEL = 6140, + StallFreeINTEL = 6151, + FPMaxErrorDecorationINTEL = 6170, + LatencyControlLabelINTEL = 6172, + LatencyControlConstraintINTEL = 6173, + ConduitKernelArgumentINTEL = 6175, + RegisterMapKernelArgumentINTEL = 6176, + MMHostInterfaceAddressWidthINTEL = 6177, + MMHostInterfaceDataWidthINTEL = 6178, + MMHostInterfaceLatencyINTEL = 6179, + MMHostInterfaceReadWriteModeINTEL = 6180, + MMHostInterfaceMaxBurstINTEL = 6181, + MMHostInterfaceWaitRequestINTEL = 6182, + StableKernelArgumentINTEL = 6183, + HostAccessINTEL = 6188, + InitModeINTEL = 6190, + ImplementInRegisterMapINTEL = 6191, + CacheControlLoadINTEL = 6442, + CacheControlStoreINTEL = 6443, +} + +enum BuiltIn : uint +{ + Position = 0, + PointSize = 1, + ClipDistance = 3, + CullDistance = 4, + VertexId = 5, + InstanceId = 6, + PrimitiveId = 7, + InvocationId = 8, + Layer = 9, + ViewportIndex = 10, + TessLevelOuter = 11, + TessLevelInner = 12, + TessCoord = 13, + PatchVertices = 14, + FragCoord = 15, + PointCoord = 16, + FrontFacing = 17, + SampleId = 18, + SamplePosition = 19, + SampleMask = 20, + FragDepth = 22, + HelperInvocation = 23, + NumWorkgroups = 24, + WorkgroupSize = 25, + WorkgroupId = 26, + LocalInvocationId = 27, + GlobalInvocationId = 28, + LocalInvocationIndex = 29, + WorkDim = 30, + GlobalSize = 31, + EnqueuedWorkgroupSize = 32, + GlobalOffset = 33, + GlobalLinearId = 34, + SubgroupSize = 36, + SubgroupMaxSize = 37, + NumSubgroups = 38, + NumEnqueuedSubgroups = 39, + SubgroupId = 40, + SubgroupLocalInvocationId = 41, + VertexIndex = 42, + InstanceIndex = 43, + CoreIDARM = 4160, + CoreCountARM = 4161, + CoreMaxIDARM = 4162, + WarpIDARM = 4163, + WarpMaxIDARM = 4164, + SubgroupEqMask = 4416, + SubgroupEqMaskKHR = 4416, + SubgroupGeMask = 4417, + SubgroupGeMaskKHR = 4417, + SubgroupGtMask = 4418, + SubgroupGtMaskKHR = 4418, + SubgroupLeMask = 4419, + SubgroupLeMaskKHR = 4419, + SubgroupLtMask = 4420, + SubgroupLtMaskKHR = 4420, + BaseVertex = 4424, + BaseInstance = 4425, + DrawIndex = 4426, + PrimitiveShadingRateKHR = 4432, + DeviceIndex = 4438, + ViewIndex = 4440, + ShadingRateKHR = 4444, + BaryCoordNoPerspAMD = 4992, + BaryCoordNoPerspCentroidAMD = 4993, + BaryCoordNoPerspSampleAMD = 4994, + BaryCoordSmoothAMD = 4995, + BaryCoordSmoothCentroidAMD = 4996, + BaryCoordSmoothSampleAMD = 4997, + BaryCoordPullModelAMD = 4998, + FragStencilRefEXT = 5014, + CoalescedInputCountAMDX = 5021, + ShaderIndexAMDX = 5073, + ViewportMaskNV = 5253, + SecondaryPositionNV = 5257, + SecondaryViewportMaskNV = 5258, + PositionPerViewNV = 5261, + ViewportMaskPerViewNV = 5262, + FullyCoveredEXT = 5264, + TaskCountNV = 5274, + PrimitiveCountNV = 5275, + PrimitiveIndicesNV = 5276, + ClipDistancePerViewNV = 5277, + CullDistancePerViewNV = 5278, + LayerPerViewNV = 5279, + MeshViewCountNV = 5280, + MeshViewIndicesNV = 5281, + BaryCoordKHR = 5286, + BaryCoordNV = 5286, + BaryCoordNoPerspKHR = 5287, + BaryCoordNoPerspNV = 5287, + FragSizeEXT = 5292, + FragmentSizeNV = 5292, + FragInvocationCountEXT = 5293, + InvocationsPerPixelNV = 5293, + PrimitivePointIndicesEXT = 5294, + PrimitiveLineIndicesEXT = 5295, + PrimitiveTriangleIndicesEXT = 5296, + CullPrimitiveEXT = 5299, + LaunchIdKHR = 5319, + LaunchIdNV = 5319, + LaunchSizeKHR = 5320, + LaunchSizeNV = 5320, + WorldRayOriginKHR = 5321, + WorldRayOriginNV = 5321, + WorldRayDirectionKHR = 5322, + WorldRayDirectionNV = 5322, + ObjectRayOriginKHR = 5323, + ObjectRayOriginNV = 5323, + ObjectRayDirectionKHR = 5324, + ObjectRayDirectionNV = 5324, + RayTminKHR = 5325, + RayTminNV = 5325, + RayTmaxKHR = 5326, + RayTmaxNV = 5326, + InstanceCustomIndexKHR = 5327, + InstanceCustomIndexNV = 5327, + ObjectToWorldKHR = 5330, + ObjectToWorldNV = 5330, + WorldToObjectKHR = 5331, + WorldToObjectNV = 5331, + HitTNV = 5332, + HitKindKHR = 5333, + HitKindNV = 5333, + CurrentRayTimeNV = 5334, + HitTriangleVertexPositionsKHR = 5335, + HitMicroTriangleVertexPositionsNV = 5337, + HitMicroTriangleVertexBarycentricsNV = 5344, + IncomingRayFlagsKHR = 5351, + IncomingRayFlagsNV = 5351, + RayGeometryIndexKHR = 5352, + WarpsPerSMNV = 5374, + SMCountNV = 5375, + WarpIDNV = 5376, + SMIDNV = 5377, + HitKindFrontFacingMicroTriangleNV = 5405, + HitKindBackFacingMicroTriangleNV = 5406, + CullMaskKHR = 6021, +} + +enum SelectionControlShift : uint +{ + Flatten = 0, + DontFlatten = 1, +} + +enum SelectionControlMask : uint +{ + MaskNone = 0, + Flatten = 0x00000001, + DontFlatten = 0x00000002, +} + +enum LoopControlShift : uint +{ + Unroll = 0, + DontUnroll = 1, + DependencyInfinite = 2, + DependencyLength = 3, + MinIterations = 4, + MaxIterations = 5, + IterationMultiple = 6, + PeelCount = 7, + PartialCount = 8, + InitiationIntervalINTEL = 16, + MaxConcurrencyINTEL = 17, + DependencyArrayINTEL = 18, + PipelineEnableINTEL = 19, + LoopCoalesceINTEL = 20, + MaxInterleavingINTEL = 21, + SpeculatedIterationsINTEL = 22, + NoFusionINTEL = 23, + LoopCountINTEL = 24, + MaxReinvocationDelayINTEL = 25, +} + +enum LoopControlMask : uint +{ + MaskNone = 0, + Unroll = 0x00000001, + DontUnroll = 0x00000002, + DependencyInfinite = 0x00000004, + DependencyLength = 0x00000008, + MinIterations = 0x00000010, + MaxIterations = 0x00000020, + IterationMultiple = 0x00000040, + PeelCount = 0x00000080, + PartialCount = 0x00000100, + InitiationIntervalINTEL = 0x00010000, + MaxConcurrencyINTEL = 0x00020000, + DependencyArrayINTEL = 0x00040000, + PipelineEnableINTEL = 0x00080000, + LoopCoalesceINTEL = 0x00100000, + MaxInterleavingINTEL = 0x00200000, + SpeculatedIterationsINTEL = 0x00400000, + NoFusionINTEL = 0x00800000, + LoopCountINTEL = 0x01000000, + MaxReinvocationDelayINTEL = 0x02000000, +} + +enum FunctionControlShift : uint +{ + Inline = 0, + DontInline = 1, + Pure = 2, + Const = 3, + OptNoneINTEL = 16, +} + +enum FunctionControlMask : uint +{ + MaskNone = 0, + Inline = 0x00000001, + DontInline = 0x00000002, + Pure = 0x00000004, + Const = 0x00000008, + OptNoneINTEL = 0x00010000, +} + +enum MemorySemanticsShift : uint +{ + Acquire = 1, + Release = 2, + AcquireRelease = 3, + SequentiallyConsistent = 4, + UniformMemory = 6, + SubgroupMemory = 7, + WorkgroupMemory = 8, + CrossWorkgroupMemory = 9, + AtomicCounterMemory = 10, + ImageMemory = 11, + OutputMemory = 12, + OutputMemoryKHR = 12, + MakeAvailable = 13, + MakeAvailableKHR = 13, + MakeVisible = 14, + MakeVisibleKHR = 14, + Volatile = 15, +} + +enum MemorySemanticsMask : uint +{ + MaskNone = 0, + Acquire = 0x00000002, + Release = 0x00000004, + AcquireRelease = 0x00000008, + SequentiallyConsistent = 0x00000010, + UniformMemory = 0x00000040, + SubgroupMemory = 0x00000080, + WorkgroupMemory = 0x00000100, + CrossWorkgroupMemory = 0x00000200, + AtomicCounterMemory = 0x00000400, + ImageMemory = 0x00000800, + OutputMemory = 0x00001000, + OutputMemoryKHR = 0x00001000, + MakeAvailable = 0x00002000, + MakeAvailableKHR = 0x00002000, + MakeVisible = 0x00004000, + MakeVisibleKHR = 0x00004000, + Volatile = 0x00008000, +} + +enum MemoryAccessShift : uint +{ + Volatile = 0, + Aligned = 1, + Nontemporal = 2, + MakePointerAvailable = 3, + MakePointerAvailableKHR = 3, + MakePointerVisible = 4, + MakePointerVisibleKHR = 4, + NonPrivatePointer = 5, + NonPrivatePointerKHR = 5, + AliasScopeINTELMask = 16, + NoAliasINTELMask = 17, +} + +enum MemoryAccessMask : uint +{ + MaskNone = 0, + Volatile = 0x00000001, + Aligned = 0x00000002, + Nontemporal = 0x00000004, + MakePointerAvailable = 0x00000008, + MakePointerAvailableKHR = 0x00000008, + MakePointerVisible = 0x00000010, + MakePointerVisibleKHR = 0x00000010, + NonPrivatePointer = 0x00000020, + NonPrivatePointerKHR = 0x00000020, + AliasScopeINTELMask = 0x00010000, + NoAliasINTELMask = 0x00020000, +} + +enum Scope : uint +{ + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + QueueFamily = 5, + QueueFamilyKHR = 5, + ShaderCallKHR = 6, +} + +enum GroupOperation : uint +{ + Reduce = 0, + InclusiveScan = 1, + ExclusiveScan = 2, + ClusteredReduce = 3, + PartitionedReduceNV = 6, + PartitionedInclusiveScanNV = 7, + PartitionedExclusiveScanNV = 8, +} + +enum KernelEnqueueFlags : uint +{ + NoWait = 0, + WaitKernel = 1, + WaitWorkGroup = 2, +} + +enum KernelProfilingInfoShift : uint +{ + CmdExecTime = 0, +} + +enum KernelProfilingInfoMask : uint +{ + MaskNone = 0, + CmdExecTime = 0x00000001, +} + +enum Capability : uint +{ + Matrix = 0, + Shader = 1, + Geometry = 2, + Tessellation = 3, + Addresses = 4, + Linkage = 5, + Kernel = 6, + Vector16 = 7, + Float16Buffer = 8, + Float16 = 9, + Float64 = 10, + Int64 = 11, + Int64Atomics = 12, + ImageBasic = 13, + ImageReadWrite = 14, + ImageMipmap = 15, + Pipes = 17, + Groups = 18, + DeviceEnqueue = 19, + LiteralSampler = 20, + AtomicStorage = 21, + Int16 = 22, + TessellationPointSize = 23, + GeometryPointSize = 24, + ImageGatherExtended = 25, + StorageImageMultisample = 27, + UniformBufferArrayDynamicIndexing = 28, + SampledImageArrayDynamicIndexing = 29, + StorageBufferArrayDynamicIndexing = 30, + StorageImageArrayDynamicIndexing = 31, + ClipDistance = 32, + CullDistance = 33, + ImageCubeArray = 34, + SampleRateShading = 35, + ImageRect = 36, + SampledRect = 37, + GenericPointer = 38, + Int8 = 39, + InputAttachment = 40, + SparseResidency = 41, + MinLod = 42, + Sampled1D = 43, + Image1D = 44, + SampledCubeArray = 45, + SampledBuffer = 46, + ImageBuffer = 47, + ImageMSArray = 48, + StorageImageExtendedFormats = 49, + ImageQuery = 50, + DerivativeControl = 51, + InterpolationFunction = 52, + TransformFeedback = 53, + GeometryStreams = 54, + StorageImageReadWithoutFormat = 55, + StorageImageWriteWithoutFormat = 56, + MultiViewport = 57, + SubgroupDispatch = 58, + NamedBarrier = 59, + PipeStorage = 60, + GroupNonUniform = 61, + GroupNonUniformVote = 62, + GroupNonUniformArithmetic = 63, + GroupNonUniformBallot = 64, + GroupNonUniformShuffle = 65, + GroupNonUniformShuffleRelative = 66, + GroupNonUniformClustered = 67, + GroupNonUniformQuad = 68, + ShaderLayer = 69, + ShaderViewportIndex = 70, + UniformDecoration = 71, + CoreBuiltinsARM = 4165, + TileImageColorReadAccessEXT = 4166, + TileImageDepthReadAccessEXT = 4167, + TileImageStencilReadAccessEXT = 4168, + CooperativeMatrixLayoutsARM = 4201, + FragmentShadingRateKHR = 4422, + SubgroupBallotKHR = 4423, + DrawParameters = 4427, + WorkgroupMemoryExplicitLayoutKHR = 4428, + WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, + WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, + SubgroupVoteKHR = 4431, + StorageBuffer16BitAccess = 4433, + StorageUniformBufferBlock16 = 4433, + StorageUniform16 = 4434, + UniformAndStorageBuffer16BitAccess = 4434, + StoragePushConstant16 = 4435, + StorageInputOutput16 = 4436, + DeviceGroup = 4437, + MultiView = 4439, + VariablePointersStorageBuffer = 4441, + VariablePointers = 4442, + AtomicStorageOps = 4445, + SampleMaskPostDepthCoverage = 4447, + StorageBuffer8BitAccess = 4448, + UniformAndStorageBuffer8BitAccess = 4449, + StoragePushConstant8 = 4450, + DenormPreserve = 4464, + DenormFlushToZero = 4465, + SignedZeroInfNanPreserve = 4466, + RoundingModeRTE = 4467, + RoundingModeRTZ = 4468, + RayQueryProvisionalKHR = 4471, + RayQueryKHR = 4472, + RayTraversalPrimitiveCullingKHR = 4478, + RayTracingKHR = 4479, + TextureSampleWeightedQCOM = 4484, + TextureBoxFilterQCOM = 4485, + TextureBlockMatchQCOM = 4486, + TextureBlockMatch2QCOM = 4498, + Float16ImageAMD = 5008, + ImageGatherBiasLodAMD = 5009, + FragmentMaskAMD = 5010, + StencilExportEXT = 5013, + ImageReadWriteLodAMD = 5015, + Int64ImageEXT = 5016, + ShaderClockKHR = 5055, + ShaderEnqueueAMDX = 5067, + QuadControlKHR = 5087, + SampleMaskOverrideCoverageNV = 5249, + GeometryShaderPassthroughNV = 5251, + ShaderViewportIndexLayerEXT = 5254, + ShaderViewportIndexLayerNV = 5254, + ShaderViewportMaskNV = 5255, + ShaderStereoViewNV = 5259, + PerViewAttributesNV = 5260, + FragmentFullyCoveredEXT = 5265, + MeshShadingNV = 5266, + ImageFootprintNV = 5282, + MeshShadingEXT = 5283, + FragmentBarycentricKHR = 5284, + FragmentBarycentricNV = 5284, + ComputeDerivativeGroupQuadsNV = 5288, + FragmentDensityEXT = 5291, + ShadingRateNV = 5291, + GroupNonUniformPartitionedNV = 5297, + ShaderNonUniform = 5301, + ShaderNonUniformEXT = 5301, + RuntimeDescriptorArray = 5302, + RuntimeDescriptorArrayEXT = 5302, + InputAttachmentArrayDynamicIndexing = 5303, + InputAttachmentArrayDynamicIndexingEXT = 5303, + UniformTexelBufferArrayDynamicIndexing = 5304, + UniformTexelBufferArrayDynamicIndexingEXT = 5304, + StorageTexelBufferArrayDynamicIndexing = 5305, + StorageTexelBufferArrayDynamicIndexingEXT = 5305, + UniformBufferArrayNonUniformIndexing = 5306, + UniformBufferArrayNonUniformIndexingEXT = 5306, + SampledImageArrayNonUniformIndexing = 5307, + SampledImageArrayNonUniformIndexingEXT = 5307, + StorageBufferArrayNonUniformIndexing = 5308, + StorageBufferArrayNonUniformIndexingEXT = 5308, + StorageImageArrayNonUniformIndexing = 5309, + StorageImageArrayNonUniformIndexingEXT = 5309, + InputAttachmentArrayNonUniformIndexing = 5310, + InputAttachmentArrayNonUniformIndexingEXT = 5310, + UniformTexelBufferArrayNonUniformIndexing = 5311, + UniformTexelBufferArrayNonUniformIndexingEXT = 5311, + StorageTexelBufferArrayNonUniformIndexing = 5312, + StorageTexelBufferArrayNonUniformIndexingEXT = 5312, + RayTracingPositionFetchKHR = 5336, + RayTracingNV = 5340, + RayTracingMotionBlurNV = 5341, + VulkanMemoryModel = 5345, + VulkanMemoryModelKHR = 5345, + VulkanMemoryModelDeviceScope = 5346, + VulkanMemoryModelDeviceScopeKHR = 5346, + PhysicalStorageBufferAddresses = 5347, + PhysicalStorageBufferAddressesEXT = 5347, + ComputeDerivativeGroupLinearNV = 5350, + RayTracingProvisionalKHR = 5353, + CooperativeMatrixNV = 5357, + FragmentShaderSampleInterlockEXT = 5363, + FragmentShaderShadingRateInterlockEXT = 5372, + ShaderSMBuiltinsNV = 5373, + FragmentShaderPixelInterlockEXT = 5378, + DemoteToHelperInvocation = 5379, + DemoteToHelperInvocationEXT = 5379, + DisplacementMicromapNV = 5380, + RayTracingOpacityMicromapEXT = 5381, + ShaderInvocationReorderNV = 5383, + BindlessTextureNV = 5390, + RayQueryPositionFetchKHR = 5391, + AtomicFloat16VectorNV = 5404, + RayTracingDisplacementMicromapNV = 5409, + RawAccessChainsNV = 5414, + SubgroupShuffleINTEL = 5568, + SubgroupBufferBlockIOINTEL = 5569, + SubgroupImageBlockIOINTEL = 5570, + SubgroupImageMediaBlockIOINTEL = 5579, + RoundToInfinityINTEL = 5582, + FloatingPointModeINTEL = 5583, + IntegerFunctions2INTEL = 5584, + FunctionPointersINTEL = 5603, + IndirectReferencesINTEL = 5604, + AsmINTEL = 5606, + AtomicFloat32MinMaxEXT = 5612, + AtomicFloat64MinMaxEXT = 5613, + AtomicFloat16MinMaxEXT = 5616, + VectorComputeINTEL = 5617, + VectorAnyINTEL = 5619, + ExpectAssumeKHR = 5629, + SubgroupAvcMotionEstimationINTEL = 5696, + SubgroupAvcMotionEstimationIntraINTEL = 5697, + SubgroupAvcMotionEstimationChromaINTEL = 5698, + VariableLengthArrayINTEL = 5817, + FunctionFloatControlINTEL = 5821, + FPGAMemoryAttributesINTEL = 5824, + FPFastMathModeINTEL = 5837, + ArbitraryPrecisionIntegersINTEL = 5844, + ArbitraryPrecisionFloatingPointINTEL = 5845, + UnstructuredLoopControlsINTEL = 5886, + FPGALoopControlsINTEL = 5888, + KernelAttributesINTEL = 5892, + FPGAKernelAttributesINTEL = 5897, + FPGAMemoryAccessesINTEL = 5898, + FPGAClusterAttributesINTEL = 5904, + LoopFuseINTEL = 5906, + FPGADSPControlINTEL = 5908, + MemoryAccessAliasingINTEL = 5910, + FPGAInvocationPipeliningAttributesINTEL = 5916, + FPGABufferLocationINTEL = 5920, + ArbitraryPrecisionFixedPointINTEL = 5922, + USMStorageClassesINTEL = 5935, + RuntimeAlignedAttributeINTEL = 5939, + IOPipesINTEL = 5943, + BlockingPipesINTEL = 5945, + FPGARegINTEL = 5948, + DotProductInputAll = 6016, + DotProductInputAllKHR = 6016, + DotProductInput4x8Bit = 6017, + DotProductInput4x8BitKHR = 6017, + DotProductInput4x8BitPacked = 6018, + DotProductInput4x8BitPackedKHR = 6018, + DotProduct = 6019, + DotProductKHR = 6019, + RayCullMaskKHR = 6020, + CooperativeMatrixKHR = 6022, + ReplicatedCompositesEXT = 6024, + BitInstructions = 6025, + GroupNonUniformRotateKHR = 6026, + FloatControls2 = 6029, + AtomicFloat32AddEXT = 6033, + AtomicFloat64AddEXT = 6034, + LongCompositesINTEL = 6089, + OptNoneINTEL = 6094, + AtomicFloat16AddEXT = 6095, + DebugInfoModuleINTEL = 6114, + BFloat16ConversionINTEL = 6115, + SplitBarrierINTEL = 6141, + FPGAClusterAttributesV2INTEL = 6150, + FPGAKernelAttributesv2INTEL = 6161, + FPMaxErrorINTEL = 6169, + FPGALatencyControlINTEL = 6171, + FPGAArgumentInterfacesINTEL = 6174, + GlobalVariableHostAccessINTEL = 6187, + GlobalVariableFPGADecorationsINTEL = 6189, + GroupUniformArithmeticKHR = 6400, + MaskedGatherScatterINTEL = 6427, + CacheControlsINTEL = 6441, + RegisterLimitsINTEL = 6460, +} + +enum RayFlagsShift : uint +{ + OpaqueKHR = 0, + NoOpaqueKHR = 1, + TerminateOnFirstHitKHR = 2, + SkipClosestHitShaderKHR = 3, + CullBackFacingTrianglesKHR = 4, + CullFrontFacingTrianglesKHR = 5, + CullOpaqueKHR = 6, + CullNoOpaqueKHR = 7, + SkipTrianglesKHR = 8, + SkipAABBsKHR = 9, + ForceOpacityMicromap2StateEXT = 10, +} + +enum RayFlagsMask : uint +{ + MaskNone = 0, + OpaqueKHR = 0x00000001, + NoOpaqueKHR = 0x00000002, + TerminateOnFirstHitKHR = 0x00000004, + SkipClosestHitShaderKHR = 0x00000008, + CullBackFacingTrianglesKHR = 0x00000010, + CullFrontFacingTrianglesKHR = 0x00000020, + CullOpaqueKHR = 0x00000040, + CullNoOpaqueKHR = 0x00000080, + SkipTrianglesKHR = 0x00000100, + SkipAABBsKHR = 0x00000200, + ForceOpacityMicromap2StateEXT = 0x00000400, +} + +enum RayQueryIntersection : uint +{ + RayQueryCandidateIntersectionKHR = 0, + RayQueryCommittedIntersectionKHR = 1, +} + +enum RayQueryCommittedIntersectionType : uint +{ + RayQueryCommittedIntersectionNoneKHR = 0, + RayQueryCommittedIntersectionTriangleKHR = 1, + RayQueryCommittedIntersectionGeneratedKHR = 2, +} + +enum RayQueryCandidateIntersectionType : uint +{ + RayQueryCandidateIntersectionTriangleKHR = 0, + RayQueryCandidateIntersectionAABBKHR = 1, +} + +enum FragmentShadingRateShift : uint +{ + Vertical2Pixels = 0, + Vertical4Pixels = 1, + Horizontal2Pixels = 2, + Horizontal4Pixels = 3, +} + +enum FragmentShadingRateMask : uint +{ + MaskNone = 0, + Vertical2Pixels = 0x00000001, + Vertical4Pixels = 0x00000002, + Horizontal2Pixels = 0x00000004, + Horizontal4Pixels = 0x00000008, +} + +enum FPDenormMode : uint +{ + Preserve = 0, + FlushToZero = 1, +} + +enum FPOperationMode : uint +{ + IEEE = 0, + ALT = 1, +} + +enum QuantizationModes : uint +{ + TRN = 0, + TRN_ZERO = 1, + RND = 2, + RND_ZERO = 3, + RND_INF = 4, + RND_MIN_INF = 5, + RND_CONV = 6, + RND_CONV_ODD = 7, +} + +enum OverflowModes : uint +{ + WRAP = 0, + SAT = 1, + SAT_ZERO = 2, + SAT_SYM = 3, +} + +enum PackedVectorFormat : uint +{ + PackedVectorFormat4x8Bit = 0, + PackedVectorFormat4x8BitKHR = 0, +} + +enum CooperativeMatrixOperandsShift : uint +{ + MatrixASignedComponentsKHR = 0, + MatrixBSignedComponentsKHR = 1, + MatrixCSignedComponentsKHR = 2, + MatrixResultSignedComponentsKHR = 3, + SaturatingAccumulationKHR = 4, +} + +enum CooperativeMatrixOperandsMask : uint +{ + MaskNone = 0, + MatrixASignedComponentsKHR = 0x00000001, + MatrixBSignedComponentsKHR = 0x00000002, + MatrixCSignedComponentsKHR = 0x00000004, + MatrixResultSignedComponentsKHR = 0x00000008, + SaturatingAccumulationKHR = 0x00000010, +} + +enum CooperativeMatrixLayout : uint +{ + RowMajorKHR = 0, + ColumnMajorKHR = 1, + RowBlockedInterleavedARM = 4202, + ColumnBlockedInterleavedARM = 4203, +} + +enum CooperativeMatrixUse : uint +{ + MatrixAKHR = 0, + MatrixBKHR = 1, + MatrixAccumulatorKHR = 2, +} + +enum InitializationModeQualifier : uint +{ + InitOnDeviceReprogramINTEL = 0, + InitOnDeviceResetINTEL = 1, +} + +enum HostAccessQualifier : uint +{ + NoneINTEL = 0, + ReadINTEL = 1, + WriteINTEL = 2, + ReadWriteINTEL = 3, +} + +enum LoadCacheControl : uint +{ + UncachedINTEL = 0, + CachedINTEL = 1, + StreamingINTEL = 2, + InvalidateAfterReadINTEL = 3, + ConstCachedINTEL = 4, +} + +enum StoreCacheControl : uint +{ + UncachedINTEL = 0, + WriteThroughINTEL = 1, + WriteBackINTEL = 2, + StreamingINTEL = 3, +} + +enum NamedMaximumNumberOfRegisters : uint +{ + AutoINTEL = 0, +} + +enum RawAccessChainOperandsShift : uint +{ + RobustnessPerComponentNV = 0, + RobustnessPerElementNV = 1, +} + +enum RawAccessChainOperandsMask : uint +{ + MaskNone = 0, + RobustnessPerComponentNV = 0x00000001, + RobustnessPerElementNV = 0x00000002, +} + +enum Op : uint +{ + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpCopyLogical = 400, + OpPtrEqual = 401, + OpPtrNotEqual = 402, + OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, + OpTerminateInvocation = 4416, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, + OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, + OpTraceRayKHR = 4445, + OpExecuteCallableKHR = 4446, + OpConvertUToAccelerationStructureKHR = 4447, + OpIgnoreIntersectionKHR = 4448, + OpTerminateRayKHR = 4449, + OpSDot = 4450, + OpSDotKHR = 4450, + OpUDot = 4451, + OpUDotKHR = 4451, + OpSUDot = 4452, + OpSUDotKHR = 4452, + OpSDotAccSat = 4453, + OpSDotAccSatKHR = 4453, + OpUDotAccSat = 4454, + OpUDotAccSatKHR = 4454, + OpSUDotAccSat = 4455, + OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, + OpTypeRayQueryKHR = 4472, + OpRayQueryInitializeKHR = 4473, + OpRayQueryTerminateKHR = 4474, + OpRayQueryGenerateIntersectionKHR = 4475, + OpRayQueryConfirmIntersectionKHR = 4476, + OpRayQueryProceedKHR = 4477, + OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpImageBlockMatchWindowSSDQCOM = 4500, + OpImageBlockMatchWindowSADQCOM = 4501, + OpImageBlockMatchGatherSSDQCOM = 4502, + OpImageBlockMatchGatherSADQCOM = 4503, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpReadClockKHR = 5056, + OpFinalizeNodePayloadsAMDX = 5075, + OpFinishWritingNodePayloadAMDX = 5078, + OpInitializeNodePayloadsAMDX = 5090, + OpGroupNonUniformQuadAllKHR = 5110, + OpGroupNonUniformQuadAnyKHR = 5111, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, + OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, + OpGroupNonUniformPartitionNV = 5296, + OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpReportIntersectionKHR = 5334, + OpReportIntersectionNV = 5334, + OpIgnoreIntersectionNV = 5335, + OpTerminateRayNV = 5336, + OpTraceNV = 5337, + OpTraceMotionNV = 5338, + OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, + OpTypeAccelerationStructureKHR = 5341, + OpTypeAccelerationStructureNV = 5341, + OpExecuteCallableNV = 5344, + OpTypeCooperativeMatrixNV = 5358, + OpCooperativeMatrixLoadNV = 5359, + OpCooperativeMatrixStoreNV = 5360, + OpCooperativeMatrixMulAddNV = 5361, + OpCooperativeMatrixLengthNV = 5362, + OpBeginInvocationInterlockEXT = 5364, + OpEndInvocationInterlockEXT = 5365, + OpDemoteToHelperInvocation = 5380, + OpDemoteToHelperInvocationEXT = 5380, + OpIsHelperInvocationEXT = 5381, + OpConvertUToImageNV = 5391, + OpConvertUToSamplerNV = 5392, + OpConvertImageToUNV = 5393, + OpConvertSamplerToUNV = 5394, + OpConvertUToSampledImageNV = 5395, + OpConvertSampledImageToUNV = 5396, + OpSamplerImageAddressingModeNV = 5397, + OpRawAccessChainNV = 5398, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpSubgroupImageMediaBlockReadINTEL = 5580, + OpSubgroupImageMediaBlockWriteINTEL = 5581, + OpUCountLeadingZerosINTEL = 5585, + OpUCountTrailingZerosINTEL = 5586, + OpAbsISubINTEL = 5587, + OpAbsUSubINTEL = 5588, + OpIAddSatINTEL = 5589, + OpUAddSatINTEL = 5590, + OpIAverageINTEL = 5591, + OpUAverageINTEL = 5592, + OpIAverageRoundedINTEL = 5593, + OpUAverageRoundedINTEL = 5594, + OpISubSatINTEL = 5595, + OpUSubSatINTEL = 5596, + OpIMul32x16INTEL = 5597, + OpUMul32x16INTEL = 5598, + OpConstantFunctionPointerINTEL = 5600, + OpFunctionPointerCallINTEL = 5601, + OpAsmTargetINTEL = 5609, + OpAsmINTEL = 5610, + OpAsmCallINTEL = 5611, + OpAtomicFMinEXT = 5614, + OpAtomicFMaxEXT = 5615, + OpAssumeTrueKHR = 5630, + OpExpectKHR = 5631, + OpDecorateString = 5632, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateString = 5633, + OpMemberDecorateStringGOOGLE = 5633, + OpVmeImageINTEL = 5699, + OpTypeVmeImageINTEL = 5700, + OpTypeAvcImePayloadINTEL = 5701, + OpTypeAvcRefPayloadINTEL = 5702, + OpTypeAvcSicPayloadINTEL = 5703, + OpTypeAvcMcePayloadINTEL = 5704, + OpTypeAvcMceResultINTEL = 5705, + OpTypeAvcImeResultINTEL = 5706, + OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, + OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, + OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, + OpTypeAvcImeDualReferenceStreaminINTEL = 5710, + OpTypeAvcRefResultINTEL = 5711, + OpTypeAvcSicResultINTEL = 5712, + OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, + OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, + OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, + OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, + OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, + OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, + OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, + OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, + OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, + OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, + OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, + OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, + OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, + OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, + OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, + OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, + OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, + OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, + OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, + OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, + OpSubgroupAvcMceConvertToImeResultINTEL = 5733, + OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, + OpSubgroupAvcMceConvertToRefResultINTEL = 5735, + OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, + OpSubgroupAvcMceConvertToSicResultINTEL = 5737, + OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, + OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, + OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, + OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, + OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, + OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, + OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, + OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, + OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, + OpSubgroupAvcImeInitializeINTEL = 5747, + OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, + OpSubgroupAvcImeSetDualReferenceINTEL = 5749, + OpSubgroupAvcImeRefWindowSizeINTEL = 5750, + OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, + OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, + OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, + OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, + OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, + OpSubgroupAvcImeSetWeightedSadINTEL = 5756, + OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, + OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, + OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, + OpSubgroupAvcImeConvertToMceResultINTEL = 5765, + OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, + OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, + OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, + OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, + OpSubgroupAvcImeGetBorderReachedINTEL = 5776, + OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, + OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, + OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, + OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, + OpSubgroupAvcFmeInitializeINTEL = 5781, + OpSubgroupAvcBmeInitializeINTEL = 5782, + OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, + OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, + OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, + OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, + OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, + OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, + OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, + OpSubgroupAvcRefConvertToMceResultINTEL = 5790, + OpSubgroupAvcSicInitializeINTEL = 5791, + OpSubgroupAvcSicConfigureSkcINTEL = 5792, + OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, + OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, + OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, + OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, + OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, + OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, + OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, + OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, + OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, + OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, + OpSubgroupAvcSicEvaluateIpeINTEL = 5803, + OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, + OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, + OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, + OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, + OpSubgroupAvcSicConvertToMceResultINTEL = 5808, + OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, + OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, + OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, + OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, + OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, + OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, + OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, + OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, + OpVariableLengthArrayINTEL = 5818, + OpSaveMemoryINTEL = 5819, + OpRestoreMemoryINTEL = 5820, + OpArbitraryFloatSinCosPiINTEL = 5840, + OpArbitraryFloatCastINTEL = 5841, + OpArbitraryFloatCastFromIntINTEL = 5842, + OpArbitraryFloatCastToIntINTEL = 5843, + OpArbitraryFloatAddINTEL = 5846, + OpArbitraryFloatSubINTEL = 5847, + OpArbitraryFloatMulINTEL = 5848, + OpArbitraryFloatDivINTEL = 5849, + OpArbitraryFloatGTINTEL = 5850, + OpArbitraryFloatGEINTEL = 5851, + OpArbitraryFloatLTINTEL = 5852, + OpArbitraryFloatLEINTEL = 5853, + OpArbitraryFloatEQINTEL = 5854, + OpArbitraryFloatRecipINTEL = 5855, + OpArbitraryFloatRSqrtINTEL = 5856, + OpArbitraryFloatCbrtINTEL = 5857, + OpArbitraryFloatHypotINTEL = 5858, + OpArbitraryFloatSqrtINTEL = 5859, + OpArbitraryFloatLogINTEL = 5860, + OpArbitraryFloatLog2INTEL = 5861, + OpArbitraryFloatLog10INTEL = 5862, + OpArbitraryFloatLog1pINTEL = 5863, + OpArbitraryFloatExpINTEL = 5864, + OpArbitraryFloatExp2INTEL = 5865, + OpArbitraryFloatExp10INTEL = 5866, + OpArbitraryFloatExpm1INTEL = 5867, + OpArbitraryFloatSinINTEL = 5868, + OpArbitraryFloatCosINTEL = 5869, + OpArbitraryFloatSinCosINTEL = 5870, + OpArbitraryFloatSinPiINTEL = 5871, + OpArbitraryFloatCosPiINTEL = 5872, + OpArbitraryFloatASinINTEL = 5873, + OpArbitraryFloatASinPiINTEL = 5874, + OpArbitraryFloatACosINTEL = 5875, + OpArbitraryFloatACosPiINTEL = 5876, + OpArbitraryFloatATanINTEL = 5877, + OpArbitraryFloatATanPiINTEL = 5878, + OpArbitraryFloatATan2INTEL = 5879, + OpArbitraryFloatPowINTEL = 5880, + OpArbitraryFloatPowRINTEL = 5881, + OpArbitraryFloatPowNINTEL = 5882, + OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, + OpFixedSqrtINTEL = 5923, + OpFixedRecipINTEL = 5924, + OpFixedRsqrtINTEL = 5925, + OpFixedSinINTEL = 5926, + OpFixedCosINTEL = 5927, + OpFixedSinCosINTEL = 5928, + OpFixedSinPiINTEL = 5929, + OpFixedCosPiINTEL = 5930, + OpFixedSinCosPiINTEL = 5931, + OpFixedLogINTEL = 5932, + OpFixedExpINTEL = 5933, + OpPtrCastToCrossWorkgroupINTEL = 5934, + OpCrossWorkgroupCastToPtrINTEL = 5938, + OpReadPipeBlockingINTEL = 5946, + OpWritePipeBlockingINTEL = 5947, + OpFPGARegINTEL = 5949, + OpRayQueryGetRayTMinKHR = 6016, + OpRayQueryGetRayFlagsKHR = 6017, + OpRayQueryGetIntersectionTKHR = 6018, + OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, + OpRayQueryGetIntersectionInstanceIdKHR = 6020, + OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, + OpRayQueryGetIntersectionGeometryIndexKHR = 6022, + OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, + OpRayQueryGetIntersectionBarycentricsKHR = 6024, + OpRayQueryGetIntersectionFrontFaceKHR = 6025, + OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, + OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, + OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, + OpRayQueryGetWorldRayDirectionKHR = 6029, + OpRayQueryGetWorldRayOriginKHR = 6030, + OpRayQueryGetIntersectionObjectToWorldKHR = 6031, + OpRayQueryGetIntersectionWorldToObjectKHR = 6032, + OpAtomicFAddEXT = 6035, + OpTypeBufferSurfaceINTEL = 6086, + OpTypeStructContinuedINTEL = 6090, + OpConstantCompositeContinuedINTEL = 6091, + OpSpecConstantCompositeContinuedINTEL = 6092, + OpCompositeConstructContinuedINTEL = 6096, + OpConvertFToBF16INTEL = 6116, + OpConvertBF16ToFINTEL = 6117, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMaskedGatherINTEL = 6428, + OpMaskedScatterINTEL = 6429, +} + + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.bat b/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.bat index fc1b5ae69..1323d7ff2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.bat +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.bat @@ -4,22 +4,22 @@ SET CORE_GRAMMAR_PRM="--spirv-core-grammar=external/spirv-headers/include/spirv/ SET DEBUGINFO_GRAMMAR_PRM="--extinst-debuginfo-grammar=external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json" SET CLDEBUGINFO100_GRAMMAR_PRM="--extinst-cldebuginfo100-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" -python utils/generate_grammar_tables.py %CORE_GRAMMAR_PRM% %DEBUGINFO_GRAMMAR_PRM% %CLDEBUGINFO100_GRAMMAR_PRM% --extension-enum-output=source/extension_enum.inc --enum-string-mapping-output=source/enum_string_mapping.inc -python utils/generate_grammar_tables.py %CORE_GRAMMAR_PRM% %DEBUGINFO_GRAMMAR_PRM% %CLDEBUGINFO100_GRAMMAR_PRM% --core-insts-output=source/core.insts-unified1.inc --operand-kinds-output=source/operand.kinds-unified1.inc +python utils/generate_grammar_tables.py %CORE_GRAMMAR_PRM% %DEBUGINFO_GRAMMAR_PRM% %CLDEBUGINFO100_GRAMMAR_PRM% --extension-enum-output=source/extension_enum.inc --enum-string-mapping-output=source/enum_string_mapping.inc --output-language=c++ +python utils/generate_grammar_tables.py %CORE_GRAMMAR_PRM% %DEBUGINFO_GRAMMAR_PRM% %CLDEBUGINFO100_GRAMMAR_PRM% --core-insts-output=source/core.insts-unified1.inc --operand-kinds-output=source/operand.kinds-unified1.inc --output-language=c++ -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json --vendor-insts-output=source/debuginfo.insts.inc --vendor-operand-kind-prefix="" -python utils/generate_grammar_tables.py --extinst-glsl-grammar=external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json --glsl-insts-output=source/glsl.std.450.insts.inc +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json --vendor-insts-output=source/debuginfo.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-glsl-grammar=external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json --glsl-insts-output=source/glsl.std.450.insts.inc --output-language=c++ -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json --vendor-insts-output=source/nonsemantic.clspvreflection.insts.inc --vendor-operand-kind-prefix="" -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json --vendor-insts-output=source/nonsemantic.shader.debuginfo.100.insts.inc --vendor-operand-kind-prefix="SHDEBUG100_" -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --vendor-insts-output=source/opencl.debuginfo.100.insts.inc --vendor-operand-kind-prefix="CLDEBUG100_" +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json --vendor-insts-output=source/nonsemantic.clspvreflection.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json --vendor-insts-output=source/nonsemantic.shader.debuginfo.100.insts.inc --vendor-operand-kind-prefix="SHDEBUG100_" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --vendor-insts-output=source/opencl.debuginfo.100.insts.inc --vendor-operand-kind-prefix="CLDEBUG100_" --output-language=c++ -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json --vendor-insts-output=source/spv-amd-gcn-shader.insts.inc --vendor-operand-kind-prefix="" -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json --vendor-insts-output=source/spv-amd-shader-ballot.insts.inc --vendor-operand-kind-prefix="" -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json --vendor-insts-output=source/spv-amd-shader-explicit-vertex-parameter.insts.inc --vendor-operand-kind-prefix="" -python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json --vendor-insts-output=source/spv-amd-shader-trinary-minmax.insts.inc --vendor-operand-kind-prefix="" +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json --vendor-insts-output=source/spv-amd-gcn-shader.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json --vendor-insts-output=source/spv-amd-shader-ballot.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json --vendor-insts-output=source/spv-amd-shader-explicit-vertex-parameter.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json --vendor-insts-output=source/spv-amd-shader-trinary-minmax.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ -python utils/generate_grammar_tables.py --extinst-opencl-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json --opencl-insts-output=source/opencl.std.insts.inc +python utils/generate_grammar_tables.py --extinst-opencl-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json --opencl-insts-output=source/opencl.std.insts.inc --output-language=c++ python utils/generate_registry_tables.py --xml=external/spirv-headers/include/spirv/spir-v.xml --generator-output=source/generators.inc python utils/update_build_version.py . source/build-version.inc diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.sh b/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.sh new file mode 100644 index 000000000..27bd8eea6 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/gen_headers.sh @@ -0,0 +1,26 @@ +# updating genrated files for spir-v tools, only needed if external subdir has changed + +CORE_GRAMMAR_PRM="--spirv-core-grammar=external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json" +DEBUGINFO_GRAMMAR_PRM="--extinst-debuginfo-grammar=external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json" +CLDEBUGINFO100_GRAMMAR_PRM="--extinst-cldebuginfo100-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json" + +python3 utils/generate_grammar_tables.py $CORE_GRAMMAR_PRM $DEBUGINFO_GRAMMAR_PRM $CLDEBUGINFO100_GRAMMAR_PRM --extension-enum-output=source/extension_enum.inc --enum-string-mapping-output=source/enum_string_mapping.inc --output-language=c++ +python3 utils/generate_grammar_tables.py $CORE_GRAMMAR_PRM $DEBUGINFO_GRAMMAR_PRM $CLDEBUGINFO100_GRAMMAR_PRM --core-insts-output=source/core.insts-unified1.inc --operand-kinds-output=source/operand.kinds-unified1.inc --output-language=c++ + +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.debuginfo.grammar.json --vendor-insts-output=source/debuginfo.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-glsl-grammar=external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json --glsl-insts-output=source/glsl.std.450.insts.inc --output-language=c++ + +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json --vendor-insts-output=source/nonsemantic.clspvreflection.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json --vendor-insts-output=source/nonsemantic.shader.debuginfo.100.insts.inc --vendor-operand-kind-prefix="SHDEBUG100_" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --vendor-insts-output=source/opencl.debuginfo.100.insts.inc --vendor-operand-kind-prefix="CLDEBUG100_" --output-language=c++ + +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json --vendor-insts-output=source/spv-amd-gcn-shader.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json --vendor-insts-output=source/spv-amd-shader-ballot.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json --vendor-insts-output=source/spv-amd-shader-explicit-vertex-parameter.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ +python3 utils/generate_grammar_tables.py --extinst-vendor-grammar=external/spirv-headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json --vendor-insts-output=source/spv-amd-shader-trinary-minmax.insts.inc --vendor-operand-kind-prefix="" --output-language=c++ + +python3 utils/generate_grammar_tables.py --extinst-opencl-grammar=external/spirv-headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json --opencl-insts-output=source/opencl.std.insts.inc --output-language=c++ + +python3 utils/generate_registry_tables.py --xml=external/spirv-headers/include/spirv/spir-v.xml --generator-output=source/generators.inc +python3 utils/update_build_version.py ./CHANGES source/build-version.inc + diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/instrument.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/instrument.hpp index a19491fd3..0a6e6306e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/instrument.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/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 // @@ -64,196 +73,14 @@ static const int kInstCommonOutShaderId = 1; // which generated the validation error. static const int kInstCommonOutInstructionIdx = 2; -// This is the stage which generated the validation error. This word is used -// to determine the contents of the next two words in the record. -// 0:Vert, 1:TessCtrl, 2:TessEval, 3:Geom, 4:Frag, 5:Compute -static const int kInstCommonOutStageIdx = 3; -static const int kInstCommonOutCnt = 4; - -// Stage-specific Stream Record Offsets -// -// Each stage will contain different values in the next set of words of the -// record used to identify which instantiation of the shader generated the -// validation error. -// -// Vertex Shader Output Record Offsets -static const int kInstVertOutVertexIndex = kInstCommonOutCnt; -static const int kInstVertOutInstanceIndex = kInstCommonOutCnt + 1; -static const int kInstVertOutUnused = kInstCommonOutCnt + 2; - -// Frag Shader Output Record Offsets -static const int kInstFragOutFragCoordX = kInstCommonOutCnt; -static const int kInstFragOutFragCoordY = kInstCommonOutCnt + 1; -static const int kInstFragOutUnused = kInstCommonOutCnt + 2; - -// Compute Shader Output Record Offsets -static const int kInstCompOutGlobalInvocationIdX = kInstCommonOutCnt; -static const int kInstCompOutGlobalInvocationIdY = kInstCommonOutCnt + 1; -static const int kInstCompOutGlobalInvocationIdZ = kInstCommonOutCnt + 2; - -// Tessellation Control Shader Output Record Offsets -static const int kInstTessCtlOutInvocationId = kInstCommonOutCnt; -static const int kInstTessCtlOutPrimitiveId = kInstCommonOutCnt + 1; -static const int kInstTessCtlOutUnused = kInstCommonOutCnt + 2; - -// Tessellation Eval Shader Output Record Offsets -static const int kInstTessEvalOutPrimitiveId = kInstCommonOutCnt; -static const int kInstTessEvalOutTessCoordU = kInstCommonOutCnt + 1; -static const int kInstTessEvalOutTessCoordV = kInstCommonOutCnt + 2; - -// Geometry Shader Output Record Offsets -static const int kInstGeomOutPrimitiveId = kInstCommonOutCnt; -static const int kInstGeomOutInvocationId = kInstCommonOutCnt + 1; -static const int kInstGeomOutUnused = kInstCommonOutCnt + 2; - -// Ray Tracing Shader Output Record Offsets -static const int kInstRayTracingOutLaunchIdX = kInstCommonOutCnt; -static const int kInstRayTracingOutLaunchIdY = kInstCommonOutCnt + 1; -static const int kInstRayTracingOutLaunchIdZ = kInstCommonOutCnt + 2; - -// Mesh Shader Output Record Offsets -static const int kInstMeshOutGlobalInvocationIdX = kInstCommonOutCnt; -static const int kInstMeshOutGlobalInvocationIdY = kInstCommonOutCnt + 1; -static const int kInstMeshOutGlobalInvocationIdZ = kInstCommonOutCnt + 2; - -// Task Shader Output Record Offsets -static const int kInstTaskOutGlobalInvocationIdX = kInstCommonOutCnt; -static const int kInstTaskOutGlobalInvocationIdY = kInstCommonOutCnt + 1; -static const int kInstTaskOutGlobalInvocationIdZ = kInstCommonOutCnt + 2; - -// Size of Common and Stage-specific Members -static const int kInstStageOutCnt = kInstCommonOutCnt + 3; - -// Validation Error Code Offset -// -// This identifies the validation error. It also helps to identify -// how many words follow in the record and their meaning. -static const int kInstValidationOutError = kInstStageOutCnt; - -// Validation-specific Output Record Offsets -// -// Each different validation will generate a potentially different -// number of words at the end of the record giving more specifics -// 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 kInstBindlessBoundsOutUnused = kInstStageOutCnt + 3; -static const int kInstBindlessBoundsOutCnt = kInstStageOutCnt + 4; - -// A descriptor uninitialized error will output the index. -static const int kInstBindlessUninitOutDescIndex = kInstStageOutCnt + 1; -static const int kInstBindlessUninitOutUnused = kInstStageOutCnt + 2; -static const int kInstBindlessUninitOutUnused2 = kInstStageOutCnt + 3; -static const int kInstBindlessUninitOutCnt = kInstStageOutCnt + 4; - -// A buffer out-of-bounds error will output the descriptor -// index, the buffer offset and the buffer size -static const int kInstBindlessBuffOOBOutDescIndex = kInstStageOutCnt + 1; -static const int kInstBindlessBuffOOBOutBuffOff = kInstStageOutCnt + 2; -static const int kInstBindlessBuffOOBOutBuffSize = kInstStageOutCnt + 3; -static const int kInstBindlessBuffOOBOutCnt = kInstStageOutCnt + 4; - -// A buffer address unalloc error will output the 64-bit pointer in -// two 32-bit pieces, lower bits first. -static const int kInstBuffAddrUnallocOutDescPtrLo = kInstStageOutCnt + 1; -static const int kInstBuffAddrUnallocOutDescPtrHi = kInstStageOutCnt + 2; -static const int kInstBuffAddrUnallocOutCnt = kInstStageOutCnt + 3; - -// Maximum Output Record Member Count -static const int kInstMaxOutCnt = kInstStageOutCnt + 4; - -// Validation Error Codes -// -// These are the possible validation error codes. -static const int kInstErrorBindlessBounds = 0; -static const int kInstErrorBindlessUninit = 1; -static const int kInstErrorBuffAddrUnallocRef = 2; -// Deleted: static const int kInstErrorBindlessBuffOOB = 3; -// This comment will will remain for 2 releases to allow -// for the transition of all builds. Buffer OOB is -// generating the following four differentiated codes instead: -static const int kInstErrorBuffOOBUniform = 4; -static const int kInstErrorBuffOOBStorage = 5; -static const int kInstErrorBuffOOBUniformTexel = 6; -static const int kInstErrorBuffOOBStorageTexel = 7; -static const int kInstErrorMax = kInstErrorBuffOOBStorageTexel; - -// Direct Input Buffer Offsets -// -// The following values provide member offsets into the input buffers -// consumed by InstrumentPass::GenDebugDirectRead(). This method is utilized -// by InstBindlessCheckPass. -// -// The only object in an input buffer is a runtime array of unsigned -// integers. Each validation will have its own formatting of this array. -static const int kDebugInputDataOffset = 0; - // Debug Buffer Bindings // // These are the bindings for the different buffers which are // read or written by the instrumentation passes. // -// This is the output buffer written by InstBindlessCheckPass, -// InstBuffAddrCheckPass, and possibly other future validations. -static const int kDebugOutputBindingStream = 0; - -// The binding for the input buffer read by InstBindlessCheckPass. -static const int kDebugInputBindingBindless = 1; - -// The binding for the input buffer read by InstBuffAddrCheckPass. -static const int kDebugInputBindingBuffAddr = 2; - // This is the output buffer written by InstDebugPrintfPass. static const int kDebugOutputPrintfStream = 3; -// Bindless Validation Input Buffer Format -// -// 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 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; if the value is -// non-zero, and the descriptor points to a buffer, the value is the length of -// the buffer in bytes and can be used to check for out-of-bounds buffer -// references: -// Data[ i + Data[ b + Data[ s + Data[ kDebugInputBindlessInitOffset ] ] ] ] -static const int kDebugInputBindlessInitOffset = 0; - -// 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; - -// Buffer Device Address Input Buffer Format -// -// An input buffer for buffer device address validation consists of a single -// array of unsigned 64-bit integers we will call Data[]. This array is -// formatted as follows: -// -// At offset kDebugInputBuffAddrPtrOffset is a list of sorted valid buffer -// addresses. The list is terminated with the address 0xffffffffffffffff. -// If 0x0 is not a valid buffer address, this address is inserted at the -// start of the list. -// -static const int kDebugInputBuffAddrPtrOffset = 1; -// -// At offset kDebugInputBuffAddrLengthOffset in Data[] is a single uint64 which -// gives an offset to the start of the buffer length data. More -// specifically, for a buffer whose pointer is located at input buffer offset -// i, the length is located at: -// -// Data[ i - kDebugInputBuffAddrPtrOffset -// + Data[ kDebugInputBuffAddrLengthOffset ] ] -// -// The length associated with the 0xffffffffffffffff address is zero. If -// not a valid buffer, the length associated with the 0x0 address is zero. -static const int kDebugInputBuffAddrLengthOffset = 0; - } // namespace spvtools #endif // INCLUDE_SPIRV_TOOLS_INSTRUMENT_HPP_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.h b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.h index 53dde9506..83b1a8e9b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.h @@ -33,15 +33,19 @@ extern "C" { #else #define SPIRV_TOOLS_EXPORT __declspec(dllimport) #endif +#define SPIRV_TOOLS_LOCAL #else #if defined(SPIRV_TOOLS_IMPLEMENTATION) #define SPIRV_TOOLS_EXPORT __attribute__((visibility("default"))) +#define SPIRV_TOOLS_LOCAL __attribute__((visibility("hidden"))) #else #define SPIRV_TOOLS_EXPORT +#define SPIRV_TOOLS_LOCAL #endif #endif #else #define SPIRV_TOOLS_EXPORT +#define SPIRV_TOOLS_LOCAL #endif // Helpers @@ -143,6 +147,7 @@ typedef enum spv_operand_type_t { // may be larger than 32, which would require such a typed literal value to // occupy multiple SPIR-V words. SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, + SPV_OPERAND_TYPE_LITERAL_FLOAT, // Always 32-bit float. // Set 3: The literal string operand type. SPV_OPERAND_TYPE_LITERAL_STRING, @@ -285,6 +290,28 @@ typedef enum spv_operand_type_t { // An optional packed vector format SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT, + // Concrete operand types for cooperative matrix. + SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS, + // An optional cooperative matrix operands + SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS, + SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_LAYOUT, + SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_USE, + + // Enum type from SPV_INTEL_global_variable_fpga_decorations + SPV_OPERAND_TYPE_INITIALIZATION_MODE_QUALIFIER, + // Enum type from SPV_INTEL_global_variable_host_access + SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER, + // Enum type from SPV_INTEL_cache_controls + SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL, + // Enum type from SPV_INTEL_cache_controls + SPV_OPERAND_TYPE_STORE_CACHE_CONTROL, + // Enum type from SPV_INTEL_maximum_registers + SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS, + // Enum type from SPV_NV_raw_access_chains + SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS, + // Optional enum type from SPV_NV_raw_access_chains + SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS, + // This is a sentinel value, and does not represent an operand type. // It should come last. SPV_OPERAND_TYPE_NUM_OPERAND_TYPES, @@ -310,6 +337,7 @@ typedef enum spv_ext_inst_type_t { SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100, SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION, SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100, + SPV_EXT_INST_TYPE_NONSEMANTIC_VKSPREFLECTION, // Multiple distinct extended instruction set types could return this // value, if they are prefixed with NonSemantic. and are otherwise @@ -402,6 +430,19 @@ typedef struct spv_parsed_instruction_t { uint16_t num_operands; } spv_parsed_instruction_t; +typedef struct spv_parsed_header_t { + // The magic number of the SPIR-V module. + uint32_t magic; + // Version number. + uint32_t version; + // Generator's magic number. + uint32_t generator; + // IDs bound for this module (0 < id < bound). + uint32_t bound; + // reserved. + uint32_t reserved; +} spv_parsed_header_t; + typedef struct spv_const_binary_t { const uint32_t* code; const size_t wordCount; @@ -441,6 +482,8 @@ typedef struct spv_reducer_options_t spv_reducer_options_t; typedef struct spv_fuzzer_options_t spv_fuzzer_options_t; +typedef struct spv_optimizer_t spv_optimizer_t; + // Type Definitions typedef spv_const_binary_t* spv_const_binary; @@ -560,7 +603,7 @@ SPIRV_TOOLS_EXPORT bool spvParseVulkanEnv(uint32_t vulkan_ver, // Creates a context object for most of the SPIRV-Tools API. // Returns null if env is invalid. // -// See specific API calls for how the target environment is interpeted +// See specific API calls for how the target environment is interpreted // (particularly assembly and validation). SPIRV_TOOLS_EXPORT spv_context spvContextCreate(spv_target_env env); @@ -612,7 +655,7 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetRelaxLogicalPointer( // set that option. // 2) Pointers that are pass as parameters to function calls do not have to // match the storage class of the formal parameter. -// 3) Pointers that are actaul parameters on function calls do not have to point +// 3) Pointers that are actual parameters on function calls do not have to point // to the same type pointed as the formal parameter. The types just need to // logically match. // 4) GLSLstd450 Interpolate* instructions can have a load of an interpolant @@ -638,7 +681,7 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetUniformBufferStandardLayout( // Records whether the validator should use "scalar" block layout rules. // Scalar layout rules are more permissive than relaxed block layout. // -// See Vulkan extnesion VK_EXT_scalar_block_layout. The scalar alignment is +// See Vulkan extension VK_EXT_scalar_block_layout. The scalar alignment is // defined as follows: // - scalar alignment of a scalar is the scalar size // - scalar alignment of a vector is the scalar alignment of its component @@ -670,6 +713,10 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetSkipBlockLayout( SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetAllowLocalSizeId( spv_validator_options options, bool val); +// Whether friendly names should be used in validation error messages. +SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetFriendlyNames( + spv_validator_options options, bool val); + // Creates an optimizer options object with default options. Returns a valid // options object. The object remains valid until it is passed into // |spvOptimizerOptionsDestroy|. @@ -896,6 +943,70 @@ SPIRV_TOOLS_EXPORT spv_result_t spvBinaryParse( const size_t num_words, spv_parsed_header_fn_t parse_header, spv_parsed_instruction_fn_t parse_instruction, spv_diagnostic* diagnostic); +// The optimizer interface. + +// A pointer to a function that accepts a log message from an optimizer. +typedef void (*spv_message_consumer)( + spv_message_level_t, const char*, const spv_position_t*, const char*); + +// Creates and returns an optimizer object. This object must be passed to +// optimizer APIs below and is valid until passed to spvOptimizerDestroy. +SPIRV_TOOLS_EXPORT spv_optimizer_t* spvOptimizerCreate(spv_target_env env); + +// Destroys the given optimizer object. +SPIRV_TOOLS_EXPORT void spvOptimizerDestroy(spv_optimizer_t* optimizer); + +// Sets an spv_message_consumer on an optimizer object. +SPIRV_TOOLS_EXPORT void spvOptimizerSetMessageConsumer( + spv_optimizer_t* optimizer, spv_message_consumer consumer); + +// Registers passes that attempt to legalize the generated code. +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterLegalizationPasses( + spv_optimizer_t* optimizer); + +// Registers passes that attempt to improve performance of generated code. +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterPerformancePasses( + spv_optimizer_t* optimizer); + +// Registers passes that attempt to improve the size of generated code. +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterSizePasses( + spv_optimizer_t* optimizer); + +// Registers a pass specified by a flag in an optimizer object. +SPIRV_TOOLS_EXPORT bool spvOptimizerRegisterPassFromFlag( + spv_optimizer_t* optimizer, const char* flag); + +// Registers passes specified by length number of flags in an optimizer object. +// Passes may remove interface variables that are unused. +SPIRV_TOOLS_EXPORT bool spvOptimizerRegisterPassesFromFlags( + spv_optimizer_t* optimizer, const char** flags, const size_t flag_count); + +// Registers passes specified by length number of flags in an optimizer object. +// Passes will not remove interface variables. +SPIRV_TOOLS_EXPORT bool +spvOptimizerRegisterPassesFromFlagsWhilePreservingTheInterface( + spv_optimizer_t* optimizer, const char** flags, const size_t flag_count); + +// Optimizes the SPIR-V code of size |word_count| pointed to by |binary| and +// returns an optimized spv_binary in |optimized_binary|. +// +// Returns SPV_SUCCESS on successful optimization, whether or not the module is +// modified. Returns an SPV_ERROR_* if the module fails to validate or if +// errors occur when processing using any of the registered passes. In that +// case, no further passes are executed and the |optimized_binary| contents may +// be invalid. +// +// By default, the binary is validated before any transforms are performed, +// and optionally after each transform. Validation uses SPIR-V spec rules +// for the SPIR-V version named in the binary's header (at word offset 1). +// Additionally, if the target environment is a client API (such as +// Vulkan 1.1), then validate for that client API version, to the extent +// that it is verifiable from data in the binary itself, or from the +// validator options set on the optimizer options. +SPIRV_TOOLS_EXPORT spv_result_t spvOptimizerRun( + spv_optimizer_t* optimizer, const uint32_t* binary, const size_t word_count, + spv_binary* optimized_binary, const spv_optimizer_options options); + #ifdef __cplusplus } #endif diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.hpp index 8dfb46b77..59ff82b17 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/libspirv.hpp @@ -31,12 +31,17 @@ using MessageConsumer = std::function; +using HeaderParser = std::function; +using InstructionParser = + std::function; + // C++ RAII wrapper around the C context object spv_context. -class Context { +class SPIRV_TOOLS_EXPORT Context { public: // Constructs a context targeting the given environment |env|. // - // See specific API calls for how the target environment is interpeted + // See specific API calls for how the target environment is interpreted // (particularly assembly and validation). // // The constructed instance will have an empty message consumer, which just @@ -68,7 +73,7 @@ class Context { }; // A RAII wrapper around a validator options object. -class ValidatorOptions { +class SPIRV_TOOLS_EXPORT ValidatorOptions { public: ValidatorOptions() : options_(spvValidatorOptionsCreate()) {} ~ValidatorOptions() { spvValidatorOptionsDestroy(options_); } @@ -139,7 +144,7 @@ class ValidatorOptions { // set that option. // 2) Pointers that are pass as parameters to function calls do not have to // match the storage class of the formal parameter. - // 3) Pointers that are actaul parameters on function calls do not have to + // 3) Pointers that are actual parameters on function calls do not have to // point to the same type pointed as the formal parameter. The types just // need to logically match. // 4) GLSLstd450 Interpolate* instructions can have a load of an interpolant @@ -148,12 +153,17 @@ class ValidatorOptions { spvValidatorOptionsSetBeforeHlslLegalization(options_, val); } + // Whether friendly names should be used in validation error messages. + void SetFriendlyNames(bool val) { + spvValidatorOptionsSetFriendlyNames(options_, val); + } + private: spv_validator_options options_; }; // A C++ wrapper around an optimization options object. -class OptimizerOptions { +class SPIRV_TOOLS_EXPORT OptimizerOptions { public: OptimizerOptions() : options_(spvOptimizerOptionsCreate()) {} ~OptimizerOptions() { spvOptimizerOptionsDestroy(options_); } @@ -195,7 +205,7 @@ class OptimizerOptions { }; // A C++ wrapper around a reducer options object. -class ReducerOptions { +class SPIRV_TOOLS_EXPORT ReducerOptions { public: ReducerOptions() : options_(spvReducerOptionsCreate()) {} ~ReducerOptions() { spvReducerOptionsDestroy(options_); } @@ -226,7 +236,7 @@ class ReducerOptions { }; // A C++ wrapper around a fuzzer options object. -class FuzzerOptions { +class SPIRV_TOOLS_EXPORT FuzzerOptions { public: FuzzerOptions() : options_(spvFuzzerOptionsCreate()) {} ~FuzzerOptions() { spvFuzzerOptionsDestroy(options_); } @@ -273,7 +283,7 @@ class FuzzerOptions { // provides methods for assembling, disassembling, and validating. // // Instances of this class provide basic thread-safety guarantee. -class SpirvTools { +class SPIRV_TOOLS_EXPORT SpirvTools { public: enum { // Default assembling option used by assemble(): @@ -331,6 +341,23 @@ class SpirvTools { std::string* text, uint32_t options = kDefaultDisassembleOption) const; + // Parses a SPIR-V binary, specified as counted sequence of 32-bit words. + // Parsing feedback is provided via two callbacks provided as std::function. + // In a valid parse the parsed-header callback is called once, and + // then the parsed-instruction callback is called once for each instruction + // in the stream. + // Returns true on successful parsing. + // If diagnostic is non-null, a diagnostic is emitted on failed parsing. + // If diagnostic is null the context's message consumer + // will be used to emit any errors. If a callback returns anything other than + // SPV_SUCCESS, then that status code is returned, no further callbacks are + // issued, and no additional diagnostics are emitted. + // This is a wrapper around the C API spvBinaryParse. + bool Parse(const std::vector& binary, + const HeaderParser& header_parser, + const InstructionParser& instruction_parser, + spv_diagnostic* diagnostic = nullptr); + // Validates the given SPIR-V |binary|. Returns true if no issues are found. // Otherwise, returns false and communicates issues via the message consumer // registered. @@ -361,7 +388,8 @@ class SpirvTools { bool IsValid() const; private: - struct Impl; // Opaque struct for holding the data fields used by this class. + struct SPIRV_TOOLS_LOCAL + Impl; // Opaque struct for holding the data fields used by this class. std::unique_ptr impl_; // Unique pointer to implementation data. }; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linker.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linker.hpp index d2f3e72ca..6ba6e9654 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linker.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linker.hpp @@ -24,13 +24,8 @@ namespace spvtools { -class LinkerOptions { +class SPIRV_TOOLS_EXPORT LinkerOptions { public: - LinkerOptions() - : create_library_(false), - verify_ids_(false), - allow_partial_linkage_(false) {} - // Returns whether a library or an executable should be produced by the // linking phase. // @@ -63,10 +58,16 @@ class LinkerOptions { allow_partial_linkage_ = allow_partial_linkage; } + bool GetUseHighestVersion() const { return use_highest_version_; } + void SetUseHighestVersion(bool use_highest_vers) { + use_highest_version_ = use_highest_vers; + } + private: - bool create_library_; - bool verify_ids_; - bool allow_partial_linkage_; + bool create_library_{false}; + bool verify_ids_{false}; + bool allow_partial_linkage_{false}; + bool use_highest_version_{false}; }; // Links one or more SPIR-V modules into a new SPIR-V module. That is, combine @@ -83,14 +84,15 @@ class LinkerOptions { // * Some entry points were defined multiple times; // * Some imported symbols did not have an exported counterpart; // * Possibly other reasons. -spv_result_t Link(const Context& context, - const std::vector>& binaries, - std::vector* linked_binary, - const LinkerOptions& options = LinkerOptions()); -spv_result_t Link(const Context& context, const uint32_t* const* binaries, - const size_t* binary_sizes, size_t num_binaries, - std::vector* linked_binary, - const LinkerOptions& options = LinkerOptions()); +SPIRV_TOOLS_EXPORT spv_result_t +Link(const Context& context, const std::vector>& binaries, + std::vector* linked_binary, + const LinkerOptions& options = LinkerOptions()); +SPIRV_TOOLS_EXPORT spv_result_t +Link(const Context& context, const uint32_t* const* binaries, + const size_t* binary_sizes, size_t num_binaries, + std::vector* linked_binary, + const LinkerOptions& options = LinkerOptions()); } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linter.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linter.hpp index 52ed5a467..ccbcf0c17 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linter.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/linter.hpp @@ -24,7 +24,7 @@ namespace spvtools { // provides a method for linting. // // Instances of this class provides basic thread-safety guarantee. -class Linter { +class SPIRV_TOOLS_EXPORT Linter { public: explicit Linter(spv_target_env env); @@ -40,7 +40,7 @@ class Linter { bool Run(const uint32_t* binary, size_t binary_size); private: - struct Impl; + struct SPIRV_TOOLS_LOCAL Impl; std::unique_ptr impl_; }; } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/optimizer.hpp b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/optimizer.hpp index 3e63037c5..a3119d9b4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/optimizer.hpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/include/spirv-tools/optimizer.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -36,14 +37,14 @@ struct DescriptorSetAndBinding; // provides methods for registering optimization passes and optimizing. // // Instances of this class provides basic thread-safety guarantee. -class Optimizer { +class SPIRV_TOOLS_EXPORT Optimizer { public: // The token for an optimization pass. It is returned via one of the // Create*Pass() standalone functions at the end of this header file and // consumed by the RegisterPass() method. Tokens are one-time objects that // only support move; copying is not allowed. struct PassToken { - struct Impl; // Opaque struct for holding inernal data. + struct SPIRV_TOOLS_LOCAL Impl; // Opaque struct for holding internal data. PassToken(std::unique_ptr); @@ -96,12 +97,20 @@ class Optimizer { // Registers passes that attempt to improve performance of generated code. // This sequence of passes is subject to constant review and will change // from time to time. + // + // If |preserve_interface| is true, all non-io variables in the entry point + // interface are considered live and are not eliminated. Optimizer& RegisterPerformancePasses(); + Optimizer& RegisterPerformancePasses(bool preserve_interface); // Registers passes that attempt to improve the size of generated code. // This sequence of passes is subject to constant review and will change // from time to time. + // + // If |preserve_interface| is true, all non-io variables in the entry point + // interface are considered live and are not eliminated. Optimizer& RegisterSizePasses(); + Optimizer& RegisterSizePasses(bool preserve_interface); // Registers passes that attempt to legalize the generated code. // @@ -111,7 +120,11 @@ class Optimizer { // // This sequence of passes is subject to constant review and will change // from time to time. + // + // If |preserve_interface| is true, all non-io variables in the entry point + // interface are considered live and are not eliminated. Optimizer& RegisterLegalizationPasses(); + Optimizer& RegisterLegalizationPasses(bool preserve_interface); // Register passes specified in the list of |flags|. Each flag must be a // string of a form accepted by Optimizer::FlagHasValidForm(). @@ -120,8 +133,13 @@ class Optimizer { // error message is emitted to the MessageConsumer object (use // Optimizer::SetMessageConsumer to define a message consumer, if needed). // + // If |preserve_interface| is true, all non-io variables in the entry point + // interface are considered live and are not eliminated. + // // If all the passes are registered successfully, it returns true. bool RegisterPassesFromFlags(const std::vector& flags); + bool RegisterPassesFromFlags(const std::vector& flags, + bool preserve_interface); // Registers the optimization pass associated with |flag|. This only accepts // |flag| values of the form "--pass_name[=pass_args]". If no such pass @@ -138,7 +156,11 @@ class Optimizer { // // --legalize-hlsl: Registers all passes that legalize SPIR-V generated by an // HLSL front-end. + // + // If |preserve_interface| is true, all non-io variables in the entry point + // interface are considered live and are not eliminated. bool RegisterPassFromFlag(const std::string& flag); + bool RegisterPassFromFlag(const std::string& flag, bool preserve_interface); // Validates that |flag| has a valid format. Strings accepted: // @@ -217,7 +239,7 @@ class Optimizer { Optimizer& SetValidateAfterAll(bool validate); private: - struct Impl; // Opaque struct for holding internal data. + struct SPIRV_TOOLS_LOCAL Impl; // Opaque struct for holding internal data. std::unique_ptr impl_; // Unique pointer to internal data. }; @@ -227,7 +249,7 @@ Optimizer::PassToken CreateNullPass(); // Creates a strip-debug-info pass. // A strip-debug-info pass removes all debug instructions (as documented in -// Section 3.32.2 of the SPIR-V spec) of the SPIR-V module to be optimized. +// Section 3.42.2 of the SPIR-V spec) of the SPIR-V module to be optimized. Optimizer::PassToken CreateStripDebugInfoPass(); // [Deprecated] This will create a strip-nonsemantic-info pass. See below. @@ -296,11 +318,11 @@ Optimizer::PassToken CreateFreezeSpecConstantValuePass(); // and can be changed in future. A spec constant is foldable if all of its // value(s) can be determined from the module. E.g., an integer spec constant // defined with OpSpecConstantOp instruction can be folded if its value won't -// change later. This pass will replace the original OpSpecContantOp instruction -// with an OpConstant instruction. When folding composite spec constants, -// new instructions may be inserted to define the components of the composite -// constant first, then the original spec constants will be replaced by -// OpConstantComposite instructions. +// change later. This pass will replace the original OpSpecConstantOp +// instruction with an OpConstant instruction. When folding composite spec +// constants, new instructions may be inserted to define the components of the +// composite constant first, then the original spec constants will be replaced +// by OpConstantComposite instructions. // // There are some operations not supported yet: // OpSConvert, OpFConvert, OpQuantizeToF16 and @@ -326,7 +348,7 @@ Optimizer::PassToken CreateUnifyConstantPass(); // Creates a eliminate-dead-constant pass. // A eliminate-dead-constant pass removes dead constants, including normal -// contants defined by OpConstant, OpConstantComposite, OpConstantTrue, or +// constants defined by OpConstant, OpConstantComposite, OpConstantTrue, or // OpConstantFalse and spec constants defined by OpSpecConstant, // OpSpecConstantComposite, OpSpecConstantTrue, OpSpecConstantFalse or // OpSpecConstantOp. @@ -390,7 +412,7 @@ Optimizer::PassToken CreateInlineOpaquePass(); // Only modules with relaxed logical addressing (see opt/instruction.h) are // currently processed. // -// This pass is most effective if preceeded by Inlining and +// This pass is most effective if preceded by Inlining and // LocalAccessChainConvert. This pass will reduce the work needed to be done // by LocalSingleStoreElim and LocalMultiStoreElim. // @@ -408,7 +430,7 @@ Optimizer::PassToken CreateLocalSingleBlockLoadStoreElimPass(); // Note that some branches and blocks may be left to avoid creating invalid // control flow. Improving this is left to future work. // -// This pass is most effective when preceeded by passes which eliminate +// This pass is most effective when preceded by passes which eliminate // local loads and stores, effectively propagating constant values where // possible. Optimizer::PassToken CreateDeadBranchElimPass(); @@ -425,7 +447,7 @@ Optimizer::PassToken CreateDeadBranchElimPass(); // are currently processed. Currently modules with any extensions enabled are // not processed. This is left for future work. // -// This pass is most effective if preceeded by Inlining and +// This pass is most effective if preceded by Inlining and // LocalAccessChainConvert. LocalSingleStoreElim and LocalSingleBlockElim // will reduce the work that this pass has to do. Optimizer::PassToken CreateLocalMultiStoreElimPass(); @@ -520,8 +542,14 @@ Optimizer::PassToken CreateDeadInsertElimPass(); // interface are considered live and are not eliminated. This mode is needed // by GPU-Assisted validation instrumentation, where a change in the interface // is not allowed. +// +// If |remove_outputs| is true, allow outputs to be removed from the interface. +// This is only safe if the caller knows that there is no corresponding input +// variable in the following shader. It is false by default. Optimizer::PassToken CreateAggressiveDCEPass(); Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface); +Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface, + bool remove_outputs); // Creates a remove-unused-interface-variables pass. // Removes variables referenced on the |OpEntryPoint| instruction that are not @@ -630,7 +658,7 @@ Optimizer::PassToken CreateRedundancyEliminationPass(); Optimizer::PassToken CreateScalarReplacementPass(uint32_t size_limit = 100); // Create a private to local pass. -// This pass looks for variables delcared in the private storage class that are +// This pass looks for variables declared in the private storage class that are // used in only one function. Those variables are moved to the function storage // class in the function that they are used. Optimizer::PassToken CreatePrivateToLocalPass(); @@ -741,19 +769,9 @@ Optimizer::PassToken CreateCombineAccessChainsPass(); // potentially de-optimizing the instrument code, for example, inlining // the debug record output function throughout the module. // -// The instrumentation will read and write buffers in debug -// descriptor set |desc_set|. It will write |shader_id| in each output record +// The instrumentation will write |shader_id| in each output record // to identify the shader module which generated the record. -// |desc_length_enable| controls instrumentation of runtime descriptor array -// references, |desc_init_enable| controls instrumentation of descriptor -// initialization checking, and |buff_oob_enable| controls instrumentation -// of storage and uniform buffer bounds checking, all of which require input -// buffer support. |texbuff_oob_enable| controls instrumentation of texel -// buffers, which does not require input buffer support. -Optimizer::PassToken CreateInstBindlessCheckPass( - uint32_t desc_set, uint32_t shader_id, bool desc_length_enable = false, - bool desc_init_enable = false, bool buff_oob_enable = false, - bool texbuff_oob_enable = false); +Optimizer::PassToken CreateInstBindlessCheckPass(uint32_t shader_id); // Create a pass to instrument physical buffer address checking // This pass instruments all physical buffer address references to check that @@ -774,8 +792,7 @@ Optimizer::PassToken CreateInstBindlessCheckPass( // The instrumentation will read and write buffers in debug // descriptor set |desc_set|. It will write |shader_id| in each output record // to identify the shader module which generated the record. -Optimizer::PassToken CreateInstBuffAddrCheckPass(uint32_t desc_set, - uint32_t shader_id); +Optimizer::PassToken CreateInstBuffAddrCheckPass(uint32_t shader_id); // Create a pass to instrument OpDebugPrintf instructions. // This pass replaces all OpDebugPrintf instructions with instructions to write @@ -886,6 +903,60 @@ Optimizer::PassToken CreateAmdExtToKhrPass(); // propagated into their final positions. Optimizer::PassToken CreateInterpolateFixupPass(); +// Removes unused components from composite input variables. Current +// implementation just removes trailing unused components from input arrays +// and structs. The pass performs best after maximizing dead code removal. +// A subsequent dead code elimination pass would be beneficial in removing +// newly unused component types. +// +// WARNING: This pass can only be safely applied standalone to vertex shaders +// as it can otherwise cause interface incompatibilities with the preceding +// shader in the pipeline. If applied to non-vertex shaders, the user should +// follow by applying EliminateDeadOutputStores and +// EliminateDeadOutputComponents to the preceding shader. +Optimizer::PassToken CreateEliminateDeadInputComponentsPass(); + +// Removes unused components from composite output variables. Current +// implementation just removes trailing unused components from output arrays +// and structs. The pass performs best after eliminating dead output stores. +// A subsequent dead code elimination pass would be beneficial in removing +// newly unused component types. Currently only supports vertex and fragment +// shaders. +// +// WARNING: This pass cannot be safely applied standalone as it can cause +// interface incompatibility with the following shader in the pipeline. The +// user should first apply EliminateDeadInputComponents to the following +// shader, then apply EliminateDeadOutputStores to this shader. +Optimizer::PassToken CreateEliminateDeadOutputComponentsPass(); + +// Removes unused components from composite input variables. This safe +// version will not cause interface incompatibilities since it only changes +// vertex shaders. The current implementation just removes trailing unused +// components from input structs and input arrays. The pass performs best +// after maximizing dead code removal. A subsequent dead code elimination +// pass would be beneficial in removing newly unused component types. +Optimizer::PassToken CreateEliminateDeadInputComponentsSafePass(); + +// Analyzes shader and populates |live_locs| and |live_builtins|. Best results +// will be obtained if shader has all dead code eliminated first. |live_locs| +// and |live_builtins| are subsequently used when calling +// CreateEliminateDeadOutputStoresPass on the preceding shader. Currently only +// supports tesc, tese, geom, and frag shaders. +Optimizer::PassToken CreateAnalyzeLiveInputPass( + std::unordered_set* live_locs, + std::unordered_set* live_builtins); + +// Removes stores to output locations not listed in |live_locs| or +// |live_builtins|. Best results are obtained if constant propagation is +// performed first. A subsequent call to ADCE will eliminate any dead code +// created by the removal of the stores. A subsequent call to +// CreateEliminateDeadOutputComponentsPass will eliminate any dead output +// components created by the elimination of the stores. Currently only supports +// vert, tesc, tese, and geom shaders. +Optimizer::PassToken CreateEliminateDeadOutputStoresPass( + std::unordered_set* live_locs, + std::unordered_set* live_builtins); + // Creates a convert-to-sampled-image pass to convert images and/or // samplers with given pairs of descriptor set and binding to sampled image. // If a pair of an image and a sampler have the same pair of descriptor set and @@ -896,6 +967,46 @@ Optimizer::PassToken CreateConvertToSampledImagePass( const std::vector& descriptor_set_binding_pairs); +// Create an interface-variable-scalar-replacement pass that replaces array or +// matrix interface variables with a series of scalar or vector interface +// variables. For example, it replaces `float3 foo[2]` with `float3 foo0, foo1`. +Optimizer::PassToken CreateInterfaceVariableScalarReplacementPass(); + +// Creates a remove-dont-inline pass to remove the |DontInline| function control +// from every function in the module. This is useful if you want the inliner to +// inline these functions some reason. +Optimizer::PassToken CreateRemoveDontInlinePass(); +// Create a fix-func-call-param pass to fix non memory argument for the function +// call, as spirv-validation requires function parameters to be an memory +// object, currently the pass would remove accesschain pointer argument passed +// to the function +Optimizer::PassToken CreateFixFuncCallArgumentsPass(); + +// Creates a trim-capabilities pass. +// This pass removes unused capabilities for a given module, and if possible, +// associated extensions. +// See `trim_capabilities.h` for the list of supported capabilities. +// +// If the module contains unsupported capabilities, this pass will ignore them. +// This should be fine in most cases, but could yield to incorrect results if +// the unknown capability interacts with one of the trimmed capabilities. +Optimizer::PassToken CreateTrimCapabilitiesPass(); + +// Creates a switch-descriptorset pass. +// This pass changes any DescriptorSet decorations with the value |ds_from| to +// use the new value |ds_to|. +Optimizer::PassToken CreateSwitchDescriptorSetPass(uint32_t ds_from, + uint32_t ds_to); + +// Creates an invocation interlock placement pass. +// This pass ensures that an entry point will have at most one +// OpBeginInterlockInvocationEXT and one OpEndInterlockInvocationEXT, in that +// order. +Optimizer::PassToken CreateInvocationInterlockPlacementPass(); + +// Creates a pass to add/remove maximal reconvergence execution mode. +// This pass either adds or removes maximal reconvergence from all entry points. +Optimizer::PassToken CreateModifyMaximalReconvergencePass(bool add); } // namespace spvtools #endif // INCLUDE_SPIRV_TOOLS_OPTIMIZER_HPP_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/jamfile b/prog/3rdPartyLibs/vulkan/spirv-tools/jamfile index 302ddf3b1..827256d6b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/jamfile +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/jamfile @@ -32,6 +32,7 @@ Sources = source/opcode.cpp source/operand.cpp source/opt/aggressive_dead_code_elim_pass.cpp + source/opt/analyze_live_input_pass.cpp source/opt/amd_ext_to_khr.cpp source/opt/basic_block.cpp source/opt/block_merge_pass.cpp @@ -64,8 +65,11 @@ Sources = source/opt/eliminate_dead_constant_pass.cpp source/opt/eliminate_dead_functions_pass.cpp source/opt/eliminate_dead_functions_util.cpp + source/opt/eliminate_dead_io_components_pass.cpp source/opt/eliminate_dead_members_pass.cpp + source/opt/eliminate_dead_output_stores_pass.cpp source/opt/feature_manager.cpp + source/opt/fix_func_call_arguments.cpp source/opt/fix_storage_class.cpp source/opt/flatten_decoration_pass.cpp source/opt/fold.cpp @@ -81,13 +85,16 @@ Sources = source/opt/instruction.cpp source/opt/instruction_list.cpp source/opt/instrument_pass.cpp + source/opt/interface_var_sroa.cpp source/opt/inst_bindless_check_pass.cpp source/opt/inst_buff_addr_check_pass.cpp source/opt/inst_debug_printf_pass.cpp source/opt/interp_fixup_pass.cpp + source/opt/invocation_interlock_placement_pass.cpp source/opt/ir_context.cpp source/opt/ir_loader.cpp source/opt/licm_pass.cpp + source/opt/liveness.cpp source/opt/local_access_chain_convert_pass.cpp source/opt/local_redundancy_elimination.cpp source/opt/local_single_block_elim_pass.cpp @@ -104,6 +111,7 @@ Sources = source/opt/loop_utils.cpp source/opt/mem_pass.cpp source/opt/merge_return_pass.cpp + source/opt/modify_maximal_reconvergence.cpp source/opt/module.cpp source/opt/optimizer.cpp source/opt/pass.cpp @@ -115,6 +123,7 @@ Sources = source/opt/redundancy_elimination.cpp source/opt/register_pressure.cpp source/opt/relax_float_ops_pass.cpp + source/opt/remove_dontinline_pass.cpp source/opt/remove_duplicates_pass.cpp source/opt/remove_unused_interface_variables_pass.cpp source/opt/replace_desc_array_access_using_var_index.cpp @@ -130,8 +139,10 @@ Sources = source/opt/strip_debug_info_pass.cpp source/opt/strip_nonsemantic_info_pass.cpp source/opt/struct_cfg_analysis.cpp + source/opt/switch_descriptorset_pass.cpp source/opt/types.cpp source/opt/type_manager.cpp + source/opt/trim_capabilities_pass.cpp source/opt/unify_const_pass.cpp source/opt/upgrade_memory_model.cpp source/opt/value_number_table.cpp @@ -218,10 +229,14 @@ Sources = source/val/validate_logicals.cpp source/val/validate_memory.cpp source/val/validate_memory_semantics.cpp + source/val/validate_mesh_shading.cpp source/val/validate_misc.cpp source/val/validate_mode_setting.cpp source/val/validate_non_uniform.cpp source/val/validate_primitives.cpp + source/val/validate_ray_query.cpp + source/val/validate_ray_tracing.cpp + source/val/validate_ray_tracing_reorder.cpp source/val/validate_scopes.cpp source/val/validate_small_type_uses.cpp source/val/validate_type.cpp diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/CMakeLists.txt b/prog/3rdPartyLibs/vulkan/spirv-tools/source/CMakeLists.txt index 331ff6755..d0454c6c7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/CMakeLists.txt +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/CMakeLists.txt @@ -31,12 +31,13 @@ macro(spvtools_core_tables CONFIG_VERSION) set(GRAMMAR_INSTS_INC_FILE "${spirv-tools_BINARY_DIR}/core.insts-${CONFIG_VERSION}.inc") set(GRAMMAR_KINDS_INC_FILE "${spirv-tools_BINARY_DIR}/operand.kinds-${CONFIG_VERSION}.inc") add_custom_command(OUTPUT ${GRAMMAR_INSTS_INC_FILE} ${GRAMMAR_KINDS_INC_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${GRAMMAR_PROCESSING_SCRIPT} --spirv-core-grammar=${GRAMMAR_JSON_FILE} --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE} --extinst-cldebuginfo100-grammar=${CLDEBUGINFO100_GRAMMAR_JSON_FILE} --core-insts-output=${GRAMMAR_INSTS_INC_FILE} --operand-kinds-output=${GRAMMAR_KINDS_INC_FILE} + --output-language=c++ DEPENDS ${GRAMMAR_PROCESSING_SCRIPT} ${GRAMMAR_JSON_FILE} ${DEBUGINFO_GRAMMAR_JSON_FILE} @@ -52,12 +53,13 @@ macro(spvtools_enum_string_mapping CONFIG_VERSION) set(GRAMMAR_ENUM_STRING_MAPPING_INC_FILE "${spirv-tools_BINARY_DIR}/enum_string_mapping.inc") add_custom_command(OUTPUT ${GRAMMAR_EXTENSION_ENUM_INC_FILE} ${GRAMMAR_ENUM_STRING_MAPPING_INC_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${GRAMMAR_PROCESSING_SCRIPT} --spirv-core-grammar=${GRAMMAR_JSON_FILE} --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE} --extinst-cldebuginfo100-grammar=${CLDEBUGINFO100_GRAMMAR_JSON_FILE} --extension-enum-output=${GRAMMAR_EXTENSION_ENUM_INC_FILE} --enum-string-mapping-output=${GRAMMAR_ENUM_STRING_MAPPING_INC_FILE} + --output-language=c++ DEPENDS ${GRAMMAR_PROCESSING_SCRIPT} ${GRAMMAR_JSON_FILE} ${DEBUGINFO_GRAMMAR_JSON_FILE} @@ -73,7 +75,7 @@ macro(spvtools_vimsyntax CONFIG_VERSION CLVERSION) set(OPENCL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.opencl.std.100.grammar.json") set(VIMSYNTAX_FILE "${spirv-tools_BINARY_DIR}/spvasm.vim") add_custom_command(OUTPUT ${VIMSYNTAX_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${VIMSYNTAX_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${VIMSYNTAX_PROCESSING_SCRIPT} --spirv-core-grammar=${GRAMMAR_JSON_FILE} --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE} --extinst-glsl-grammar=${GLSL_GRAMMAR_JSON_FILE} @@ -89,9 +91,10 @@ macro(spvtools_glsl_tables CONFIG_VERSION) set(GLSL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.glsl.std.450.grammar.json") set(GRAMMAR_INC_FILE "${spirv-tools_BINARY_DIR}/glsl.std.450.insts.inc") add_custom_command(OUTPUT ${GRAMMAR_INC_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${GRAMMAR_PROCESSING_SCRIPT} --extinst-glsl-grammar=${GLSL_GRAMMAR_JSON_FILE} --glsl-insts-output=${GRAMMAR_INC_FILE} + --output-language=c++ DEPENDS ${GRAMMAR_PROCESSING_SCRIPT} ${CORE_GRAMMAR_JSON_FILE} ${GLSL_GRAMMAR_JSON_FILE} COMMENT "Generate info tables for GLSL extended instructions and operands v${CONFIG_VERSION}.") list(APPEND EXTINST_CPP_DEPENDS ${GRAMMAR_INC_FILE}) @@ -102,7 +105,7 @@ macro(spvtools_opencl_tables CONFIG_VERSION) set(OPENCL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.opencl.std.100.grammar.json") set(GRAMMAR_INC_FILE "${spirv-tools_BINARY_DIR}/opencl.std.insts.inc") add_custom_command(OUTPUT ${GRAMMAR_INC_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${GRAMMAR_PROCESSING_SCRIPT} --extinst-opencl-grammar=${OPENCL_GRAMMAR_JSON_FILE} --opencl-insts-output=${GRAMMAR_INC_FILE} DEPENDS ${GRAMMAR_PROCESSING_SCRIPT} ${CORE_GRAMMAR_JSON_FILE} ${OPENCL_GRAMMAR_JSON_FILE} @@ -117,7 +120,7 @@ macro(spvtools_vendor_tables VENDOR_TABLE SHORT_NAME OPERAND_KIND_PREFIX) set(GRAMMAR_FILE "${spirv-tools_SOURCE_DIR}/source/extinst.${VENDOR_TABLE}.grammar.json") endif() add_custom_command(OUTPUT ${INSTS_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${GRAMMAR_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${GRAMMAR_PROCESSING_SCRIPT} --extinst-vendor-grammar=${GRAMMAR_FILE} --vendor-insts-output=${INSTS_FILE} --vendor-operand-kind-prefix=${OPERAND_KIND_PREFIX} @@ -131,7 +134,7 @@ endmacro(spvtools_vendor_tables) macro(spvtools_extinst_lang_headers NAME GRAMMAR_FILE) set(OUT_H ${spirv-tools_BINARY_DIR}/${NAME}.h) add_custom_command(OUTPUT ${OUT_H} - COMMAND ${PYTHON_EXECUTABLE} ${LANG_HEADER_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${LANG_HEADER_PROCESSING_SCRIPT} --extinst-grammar=${GRAMMAR_FILE} --extinst-output-path=${OUT_H} DEPENDS ${LANG_HEADER_PROCESSING_SCRIPT} ${GRAMMAR_FILE} @@ -153,6 +156,7 @@ spvtools_vendor_tables("debuginfo" "debuginfo" "") spvtools_vendor_tables("opencl.debuginfo.100" "cldi100" "CLDEBUG100_") spvtools_vendor_tables("nonsemantic.shader.debuginfo.100" "shdi100" "SHDEBUG100_") spvtools_vendor_tables("nonsemantic.clspvreflection" "clspvreflection" "") +spvtools_vendor_tables("nonsemantic.vkspreflection" "vkspreflection" "") spvtools_extinst_lang_headers("DebugInfo" ${DEBUGINFO_GRAMMAR_JSON_FILE}) spvtools_extinst_lang_headers("OpenCLDebugInfo100" ${CLDEBUGINFO100_GRAMMAR_JSON_FILE}) spvtools_extinst_lang_headers("NonSemanticShaderDebugInfo100" ${VKDEBUGINFO100_GRAMMAR_JSON_FILE}) @@ -165,7 +169,7 @@ set_property(TARGET spirv-tools-vimsyntax PROPERTY FOLDER "SPIRV-Tools utilities set(GENERATOR_INC_FILE ${spirv-tools_BINARY_DIR}/generators.inc) set(SPIRV_XML_REGISTRY_FILE ${SPIRV_HEADER_INCLUDE_DIR}/spirv/spir-v.xml) add_custom_command(OUTPUT ${GENERATOR_INC_FILE} - COMMAND ${PYTHON_EXECUTABLE} ${XML_REGISTRY_PROCESSING_SCRIPT} + COMMAND Python3::Interpreter ${XML_REGISTRY_PROCESSING_SCRIPT} --xml=${SPIRV_XML_REGISTRY_FILE} --generator-output=${GENERATOR_INC_FILE} DEPENDS ${XML_REGISTRY_PROCESSING_SCRIPT} ${SPIRV_XML_REGISTRY_FILE} @@ -195,9 +199,9 @@ set(SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR set(SPIRV_TOOLS_CHANGES_FILE ${spirv-tools_SOURCE_DIR}/CHANGES) add_custom_command(OUTPUT ${SPIRV_TOOLS_BUILD_VERSION_INC} - COMMAND ${PYTHON_EXECUTABLE} + COMMAND Python3::Interpreter ${SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR} - ${spirv-tools_SOURCE_DIR} ${SPIRV_TOOLS_BUILD_VERSION_INC} + ${SPIRV_TOOLS_CHANGES_FILE} ${SPIRV_TOOLS_BUILD_VERSION_INC} DEPENDS ${SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR} ${SPIRV_TOOLS_CHANGES_FILE} COMMENT "Update build-version.inc in the SPIRV-Tools build directory (if necessary).") @@ -217,12 +221,14 @@ add_subdirectory(reduce) add_subdirectory(fuzz) add_subdirectory(link) add_subdirectory(lint) +add_subdirectory(diff) set(SPIRV_SOURCES ${spirv-tools_SOURCE_DIR}/include/spirv-tools/libspirv.h ${CMAKE_CURRENT_SOURCE_DIR}/util/bitutils.h ${CMAKE_CURRENT_SOURCE_DIR}/util/bit_vector.h + ${CMAKE_CURRENT_SOURCE_DIR}/util/hash_combine.h ${CMAKE_CURRENT_SOURCE_DIR}/util/hex_float.h ${CMAKE_CURRENT_SOURCE_DIR}/util/make_unique.h ${CMAKE_CURRENT_SOURCE_DIR}/util/parse_number.h @@ -316,10 +322,14 @@ set(SPIRV_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_logicals.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_memory.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_memory_semantics.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_mesh_shading.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_misc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_mode_setting.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_non_uniform.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_primitives.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_ray_query.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_ray_tracing.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_ray_tracing_reorder.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_scopes.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_small_type_uses.cpp ${CMAKE_CURRENT_SOURCE_DIR}/val/validate_type.cpp @@ -404,22 +414,13 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") find_library(LIBRT rt) if(LIBRT) foreach(target ${SPIRV_TOOLS_TARGETS}) - target_link_libraries(${target} ${LIBRT}) + target_link_libraries(${target} rt) endforeach() endif() endif() -if (ANDROID) - foreach(target ${SPIRV_TOOLS_TARGETS}) - target_link_libraries(${target} PRIVATE android log) - endforeach() -endif() - if(ENABLE_SPIRV_TOOLS_INSTALL) - install(TARGETS ${SPIRV_TOOLS_TARGETS} EXPORT ${SPIRV_TOOLS}Targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS ${SPIRV_TOOLS_TARGETS} EXPORT ${SPIRV_TOOLS}Targets) export(EXPORT ${SPIRV_TOOLS}Targets FILE ${SPIRV_TOOLS}Target.cmake) spvtools_config_package_dir(${SPIRV_TOOLS} PACKAGE_DIR) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.cpp index 79f18eee3..0092d01a5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.cpp @@ -21,6 +21,7 @@ #include "source/ext_inst.h" #include "source/opcode.h" #include "source/operand.h" +#include "source/spirv_target_env.h" #include "source/table.h" namespace spvtools { @@ -62,9 +63,9 @@ spv_result_t spvTextParseMaskOperand(spv_target_env env, end = std::find(begin, text_end, separator); spv_operand_desc entry = nullptr; - if (spvOperandTableNameLookup(env, operandTable, type, begin, end - begin, - &entry)) { - return SPV_ERROR_INVALID_TEXT; + if (auto error = spvOperandTableNameLookup(env, operandTable, type, begin, + end - begin, &entry)) { + return error; } value |= entry->value; @@ -78,16 +79,16 @@ spv_result_t spvTextParseMaskOperand(spv_target_env env, // Associates an opcode with its name. struct SpecConstantOpcodeEntry { - SpvOp opcode; + spv::Op opcode; const char* name; }; // All the opcodes allowed as the operation for OpSpecConstantOp. -// The name does not have the usual "Op" prefix. For example opcode SpvOpIAdd -// is associated with the name "IAdd". +// The name does not have the usual "Op" prefix. For example opcode +// spv::Op::IAdd is associated with the name "IAdd". // // clang-format off -#define CASE(NAME) { SpvOp##NAME, #NAME } +#define CASE(NAME) { spv::Op::Op##NAME, #NAME } const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = { // Conversion CASE(SConvert), @@ -154,11 +155,12 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = { CASE(InBoundsAccessChain), CASE(PtrAccessChain), CASE(InBoundsPtrAccessChain), - CASE(CooperativeMatrixLengthNV) + CASE(CooperativeMatrixLengthNV), + CASE(CooperativeMatrixLengthKHR) }; // The 60 is determined by counting the opcodes listed in the spec. -static_assert(60 == sizeof(kOpSpecConstantOpcodes)/sizeof(kOpSpecConstantOpcodes[0]), +static_assert(61 == sizeof(kOpSpecConstantOpcodes)/sizeof(kOpSpecConstantOpcodes[0]), "OpSpecConstantOp opcode table is incomplete"); #undef CASE // clang-format on @@ -173,17 +175,20 @@ bool AssemblyGrammar::isValid() const { } CapabilitySet AssemblyGrammar::filterCapsAgainstTargetEnv( - const SpvCapability* cap_array, uint32_t count) const { + const spv::Capability* cap_array, uint32_t count) const { CapabilitySet cap_set; + const auto version = spvVersionForTargetEnv(target_env_); for (uint32_t i = 0; i < count; ++i) { - spv_operand_desc cap_desc = {}; + spv_operand_desc entry = {}; if (SPV_SUCCESS == lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, static_cast(cap_array[i]), - &cap_desc)) { - // spvOperandTableValueLookup() filters capabilities internally - // according to the current target environment by itself. So we - // should be safe to add this capability if the lookup succeeds. - cap_set.Add(cap_array[i]); + &entry)) { + // This token is visible in this environment if it's in an appropriate + // core version, or it is enabled by a capability or an extension. + if ((version >= entry->minVersion && version <= entry->lastVersion) || + entry->numExtensions > 0u || entry->numCapabilities > 0u) { + cap_set.insert(cap_array[i]); + } } } return cap_set; @@ -194,7 +199,7 @@ spv_result_t AssemblyGrammar::lookupOpcode(const char* name, return spvOpcodeTableNameLookup(target_env_, opcodeTable_, name, desc); } -spv_result_t AssemblyGrammar::lookupOpcode(SpvOp opcode, +spv_result_t AssemblyGrammar::lookupOpcode(spv::Op opcode, spv_opcode_desc* desc) const { return spvOpcodeTableValueLookup(target_env_, opcodeTable_, opcode, desc); } @@ -214,7 +219,7 @@ spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type, } spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(const char* name, - SpvOp* opcode) const { + spv::Op* opcode) const { const auto* last = kOpSpecConstantOpcodes + kNumOpSpecConstantOpcodes; const auto* found = std::find_if(kOpSpecConstantOpcodes, last, @@ -226,7 +231,7 @@ spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(const char* name, return SPV_SUCCESS; } -spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(SpvOp opcode) const { +spv_result_t AssemblyGrammar::lookupSpecConstantOpcode(spv::Op opcode) const { const auto* last = kOpSpecConstantOpcodes + kNumOpSpecConstantOpcodes; const auto* found = std::find_if(kOpSpecConstantOpcodes, last, diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.h index 17c2bd3ba..36fdd08a6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/assembly_grammar.h @@ -41,7 +41,7 @@ class AssemblyGrammar { // Removes capabilities not available in the current target environment and // returns the rest. - CapabilitySet filterCapsAgainstTargetEnv(const SpvCapability* cap_array, + CapabilitySet filterCapsAgainstTargetEnv(const spv::Capability* cap_array, uint32_t count) const; // Fills in the desc parameter with the information about the opcode @@ -52,7 +52,7 @@ class AssemblyGrammar { // Fills in the desc parameter with the information about the opcode // of the valid. Returns SPV_SUCCESS if the opcode was found, and // SPV_ERROR_INVALID_LOOKUP if the opcode does not exist. - spv_result_t lookupOpcode(SpvOp opcode, spv_opcode_desc* desc) const; + spv_result_t lookupOpcode(spv::Op opcode, spv_opcode_desc* desc) const; // Fills in the desc parameter with the information about the given // operand. Returns SPV_SUCCESS if the operand was found, and @@ -82,11 +82,12 @@ class AssemblyGrammar { // the integer add opcode for OpSpecConstantOp. On success, returns // SPV_SUCCESS and sends the discovered operation code through the opcode // parameter. On failure, returns SPV_ERROR_INVALID_LOOKUP. - spv_result_t lookupSpecConstantOpcode(const char* name, SpvOp* opcode) const; + spv_result_t lookupSpecConstantOpcode(const char* name, + spv::Op* opcode) const; // Returns SPV_SUCCESS if the given opcode is valid as the opcode operand // to OpSpecConstantOp. - spv_result_t lookupSpecConstantOpcode(SpvOp opcode) const; + spv_result_t lookupSpecConstantOpcode(spv::Op opcode) const; // Parses a mask expression string for the given operand type. // diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/binary.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/binary.cpp index bbaa2c2c7..cf1f0b7b0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/binary.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/binary.cpp @@ -156,7 +156,7 @@ class Parser { // Issues a diagnostic describing an exhaustion of input condition when // trying to decode an instruction operand, and returns // SPV_ERROR_INVALID_BINARY. - spv_result_t exhaustedInputDiagnostic(size_t inst_offset, SpvOp opcode, + spv_result_t exhaustedInputDiagnostic(size_t inst_offset, spv::Op opcode, spv_operand_type_t type) { return diagnostic() << "End of input reached while decoding Op" << spvOpcodeString(opcode) << " starting at word " @@ -215,7 +215,7 @@ class Parser { size_t word_index; // The current position in words. size_t instruction_count; // The count of processed instructions spv_endianness_t endian; // The endianness of the binary. - // Is the SPIR-V binary in a different endiannes from the host native + // Is the SPIR-V binary in a different endianness from the host native // endianness? bool requires_endian_conversion; @@ -318,7 +318,7 @@ spv_result_t Parser::parseInstruction() { << inst_word_count; } spv_opcode_desc opcode_desc; - if (grammar_.lookupOpcode(static_cast(inst.opcode), &opcode_desc)) + if (grammar_.lookupOpcode(static_cast(inst.opcode), &opcode_desc)) return diagnostic() << "Invalid opcode: " << inst.opcode; // Advance past the opcode word. But remember the of the start @@ -418,7 +418,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset, std::vector* words, std::vector* operands, spv_operand_pattern_t* expected_operands) { - const SpvOp opcode = static_cast(inst->opcode); + const spv::Op opcode = static_cast(inst->opcode); // We'll fill in this result as we go along. spv_parsed_operand_t parsed_operand; parsed_operand.offset = uint16_t(_.word_index - inst_offset); @@ -473,7 +473,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset, if (!word) return diagnostic(SPV_ERROR_INVALID_ID) << "Id is 0"; parsed_operand.type = SPV_OPERAND_TYPE_ID; - if (opcode == SpvOpExtInst && parsed_operand.offset == 3) { + if (opcode == spv::Op::OpExtInst && parsed_operand.offset == 3) { // The current word is the extended instruction set Id. // Set the extended instruction set type for the current instruction. auto ext_inst_type_iter = _.import_id_to_ext_inst_type.find(word); @@ -494,7 +494,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset, break; case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: { - assert(SpvOpExtInst == opcode); + assert(spv::Op::OpExtInst == opcode); assert(inst->ext_inst_type != SPV_EXT_INST_TYPE_NONE); spv_ext_inst_desc ext_inst; if (grammar_.lookupExtInst(inst->ext_inst_type, word, &ext_inst) == @@ -516,14 +516,14 @@ spv_result_t Parser::parseOperand(size_t inst_offset, } break; case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: { - assert(SpvOpSpecConstantOp == opcode); - if (word > static_cast(SpvOp::SpvOpMax) || - grammar_.lookupSpecConstantOpcode(SpvOp(word))) { + assert(spv::Op::OpSpecConstantOp == opcode); + if (word > static_cast(spv::Op::Max) || + grammar_.lookupSpecConstantOpcode(spv::Op(word))) { return diagnostic() << "Invalid " << spvOperandTypeStr(type) << ": " << word; } spv_opcode_desc opcode_entry = nullptr; - if (grammar_.lookupOpcode(SpvOp(word), &opcode_entry)) { + if (grammar_.lookupOpcode(spv::Op(word), &opcode_entry)) { return diagnostic(SPV_ERROR_INTERNAL) << "OpSpecConstant opcode table out of sync"; } @@ -546,10 +546,17 @@ spv_result_t Parser::parseOperand(size_t inst_offset, parsed_operand.number_bit_width = 32; break; + case SPV_OPERAND_TYPE_LITERAL_FLOAT: + // These are regular single-word literal float operands. + parsed_operand.type = SPV_OPERAND_TYPE_LITERAL_FLOAT; + parsed_operand.number_kind = SPV_NUMBER_FLOATING; + parsed_operand.number_bit_width = 32; + break; + case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: case SPV_OPERAND_TYPE_OPTIONAL_TYPED_LITERAL_INTEGER: parsed_operand.type = SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER; - if (opcode == SpvOpSwitch) { + if (opcode == spv::Op::OpSwitch) { // The literal operands have the same type as the value // referenced by the selector Id. const uint32_t selector_id = peekAt(inst_offset + 1); @@ -575,7 +582,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, << " is not a scalar integer"; } } else { - assert(opcode == SpvOpConstant || opcode == SpvOpSpecConstant); + assert(opcode == spv::Op::OpConstant || + opcode == spv::Op::OpSpecConstant); // The literal number type is determined by the type Id for the // constant. assert(inst->type_id); @@ -607,7 +615,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset, parsed_operand.num_words = uint16_t(string_num_words); parsed_operand.type = SPV_OPERAND_TYPE_LITERAL_STRING; - if (SpvOpExtInstImport == opcode) { + if (spv::Op::OpExtInstImport == opcode) { // Record the extended instruction type for the ID for this import. // There is only one string literal argument to OpExtInstImport, // so it's sufficient to guard this just on the opcode. @@ -625,7 +633,6 @@ spv_result_t Parser::parseOperand(size_t inst_offset, } break; case SPV_OPERAND_TYPE_CAPABILITY: - case SPV_OPERAND_TYPE_SOURCE_LANGUAGE: case SPV_OPERAND_TYPE_EXECUTION_MODEL: case SPV_OPERAND_TYPE_ADDRESSING_MODEL: case SPV_OPERAND_TYPE_MEMORY_MODEL: @@ -663,7 +670,8 @@ spv_result_t Parser::parseOperand(size_t inst_offset, case SPV_OPERAND_TYPE_QUANTIZATION_MODES: case SPV_OPERAND_TYPE_OVERFLOW_MODES: case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT: - case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT: { + case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT: + case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: { // A single word that is a plain enum value. // Map an optional operand type to its corresponding concrete type. @@ -682,22 +690,44 @@ spv_result_t Parser::parseOperand(size_t inst_offset, spvPushOperandTypes(entry->operandTypes, expected_operands); } break; + case SPV_OPERAND_TYPE_SOURCE_LANGUAGE: { + spv_operand_desc entry; + if (grammar_.lookupOperand(type, word, &entry)) { + return diagnostic() + << "Invalid " << spvOperandTypeStr(parsed_operand.type) + << " operand: " << word + << ", if you are creating a new source language please use " + "value 0 " + "(Unknown) and when ready, add your source language to " + "SPRIV-Headers"; + } + // Prepare to accept operands to this operand, if needed. + spvPushOperandTypes(entry->operandTypes, expected_operands); + } break; + case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE: case SPV_OPERAND_TYPE_FUNCTION_CONTROL: case SPV_OPERAND_TYPE_LOOP_CONTROL: case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS: + case SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS: case SPV_OPERAND_TYPE_SELECTION_CONTROL: case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: - case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: { + case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS: + case SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS: { // This operand is a mask. // Map an optional operand type to its corresponding concrete type. if (type == SPV_OPERAND_TYPE_OPTIONAL_IMAGE) parsed_operand.type = SPV_OPERAND_TYPE_IMAGE; - else if (type == SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS) + if (type == SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS) parsed_operand.type = SPV_OPERAND_TYPE_MEMORY_ACCESS; + if (type == SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS) + parsed_operand.type = SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS; + if (type == SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS) + parsed_operand.type = SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS; // Check validity of set mask bits. Also prepare for operands for those // masks if they have any. To get operand order correct, scan from @@ -789,14 +819,14 @@ spv_result_t Parser::setNumericTypeInfoForType( void Parser::recordNumberType(size_t inst_offset, const spv_parsed_instruction_t* inst) { - const SpvOp opcode = static_cast(inst->opcode); + const spv::Op opcode = static_cast(inst->opcode); if (spvOpcodeGeneratesType(opcode)) { NumberType info = {SPV_NUMBER_NONE, 0}; - if (SpvOpTypeInt == opcode) { + if (spv::Op::OpTypeInt == opcode) { const bool is_signed = peekAt(inst_offset + 3) != 0; info.type = is_signed ? SPV_NUMBER_SIGNED_INT : SPV_NUMBER_UNSIGNED_INT; info.bit_width = peekAt(inst_offset + 2); - } else if (SpvOpTypeFloat == opcode) { + } else if (spv::Op::OpTypeFloat == opcode) { info.type = SPV_NUMBER_FLOATING; info.bit_width = peekAt(inst_offset + 2); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/build-version.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/build-version.inc index 30ee492bd..5eb5f192b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/build-version.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/build-version.inc @@ -1 +1 @@ -"v2022.1", "SPIRV-Tools v2022.1 market_0_1_63_0-73-g8c49704b31f" +"v2022.1", "SPIRV-Tools v2022.1 vrt_0_0_2_20-4501-g383a29dc4304" diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/cfa.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/cfa.h index 7cadf55f0..9ae3e39a1 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/cfa.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/cfa.h @@ -52,12 +52,37 @@ class CFA { uint32_t id); public: + /// @brief Depth first traversal starting from the \p entry BasicBlock + /// + /// This function performs a depth first traversal from the \p entry + /// BasicBlock and calls the pre/postorder functions when it needs to process + /// the node in pre order, post order. + /// + /// @param[in] entry The root BasicBlock of a CFG + /// @param[in] successor_func A function which will return a pointer to the + /// successor nodes + /// @param[in] preorder A function that will be called for every block in a + /// CFG following preorder traversal semantics + /// @param[in] postorder A function that will be called for every block in a + /// CFG following postorder traversal semantics + /// @param[in] terminal A function that will be called to determine if the + /// search should stop at the given node. + /// NOTE: The @p successor_func and predecessor_func each return a pointer to + /// a collection such that iterators to that collection remain valid for the + /// lifetime of the algorithm. + static void DepthFirstTraversal(const BB* entry, + get_blocks_func successor_func, + std::function preorder, + std::function postorder, + std::function terminal); + /// @brief Depth first traversal starting from the \p entry BasicBlock /// /// This function performs a depth first traversal from the \p entry /// BasicBlock and calls the pre/postorder functions when it needs to process /// the node in pre order, post order. It also calls the backedge function - /// when a back edge is encountered. + /// when a back edge is encountered. The backedge function can be empty. The + /// runtime of the algorithm is improved if backedge is empty. /// /// @param[in] entry The root BasicBlock of a CFG /// @param[in] successor_func A function which will return a pointer to the @@ -67,16 +92,18 @@ class CFA { /// @param[in] postorder A function that will be called for every block in a /// CFG following postorder traversal semantics /// @param[in] backedge A function that will be called when a backedge is - /// encountered during a traversal + /// encountered during a traversal. + /// @param[in] terminal A function that will be called to determine if the + /// search should stop at the given node. /// NOTE: The @p successor_func and predecessor_func each return a pointer to - /// a - /// collection such that iterators to that collection remain valid for the + /// a collection such that iterators to that collection remain valid for the /// lifetime of the algorithm. static void DepthFirstTraversal( const BB* entry, get_blocks_func successor_func, std::function preorder, std::function postorder, - std::function backedge); + std::function backedge, + std::function terminal); /// @brief Calculates dominator edges for a set of blocks /// @@ -133,12 +160,28 @@ bool CFA::FindInWorkList(const std::vector& work_list, return false; } +template +void CFA::DepthFirstTraversal(const BB* entry, + get_blocks_func successor_func, + std::function preorder, + std::function postorder, + std::function terminal) { + DepthFirstTraversal(entry, successor_func, preorder, postorder, + /* backedge = */ {}, terminal); +} + template void CFA::DepthFirstTraversal( const BB* entry, get_blocks_func successor_func, std::function preorder, std::function postorder, - std::function backedge) { + std::function backedge, + std::function terminal) { + assert(successor_func && "The successor function cannot be empty."); + assert(preorder && "The preorder function cannot be empty."); + assert(postorder && "The postorder function cannot be empty."); + assert(terminal && "The terminal function cannot be empty."); + std::unordered_set processed; /// NOTE: work_list is the sequence of nodes from the root node to the node @@ -152,13 +195,13 @@ void CFA::DepthFirstTraversal( while (!work_list.empty()) { block_info& top = work_list.back(); - if (top.iter == end(*successor_func(top.block))) { + if (terminal(top.block) || top.iter == end(*successor_func(top.block))) { postorder(top.block); work_list.pop_back(); } else { BB* child = *top.iter; top.iter++; - if (FindInWorkList(work_list, child->id())) { + if (backedge && FindInWorkList(work_list, child->id())) { backedge(top.block, child); } if (processed.count(child->id()) == 0) { @@ -232,10 +275,16 @@ std::vector> CFA::CalculateDominators( std::vector> out; for (auto idom : idoms) { + // At this point if there is no dominator for the node, just make it + // reflexive. + auto dominator = std::get<1>(idom).dominator; + if (dominator == undefined_dom) { + dominator = std::get<1>(idom).postorder_index; + } // NOTE: performing a const cast for convenient usage with // UpdateImmediateDominators out.push_back({const_cast(std::get<0>(idom)), - const_cast(postorder[std::get<1>(idom).dominator])}); + const_cast(postorder[dominator])}); } // Sort by postorder index to generate a deterministic ordering of edges. @@ -265,12 +314,12 @@ std::vector CFA::TraversalRoots(const std::vector& blocks, auto mark_visited = [&visited](const BB* b) { visited.insert(b); }; auto ignore_block = [](const BB*) {}; - auto ignore_blocks = [](const BB*, const BB*) {}; + auto no_terminal_blocks = [](const BB*) { return false; }; auto traverse_from_root = [&mark_visited, &succ_func, &ignore_block, - &ignore_blocks](const BB* entry) { + &no_terminal_blocks](const BB* entry) { DepthFirstTraversal(entry, succ_func, mark_visited, ignore_block, - ignore_blocks); + no_terminal_blocks); }; std::vector result; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/core.insts-unified1.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/core.insts-unified1.inc index b06dc269e..5550ea5c5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/core.insts-unified1.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/core.insts-unified1.inc @@ -1,74 +1,97 @@ -static const SpvCapability pygen_variable_caps_Addresses[] = {SpvCapabilityAddresses}; -static const SpvCapability pygen_variable_caps_AddressesPhysicalStorageBufferAddresses[] = {SpvCapabilityAddresses, SpvCapabilityPhysicalStorageBufferAddresses}; -static const SpvCapability pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBuffer[] = {SpvCapabilityAddresses, SpvCapabilityVariablePointers, SpvCapabilityVariablePointersStorageBuffer}; -static const SpvCapability pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBufferPhysicalStorageBufferAddresses[] = {SpvCapabilityAddresses, SpvCapabilityVariablePointers, SpvCapabilityVariablePointersStorageBuffer, SpvCapabilityPhysicalStorageBufferAddresses}; -static const SpvCapability pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL[] = {SpvCapabilityArbitraryPrecisionFixedPointINTEL}; -static const SpvCapability pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL[] = {SpvCapabilityArbitraryPrecisionFloatingPointINTEL}; -static const SpvCapability pygen_variable_caps_AsmINTEL[] = {SpvCapabilityAsmINTEL}; -static const SpvCapability pygen_variable_caps_AtomicFloat16AddEXTAtomicFloat32AddEXTAtomicFloat64AddEXT[] = {SpvCapabilityAtomicFloat16AddEXT, SpvCapabilityAtomicFloat32AddEXT, SpvCapabilityAtomicFloat64AddEXT}; -static const SpvCapability pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXT[] = {SpvCapabilityAtomicFloat16MinMaxEXT, SpvCapabilityAtomicFloat32MinMaxEXT, SpvCapabilityAtomicFloat64MinMaxEXT}; -static const SpvCapability pygen_variable_caps_BindlessTextureNV[] = {SpvCapabilityBindlessTextureNV}; -static const SpvCapability pygen_variable_caps_BlockingPipesINTEL[] = {SpvCapabilityBlockingPipesINTEL}; -static const SpvCapability pygen_variable_caps_CooperativeMatrixNV[] = {SpvCapabilityCooperativeMatrixNV}; -static const SpvCapability pygen_variable_caps_DemoteToHelperInvocation[] = {SpvCapabilityDemoteToHelperInvocation}; -static const SpvCapability pygen_variable_caps_DemoteToHelperInvocationEXT[] = {SpvCapabilityDemoteToHelperInvocationEXT}; -static const SpvCapability pygen_variable_caps_DerivativeControl[] = {SpvCapabilityDerivativeControl}; -static const SpvCapability pygen_variable_caps_DeviceEnqueue[] = {SpvCapabilityDeviceEnqueue}; -static const SpvCapability pygen_variable_caps_DotProduct[] = {SpvCapabilityDotProduct}; -static const SpvCapability pygen_variable_caps_DotProductKHR[] = {SpvCapabilityDotProductKHR}; -static const SpvCapability pygen_variable_caps_ExpectAssumeKHR[] = {SpvCapabilityExpectAssumeKHR}; -static const SpvCapability pygen_variable_caps_FPGARegINTEL[] = {SpvCapabilityFPGARegINTEL}; -static const SpvCapability pygen_variable_caps_FragmentMaskAMD[] = {SpvCapabilityFragmentMaskAMD}; -static const SpvCapability pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT[] = {SpvCapabilityFragmentShaderSampleInterlockEXT, SpvCapabilityFragmentShaderPixelInterlockEXT, SpvCapabilityFragmentShaderShadingRateInterlockEXT}; -static const SpvCapability pygen_variable_caps_FunctionPointersINTEL[] = {SpvCapabilityFunctionPointersINTEL}; -static const SpvCapability pygen_variable_caps_Geometry[] = {SpvCapabilityGeometry}; -static const SpvCapability pygen_variable_caps_GeometryStreams[] = {SpvCapabilityGeometryStreams}; -static const SpvCapability pygen_variable_caps_GroupNonUniform[] = {SpvCapabilityGroupNonUniform}; -static const SpvCapability pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV[] = {SpvCapabilityGroupNonUniformArithmetic, SpvCapabilityGroupNonUniformClustered, SpvCapabilityGroupNonUniformPartitionedNV}; -static const SpvCapability pygen_variable_caps_GroupNonUniformBallot[] = {SpvCapabilityGroupNonUniformBallot}; -static const SpvCapability pygen_variable_caps_GroupNonUniformPartitionedNV[] = {SpvCapabilityGroupNonUniformPartitionedNV}; -static const SpvCapability pygen_variable_caps_GroupNonUniformQuad[] = {SpvCapabilityGroupNonUniformQuad}; -static const SpvCapability pygen_variable_caps_GroupNonUniformShuffle[] = {SpvCapabilityGroupNonUniformShuffle}; -static const SpvCapability pygen_variable_caps_GroupNonUniformShuffleRelative[] = {SpvCapabilityGroupNonUniformShuffleRelative}; -static const SpvCapability pygen_variable_caps_GroupNonUniformVote[] = {SpvCapabilityGroupNonUniformVote}; -static const SpvCapability pygen_variable_caps_Groups[] = {SpvCapabilityGroups}; -static const SpvCapability pygen_variable_caps_ImageFootprintNV[] = {SpvCapabilityImageFootprintNV}; -static const SpvCapability pygen_variable_caps_ImageQuery[] = {SpvCapabilityImageQuery}; -static const SpvCapability pygen_variable_caps_IntegerFunctions2INTEL[] = {SpvCapabilityIntegerFunctions2INTEL}; -static const SpvCapability pygen_variable_caps_Kernel[] = {SpvCapabilityKernel}; -static const SpvCapability pygen_variable_caps_KernelImageQuery[] = {SpvCapabilityKernel, SpvCapabilityImageQuery}; -static const SpvCapability pygen_variable_caps_LiteralSampler[] = {SpvCapabilityLiteralSampler}; -static const SpvCapability pygen_variable_caps_LongConstantCompositeINTEL[] = {SpvCapabilityLongConstantCompositeINTEL}; -static const SpvCapability pygen_variable_caps_Matrix[] = {SpvCapabilityMatrix}; -static const SpvCapability pygen_variable_caps_MeshShadingNV[] = {SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_NamedBarrier[] = {SpvCapabilityNamedBarrier}; -static const SpvCapability pygen_variable_caps_PipeStorage[] = {SpvCapabilityPipeStorage}; -static const SpvCapability pygen_variable_caps_Pipes[] = {SpvCapabilityPipes}; -static const SpvCapability pygen_variable_caps_RayQueryKHR[] = {SpvCapabilityRayQueryKHR}; -static const SpvCapability pygen_variable_caps_RayTracingKHR[] = {SpvCapabilityRayTracingKHR}; -static const SpvCapability pygen_variable_caps_RayTracingKHRRayQueryKHR[] = {SpvCapabilityRayTracingKHR, SpvCapabilityRayQueryKHR}; -static const SpvCapability pygen_variable_caps_RayTracingMotionBlurNV[] = {SpvCapabilityRayTracingMotionBlurNV}; -static const SpvCapability pygen_variable_caps_RayTracingNV[] = {SpvCapabilityRayTracingNV}; -static const SpvCapability pygen_variable_caps_RayTracingNVRayTracingKHR[] = {SpvCapabilityRayTracingNV, SpvCapabilityRayTracingKHR}; -static const SpvCapability pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR[] = {SpvCapabilityRayTracingNV, SpvCapabilityRayTracingKHR, SpvCapabilityRayQueryKHR}; -static const SpvCapability pygen_variable_caps_Shader[] = {SpvCapabilityShader}; -static const SpvCapability pygen_variable_caps_ShaderBitInstructions[] = {SpvCapabilityShader, SpvCapabilityBitInstructions}; -static const SpvCapability pygen_variable_caps_ShaderClockKHR[] = {SpvCapabilityShaderClockKHR}; -static const SpvCapability pygen_variable_caps_SparseResidency[] = {SpvCapabilitySparseResidency}; -static const SpvCapability pygen_variable_caps_SubgroupAvcMotionEstimationINTEL[] = {SpvCapabilitySubgroupAvcMotionEstimationINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL[] = {SpvCapabilitySubgroupAvcMotionEstimationINTEL, SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL[] = {SpvCapabilitySubgroupAvcMotionEstimationINTEL, SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupBallotKHR[] = {SpvCapabilitySubgroupBallotKHR}; -static const SpvCapability pygen_variable_caps_SubgroupBufferBlockIOINTEL[] = {SpvCapabilitySubgroupBufferBlockIOINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupDispatch[] = {SpvCapabilitySubgroupDispatch}; -static const SpvCapability pygen_variable_caps_SubgroupImageBlockIOINTEL[] = {SpvCapabilitySubgroupImageBlockIOINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupImageMediaBlockIOINTEL[] = {SpvCapabilitySubgroupImageMediaBlockIOINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupShuffleINTEL[] = {SpvCapabilitySubgroupShuffleINTEL}; -static const SpvCapability pygen_variable_caps_SubgroupVoteKHR[] = {SpvCapabilitySubgroupVoteKHR}; -static const SpvCapability pygen_variable_caps_USMStorageClassesINTEL[] = {SpvCapabilityUSMStorageClassesINTEL}; -static const SpvCapability pygen_variable_caps_UnstructuredLoopControlsINTEL[] = {SpvCapabilityUnstructuredLoopControlsINTEL}; -static const SpvCapability pygen_variable_caps_VariableLengthArrayINTEL[] = {SpvCapabilityVariableLengthArrayINTEL}; -static const SpvCapability pygen_variable_caps_VectorComputeINTEL[] = {SpvCapabilityVectorComputeINTEL}; +static const spv::Capability pygen_variable_caps_Addresses[] = {spv::Capability::Addresses}; +static const spv::Capability pygen_variable_caps_AddressesPhysicalStorageBufferAddresses[] = {spv::Capability::Addresses, spv::Capability::PhysicalStorageBufferAddresses}; +static const spv::Capability pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBuffer[] = {spv::Capability::Addresses, spv::Capability::VariablePointers, spv::Capability::VariablePointersStorageBuffer}; +static const spv::Capability pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBufferPhysicalStorageBufferAddresses[] = {spv::Capability::Addresses, spv::Capability::VariablePointers, spv::Capability::VariablePointersStorageBuffer, spv::Capability::PhysicalStorageBufferAddresses}; +static const spv::Capability pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL[] = {spv::Capability::ArbitraryPrecisionFixedPointINTEL}; +static const spv::Capability pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL[] = {spv::Capability::ArbitraryPrecisionFloatingPointINTEL}; +static const spv::Capability pygen_variable_caps_AsmINTEL[] = {spv::Capability::AsmINTEL}; +static const spv::Capability pygen_variable_caps_AtomicFloat16AddEXTAtomicFloat32AddEXTAtomicFloat64AddEXTAtomicFloat16VectorNV[] = {spv::Capability::AtomicFloat16AddEXT, spv::Capability::AtomicFloat32AddEXT, spv::Capability::AtomicFloat64AddEXT, spv::Capability::AtomicFloat16VectorNV}; +static const spv::Capability pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXTAtomicFloat16VectorNV[] = {spv::Capability::AtomicFloat16MinMaxEXT, spv::Capability::AtomicFloat32MinMaxEXT, spv::Capability::AtomicFloat64MinMaxEXT, spv::Capability::AtomicFloat16VectorNV}; +static const spv::Capability pygen_variable_caps_BFloat16ConversionINTEL[] = {spv::Capability::BFloat16ConversionINTEL}; +static const spv::Capability pygen_variable_caps_BindlessTextureNV[] = {spv::Capability::BindlessTextureNV}; +static const spv::Capability pygen_variable_caps_BlockingPipesINTEL[] = {spv::Capability::BlockingPipesINTEL}; +static const spv::Capability pygen_variable_caps_CooperativeMatrixKHR[] = {spv::Capability::CooperativeMatrixKHR}; +static const spv::Capability pygen_variable_caps_CooperativeMatrixNV[] = {spv::Capability::CooperativeMatrixNV}; +static const spv::Capability pygen_variable_caps_DemoteToHelperInvocation[] = {spv::Capability::DemoteToHelperInvocation}; +static const spv::Capability pygen_variable_caps_DemoteToHelperInvocationEXT[] = {spv::Capability::DemoteToHelperInvocationEXT}; +static const spv::Capability pygen_variable_caps_DerivativeControl[] = {spv::Capability::DerivativeControl}; +static const spv::Capability pygen_variable_caps_DeviceEnqueue[] = {spv::Capability::DeviceEnqueue}; +static const spv::Capability pygen_variable_caps_DisplacementMicromapNV[] = {spv::Capability::DisplacementMicromapNV}; +static const spv::Capability pygen_variable_caps_DotProduct[] = {spv::Capability::DotProduct}; +static const spv::Capability pygen_variable_caps_DotProductKHR[] = {spv::Capability::DotProductKHR}; +static const spv::Capability pygen_variable_caps_ExpectAssumeKHR[] = {spv::Capability::ExpectAssumeKHR}; +static const spv::Capability pygen_variable_caps_FPGARegINTEL[] = {spv::Capability::FPGARegINTEL}; +static const spv::Capability pygen_variable_caps_FragmentMaskAMD[] = {spv::Capability::FragmentMaskAMD}; +static const spv::Capability pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT[] = {spv::Capability::FragmentShaderSampleInterlockEXT, spv::Capability::FragmentShaderPixelInterlockEXT, spv::Capability::FragmentShaderShadingRateInterlockEXT}; +static const spv::Capability pygen_variable_caps_FunctionPointersINTEL[] = {spv::Capability::FunctionPointersINTEL}; +static const spv::Capability pygen_variable_caps_Geometry[] = {spv::Capability::Geometry}; +static const spv::Capability pygen_variable_caps_GeometryStreams[] = {spv::Capability::GeometryStreams}; +static const spv::Capability pygen_variable_caps_GroupNonUniform[] = {spv::Capability::GroupNonUniform}; +static const spv::Capability pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV[] = {spv::Capability::GroupNonUniformArithmetic, spv::Capability::GroupNonUniformClustered, spv::Capability::GroupNonUniformPartitionedNV}; +static const spv::Capability pygen_variable_caps_GroupNonUniformBallot[] = {spv::Capability::GroupNonUniformBallot}; +static const spv::Capability pygen_variable_caps_GroupNonUniformPartitionedNV[] = {spv::Capability::GroupNonUniformPartitionedNV}; +static const spv::Capability pygen_variable_caps_GroupNonUniformQuad[] = {spv::Capability::GroupNonUniformQuad}; +static const spv::Capability pygen_variable_caps_GroupNonUniformRotateKHR[] = {spv::Capability::GroupNonUniformRotateKHR}; +static const spv::Capability pygen_variable_caps_GroupNonUniformShuffle[] = {spv::Capability::GroupNonUniformShuffle}; +static const spv::Capability pygen_variable_caps_GroupNonUniformShuffleRelative[] = {spv::Capability::GroupNonUniformShuffleRelative}; +static const spv::Capability pygen_variable_caps_GroupNonUniformVote[] = {spv::Capability::GroupNonUniformVote}; +static const spv::Capability pygen_variable_caps_GroupUniformArithmeticKHR[] = {spv::Capability::GroupUniformArithmeticKHR}; +static const spv::Capability pygen_variable_caps_Groups[] = {spv::Capability::Groups}; +static const spv::Capability pygen_variable_caps_ImageFootprintNV[] = {spv::Capability::ImageFootprintNV}; +static const spv::Capability pygen_variable_caps_ImageQuery[] = {spv::Capability::ImageQuery}; +static const spv::Capability pygen_variable_caps_IntegerFunctions2INTEL[] = {spv::Capability::IntegerFunctions2INTEL}; +static const spv::Capability pygen_variable_caps_Kernel[] = {spv::Capability::Kernel}; +static const spv::Capability pygen_variable_caps_KernelImageQuery[] = {spv::Capability::Kernel, spv::Capability::ImageQuery}; +static const spv::Capability pygen_variable_caps_LiteralSampler[] = {spv::Capability::LiteralSampler}; +static const spv::Capability pygen_variable_caps_LongCompositesINTEL[] = {spv::Capability::LongCompositesINTEL}; +static const spv::Capability pygen_variable_caps_MaskedGatherScatterINTEL[] = {spv::Capability::MaskedGatherScatterINTEL}; +static const spv::Capability pygen_variable_caps_Matrix[] = {spv::Capability::Matrix}; +static const spv::Capability pygen_variable_caps_MemoryAccessAliasingINTEL[] = {spv::Capability::MemoryAccessAliasingINTEL}; +static const spv::Capability pygen_variable_caps_MeshShadingEXT[] = {spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_MeshShadingNV[] = {spv::Capability::MeshShadingNV}; +static const spv::Capability pygen_variable_caps_NamedBarrier[] = {spv::Capability::NamedBarrier}; +static const spv::Capability pygen_variable_caps_PipeStorage[] = {spv::Capability::PipeStorage}; +static const spv::Capability pygen_variable_caps_Pipes[] = {spv::Capability::Pipes}; +static const spv::Capability pygen_variable_caps_QuadControlKHR[] = {spv::Capability::QuadControlKHR}; +static const spv::Capability pygen_variable_caps_RawAccessChainsNV[] = {spv::Capability::RawAccessChainsNV}; +static const spv::Capability pygen_variable_caps_RayQueryKHR[] = {spv::Capability::RayQueryKHR}; +static const spv::Capability pygen_variable_caps_RayQueryPositionFetchKHR[] = {spv::Capability::RayQueryPositionFetchKHR}; +static const spv::Capability pygen_variable_caps_RayTracingKHR[] = {spv::Capability::RayTracingKHR}; +static const spv::Capability pygen_variable_caps_RayTracingKHRRayQueryKHR[] = {spv::Capability::RayTracingKHR, spv::Capability::RayQueryKHR}; +static const spv::Capability pygen_variable_caps_RayTracingMotionBlurNV[] = {spv::Capability::RayTracingMotionBlurNV}; +static const spv::Capability pygen_variable_caps_RayTracingNV[] = {spv::Capability::RayTracingNV}; +static const spv::Capability pygen_variable_caps_RayTracingNVRayTracingKHR[] = {spv::Capability::RayTracingNV, spv::Capability::RayTracingKHR}; +static const spv::Capability pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR[] = {spv::Capability::RayTracingNV, spv::Capability::RayTracingKHR, spv::Capability::RayQueryKHR}; +static const spv::Capability pygen_variable_caps_ReplicatedCompositesEXT[] = {spv::Capability::ReplicatedCompositesEXT}; +static const spv::Capability pygen_variable_caps_Shader[] = {spv::Capability::Shader}; +static const spv::Capability pygen_variable_caps_ShaderBitInstructions[] = {spv::Capability::Shader, spv::Capability::BitInstructions}; +static const spv::Capability pygen_variable_caps_ShaderClockKHR[] = {spv::Capability::ShaderClockKHR}; +static const spv::Capability pygen_variable_caps_ShaderEnqueueAMDX[] = {spv::Capability::ShaderEnqueueAMDX}; +static const spv::Capability pygen_variable_caps_ShaderInvocationReorderNV[] = {spv::Capability::ShaderInvocationReorderNV}; +static const spv::Capability pygen_variable_caps_ShaderInvocationReorderNVRayTracingMotionBlurNV[] = {spv::Capability::ShaderInvocationReorderNV, spv::Capability::RayTracingMotionBlurNV}; +static const spv::Capability pygen_variable_caps_SparseResidency[] = {spv::Capability::SparseResidency}; +static const spv::Capability pygen_variable_caps_SplitBarrierINTEL[] = {spv::Capability::SplitBarrierINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupAvcMotionEstimationINTEL[] = {spv::Capability::SubgroupAvcMotionEstimationINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL[] = {spv::Capability::SubgroupAvcMotionEstimationINTEL, spv::Capability::SubgroupAvcMotionEstimationChromaINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL[] = {spv::Capability::SubgroupAvcMotionEstimationINTEL, spv::Capability::SubgroupAvcMotionEstimationIntraINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupBallotKHR[] = {spv::Capability::SubgroupBallotKHR}; +static const spv::Capability pygen_variable_caps_SubgroupBufferBlockIOINTEL[] = {spv::Capability::SubgroupBufferBlockIOINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupDispatch[] = {spv::Capability::SubgroupDispatch}; +static const spv::Capability pygen_variable_caps_SubgroupImageBlockIOINTEL[] = {spv::Capability::SubgroupImageBlockIOINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupImageMediaBlockIOINTEL[] = {spv::Capability::SubgroupImageMediaBlockIOINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupShuffleINTEL[] = {spv::Capability::SubgroupShuffleINTEL}; +static const spv::Capability pygen_variable_caps_SubgroupVoteKHR[] = {spv::Capability::SubgroupVoteKHR}; +static const spv::Capability pygen_variable_caps_TextureBlockMatch2QCOM[] = {spv::Capability::TextureBlockMatch2QCOM}; +static const spv::Capability pygen_variable_caps_TextureBlockMatchQCOM[] = {spv::Capability::TextureBlockMatchQCOM}; +static const spv::Capability pygen_variable_caps_TextureBoxFilterQCOM[] = {spv::Capability::TextureBoxFilterQCOM}; +static const spv::Capability pygen_variable_caps_TextureSampleWeightedQCOM[] = {spv::Capability::TextureSampleWeightedQCOM}; +static const spv::Capability pygen_variable_caps_TileImageColorReadAccessEXT[] = {spv::Capability::TileImageColorReadAccessEXT}; +static const spv::Capability pygen_variable_caps_TileImageDepthReadAccessEXT[] = {spv::Capability::TileImageDepthReadAccessEXT}; +static const spv::Capability pygen_variable_caps_TileImageStencilReadAccessEXT[] = {spv::Capability::TileImageStencilReadAccessEXT}; +static const spv::Capability pygen_variable_caps_USMStorageClassesINTEL[] = {spv::Capability::USMStorageClassesINTEL}; +static const spv::Capability pygen_variable_caps_UnstructuredLoopControlsINTEL[] = {spv::Capability::UnstructuredLoopControlsINTEL}; +static const spv::Capability pygen_variable_caps_VariableLengthArrayINTEL[] = {spv::Capability::VariableLengthArrayINTEL}; +static const spv::Capability pygen_variable_caps_VectorComputeINTEL[] = {spv::Capability::VectorComputeINTEL}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_ballot[] = {spvtools::Extension::kSPV_AMD_shader_ballot}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_fragment_mask[] = {spvtools::Extension::kSPV_AMD_shader_fragment_mask}; @@ -80,14 +103,15 @@ static const spvtools::Extension pygen_variable_exts_SPV_GOOGLE_hlsl_functionali static const spvtools::Extension pygen_variable_exts_SPV_INTEL_blocking_pipes[] = {spvtools::Extension::kSPV_INTEL_blocking_pipes}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_reg[] = {spvtools::Extension::kSPV_INTEL_fpga_reg}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_function_pointers[] = {spvtools::Extension::kSPV_INTEL_function_pointers}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_memory_access_aliasing[] = {spvtools::Extension::kSPV_INTEL_memory_access_aliasing}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_unstructured_loop_controls[] = {spvtools::Extension::kSPV_INTEL_unstructured_loop_controls}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_expect_assume[] = {spvtools::Extension::kSPV_KHR_expect_assume}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_integer_dot_product[] = {spvtools::Extension::kSPV_KHR_integer_dot_product}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_query[] = {spvtools::Extension::kSPV_KHR_ray_query}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_tracing[] = {spvtools::Extension::kSPV_KHR_ray_tracing}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_tracingSPV_KHR_ray_query[] = {spvtools::Extension::kSPV_KHR_ray_tracing, spvtools::Extension::kSPV_KHR_ray_query}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_relaxed_extended_instruction[] = {spvtools::Extension::kSPV_KHR_relaxed_extended_instruction}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_ballot[] = {spvtools::Extension::kSPV_KHR_shader_ballot}; -static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_clock[] = {spvtools::Extension::kSPV_KHR_shader_clock}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_subgroup_vote[] = {spvtools::Extension::kSPV_KHR_subgroup_vote}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_terminate_invocation[] = {spvtools::Extension::kSPV_KHR_terminate_invocation}; static const spvtools::Extension pygen_variable_exts_SPV_NV_cooperative_matrix[] = {spvtools::Extension::kSPV_NV_cooperative_matrix}; @@ -100,658 +124,741 @@ static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_image_footpri static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_subgroup_partitioned[] = {spvtools::Extension::kSPV_NV_shader_subgroup_partitioned}; static const spv_opcode_desc_t kOpcodeTableEntries[] = { - {"Nop", SpvOpNop, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Undef", SpvOpUndef, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SourceContinued", SpvOpSourceContinued, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Source", SpvOpSource, 0, nullptr, 4, {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SourceExtension", SpvOpSourceExtension, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Name", SpvOpName, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MemberName", SpvOpMemberName, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"String", SpvOpString, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Line", SpvOpLine, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Extension", SpvOpExtension, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ExtInstImport", SpvOpExtInstImport, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ExtInst", SpvOpExtInst, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MemoryModel", SpvOpMemoryModel, 0, nullptr, 2, {SPV_OPERAND_TYPE_ADDRESSING_MODEL, SPV_OPERAND_TYPE_MEMORY_MODEL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EntryPoint", SpvOpEntryPoint, 0, nullptr, 4, {SPV_OPERAND_TYPE_EXECUTION_MODEL, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ExecutionMode", SpvOpExecutionMode, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXECUTION_MODE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Capability", SpvOpCapability, 0, nullptr, 1, {SPV_OPERAND_TYPE_CAPABILITY}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeVoid", SpvOpTypeVoid, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeBool", SpvOpTypeBool, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeInt", SpvOpTypeInt, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeFloat", SpvOpTypeFloat, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeVector", SpvOpTypeVector, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeMatrix", SpvOpTypeMatrix, 1, pygen_variable_caps_Matrix, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeImage", SpvOpTypeImage, 0, nullptr, 9, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DIMENSIONALITY, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT, SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeSampler", SpvOpTypeSampler, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeSampledImage", SpvOpTypeSampledImage, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeArray", SpvOpTypeArray, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeRuntimeArray", SpvOpTypeRuntimeArray, 1, pygen_variable_caps_Shader, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeStruct", SpvOpTypeStruct, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeOpaque", SpvOpTypeOpaque, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypePointer", SpvOpTypePointer, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeFunction", SpvOpTypeFunction, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeEvent", SpvOpTypeEvent, 1, pygen_variable_caps_Kernel, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeDeviceEvent", SpvOpTypeDeviceEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeReserveId", SpvOpTypeReserveId, 1, pygen_variable_caps_Pipes, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeQueue", SpvOpTypeQueue, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypePipe", SpvOpTypePipe, 1, pygen_variable_caps_Pipes, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TypeForwardPointer", SpvOpTypeForwardPointer, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_STORAGE_CLASS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstantTrue", SpvOpConstantTrue, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstantFalse", SpvOpConstantFalse, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Constant", SpvOpConstant, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstantComposite", SpvOpConstantComposite, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstantSampler", SpvOpConstantSampler, 1, pygen_variable_caps_LiteralSampler, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstantNull", SpvOpConstantNull, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecConstantTrue", SpvOpSpecConstantTrue, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecConstantFalse", SpvOpSpecConstantFalse, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecConstant", SpvOpSpecConstant, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecConstantComposite", SpvOpSpecConstantComposite, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecConstantOp", SpvOpSpecConstantOp, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Function", SpvOpFunction, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_FUNCTION_CONTROL, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FunctionParameter", SpvOpFunctionParameter, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FunctionEnd", SpvOpFunctionEnd, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FunctionCall", SpvOpFunctionCall, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Variable", SpvOpVariable, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageTexelPointer", SpvOpImageTexelPointer, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Load", SpvOpLoad, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Store", SpvOpStore, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CopyMemory", SpvOpCopyMemory, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CopyMemorySized", SpvOpCopyMemorySized, 1, pygen_variable_caps_Addresses, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AccessChain", SpvOpAccessChain, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InBoundsAccessChain", SpvOpInBoundsAccessChain, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PtrAccessChain", SpvOpPtrAccessChain, 4, pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBufferPhysicalStorageBufferAddresses, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ArrayLength", SpvOpArrayLength, 1, pygen_variable_caps_Shader, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GenericPtrMemSemantics", SpvOpGenericPtrMemSemantics, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InBoundsPtrAccessChain", SpvOpInBoundsPtrAccessChain, 1, pygen_variable_caps_Addresses, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Decorate", SpvOpDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MemberDecorate", SpvOpMemberDecorate, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DecorationGroup", SpvOpDecorationGroup, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupDecorate", SpvOpGroupDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupMemberDecorate", SpvOpGroupMemberDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VectorExtractDynamic", SpvOpVectorExtractDynamic, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VectorInsertDynamic", SpvOpVectorInsertDynamic, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VectorShuffle", SpvOpVectorShuffle, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CompositeConstruct", SpvOpCompositeConstruct, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CompositeExtract", SpvOpCompositeExtract, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CompositeInsert", SpvOpCompositeInsert, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CopyObject", SpvOpCopyObject, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Transpose", SpvOpTranspose, 1, pygen_variable_caps_Matrix, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampledImage", SpvOpSampledImage, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleImplicitLod", SpvOpImageSampleImplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleExplicitLod", SpvOpImageSampleExplicitLod, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleDrefImplicitLod", SpvOpImageSampleDrefImplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleDrefExplicitLod", SpvOpImageSampleDrefExplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleProjImplicitLod", SpvOpImageSampleProjImplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleProjExplicitLod", SpvOpImageSampleProjExplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleProjDrefImplicitLod", SpvOpImageSampleProjDrefImplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSampleProjDrefExplicitLod", SpvOpImageSampleProjDrefExplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageFetch", SpvOpImageFetch, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageGather", SpvOpImageGather, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageDrefGather", SpvOpImageDrefGather, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageRead", SpvOpImageRead, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageWrite", SpvOpImageWrite, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Image", SpvOpImage, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQueryFormat", SpvOpImageQueryFormat, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQueryOrder", SpvOpImageQueryOrder, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQuerySizeLod", SpvOpImageQuerySizeLod, 2, pygen_variable_caps_KernelImageQuery, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQuerySize", SpvOpImageQuerySize, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQueryLod", SpvOpImageQueryLod, 1, pygen_variable_caps_ImageQuery, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQueryLevels", SpvOpImageQueryLevels, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQuerySamples", SpvOpImageQuerySamples, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertFToU", SpvOpConvertFToU, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertFToS", SpvOpConvertFToS, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertSToF", SpvOpConvertSToF, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertUToF", SpvOpConvertUToF, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UConvert", SpvOpUConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SConvert", SpvOpSConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FConvert", SpvOpFConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"QuantizeToF16", SpvOpQuantizeToF16, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertPtrToU", SpvOpConvertPtrToU, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SatConvertSToU", SpvOpSatConvertSToU, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SatConvertUToS", SpvOpSatConvertUToS, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConvertUToPtr", SpvOpConvertUToPtr, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PtrCastToGeneric", SpvOpPtrCastToGeneric, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GenericCastToPtr", SpvOpGenericCastToPtr, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GenericCastToPtrExplicit", SpvOpGenericCastToPtrExplicit, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_STORAGE_CLASS}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Bitcast", SpvOpBitcast, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SNegate", SpvOpSNegate, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FNegate", SpvOpFNegate, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IAdd", SpvOpIAdd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FAdd", SpvOpFAdd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ISub", SpvOpISub, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FSub", SpvOpFSub, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IMul", SpvOpIMul, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FMul", SpvOpFMul, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UDiv", SpvOpUDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SDiv", SpvOpSDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FDiv", SpvOpFDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UMod", SpvOpUMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SRem", SpvOpSRem, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SMod", SpvOpSMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FRem", SpvOpFRem, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FMod", SpvOpFMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VectorTimesScalar", SpvOpVectorTimesScalar, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MatrixTimesScalar", SpvOpMatrixTimesScalar, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VectorTimesMatrix", SpvOpVectorTimesMatrix, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MatrixTimesVector", SpvOpMatrixTimesVector, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MatrixTimesMatrix", SpvOpMatrixTimesMatrix, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OuterProduct", SpvOpOuterProduct, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Dot", SpvOpDot, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IAddCarry", SpvOpIAddCarry, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ISubBorrow", SpvOpISubBorrow, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UMulExtended", SpvOpUMulExtended, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SMulExtended", SpvOpSMulExtended, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Any", SpvOpAny, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"All", SpvOpAll, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsNan", SpvOpIsNan, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsInf", SpvOpIsInf, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsFinite", SpvOpIsFinite, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsNormal", SpvOpIsNormal, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SignBitSet", SpvOpSignBitSet, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LessOrGreater", SpvOpLessOrGreater, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), SPV_SPIRV_VERSION_WORD(1,5)}, - {"Ordered", SpvOpOrdered, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Unordered", SpvOpUnordered, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LogicalEqual", SpvOpLogicalEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LogicalNotEqual", SpvOpLogicalNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LogicalOr", SpvOpLogicalOr, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LogicalAnd", SpvOpLogicalAnd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LogicalNot", SpvOpLogicalNot, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Select", SpvOpSelect, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IEqual", SpvOpIEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"INotEqual", SpvOpINotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UGreaterThan", SpvOpUGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SGreaterThan", SpvOpSGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UGreaterThanEqual", SpvOpUGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SGreaterThanEqual", SpvOpSGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ULessThan", SpvOpULessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SLessThan", SpvOpSLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ULessThanEqual", SpvOpULessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SLessThanEqual", SpvOpSLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdEqual", SpvOpFOrdEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordEqual", SpvOpFUnordEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdNotEqual", SpvOpFOrdNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordNotEqual", SpvOpFUnordNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdLessThan", SpvOpFOrdLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordLessThan", SpvOpFUnordLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdGreaterThan", SpvOpFOrdGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordGreaterThan", SpvOpFUnordGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdLessThanEqual", SpvOpFOrdLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordLessThanEqual", SpvOpFUnordLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FOrdGreaterThanEqual", SpvOpFOrdGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FUnordGreaterThanEqual", SpvOpFUnordGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ShiftRightLogical", SpvOpShiftRightLogical, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ShiftRightArithmetic", SpvOpShiftRightArithmetic, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ShiftLeftLogical", SpvOpShiftLeftLogical, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitwiseOr", SpvOpBitwiseOr, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitwiseXor", SpvOpBitwiseXor, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitwiseAnd", SpvOpBitwiseAnd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Not", SpvOpNot, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitFieldInsert", SpvOpBitFieldInsert, 2, pygen_variable_caps_ShaderBitInstructions, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitFieldSExtract", SpvOpBitFieldSExtract, 2, pygen_variable_caps_ShaderBitInstructions, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitFieldUExtract", SpvOpBitFieldUExtract, 2, pygen_variable_caps_ShaderBitInstructions, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitReverse", SpvOpBitReverse, 2, pygen_variable_caps_ShaderBitInstructions, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BitCount", SpvOpBitCount, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdx", SpvOpDPdx, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdy", SpvOpDPdy, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Fwidth", SpvOpFwidth, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdxFine", SpvOpDPdxFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdyFine", SpvOpDPdyFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FwidthFine", SpvOpFwidthFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdxCoarse", SpvOpDPdxCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DPdyCoarse", SpvOpDPdyCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FwidthCoarse", SpvOpFwidthCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EmitVertex", SpvOpEmitVertex, 1, pygen_variable_caps_Geometry, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EndPrimitive", SpvOpEndPrimitive, 1, pygen_variable_caps_Geometry, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EmitStreamVertex", SpvOpEmitStreamVertex, 1, pygen_variable_caps_GeometryStreams, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EndStreamPrimitive", SpvOpEndStreamPrimitive, 1, pygen_variable_caps_GeometryStreams, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ControlBarrier", SpvOpControlBarrier, 0, nullptr, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MemoryBarrier", SpvOpMemoryBarrier, 0, nullptr, 2, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicLoad", SpvOpAtomicLoad, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicStore", SpvOpAtomicStore, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicExchange", SpvOpAtomicExchange, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicCompareExchange", SpvOpAtomicCompareExchange, 0, nullptr, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicCompareExchangeWeak", SpvOpAtomicCompareExchangeWeak, 1, pygen_variable_caps_Kernel, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), SPV_SPIRV_VERSION_WORD(1,3)}, - {"AtomicIIncrement", SpvOpAtomicIIncrement, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicIDecrement", SpvOpAtomicIDecrement, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicIAdd", SpvOpAtomicIAdd, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicISub", SpvOpAtomicISub, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicSMin", SpvOpAtomicSMin, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicUMin", SpvOpAtomicUMin, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicSMax", SpvOpAtomicSMax, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicUMax", SpvOpAtomicUMax, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicAnd", SpvOpAtomicAnd, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicOr", SpvOpAtomicOr, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicXor", SpvOpAtomicXor, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Phi", SpvOpPhi, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LoopMerge", SpvOpLoopMerge, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LOOP_CONTROL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SelectionMerge", SpvOpSelectionMerge, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SELECTION_CONTROL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Label", SpvOpLabel, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Branch", SpvOpBranch, 0, nullptr, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BranchConditional", SpvOpBranchConditional, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Switch", SpvOpSwitch, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Kill", SpvOpKill, 1, pygen_variable_caps_Shader, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Return", SpvOpReturn, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReturnValue", SpvOpReturnValue, 0, nullptr, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Unreachable", SpvOpUnreachable, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LifetimeStart", SpvOpLifetimeStart, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LifetimeStop", SpvOpLifetimeStop, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupAsyncCopy", SpvOpGroupAsyncCopy, 1, pygen_variable_caps_Kernel, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupWaitEvents", SpvOpGroupWaitEvents, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupAll", SpvOpGroupAll, 1, pygen_variable_caps_Groups, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupAny", SpvOpGroupAny, 1, pygen_variable_caps_Groups, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupBroadcast", SpvOpGroupBroadcast, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupIAdd", SpvOpGroupIAdd, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupFAdd", SpvOpGroupFAdd, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupFMin", SpvOpGroupFMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupUMin", SpvOpGroupUMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupSMin", SpvOpGroupSMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupFMax", SpvOpGroupFMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupUMax", SpvOpGroupUMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupSMax", SpvOpGroupSMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReadPipe", SpvOpReadPipe, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WritePipe", SpvOpWritePipe, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReservedReadPipe", SpvOpReservedReadPipe, 1, pygen_variable_caps_Pipes, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReservedWritePipe", SpvOpReservedWritePipe, 1, pygen_variable_caps_Pipes, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReserveReadPipePackets", SpvOpReserveReadPipePackets, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReserveWritePipePackets", SpvOpReserveWritePipePackets, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CommitReadPipe", SpvOpCommitReadPipe, 1, pygen_variable_caps_Pipes, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CommitWritePipe", SpvOpCommitWritePipe, 1, pygen_variable_caps_Pipes, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsValidReserveId", SpvOpIsValidReserveId, 1, pygen_variable_caps_Pipes, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetNumPipePackets", SpvOpGetNumPipePackets, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetMaxPipePackets", SpvOpGetMaxPipePackets, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupReserveReadPipePackets", SpvOpGroupReserveReadPipePackets, 1, pygen_variable_caps_Pipes, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupReserveWritePipePackets", SpvOpGroupReserveWritePipePackets, 1, pygen_variable_caps_Pipes, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupCommitReadPipe", SpvOpGroupCommitReadPipe, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GroupCommitWritePipe", SpvOpGroupCommitWritePipe, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EnqueueMarker", SpvOpEnqueueMarker, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EnqueueKernel", SpvOpEnqueueKernel, 1, pygen_variable_caps_DeviceEnqueue, 13, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetKernelNDrangeSubGroupCount", SpvOpGetKernelNDrangeSubGroupCount, 1, pygen_variable_caps_DeviceEnqueue, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetKernelNDrangeMaxSubGroupSize", SpvOpGetKernelNDrangeMaxSubGroupSize, 1, pygen_variable_caps_DeviceEnqueue, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetKernelWorkGroupSize", SpvOpGetKernelWorkGroupSize, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetKernelPreferredWorkGroupSizeMultiple", SpvOpGetKernelPreferredWorkGroupSizeMultiple, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RetainEvent", SpvOpRetainEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReleaseEvent", SpvOpReleaseEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CreateUserEvent", SpvOpCreateUserEvent, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"IsValidEvent", SpvOpIsValidEvent, 1, pygen_variable_caps_DeviceEnqueue, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SetUserEventStatus", SpvOpSetUserEventStatus, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CaptureEventProfilingInfo", SpvOpCaptureEventProfilingInfo, 1, pygen_variable_caps_DeviceEnqueue, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GetDefaultQueue", SpvOpGetDefaultQueue, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BuildNDRange", SpvOpBuildNDRange, 1, pygen_variable_caps_DeviceEnqueue, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseSampleImplicitLod", SpvOpImageSparseSampleImplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseSampleExplicitLod", SpvOpImageSparseSampleExplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseSampleDrefImplicitLod", SpvOpImageSparseSampleDrefImplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseSampleDrefExplicitLod", SpvOpImageSparseSampleDrefExplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseSampleProjImplicitLod", SpvOpImageSparseSampleProjImplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ImageSparseSampleProjExplicitLod", SpvOpImageSparseSampleProjExplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ImageSparseSampleProjDrefImplicitLod", SpvOpImageSparseSampleProjDrefImplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ImageSparseSampleProjDrefExplicitLod", SpvOpImageSparseSampleProjDrefExplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ImageSparseFetch", SpvOpImageSparseFetch, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseGather", SpvOpImageSparseGather, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseDrefGather", SpvOpImageSparseDrefGather, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseTexelsResident", SpvOpImageSparseTexelsResident, 1, pygen_variable_caps_SparseResidency, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoLine", SpvOpNoLine, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicFlagTestAndSet", SpvOpAtomicFlagTestAndSet, 1, pygen_variable_caps_Kernel, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicFlagClear", SpvOpAtomicFlagClear, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageSparseRead", SpvOpImageSparseRead, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SizeOf", SpvOpSizeOf, 1, pygen_variable_caps_Addresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"TypePipeStorage", SpvOpTypePipeStorage, 1, pygen_variable_caps_PipeStorage, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"ConstantPipeStorage", SpvOpConstantPipeStorage, 1, pygen_variable_caps_PipeStorage, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"CreatePipeFromPipeStorage", SpvOpCreatePipeFromPipeStorage, 1, pygen_variable_caps_PipeStorage, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"GetKernelLocalSizeForSubgroupCount", SpvOpGetKernelLocalSizeForSubgroupCount, 1, pygen_variable_caps_SubgroupDispatch, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"GetKernelMaxNumSubgroups", SpvOpGetKernelMaxNumSubgroups, 1, pygen_variable_caps_SubgroupDispatch, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"TypeNamedBarrier", SpvOpTypeNamedBarrier, 1, pygen_variable_caps_NamedBarrier, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"NamedBarrierInitialize", SpvOpNamedBarrierInitialize, 1, pygen_variable_caps_NamedBarrier, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"MemoryNamedBarrier", SpvOpMemoryNamedBarrier, 1, pygen_variable_caps_NamedBarrier, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"ModuleProcessed", SpvOpModuleProcessed, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, - {"ExecutionModeId", SpvOpExecutionModeId, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXECUTION_MODE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, - {"DecorateId", SpvOpDecorateId, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 1, pygen_variable_exts_SPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, - {"GroupNonUniformElect", SpvOpGroupNonUniformElect, 1, pygen_variable_caps_GroupNonUniform, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformAll", SpvOpGroupNonUniformAll, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformAny", SpvOpGroupNonUniformAny, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformAllEqual", SpvOpGroupNonUniformAllEqual, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBroadcast", SpvOpGroupNonUniformBroadcast, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBroadcastFirst", SpvOpGroupNonUniformBroadcastFirst, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBallot", SpvOpGroupNonUniformBallot, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformInverseBallot", SpvOpGroupNonUniformInverseBallot, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBallotBitExtract", SpvOpGroupNonUniformBallotBitExtract, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBallotBitCount", SpvOpGroupNonUniformBallotBitCount, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBallotFindLSB", SpvOpGroupNonUniformBallotFindLSB, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBallotFindMSB", SpvOpGroupNonUniformBallotFindMSB, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformShuffle", SpvOpGroupNonUniformShuffle, 1, pygen_variable_caps_GroupNonUniformShuffle, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformShuffleXor", SpvOpGroupNonUniformShuffleXor, 1, pygen_variable_caps_GroupNonUniformShuffle, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformShuffleUp", SpvOpGroupNonUniformShuffleUp, 1, pygen_variable_caps_GroupNonUniformShuffleRelative, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformShuffleDown", SpvOpGroupNonUniformShuffleDown, 1, pygen_variable_caps_GroupNonUniformShuffleRelative, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformIAdd", SpvOpGroupNonUniformIAdd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformFAdd", SpvOpGroupNonUniformFAdd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformIMul", SpvOpGroupNonUniformIMul, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformFMul", SpvOpGroupNonUniformFMul, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformSMin", SpvOpGroupNonUniformSMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformUMin", SpvOpGroupNonUniformUMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformFMin", SpvOpGroupNonUniformFMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformSMax", SpvOpGroupNonUniformSMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformUMax", SpvOpGroupNonUniformUMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformFMax", SpvOpGroupNonUniformFMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBitwiseAnd", SpvOpGroupNonUniformBitwiseAnd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBitwiseOr", SpvOpGroupNonUniformBitwiseOr, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformBitwiseXor", SpvOpGroupNonUniformBitwiseXor, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformLogicalAnd", SpvOpGroupNonUniformLogicalAnd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformLogicalOr", SpvOpGroupNonUniformLogicalOr, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformLogicalXor", SpvOpGroupNonUniformLogicalXor, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformQuadBroadcast", SpvOpGroupNonUniformQuadBroadcast, 1, pygen_variable_caps_GroupNonUniformQuad, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"GroupNonUniformQuadSwap", SpvOpGroupNonUniformQuadSwap, 1, pygen_variable_caps_GroupNonUniformQuad, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"CopyLogical", SpvOpCopyLogical, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"PtrEqual", SpvOpPtrEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"PtrNotEqual", SpvOpPtrNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"PtrDiff", SpvOpPtrDiff, 3, pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBuffer, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"TerminateInvocation", SpvOpTerminateInvocation, 1, pygen_variable_caps_Shader, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_terminate_invocation, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SubgroupBallotKHR", SpvOpSubgroupBallotKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"SubgroupFirstInvocationKHR", SpvOpSubgroupFirstInvocationKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"SubgroupAllKHR", SpvOpSubgroupAllKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, - {"SubgroupAnyKHR", SpvOpSubgroupAnyKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, - {"SubgroupAllEqualKHR", SpvOpSubgroupAllEqualKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, - {"SubgroupReadInvocationKHR", SpvOpSubgroupReadInvocationKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"TraceRayKHR", SpvOpTraceRayKHR, 1, pygen_variable_caps_RayTracingKHR, 11, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"ExecuteCallableKHR", SpvOpExecuteCallableKHR, 1, pygen_variable_caps_RayTracingKHR, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"ConvertUToAccelerationStructureKHR", SpvOpConvertUToAccelerationStructureKHR, 2, pygen_variable_caps_RayTracingKHRRayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"IgnoreIntersectionKHR", SpvOpIgnoreIntersectionKHR, 1, pygen_variable_caps_RayTracingKHR, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"TerminateRayKHR", SpvOpTerminateRayKHR, 1, pygen_variable_caps_RayTracingKHR, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"SDot", SpvOpSDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SDotKHR", SpvOpSDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"UDot", SpvOpUDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"UDotKHR", SpvOpUDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SUDot", SpvOpSUDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SUDotKHR", SpvOpSUDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SDotAccSat", SpvOpSDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SDotAccSatKHR", SpvOpSDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"UDotAccSat", SpvOpUDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"UDotAccSatKHR", SpvOpUDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SUDotAccSat", SpvOpSUDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"SUDotAccSatKHR", SpvOpSUDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"TypeRayQueryKHR", SpvOpTypeRayQueryKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryInitializeKHR", SpvOpRayQueryInitializeKHR, 1, pygen_variable_caps_RayQueryKHR, 8, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryTerminateKHR", SpvOpRayQueryTerminateKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGenerateIntersectionKHR", SpvOpRayQueryGenerateIntersectionKHR, 1, pygen_variable_caps_RayQueryKHR, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryConfirmIntersectionKHR", SpvOpRayQueryConfirmIntersectionKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryProceedKHR", SpvOpRayQueryProceedKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionTypeKHR", SpvOpRayQueryGetIntersectionTypeKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"GroupIAddNonUniformAMD", SpvOpGroupIAddNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupFAddNonUniformAMD", SpvOpGroupFAddNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupFMinNonUniformAMD", SpvOpGroupFMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupUMinNonUniformAMD", SpvOpGroupUMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupSMinNonUniformAMD", SpvOpGroupSMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupFMaxNonUniformAMD", SpvOpGroupFMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupUMaxNonUniformAMD", SpvOpGroupUMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"GroupSMaxNonUniformAMD", SpvOpGroupSMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, - {"FragmentMaskFetchAMD", SpvOpFragmentMaskFetchAMD, 1, pygen_variable_caps_FragmentMaskAMD, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_fragment_mask, 0xffffffffu, 0xffffffffu}, - {"FragmentFetchAMD", SpvOpFragmentFetchAMD, 1, pygen_variable_caps_FragmentMaskAMD, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_fragment_mask, 0xffffffffu, 0xffffffffu}, - {"ReadClockKHR", SpvOpReadClockKHR, 1, pygen_variable_caps_ShaderClockKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_clock, 0xffffffffu, 0xffffffffu}, - {"ImageSampleFootprintNV", SpvOpImageSampleFootprintNV, 1, pygen_variable_caps_ImageFootprintNV, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 1, pygen_variable_exts_SPV_NV_shader_image_footprint, 0xffffffffu, 0xffffffffu}, - {"GroupNonUniformPartitionNV", SpvOpGroupNonUniformPartitionNV, 1, pygen_variable_caps_GroupNonUniformPartitionedNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_shader_subgroup_partitioned, 0xffffffffu, 0xffffffffu}, - {"WritePackedPrimitiveIndices4x8NV", SpvOpWritePackedPrimitiveIndices4x8NV, 1, pygen_variable_caps_MeshShadingNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_mesh_shader, 0xffffffffu, 0xffffffffu}, - {"ReportIntersectionKHR", SpvOpReportIntersectionKHR, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"ReportIntersectionNV", SpvOpReportIntersectionNV, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"IgnoreIntersectionNV", SpvOpIgnoreIntersectionNV, 1, pygen_variable_caps_RayTracingNV, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"TerminateRayNV", SpvOpTerminateRayNV, 1, pygen_variable_caps_RayTracingNV, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"TraceNV", SpvOpTraceNV, 1, pygen_variable_caps_RayTracingNV, 11, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"TraceMotionNV", SpvOpTraceMotionNV, 1, pygen_variable_caps_RayTracingMotionBlurNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, 0xffffffffu, 0xffffffffu}, - {"TraceRayMotionNV", SpvOpTraceRayMotionNV, 1, pygen_variable_caps_RayTracingMotionBlurNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, 0xffffffffu, 0xffffffffu}, - {"TypeAccelerationStructureKHR", SpvOpTypeAccelerationStructureKHR, 3, pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 3, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"TypeAccelerationStructureNV", SpvOpTypeAccelerationStructureNV, 3, pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 3, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"ExecuteCallableNV", SpvOpExecuteCallableNV, 1, pygen_variable_caps_RayTracingNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, - {"TypeCooperativeMatrixNV", SpvOpTypeCooperativeMatrixNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, - {"CooperativeMatrixLoadNV", SpvOpCooperativeMatrixLoadNV, 1, pygen_variable_caps_CooperativeMatrixNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, - {"CooperativeMatrixStoreNV", SpvOpCooperativeMatrixStoreNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, - {"CooperativeMatrixMulAddNV", SpvOpCooperativeMatrixMulAddNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, - {"CooperativeMatrixLengthNV", SpvOpCooperativeMatrixLengthNV, 1, pygen_variable_caps_CooperativeMatrixNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, - {"BeginInvocationInterlockEXT", SpvOpBeginInvocationInterlockEXT, 3, pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, 0xffffffffu, 0xffffffffu}, - {"EndInvocationInterlockEXT", SpvOpEndInvocationInterlockEXT, 3, pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, 0xffffffffu, 0xffffffffu}, - {"DemoteToHelperInvocation", SpvOpDemoteToHelperInvocation, 1, pygen_variable_caps_DemoteToHelperInvocation, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"DemoteToHelperInvocationEXT", SpvOpDemoteToHelperInvocationEXT, 1, pygen_variable_caps_DemoteToHelperInvocation, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"IsHelperInvocationEXT", SpvOpIsHelperInvocationEXT, 1, pygen_variable_caps_DemoteToHelperInvocationEXT, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 1, pygen_variable_exts_SPV_EXT_demote_to_helper_invocation, 0xffffffffu, 0xffffffffu}, - {"ConvertUToImageNV", SpvOpConvertUToImageNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConvertUToSamplerNV", SpvOpConvertUToSamplerNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConvertImageToUNV", SpvOpConvertImageToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConvertSamplerToUNV", SpvOpConvertSamplerToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConvertUToSampledImageNV", SpvOpConvertUToSampledImageNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConvertSampledImageToUNV", SpvOpConvertSampledImageToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SamplerImageAddressingModeNV", SpvOpSamplerImageAddressingModeNV, 1, pygen_variable_caps_BindlessTextureNV, 1, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupShuffleINTEL", SpvOpSubgroupShuffleINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupShuffleDownINTEL", SpvOpSubgroupShuffleDownINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupShuffleUpINTEL", SpvOpSubgroupShuffleUpINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupShuffleXorINTEL", SpvOpSubgroupShuffleXorINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupBlockReadINTEL", SpvOpSubgroupBlockReadINTEL, 1, pygen_variable_caps_SubgroupBufferBlockIOINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupBlockWriteINTEL", SpvOpSubgroupBlockWriteINTEL, 1, pygen_variable_caps_SubgroupBufferBlockIOINTEL, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupImageBlockReadINTEL", SpvOpSubgroupImageBlockReadINTEL, 1, pygen_variable_caps_SubgroupImageBlockIOINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupImageBlockWriteINTEL", SpvOpSubgroupImageBlockWriteINTEL, 1, pygen_variable_caps_SubgroupImageBlockIOINTEL, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupImageMediaBlockReadINTEL", SpvOpSubgroupImageMediaBlockReadINTEL, 1, pygen_variable_caps_SubgroupImageMediaBlockIOINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupImageMediaBlockWriteINTEL", SpvOpSubgroupImageMediaBlockWriteINTEL, 1, pygen_variable_caps_SubgroupImageMediaBlockIOINTEL, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UCountLeadingZerosINTEL", SpvOpUCountLeadingZerosINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UCountTrailingZerosINTEL", SpvOpUCountTrailingZerosINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AbsISubINTEL", SpvOpAbsISubINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AbsUSubINTEL", SpvOpAbsUSubINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"IAddSatINTEL", SpvOpIAddSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UAddSatINTEL", SpvOpUAddSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"IAverageINTEL", SpvOpIAverageINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UAverageINTEL", SpvOpUAverageINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"IAverageRoundedINTEL", SpvOpIAverageRoundedINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UAverageRoundedINTEL", SpvOpUAverageRoundedINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ISubSatINTEL", SpvOpISubSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"USubSatINTEL", SpvOpUSubSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"IMul32x16INTEL", SpvOpIMul32x16INTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"UMul32x16INTEL", SpvOpUMul32x16INTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConstantFunctionPointerINTEL", SpvOpConstantFunctionPointerINTEL, 1, pygen_variable_caps_FunctionPointersINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_function_pointers, 0xffffffffu, 0xffffffffu}, - {"FunctionPointerCallINTEL", SpvOpFunctionPointerCallINTEL, 1, pygen_variable_caps_FunctionPointersINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_function_pointers, 0xffffffffu, 0xffffffffu}, - {"AsmTargetINTEL", SpvOpAsmTargetINTEL, 1, pygen_variable_caps_AsmINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AsmINTEL", SpvOpAsmINTEL, 1, pygen_variable_caps_AsmINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AsmCallINTEL", SpvOpAsmCallINTEL, 1, pygen_variable_caps_AsmINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AtomicFMinEXT", SpvOpAtomicFMinEXT, 3, pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXT, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AtomicFMaxEXT", SpvOpAtomicFMaxEXT, 3, pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXT, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"AssumeTrueKHR", SpvOpAssumeTrueKHR, 1, pygen_variable_caps_ExpectAssumeKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_expect_assume, 0xffffffffu, 0xffffffffu}, - {"ExpectKHR", SpvOpExpectKHR, 1, pygen_variable_caps_ExpectAssumeKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_expect_assume, 0xffffffffu, 0xffffffffu}, - {"DecorateString", SpvOpDecorateString, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"DecorateStringGOOGLE", SpvOpDecorateStringGOOGLE, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"MemberDecorateString", SpvOpMemberDecorateString, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"MemberDecorateStringGOOGLE", SpvOpMemberDecorateStringGOOGLE, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"VmeImageINTEL", SpvOpVmeImageINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeVmeImageINTEL", SpvOpTypeVmeImageINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImePayloadINTEL", SpvOpTypeAvcImePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcRefPayloadINTEL", SpvOpTypeAvcRefPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcSicPayloadINTEL", SpvOpTypeAvcSicPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcMcePayloadINTEL", SpvOpTypeAvcMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcMceResultINTEL", SpvOpTypeAvcMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImeResultINTEL", SpvOpTypeAvcImeResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImeResultSingleReferenceStreamoutINTEL", SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImeResultDualReferenceStreamoutINTEL", SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImeSingleReferenceStreaminINTEL", SpvOpTypeAvcImeSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcImeDualReferenceStreaminINTEL", SpvOpTypeAvcImeDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcRefResultINTEL", SpvOpTypeAvcRefResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeAvcSicResultINTEL", SpvOpTypeAvcSicResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultInterShapePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetInterShapePenaltyINTEL", SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetInterDirectionPenaltyINTEL", SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetMotionVectorCostFunctionINTEL", SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetAcOnlyHaarINTEL", SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToImePayloadINTEL", SpvOpSubgroupAvcMceConvertToImePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToImeResultINTEL", SpvOpSubgroupAvcMceConvertToImeResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToRefPayloadINTEL", SpvOpSubgroupAvcMceConvertToRefPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToRefResultINTEL", SpvOpSubgroupAvcMceConvertToRefResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToSicPayloadINTEL", SpvOpSubgroupAvcMceConvertToSicPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceConvertToSicResultINTEL", SpvOpSubgroupAvcMceConvertToSicResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetMotionVectorsINTEL", SpvOpSubgroupAvcMceGetMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterDistortionsINTEL", SpvOpSubgroupAvcMceGetInterDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetBestInterDistortionsINTEL", SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterMajorShapeINTEL", SpvOpSubgroupAvcMceGetInterMajorShapeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterMinorShapeINTEL", SpvOpSubgroupAvcMceGetInterMinorShapeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterDirectionsINTEL", SpvOpSubgroupAvcMceGetInterDirectionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterMotionVectorCountINTEL", SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterReferenceIdsINTEL", SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeInitializeINTEL", SpvOpSubgroupAvcImeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetSingleReferenceINTEL", SpvOpSubgroupAvcImeSetSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetDualReferenceINTEL", SpvOpSubgroupAvcImeSetDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeRefWindowSizeINTEL", SpvOpSubgroupAvcImeRefWindowSizeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeAdjustRefOffsetINTEL", SpvOpSubgroupAvcImeAdjustRefOffsetINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeConvertToMcePayloadINTEL", SpvOpSubgroupAvcImeConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetMaxMotionVectorCountINTEL", SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetUnidirectionalMixDisableINTEL", SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeSetWeightedSadINTEL", SpvOpSubgroupAvcImeSetWeightedSadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeConvertToMceResultINTEL", SpvOpSubgroupAvcImeConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetSingleReferenceStreaminINTEL", SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetDualReferenceStreaminINTEL", SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeStripSingleReferenceStreamoutINTEL", SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeStripDualReferenceStreamoutINTEL", SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetBorderReachedINTEL", SpvOpSubgroupAvcImeGetBorderReachedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetTruncatedSearchIndicationINTEL", SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcFmeInitializeINTEL", SpvOpSubgroupAvcFmeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcBmeInitializeINTEL", SpvOpSubgroupAvcBmeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefConvertToMcePayloadINTEL", SpvOpSubgroupAvcRefConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefSetBidirectionalMixDisableINTEL", SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefSetBilinearFilterEnableINTEL", SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefEvaluateWithMultiReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcRefConvertToMceResultINTEL", SpvOpSubgroupAvcRefConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicInitializeINTEL", SpvOpSubgroupAvcSicInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicConfigureSkcINTEL", SpvOpSubgroupAvcSicConfigureSkcINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicConfigureIpeLumaINTEL", SpvOpSubgroupAvcSicConfigureIpeLumaINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicConfigureIpeLumaChromaINTEL", SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 13, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetMotionVectorMaskINTEL", SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicConvertToMcePayloadINTEL", SpvOpSubgroupAvcSicConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetIntraLumaShapePenaltyINTEL", SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetBilinearFilterEnableINTEL", SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetSkcForwardTransformEnableINTEL", SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicSetBlockBasedRawSkipSadINTEL", SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicEvaluateIpeINTEL", SpvOpSubgroupAvcSicEvaluateIpeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicEvaluateWithMultiReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicConvertToMceResultINTEL", SpvOpSubgroupAvcSicConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetIpeLumaShapeINTEL", SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetBestIpeLumaDistortionINTEL", SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetBestIpeChromaDistortionINTEL", SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetPackedIpeLumaModesINTEL", SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetIpeChromaModeINTEL", SpvOpSubgroupAvcSicGetIpeChromaModeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SubgroupAvcSicGetInterRawSadsINTEL", SpvOpSubgroupAvcSicGetInterRawSadsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"VariableLengthArrayINTEL", SpvOpVariableLengthArrayINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SaveMemoryINTEL", SpvOpSaveMemoryINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"RestoreMemoryINTEL", SpvOpRestoreMemoryINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSinCosPiINTEL", SpvOpArbitraryFloatSinCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCastINTEL", SpvOpArbitraryFloatCastINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCastFromIntINTEL", SpvOpArbitraryFloatCastFromIntINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCastToIntINTEL", SpvOpArbitraryFloatCastToIntINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatAddINTEL", SpvOpArbitraryFloatAddINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSubINTEL", SpvOpArbitraryFloatSubINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatMulINTEL", SpvOpArbitraryFloatMulINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatDivINTEL", SpvOpArbitraryFloatDivINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatGTINTEL", SpvOpArbitraryFloatGTINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatGEINTEL", SpvOpArbitraryFloatGEINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLTINTEL", SpvOpArbitraryFloatLTINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLEINTEL", SpvOpArbitraryFloatLEINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatEQINTEL", SpvOpArbitraryFloatEQINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatRecipINTEL", SpvOpArbitraryFloatRecipINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatRSqrtINTEL", SpvOpArbitraryFloatRSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCbrtINTEL", SpvOpArbitraryFloatCbrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatHypotINTEL", SpvOpArbitraryFloatHypotINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSqrtINTEL", SpvOpArbitraryFloatSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLogINTEL", SpvOpArbitraryFloatLogINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLog2INTEL", SpvOpArbitraryFloatLog2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLog10INTEL", SpvOpArbitraryFloatLog10INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatLog1pINTEL", SpvOpArbitraryFloatLog1pINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatExpINTEL", SpvOpArbitraryFloatExpINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatExp2INTEL", SpvOpArbitraryFloatExp2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatExp10INTEL", SpvOpArbitraryFloatExp10INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatExpm1INTEL", SpvOpArbitraryFloatExpm1INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSinINTEL", SpvOpArbitraryFloatSinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCosINTEL", SpvOpArbitraryFloatCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSinCosINTEL", SpvOpArbitraryFloatSinCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatSinPiINTEL", SpvOpArbitraryFloatSinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatCosPiINTEL", SpvOpArbitraryFloatCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatASinINTEL", SpvOpArbitraryFloatASinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatASinPiINTEL", SpvOpArbitraryFloatASinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatACosINTEL", SpvOpArbitraryFloatACosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatACosPiINTEL", SpvOpArbitraryFloatACosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatATanINTEL", SpvOpArbitraryFloatATanINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatATanPiINTEL", SpvOpArbitraryFloatATanPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatATan2INTEL", SpvOpArbitraryFloatATan2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatPowINTEL", SpvOpArbitraryFloatPowINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatPowRINTEL", SpvOpArbitraryFloatPowRINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ArbitraryFloatPowNINTEL", SpvOpArbitraryFloatPowNINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"LoopControlINTEL", SpvOpLoopControlINTEL, 1, pygen_variable_caps_UnstructuredLoopControlsINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 0, 0, 1, pygen_variable_exts_SPV_INTEL_unstructured_loop_controls, 0xffffffffu, 0xffffffffu}, - {"FixedSqrtINTEL", SpvOpFixedSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedRecipINTEL", SpvOpFixedRecipINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedRsqrtINTEL", SpvOpFixedRsqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedSinINTEL", SpvOpFixedSinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedCosINTEL", SpvOpFixedCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedSinCosINTEL", SpvOpFixedSinCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedSinPiINTEL", SpvOpFixedSinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedCosPiINTEL", SpvOpFixedCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedSinCosPiINTEL", SpvOpFixedSinCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedLogINTEL", SpvOpFixedLogINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"FixedExpINTEL", SpvOpFixedExpINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"PtrCastToCrossWorkgroupINTEL", SpvOpPtrCastToCrossWorkgroupINTEL, 1, pygen_variable_caps_USMStorageClassesINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"CrossWorkgroupCastToPtrINTEL", SpvOpCrossWorkgroupCastToPtrINTEL, 1, pygen_variable_caps_USMStorageClassesINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ReadPipeBlockingINTEL", SpvOpReadPipeBlockingINTEL, 1, pygen_variable_caps_BlockingPipesINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_blocking_pipes, 0xffffffffu, 0xffffffffu}, - {"WritePipeBlockingINTEL", SpvOpWritePipeBlockingINTEL, 1, pygen_variable_caps_BlockingPipesINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_blocking_pipes, 0xffffffffu, 0xffffffffu}, - {"FPGARegINTEL", SpvOpFPGARegINTEL, 1, pygen_variable_caps_FPGARegINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_fpga_reg, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetRayTMinKHR", SpvOpRayQueryGetRayTMinKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetRayFlagsKHR", SpvOpRayQueryGetRayFlagsKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionTKHR", SpvOpRayQueryGetIntersectionTKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionInstanceCustomIndexKHR", SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionInstanceIdKHR", SpvOpRayQueryGetIntersectionInstanceIdKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionGeometryIndexKHR", SpvOpRayQueryGetIntersectionGeometryIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionPrimitiveIndexKHR", SpvOpRayQueryGetIntersectionPrimitiveIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionBarycentricsKHR", SpvOpRayQueryGetIntersectionBarycentricsKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionFrontFaceKHR", SpvOpRayQueryGetIntersectionFrontFaceKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionCandidateAABBOpaqueKHR", SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionObjectRayDirectionKHR", SpvOpRayQueryGetIntersectionObjectRayDirectionKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionObjectRayOriginKHR", SpvOpRayQueryGetIntersectionObjectRayOriginKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetWorldRayDirectionKHR", SpvOpRayQueryGetWorldRayDirectionKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetWorldRayOriginKHR", SpvOpRayQueryGetWorldRayOriginKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionObjectToWorldKHR", SpvOpRayQueryGetIntersectionObjectToWorldKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"RayQueryGetIntersectionWorldToObjectKHR", SpvOpRayQueryGetIntersectionWorldToObjectKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, - {"AtomicFAddEXT", SpvOpAtomicFAddEXT, 3, pygen_variable_caps_AtomicFloat16AddEXTAtomicFloat32AddEXTAtomicFloat64AddEXT, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_EXT_shader_atomic_float_add, 0xffffffffu, 0xffffffffu}, - {"TypeBufferSurfaceINTEL", SpvOpTypeBufferSurfaceINTEL, 1, pygen_variable_caps_VectorComputeINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"TypeStructContinuedINTEL", SpvOpTypeStructContinuedINTEL, 1, pygen_variable_caps_LongConstantCompositeINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"ConstantCompositeContinuedINTEL", SpvOpConstantCompositeContinuedINTEL, 1, pygen_variable_caps_LongConstantCompositeINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, - {"SpecConstantCompositeContinuedINTEL", SpvOpSpecConstantCompositeContinuedINTEL, 1, pygen_variable_caps_LongConstantCompositeINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu} + {"Nop", spv::Op::OpNop, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Undef", spv::Op::OpUndef, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SourceContinued", spv::Op::OpSourceContinued, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Source", spv::Op::OpSource, 0, nullptr, 4, {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SourceExtension", spv::Op::OpSourceExtension, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Name", spv::Op::OpName, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MemberName", spv::Op::OpMemberName, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"String", spv::Op::OpString, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Line", spv::Op::OpLine, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Extension", spv::Op::OpExtension, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ExtInstImport", spv::Op::OpExtInstImport, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ExtInst", spv::Op::OpExtInst, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MemoryModel", spv::Op::OpMemoryModel, 0, nullptr, 2, {SPV_OPERAND_TYPE_ADDRESSING_MODEL, SPV_OPERAND_TYPE_MEMORY_MODEL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EntryPoint", spv::Op::OpEntryPoint, 0, nullptr, 4, {SPV_OPERAND_TYPE_EXECUTION_MODEL, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ExecutionMode", spv::Op::OpExecutionMode, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXECUTION_MODE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Capability", spv::Op::OpCapability, 0, nullptr, 1, {SPV_OPERAND_TYPE_CAPABILITY}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeVoid", spv::Op::OpTypeVoid, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeBool", spv::Op::OpTypeBool, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeInt", spv::Op::OpTypeInt, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeFloat", spv::Op::OpTypeFloat, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeVector", spv::Op::OpTypeVector, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeMatrix", spv::Op::OpTypeMatrix, 1, pygen_variable_caps_Matrix, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeImage", spv::Op::OpTypeImage, 0, nullptr, 9, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DIMENSIONALITY, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT, SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeSampler", spv::Op::OpTypeSampler, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeSampledImage", spv::Op::OpTypeSampledImage, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeArray", spv::Op::OpTypeArray, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeRuntimeArray", spv::Op::OpTypeRuntimeArray, 1, pygen_variable_caps_Shader, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeStruct", spv::Op::OpTypeStruct, 0, nullptr, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeOpaque", spv::Op::OpTypeOpaque, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypePointer", spv::Op::OpTypePointer, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeFunction", spv::Op::OpTypeFunction, 0, nullptr, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeEvent", spv::Op::OpTypeEvent, 1, pygen_variable_caps_Kernel, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeDeviceEvent", spv::Op::OpTypeDeviceEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeReserveId", spv::Op::OpTypeReserveId, 1, pygen_variable_caps_Pipes, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeQueue", spv::Op::OpTypeQueue, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypePipe", spv::Op::OpTypePipe, 1, pygen_variable_caps_Pipes, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TypeForwardPointer", spv::Op::OpTypeForwardPointer, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_STORAGE_CLASS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstantTrue", spv::Op::OpConstantTrue, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstantFalse", spv::Op::OpConstantFalse, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Constant", spv::Op::OpConstant, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstantComposite", spv::Op::OpConstantComposite, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstantSampler", spv::Op::OpConstantSampler, 1, pygen_variable_caps_LiteralSampler, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstantNull", spv::Op::OpConstantNull, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecConstantTrue", spv::Op::OpSpecConstantTrue, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecConstantFalse", spv::Op::OpSpecConstantFalse, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecConstant", spv::Op::OpSpecConstant, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecConstantComposite", spv::Op::OpSpecConstantComposite, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecConstantOp", spv::Op::OpSpecConstantOp, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Function", spv::Op::OpFunction, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_FUNCTION_CONTROL, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FunctionParameter", spv::Op::OpFunctionParameter, 0, nullptr, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FunctionEnd", spv::Op::OpFunctionEnd, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FunctionCall", spv::Op::OpFunctionCall, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Variable", spv::Op::OpVariable, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_STORAGE_CLASS, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageTexelPointer", spv::Op::OpImageTexelPointer, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Load", spv::Op::OpLoad, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Store", spv::Op::OpStore, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CopyMemory", spv::Op::OpCopyMemory, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CopyMemorySized", spv::Op::OpCopyMemorySized, 1, pygen_variable_caps_Addresses, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AccessChain", spv::Op::OpAccessChain, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InBoundsAccessChain", spv::Op::OpInBoundsAccessChain, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PtrAccessChain", spv::Op::OpPtrAccessChain, 4, pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBufferPhysicalStorageBufferAddresses, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ArrayLength", spv::Op::OpArrayLength, 1, pygen_variable_caps_Shader, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GenericPtrMemSemantics", spv::Op::OpGenericPtrMemSemantics, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InBoundsPtrAccessChain", spv::Op::OpInBoundsPtrAccessChain, 1, pygen_variable_caps_Addresses, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Decorate", spv::Op::OpDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MemberDecorate", spv::Op::OpMemberDecorate, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DecorationGroup", spv::Op::OpDecorationGroup, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupDecorate", spv::Op::OpGroupDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupMemberDecorate", spv::Op::OpGroupMemberDecorate, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VectorExtractDynamic", spv::Op::OpVectorExtractDynamic, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VectorInsertDynamic", spv::Op::OpVectorInsertDynamic, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VectorShuffle", spv::Op::OpVectorShuffle, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CompositeConstruct", spv::Op::OpCompositeConstruct, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CompositeExtract", spv::Op::OpCompositeExtract, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CompositeInsert", spv::Op::OpCompositeInsert, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CopyObject", spv::Op::OpCopyObject, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Transpose", spv::Op::OpTranspose, 1, pygen_variable_caps_Matrix, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampledImage", spv::Op::OpSampledImage, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleImplicitLod", spv::Op::OpImageSampleImplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleExplicitLod", spv::Op::OpImageSampleExplicitLod, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleDrefImplicitLod", spv::Op::OpImageSampleDrefImplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleDrefExplicitLod", spv::Op::OpImageSampleDrefExplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleProjImplicitLod", spv::Op::OpImageSampleProjImplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleProjExplicitLod", spv::Op::OpImageSampleProjExplicitLod, 1, pygen_variable_caps_Shader, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleProjDrefImplicitLod", spv::Op::OpImageSampleProjDrefImplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSampleProjDrefExplicitLod", spv::Op::OpImageSampleProjDrefExplicitLod, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageFetch", spv::Op::OpImageFetch, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageGather", spv::Op::OpImageGather, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageDrefGather", spv::Op::OpImageDrefGather, 1, pygen_variable_caps_Shader, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageRead", spv::Op::OpImageRead, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageWrite", spv::Op::OpImageWrite, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Image", spv::Op::OpImage, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQueryFormat", spv::Op::OpImageQueryFormat, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQueryOrder", spv::Op::OpImageQueryOrder, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQuerySizeLod", spv::Op::OpImageQuerySizeLod, 2, pygen_variable_caps_KernelImageQuery, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQuerySize", spv::Op::OpImageQuerySize, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQueryLod", spv::Op::OpImageQueryLod, 1, pygen_variable_caps_ImageQuery, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQueryLevels", spv::Op::OpImageQueryLevels, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQuerySamples", spv::Op::OpImageQuerySamples, 2, pygen_variable_caps_KernelImageQuery, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertFToU", spv::Op::OpConvertFToU, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertFToS", spv::Op::OpConvertFToS, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertSToF", spv::Op::OpConvertSToF, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertUToF", spv::Op::OpConvertUToF, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UConvert", spv::Op::OpUConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SConvert", spv::Op::OpSConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FConvert", spv::Op::OpFConvert, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"QuantizeToF16", spv::Op::OpQuantizeToF16, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertPtrToU", spv::Op::OpConvertPtrToU, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SatConvertSToU", spv::Op::OpSatConvertSToU, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SatConvertUToS", spv::Op::OpSatConvertUToS, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConvertUToPtr", spv::Op::OpConvertUToPtr, 2, pygen_variable_caps_AddressesPhysicalStorageBufferAddresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PtrCastToGeneric", spv::Op::OpPtrCastToGeneric, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GenericCastToPtr", spv::Op::OpGenericCastToPtr, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GenericCastToPtrExplicit", spv::Op::OpGenericCastToPtrExplicit, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_STORAGE_CLASS}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Bitcast", spv::Op::OpBitcast, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SNegate", spv::Op::OpSNegate, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FNegate", spv::Op::OpFNegate, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IAdd", spv::Op::OpIAdd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FAdd", spv::Op::OpFAdd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ISub", spv::Op::OpISub, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FSub", spv::Op::OpFSub, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IMul", spv::Op::OpIMul, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FMul", spv::Op::OpFMul, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UDiv", spv::Op::OpUDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SDiv", spv::Op::OpSDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FDiv", spv::Op::OpFDiv, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UMod", spv::Op::OpUMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SRem", spv::Op::OpSRem, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SMod", spv::Op::OpSMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FRem", spv::Op::OpFRem, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FMod", spv::Op::OpFMod, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VectorTimesScalar", spv::Op::OpVectorTimesScalar, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MatrixTimesScalar", spv::Op::OpMatrixTimesScalar, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VectorTimesMatrix", spv::Op::OpVectorTimesMatrix, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MatrixTimesVector", spv::Op::OpMatrixTimesVector, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MatrixTimesMatrix", spv::Op::OpMatrixTimesMatrix, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OuterProduct", spv::Op::OpOuterProduct, 1, pygen_variable_caps_Matrix, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Dot", spv::Op::OpDot, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IAddCarry", spv::Op::OpIAddCarry, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ISubBorrow", spv::Op::OpISubBorrow, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UMulExtended", spv::Op::OpUMulExtended, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SMulExtended", spv::Op::OpSMulExtended, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Any", spv::Op::OpAny, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"All", spv::Op::OpAll, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsNan", spv::Op::OpIsNan, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsInf", spv::Op::OpIsInf, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsFinite", spv::Op::OpIsFinite, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsNormal", spv::Op::OpIsNormal, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SignBitSet", spv::Op::OpSignBitSet, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LessOrGreater", spv::Op::OpLessOrGreater, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), SPV_SPIRV_VERSION_WORD(1,5)}, + {"Ordered", spv::Op::OpOrdered, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Unordered", spv::Op::OpUnordered, 1, pygen_variable_caps_Kernel, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LogicalEqual", spv::Op::OpLogicalEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LogicalNotEqual", spv::Op::OpLogicalNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LogicalOr", spv::Op::OpLogicalOr, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LogicalAnd", spv::Op::OpLogicalAnd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LogicalNot", spv::Op::OpLogicalNot, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Select", spv::Op::OpSelect, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IEqual", spv::Op::OpIEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"INotEqual", spv::Op::OpINotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UGreaterThan", spv::Op::OpUGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SGreaterThan", spv::Op::OpSGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UGreaterThanEqual", spv::Op::OpUGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SGreaterThanEqual", spv::Op::OpSGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ULessThan", spv::Op::OpULessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SLessThan", spv::Op::OpSLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ULessThanEqual", spv::Op::OpULessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SLessThanEqual", spv::Op::OpSLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdEqual", spv::Op::OpFOrdEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordEqual", spv::Op::OpFUnordEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdNotEqual", spv::Op::OpFOrdNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordNotEqual", spv::Op::OpFUnordNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdLessThan", spv::Op::OpFOrdLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordLessThan", spv::Op::OpFUnordLessThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdGreaterThan", spv::Op::OpFOrdGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordGreaterThan", spv::Op::OpFUnordGreaterThan, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdLessThanEqual", spv::Op::OpFOrdLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordLessThanEqual", spv::Op::OpFUnordLessThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FOrdGreaterThanEqual", spv::Op::OpFOrdGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FUnordGreaterThanEqual", spv::Op::OpFUnordGreaterThanEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ShiftRightLogical", spv::Op::OpShiftRightLogical, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ShiftRightArithmetic", spv::Op::OpShiftRightArithmetic, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ShiftLeftLogical", spv::Op::OpShiftLeftLogical, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitwiseOr", spv::Op::OpBitwiseOr, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitwiseXor", spv::Op::OpBitwiseXor, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitwiseAnd", spv::Op::OpBitwiseAnd, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Not", spv::Op::OpNot, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitFieldInsert", spv::Op::OpBitFieldInsert, 2, pygen_variable_caps_ShaderBitInstructions, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitFieldSExtract", spv::Op::OpBitFieldSExtract, 2, pygen_variable_caps_ShaderBitInstructions, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitFieldUExtract", spv::Op::OpBitFieldUExtract, 2, pygen_variable_caps_ShaderBitInstructions, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitReverse", spv::Op::OpBitReverse, 2, pygen_variable_caps_ShaderBitInstructions, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BitCount", spv::Op::OpBitCount, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdx", spv::Op::OpDPdx, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdy", spv::Op::OpDPdy, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Fwidth", spv::Op::OpFwidth, 1, pygen_variable_caps_Shader, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdxFine", spv::Op::OpDPdxFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdyFine", spv::Op::OpDPdyFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FwidthFine", spv::Op::OpFwidthFine, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdxCoarse", spv::Op::OpDPdxCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DPdyCoarse", spv::Op::OpDPdyCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FwidthCoarse", spv::Op::OpFwidthCoarse, 1, pygen_variable_caps_DerivativeControl, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EmitVertex", spv::Op::OpEmitVertex, 1, pygen_variable_caps_Geometry, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EndPrimitive", spv::Op::OpEndPrimitive, 1, pygen_variable_caps_Geometry, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EmitStreamVertex", spv::Op::OpEmitStreamVertex, 1, pygen_variable_caps_GeometryStreams, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EndStreamPrimitive", spv::Op::OpEndStreamPrimitive, 1, pygen_variable_caps_GeometryStreams, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ControlBarrier", spv::Op::OpControlBarrier, 0, nullptr, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MemoryBarrier", spv::Op::OpMemoryBarrier, 0, nullptr, 2, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicLoad", spv::Op::OpAtomicLoad, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicStore", spv::Op::OpAtomicStore, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicExchange", spv::Op::OpAtomicExchange, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicCompareExchange", spv::Op::OpAtomicCompareExchange, 0, nullptr, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicCompareExchangeWeak", spv::Op::OpAtomicCompareExchangeWeak, 1, pygen_variable_caps_Kernel, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), SPV_SPIRV_VERSION_WORD(1,3)}, + {"AtomicIIncrement", spv::Op::OpAtomicIIncrement, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicIDecrement", spv::Op::OpAtomicIDecrement, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicIAdd", spv::Op::OpAtomicIAdd, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicISub", spv::Op::OpAtomicISub, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicSMin", spv::Op::OpAtomicSMin, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicUMin", spv::Op::OpAtomicUMin, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicSMax", spv::Op::OpAtomicSMax, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicUMax", spv::Op::OpAtomicUMax, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicAnd", spv::Op::OpAtomicAnd, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicOr", spv::Op::OpAtomicOr, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicXor", spv::Op::OpAtomicXor, 0, nullptr, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Phi", spv::Op::OpPhi, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LoopMerge", spv::Op::OpLoopMerge, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LOOP_CONTROL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SelectionMerge", spv::Op::OpSelectionMerge, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SELECTION_CONTROL}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Label", spv::Op::OpLabel, 0, nullptr, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Branch", spv::Op::OpBranch, 0, nullptr, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BranchConditional", spv::Op::OpBranchConditional, 0, nullptr, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Switch", spv::Op::OpSwitch, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Kill", spv::Op::OpKill, 1, pygen_variable_caps_Shader, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Return", spv::Op::OpReturn, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReturnValue", spv::Op::OpReturnValue, 0, nullptr, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Unreachable", spv::Op::OpUnreachable, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LifetimeStart", spv::Op::OpLifetimeStart, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LifetimeStop", spv::Op::OpLifetimeStop, 1, pygen_variable_caps_Kernel, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupAsyncCopy", spv::Op::OpGroupAsyncCopy, 1, pygen_variable_caps_Kernel, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupWaitEvents", spv::Op::OpGroupWaitEvents, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupAll", spv::Op::OpGroupAll, 1, pygen_variable_caps_Groups, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupAny", spv::Op::OpGroupAny, 1, pygen_variable_caps_Groups, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupBroadcast", spv::Op::OpGroupBroadcast, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupIAdd", spv::Op::OpGroupIAdd, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupFAdd", spv::Op::OpGroupFAdd, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupFMin", spv::Op::OpGroupFMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupUMin", spv::Op::OpGroupUMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupSMin", spv::Op::OpGroupSMin, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupFMax", spv::Op::OpGroupFMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupUMax", spv::Op::OpGroupUMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupSMax", spv::Op::OpGroupSMax, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReadPipe", spv::Op::OpReadPipe, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WritePipe", spv::Op::OpWritePipe, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReservedReadPipe", spv::Op::OpReservedReadPipe, 1, pygen_variable_caps_Pipes, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReservedWritePipe", spv::Op::OpReservedWritePipe, 1, pygen_variable_caps_Pipes, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReserveReadPipePackets", spv::Op::OpReserveReadPipePackets, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReserveWritePipePackets", spv::Op::OpReserveWritePipePackets, 1, pygen_variable_caps_Pipes, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CommitReadPipe", spv::Op::OpCommitReadPipe, 1, pygen_variable_caps_Pipes, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CommitWritePipe", spv::Op::OpCommitWritePipe, 1, pygen_variable_caps_Pipes, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsValidReserveId", spv::Op::OpIsValidReserveId, 1, pygen_variable_caps_Pipes, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetNumPipePackets", spv::Op::OpGetNumPipePackets, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetMaxPipePackets", spv::Op::OpGetMaxPipePackets, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupReserveReadPipePackets", spv::Op::OpGroupReserveReadPipePackets, 1, pygen_variable_caps_Pipes, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupReserveWritePipePackets", spv::Op::OpGroupReserveWritePipePackets, 1, pygen_variable_caps_Pipes, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupCommitReadPipe", spv::Op::OpGroupCommitReadPipe, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GroupCommitWritePipe", spv::Op::OpGroupCommitWritePipe, 1, pygen_variable_caps_Pipes, 5, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EnqueueMarker", spv::Op::OpEnqueueMarker, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EnqueueKernel", spv::Op::OpEnqueueKernel, 1, pygen_variable_caps_DeviceEnqueue, 13, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetKernelNDrangeSubGroupCount", spv::Op::OpGetKernelNDrangeSubGroupCount, 1, pygen_variable_caps_DeviceEnqueue, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetKernelNDrangeMaxSubGroupSize", spv::Op::OpGetKernelNDrangeMaxSubGroupSize, 1, pygen_variable_caps_DeviceEnqueue, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetKernelWorkGroupSize", spv::Op::OpGetKernelWorkGroupSize, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetKernelPreferredWorkGroupSizeMultiple", spv::Op::OpGetKernelPreferredWorkGroupSizeMultiple, 1, pygen_variable_caps_DeviceEnqueue, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RetainEvent", spv::Op::OpRetainEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReleaseEvent", spv::Op::OpReleaseEvent, 1, pygen_variable_caps_DeviceEnqueue, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CreateUserEvent", spv::Op::OpCreateUserEvent, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"IsValidEvent", spv::Op::OpIsValidEvent, 1, pygen_variable_caps_DeviceEnqueue, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SetUserEventStatus", spv::Op::OpSetUserEventStatus, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CaptureEventProfilingInfo", spv::Op::OpCaptureEventProfilingInfo, 1, pygen_variable_caps_DeviceEnqueue, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GetDefaultQueue", spv::Op::OpGetDefaultQueue, 1, pygen_variable_caps_DeviceEnqueue, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BuildNDRange", spv::Op::OpBuildNDRange, 1, pygen_variable_caps_DeviceEnqueue, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseSampleImplicitLod", spv::Op::OpImageSparseSampleImplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseSampleExplicitLod", spv::Op::OpImageSparseSampleExplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseSampleDrefImplicitLod", spv::Op::OpImageSparseSampleDrefImplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseSampleDrefExplicitLod", spv::Op::OpImageSparseSampleDrefExplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseSampleProjImplicitLod", spv::Op::OpImageSparseSampleProjImplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageSparseSampleProjExplicitLod", spv::Op::OpImageSparseSampleProjExplicitLod, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageSparseSampleProjDrefImplicitLod", spv::Op::OpImageSparseSampleProjDrefImplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageSparseSampleProjDrefExplicitLod", spv::Op::OpImageSparseSampleProjDrefExplicitLod, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_IMAGE}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageSparseFetch", spv::Op::OpImageSparseFetch, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseGather", spv::Op::OpImageSparseGather, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseDrefGather", spv::Op::OpImageSparseDrefGather, 1, pygen_variable_caps_SparseResidency, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseTexelsResident", spv::Op::OpImageSparseTexelsResident, 1, pygen_variable_caps_SparseResidency, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoLine", spv::Op::OpNoLine, 0, nullptr, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicFlagTestAndSet", spv::Op::OpAtomicFlagTestAndSet, 1, pygen_variable_caps_Kernel, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicFlagClear", spv::Op::OpAtomicFlagClear, 1, pygen_variable_caps_Kernel, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageSparseRead", spv::Op::OpImageSparseRead, 1, pygen_variable_caps_SparseResidency, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SizeOf", spv::Op::OpSizeOf, 1, pygen_variable_caps_Addresses, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"TypePipeStorage", spv::Op::OpTypePipeStorage, 1, pygen_variable_caps_PipeStorage, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"ConstantPipeStorage", spv::Op::OpConstantPipeStorage, 1, pygen_variable_caps_PipeStorage, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"CreatePipeFromPipeStorage", spv::Op::OpCreatePipeFromPipeStorage, 1, pygen_variable_caps_PipeStorage, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"GetKernelLocalSizeForSubgroupCount", spv::Op::OpGetKernelLocalSizeForSubgroupCount, 1, pygen_variable_caps_SubgroupDispatch, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"GetKernelMaxNumSubgroups", spv::Op::OpGetKernelMaxNumSubgroups, 1, pygen_variable_caps_SubgroupDispatch, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"TypeNamedBarrier", spv::Op::OpTypeNamedBarrier, 1, pygen_variable_caps_NamedBarrier, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"NamedBarrierInitialize", spv::Op::OpNamedBarrierInitialize, 1, pygen_variable_caps_NamedBarrier, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"MemoryNamedBarrier", spv::Op::OpMemoryNamedBarrier, 1, pygen_variable_caps_NamedBarrier, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"ModuleProcessed", spv::Op::OpModuleProcessed, 0, nullptr, 1, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, + {"ExecutionModeId", spv::Op::OpExecutionModeId, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXECUTION_MODE}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, + {"DecorateId", spv::Op::OpDecorateId, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 1, pygen_variable_exts_SPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, + {"GroupNonUniformElect", spv::Op::OpGroupNonUniformElect, 1, pygen_variable_caps_GroupNonUniform, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformAll", spv::Op::OpGroupNonUniformAll, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformAny", spv::Op::OpGroupNonUniformAny, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformAllEqual", spv::Op::OpGroupNonUniformAllEqual, 1, pygen_variable_caps_GroupNonUniformVote, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBroadcast", spv::Op::OpGroupNonUniformBroadcast, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBroadcastFirst", spv::Op::OpGroupNonUniformBroadcastFirst, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBallot", spv::Op::OpGroupNonUniformBallot, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformInverseBallot", spv::Op::OpGroupNonUniformInverseBallot, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBallotBitExtract", spv::Op::OpGroupNonUniformBallotBitExtract, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBallotBitCount", spv::Op::OpGroupNonUniformBallotBitCount, 1, pygen_variable_caps_GroupNonUniformBallot, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBallotFindLSB", spv::Op::OpGroupNonUniformBallotFindLSB, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBallotFindMSB", spv::Op::OpGroupNonUniformBallotFindMSB, 1, pygen_variable_caps_GroupNonUniformBallot, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformShuffle", spv::Op::OpGroupNonUniformShuffle, 1, pygen_variable_caps_GroupNonUniformShuffle, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformShuffleXor", spv::Op::OpGroupNonUniformShuffleXor, 1, pygen_variable_caps_GroupNonUniformShuffle, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformShuffleUp", spv::Op::OpGroupNonUniformShuffleUp, 1, pygen_variable_caps_GroupNonUniformShuffleRelative, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformShuffleDown", spv::Op::OpGroupNonUniformShuffleDown, 1, pygen_variable_caps_GroupNonUniformShuffleRelative, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformIAdd", spv::Op::OpGroupNonUniformIAdd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformFAdd", spv::Op::OpGroupNonUniformFAdd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformIMul", spv::Op::OpGroupNonUniformIMul, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformFMul", spv::Op::OpGroupNonUniformFMul, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformSMin", spv::Op::OpGroupNonUniformSMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformUMin", spv::Op::OpGroupNonUniformUMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformFMin", spv::Op::OpGroupNonUniformFMin, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformSMax", spv::Op::OpGroupNonUniformSMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformUMax", spv::Op::OpGroupNonUniformUMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformFMax", spv::Op::OpGroupNonUniformFMax, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBitwiseAnd", spv::Op::OpGroupNonUniformBitwiseAnd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBitwiseOr", spv::Op::OpGroupNonUniformBitwiseOr, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformBitwiseXor", spv::Op::OpGroupNonUniformBitwiseXor, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformLogicalAnd", spv::Op::OpGroupNonUniformLogicalAnd, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformLogicalOr", spv::Op::OpGroupNonUniformLogicalOr, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformLogicalXor", spv::Op::OpGroupNonUniformLogicalXor, 3, pygen_variable_caps_GroupNonUniformArithmeticGroupNonUniformClusteredGroupNonUniformPartitionedNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformQuadBroadcast", spv::Op::OpGroupNonUniformQuadBroadcast, 1, pygen_variable_caps_GroupNonUniformQuad, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"GroupNonUniformQuadSwap", spv::Op::OpGroupNonUniformQuadSwap, 1, pygen_variable_caps_GroupNonUniformQuad, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"CopyLogical", spv::Op::OpCopyLogical, 0, nullptr, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"PtrEqual", spv::Op::OpPtrEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"PtrNotEqual", spv::Op::OpPtrNotEqual, 0, nullptr, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"PtrDiff", spv::Op::OpPtrDiff, 3, pygen_variable_caps_AddressesVariablePointersVariablePointersStorageBuffer, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"ColorAttachmentReadEXT", spv::Op::OpColorAttachmentReadEXT, 1, pygen_variable_caps_TileImageColorReadAccessEXT, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"DepthAttachmentReadEXT", spv::Op::OpDepthAttachmentReadEXT, 1, pygen_variable_caps_TileImageDepthReadAccessEXT, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"StencilAttachmentReadEXT", spv::Op::OpStencilAttachmentReadEXT, 1, pygen_variable_caps_TileImageStencilReadAccessEXT, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TerminateInvocation", spv::Op::OpTerminateInvocation, 1, pygen_variable_caps_Shader, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_terminate_invocation, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SubgroupBallotKHR", spv::Op::OpSubgroupBallotKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"SubgroupFirstInvocationKHR", spv::Op::OpSubgroupFirstInvocationKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"SubgroupAllKHR", spv::Op::OpSubgroupAllKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, + {"SubgroupAnyKHR", spv::Op::OpSubgroupAnyKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, + {"SubgroupAllEqualKHR", spv::Op::OpSubgroupAllEqualKHR, 1, pygen_variable_caps_SubgroupVoteKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, 0xffffffffu, 0xffffffffu}, + {"GroupNonUniformRotateKHR", spv::Op::OpGroupNonUniformRotateKHR, 1, pygen_variable_caps_GroupNonUniformRotateKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupReadInvocationKHR", spv::Op::OpSubgroupReadInvocationKHR, 1, pygen_variable_caps_SubgroupBallotKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"ExtInstWithForwardRefsKHR", spv::Op::OpExtInstWithForwardRefsKHR, 0, nullptr, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_relaxed_extended_instruction, 0xffffffffu, 0xffffffffu}, + {"TraceRayKHR", spv::Op::OpTraceRayKHR, 1, pygen_variable_caps_RayTracingKHR, 11, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"ExecuteCallableKHR", spv::Op::OpExecuteCallableKHR, 1, pygen_variable_caps_RayTracingKHR, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"ConvertUToAccelerationStructureKHR", spv::Op::OpConvertUToAccelerationStructureKHR, 2, pygen_variable_caps_RayTracingKHRRayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"IgnoreIntersectionKHR", spv::Op::OpIgnoreIntersectionKHR, 1, pygen_variable_caps_RayTracingKHR, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"TerminateRayKHR", spv::Op::OpTerminateRayKHR, 1, pygen_variable_caps_RayTracingKHR, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"SDot", spv::Op::OpSDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SDotKHR", spv::Op::OpSDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"UDot", spv::Op::OpUDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"UDotKHR", spv::Op::OpUDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SUDot", spv::Op::OpSUDot, 1, pygen_variable_caps_DotProduct, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SUDotKHR", spv::Op::OpSUDotKHR, 1, pygen_variable_caps_DotProductKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SDotAccSat", spv::Op::OpSDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SDotAccSatKHR", spv::Op::OpSDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"UDotAccSat", spv::Op::OpUDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"UDotAccSatKHR", spv::Op::OpUDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SUDotAccSat", spv::Op::OpSUDotAccSat, 1, pygen_variable_caps_DotProduct, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"SUDotAccSatKHR", spv::Op::OpSUDotAccSatKHR, 1, pygen_variable_caps_DotProductKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT}, 1, 1, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"TypeCooperativeMatrixKHR", spv::Op::OpTypeCooperativeMatrixKHR, 1, pygen_variable_caps_CooperativeMatrixKHR, 6, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixLoadKHR", spv::Op::OpCooperativeMatrixLoadKHR, 1, pygen_variable_caps_CooperativeMatrixKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixStoreKHR", spv::Op::OpCooperativeMatrixStoreKHR, 1, pygen_variable_caps_CooperativeMatrixKHR, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixMulAddKHR", spv::Op::OpCooperativeMatrixMulAddKHR, 1, pygen_variable_caps_CooperativeMatrixKHR, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixLengthKHR", spv::Op::OpCooperativeMatrixLengthKHR, 1, pygen_variable_caps_CooperativeMatrixKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConstantCompositeReplicateEXT", spv::Op::OpConstantCompositeReplicateEXT, 1, pygen_variable_caps_ReplicatedCompositesEXT, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SpecConstantCompositeReplicateEXT", spv::Op::OpSpecConstantCompositeReplicateEXT, 1, pygen_variable_caps_ReplicatedCompositesEXT, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CompositeConstructReplicateEXT", spv::Op::OpCompositeConstructReplicateEXT, 1, pygen_variable_caps_ReplicatedCompositesEXT, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeRayQueryKHR", spv::Op::OpTypeRayQueryKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryInitializeKHR", spv::Op::OpRayQueryInitializeKHR, 1, pygen_variable_caps_RayQueryKHR, 8, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryTerminateKHR", spv::Op::OpRayQueryTerminateKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGenerateIntersectionKHR", spv::Op::OpRayQueryGenerateIntersectionKHR, 1, pygen_variable_caps_RayQueryKHR, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryConfirmIntersectionKHR", spv::Op::OpRayQueryConfirmIntersectionKHR, 1, pygen_variable_caps_RayQueryKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryProceedKHR", spv::Op::OpRayQueryProceedKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionTypeKHR", spv::Op::OpRayQueryGetIntersectionTypeKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"ImageSampleWeightedQCOM", spv::Op::OpImageSampleWeightedQCOM, 1, pygen_variable_caps_TextureSampleWeightedQCOM, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBoxFilterQCOM", spv::Op::OpImageBoxFilterQCOM, 1, pygen_variable_caps_TextureBoxFilterQCOM, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchSSDQCOM", spv::Op::OpImageBlockMatchSSDQCOM, 1, pygen_variable_caps_TextureBlockMatchQCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchSADQCOM", spv::Op::OpImageBlockMatchSADQCOM, 1, pygen_variable_caps_TextureBlockMatchQCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchWindowSSDQCOM", spv::Op::OpImageBlockMatchWindowSSDQCOM, 1, pygen_variable_caps_TextureBlockMatch2QCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchWindowSADQCOM", spv::Op::OpImageBlockMatchWindowSADQCOM, 1, pygen_variable_caps_TextureBlockMatch2QCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchGatherSSDQCOM", spv::Op::OpImageBlockMatchGatherSSDQCOM, 1, pygen_variable_caps_TextureBlockMatch2QCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageBlockMatchGatherSADQCOM", spv::Op::OpImageBlockMatchGatherSADQCOM, 1, pygen_variable_caps_TextureBlockMatch2QCOM, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupIAddNonUniformAMD", spv::Op::OpGroupIAddNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupFAddNonUniformAMD", spv::Op::OpGroupFAddNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupFMinNonUniformAMD", spv::Op::OpGroupFMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupUMinNonUniformAMD", spv::Op::OpGroupUMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupSMinNonUniformAMD", spv::Op::OpGroupSMinNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupFMaxNonUniformAMD", spv::Op::OpGroupFMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupUMaxNonUniformAMD", spv::Op::OpGroupUMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"GroupSMaxNonUniformAMD", spv::Op::OpGroupSMaxNonUniformAMD, 1, pygen_variable_caps_Groups, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_ballot, 0xffffffffu, 0xffffffffu}, + {"FragmentMaskFetchAMD", spv::Op::OpFragmentMaskFetchAMD, 1, pygen_variable_caps_FragmentMaskAMD, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_fragment_mask, 0xffffffffu, 0xffffffffu}, + {"FragmentFetchAMD", spv::Op::OpFragmentFetchAMD, 1, pygen_variable_caps_FragmentMaskAMD, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_AMD_shader_fragment_mask, 0xffffffffu, 0xffffffffu}, + {"ReadClockKHR", spv::Op::OpReadClockKHR, 1, pygen_variable_caps_ShaderClockKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FinalizeNodePayloadsAMDX", spv::Op::OpFinalizeNodePayloadsAMDX, 1, pygen_variable_caps_ShaderEnqueueAMDX, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FinishWritingNodePayloadAMDX", spv::Op::OpFinishWritingNodePayloadAMDX, 1, pygen_variable_caps_ShaderEnqueueAMDX, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"InitializeNodePayloadsAMDX", spv::Op::OpInitializeNodePayloadsAMDX, 1, pygen_variable_caps_ShaderEnqueueAMDX, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupNonUniformQuadAllKHR", spv::Op::OpGroupNonUniformQuadAllKHR, 1, pygen_variable_caps_QuadControlKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupNonUniformQuadAnyKHR", spv::Op::OpGroupNonUniformQuadAnyKHR, 1, pygen_variable_caps_QuadControlKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordHitMotionNV", spv::Op::OpHitObjectRecordHitMotionNV, 2, pygen_variable_caps_ShaderInvocationReorderNVRayTracingMotionBlurNV, 14, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordHitWithIndexMotionNV", spv::Op::OpHitObjectRecordHitWithIndexMotionNV, 2, pygen_variable_caps_ShaderInvocationReorderNVRayTracingMotionBlurNV, 13, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordMissMotionNV", spv::Op::OpHitObjectRecordMissMotionNV, 2, pygen_variable_caps_ShaderInvocationReorderNVRayTracingMotionBlurNV, 7, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetWorldToObjectNV", spv::Op::OpHitObjectGetWorldToObjectNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetObjectToWorldNV", spv::Op::OpHitObjectGetObjectToWorldNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetObjectRayDirectionNV", spv::Op::OpHitObjectGetObjectRayDirectionNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetObjectRayOriginNV", spv::Op::OpHitObjectGetObjectRayOriginNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectTraceRayMotionNV", spv::Op::OpHitObjectTraceRayMotionNV, 2, pygen_variable_caps_ShaderInvocationReorderNVRayTracingMotionBlurNV, 13, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetShaderRecordBufferHandleNV", spv::Op::OpHitObjectGetShaderRecordBufferHandleNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetShaderBindingTableRecordIndexNV", spv::Op::OpHitObjectGetShaderBindingTableRecordIndexNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordEmptyNV", spv::Op::OpHitObjectRecordEmptyNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectTraceRayNV", spv::Op::OpHitObjectTraceRayNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordHitNV", spv::Op::OpHitObjectRecordHitNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 13, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordHitWithIndexNV", spv::Op::OpHitObjectRecordHitWithIndexNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectRecordMissNV", spv::Op::OpHitObjectRecordMissNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 6, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectExecuteShaderNV", spv::Op::OpHitObjectExecuteShaderNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetCurrentTimeNV", spv::Op::OpHitObjectGetCurrentTimeNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetAttributesNV", spv::Op::OpHitObjectGetAttributesNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetHitKindNV", spv::Op::OpHitObjectGetHitKindNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetPrimitiveIndexNV", spv::Op::OpHitObjectGetPrimitiveIndexNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetGeometryIndexNV", spv::Op::OpHitObjectGetGeometryIndexNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetInstanceIdNV", spv::Op::OpHitObjectGetInstanceIdNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetInstanceCustomIndexNV", spv::Op::OpHitObjectGetInstanceCustomIndexNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetWorldRayDirectionNV", spv::Op::OpHitObjectGetWorldRayDirectionNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetWorldRayOriginNV", spv::Op::OpHitObjectGetWorldRayOriginNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetRayTMaxNV", spv::Op::OpHitObjectGetRayTMaxNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectGetRayTMinNV", spv::Op::OpHitObjectGetRayTMinNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectIsEmptyNV", spv::Op::OpHitObjectIsEmptyNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectIsHitNV", spv::Op::OpHitObjectIsHitNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"HitObjectIsMissNV", spv::Op::OpHitObjectIsMissNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ReorderThreadWithHitObjectNV", spv::Op::OpReorderThreadWithHitObjectNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ReorderThreadWithHintNV", spv::Op::OpReorderThreadWithHintNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeHitObjectNV", spv::Op::OpTypeHitObjectNV, 1, pygen_variable_caps_ShaderInvocationReorderNV, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ImageSampleFootprintNV", spv::Op::OpImageSampleFootprintNV, 1, pygen_variable_caps_ImageFootprintNV, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_IMAGE}, 1, 1, 1, pygen_variable_exts_SPV_NV_shader_image_footprint, 0xffffffffu, 0xffffffffu}, + {"EmitMeshTasksEXT", spv::Op::OpEmitMeshTasksEXT, 1, pygen_variable_caps_MeshShadingEXT, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SetMeshOutputsEXT", spv::Op::OpSetMeshOutputsEXT, 1, pygen_variable_caps_MeshShadingEXT, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupNonUniformPartitionNV", spv::Op::OpGroupNonUniformPartitionNV, 1, pygen_variable_caps_GroupNonUniformPartitionedNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_shader_subgroup_partitioned, 0xffffffffu, 0xffffffffu}, + {"WritePackedPrimitiveIndices4x8NV", spv::Op::OpWritePackedPrimitiveIndices4x8NV, 1, pygen_variable_caps_MeshShadingNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_mesh_shader, 0xffffffffu, 0xffffffffu}, + {"FetchMicroTriangleVertexPositionNV", spv::Op::OpFetchMicroTriangleVertexPositionNV, 1, pygen_variable_caps_DisplacementMicromapNV, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FetchMicroTriangleVertexBarycentricNV", spv::Op::OpFetchMicroTriangleVertexBarycentricNV, 1, pygen_variable_caps_DisplacementMicromapNV, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ReportIntersectionKHR", spv::Op::OpReportIntersectionKHR, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"ReportIntersectionNV", spv::Op::OpReportIntersectionNV, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 2, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"IgnoreIntersectionNV", spv::Op::OpIgnoreIntersectionNV, 1, pygen_variable_caps_RayTracingNV, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"TerminateRayNV", spv::Op::OpTerminateRayNV, 1, pygen_variable_caps_RayTracingNV, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"TraceNV", spv::Op::OpTraceNV, 1, pygen_variable_caps_RayTracingNV, 11, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"TraceMotionNV", spv::Op::OpTraceMotionNV, 1, pygen_variable_caps_RayTracingMotionBlurNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, 0xffffffffu, 0xffffffffu}, + {"TraceRayMotionNV", spv::Op::OpTraceRayMotionNV, 1, pygen_variable_caps_RayTracingMotionBlurNV, 12, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionTriangleVertexPositionsKHR", spv::Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR, 1, pygen_variable_caps_RayQueryPositionFetchKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAccelerationStructureKHR", spv::Op::OpTypeAccelerationStructureKHR, 3, pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 3, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"TypeAccelerationStructureNV", spv::Op::OpTypeAccelerationStructureNV, 3, pygen_variable_caps_RayTracingNVRayTracingKHRRayQueryKHR, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 3, pygen_variable_exts_SPV_NV_ray_tracingSPV_KHR_ray_tracingSPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"ExecuteCallableNV", spv::Op::OpExecuteCallableNV, 1, pygen_variable_caps_RayTracingNV, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_NV_ray_tracing, 0xffffffffu, 0xffffffffu}, + {"TypeCooperativeMatrixNV", spv::Op::OpTypeCooperativeMatrixNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixLoadNV", spv::Op::OpCooperativeMatrixLoadNV, 1, pygen_variable_caps_CooperativeMatrixNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixStoreNV", spv::Op::OpCooperativeMatrixStoreNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS}, 0, 0, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixMulAddNV", spv::Op::OpCooperativeMatrixMulAddNV, 1, pygen_variable_caps_CooperativeMatrixNV, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixLengthNV", spv::Op::OpCooperativeMatrixLengthNV, 1, pygen_variable_caps_CooperativeMatrixNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_NV_cooperative_matrix, 0xffffffffu, 0xffffffffu}, + {"BeginInvocationInterlockEXT", spv::Op::OpBeginInvocationInterlockEXT, 3, pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, 0xffffffffu, 0xffffffffu}, + {"EndInvocationInterlockEXT", spv::Op::OpEndInvocationInterlockEXT, 3, pygen_variable_caps_FragmentShaderSampleInterlockEXTFragmentShaderPixelInterlockEXTFragmentShaderShadingRateInterlockEXT, 0, {}, 0, 0, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, 0xffffffffu, 0xffffffffu}, + {"DemoteToHelperInvocation", spv::Op::OpDemoteToHelperInvocation, 1, pygen_variable_caps_DemoteToHelperInvocation, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"DemoteToHelperInvocationEXT", spv::Op::OpDemoteToHelperInvocationEXT, 1, pygen_variable_caps_DemoteToHelperInvocationEXT, 0, {}, 0, 0, 0, nullptr, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"IsHelperInvocationEXT", spv::Op::OpIsHelperInvocationEXT, 1, pygen_variable_caps_DemoteToHelperInvocationEXT, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 1, pygen_variable_exts_SPV_EXT_demote_to_helper_invocation, 0xffffffffu, 0xffffffffu}, + {"ConvertUToImageNV", spv::Op::OpConvertUToImageNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertUToSamplerNV", spv::Op::OpConvertUToSamplerNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertImageToUNV", spv::Op::OpConvertImageToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertSamplerToUNV", spv::Op::OpConvertSamplerToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertUToSampledImageNV", spv::Op::OpConvertUToSampledImageNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertSampledImageToUNV", spv::Op::OpConvertSampledImageToUNV, 1, pygen_variable_caps_BindlessTextureNV, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SamplerImageAddressingModeNV", spv::Op::OpSamplerImageAddressingModeNV, 1, pygen_variable_caps_BindlessTextureNV, 1, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"RawAccessChainNV", spv::Op::OpRawAccessChainNV, 1, pygen_variable_caps_RawAccessChainsNV, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupShuffleINTEL", spv::Op::OpSubgroupShuffleINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupShuffleDownINTEL", spv::Op::OpSubgroupShuffleDownINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupShuffleUpINTEL", spv::Op::OpSubgroupShuffleUpINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupShuffleXorINTEL", spv::Op::OpSubgroupShuffleXorINTEL, 1, pygen_variable_caps_SubgroupShuffleINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupBlockReadINTEL", spv::Op::OpSubgroupBlockReadINTEL, 1, pygen_variable_caps_SubgroupBufferBlockIOINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupBlockWriteINTEL", spv::Op::OpSubgroupBlockWriteINTEL, 1, pygen_variable_caps_SubgroupBufferBlockIOINTEL, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupImageBlockReadINTEL", spv::Op::OpSubgroupImageBlockReadINTEL, 1, pygen_variable_caps_SubgroupImageBlockIOINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupImageBlockWriteINTEL", spv::Op::OpSubgroupImageBlockWriteINTEL, 1, pygen_variable_caps_SubgroupImageBlockIOINTEL, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupImageMediaBlockReadINTEL", spv::Op::OpSubgroupImageMediaBlockReadINTEL, 1, pygen_variable_caps_SubgroupImageMediaBlockIOINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupImageMediaBlockWriteINTEL", spv::Op::OpSubgroupImageMediaBlockWriteINTEL, 1, pygen_variable_caps_SubgroupImageMediaBlockIOINTEL, 5, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UCountLeadingZerosINTEL", spv::Op::OpUCountLeadingZerosINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UCountTrailingZerosINTEL", spv::Op::OpUCountTrailingZerosINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AbsISubINTEL", spv::Op::OpAbsISubINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AbsUSubINTEL", spv::Op::OpAbsUSubINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"IAddSatINTEL", spv::Op::OpIAddSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UAddSatINTEL", spv::Op::OpUAddSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"IAverageINTEL", spv::Op::OpIAverageINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UAverageINTEL", spv::Op::OpUAverageINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"IAverageRoundedINTEL", spv::Op::OpIAverageRoundedINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UAverageRoundedINTEL", spv::Op::OpUAverageRoundedINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ISubSatINTEL", spv::Op::OpISubSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"USubSatINTEL", spv::Op::OpUSubSatINTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"IMul32x16INTEL", spv::Op::OpIMul32x16INTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"UMul32x16INTEL", spv::Op::OpUMul32x16INTEL, 1, pygen_variable_caps_IntegerFunctions2INTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConstantFunctionPointerINTEL", spv::Op::OpConstantFunctionPointerINTEL, 1, pygen_variable_caps_FunctionPointersINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_function_pointers, 0xffffffffu, 0xffffffffu}, + {"FunctionPointerCallINTEL", spv::Op::OpFunctionPointerCallINTEL, 1, pygen_variable_caps_FunctionPointersINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_function_pointers, 0xffffffffu, 0xffffffffu}, + {"AsmTargetINTEL", spv::Op::OpAsmTargetINTEL, 1, pygen_variable_caps_AsmINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AsmINTEL", spv::Op::OpAsmINTEL, 1, pygen_variable_caps_AsmINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_STRING}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AsmCallINTEL", spv::Op::OpAsmCallINTEL, 1, pygen_variable_caps_AsmINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AtomicFMinEXT", spv::Op::OpAtomicFMinEXT, 4, pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXTAtomicFloat16VectorNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AtomicFMaxEXT", spv::Op::OpAtomicFMaxEXT, 4, pygen_variable_caps_AtomicFloat16MinMaxEXTAtomicFloat32MinMaxEXTAtomicFloat64MinMaxEXTAtomicFloat16VectorNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"AssumeTrueKHR", spv::Op::OpAssumeTrueKHR, 1, pygen_variable_caps_ExpectAssumeKHR, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 1, pygen_variable_exts_SPV_KHR_expect_assume, 0xffffffffu, 0xffffffffu}, + {"ExpectKHR", spv::Op::OpExpectKHR, 1, pygen_variable_caps_ExpectAssumeKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_expect_assume, 0xffffffffu, 0xffffffffu}, + {"DecorateString", spv::Op::OpDecorateString, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"DecorateStringGOOGLE", spv::Op::OpDecorateStringGOOGLE, 0, nullptr, 2, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"MemberDecorateString", spv::Op::OpMemberDecorateString, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"MemberDecorateStringGOOGLE", spv::Op::OpMemberDecorateStringGOOGLE, 0, nullptr, 3, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_DECORATION}, 0, 0, 2, pygen_variable_exts_SPV_GOOGLE_decorate_stringSPV_GOOGLE_hlsl_functionality1, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"VmeImageINTEL", spv::Op::OpVmeImageINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeVmeImageINTEL", spv::Op::OpTypeVmeImageINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImePayloadINTEL", spv::Op::OpTypeAvcImePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcRefPayloadINTEL", spv::Op::OpTypeAvcRefPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcSicPayloadINTEL", spv::Op::OpTypeAvcSicPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcMcePayloadINTEL", spv::Op::OpTypeAvcMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcMceResultINTEL", spv::Op::OpTypeAvcMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImeResultINTEL", spv::Op::OpTypeAvcImeResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImeResultSingleReferenceStreamoutINTEL", spv::Op::OpTypeAvcImeResultSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImeResultDualReferenceStreamoutINTEL", spv::Op::OpTypeAvcImeResultDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImeSingleReferenceStreaminINTEL", spv::Op::OpTypeAvcImeSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcImeDualReferenceStreaminINTEL", spv::Op::OpTypeAvcImeDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcRefResultINTEL", spv::Op::OpTypeAvcRefResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeAvcSicResultINTEL", spv::Op::OpTypeAvcSicResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 1, {SPV_OPERAND_TYPE_RESULT_ID}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", spv::Op::OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultInterShapePenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetInterShapePenaltyINTEL", spv::Op::OpSubgroupAvcMceSetInterShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetInterDirectionPenaltyINTEL", spv::Op::OpSubgroupAvcMceSetInterDirectionPenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", spv::Op::OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", spv::Op::OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", spv::Op::OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", spv::Op::OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetMotionVectorCostFunctionINTEL", spv::Op::OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", spv::Op::OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetAcOnlyHaarINTEL", spv::Op::OpSubgroupAvcMceSetAcOnlyHaarINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", spv::Op::OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", spv::Op::OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", spv::Op::OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToImePayloadINTEL", spv::Op::OpSubgroupAvcMceConvertToImePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToImeResultINTEL", spv::Op::OpSubgroupAvcMceConvertToImeResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToRefPayloadINTEL", spv::Op::OpSubgroupAvcMceConvertToRefPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToRefResultINTEL", spv::Op::OpSubgroupAvcMceConvertToRefResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToSicPayloadINTEL", spv::Op::OpSubgroupAvcMceConvertToSicPayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceConvertToSicResultINTEL", spv::Op::OpSubgroupAvcMceConvertToSicResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetMotionVectorsINTEL", spv::Op::OpSubgroupAvcMceGetMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterDistortionsINTEL", spv::Op::OpSubgroupAvcMceGetInterDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetBestInterDistortionsINTEL", spv::Op::OpSubgroupAvcMceGetBestInterDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterMajorShapeINTEL", spv::Op::OpSubgroupAvcMceGetInterMajorShapeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterMinorShapeINTEL", spv::Op::OpSubgroupAvcMceGetInterMinorShapeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterDirectionsINTEL", spv::Op::OpSubgroupAvcMceGetInterDirectionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterMotionVectorCountINTEL", spv::Op::OpSubgroupAvcMceGetInterMotionVectorCountINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterReferenceIdsINTEL", spv::Op::OpSubgroupAvcMceGetInterReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", spv::Op::OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeInitializeINTEL", spv::Op::OpSubgroupAvcImeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetSingleReferenceINTEL", spv::Op::OpSubgroupAvcImeSetSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetDualReferenceINTEL", spv::Op::OpSubgroupAvcImeSetDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeRefWindowSizeINTEL", spv::Op::OpSubgroupAvcImeRefWindowSizeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeAdjustRefOffsetINTEL", spv::Op::OpSubgroupAvcImeAdjustRefOffsetINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeConvertToMcePayloadINTEL", spv::Op::OpSubgroupAvcImeConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetMaxMotionVectorCountINTEL", spv::Op::OpSubgroupAvcImeSetMaxMotionVectorCountINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetUnidirectionalMixDisableINTEL", spv::Op::OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", spv::Op::OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeSetWeightedSadINTEL", spv::Op::OpSubgroupAvcImeSetWeightedSadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithSingleReferenceINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithDualReferenceINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", spv::Op::OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeConvertToMceResultINTEL", spv::Op::OpSubgroupAvcImeConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetSingleReferenceStreaminINTEL", spv::Op::OpSubgroupAvcImeGetSingleReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetDualReferenceStreaminINTEL", spv::Op::OpSubgroupAvcImeGetDualReferenceStreaminINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeStripSingleReferenceStreamoutINTEL", spv::Op::OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeStripDualReferenceStreamoutINTEL", spv::Op::OpSubgroupAvcImeStripDualReferenceStreamoutINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", spv::Op::OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetBorderReachedINTEL", spv::Op::OpSubgroupAvcImeGetBorderReachedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetTruncatedSearchIndicationINTEL", spv::Op::OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", spv::Op::OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", spv::Op::OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", spv::Op::OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcFmeInitializeINTEL", spv::Op::OpSubgroupAvcFmeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcBmeInitializeINTEL", spv::Op::OpSubgroupAvcBmeInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefConvertToMcePayloadINTEL", spv::Op::OpSubgroupAvcRefConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefSetBidirectionalMixDisableINTEL", spv::Op::OpSubgroupAvcRefSetBidirectionalMixDisableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefSetBilinearFilterEnableINTEL", spv::Op::OpSubgroupAvcRefSetBilinearFilterEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefEvaluateWithSingleReferenceINTEL", spv::Op::OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefEvaluateWithDualReferenceINTEL", spv::Op::OpSubgroupAvcRefEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefEvaluateWithMultiReferenceINTEL", spv::Op::OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", spv::Op::OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcRefConvertToMceResultINTEL", spv::Op::OpSubgroupAvcRefConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicInitializeINTEL", spv::Op::OpSubgroupAvcSicInitializeINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicConfigureSkcINTEL", spv::Op::OpSubgroupAvcSicConfigureSkcINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicConfigureIpeLumaINTEL", spv::Op::OpSubgroupAvcSicConfigureIpeLumaINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicConfigureIpeLumaChromaINTEL", spv::Op::OpSubgroupAvcSicConfigureIpeLumaChromaINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 13, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetMotionVectorMaskINTEL", spv::Op::OpSubgroupAvcSicGetMotionVectorMaskINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicConvertToMcePayloadINTEL", spv::Op::OpSubgroupAvcSicConvertToMcePayloadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetIntraLumaShapePenaltyINTEL", spv::Op::OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", spv::Op::OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", spv::Op::OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetBilinearFilterEnableINTEL", spv::Op::OpSubgroupAvcSicSetBilinearFilterEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetSkcForwardTransformEnableINTEL", spv::Op::OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicSetBlockBasedRawSkipSadINTEL", spv::Op::OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicEvaluateIpeINTEL", spv::Op::OpSubgroupAvcSicEvaluateIpeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicEvaluateWithSingleReferenceINTEL", spv::Op::OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicEvaluateWithDualReferenceINTEL", spv::Op::OpSubgroupAvcSicEvaluateWithDualReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicEvaluateWithMultiReferenceINTEL", spv::Op::OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", spv::Op::OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicConvertToMceResultINTEL", spv::Op::OpSubgroupAvcSicConvertToMceResultINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetIpeLumaShapeINTEL", spv::Op::OpSubgroupAvcSicGetIpeLumaShapeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetBestIpeLumaDistortionINTEL", spv::Op::OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetBestIpeChromaDistortionINTEL", spv::Op::OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetPackedIpeLumaModesINTEL", spv::Op::OpSubgroupAvcSicGetPackedIpeLumaModesINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetIpeChromaModeINTEL", spv::Op::OpSubgroupAvcSicGetIpeChromaModeINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationChromaINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", spv::Op::OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", spv::Op::OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL, 2, pygen_variable_caps_SubgroupAvcMotionEstimationINTELSubgroupAvcMotionEstimationIntraINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SubgroupAvcSicGetInterRawSadsINTEL", spv::Op::OpSubgroupAvcSicGetInterRawSadsINTEL, 1, pygen_variable_caps_SubgroupAvcMotionEstimationINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"VariableLengthArrayINTEL", spv::Op::OpVariableLengthArrayINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SaveMemoryINTEL", spv::Op::OpSaveMemoryINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 2, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"RestoreMemoryINTEL", spv::Op::OpRestoreMemoryINTEL, 1, pygen_variable_caps_VariableLengthArrayINTEL, 1, {SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSinCosPiINTEL", spv::Op::OpArbitraryFloatSinCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCastINTEL", spv::Op::OpArbitraryFloatCastINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCastFromIntINTEL", spv::Op::OpArbitraryFloatCastFromIntINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCastToIntINTEL", spv::Op::OpArbitraryFloatCastToIntINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 7, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatAddINTEL", spv::Op::OpArbitraryFloatAddINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSubINTEL", spv::Op::OpArbitraryFloatSubINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatMulINTEL", spv::Op::OpArbitraryFloatMulINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatDivINTEL", spv::Op::OpArbitraryFloatDivINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatGTINTEL", spv::Op::OpArbitraryFloatGTINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatGEINTEL", spv::Op::OpArbitraryFloatGEINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLTINTEL", spv::Op::OpArbitraryFloatLTINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLEINTEL", spv::Op::OpArbitraryFloatLEINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatEQINTEL", spv::Op::OpArbitraryFloatEQINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatRecipINTEL", spv::Op::OpArbitraryFloatRecipINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatRSqrtINTEL", spv::Op::OpArbitraryFloatRSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCbrtINTEL", spv::Op::OpArbitraryFloatCbrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatHypotINTEL", spv::Op::OpArbitraryFloatHypotINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSqrtINTEL", spv::Op::OpArbitraryFloatSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLogINTEL", spv::Op::OpArbitraryFloatLogINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLog2INTEL", spv::Op::OpArbitraryFloatLog2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLog10INTEL", spv::Op::OpArbitraryFloatLog10INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatLog1pINTEL", spv::Op::OpArbitraryFloatLog1pINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatExpINTEL", spv::Op::OpArbitraryFloatExpINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatExp2INTEL", spv::Op::OpArbitraryFloatExp2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatExp10INTEL", spv::Op::OpArbitraryFloatExp10INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatExpm1INTEL", spv::Op::OpArbitraryFloatExpm1INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSinINTEL", spv::Op::OpArbitraryFloatSinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCosINTEL", spv::Op::OpArbitraryFloatCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSinCosINTEL", spv::Op::OpArbitraryFloatSinCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatSinPiINTEL", spv::Op::OpArbitraryFloatSinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatCosPiINTEL", spv::Op::OpArbitraryFloatCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatASinINTEL", spv::Op::OpArbitraryFloatASinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatASinPiINTEL", spv::Op::OpArbitraryFloatASinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatACosINTEL", spv::Op::OpArbitraryFloatACosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatACosPiINTEL", spv::Op::OpArbitraryFloatACosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatATanINTEL", spv::Op::OpArbitraryFloatATanINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatATanPiINTEL", spv::Op::OpArbitraryFloatATanPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 8, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatATan2INTEL", spv::Op::OpArbitraryFloatATan2INTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatPowINTEL", spv::Op::OpArbitraryFloatPowINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatPowRINTEL", spv::Op::OpArbitraryFloatPowRINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 10, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ArbitraryFloatPowNINTEL", spv::Op::OpArbitraryFloatPowNINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFloatingPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"LoopControlINTEL", spv::Op::OpLoopControlINTEL, 1, pygen_variable_caps_UnstructuredLoopControlsINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER}, 0, 0, 1, pygen_variable_exts_SPV_INTEL_unstructured_loop_controls, 0xffffffffu, 0xffffffffu}, + {"AliasDomainDeclINTEL", spv::Op::OpAliasDomainDeclINTEL, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 0, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, 0xffffffffu, 0xffffffffu}, + {"AliasScopeDeclINTEL", spv::Op::OpAliasScopeDeclINTEL, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 3, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID}, 1, 0, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, 0xffffffffu, 0xffffffffu}, + {"AliasScopeListDeclINTEL", spv::Op::OpAliasScopeListDeclINTEL, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 0, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, 0xffffffffu, 0xffffffffu}, + {"FixedSqrtINTEL", spv::Op::OpFixedSqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedRecipINTEL", spv::Op::OpFixedRecipINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedRsqrtINTEL", spv::Op::OpFixedRsqrtINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedSinINTEL", spv::Op::OpFixedSinINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedCosINTEL", spv::Op::OpFixedCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedSinCosINTEL", spv::Op::OpFixedSinCosINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedSinPiINTEL", spv::Op::OpFixedSinPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedCosPiINTEL", spv::Op::OpFixedCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedSinCosPiINTEL", spv::Op::OpFixedSinCosPiINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedLogINTEL", spv::Op::OpFixedLogINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"FixedExpINTEL", spv::Op::OpFixedExpINTEL, 1, pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL, 9, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"PtrCastToCrossWorkgroupINTEL", spv::Op::OpPtrCastToCrossWorkgroupINTEL, 1, pygen_variable_caps_USMStorageClassesINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CrossWorkgroupCastToPtrINTEL", spv::Op::OpCrossWorkgroupCastToPtrINTEL, 1, pygen_variable_caps_USMStorageClassesINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ReadPipeBlockingINTEL", spv::Op::OpReadPipeBlockingINTEL, 1, pygen_variable_caps_BlockingPipesINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_blocking_pipes, 0xffffffffu, 0xffffffffu}, + {"WritePipeBlockingINTEL", spv::Op::OpWritePipeBlockingINTEL, 1, pygen_variable_caps_BlockingPipesINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_blocking_pipes, 0xffffffffu, 0xffffffffu}, + {"FPGARegINTEL", spv::Op::OpFPGARegINTEL, 1, pygen_variable_caps_FPGARegINTEL, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_INTEL_fpga_reg, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetRayTMinKHR", spv::Op::OpRayQueryGetRayTMinKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetRayFlagsKHR", spv::Op::OpRayQueryGetRayFlagsKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionTKHR", spv::Op::OpRayQueryGetIntersectionTKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionInstanceCustomIndexKHR", spv::Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionInstanceIdKHR", spv::Op::OpRayQueryGetIntersectionInstanceIdKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", spv::Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionGeometryIndexKHR", spv::Op::OpRayQueryGetIntersectionGeometryIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionPrimitiveIndexKHR", spv::Op::OpRayQueryGetIntersectionPrimitiveIndexKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionBarycentricsKHR", spv::Op::OpRayQueryGetIntersectionBarycentricsKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionFrontFaceKHR", spv::Op::OpRayQueryGetIntersectionFrontFaceKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionCandidateAABBOpaqueKHR", spv::Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionObjectRayDirectionKHR", spv::Op::OpRayQueryGetIntersectionObjectRayDirectionKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionObjectRayOriginKHR", spv::Op::OpRayQueryGetIntersectionObjectRayOriginKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetWorldRayDirectionKHR", spv::Op::OpRayQueryGetWorldRayDirectionKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetWorldRayOriginKHR", spv::Op::OpRayQueryGetWorldRayOriginKHR, 1, pygen_variable_caps_RayQueryKHR, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionObjectToWorldKHR", spv::Op::OpRayQueryGetIntersectionObjectToWorldKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"RayQueryGetIntersectionWorldToObjectKHR", spv::Op::OpRayQueryGetIntersectionWorldToObjectKHR, 1, pygen_variable_caps_RayQueryKHR, 4, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_KHR_ray_query, 0xffffffffu, 0xffffffffu}, + {"AtomicFAddEXT", spv::Op::OpAtomicFAddEXT, 4, pygen_variable_caps_AtomicFloat16AddEXTAtomicFloat32AddEXTAtomicFloat64AddEXTAtomicFloat16VectorNV, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 1, pygen_variable_exts_SPV_EXT_shader_atomic_float_add, 0xffffffffu, 0xffffffffu}, + {"TypeBufferSurfaceINTEL", spv::Op::OpTypeBufferSurfaceINTEL, 1, pygen_variable_caps_VectorComputeINTEL, 2, {SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ACCESS_QUALIFIER}, 1, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"TypeStructContinuedINTEL", spv::Op::OpTypeStructContinuedINTEL, 1, pygen_variable_caps_LongCompositesINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConstantCompositeContinuedINTEL", spv::Op::OpConstantCompositeContinuedINTEL, 1, pygen_variable_caps_LongCompositesINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"SpecConstantCompositeContinuedINTEL", spv::Op::OpSpecConstantCompositeContinuedINTEL, 1, pygen_variable_caps_LongCompositesINTEL, 1, {SPV_OPERAND_TYPE_VARIABLE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"CompositeConstructContinuedINTEL", spv::Op::OpCompositeConstructContinuedINTEL, 1, pygen_variable_caps_LongCompositesINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_VARIABLE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertFToBF16INTEL", spv::Op::OpConvertFToBF16INTEL, 1, pygen_variable_caps_BFloat16ConversionINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ConvertBF16ToFINTEL", spv::Op::OpConvertBF16ToFINTEL, 1, pygen_variable_caps_BFloat16ConversionINTEL, 3, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ControlBarrierArriveINTEL", spv::Op::OpControlBarrierArriveINTEL, 1, pygen_variable_caps_SplitBarrierINTEL, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"ControlBarrierWaitINTEL", spv::Op::OpControlBarrierWaitINTEL, 1, pygen_variable_caps_SplitBarrierINTEL, 3, {SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupIMulKHR", spv::Op::OpGroupIMulKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupFMulKHR", spv::Op::OpGroupFMulKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupBitwiseAndKHR", spv::Op::OpGroupBitwiseAndKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupBitwiseOrKHR", spv::Op::OpGroupBitwiseOrKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupBitwiseXorKHR", spv::Op::OpGroupBitwiseXorKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupLogicalAndKHR", spv::Op::OpGroupLogicalAndKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupLogicalOrKHR", spv::Op::OpGroupLogicalOrKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"GroupLogicalXorKHR", spv::Op::OpGroupLogicalXorKHR, 1, pygen_variable_caps_GroupUniformArithmeticKHR, 5, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_SCOPE_ID, SPV_OPERAND_TYPE_GROUP_OPERATION, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"MaskedGatherINTEL", spv::Op::OpMaskedGatherINTEL, 1, pygen_variable_caps_MaskedGatherScatterINTEL, 6, {SPV_OPERAND_TYPE_TYPE_ID, SPV_OPERAND_TYPE_RESULT_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 1, 1, 0, nullptr, 0xffffffffu, 0xffffffffu}, + {"MaskedScatterINTEL", spv::Op::OpMaskedScatterINTEL, 1, pygen_variable_caps_MaskedGatherScatterINTEL, 4, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_ID}, 0, 0, 0, nullptr, 0xffffffffu, 0xffffffffu} }; \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.cpp index 1d61b9f9e..f8f6f44a3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.cpp @@ -244,7 +244,7 @@ void InstructionDisassembler::EmitHeaderSchema(uint32_t schema) { void InstructionDisassembler::EmitInstruction( const spv_parsed_instruction_t& inst, size_t inst_byte_offset) { - auto opcode = static_cast(inst.opcode); + auto opcode = static_cast(inst.opcode); if (inst.result_id) { SetBlue(); @@ -268,7 +268,7 @@ void InstructionDisassembler::EmitInstruction( EmitOperand(inst, i); } - if (comment_ && opcode == SpvOpName) { + if (comment_ && opcode == spv::Op::OpName) { const spv_parsed_operand_t& operand = inst.operands[0]; const uint32_t word = inst.words[operand.offset]; stream_ << " ; id %" << word; @@ -290,8 +290,8 @@ void InstructionDisassembler::EmitInstruction( void InstructionDisassembler::EmitSectionComment( const spv_parsed_instruction_t& inst, bool& inserted_decoration_space, bool& inserted_debug_space, bool& inserted_type_space) { - auto opcode = static_cast(inst.opcode); - if (comment_ && opcode == SpvOpFunction) { + auto opcode = static_cast(inst.opcode); + if (comment_ && opcode == spv::Op::OpFunction) { stream_ << std::endl; stream_ << std::string(indent_, ' '); stream_ << "; Function " << name_mapper_(inst.result_id) << std::endl; @@ -351,13 +351,14 @@ void InstructionDisassembler::EmitOperand(const spv_parsed_instruction_t& inst, } break; case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: { spv_opcode_desc opcode_desc; - if (grammar_.lookupOpcode(SpvOp(word), &opcode_desc)) + if (grammar_.lookupOpcode(spv::Op(word), &opcode_desc)) assert(false && "should have caught this earlier"); SetRed(); stream_ << opcode_desc->name; } break; case SPV_OPERAND_TYPE_LITERAL_INTEGER: - case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: { + case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: + case SPV_OPERAND_TYPE_LITERAL_FLOAT: { SetRed(); EmitNumericLiteral(&stream_, inst, operand); ResetColor(); @@ -424,6 +425,7 @@ void InstructionDisassembler::EmitOperand(const spv_parsed_instruction_t& inst, case SPV_OPERAND_TYPE_SELECTION_CONTROL: case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: + case SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS: EmitMaskOperand(operand.type, word); break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.h index 8eacb1006..b520a1ea9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/disassemble.h @@ -25,9 +25,10 @@ namespace spvtools { // Decodes the given SPIR-V instruction binary representation to its assembly // text. The context is inferred from the provided module binary. The options -// parameter is a bit field of spv_binary_to_text_options_t. Decoded text will -// be stored into *text. Any error will be written into *diagnostic if -// diagnostic is non-null. +// parameter is a bit field of spv_binary_to_text_options_t (note: the option +// SPV_BINARY_TO_TEXT_OPTION_PRINT will be ignored). Decoded text will be +// stored into *text. Any error will be written into *diagnostic if diagnostic +// is non-null. std::string spvInstructionBinaryToText(const spv_target_env env, const uint32_t* inst_binary, const size_t inst_word_count, diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_set.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_set.h index d4d31e332..a3751388a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_set.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_set.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Google Inc. +// Copyright (c) 2023 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,196 +12,457 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef SOURCE_ENUM_SET_H_ -#define SOURCE_ENUM_SET_H_ - +#include +#include #include #include -#include -#include -#include +#include +#include +#include +#include + +#ifndef SOURCE_ENUM_SET_H_ +#define SOURCE_ENUM_SET_H_ #include "source/latest_version_spirv_header.h" -#include "source/util/make_unique.h" namespace spvtools { -// A set of values of a 32-bit enum type. -// It is fast and compact for the common case, where enum values -// are at most 63. But it can represent enums with larger values, -// as may appear in extensions. -template +// This container is optimized to store and retrieve unsigned enum values. +// The base model for this implementation is an open-addressing hashtable with +// linear probing. For small enums (max index < 64), all operations are O(1). +// +// - Enums are stored in buckets (64 contiguous values max per bucket) +// - Buckets ranges don't overlap, but don't have to be contiguous. +// - Enums are packed into 64-bits buckets, using 1 bit per enum value. +// +// Example: +// - MyEnum { A = 0, B = 1, C = 64, D = 65 } +// - 2 buckets are required: +// - bucket 0, storing values in the range [ 0; 64[ +// - bucket 1, storing values in the range [64; 128[ +// +// - Buckets are stored in a sorted vector (sorted by bucket range). +// - Retrieval is done by computing the theoretical bucket index using the enum +// value, and +// doing a linear scan from this position. +// - Insertion is done by retrieving the bucket and either: +// - inserting a new bucket in the sorted vector when no buckets has a +// compatible range. +// - setting the corresponding bit in the bucket. +// This means insertion in the middle/beginning can cause a memmove when no +// bucket is available. In our case, this happens at most 23 times for the +// largest enum we have (Opcodes). +template class EnumSet { private: - // The ForEach method will call the functor on enum values in - // enum value order (lowest to highest). To make that easier, use - // an ordered set for the overflow values. - using OverflowSetType = std::set; + using BucketType = uint64_t; + using ElementType = std::underlying_type_t; + static_assert(std::is_enum_v, "EnumSets only works with enums."); + static_assert(std::is_signed_v == false, + "EnumSet doesn't supports signed enums."); + + // Each bucket can hold up to `kBucketSize` distinct, contiguous enum values. + // The first value a bucket can hold must be aligned on `kBucketSize`. + struct Bucket { + // bit mask to store `kBucketSize` enums. + BucketType data; + // 1st enum this bucket can represent. + T start; + + friend bool operator==(const Bucket& lhs, const Bucket& rhs) { + return lhs.start == rhs.start && lhs.data == rhs.data; + } + }; + + // How many distinct values can a bucket hold? 1 bit per value. + static constexpr size_t kBucketSize = sizeof(BucketType) * 8ULL; public: - // Construct an empty set. - EnumSet() {} - // Construct an set with just the given enum value. - explicit EnumSet(EnumType c) { Add(c); } - // Construct an set from an initializer list of enum values. - EnumSet(std::initializer_list cs) { - for (auto c : cs) Add(c); - } - EnumSet(uint32_t count, const EnumType* ptr) { - for (uint32_t i = 0; i < count; ++i) Add(ptr[i]); - } - // Copy constructor. - EnumSet(const EnumSet& other) { *this = other; } - // Move constructor. The moved-from set is emptied. - EnumSet(EnumSet&& other) { - mask_ = other.mask_; - overflow_ = std::move(other.overflow_); - other.mask_ = 0; - other.overflow_.reset(nullptr); - } - // Assignment operator. - EnumSet& operator=(const EnumSet& other) { - if (&other != this) { - mask_ = other.mask_; - overflow_.reset(other.overflow_ ? new OverflowSetType(*other.overflow_) - : nullptr); + class Iterator { + public: + typedef Iterator self_type; + typedef T value_type; + typedef T& reference; + typedef T* pointer; + typedef std::forward_iterator_tag iterator_category; + typedef size_t difference_type; + + Iterator(const Iterator& other) + : set_(other.set_), + bucketIndex_(other.bucketIndex_), + bucketOffset_(other.bucketOffset_) {} + + Iterator& operator++() { + do { + if (bucketIndex_ >= set_->buckets_.size()) { + bucketIndex_ = set_->buckets_.size(); + bucketOffset_ = 0; + break; + } + + if (bucketOffset_ + 1 == kBucketSize) { + bucketOffset_ = 0; + ++bucketIndex_; + } else { + ++bucketOffset_; + } + + } while (bucketIndex_ < set_->buckets_.size() && + !set_->HasEnumAt(bucketIndex_, bucketOffset_)); + return *this; } - return *this; - } - friend bool operator==(const EnumSet& a, const EnumSet& b) { - if (a.mask_ != b.mask_) { - return false; + Iterator operator++(int) { + Iterator old = *this; + operator++(); + return old; } - if (a.overflow_ == nullptr && b.overflow_ == nullptr) { - return true; + T operator*() const { + assert(set_->HasEnumAt(bucketIndex_, bucketOffset_) && + "operator*() called on an invalid iterator."); + return GetValueFromBucket(set_->buckets_[bucketIndex_], bucketOffset_); } - if (a.overflow_ == nullptr || b.overflow_ == nullptr) { - return false; + bool operator!=(const Iterator& other) const { + return set_ != other.set_ || bucketOffset_ != other.bucketOffset_ || + bucketIndex_ != other.bucketIndex_; } - return *a.overflow_ == *b.overflow_; + bool operator==(const Iterator& other) const { + return !(operator!=(other)); + } + + Iterator& operator=(const Iterator& other) { + set_ = other.set_; + bucketIndex_ = other.bucketIndex_; + bucketOffset_ = other.bucketOffset_; + return *this; + } + + private: + Iterator(const EnumSet* set, size_t bucketIndex, ElementType bucketOffset) + : set_(set), bucketIndex_(bucketIndex), bucketOffset_(bucketOffset) {} + + private: + const EnumSet* set_ = nullptr; + // Index of the bucket in the vector. + size_t bucketIndex_ = 0; + // Offset in bits in the current bucket. + ElementType bucketOffset_ = 0; + + friend class EnumSet; + }; + + // Required to allow the use of std::inserter. + using value_type = T; + using const_iterator = Iterator; + using iterator = Iterator; + + public: + iterator cbegin() const noexcept { + auto it = iterator(this, /* bucketIndex= */ 0, /* bucketOffset= */ 0); + if (buckets_.size() == 0) { + return it; + } + + // The iterator has the logic to find the next valid bit. If the value 0 + // is not stored, use it to find the next valid bit. + if (!HasEnumAt(it.bucketIndex_, it.bucketOffset_)) { + ++it; + } + + return it; } - friend bool operator!=(const EnumSet& a, const EnumSet& b) { - return !(a == b); + iterator begin() const noexcept { return cbegin(); } + + iterator cend() const noexcept { + return iterator(this, buckets_.size(), /* bucketOffset= */ 0); } - // Adds the given enum value to the set. This has no effect if the - // enum value is already in the set. - void Add(EnumType c) { AddWord(ToWord(c)); } + iterator end() const noexcept { return cend(); } - // Removes the given enum value from the set. This has no effect if the - // enum value is not in the set. - void Remove(EnumType c) { RemoveWord(ToWord(c)); } + // Creates an empty set. + EnumSet() : buckets_(0), size_(0) {} - // Returns true if this enum value is in the set. - bool Contains(EnumType c) const { return ContainsWord(ToWord(c)); } + // Creates a set and store `value` in it. + EnumSet(T value) : EnumSet() { insert(value); } - // Applies f to each enum in the set, in order from smallest enum - // value to largest. - void ForEach(std::function f) const { - for (uint32_t i = 0; i < 64; ++i) { - if (mask_ & AsMask(i)) f(static_cast(i)); + // Creates a set and stores each `values` in it. + EnumSet(std::initializer_list values) : EnumSet() { + for (auto item : values) { + insert(item); } - if (overflow_) { - for (uint32_t c : *overflow_) f(static_cast(c)); + } + + // Creates a set, and insert `count` enum values pointed by `array` in it. + EnumSet(ElementType count, const T* array) : EnumSet() { + for (ElementType i = 0; i < count; i++) { + insert(array[i]); } } - // Returns true if the set is empty. - bool IsEmpty() const { - if (mask_) return false; - if (overflow_ && !overflow_->empty()) return false; - return true; + // Creates a set initialized with the content of the range [begin; end[. + template + EnumSet(InputIt begin, InputIt end) : EnumSet() { + for (; begin != end; ++begin) { + insert(*begin); + } } - // Returns true if the set contains ANY of the elements of |in_set|, - // or if |in_set| is empty. - bool HasAnyOf(const EnumSet& in_set) const { - if (in_set.IsEmpty()) return true; + // Copies the EnumSet `other` into a new EnumSet. + EnumSet(const EnumSet& other) + : buckets_(other.buckets_), size_(other.size_) {} - if (mask_ & in_set.mask_) return true; + // Moves the EnumSet `other` into a new EnumSet. + EnumSet(EnumSet&& other) + : buckets_(std::move(other.buckets_)), size_(other.size_) {} - if (!overflow_ || !in_set.overflow_) return false; + // Deep-copies the EnumSet `other` into this EnumSet. + EnumSet& operator=(const EnumSet& other) { + buckets_ = other.buckets_; + size_ = other.size_; + return *this; + } + + // Matches std::unordered_set::insert behavior. + std::pair insert(const T& value) { + const size_t index = FindBucketForValue(value); + const ElementType offset = ComputeBucketOffset(value); - for (uint32_t item : *in_set.overflow_) { - if (overflow_->find(item) != overflow_->end()) return true; + if (index >= buckets_.size() || + buckets_[index].start != ComputeBucketStart(value)) { + size_ += 1; + InsertBucketFor(index, value); + return std::make_pair(Iterator(this, index, offset), true); } - return false; + auto& bucket = buckets_[index]; + const auto mask = ComputeMaskForValue(value); + if (bucket.data & mask) { + return std::make_pair(Iterator(this, index, offset), false); + } + + size_ += 1; + bucket.data |= ComputeMaskForValue(value); + return std::make_pair(Iterator(this, index, offset), true); } - private: - // Adds the given enum value (as a 32-bit word) to the set. This has no - // effect if the enum value is already in the set. - void AddWord(uint32_t word) { - if (auto new_bits = AsMask(word)) { - mask_ |= new_bits; - } else { - Overflow().insert(word); + // Inserts `value` in the set if possible. + // Similar to `std::unordered_set::insert`, except the hint is ignored. + // Returns an iterator to the inserted element, or the element preventing + // insertion. + iterator insert(const_iterator, const T& value) { + return insert(value).first; + } + + // Inserts `value` in the set if possible. + // Similar to `std::unordered_set::insert`, except the hint is ignored. + // Returns an iterator to the inserted element, or the element preventing + // insertion. + iterator insert(const_iterator, T&& value) { return insert(value).first; } + + // Inserts all the values in the range [`first`; `last[. + // Similar to `std::unordered_set::insert`. + template + void insert(InputIt first, InputIt last) { + for (auto it = first; it != last; ++it) { + insert(*it); + } + } + + // Removes the value `value` into the set. + // Similar to `std::unordered_set::erase`. + // Returns the number of erased elements. + size_t erase(const T& value) { + const size_t index = FindBucketForValue(value); + if (index >= buckets_.size() || + buckets_[index].start != ComputeBucketStart(value)) { + return 0; + } + + auto& bucket = buckets_[index]; + const auto mask = ComputeMaskForValue(value); + if (!(bucket.data & mask)) { + return 0; } + + size_ -= 1; + bucket.data &= ~mask; + if (bucket.data == 0) { + buckets_.erase(buckets_.cbegin() + index); + } + return 1; } - // Removes the given enum value (as a 32-bit word) from the set. This has no - // effect if the enum value is not in the set. - void RemoveWord(uint32_t word) { - if (auto new_bits = AsMask(word)) { - mask_ &= ~new_bits; - } else { - auto itr = Overflow().find(word); - if (itr != Overflow().end()) Overflow().erase(itr); + // Returns true if `value` is present in the set. + bool contains(T value) const { + const size_t index = FindBucketForValue(value); + if (index >= buckets_.size() || + buckets_[index].start != ComputeBucketStart(value)) { + return false; } + auto& bucket = buckets_[index]; + return bucket.data & ComputeMaskForValue(value); } - // Returns true if the enum represented as a 32-bit word is in the set. - bool ContainsWord(uint32_t word) const { - // We shouldn't call Overflow() since this is a const method. - if (auto bits = AsMask(word)) { - return (mask_ & bits) != 0; - } else if (auto overflow = overflow_.get()) { - return overflow->find(word) != overflow->end(); + // Returns the 1 if `value` is present in the set, `0` otherwise. + inline size_t count(T value) const { return contains(value) ? 1 : 0; } + + // Returns true if the set is holds no values. + inline bool empty() const { return size_ == 0; } + + // Returns the number of enums stored in this set. + size_t size() const { return size_; } + + // Returns true if this set contains at least one value contained in `in_set`. + // Note: If `in_set` is empty, this function returns true. + bool HasAnyOf(const EnumSet& in_set) const { + if (in_set.empty()) { + return true; + } + + auto lhs = buckets_.cbegin(); + auto rhs = in_set.buckets_.cbegin(); + + while (lhs != buckets_.cend() && rhs != in_set.buckets_.cend()) { + if (lhs->start == rhs->start) { + if (lhs->data & rhs->data) { + // At least 1 bit is shared. Early return. + return true; + } + + lhs++; + rhs++; + continue; + } + + // LHS bucket is smaller than the current RHS bucket. Catching up on RHS. + if (lhs->start < rhs->start) { + lhs++; + continue; + } + + // Otherwise, RHS needs to catch up on LHS. + rhs++; } - // The word is large, but the set doesn't have large members, so - // it doesn't have an overflow set. + return false; } - // Returns the enum value as a uint32_t. - uint32_t ToWord(EnumType value) const { - static_assert(sizeof(EnumType) <= sizeof(uint32_t), - "EnumType must statically castable to uint32_t"); - return static_cast(value); + private: + // Returns the index of the last bucket in which `value` could be stored. + static constexpr inline size_t ComputeLargestPossibleBucketIndexFor(T value) { + return static_cast(value) / kBucketSize; } - // Determines whether the given enum value can be represented - // as a bit in a uint64_t mask. If so, then returns that mask bit. - // Otherwise, returns 0. - uint64_t AsMask(uint32_t word) const { - if (word > 63) return 0; - return uint64_t(1) << word; + // Returns the smallest enum value that could be contained in the same bucket + // as `value`. + static constexpr inline T ComputeBucketStart(T value) { + return static_cast(kBucketSize * + ComputeLargestPossibleBucketIndexFor(value)); } - // Ensures that overflow_set_ references a set. A new empty set is - // allocated if one doesn't exist yet. Returns overflow_set_. - OverflowSetType& Overflow() { - if (overflow_.get() == nullptr) { - overflow_ = MakeUnique(); + // Returns the index of the bit that corresponds to `value` in the bucket. + static constexpr inline ElementType ComputeBucketOffset(T value) { + return static_cast(value) % kBucketSize; + } + + // Returns the bitmask used to represent the enum `value` in its bucket. + static constexpr inline BucketType ComputeMaskForValue(T value) { + return 1ULL << ComputeBucketOffset(value); + } + + // Returns the `enum` stored in `bucket` at `offset`. + // `offset` is the bit-offset in the bucket storage. + static constexpr inline T GetValueFromBucket(const Bucket& bucket, + BucketType offset) { + return static_cast(static_cast(bucket.start) + offset); + } + + // For a given enum `value`, finds the bucket index that could contain this + // value. If no such bucket is found, the index at which the new bucket should + // be inserted is returned. + size_t FindBucketForValue(T value) const { + // Set is empty, insert at 0. + if (buckets_.size() == 0) { + return 0; } - return *overflow_; + + const T wanted_start = ComputeBucketStart(value); + assert(buckets_.size() > 0 && + "Size must not be 0 here. Has the code above changed?"); + size_t index = std::min(buckets_.size() - 1, + ComputeLargestPossibleBucketIndexFor(value)); + + // This loops behaves like std::upper_bound with a reverse iterator. + // Buckets are sorted. 3 main cases: + // - The bucket matches + // => returns the bucket index. + // - The found bucket is larger + // => scans left until it finds the correct bucket, or insertion point. + // - The found bucket is smaller + // => We are at the end, so we return past-end index for insertion. + for (; buckets_[index].start >= wanted_start; index--) { + if (index == 0) { + return 0; + } + } + + return index + 1; + } + + // Creates a new bucket to store `value` and inserts it at `index`. + // If the `index` is past the end, the bucket is inserted at the end of the + // vector. + void InsertBucketFor(size_t index, T value) { + const T bucket_start = ComputeBucketStart(value); + Bucket bucket = {1ULL << ComputeBucketOffset(value), bucket_start}; + auto it = buckets_.emplace(buckets_.begin() + index, std::move(bucket)); +#if defined(NDEBUG) + (void)it; // Silencing unused variable warning. +#else + assert(std::next(it) == buckets_.end() || + std::next(it)->start > bucket_start); + assert(it == buckets_.begin() || std::prev(it)->start < bucket_start); +#endif + } + + // Returns true if the bucket at `bucketIndex/ stores the enum at + // `bucketOffset`, false otherwise. + bool HasEnumAt(size_t bucketIndex, BucketType bucketOffset) const { + assert(bucketIndex < buckets_.size()); + assert(bucketOffset < kBucketSize); + return buckets_[bucketIndex].data & (1ULL << bucketOffset); + } + + // Returns true if `lhs` and `rhs` hold the exact same values. + friend bool operator==(const EnumSet& lhs, const EnumSet& rhs) { + if (lhs.size_ != rhs.size_) { + return false; + } + + if (lhs.buckets_.size() != rhs.buckets_.size()) { + return false; + } + return lhs.buckets_ == rhs.buckets_; + } + + // Returns true if `lhs` and `rhs` hold at least 1 different value. + friend bool operator!=(const EnumSet& lhs, const EnumSet& rhs) { + return !(lhs == rhs); } - // Enums with values up to 63 are stored as bits in this mask. - uint64_t mask_ = 0; - // Enums with values larger than 63 are stored in this set. - // This set should normally be empty or very small. - std::unique_ptr overflow_ = {}; + // Storage for the buckets. + std::vector buckets_; + // How many enums is this set storing. + size_t size_ = 0; }; -// A set of SpvCapability, optimized for small capability values. -using CapabilitySet = EnumSet; +// A set of spv::Capability. +using CapabilitySet = EnumSet; } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.h index af8f56b82..b13658406 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.h @@ -29,7 +29,7 @@ bool GetExtensionFromString(const char* str, Extension* extension); const char* ExtensionToString(Extension extension); // Returns text string corresponding to |capability|. -const char* CapabilityToString(SpvCapability capability); +const char* CapabilityToString(spv::Capability capability); } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.inc index 5127f379c..a93c41397 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/enum_string_mapping.inc @@ -1,5 +1,7 @@ const char* ExtensionToString(Extension extension) { switch (extension) { + case Extension::kSPV_AMDX_shader_enqueue: + return "SPV_AMDX_shader_enqueue"; case Extension::kSPV_AMD_gcn_shader: return "SPV_AMD_gcn_shader"; case Extension::kSPV_AMD_gpu_shader_half_float: @@ -10,6 +12,8 @@ const char* ExtensionToString(Extension extension) { return "SPV_AMD_gpu_shader_int16"; case Extension::kSPV_AMD_shader_ballot: return "SPV_AMD_shader_ballot"; + case Extension::kSPV_AMD_shader_early_and_late_fragment_tests: + return "SPV_AMD_shader_early_and_late_fragment_tests"; case Extension::kSPV_AMD_shader_explicit_vertex_parameter: return "SPV_AMD_shader_explicit_vertex_parameter"; case Extension::kSPV_AMD_shader_fragment_mask: @@ -20,6 +24,10 @@ const char* ExtensionToString(Extension extension) { return "SPV_AMD_shader_trinary_minmax"; case Extension::kSPV_AMD_texture_gather_bias_lod: return "SPV_AMD_texture_gather_bias_lod"; + case Extension::kSPV_ARM_cooperative_matrix_layouts: + return "SPV_ARM_cooperative_matrix_layouts"; + case Extension::kSPV_ARM_core_builtins: + return "SPV_ARM_core_builtins"; case Extension::kSPV_EXT_demote_to_helper_invocation: return "SPV_EXT_demote_to_helper_invocation"; case Extension::kSPV_EXT_descriptor_indexing: @@ -30,8 +38,14 @@ const char* ExtensionToString(Extension extension) { return "SPV_EXT_fragment_invocation_density"; case Extension::kSPV_EXT_fragment_shader_interlock: return "SPV_EXT_fragment_shader_interlock"; + case Extension::kSPV_EXT_mesh_shader: + return "SPV_EXT_mesh_shader"; + case Extension::kSPV_EXT_opacity_micromap: + return "SPV_EXT_opacity_micromap"; case Extension::kSPV_EXT_physical_storage_buffer: return "SPV_EXT_physical_storage_buffer"; + case Extension::kSPV_EXT_replicated_composites: + return "SPV_EXT_replicated_composites"; case Extension::kSPV_EXT_shader_atomic_float16_add: return "SPV_EXT_shader_atomic_float16_add"; case Extension::kSPV_EXT_shader_atomic_float_add: @@ -42,6 +56,8 @@ const char* ExtensionToString(Extension extension) { return "SPV_EXT_shader_image_int64"; case Extension::kSPV_EXT_shader_stencil_export: return "SPV_EXT_shader_stencil_export"; + case Extension::kSPV_EXT_shader_tile_image: + return "SPV_EXT_shader_tile_image"; case Extension::kSPV_EXT_shader_viewport_index_layer: return "SPV_EXT_shader_viewport_index_layer"; case Extension::kSPV_GOOGLE_decorate_string: @@ -56,8 +72,12 @@ const char* ExtensionToString(Extension extension) { return "SPV_INTEL_arbitrary_precision_floating_point"; case Extension::kSPV_INTEL_arbitrary_precision_integers: return "SPV_INTEL_arbitrary_precision_integers"; + case Extension::kSPV_INTEL_bfloat16_conversion: + return "SPV_INTEL_bfloat16_conversion"; case Extension::kSPV_INTEL_blocking_pipes: return "SPV_INTEL_blocking_pipes"; + case Extension::kSPV_INTEL_cache_controls: + return "SPV_INTEL_cache_controls"; case Extension::kSPV_INTEL_debug_module: return "SPV_INTEL_debug_module"; case Extension::kSPV_INTEL_device_side_avc_motion_estimation: @@ -66,10 +86,20 @@ const char* ExtensionToString(Extension extension) { return "SPV_INTEL_float_controls2"; case Extension::kSPV_INTEL_fp_fast_math_mode: return "SPV_INTEL_fp_fast_math_mode"; + case Extension::kSPV_INTEL_fp_max_error: + return "SPV_INTEL_fp_max_error"; + case Extension::kSPV_INTEL_fpga_argument_interfaces: + return "SPV_INTEL_fpga_argument_interfaces"; case Extension::kSPV_INTEL_fpga_buffer_location: return "SPV_INTEL_fpga_buffer_location"; case Extension::kSPV_INTEL_fpga_cluster_attributes: return "SPV_INTEL_fpga_cluster_attributes"; + case Extension::kSPV_INTEL_fpga_dsp_control: + return "SPV_INTEL_fpga_dsp_control"; + case Extension::kSPV_INTEL_fpga_invocation_pipelining_attributes: + return "SPV_INTEL_fpga_invocation_pipelining_attributes"; + case Extension::kSPV_INTEL_fpga_latency_control: + return "SPV_INTEL_fpga_latency_control"; case Extension::kSPV_INTEL_fpga_loop_controls: return "SPV_INTEL_fpga_loop_controls"; case Extension::kSPV_INTEL_fpga_memory_accesses: @@ -80,22 +110,36 @@ const char* ExtensionToString(Extension extension) { return "SPV_INTEL_fpga_reg"; case Extension::kSPV_INTEL_function_pointers: return "SPV_INTEL_function_pointers"; + case Extension::kSPV_INTEL_global_variable_fpga_decorations: + return "SPV_INTEL_global_variable_fpga_decorations"; + case Extension::kSPV_INTEL_global_variable_host_access: + return "SPV_INTEL_global_variable_host_access"; case Extension::kSPV_INTEL_inline_assembly: return "SPV_INTEL_inline_assembly"; case Extension::kSPV_INTEL_io_pipes: return "SPV_INTEL_io_pipes"; case Extension::kSPV_INTEL_kernel_attributes: return "SPV_INTEL_kernel_attributes"; - case Extension::kSPV_INTEL_long_constant_composite: - return "SPV_INTEL_long_constant_composite"; + case Extension::kSPV_INTEL_long_composites: + return "SPV_INTEL_long_composites"; case Extension::kSPV_INTEL_loop_fuse: return "SPV_INTEL_loop_fuse"; + case Extension::kSPV_INTEL_masked_gather_scatter: + return "SPV_INTEL_masked_gather_scatter"; + case Extension::kSPV_INTEL_maximum_registers: + return "SPV_INTEL_maximum_registers"; case Extension::kSPV_INTEL_media_block_io: return "SPV_INTEL_media_block_io"; + case Extension::kSPV_INTEL_memory_access_aliasing: + return "SPV_INTEL_memory_access_aliasing"; case Extension::kSPV_INTEL_optnone: return "SPV_INTEL_optnone"; + case Extension::kSPV_INTEL_runtime_aligned: + return "SPV_INTEL_runtime_aligned"; case Extension::kSPV_INTEL_shader_integer_functions2: return "SPV_INTEL_shader_integer_functions2"; + case Extension::kSPV_INTEL_split_barrier: + return "SPV_INTEL_split_barrier"; case Extension::kSPV_INTEL_subgroups: return "SPV_INTEL_subgroups"; case Extension::kSPV_INTEL_unstructured_loop_controls: @@ -112,12 +156,16 @@ const char* ExtensionToString(Extension extension) { return "SPV_KHR_8bit_storage"; case Extension::kSPV_KHR_bit_instructions: return "SPV_KHR_bit_instructions"; + case Extension::kSPV_KHR_cooperative_matrix: + return "SPV_KHR_cooperative_matrix"; case Extension::kSPV_KHR_device_group: return "SPV_KHR_device_group"; case Extension::kSPV_KHR_expect_assume: return "SPV_KHR_expect_assume"; case Extension::kSPV_KHR_float_controls: return "SPV_KHR_float_controls"; + case Extension::kSPV_KHR_float_controls2: + return "SPV_KHR_float_controls2"; case Extension::kSPV_KHR_fragment_shader_barycentric: return "SPV_KHR_fragment_shader_barycentric"; case Extension::kSPV_KHR_fragment_shading_rate: @@ -126,6 +174,8 @@ const char* ExtensionToString(Extension extension) { return "SPV_KHR_integer_dot_product"; case Extension::kSPV_KHR_linkonce_odr: return "SPV_KHR_linkonce_odr"; + case Extension::kSPV_KHR_maximal_reconvergence: + return "SPV_KHR_maximal_reconvergence"; case Extension::kSPV_KHR_multiview: return "SPV_KHR_multiview"; case Extension::kSPV_KHR_no_integer_wrap_decoration: @@ -136,10 +186,18 @@ const char* ExtensionToString(Extension extension) { return "SPV_KHR_physical_storage_buffer"; case Extension::kSPV_KHR_post_depth_coverage: return "SPV_KHR_post_depth_coverage"; + case Extension::kSPV_KHR_quad_control: + return "SPV_KHR_quad_control"; + case Extension::kSPV_KHR_ray_cull_mask: + return "SPV_KHR_ray_cull_mask"; case Extension::kSPV_KHR_ray_query: return "SPV_KHR_ray_query"; case Extension::kSPV_KHR_ray_tracing: return "SPV_KHR_ray_tracing"; + case Extension::kSPV_KHR_ray_tracing_position_fetch: + return "SPV_KHR_ray_tracing_position_fetch"; + case Extension::kSPV_KHR_relaxed_extended_instruction: + return "SPV_KHR_relaxed_extended_instruction"; case Extension::kSPV_KHR_shader_atomic_counter_ops: return "SPV_KHR_shader_atomic_counter_ops"; case Extension::kSPV_KHR_shader_ballot: @@ -150,12 +208,16 @@ const char* ExtensionToString(Extension extension) { return "SPV_KHR_shader_draw_parameters"; case Extension::kSPV_KHR_storage_buffer_storage_class: return "SPV_KHR_storage_buffer_storage_class"; + case Extension::kSPV_KHR_subgroup_rotate: + return "SPV_KHR_subgroup_rotate"; case Extension::kSPV_KHR_subgroup_uniform_control_flow: return "SPV_KHR_subgroup_uniform_control_flow"; case Extension::kSPV_KHR_subgroup_vote: return "SPV_KHR_subgroup_vote"; case Extension::kSPV_KHR_terminate_invocation: return "SPV_KHR_terminate_invocation"; + case Extension::kSPV_KHR_uniform_group_instructions: + return "SPV_KHR_uniform_group_instructions"; case Extension::kSPV_KHR_variable_pointers: return "SPV_KHR_variable_pointers"; case Extension::kSPV_KHR_vulkan_memory_model: @@ -170,20 +232,28 @@ const char* ExtensionToString(Extension extension) { return "SPV_NV_compute_shader_derivatives"; case Extension::kSPV_NV_cooperative_matrix: return "SPV_NV_cooperative_matrix"; + case Extension::kSPV_NV_displacement_micromap: + return "SPV_NV_displacement_micromap"; case Extension::kSPV_NV_fragment_shader_barycentric: return "SPV_NV_fragment_shader_barycentric"; case Extension::kSPV_NV_geometry_shader_passthrough: return "SPV_NV_geometry_shader_passthrough"; case Extension::kSPV_NV_mesh_shader: return "SPV_NV_mesh_shader"; + case Extension::kSPV_NV_raw_access_chains: + return "SPV_NV_raw_access_chains"; case Extension::kSPV_NV_ray_tracing: return "SPV_NV_ray_tracing"; case Extension::kSPV_NV_ray_tracing_motion_blur: return "SPV_NV_ray_tracing_motion_blur"; case Extension::kSPV_NV_sample_mask_override_coverage: return "SPV_NV_sample_mask_override_coverage"; + case Extension::kSPV_NV_shader_atomic_fp16_vector: + return "SPV_NV_shader_atomic_fp16_vector"; case Extension::kSPV_NV_shader_image_footprint: return "SPV_NV_shader_image_footprint"; + case Extension::kSPV_NV_shader_invocation_reorder: + return "SPV_NV_shader_invocation_reorder"; case Extension::kSPV_NV_shader_sm_builtins: return "SPV_NV_shader_sm_builtins"; case Extension::kSPV_NV_shader_subgroup_partitioned: @@ -194,6 +264,10 @@ const char* ExtensionToString(Extension extension) { return "SPV_NV_stereo_view_rendering"; case Extension::kSPV_NV_viewport_array2: return "SPV_NV_viewport_array2"; + case Extension::kSPV_QCOM_image_processing: + return "SPV_QCOM_image_processing"; + case Extension::kSPV_QCOM_image_processing2: + return "SPV_QCOM_image_processing2"; case Extension::kSPV_VALIDATOR_ignore_type_decl_unique: return "SPV_VALIDATOR_ignore_type_decl_unique"; } @@ -203,8 +277,8 @@ const char* ExtensionToString(Extension extension) { bool GetExtensionFromString(const char* str, Extension* extension) { - static const char* known_ext_strs[] = { "SPV_AMD_gcn_shader", "SPV_AMD_gpu_shader_half_float", "SPV_AMD_gpu_shader_half_float_fetch", "SPV_AMD_gpu_shader_int16", "SPV_AMD_shader_ballot", "SPV_AMD_shader_explicit_vertex_parameter", "SPV_AMD_shader_fragment_mask", "SPV_AMD_shader_image_load_store_lod", "SPV_AMD_shader_trinary_minmax", "SPV_AMD_texture_gather_bias_lod", "SPV_EXT_demote_to_helper_invocation", "SPV_EXT_descriptor_indexing", "SPV_EXT_fragment_fully_covered", "SPV_EXT_fragment_invocation_density", "SPV_EXT_fragment_shader_interlock", "SPV_EXT_physical_storage_buffer", "SPV_EXT_shader_atomic_float16_add", "SPV_EXT_shader_atomic_float_add", "SPV_EXT_shader_atomic_float_min_max", "SPV_EXT_shader_image_int64", "SPV_EXT_shader_stencil_export", "SPV_EXT_shader_viewport_index_layer", "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1", "SPV_GOOGLE_user_type", "SPV_INTEL_arbitrary_precision_fixed_point", "SPV_INTEL_arbitrary_precision_floating_point", "SPV_INTEL_arbitrary_precision_integers", "SPV_INTEL_blocking_pipes", "SPV_INTEL_debug_module", "SPV_INTEL_device_side_avc_motion_estimation", "SPV_INTEL_float_controls2", "SPV_INTEL_fp_fast_math_mode", "SPV_INTEL_fpga_buffer_location", "SPV_INTEL_fpga_cluster_attributes", "SPV_INTEL_fpga_loop_controls", "SPV_INTEL_fpga_memory_accesses", "SPV_INTEL_fpga_memory_attributes", "SPV_INTEL_fpga_reg", "SPV_INTEL_function_pointers", "SPV_INTEL_inline_assembly", "SPV_INTEL_io_pipes", "SPV_INTEL_kernel_attributes", "SPV_INTEL_long_constant_composite", "SPV_INTEL_loop_fuse", "SPV_INTEL_media_block_io", "SPV_INTEL_optnone", "SPV_INTEL_shader_integer_functions2", "SPV_INTEL_subgroups", "SPV_INTEL_unstructured_loop_controls", "SPV_INTEL_usm_storage_classes", "SPV_INTEL_variable_length_array", "SPV_INTEL_vector_compute", "SPV_KHR_16bit_storage", "SPV_KHR_8bit_storage", "SPV_KHR_bit_instructions", "SPV_KHR_device_group", "SPV_KHR_expect_assume", "SPV_KHR_float_controls", "SPV_KHR_fragment_shader_barycentric", "SPV_KHR_fragment_shading_rate", "SPV_KHR_integer_dot_product", "SPV_KHR_linkonce_odr", "SPV_KHR_multiview", "SPV_KHR_no_integer_wrap_decoration", "SPV_KHR_non_semantic_info", "SPV_KHR_physical_storage_buffer", "SPV_KHR_post_depth_coverage", "SPV_KHR_ray_query", "SPV_KHR_ray_tracing", "SPV_KHR_shader_atomic_counter_ops", "SPV_KHR_shader_ballot", "SPV_KHR_shader_clock", "SPV_KHR_shader_draw_parameters", "SPV_KHR_storage_buffer_storage_class", "SPV_KHR_subgroup_uniform_control_flow", "SPV_KHR_subgroup_vote", "SPV_KHR_terminate_invocation", "SPV_KHR_variable_pointers", "SPV_KHR_vulkan_memory_model", "SPV_KHR_workgroup_memory_explicit_layout", "SPV_NVX_multiview_per_view_attributes", "SPV_NV_bindless_texture", "SPV_NV_compute_shader_derivatives", "SPV_NV_cooperative_matrix", "SPV_NV_fragment_shader_barycentric", "SPV_NV_geometry_shader_passthrough", "SPV_NV_mesh_shader", "SPV_NV_ray_tracing", "SPV_NV_ray_tracing_motion_blur", "SPV_NV_sample_mask_override_coverage", "SPV_NV_shader_image_footprint", "SPV_NV_shader_sm_builtins", "SPV_NV_shader_subgroup_partitioned", "SPV_NV_shading_rate", "SPV_NV_stereo_view_rendering", "SPV_NV_viewport_array2", "SPV_VALIDATOR_ignore_type_decl_unique" }; - static const Extension known_ext_ids[] = { Extension::kSPV_AMD_gcn_shader, Extension::kSPV_AMD_gpu_shader_half_float, Extension::kSPV_AMD_gpu_shader_half_float_fetch, Extension::kSPV_AMD_gpu_shader_int16, Extension::kSPV_AMD_shader_ballot, Extension::kSPV_AMD_shader_explicit_vertex_parameter, Extension::kSPV_AMD_shader_fragment_mask, Extension::kSPV_AMD_shader_image_load_store_lod, Extension::kSPV_AMD_shader_trinary_minmax, Extension::kSPV_AMD_texture_gather_bias_lod, Extension::kSPV_EXT_demote_to_helper_invocation, Extension::kSPV_EXT_descriptor_indexing, Extension::kSPV_EXT_fragment_fully_covered, Extension::kSPV_EXT_fragment_invocation_density, Extension::kSPV_EXT_fragment_shader_interlock, Extension::kSPV_EXT_physical_storage_buffer, Extension::kSPV_EXT_shader_atomic_float16_add, Extension::kSPV_EXT_shader_atomic_float_add, Extension::kSPV_EXT_shader_atomic_float_min_max, Extension::kSPV_EXT_shader_image_int64, Extension::kSPV_EXT_shader_stencil_export, Extension::kSPV_EXT_shader_viewport_index_layer, Extension::kSPV_GOOGLE_decorate_string, Extension::kSPV_GOOGLE_hlsl_functionality1, Extension::kSPV_GOOGLE_user_type, Extension::kSPV_INTEL_arbitrary_precision_fixed_point, Extension::kSPV_INTEL_arbitrary_precision_floating_point, Extension::kSPV_INTEL_arbitrary_precision_integers, Extension::kSPV_INTEL_blocking_pipes, Extension::kSPV_INTEL_debug_module, Extension::kSPV_INTEL_device_side_avc_motion_estimation, Extension::kSPV_INTEL_float_controls2, Extension::kSPV_INTEL_fp_fast_math_mode, Extension::kSPV_INTEL_fpga_buffer_location, Extension::kSPV_INTEL_fpga_cluster_attributes, Extension::kSPV_INTEL_fpga_loop_controls, Extension::kSPV_INTEL_fpga_memory_accesses, Extension::kSPV_INTEL_fpga_memory_attributes, Extension::kSPV_INTEL_fpga_reg, Extension::kSPV_INTEL_function_pointers, Extension::kSPV_INTEL_inline_assembly, Extension::kSPV_INTEL_io_pipes, Extension::kSPV_INTEL_kernel_attributes, Extension::kSPV_INTEL_long_constant_composite, Extension::kSPV_INTEL_loop_fuse, Extension::kSPV_INTEL_media_block_io, Extension::kSPV_INTEL_optnone, Extension::kSPV_INTEL_shader_integer_functions2, Extension::kSPV_INTEL_subgroups, Extension::kSPV_INTEL_unstructured_loop_controls, Extension::kSPV_INTEL_usm_storage_classes, Extension::kSPV_INTEL_variable_length_array, Extension::kSPV_INTEL_vector_compute, Extension::kSPV_KHR_16bit_storage, Extension::kSPV_KHR_8bit_storage, Extension::kSPV_KHR_bit_instructions, Extension::kSPV_KHR_device_group, Extension::kSPV_KHR_expect_assume, Extension::kSPV_KHR_float_controls, Extension::kSPV_KHR_fragment_shader_barycentric, Extension::kSPV_KHR_fragment_shading_rate, Extension::kSPV_KHR_integer_dot_product, Extension::kSPV_KHR_linkonce_odr, Extension::kSPV_KHR_multiview, Extension::kSPV_KHR_no_integer_wrap_decoration, Extension::kSPV_KHR_non_semantic_info, Extension::kSPV_KHR_physical_storage_buffer, Extension::kSPV_KHR_post_depth_coverage, Extension::kSPV_KHR_ray_query, Extension::kSPV_KHR_ray_tracing, Extension::kSPV_KHR_shader_atomic_counter_ops, Extension::kSPV_KHR_shader_ballot, Extension::kSPV_KHR_shader_clock, Extension::kSPV_KHR_shader_draw_parameters, Extension::kSPV_KHR_storage_buffer_storage_class, Extension::kSPV_KHR_subgroup_uniform_control_flow, Extension::kSPV_KHR_subgroup_vote, Extension::kSPV_KHR_terminate_invocation, Extension::kSPV_KHR_variable_pointers, Extension::kSPV_KHR_vulkan_memory_model, Extension::kSPV_KHR_workgroup_memory_explicit_layout, Extension::kSPV_NVX_multiview_per_view_attributes, Extension::kSPV_NV_bindless_texture, Extension::kSPV_NV_compute_shader_derivatives, Extension::kSPV_NV_cooperative_matrix, Extension::kSPV_NV_fragment_shader_barycentric, Extension::kSPV_NV_geometry_shader_passthrough, Extension::kSPV_NV_mesh_shader, Extension::kSPV_NV_ray_tracing, Extension::kSPV_NV_ray_tracing_motion_blur, Extension::kSPV_NV_sample_mask_override_coverage, Extension::kSPV_NV_shader_image_footprint, Extension::kSPV_NV_shader_sm_builtins, Extension::kSPV_NV_shader_subgroup_partitioned, Extension::kSPV_NV_shading_rate, Extension::kSPV_NV_stereo_view_rendering, Extension::kSPV_NV_viewport_array2, Extension::kSPV_VALIDATOR_ignore_type_decl_unique }; + static const char* known_ext_strs[] = { "SPV_AMDX_shader_enqueue", "SPV_AMD_gcn_shader", "SPV_AMD_gpu_shader_half_float", "SPV_AMD_gpu_shader_half_float_fetch", "SPV_AMD_gpu_shader_int16", "SPV_AMD_shader_ballot", "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_AMD_shader_explicit_vertex_parameter", "SPV_AMD_shader_fragment_mask", "SPV_AMD_shader_image_load_store_lod", "SPV_AMD_shader_trinary_minmax", "SPV_AMD_texture_gather_bias_lod", "SPV_ARM_cooperative_matrix_layouts", "SPV_ARM_core_builtins", "SPV_EXT_demote_to_helper_invocation", "SPV_EXT_descriptor_indexing", "SPV_EXT_fragment_fully_covered", "SPV_EXT_fragment_invocation_density", "SPV_EXT_fragment_shader_interlock", "SPV_EXT_mesh_shader", "SPV_EXT_opacity_micromap", "SPV_EXT_physical_storage_buffer", "SPV_EXT_replicated_composites", "SPV_EXT_shader_atomic_float16_add", "SPV_EXT_shader_atomic_float_add", "SPV_EXT_shader_atomic_float_min_max", "SPV_EXT_shader_image_int64", "SPV_EXT_shader_stencil_export", "SPV_EXT_shader_tile_image", "SPV_EXT_shader_viewport_index_layer", "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1", "SPV_GOOGLE_user_type", "SPV_INTEL_arbitrary_precision_fixed_point", "SPV_INTEL_arbitrary_precision_floating_point", "SPV_INTEL_arbitrary_precision_integers", "SPV_INTEL_bfloat16_conversion", "SPV_INTEL_blocking_pipes", "SPV_INTEL_cache_controls", "SPV_INTEL_debug_module", "SPV_INTEL_device_side_avc_motion_estimation", "SPV_INTEL_float_controls2", "SPV_INTEL_fp_fast_math_mode", "SPV_INTEL_fp_max_error", "SPV_INTEL_fpga_argument_interfaces", "SPV_INTEL_fpga_buffer_location", "SPV_INTEL_fpga_cluster_attributes", "SPV_INTEL_fpga_dsp_control", "SPV_INTEL_fpga_invocation_pipelining_attributes", "SPV_INTEL_fpga_latency_control", "SPV_INTEL_fpga_loop_controls", "SPV_INTEL_fpga_memory_accesses", "SPV_INTEL_fpga_memory_attributes", "SPV_INTEL_fpga_reg", "SPV_INTEL_function_pointers", "SPV_INTEL_global_variable_fpga_decorations", "SPV_INTEL_global_variable_host_access", "SPV_INTEL_inline_assembly", "SPV_INTEL_io_pipes", "SPV_INTEL_kernel_attributes", "SPV_INTEL_long_composites", "SPV_INTEL_loop_fuse", "SPV_INTEL_masked_gather_scatter", "SPV_INTEL_maximum_registers", "SPV_INTEL_media_block_io", "SPV_INTEL_memory_access_aliasing", "SPV_INTEL_optnone", "SPV_INTEL_runtime_aligned", "SPV_INTEL_shader_integer_functions2", "SPV_INTEL_split_barrier", "SPV_INTEL_subgroups", "SPV_INTEL_unstructured_loop_controls", "SPV_INTEL_usm_storage_classes", "SPV_INTEL_variable_length_array", "SPV_INTEL_vector_compute", "SPV_KHR_16bit_storage", "SPV_KHR_8bit_storage", "SPV_KHR_bit_instructions", "SPV_KHR_cooperative_matrix", "SPV_KHR_device_group", "SPV_KHR_expect_assume", "SPV_KHR_float_controls", "SPV_KHR_float_controls2", "SPV_KHR_fragment_shader_barycentric", "SPV_KHR_fragment_shading_rate", "SPV_KHR_integer_dot_product", "SPV_KHR_linkonce_odr", "SPV_KHR_maximal_reconvergence", "SPV_KHR_multiview", "SPV_KHR_no_integer_wrap_decoration", "SPV_KHR_non_semantic_info", "SPV_KHR_physical_storage_buffer", "SPV_KHR_post_depth_coverage", "SPV_KHR_quad_control", "SPV_KHR_ray_cull_mask", "SPV_KHR_ray_query", "SPV_KHR_ray_tracing", "SPV_KHR_ray_tracing_position_fetch", "SPV_KHR_relaxed_extended_instruction", "SPV_KHR_shader_atomic_counter_ops", "SPV_KHR_shader_ballot", "SPV_KHR_shader_clock", "SPV_KHR_shader_draw_parameters", "SPV_KHR_storage_buffer_storage_class", "SPV_KHR_subgroup_rotate", "SPV_KHR_subgroup_uniform_control_flow", "SPV_KHR_subgroup_vote", "SPV_KHR_terminate_invocation", "SPV_KHR_uniform_group_instructions", "SPV_KHR_variable_pointers", "SPV_KHR_vulkan_memory_model", "SPV_KHR_workgroup_memory_explicit_layout", "SPV_NVX_multiview_per_view_attributes", "SPV_NV_bindless_texture", "SPV_NV_compute_shader_derivatives", "SPV_NV_cooperative_matrix", "SPV_NV_displacement_micromap", "SPV_NV_fragment_shader_barycentric", "SPV_NV_geometry_shader_passthrough", "SPV_NV_mesh_shader", "SPV_NV_raw_access_chains", "SPV_NV_ray_tracing", "SPV_NV_ray_tracing_motion_blur", "SPV_NV_sample_mask_override_coverage", "SPV_NV_shader_atomic_fp16_vector", "SPV_NV_shader_image_footprint", "SPV_NV_shader_invocation_reorder", "SPV_NV_shader_sm_builtins", "SPV_NV_shader_subgroup_partitioned", "SPV_NV_shading_rate", "SPV_NV_stereo_view_rendering", "SPV_NV_viewport_array2", "SPV_QCOM_image_processing", "SPV_QCOM_image_processing2", "SPV_VALIDATOR_ignore_type_decl_unique" }; + static const Extension known_ext_ids[] = { Extension::kSPV_AMDX_shader_enqueue, Extension::kSPV_AMD_gcn_shader, Extension::kSPV_AMD_gpu_shader_half_float, Extension::kSPV_AMD_gpu_shader_half_float_fetch, Extension::kSPV_AMD_gpu_shader_int16, Extension::kSPV_AMD_shader_ballot, Extension::kSPV_AMD_shader_early_and_late_fragment_tests, Extension::kSPV_AMD_shader_explicit_vertex_parameter, Extension::kSPV_AMD_shader_fragment_mask, Extension::kSPV_AMD_shader_image_load_store_lod, Extension::kSPV_AMD_shader_trinary_minmax, Extension::kSPV_AMD_texture_gather_bias_lod, Extension::kSPV_ARM_cooperative_matrix_layouts, Extension::kSPV_ARM_core_builtins, Extension::kSPV_EXT_demote_to_helper_invocation, Extension::kSPV_EXT_descriptor_indexing, Extension::kSPV_EXT_fragment_fully_covered, Extension::kSPV_EXT_fragment_invocation_density, Extension::kSPV_EXT_fragment_shader_interlock, Extension::kSPV_EXT_mesh_shader, Extension::kSPV_EXT_opacity_micromap, Extension::kSPV_EXT_physical_storage_buffer, Extension::kSPV_EXT_replicated_composites, Extension::kSPV_EXT_shader_atomic_float16_add, Extension::kSPV_EXT_shader_atomic_float_add, Extension::kSPV_EXT_shader_atomic_float_min_max, Extension::kSPV_EXT_shader_image_int64, Extension::kSPV_EXT_shader_stencil_export, Extension::kSPV_EXT_shader_tile_image, Extension::kSPV_EXT_shader_viewport_index_layer, Extension::kSPV_GOOGLE_decorate_string, Extension::kSPV_GOOGLE_hlsl_functionality1, Extension::kSPV_GOOGLE_user_type, Extension::kSPV_INTEL_arbitrary_precision_fixed_point, Extension::kSPV_INTEL_arbitrary_precision_floating_point, Extension::kSPV_INTEL_arbitrary_precision_integers, Extension::kSPV_INTEL_bfloat16_conversion, Extension::kSPV_INTEL_blocking_pipes, Extension::kSPV_INTEL_cache_controls, Extension::kSPV_INTEL_debug_module, Extension::kSPV_INTEL_device_side_avc_motion_estimation, Extension::kSPV_INTEL_float_controls2, Extension::kSPV_INTEL_fp_fast_math_mode, Extension::kSPV_INTEL_fp_max_error, Extension::kSPV_INTEL_fpga_argument_interfaces, Extension::kSPV_INTEL_fpga_buffer_location, Extension::kSPV_INTEL_fpga_cluster_attributes, Extension::kSPV_INTEL_fpga_dsp_control, Extension::kSPV_INTEL_fpga_invocation_pipelining_attributes, Extension::kSPV_INTEL_fpga_latency_control, Extension::kSPV_INTEL_fpga_loop_controls, Extension::kSPV_INTEL_fpga_memory_accesses, Extension::kSPV_INTEL_fpga_memory_attributes, Extension::kSPV_INTEL_fpga_reg, Extension::kSPV_INTEL_function_pointers, Extension::kSPV_INTEL_global_variable_fpga_decorations, Extension::kSPV_INTEL_global_variable_host_access, Extension::kSPV_INTEL_inline_assembly, Extension::kSPV_INTEL_io_pipes, Extension::kSPV_INTEL_kernel_attributes, Extension::kSPV_INTEL_long_composites, Extension::kSPV_INTEL_loop_fuse, Extension::kSPV_INTEL_masked_gather_scatter, Extension::kSPV_INTEL_maximum_registers, Extension::kSPV_INTEL_media_block_io, Extension::kSPV_INTEL_memory_access_aliasing, Extension::kSPV_INTEL_optnone, Extension::kSPV_INTEL_runtime_aligned, Extension::kSPV_INTEL_shader_integer_functions2, Extension::kSPV_INTEL_split_barrier, Extension::kSPV_INTEL_subgroups, Extension::kSPV_INTEL_unstructured_loop_controls, Extension::kSPV_INTEL_usm_storage_classes, Extension::kSPV_INTEL_variable_length_array, Extension::kSPV_INTEL_vector_compute, Extension::kSPV_KHR_16bit_storage, Extension::kSPV_KHR_8bit_storage, Extension::kSPV_KHR_bit_instructions, Extension::kSPV_KHR_cooperative_matrix, Extension::kSPV_KHR_device_group, Extension::kSPV_KHR_expect_assume, Extension::kSPV_KHR_float_controls, Extension::kSPV_KHR_float_controls2, Extension::kSPV_KHR_fragment_shader_barycentric, Extension::kSPV_KHR_fragment_shading_rate, Extension::kSPV_KHR_integer_dot_product, Extension::kSPV_KHR_linkonce_odr, Extension::kSPV_KHR_maximal_reconvergence, Extension::kSPV_KHR_multiview, Extension::kSPV_KHR_no_integer_wrap_decoration, Extension::kSPV_KHR_non_semantic_info, Extension::kSPV_KHR_physical_storage_buffer, Extension::kSPV_KHR_post_depth_coverage, Extension::kSPV_KHR_quad_control, Extension::kSPV_KHR_ray_cull_mask, Extension::kSPV_KHR_ray_query, Extension::kSPV_KHR_ray_tracing, Extension::kSPV_KHR_ray_tracing_position_fetch, Extension::kSPV_KHR_relaxed_extended_instruction, Extension::kSPV_KHR_shader_atomic_counter_ops, Extension::kSPV_KHR_shader_ballot, Extension::kSPV_KHR_shader_clock, Extension::kSPV_KHR_shader_draw_parameters, Extension::kSPV_KHR_storage_buffer_storage_class, Extension::kSPV_KHR_subgroup_rotate, Extension::kSPV_KHR_subgroup_uniform_control_flow, Extension::kSPV_KHR_subgroup_vote, Extension::kSPV_KHR_terminate_invocation, Extension::kSPV_KHR_uniform_group_instructions, Extension::kSPV_KHR_variable_pointers, Extension::kSPV_KHR_vulkan_memory_model, Extension::kSPV_KHR_workgroup_memory_explicit_layout, Extension::kSPV_NVX_multiview_per_view_attributes, Extension::kSPV_NV_bindless_texture, Extension::kSPV_NV_compute_shader_derivatives, Extension::kSPV_NV_cooperative_matrix, Extension::kSPV_NV_displacement_micromap, Extension::kSPV_NV_fragment_shader_barycentric, Extension::kSPV_NV_geometry_shader_passthrough, Extension::kSPV_NV_mesh_shader, Extension::kSPV_NV_raw_access_chains, Extension::kSPV_NV_ray_tracing, Extension::kSPV_NV_ray_tracing_motion_blur, Extension::kSPV_NV_sample_mask_override_coverage, Extension::kSPV_NV_shader_atomic_fp16_vector, Extension::kSPV_NV_shader_image_footprint, Extension::kSPV_NV_shader_invocation_reorder, Extension::kSPV_NV_shader_sm_builtins, Extension::kSPV_NV_shader_subgroup_partitioned, Extension::kSPV_NV_shading_rate, Extension::kSPV_NV_stereo_view_rendering, Extension::kSPV_NV_viewport_array2, Extension::kSPV_QCOM_image_processing, Extension::kSPV_QCOM_image_processing2, Extension::kSPV_VALIDATOR_ignore_type_decl_unique }; const auto b = std::begin(known_ext_strs); const auto e = std::end(known_ext_strs); const auto found = std::equal_range( @@ -218,398 +292,482 @@ const char* ExtensionToString(Extension extension) { } -const char* CapabilityToString(SpvCapability capability) { +const char* CapabilityToString(spv::Capability capability) { switch (capability) { - case SpvCapabilityMatrix: + case spv::Capability::Matrix: return "Matrix"; - case SpvCapabilityShader: + case spv::Capability::Shader: return "Shader"; - case SpvCapabilityGeometry: + case spv::Capability::Geometry: return "Geometry"; - case SpvCapabilityTessellation: + case spv::Capability::Tessellation: return "Tessellation"; - case SpvCapabilityAddresses: + case spv::Capability::Addresses: return "Addresses"; - case SpvCapabilityLinkage: + case spv::Capability::Linkage: return "Linkage"; - case SpvCapabilityKernel: + case spv::Capability::Kernel: return "Kernel"; - case SpvCapabilityVector16: + case spv::Capability::Vector16: return "Vector16"; - case SpvCapabilityFloat16Buffer: + case spv::Capability::Float16Buffer: return "Float16Buffer"; - case SpvCapabilityFloat16: + case spv::Capability::Float16: return "Float16"; - case SpvCapabilityFloat64: + case spv::Capability::Float64: return "Float64"; - case SpvCapabilityInt64: + case spv::Capability::Int64: return "Int64"; - case SpvCapabilityInt64Atomics: + case spv::Capability::Int64Atomics: return "Int64Atomics"; - case SpvCapabilityImageBasic: + case spv::Capability::ImageBasic: return "ImageBasic"; - case SpvCapabilityImageReadWrite: + case spv::Capability::ImageReadWrite: return "ImageReadWrite"; - case SpvCapabilityImageMipmap: + case spv::Capability::ImageMipmap: return "ImageMipmap"; - case SpvCapabilityPipes: + case spv::Capability::Pipes: return "Pipes"; - case SpvCapabilityGroups: + case spv::Capability::Groups: return "Groups"; - case SpvCapabilityDeviceEnqueue: + case spv::Capability::DeviceEnqueue: return "DeviceEnqueue"; - case SpvCapabilityLiteralSampler: + case spv::Capability::LiteralSampler: return "LiteralSampler"; - case SpvCapabilityAtomicStorage: + case spv::Capability::AtomicStorage: return "AtomicStorage"; - case SpvCapabilityInt16: + case spv::Capability::Int16: return "Int16"; - case SpvCapabilityTessellationPointSize: + case spv::Capability::TessellationPointSize: return "TessellationPointSize"; - case SpvCapabilityGeometryPointSize: + case spv::Capability::GeometryPointSize: return "GeometryPointSize"; - case SpvCapabilityImageGatherExtended: + case spv::Capability::ImageGatherExtended: return "ImageGatherExtended"; - case SpvCapabilityStorageImageMultisample: + case spv::Capability::StorageImageMultisample: return "StorageImageMultisample"; - case SpvCapabilityUniformBufferArrayDynamicIndexing: + case spv::Capability::UniformBufferArrayDynamicIndexing: return "UniformBufferArrayDynamicIndexing"; - case SpvCapabilitySampledImageArrayDynamicIndexing: + case spv::Capability::SampledImageArrayDynamicIndexing: return "SampledImageArrayDynamicIndexing"; - case SpvCapabilityStorageBufferArrayDynamicIndexing: + case spv::Capability::StorageBufferArrayDynamicIndexing: return "StorageBufferArrayDynamicIndexing"; - case SpvCapabilityStorageImageArrayDynamicIndexing: + case spv::Capability::StorageImageArrayDynamicIndexing: return "StorageImageArrayDynamicIndexing"; - case SpvCapabilityClipDistance: + case spv::Capability::ClipDistance: return "ClipDistance"; - case SpvCapabilityCullDistance: + case spv::Capability::CullDistance: return "CullDistance"; - case SpvCapabilityImageCubeArray: + case spv::Capability::ImageCubeArray: return "ImageCubeArray"; - case SpvCapabilitySampleRateShading: + case spv::Capability::SampleRateShading: return "SampleRateShading"; - case SpvCapabilityImageRect: + case spv::Capability::ImageRect: return "ImageRect"; - case SpvCapabilitySampledRect: + case spv::Capability::SampledRect: return "SampledRect"; - case SpvCapabilityGenericPointer: + case spv::Capability::GenericPointer: return "GenericPointer"; - case SpvCapabilityInt8: + case spv::Capability::Int8: return "Int8"; - case SpvCapabilityInputAttachment: + case spv::Capability::InputAttachment: return "InputAttachment"; - case SpvCapabilitySparseResidency: + case spv::Capability::SparseResidency: return "SparseResidency"; - case SpvCapabilityMinLod: + case spv::Capability::MinLod: return "MinLod"; - case SpvCapabilitySampled1D: + case spv::Capability::Sampled1D: return "Sampled1D"; - case SpvCapabilityImage1D: + case spv::Capability::Image1D: return "Image1D"; - case SpvCapabilitySampledCubeArray: + case spv::Capability::SampledCubeArray: return "SampledCubeArray"; - case SpvCapabilitySampledBuffer: + case spv::Capability::SampledBuffer: return "SampledBuffer"; - case SpvCapabilityImageBuffer: + case spv::Capability::ImageBuffer: return "ImageBuffer"; - case SpvCapabilityImageMSArray: + case spv::Capability::ImageMSArray: return "ImageMSArray"; - case SpvCapabilityStorageImageExtendedFormats: + case spv::Capability::StorageImageExtendedFormats: return "StorageImageExtendedFormats"; - case SpvCapabilityImageQuery: + case spv::Capability::ImageQuery: return "ImageQuery"; - case SpvCapabilityDerivativeControl: + case spv::Capability::DerivativeControl: return "DerivativeControl"; - case SpvCapabilityInterpolationFunction: + case spv::Capability::InterpolationFunction: return "InterpolationFunction"; - case SpvCapabilityTransformFeedback: + case spv::Capability::TransformFeedback: return "TransformFeedback"; - case SpvCapabilityGeometryStreams: + case spv::Capability::GeometryStreams: return "GeometryStreams"; - case SpvCapabilityStorageImageReadWithoutFormat: + case spv::Capability::StorageImageReadWithoutFormat: return "StorageImageReadWithoutFormat"; - case SpvCapabilityStorageImageWriteWithoutFormat: + case spv::Capability::StorageImageWriteWithoutFormat: return "StorageImageWriteWithoutFormat"; - case SpvCapabilityMultiViewport: + case spv::Capability::MultiViewport: return "MultiViewport"; - case SpvCapabilitySubgroupDispatch: + case spv::Capability::SubgroupDispatch: return "SubgroupDispatch"; - case SpvCapabilityNamedBarrier: + case spv::Capability::NamedBarrier: return "NamedBarrier"; - case SpvCapabilityPipeStorage: + case spv::Capability::PipeStorage: return "PipeStorage"; - case SpvCapabilityGroupNonUniform: + case spv::Capability::GroupNonUniform: return "GroupNonUniform"; - case SpvCapabilityGroupNonUniformVote: + case spv::Capability::GroupNonUniformVote: return "GroupNonUniformVote"; - case SpvCapabilityGroupNonUniformArithmetic: + case spv::Capability::GroupNonUniformArithmetic: return "GroupNonUniformArithmetic"; - case SpvCapabilityGroupNonUniformBallot: + case spv::Capability::GroupNonUniformBallot: return "GroupNonUniformBallot"; - case SpvCapabilityGroupNonUniformShuffle: + case spv::Capability::GroupNonUniformShuffle: return "GroupNonUniformShuffle"; - case SpvCapabilityGroupNonUniformShuffleRelative: + case spv::Capability::GroupNonUniformShuffleRelative: return "GroupNonUniformShuffleRelative"; - case SpvCapabilityGroupNonUniformClustered: + case spv::Capability::GroupNonUniformClustered: return "GroupNonUniformClustered"; - case SpvCapabilityGroupNonUniformQuad: + case spv::Capability::GroupNonUniformQuad: return "GroupNonUniformQuad"; - case SpvCapabilityShaderLayer: + case spv::Capability::ShaderLayer: return "ShaderLayer"; - case SpvCapabilityShaderViewportIndex: + case spv::Capability::ShaderViewportIndex: return "ShaderViewportIndex"; - case SpvCapabilityUniformDecoration: + case spv::Capability::UniformDecoration: return "UniformDecoration"; - case SpvCapabilityFragmentShadingRateKHR: + case spv::Capability::CoreBuiltinsARM: + return "CoreBuiltinsARM"; + case spv::Capability::TileImageColorReadAccessEXT: + return "TileImageColorReadAccessEXT"; + case spv::Capability::TileImageDepthReadAccessEXT: + return "TileImageDepthReadAccessEXT"; + case spv::Capability::TileImageStencilReadAccessEXT: + return "TileImageStencilReadAccessEXT"; + case spv::Capability::CooperativeMatrixLayoutsARM: + return "CooperativeMatrixLayoutsARM"; + case spv::Capability::FragmentShadingRateKHR: return "FragmentShadingRateKHR"; - case SpvCapabilitySubgroupBallotKHR: + case spv::Capability::SubgroupBallotKHR: return "SubgroupBallotKHR"; - case SpvCapabilityDrawParameters: + case spv::Capability::DrawParameters: return "DrawParameters"; - case SpvCapabilityWorkgroupMemoryExplicitLayoutKHR: + case spv::Capability::WorkgroupMemoryExplicitLayoutKHR: return "WorkgroupMemoryExplicitLayoutKHR"; - case SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: + case spv::Capability::WorkgroupMemoryExplicitLayout8BitAccessKHR: return "WorkgroupMemoryExplicitLayout8BitAccessKHR"; - case SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: + case spv::Capability::WorkgroupMemoryExplicitLayout16BitAccessKHR: return "WorkgroupMemoryExplicitLayout16BitAccessKHR"; - case SpvCapabilitySubgroupVoteKHR: + case spv::Capability::SubgroupVoteKHR: return "SubgroupVoteKHR"; - case SpvCapabilityStorageBuffer16BitAccess: + case spv::Capability::StorageBuffer16BitAccess: return "StorageBuffer16BitAccess"; - case SpvCapabilityUniformAndStorageBuffer16BitAccess: + case spv::Capability::UniformAndStorageBuffer16BitAccess: return "UniformAndStorageBuffer16BitAccess"; - case SpvCapabilityStoragePushConstant16: + case spv::Capability::StoragePushConstant16: return "StoragePushConstant16"; - case SpvCapabilityStorageInputOutput16: + case spv::Capability::StorageInputOutput16: return "StorageInputOutput16"; - case SpvCapabilityDeviceGroup: + case spv::Capability::DeviceGroup: return "DeviceGroup"; - case SpvCapabilityMultiView: + case spv::Capability::MultiView: return "MultiView"; - case SpvCapabilityVariablePointersStorageBuffer: + case spv::Capability::VariablePointersStorageBuffer: return "VariablePointersStorageBuffer"; - case SpvCapabilityVariablePointers: + case spv::Capability::VariablePointers: return "VariablePointers"; - case SpvCapabilityAtomicStorageOps: + case spv::Capability::AtomicStorageOps: return "AtomicStorageOps"; - case SpvCapabilitySampleMaskPostDepthCoverage: + case spv::Capability::SampleMaskPostDepthCoverage: return "SampleMaskPostDepthCoverage"; - case SpvCapabilityStorageBuffer8BitAccess: + case spv::Capability::StorageBuffer8BitAccess: return "StorageBuffer8BitAccess"; - case SpvCapabilityUniformAndStorageBuffer8BitAccess: + case spv::Capability::UniformAndStorageBuffer8BitAccess: return "UniformAndStorageBuffer8BitAccess"; - case SpvCapabilityStoragePushConstant8: + case spv::Capability::StoragePushConstant8: return "StoragePushConstant8"; - case SpvCapabilityDenormPreserve: + case spv::Capability::DenormPreserve: return "DenormPreserve"; - case SpvCapabilityDenormFlushToZero: + case spv::Capability::DenormFlushToZero: return "DenormFlushToZero"; - case SpvCapabilitySignedZeroInfNanPreserve: + case spv::Capability::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; - case SpvCapabilityRoundingModeRTE: + case spv::Capability::RoundingModeRTE: return "RoundingModeRTE"; - case SpvCapabilityRoundingModeRTZ: + case spv::Capability::RoundingModeRTZ: return "RoundingModeRTZ"; - case SpvCapabilityRayQueryProvisionalKHR: + case spv::Capability::RayQueryProvisionalKHR: return "RayQueryProvisionalKHR"; - case SpvCapabilityRayQueryKHR: + case spv::Capability::RayQueryKHR: return "RayQueryKHR"; - case SpvCapabilityRayTraversalPrimitiveCullingKHR: + case spv::Capability::RayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; - case SpvCapabilityRayTracingKHR: + case spv::Capability::RayTracingKHR: return "RayTracingKHR"; - case SpvCapabilityFloat16ImageAMD: + case spv::Capability::TextureSampleWeightedQCOM: + return "TextureSampleWeightedQCOM"; + case spv::Capability::TextureBoxFilterQCOM: + return "TextureBoxFilterQCOM"; + case spv::Capability::TextureBlockMatchQCOM: + return "TextureBlockMatchQCOM"; + case spv::Capability::TextureBlockMatch2QCOM: + return "TextureBlockMatch2QCOM"; + case spv::Capability::Float16ImageAMD: return "Float16ImageAMD"; - case SpvCapabilityImageGatherBiasLodAMD: + case spv::Capability::ImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; - case SpvCapabilityFragmentMaskAMD: + case spv::Capability::FragmentMaskAMD: return "FragmentMaskAMD"; - case SpvCapabilityStencilExportEXT: + case spv::Capability::StencilExportEXT: return "StencilExportEXT"; - case SpvCapabilityImageReadWriteLodAMD: + case spv::Capability::ImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; - case SpvCapabilityInt64ImageEXT: + case spv::Capability::Int64ImageEXT: return "Int64ImageEXT"; - case SpvCapabilityShaderClockKHR: + case spv::Capability::ShaderClockKHR: return "ShaderClockKHR"; - case SpvCapabilitySampleMaskOverrideCoverageNV: + case spv::Capability::ShaderEnqueueAMDX: + return "ShaderEnqueueAMDX"; + case spv::Capability::QuadControlKHR: + return "QuadControlKHR"; + case spv::Capability::SampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; - case SpvCapabilityGeometryShaderPassthroughNV: + case spv::Capability::GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; - case SpvCapabilityShaderViewportIndexLayerEXT: + case spv::Capability::ShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; - case SpvCapabilityShaderViewportMaskNV: + case spv::Capability::ShaderViewportMaskNV: return "ShaderViewportMaskNV"; - case SpvCapabilityShaderStereoViewNV: + case spv::Capability::ShaderStereoViewNV: return "ShaderStereoViewNV"; - case SpvCapabilityPerViewAttributesNV: + case spv::Capability::PerViewAttributesNV: return "PerViewAttributesNV"; - case SpvCapabilityFragmentFullyCoveredEXT: + case spv::Capability::FragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; - case SpvCapabilityMeshShadingNV: + case spv::Capability::MeshShadingNV: return "MeshShadingNV"; - case SpvCapabilityImageFootprintNV: + case spv::Capability::ImageFootprintNV: return "ImageFootprintNV"; - case SpvCapabilityFragmentBarycentricKHR: + case spv::Capability::MeshShadingEXT: + return "MeshShadingEXT"; + case spv::Capability::FragmentBarycentricKHR: return "FragmentBarycentricKHR"; - case SpvCapabilityComputeDerivativeGroupQuadsNV: + case spv::Capability::ComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; - case SpvCapabilityFragmentDensityEXT: + case spv::Capability::FragmentDensityEXT: return "FragmentDensityEXT"; - case SpvCapabilityGroupNonUniformPartitionedNV: + case spv::Capability::GroupNonUniformPartitionedNV: return "GroupNonUniformPartitionedNV"; - case SpvCapabilityShaderNonUniform: + case spv::Capability::ShaderNonUniform: return "ShaderNonUniform"; - case SpvCapabilityRuntimeDescriptorArray: + case spv::Capability::RuntimeDescriptorArray: return "RuntimeDescriptorArray"; - case SpvCapabilityInputAttachmentArrayDynamicIndexing: + case spv::Capability::InputAttachmentArrayDynamicIndexing: return "InputAttachmentArrayDynamicIndexing"; - case SpvCapabilityUniformTexelBufferArrayDynamicIndexing: + case spv::Capability::UniformTexelBufferArrayDynamicIndexing: return "UniformTexelBufferArrayDynamicIndexing"; - case SpvCapabilityStorageTexelBufferArrayDynamicIndexing: + case spv::Capability::StorageTexelBufferArrayDynamicIndexing: return "StorageTexelBufferArrayDynamicIndexing"; - case SpvCapabilityUniformBufferArrayNonUniformIndexing: + case spv::Capability::UniformBufferArrayNonUniformIndexing: return "UniformBufferArrayNonUniformIndexing"; - case SpvCapabilitySampledImageArrayNonUniformIndexing: + case spv::Capability::SampledImageArrayNonUniformIndexing: return "SampledImageArrayNonUniformIndexing"; - case SpvCapabilityStorageBufferArrayNonUniformIndexing: + case spv::Capability::StorageBufferArrayNonUniformIndexing: return "StorageBufferArrayNonUniformIndexing"; - case SpvCapabilityStorageImageArrayNonUniformIndexing: + case spv::Capability::StorageImageArrayNonUniformIndexing: return "StorageImageArrayNonUniformIndexing"; - case SpvCapabilityInputAttachmentArrayNonUniformIndexing: + case spv::Capability::InputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; - case SpvCapabilityUniformTexelBufferArrayNonUniformIndexing: + case spv::Capability::UniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; - case SpvCapabilityStorageTexelBufferArrayNonUniformIndexing: + case spv::Capability::StorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; - case SpvCapabilityRayTracingNV: + case spv::Capability::RayTracingPositionFetchKHR: + return "RayTracingPositionFetchKHR"; + case spv::Capability::RayTracingNV: return "RayTracingNV"; - case SpvCapabilityRayTracingMotionBlurNV: + case spv::Capability::RayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; - case SpvCapabilityVulkanMemoryModel: + case spv::Capability::VulkanMemoryModel: return "VulkanMemoryModel"; - case SpvCapabilityVulkanMemoryModelDeviceScope: + case spv::Capability::VulkanMemoryModelDeviceScope: return "VulkanMemoryModelDeviceScope"; - case SpvCapabilityPhysicalStorageBufferAddresses: + case spv::Capability::PhysicalStorageBufferAddresses: return "PhysicalStorageBufferAddresses"; - case SpvCapabilityComputeDerivativeGroupLinearNV: + case spv::Capability::ComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; - case SpvCapabilityRayTracingProvisionalKHR: + case spv::Capability::RayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; - case SpvCapabilityCooperativeMatrixNV: + case spv::Capability::CooperativeMatrixNV: return "CooperativeMatrixNV"; - case SpvCapabilityFragmentShaderSampleInterlockEXT: + case spv::Capability::FragmentShaderSampleInterlockEXT: return "FragmentShaderSampleInterlockEXT"; - case SpvCapabilityFragmentShaderShadingRateInterlockEXT: + case spv::Capability::FragmentShaderShadingRateInterlockEXT: return "FragmentShaderShadingRateInterlockEXT"; - case SpvCapabilityShaderSMBuiltinsNV: + case spv::Capability::ShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; - case SpvCapabilityFragmentShaderPixelInterlockEXT: + case spv::Capability::FragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; - case SpvCapabilityDemoteToHelperInvocation: + case spv::Capability::DemoteToHelperInvocation: return "DemoteToHelperInvocation"; - case SpvCapabilityBindlessTextureNV: + case spv::Capability::DisplacementMicromapNV: + return "DisplacementMicromapNV"; + case spv::Capability::RayTracingOpacityMicromapEXT: + return "RayTracingOpacityMicromapEXT"; + case spv::Capability::ShaderInvocationReorderNV: + return "ShaderInvocationReorderNV"; + case spv::Capability::BindlessTextureNV: return "BindlessTextureNV"; - case SpvCapabilitySubgroupShuffleINTEL: + case spv::Capability::RayQueryPositionFetchKHR: + return "RayQueryPositionFetchKHR"; + case spv::Capability::AtomicFloat16VectorNV: + return "AtomicFloat16VectorNV"; + case spv::Capability::RayTracingDisplacementMicromapNV: + return "RayTracingDisplacementMicromapNV"; + case spv::Capability::RawAccessChainsNV: + return "RawAccessChainsNV"; + case spv::Capability::SubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; - case SpvCapabilitySubgroupBufferBlockIOINTEL: + case spv::Capability::SubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; - case SpvCapabilitySubgroupImageBlockIOINTEL: + case spv::Capability::SubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; - case SpvCapabilitySubgroupImageMediaBlockIOINTEL: + case spv::Capability::SubgroupImageMediaBlockIOINTEL: return "SubgroupImageMediaBlockIOINTEL"; - case SpvCapabilityRoundToInfinityINTEL: + case spv::Capability::RoundToInfinityINTEL: return "RoundToInfinityINTEL"; - case SpvCapabilityFloatingPointModeINTEL: + case spv::Capability::FloatingPointModeINTEL: return "FloatingPointModeINTEL"; - case SpvCapabilityIntegerFunctions2INTEL: + case spv::Capability::IntegerFunctions2INTEL: return "IntegerFunctions2INTEL"; - case SpvCapabilityFunctionPointersINTEL: + case spv::Capability::FunctionPointersINTEL: return "FunctionPointersINTEL"; - case SpvCapabilityIndirectReferencesINTEL: + case spv::Capability::IndirectReferencesINTEL: return "IndirectReferencesINTEL"; - case SpvCapabilityAsmINTEL: + case spv::Capability::AsmINTEL: return "AsmINTEL"; - case SpvCapabilityAtomicFloat32MinMaxEXT: + case spv::Capability::AtomicFloat32MinMaxEXT: return "AtomicFloat32MinMaxEXT"; - case SpvCapabilityAtomicFloat64MinMaxEXT: + case spv::Capability::AtomicFloat64MinMaxEXT: return "AtomicFloat64MinMaxEXT"; - case SpvCapabilityAtomicFloat16MinMaxEXT: + case spv::Capability::AtomicFloat16MinMaxEXT: return "AtomicFloat16MinMaxEXT"; - case SpvCapabilityVectorComputeINTEL: + case spv::Capability::VectorComputeINTEL: return "VectorComputeINTEL"; - case SpvCapabilityVectorAnyINTEL: + case spv::Capability::VectorAnyINTEL: return "VectorAnyINTEL"; - case SpvCapabilityExpectAssumeKHR: + case spv::Capability::ExpectAssumeKHR: return "ExpectAssumeKHR"; - case SpvCapabilitySubgroupAvcMotionEstimationINTEL: + case spv::Capability::SubgroupAvcMotionEstimationINTEL: return "SubgroupAvcMotionEstimationINTEL"; - case SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL: + case spv::Capability::SubgroupAvcMotionEstimationIntraINTEL: return "SubgroupAvcMotionEstimationIntraINTEL"; - case SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL: + case spv::Capability::SubgroupAvcMotionEstimationChromaINTEL: return "SubgroupAvcMotionEstimationChromaINTEL"; - case SpvCapabilityVariableLengthArrayINTEL: + case spv::Capability::VariableLengthArrayINTEL: return "VariableLengthArrayINTEL"; - case SpvCapabilityFunctionFloatControlINTEL: + case spv::Capability::FunctionFloatControlINTEL: return "FunctionFloatControlINTEL"; - case SpvCapabilityFPGAMemoryAttributesINTEL: + case spv::Capability::FPGAMemoryAttributesINTEL: return "FPGAMemoryAttributesINTEL"; - case SpvCapabilityFPFastMathModeINTEL: + case spv::Capability::FPFastMathModeINTEL: return "FPFastMathModeINTEL"; - case SpvCapabilityArbitraryPrecisionIntegersINTEL: + case spv::Capability::ArbitraryPrecisionIntegersINTEL: return "ArbitraryPrecisionIntegersINTEL"; - case SpvCapabilityArbitraryPrecisionFloatingPointINTEL: + case spv::Capability::ArbitraryPrecisionFloatingPointINTEL: return "ArbitraryPrecisionFloatingPointINTEL"; - case SpvCapabilityUnstructuredLoopControlsINTEL: + case spv::Capability::UnstructuredLoopControlsINTEL: return "UnstructuredLoopControlsINTEL"; - case SpvCapabilityFPGALoopControlsINTEL: + case spv::Capability::FPGALoopControlsINTEL: return "FPGALoopControlsINTEL"; - case SpvCapabilityKernelAttributesINTEL: + case spv::Capability::KernelAttributesINTEL: return "KernelAttributesINTEL"; - case SpvCapabilityFPGAKernelAttributesINTEL: + case spv::Capability::FPGAKernelAttributesINTEL: return "FPGAKernelAttributesINTEL"; - case SpvCapabilityFPGAMemoryAccessesINTEL: + case spv::Capability::FPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; - case SpvCapabilityFPGAClusterAttributesINTEL: + case spv::Capability::FPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; - case SpvCapabilityLoopFuseINTEL: + case spv::Capability::LoopFuseINTEL: return "LoopFuseINTEL"; - case SpvCapabilityFPGABufferLocationINTEL: + case spv::Capability::FPGADSPControlINTEL: + return "FPGADSPControlINTEL"; + case spv::Capability::MemoryAccessAliasingINTEL: + return "MemoryAccessAliasingINTEL"; + case spv::Capability::FPGAInvocationPipeliningAttributesINTEL: + return "FPGAInvocationPipeliningAttributesINTEL"; + case spv::Capability::FPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; - case SpvCapabilityArbitraryPrecisionFixedPointINTEL: + case spv::Capability::ArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; - case SpvCapabilityUSMStorageClassesINTEL: + case spv::Capability::USMStorageClassesINTEL: return "USMStorageClassesINTEL"; - case SpvCapabilityIOPipesINTEL: + case spv::Capability::RuntimeAlignedAttributeINTEL: + return "RuntimeAlignedAttributeINTEL"; + case spv::Capability::IOPipesINTEL: return "IOPipesINTEL"; - case SpvCapabilityBlockingPipesINTEL: + case spv::Capability::BlockingPipesINTEL: return "BlockingPipesINTEL"; - case SpvCapabilityFPGARegINTEL: + case spv::Capability::FPGARegINTEL: return "FPGARegINTEL"; - case SpvCapabilityDotProductInputAll: + case spv::Capability::DotProductInputAll: return "DotProductInputAll"; - case SpvCapabilityDotProductInput4x8Bit: + case spv::Capability::DotProductInput4x8Bit: return "DotProductInput4x8Bit"; - case SpvCapabilityDotProductInput4x8BitPacked: + case spv::Capability::DotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; - case SpvCapabilityDotProduct: + case spv::Capability::DotProduct: return "DotProduct"; - case SpvCapabilityBitInstructions: + case spv::Capability::RayCullMaskKHR: + return "RayCullMaskKHR"; + case spv::Capability::CooperativeMatrixKHR: + return "CooperativeMatrixKHR"; + case spv::Capability::ReplicatedCompositesEXT: + return "ReplicatedCompositesEXT"; + case spv::Capability::BitInstructions: return "BitInstructions"; - case SpvCapabilityAtomicFloat32AddEXT: + case spv::Capability::GroupNonUniformRotateKHR: + return "GroupNonUniformRotateKHR"; + case spv::Capability::FloatControls2: + return "FloatControls2"; + case spv::Capability::AtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; - case SpvCapabilityAtomicFloat64AddEXT: + case spv::Capability::AtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; - case SpvCapabilityLongConstantCompositeINTEL: - return "LongConstantCompositeINTEL"; - case SpvCapabilityOptNoneINTEL: + case spv::Capability::LongCompositesINTEL: + return "LongCompositesINTEL"; + case spv::Capability::OptNoneINTEL: return "OptNoneINTEL"; - case SpvCapabilityAtomicFloat16AddEXT: + case spv::Capability::AtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; - case SpvCapabilityDebugInfoModuleINTEL: + case spv::Capability::DebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; - case SpvCapabilityMax: - assert(0 && "Attempting to convert SpvCapabilityMax to string"); + case spv::Capability::BFloat16ConversionINTEL: + return "BFloat16ConversionINTEL"; + case spv::Capability::SplitBarrierINTEL: + return "SplitBarrierINTEL"; + case spv::Capability::FPGAClusterAttributesV2INTEL: + return "FPGAClusterAttributesV2INTEL"; + case spv::Capability::FPGAKernelAttributesv2INTEL: + return "FPGAKernelAttributesv2INTEL"; + case spv::Capability::FPMaxErrorINTEL: + return "FPMaxErrorINTEL"; + case spv::Capability::FPGALatencyControlINTEL: + return "FPGALatencyControlINTEL"; + case spv::Capability::FPGAArgumentInterfacesINTEL: + return "FPGAArgumentInterfacesINTEL"; + case spv::Capability::GlobalVariableHostAccessINTEL: + return "GlobalVariableHostAccessINTEL"; + case spv::Capability::GlobalVariableFPGADecorationsINTEL: + return "GlobalVariableFPGADecorationsINTEL"; + case spv::Capability::GroupUniformArithmeticKHR: + return "GroupUniformArithmeticKHR"; + case spv::Capability::MaskedGatherScatterINTEL: + return "MaskedGatherScatterINTEL"; + case spv::Capability::CacheControlsINTEL: + return "CacheControlsINTEL"; + case spv::Capability::RegisterLimitsINTEL: + return "RegisterLimitsINTEL"; + case spv::Capability::Max: + assert(0 && "Attempting to convert spv::Capability::Max to string"); return ""; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.cpp index 4e2795453..9a5ba84e4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.cpp @@ -30,6 +30,7 @@ #include "glsl.std.450.insts.inc" #include "nonsemantic.clspvreflection.insts.inc" #include "nonsemantic.shader.debuginfo.100.insts.inc" +#include "nonsemantic.vkspreflection.insts.inc" #include "opencl.debuginfo.100.insts.inc" #include "opencl.std.insts.inc" @@ -62,6 +63,9 @@ static const spv_ext_inst_group_t kGroups_1_0[] = { {SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION, ARRAY_SIZE(nonsemantic_clspvreflection_entries), nonsemantic_clspvreflection_entries}, + {SPV_EXT_INST_TYPE_NONSEMANTIC_VKSPREFLECTION, + ARRAY_SIZE(nonsemantic_vkspreflection_entries), + nonsemantic_vkspreflection_entries}, }; static const spv_ext_inst_table_t kTable_1_0 = {ARRAY_SIZE(kGroups_1_0), @@ -138,6 +142,9 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) { if (!strncmp("NonSemantic.ClspvReflection.", name, 28)) { return SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION; } + if (!strncmp("NonSemantic.VkspReflection.", name, 27)) { + return SPV_EXT_INST_TYPE_NONSEMANTIC_VKSPREFLECTION; + } // ensure to add any known non-semantic extended instruction sets // above this point, and update spvExtInstIsNonSemantic() if (!strncmp("NonSemantic.", name, 12)) { @@ -149,7 +156,8 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) { bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type) { if (type == SPV_EXT_INST_TYPE_NONSEMANTIC_UNKNOWN || type == SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100 || - type == SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION) { + type == SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION || + type == SPV_EXT_INST_TYPE_NONSEMANTIC_VKSPREFLECTION) { return true; } return false; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.h index aff6e308c..4027f4c3c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/ext_inst.h @@ -27,7 +27,7 @@ bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type); // Returns true if the extended instruction set is debug info bool spvExtInstIsDebugInfo(const spv_ext_inst_type_t type); -// Finds the named extented instruction of the given type in the given extended +// Finds the named extended instruction of the given type in the given extended // instruction table. On success, returns SPV_SUCCESS and writes a handle of // the instruction entry into *entry. spv_result_t spvExtInstTableNameLookup(const spv_ext_inst_table table, @@ -35,7 +35,7 @@ spv_result_t spvExtInstTableNameLookup(const spv_ext_inst_table table, const char* name, spv_ext_inst_desc* entry); -// Finds the extented instruction of the given type in the given extended +// Finds the extended instruction of the given type in the given extended // instruction table by value. On success, returns SPV_SUCCESS and writes a // handle of the instruction entry into *entry. spv_result_t spvExtInstTableValueLookup(const spv_ext_inst_table table, diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extension_enum.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extension_enum.inc index 319fd088d..ac42c58ee 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extension_enum.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extension_enum.inc @@ -1,24 +1,32 @@ +kSPV_AMDX_shader_enqueue, kSPV_AMD_gcn_shader, kSPV_AMD_gpu_shader_half_float, kSPV_AMD_gpu_shader_half_float_fetch, kSPV_AMD_gpu_shader_int16, kSPV_AMD_shader_ballot, +kSPV_AMD_shader_early_and_late_fragment_tests, kSPV_AMD_shader_explicit_vertex_parameter, kSPV_AMD_shader_fragment_mask, kSPV_AMD_shader_image_load_store_lod, kSPV_AMD_shader_trinary_minmax, kSPV_AMD_texture_gather_bias_lod, +kSPV_ARM_cooperative_matrix_layouts, +kSPV_ARM_core_builtins, kSPV_EXT_demote_to_helper_invocation, kSPV_EXT_descriptor_indexing, kSPV_EXT_fragment_fully_covered, kSPV_EXT_fragment_invocation_density, kSPV_EXT_fragment_shader_interlock, +kSPV_EXT_mesh_shader, +kSPV_EXT_opacity_micromap, kSPV_EXT_physical_storage_buffer, +kSPV_EXT_replicated_composites, kSPV_EXT_shader_atomic_float16_add, kSPV_EXT_shader_atomic_float_add, kSPV_EXT_shader_atomic_float_min_max, kSPV_EXT_shader_image_int64, kSPV_EXT_shader_stencil_export, +kSPV_EXT_shader_tile_image, kSPV_EXT_shader_viewport_index_layer, kSPV_GOOGLE_decorate_string, kSPV_GOOGLE_hlsl_functionality1, @@ -26,26 +34,40 @@ kSPV_GOOGLE_user_type, kSPV_INTEL_arbitrary_precision_fixed_point, kSPV_INTEL_arbitrary_precision_floating_point, kSPV_INTEL_arbitrary_precision_integers, +kSPV_INTEL_bfloat16_conversion, kSPV_INTEL_blocking_pipes, +kSPV_INTEL_cache_controls, kSPV_INTEL_debug_module, kSPV_INTEL_device_side_avc_motion_estimation, kSPV_INTEL_float_controls2, kSPV_INTEL_fp_fast_math_mode, +kSPV_INTEL_fp_max_error, +kSPV_INTEL_fpga_argument_interfaces, kSPV_INTEL_fpga_buffer_location, kSPV_INTEL_fpga_cluster_attributes, +kSPV_INTEL_fpga_dsp_control, +kSPV_INTEL_fpga_invocation_pipelining_attributes, +kSPV_INTEL_fpga_latency_control, kSPV_INTEL_fpga_loop_controls, kSPV_INTEL_fpga_memory_accesses, kSPV_INTEL_fpga_memory_attributes, kSPV_INTEL_fpga_reg, kSPV_INTEL_function_pointers, +kSPV_INTEL_global_variable_fpga_decorations, +kSPV_INTEL_global_variable_host_access, kSPV_INTEL_inline_assembly, kSPV_INTEL_io_pipes, kSPV_INTEL_kernel_attributes, -kSPV_INTEL_long_constant_composite, +kSPV_INTEL_long_composites, kSPV_INTEL_loop_fuse, +kSPV_INTEL_masked_gather_scatter, +kSPV_INTEL_maximum_registers, kSPV_INTEL_media_block_io, +kSPV_INTEL_memory_access_aliasing, kSPV_INTEL_optnone, +kSPV_INTEL_runtime_aligned, kSPV_INTEL_shader_integer_functions2, +kSPV_INTEL_split_barrier, kSPV_INTEL_subgroups, kSPV_INTEL_unstructured_loop_controls, kSPV_INTEL_usm_storage_classes, @@ -54,28 +76,37 @@ kSPV_INTEL_vector_compute, kSPV_KHR_16bit_storage, kSPV_KHR_8bit_storage, kSPV_KHR_bit_instructions, +kSPV_KHR_cooperative_matrix, kSPV_KHR_device_group, kSPV_KHR_expect_assume, kSPV_KHR_float_controls, +kSPV_KHR_float_controls2, kSPV_KHR_fragment_shader_barycentric, kSPV_KHR_fragment_shading_rate, kSPV_KHR_integer_dot_product, kSPV_KHR_linkonce_odr, +kSPV_KHR_maximal_reconvergence, kSPV_KHR_multiview, kSPV_KHR_no_integer_wrap_decoration, kSPV_KHR_non_semantic_info, kSPV_KHR_physical_storage_buffer, kSPV_KHR_post_depth_coverage, +kSPV_KHR_quad_control, +kSPV_KHR_ray_cull_mask, kSPV_KHR_ray_query, kSPV_KHR_ray_tracing, +kSPV_KHR_ray_tracing_position_fetch, +kSPV_KHR_relaxed_extended_instruction, kSPV_KHR_shader_atomic_counter_ops, kSPV_KHR_shader_ballot, kSPV_KHR_shader_clock, kSPV_KHR_shader_draw_parameters, kSPV_KHR_storage_buffer_storage_class, +kSPV_KHR_subgroup_rotate, kSPV_KHR_subgroup_uniform_control_flow, kSPV_KHR_subgroup_vote, kSPV_KHR_terminate_invocation, +kSPV_KHR_uniform_group_instructions, kSPV_KHR_variable_pointers, kSPV_KHR_vulkan_memory_model, kSPV_KHR_workgroup_memory_explicit_layout, @@ -83,16 +114,22 @@ kSPV_NVX_multiview_per_view_attributes, kSPV_NV_bindless_texture, kSPV_NV_compute_shader_derivatives, kSPV_NV_cooperative_matrix, +kSPV_NV_displacement_micromap, kSPV_NV_fragment_shader_barycentric, kSPV_NV_geometry_shader_passthrough, kSPV_NV_mesh_shader, +kSPV_NV_raw_access_chains, kSPV_NV_ray_tracing, kSPV_NV_ray_tracing_motion_blur, kSPV_NV_sample_mask_override_coverage, +kSPV_NV_shader_atomic_fp16_vector, kSPV_NV_shader_image_footprint, +kSPV_NV_shader_invocation_reorder, kSPV_NV_shader_sm_builtins, kSPV_NV_shader_subgroup_partitioned, kSPV_NV_shading_rate, kSPV_NV_stereo_view_rendering, kSPV_NV_viewport_array2, +kSPV_QCOM_image_processing, +kSPV_QCOM_image_processing2, kSPV_VALIDATOR_ignore_type_decl_unique \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.cpp index 049a3ad10..ac987fcc0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.cpp @@ -24,7 +24,9 @@ namespace spvtools { std::string GetExtensionString(const spv_parsed_instruction_t* inst) { - if (inst->opcode != SpvOpExtension) return "ERROR_not_op_extension"; + if (inst->opcode != static_cast(spv::Op::OpExtension)) { + return "ERROR_not_op_extension"; + } assert(inst->num_operands == 1); @@ -38,8 +40,9 @@ std::string GetExtensionString(const spv_parsed_instruction_t* inst) { std::string ExtensionSetToString(const ExtensionSet& extensions) { std::stringstream ss; - extensions.ForEach( - [&ss](Extension ext) { ss << ExtensionToString(ext) << " "; }); + for (auto extension : extensions) { + ss << ExtensionToString(extension) << " "; + } return ss.str(); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.h index 8023444c3..cda4924a4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/extensions.h @@ -15,6 +15,7 @@ #ifndef SOURCE_EXTENSIONS_H_ #define SOURCE_EXTENSIONS_H_ +#include #include #include "source/enum_set.h" @@ -23,7 +24,7 @@ namespace spvtools { // The known SPIR-V extensions. -enum Extension { +enum Extension : uint32_t { #include "extension_enum.inc" }; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/generators.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/generators.inc index 6adca7886..e67e57560 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/generators.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/generators.inc @@ -30,5 +30,15 @@ {29, "Mikkosoft Productions", "MSP Shader Compiler", "Mikkosoft Productions MSP Shader Compiler"}, {30, "SpvGenTwo community", "SpvGenTwo SPIR-V IR Tools", "SpvGenTwo community SpvGenTwo SPIR-V IR Tools"}, {31, "Google", "Skia SkSL", "Google Skia SkSL"}, -{32, "TornadoVM", "SPIRV Beehive Toolkit", "TornadoVM SPIRV Beehive Toolkit"}, -{33, "DragonJoker", "ShaderWriter", "DragonJoker ShaderWriter"}, \ No newline at end of file +{32, "TornadoVM", "Beehive SPIRV Toolkit", "TornadoVM Beehive SPIRV Toolkit"}, +{33, "DragonJoker", "ShaderWriter", "DragonJoker ShaderWriter"}, +{34, "Rayan Hatout", "SPIRVSmith", "Rayan Hatout SPIRVSmith"}, +{35, "Saarland University", "Shady", "Saarland University Shady"}, +{36, "Taichi Graphics", "Taichi", "Taichi Graphics Taichi"}, +{37, "heroseh", "Hero C Compiler", "heroseh Hero C Compiler"}, +{38, "Meta", "SparkSL", "Meta SparkSL"}, +{39, "SirLynix", "Nazara ShaderLang Compiler", "SirLynix Nazara ShaderLang Compiler"}, +{40, "NVIDIA", "Slang Compiler", "NVIDIA Slang Compiler"}, +{41, "Zig Software Foundation", "Zig Compiler", "Zig Software Foundation Zig Compiler"}, +{42, "Rendong Liang", "spq", "Rendong Liang spq"}, +{43, "LLVM", "LLVM SPIR-V Backend", "LLVM LLVM SPIR-V Backend"}, \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/glsl.std.450.insts.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/glsl.std.450.insts.inc index 7d3866d80..89fe94805 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/glsl.std.450.insts.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/glsl.std.450.insts.inc @@ -1,5 +1,5 @@ -static const SpvCapability pygen_variable_caps_Float64[] = {SpvCapabilityFloat64}; -static const SpvCapability pygen_variable_caps_InterpolationFunction[] = {SpvCapabilityInterpolationFunction}; +static const spv::Capability pygen_variable_caps_Float64[] = {spv::Capability::Float64}; +static const spv::Capability pygen_variable_caps_InterpolationFunction[] = {spv::Capability::InterpolationFunction}; static const spv_ext_inst_desc_t glsl_entries[] = { {"Round", 1, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/instruction.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/instruction.h index 9e7dccd03..2acbb5729 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/instruction.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/instruction.h @@ -26,7 +26,7 @@ struct spv_instruction_t { // Normally, both opcode and extInstType contain valid data. // However, when the assembler parses ! as the first word in // an instruction and opcode and extInstType are invalid. - SpvOp opcode; + spv::Op opcode; spv_ext_inst_type_t extInstType; // The Id of the result type, if this instruction has one. Zero otherwise. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/latest_version_spirv_header.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/latest_version_spirv_header.h index e4f28e43e..f6ab5c845 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/latest_version_spirv_header.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/latest_version_spirv_header.h @@ -15,6 +15,6 @@ #ifndef SOURCE_LATEST_VERSION_SPIRV_HEADER_H_ #define SOURCE_LATEST_VERSION_SPIRV_HEADER_H_ -#include "spirv/unified1/spirv.h" +#include "spirv/unified1/spirv.hpp11" #endif // SOURCE_LATEST_VERSION_SPIRV_HEADER_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/libspirv.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/libspirv.cpp index 0bc093508..83e8629b7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/libspirv.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/libspirv.cpp @@ -99,13 +99,49 @@ bool SpirvTools::Disassemble(const uint32_t* binary, const size_t binary_size, spv_text spvtext = nullptr; spv_result_t status = spvBinaryToText(impl_->context, binary, binary_size, options, &spvtext, nullptr); - if (status == SPV_SUCCESS) { + if (status == SPV_SUCCESS && + (options & SPV_BINARY_TO_TEXT_OPTION_PRINT) == 0) { + assert(spvtext); text->assign(spvtext->str, spvtext->str + spvtext->length); } spvTextDestroy(spvtext); return status == SPV_SUCCESS; } +struct CxxParserContext { + const HeaderParser& header_parser; + const InstructionParser& instruction_parser; +}; + +bool SpirvTools::Parse(const std::vector& binary, + const HeaderParser& header_parser, + const InstructionParser& instruction_parser, + spv_diagnostic* diagnostic) { + CxxParserContext parser_context = {header_parser, instruction_parser}; + + spv_parsed_header_fn_t header_fn_wrapper = + [](void* user_data, spv_endianness_t endianness, uint32_t magic, + uint32_t version, uint32_t generator, uint32_t id_bound, + uint32_t reserved) { + CxxParserContext* ctx = reinterpret_cast(user_data); + spv_parsed_header_t header = {magic, version, generator, id_bound, + reserved}; + + return ctx->header_parser(endianness, header); + }; + + spv_parsed_instruction_fn_t instruction_fn_wrapper = + [](void* user_data, const spv_parsed_instruction_t* instruction) { + CxxParserContext* ctx = reinterpret_cast(user_data); + return ctx->instruction_parser(*instruction); + }; + + spv_result_t status = spvBinaryParse( + impl_->context, &parser_context, binary.data(), binary.size(), + header_fn_wrapper, instruction_fn_wrapper, diagnostic); + return status == SPV_SUCCESS; +} + bool SpirvTools::Validate(const std::vector& binary) const { return Validate(binary.data(), binary.size()); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/CMakeLists.txt b/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/CMakeLists.txt index c8dd2f715..a35b9a58f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/CMakeLists.txt +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/CMakeLists.txt @@ -23,7 +23,7 @@ target_include_directories(SPIRV-Tools-link $ PRIVATE ${spirv-tools_BINARY_DIR} ) -# We need the IR functionnalities from the optimizer +# We need the IR functionalities from the optimizer target_link_libraries(SPIRV-Tools-link PUBLIC SPIRV-Tools-opt) @@ -31,10 +31,7 @@ set_property(TARGET SPIRV-Tools-link PROPERTY FOLDER "SPIRV-Tools libraries") spvtools_check_symbol_exports(SPIRV-Tools-link) if(ENABLE_SPIRV_TOOLS_INSTALL) - install(TARGETS SPIRV-Tools-link EXPORT SPIRV-Tools-linkTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS SPIRV-Tools-link EXPORT SPIRV-Tools-linkTargets) export(EXPORT SPIRV-Tools-linkTargets FILE SPIRV-Tools-linkTargets.cmake) spvtools_config_package_dir(SPIRV-Tools-link PACKAGE_DIR) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/linker.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/linker.cpp index c23a23dea..58930e452 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/linker.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/link/linker.cpp @@ -34,6 +34,7 @@ #include "source/opt/ir_loader.h" #include "source/opt/pass_manager.h" #include "source/opt/remove_duplicates_pass.h" +#include "source/opt/remove_unused_interface_variables_pass.h" #include "source/opt/type_manager.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" @@ -56,12 +57,12 @@ using opt::analysis::TypeManager; // Stores various information about an imported or exported symbol. struct LinkageSymbolInfo { - SpvId id; // ID of the symbol - SpvId type_id; // ID of the type of the symbol + spv::Id id; // ID of the symbol + spv::Id type_id; // ID of the type of the symbol std::string name; // unique name defining the symbol and used for matching // imports and exports together - std::vector parameter_ids; // ID of the parameters of the symbol, if - // it is a function + std::vector parameter_ids; // ID of the parameters of the symbol, if + // it is a function }; struct LinkageEntry { LinkageSymbolInfo imported_symbol; @@ -90,7 +91,8 @@ spv_result_t ShiftIdsInModules(const MessageConsumer& consumer, // should be non-null. |max_id_bound| should be strictly greater than 0. spv_result_t GenerateHeader(const MessageConsumer& consumer, const std::vector& modules, - uint32_t max_id_bound, opt::ModuleHeader* header); + uint32_t max_id_bound, opt::ModuleHeader* header, + const LinkerOptions& options); // Merge all the modules from |in_modules| into a single module owned by // |linked_context|. @@ -128,7 +130,7 @@ spv_result_t CheckImportExportCompatibility(const MessageConsumer& consumer, // Remove linkage specific instructions, such as prototypes of imported // functions, declarations of imported variables, import (and export if -// necessary) linkage attribtes. +// necessary) linkage attributes. // // |linked_context| and |decoration_manager| should not be null, and the // 'RemoveDuplicatePass' should be run first. @@ -201,7 +203,8 @@ spv_result_t ShiftIdsInModules(const MessageConsumer& consumer, spv_result_t GenerateHeader(const MessageConsumer& consumer, const std::vector& modules, - uint32_t max_id_bound, opt::ModuleHeader* header) { + uint32_t max_id_bound, opt::ModuleHeader* header, + const LinkerOptions& options) { spv_position_t position = {}; if (modules.empty()) @@ -211,10 +214,12 @@ spv_result_t GenerateHeader(const MessageConsumer& consumer, return DiagnosticStream(position, consumer, "", SPV_ERROR_INVALID_DATA) << "|max_id_bound| of GenerateHeader should not be null."; - const uint32_t linked_version = modules.front()->version(); + uint32_t linked_version = modules.front()->version(); for (std::size_t i = 1; i < modules.size(); ++i) { const uint32_t module_version = modules[i]->version(); - if (module_version != linked_version) + if (options.GetUseHighestVersion()) { + linked_version = std::max(linked_version, module_version); + } else if (module_version != linked_version) { return DiagnosticStream({0, 0, 1}, consumer, "", SPV_ERROR_INTERNAL) << "Conflicting SPIR-V versions: " << SPV_SPIRV_VERSION_MAJOR_PART(linked_version) << "." @@ -223,9 +228,10 @@ spv_result_t GenerateHeader(const MessageConsumer& consumer, << SPV_SPIRV_VERSION_MAJOR_PART(module_version) << "." << SPV_SPIRV_VERSION_MINOR_PART(module_version) << " (input module " << (i + 1) << ")."; + } } - header->magic_number = SpvMagicNumber; + header->magic_number = spv::MagicNumber; header->version = linked_version; header->generator = SPV_GENERATOR_WORD(SPV_GENERATOR_KHRONOS_LINKER, 0); header->bound = max_id_bound; @@ -366,7 +372,7 @@ spv_result_t MergeModules(const MessageConsumer& consumer, std::vector processed_words = spvtools::utils::MakeVector(processed_string); linked_module->AddDebug3Inst(std::unique_ptr( - new Instruction(linked_context, SpvOpModuleProcessed, 0u, 0u, + new Instruction(linked_context, spv::Op::OpModuleProcessed, 0u, 0u, {{SPV_OPERAND_TYPE_LITERAL_STRING, processed_words}}))); } @@ -376,7 +382,7 @@ spv_result_t MergeModules(const MessageConsumer& consumer, std::unique_ptr(inst.Clone(linked_context))); // TODO(pierremoreau): Since the modules have not been validate, should we - // expect SpvStorageClassFunction variables outside + // expect spv::StorageClass::Function variables outside // functions? for (const auto& module : input_modules) { for (const auto& inst : module->types_values()) { @@ -413,16 +419,18 @@ spv_result_t GetImportExportPairs(const MessageConsumer& consumer, // Figure out the imports and exports for (const auto& decoration : linked_context.annotations()) { - if (decoration.opcode() != SpvOpDecorate || - decoration.GetSingleWordInOperand(1u) != SpvDecorationLinkageAttributes) + if (decoration.opcode() != spv::Op::OpDecorate || + spv::Decoration(decoration.GetSingleWordInOperand(1u)) != + spv::Decoration::LinkageAttributes) continue; - const SpvId id = decoration.GetSingleWordInOperand(0u); + const spv::Id id = decoration.GetSingleWordInOperand(0u); // Ignore if the targeted symbol is a built-in bool is_built_in = false; for (const auto& id_decoration : decoration_manager.GetDecorationsFor(id, false)) { - if (id_decoration->GetSingleWordInOperand(1u) == SpvDecorationBuiltIn) { + if (spv::Decoration(id_decoration->GetSingleWordInOperand(1u)) == + spv::Decoration::BuiltIn) { is_built_in = true; break; } @@ -446,9 +454,9 @@ spv_result_t GetImportExportPairs(const MessageConsumer& consumer, return DiagnosticStream(position, consumer, "", SPV_ERROR_INVALID_BINARY) << "ID " << id << " is never defined:\n"; - if (def_inst->opcode() == SpvOpVariable) { + if (def_inst->opcode() == spv::Op::OpVariable) { symbol_info.type_id = def_inst->type_id(); - } else if (def_inst->opcode() == SpvOpFunction) { + } else if (def_inst->opcode() == spv::Op::OpFunction) { symbol_info.type_id = def_inst->GetSingleWordInOperand(1u); // range-based for loop calls begin()/end(), but never cbegin()/cend(), @@ -466,9 +474,9 @@ spv_result_t GetImportExportPairs(const MessageConsumer& consumer, << " LinkageAttributes; " << id << " is neither of them.\n"; } - if (type == SpvLinkageTypeImport) + if (spv::LinkageType(type) == spv::LinkageType::Import) imports.push_back(symbol_info); - else if (type == SpvLinkageTypeExport) + else if (spv::LinkageType(type) == spv::LinkageType::Export) exports[symbol_info.name].push_back(symbol_info); } @@ -584,7 +592,7 @@ spv_result_t RemoveLinkageSpecificInstructions( // TODO(pierremoreau): This will not work if the decoration is applied // through a group, but the linker does not support that // either. - std::unordered_set imports; + std::unordered_set imports; if (options.GetAllowPartialLinkage()) { imports.reserve(linkings_to_do.size()); for (const auto& linking_entry : linkings_to_do) @@ -600,9 +608,11 @@ spv_result_t RemoveLinkageSpecificInstructions( // * if we do not allow partial linkage, remove all import annotations; // * otherwise, remove the annotation only if there was a corresponding // export. - if (inst->opcode() == SpvOpDecorate && - inst->GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && - inst->GetSingleWordOperand(3u) == SpvLinkageTypeImport && + if (inst->opcode() == spv::Op::OpDecorate && + spv::Decoration(inst->GetSingleWordOperand(1u)) == + spv::Decoration::LinkageAttributes && + spv::LinkageType(inst->GetSingleWordOperand(3u)) == + spv::LinkageType::Import && (!options.GetAllowPartialLinkage() || imports.find(inst->GetSingleWordOperand(0u)) != imports.end())) { linked_context->KillInst(&*inst); @@ -615,9 +625,11 @@ spv_result_t RemoveLinkageSpecificInstructions( for (auto inst = next; inst != linked_context->annotation_end(); inst = next) { ++next; - if (inst->opcode() == SpvOpDecorate && - inst->GetSingleWordOperand(1u) == SpvDecorationLinkageAttributes && - inst->GetSingleWordOperand(3u) == SpvLinkageTypeExport) { + if (inst->opcode() == spv::Op::OpDecorate && + spv::Decoration(inst->GetSingleWordOperand(1u)) == + spv::Decoration::LinkageAttributes && + spv::LinkageType(inst->GetSingleWordOperand(3u)) == + spv::LinkageType::Export) { linked_context->KillInst(&*inst); } } @@ -627,10 +639,11 @@ spv_result_t RemoveLinkageSpecificInstructions( // not allowed if (!options.GetCreateLibrary() && !options.GetAllowPartialLinkage()) { for (auto& inst : linked_context->capabilities()) - if (inst.GetSingleWordInOperand(0u) == SpvCapabilityLinkage) { + if (spv::Capability(inst.GetSingleWordInOperand(0u)) == + spv::Capability::Linkage) { linked_context->KillInst(&inst); // The RemoveDuplicatesPass did remove duplicated capabilities, so we - // now there aren’t more SpvCapabilityLinkage further down. + // now there aren’t more spv::Capability::Linkage further down. break; } } @@ -670,7 +683,7 @@ spv_result_t VerifyLimits(const MessageConsumer& consumer, size_t num_global_values = 0u; for (const auto& inst : linked_context.module()->types_values()) { - num_global_values += inst.opcode() == SpvOpVariable; + num_global_values += inst.opcode() == spv::Op::OpVariable; } if (num_global_values >= SPV_LIMIT_GLOBAL_VARIABLES_MAX) DiagnosticStream(position, consumer, "", SPV_WARNING) @@ -745,7 +758,7 @@ spv_result_t Link(const Context& context, const uint32_t* const* binaries, // Phase 2: Generate the header opt::ModuleHeader header; - res = GenerateHeader(consumer, modules, max_id_bound, &header); + res = GenerateHeader(consumer, modules, max_id_bound, &header, options); if (res != SPV_SUCCESS) return res; IRContext linked_context(c_context->target_env, consumer); linked_context.module()->SetHeader(header); @@ -807,11 +820,16 @@ spv_result_t Link(const Context& context, const uint32_t* const* binaries, pass_res = manager.Run(&linked_context); if (pass_res == opt::Pass::Status::Failure) return SPV_ERROR_INVALID_DATA; - // Phase 11: Warn if SPIR-V limits were exceeded + // Phase 11: Recompute EntryPoint variables + manager.AddPass(); + pass_res = manager.Run(&linked_context); + if (pass_res == opt::Pass::Status::Failure) return SPV_ERROR_INVALID_DATA; + + // Phase 12: Warn if SPIR-V limits were exceeded res = VerifyLimits(consumer, linked_context); if (res != SPV_SUCCESS) return res; - // Phase 12: Output the module + // Phase 13: Output the module linked_context.module()->ToBinary(linked_binary, true); return SPV_SUCCESS; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/name_mapper.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/name_mapper.cpp index 3b31d33a8..b2d0f4452 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/name_mapper.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/name_mapper.cpp @@ -100,18 +100,18 @@ void FriendlyNameMapper::SaveName(uint32_t id, void FriendlyNameMapper::SaveBuiltInName(uint32_t target_id, uint32_t built_in) { #define GLCASE(name) \ - case SpvBuiltIn##name: \ + case spv::BuiltIn::name: \ SaveName(target_id, "gl_" #name); \ return; #define GLCASE2(name, suggested) \ - case SpvBuiltIn##name: \ + case spv::BuiltIn::name: \ SaveName(target_id, "gl_" #suggested); \ return; #define CASE(name) \ - case SpvBuiltIn##name: \ + case spv::BuiltIn::name: \ SaveName(target_id, #name); \ return; - switch (built_in) { + switch (spv::BuiltIn(built_in)) { GLCASE(Position) GLCASE(PointSize) GLCASE(ClipDistance) @@ -170,28 +170,28 @@ void FriendlyNameMapper::SaveBuiltInName(uint32_t target_id, spv_result_t FriendlyNameMapper::ParseInstruction( const spv_parsed_instruction_t& inst) { const auto result_id = inst.result_id; - switch (inst.opcode) { - case SpvOpName: + switch (spv::Op(inst.opcode)) { + case spv::Op::OpName: SaveName(inst.words[1], spvDecodeLiteralStringOperand(inst, 1)); break; - case SpvOpDecorate: + case spv::Op::OpDecorate: // Decorations come after OpName. So OpName will take precedence over // decorations. // // In theory, we should also handle OpGroupDecorate. But that's unlikely // to occur. - if (inst.words[2] == SpvDecorationBuiltIn) { + if (spv::Decoration(inst.words[2]) == spv::Decoration::BuiltIn) { assert(inst.num_words > 3); SaveBuiltInName(inst.words[1], inst.words[3]); } break; - case SpvOpTypeVoid: + case spv::Op::OpTypeVoid: SaveName(result_id, "void"); break; - case SpvOpTypeBool: + case spv::Op::OpTypeBool: SaveName(result_id, "bool"); break; - case SpvOpTypeInt: { + case spv::Op::OpTypeInt: { std::string signedness; std::string root; const auto bit_width = inst.words[2]; @@ -216,7 +216,7 @@ spv_result_t FriendlyNameMapper::ParseInstruction( if (0 == inst.words[3]) signedness = "u"; SaveName(result_id, signedness + root); } break; - case SpvOpTypeFloat: { + case spv::Op::OpTypeFloat: { const auto bit_width = inst.words[2]; switch (bit_width) { case 16: @@ -233,68 +233,68 @@ spv_result_t FriendlyNameMapper::ParseInstruction( break; } } break; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: SaveName(result_id, std::string("v") + to_string(inst.words[3]) + NameForId(inst.words[2])); break; - case SpvOpTypeMatrix: + case spv::Op::OpTypeMatrix: SaveName(result_id, std::string("mat") + to_string(inst.words[3]) + NameForId(inst.words[2])); break; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: SaveName(result_id, std::string("_arr_") + NameForId(inst.words[2]) + "_" + NameForId(inst.words[3])); break; - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: SaveName(result_id, std::string("_runtimearr_") + NameForId(inst.words[2])); break; - case SpvOpTypePointer: + case spv::Op::OpTypePointer: SaveName(result_id, std::string("_ptr_") + NameForEnumOperand(SPV_OPERAND_TYPE_STORAGE_CLASS, inst.words[2]) + "_" + NameForId(inst.words[3])); break; - case SpvOpTypePipe: + case spv::Op::OpTypePipe: SaveName(result_id, std::string("Pipe") + NameForEnumOperand(SPV_OPERAND_TYPE_ACCESS_QUALIFIER, inst.words[2])); break; - case SpvOpTypeEvent: + case spv::Op::OpTypeEvent: SaveName(result_id, "Event"); break; - case SpvOpTypeDeviceEvent: + case spv::Op::OpTypeDeviceEvent: SaveName(result_id, "DeviceEvent"); break; - case SpvOpTypeReserveId: + case spv::Op::OpTypeReserveId: SaveName(result_id, "ReserveId"); break; - case SpvOpTypeQueue: + case spv::Op::OpTypeQueue: SaveName(result_id, "Queue"); break; - case SpvOpTypeOpaque: + case spv::Op::OpTypeOpaque: SaveName(result_id, std::string("Opaque_") + Sanitize(spvDecodeLiteralStringOperand(inst, 1))); break; - case SpvOpTypePipeStorage: + case spv::Op::OpTypePipeStorage: SaveName(result_id, "PipeStorage"); break; - case SpvOpTypeNamedBarrier: + case spv::Op::OpTypeNamedBarrier: SaveName(result_id, "NamedBarrier"); break; - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: // Structs are mapped rather simplisitically. Just indicate that they // are a struct and then give the raw Id number. SaveName(result_id, std::string("_struct_") + to_string(result_id)); break; - case SpvOpConstantTrue: + case spv::Op::OpConstantTrue: SaveName(result_id, "true"); break; - case SpvOpConstantFalse: + case spv::Op::OpConstantFalse: SaveName(result_id, "false"); break; - case SpvOpConstant: { + case spv::Op::OpConstant: { std::ostringstream value; EmitNumericLiteral(&value, inst, inst.operands[2]); auto value_str = value.str(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.clspvreflection.insts.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.clspvreflection.insts.inc index 2cf7cafe3..4ed11a6db 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.clspvreflection.insts.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.clspvreflection.insts.inc @@ -1,7 +1,7 @@ static const spv_ext_inst_desc_t nonsemantic_clspvreflection_entries[] = { - {"Kernel", 1, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"Kernel", 1, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, {"ArgumentInfo", 2, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, {"ArgumentStorageBuffer", 3, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, {"ArgumentUniform", 4, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, @@ -25,5 +25,21 @@ static const spv_ext_inst_desc_t nonsemantic_clspvreflection_entries[] = { {"ConstantDataUniform", 22, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, {"LiteralSampler", 23, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, {"PropertyRequiredWorkgroupSize", 24, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, - {"SpecConstantSubgroupMaxSize", 25, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}} + {"SpecConstantSubgroupMaxSize", 25, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ArgumentPointerPushConstant", 26, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, + {"ArgumentPointerUniform", 27, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, + {"ProgramScopeVariablesStorageBuffer", 28, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ProgramScopeVariablePointerRelocation", 29, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ImageArgumentInfoChannelOrderPushConstant", 30, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ImageArgumentInfoChannelDataTypePushConstant", 31, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ImageArgumentInfoChannelOrderUniform", 32, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ImageArgumentInfoChannelDataTypeUniform", 33, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ArgumentStorageTexelBuffer", 34, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, + {"ArgumentUniformTexelBuffer", 35, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_OPTIONAL_ID, SPV_OPERAND_TYPE_NONE}}, + {"ConstantDataPointerPushConstant", 36, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"ProgramScopeVariablePointerPushConstant", 37, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"PrintfInfo", 38, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_VARIABLE_ID, SPV_OPERAND_TYPE_NONE}}, + {"PrintfBufferStorageBuffer", 39, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"PrintfBufferPointerPushConstant", 40, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"NormalizedSamplerMaskPushConstant", 41, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}} }; \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.vkspreflection.insts.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.vkspreflection.insts.inc new file mode 100644 index 000000000..623b9cf23 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/nonsemantic.vkspreflection.insts.inc @@ -0,0 +1,12 @@ + + +static const spv_ext_inst_desc_t nonsemantic_vkspreflection_entries[] = { + {"Configuration", 1, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, + {"StartCounter", 2, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_NONE}}, + {"StopCounter", 3, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_NONE}}, + {"PushConstants", 4, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, + {"SpecializationMapEntry", 5, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, + {"DescriptorSetBuffer", 6, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, + {"DescriptorSetImage", 7, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}}, + {"DescriptorSetSampler", 8, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_FLOAT, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_FLOAT, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_FLOAT, SPV_OPERAND_TYPE_LITERAL_FLOAT, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}} +}; \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.cpp index c96cde8d6..787dbb340 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2020 The Khronos Group Inc. +// Copyright (c) 2015-2022 The Khronos Group Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights // reserved. // @@ -40,12 +40,12 @@ struct OpcodeDescPtrLen { static const spv_opcode_table_t kOpcodeTable = {ARRAY_SIZE(kOpcodeTableEntries), kOpcodeTableEntries}; -// Represents a vendor tool entry in the SPIR-V XML Regsitry. +// Represents a vendor tool entry in the SPIR-V XML Registry. struct VendorTool { uint32_t value; const char* vendor; const char* tool; // Might be empty string. - const char* vendor_tool; // Combiantion of vendor and tool. + const char* vendor_tool; // Combination of vendor and tool. }; const VendorTool vendor_tools[] = { @@ -64,7 +64,7 @@ const char* spvGeneratorStr(uint32_t generator) { return "Unknown"; } -uint32_t spvOpcodeMake(uint16_t wordCount, SpvOp opcode) { +uint32_t spvOpcodeMake(uint16_t wordCount, spv::Op opcode) { return ((uint32_t)opcode) | (((uint32_t)wordCount) << 16); } @@ -125,7 +125,7 @@ spv_result_t spvOpcodeTableNameLookup(spv_target_env env, spv_result_t spvOpcodeTableValueLookup(spv_target_env env, const spv_opcode_table table, - const SpvOp opcode, + const spv::Op opcode, spv_opcode_desc* pEntry) { if (!table) return SPV_ERROR_INVALID_TABLE; if (!pEntry) return SPV_ERROR_INVALID_POINTER; @@ -166,7 +166,7 @@ spv_result_t spvOpcodeTableValueLookup(spv_target_env env, return SPV_ERROR_INVALID_LOOKUP; } -void spvInstructionCopy(const uint32_t* words, const SpvOp opcode, +void spvInstructionCopy(const uint32_t* words, const spv::Op opcode, const uint16_t wordCount, const spv_endianness_t endian, spv_instruction_t* pInst) { pInst->opcode = opcode; @@ -177,7 +177,7 @@ void spvInstructionCopy(const uint32_t* words, const SpvOp opcode, uint16_t thisWordCount; uint16_t thisOpcode; spvOpcodeSplit(pInst->words[wordIndex], &thisWordCount, &thisOpcode); - assert(opcode == static_cast(thisOpcode) && + assert(opcode == static_cast(thisOpcode) && wordCount == thisWordCount && "Endianness failed!"); } } @@ -186,7 +186,7 @@ void spvInstructionCopy(const uint32_t* words, const SpvOp opcode, const char* spvOpcodeString(const uint32_t opcode) { const auto beg = kOpcodeTableEntries; const auto end = kOpcodeTableEntries + ARRAY_SIZE(kOpcodeTableEntries); - spv_opcode_desc_t needle = {"", static_cast(opcode), + spv_opcode_desc_t needle = {"", static_cast(opcode), 0, nullptr, 0, {}, false, false, @@ -196,7 +196,7 @@ const char* spvOpcodeString(const uint32_t opcode) { return lhs.opcode < rhs.opcode; }; auto it = std::lower_bound(beg, end, needle, comp); - if (it != end && it->opcode == opcode) { + if (it != end && it->opcode == spv::Op(opcode)) { return it->name; } @@ -204,140 +204,150 @@ const char* spvOpcodeString(const uint32_t opcode) { return "unknown"; } -int32_t spvOpcodeIsScalarType(const SpvOp opcode) { +const char* spvOpcodeString(const spv::Op opcode) { + return spvOpcodeString(static_cast(opcode)); +} + +int32_t spvOpcodeIsScalarType(const spv::Op opcode) { switch (opcode) { - case SpvOpTypeInt: - case SpvOpTypeFloat: - case SpvOpTypeBool: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeBool: return true; default: return false; } } -int32_t spvOpcodeIsSpecConstant(const SpvOp opcode) { +int32_t spvOpcodeIsSpecConstant(const spv::Op opcode) { switch (opcode) { - case SpvOpSpecConstantTrue: - case SpvOpSpecConstantFalse: - case SpvOpSpecConstant: - case SpvOpSpecConstantComposite: - case SpvOpSpecConstantOp: + case spv::Op::OpSpecConstantTrue: + case spv::Op::OpSpecConstantFalse: + case spv::Op::OpSpecConstant: + case spv::Op::OpSpecConstantComposite: + case spv::Op::OpSpecConstantOp: return true; default: return false; } } -int32_t spvOpcodeIsConstant(const SpvOp opcode) { +int32_t spvOpcodeIsConstant(const spv::Op opcode) { switch (opcode) { - case SpvOpConstantTrue: - case SpvOpConstantFalse: - case SpvOpConstant: - case SpvOpConstantComposite: - case SpvOpConstantSampler: - case SpvOpConstantNull: - case SpvOpSpecConstantTrue: - case SpvOpSpecConstantFalse: - case SpvOpSpecConstant: - case SpvOpSpecConstantComposite: - case SpvOpSpecConstantOp: + case spv::Op::OpConstantTrue: + case spv::Op::OpConstantFalse: + case spv::Op::OpConstant: + case spv::Op::OpConstantComposite: + case spv::Op::OpConstantSampler: + case spv::Op::OpConstantNull: + case spv::Op::OpConstantFunctionPointerINTEL: + case spv::Op::OpSpecConstantTrue: + case spv::Op::OpSpecConstantFalse: + case spv::Op::OpSpecConstant: + case spv::Op::OpSpecConstantComposite: + case spv::Op::OpSpecConstantOp: return true; default: return false; } } -bool spvOpcodeIsConstantOrUndef(const SpvOp opcode) { - return opcode == SpvOpUndef || spvOpcodeIsConstant(opcode); +bool spvOpcodeIsConstantOrUndef(const spv::Op opcode) { + return opcode == spv::Op::OpUndef || spvOpcodeIsConstant(opcode); } -bool spvOpcodeIsScalarSpecConstant(const SpvOp opcode) { +bool spvOpcodeIsScalarSpecConstant(const spv::Op opcode) { switch (opcode) { - case SpvOpSpecConstantTrue: - case SpvOpSpecConstantFalse: - case SpvOpSpecConstant: + case spv::Op::OpSpecConstantTrue: + case spv::Op::OpSpecConstantFalse: + case spv::Op::OpSpecConstant: return true; default: return false; } } -int32_t spvOpcodeIsComposite(const SpvOp opcode) { +int32_t spvOpcodeIsComposite(const spv::Op opcode) { switch (opcode) { - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeArray: - case SpvOpTypeStruct: - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeStruct: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: return true; default: return false; } } -bool spvOpcodeReturnsLogicalVariablePointer(const SpvOp opcode) { +bool spvOpcodeReturnsLogicalVariablePointer(const spv::Op opcode) { switch (opcode) { - case SpvOpVariable: - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpFunctionParameter: - case SpvOpImageTexelPointer: - case SpvOpCopyObject: - case SpvOpSelect: - case SpvOpPhi: - case SpvOpFunctionCall: - case SpvOpPtrAccessChain: - case SpvOpLoad: - case SpvOpConstantNull: + case spv::Op::OpVariable: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpFunctionParameter: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpCopyObject: + case spv::Op::OpSelect: + case spv::Op::OpPhi: + case spv::Op::OpFunctionCall: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpLoad: + case spv::Op::OpConstantNull: + case spv::Op::OpRawAccessChainNV: return true; default: return false; } } -int32_t spvOpcodeReturnsLogicalPointer(const SpvOp opcode) { +int32_t spvOpcodeReturnsLogicalPointer(const spv::Op opcode) { switch (opcode) { - case SpvOpVariable: - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpFunctionParameter: - case SpvOpImageTexelPointer: - case SpvOpCopyObject: + case spv::Op::OpVariable: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpFunctionParameter: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpCopyObject: + case spv::Op::OpRawAccessChainNV: return true; default: return false; } } -int32_t spvOpcodeGeneratesType(SpvOp op) { +int32_t spvOpcodeGeneratesType(spv::Op op) { switch (op) { - case SpvOpTypeVoid: - case SpvOpTypeBool: - case SpvOpTypeInt: - case SpvOpTypeFloat: - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeImage: - case SpvOpTypeSampler: - case SpvOpTypeSampledImage: - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeStruct: - case SpvOpTypeOpaque: - case SpvOpTypePointer: - case SpvOpTypeFunction: - case SpvOpTypeEvent: - case SpvOpTypeDeviceEvent: - case SpvOpTypeReserveId: - case SpvOpTypeQueue: - case SpvOpTypePipe: - case SpvOpTypePipeStorage: - case SpvOpTypeNamedBarrier: - case SpvOpTypeAccelerationStructureNV: - case SpvOpTypeCooperativeMatrixNV: - // case SpvOpTypeAccelerationStructureKHR: covered by - // SpvOpTypeAccelerationStructureNV - case SpvOpTypeRayQueryKHR: + case spv::Op::OpTypeVoid: + case spv::Op::OpTypeBool: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeStruct: + case spv::Op::OpTypeOpaque: + case spv::Op::OpTypePointer: + case spv::Op::OpTypeFunction: + case spv::Op::OpTypeEvent: + case spv::Op::OpTypeDeviceEvent: + case spv::Op::OpTypeReserveId: + case spv::Op::OpTypeQueue: + case spv::Op::OpTypePipe: + case spv::Op::OpTypePipeStorage: + case spv::Op::OpTypeNamedBarrier: + case spv::Op::OpTypeAccelerationStructureNV: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: + // case spv::Op::OpTypeAccelerationStructureKHR: covered by + // spv::Op::OpTypeAccelerationStructureNV + case spv::Op::OpTypeRayQueryKHR: + case spv::Op::OpTypeHitObjectNV: return true; default: // In particular, OpTypeForwardPointer does not generate a type, @@ -348,15 +358,15 @@ int32_t spvOpcodeGeneratesType(SpvOp op) { return 0; } -bool spvOpcodeIsDecoration(const SpvOp opcode) { +bool spvOpcodeIsDecoration(const spv::Op opcode) { switch (opcode) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpMemberDecorate: - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorateStringGOOGLE: + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpMemberDecorate: + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorateStringGOOGLE: return true; default: break; @@ -364,404 +374,406 @@ bool spvOpcodeIsDecoration(const SpvOp opcode) { return false; } -bool spvOpcodeIsLoad(const SpvOp opcode) { +bool spvOpcodeIsLoad(const spv::Op opcode) { switch (opcode) { - case SpvOpLoad: - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageFetch: - case SpvOpImageGather: - case SpvOpImageDrefGather: - case SpvOpImageRead: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseFetch: - case SpvOpImageSparseGather: - case SpvOpImageSparseDrefGather: - case SpvOpImageSparseRead: + case spv::Op::OpLoad: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageFetch: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseFetch: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: + case spv::Op::OpImageSparseRead: return true; default: return false; } } -bool spvOpcodeIsBranch(SpvOp opcode) { +bool spvOpcodeIsBranch(spv::Op opcode) { switch (opcode) { - case SpvOpBranch: - case SpvOpBranchConditional: - case SpvOpSwitch: + case spv::Op::OpBranch: + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: return true; default: return false; } } -bool spvOpcodeIsAtomicWithLoad(const SpvOp opcode) { +bool spvOpcodeIsAtomicWithLoad(const spv::Op opcode) { switch (opcode) { - case SpvOpAtomicLoad: - case SpvOpAtomicExchange: - case SpvOpAtomicCompareExchange: - case SpvOpAtomicCompareExchangeWeak: - case SpvOpAtomicIIncrement: - case SpvOpAtomicIDecrement: - case SpvOpAtomicIAdd: - case SpvOpAtomicFAddEXT: - case SpvOpAtomicISub: - case SpvOpAtomicSMin: - case SpvOpAtomicUMin: - case SpvOpAtomicFMinEXT: - case SpvOpAtomicSMax: - case SpvOpAtomicUMax: - case SpvOpAtomicFMaxEXT: - case SpvOpAtomicAnd: - case SpvOpAtomicOr: - case SpvOpAtomicXor: - case SpvOpAtomicFlagTestAndSet: + case spv::Op::OpAtomicLoad: + case spv::Op::OpAtomicExchange: + case spv::Op::OpAtomicCompareExchange: + case spv::Op::OpAtomicCompareExchangeWeak: + case spv::Op::OpAtomicIIncrement: + case spv::Op::OpAtomicIDecrement: + case spv::Op::OpAtomicIAdd: + case spv::Op::OpAtomicFAddEXT: + case spv::Op::OpAtomicISub: + case spv::Op::OpAtomicSMin: + case spv::Op::OpAtomicUMin: + case spv::Op::OpAtomicFMinEXT: + case spv::Op::OpAtomicSMax: + case spv::Op::OpAtomicUMax: + case spv::Op::OpAtomicFMaxEXT: + case spv::Op::OpAtomicAnd: + case spv::Op::OpAtomicOr: + case spv::Op::OpAtomicXor: + case spv::Op::OpAtomicFlagTestAndSet: return true; default: return false; } } -bool spvOpcodeIsAtomicOp(const SpvOp opcode) { - return (spvOpcodeIsAtomicWithLoad(opcode) || opcode == SpvOpAtomicStore || - opcode == SpvOpAtomicFlagClear); +bool spvOpcodeIsAtomicOp(const spv::Op opcode) { + return (spvOpcodeIsAtomicWithLoad(opcode) || + opcode == spv::Op::OpAtomicStore || + opcode == spv::Op::OpAtomicFlagClear); } -bool spvOpcodeIsReturn(SpvOp opcode) { +bool spvOpcodeIsReturn(spv::Op opcode) { switch (opcode) { - case SpvOpReturn: - case SpvOpReturnValue: + case spv::Op::OpReturn: + case spv::Op::OpReturnValue: return true; default: return false; } } -bool spvOpcodeIsAbort(SpvOp opcode) { +bool spvOpcodeIsAbort(spv::Op opcode) { switch (opcode) { - case SpvOpKill: - case SpvOpUnreachable: - case SpvOpTerminateInvocation: - case SpvOpTerminateRayKHR: - case SpvOpIgnoreIntersectionKHR: + case spv::Op::OpKill: + case spv::Op::OpUnreachable: + case spv::Op::OpTerminateInvocation: + case spv::Op::OpTerminateRayKHR: + case spv::Op::OpIgnoreIntersectionKHR: + case spv::Op::OpEmitMeshTasksEXT: return true; default: return false; } } -bool spvOpcodeIsReturnOrAbort(SpvOp opcode) { +bool spvOpcodeIsReturnOrAbort(spv::Op opcode) { return spvOpcodeIsReturn(opcode) || spvOpcodeIsAbort(opcode); } -bool spvOpcodeIsBlockTerminator(SpvOp opcode) { +bool spvOpcodeIsBlockTerminator(spv::Op opcode) { return spvOpcodeIsBranch(opcode) || spvOpcodeIsReturnOrAbort(opcode); } -bool spvOpcodeTerminatesExecution(SpvOp opcode) { - return opcode == SpvOpKill || opcode == SpvOpTerminateInvocation || - opcode == SpvOpTerminateRayKHR || opcode == SpvOpIgnoreIntersectionKHR; -} - -bool spvOpcodeIsBaseOpaqueType(SpvOp opcode) { +bool spvOpcodeIsBaseOpaqueType(spv::Op opcode) { switch (opcode) { - case SpvOpTypeImage: - case SpvOpTypeSampler: - case SpvOpTypeSampledImage: - case SpvOpTypeOpaque: - case SpvOpTypeEvent: - case SpvOpTypeDeviceEvent: - case SpvOpTypeReserveId: - case SpvOpTypeQueue: - case SpvOpTypePipe: - case SpvOpTypeForwardPointer: - case SpvOpTypePipeStorage: - case SpvOpTypeNamedBarrier: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeOpaque: + case spv::Op::OpTypeEvent: + case spv::Op::OpTypeDeviceEvent: + case spv::Op::OpTypeReserveId: + case spv::Op::OpTypeQueue: + case spv::Op::OpTypePipe: + case spv::Op::OpTypeForwardPointer: + case spv::Op::OpTypePipeStorage: + case spv::Op::OpTypeNamedBarrier: return true; default: return false; } } -bool spvOpcodeIsNonUniformGroupOperation(SpvOp opcode) { +bool spvOpcodeIsNonUniformGroupOperation(spv::Op opcode) { switch (opcode) { - case SpvOpGroupNonUniformElect: - case SpvOpGroupNonUniformAll: - case SpvOpGroupNonUniformAny: - case SpvOpGroupNonUniformAllEqual: - case SpvOpGroupNonUniformBroadcast: - case SpvOpGroupNonUniformBroadcastFirst: - case SpvOpGroupNonUniformBallot: - case SpvOpGroupNonUniformInverseBallot: - case SpvOpGroupNonUniformBallotBitExtract: - case SpvOpGroupNonUniformBallotBitCount: - case SpvOpGroupNonUniformBallotFindLSB: - case SpvOpGroupNonUniformBallotFindMSB: - case SpvOpGroupNonUniformShuffle: - case SpvOpGroupNonUniformShuffleXor: - case SpvOpGroupNonUniformShuffleUp: - case SpvOpGroupNonUniformShuffleDown: - case SpvOpGroupNonUniformIAdd: - case SpvOpGroupNonUniformFAdd: - case SpvOpGroupNonUniformIMul: - case SpvOpGroupNonUniformFMul: - case SpvOpGroupNonUniformSMin: - case SpvOpGroupNonUniformUMin: - case SpvOpGroupNonUniformFMin: - case SpvOpGroupNonUniformSMax: - case SpvOpGroupNonUniformUMax: - case SpvOpGroupNonUniformFMax: - case SpvOpGroupNonUniformBitwiseAnd: - case SpvOpGroupNonUniformBitwiseOr: - case SpvOpGroupNonUniformBitwiseXor: - case SpvOpGroupNonUniformLogicalAnd: - case SpvOpGroupNonUniformLogicalOr: - case SpvOpGroupNonUniformLogicalXor: - case SpvOpGroupNonUniformQuadBroadcast: - case SpvOpGroupNonUniformQuadSwap: + case spv::Op::OpGroupNonUniformElect: + case spv::Op::OpGroupNonUniformAll: + case spv::Op::OpGroupNonUniformAny: + case spv::Op::OpGroupNonUniformAllEqual: + case spv::Op::OpGroupNonUniformBroadcast: + case spv::Op::OpGroupNonUniformBroadcastFirst: + case spv::Op::OpGroupNonUniformBallot: + case spv::Op::OpGroupNonUniformInverseBallot: + case spv::Op::OpGroupNonUniformBallotBitExtract: + case spv::Op::OpGroupNonUniformBallotBitCount: + case spv::Op::OpGroupNonUniformBallotFindLSB: + case spv::Op::OpGroupNonUniformBallotFindMSB: + case spv::Op::OpGroupNonUniformShuffle: + case spv::Op::OpGroupNonUniformShuffleXor: + case spv::Op::OpGroupNonUniformShuffleUp: + case spv::Op::OpGroupNonUniformShuffleDown: + case spv::Op::OpGroupNonUniformIAdd: + case spv::Op::OpGroupNonUniformFAdd: + case spv::Op::OpGroupNonUniformIMul: + case spv::Op::OpGroupNonUniformFMul: + case spv::Op::OpGroupNonUniformSMin: + case spv::Op::OpGroupNonUniformUMin: + case spv::Op::OpGroupNonUniformFMin: + case spv::Op::OpGroupNonUniformSMax: + case spv::Op::OpGroupNonUniformUMax: + case spv::Op::OpGroupNonUniformFMax: + case spv::Op::OpGroupNonUniformBitwiseAnd: + case spv::Op::OpGroupNonUniformBitwiseOr: + case spv::Op::OpGroupNonUniformBitwiseXor: + case spv::Op::OpGroupNonUniformLogicalAnd: + case spv::Op::OpGroupNonUniformLogicalOr: + case spv::Op::OpGroupNonUniformLogicalXor: + case spv::Op::OpGroupNonUniformQuadBroadcast: + case spv::Op::OpGroupNonUniformQuadSwap: + case spv::Op::OpGroupNonUniformRotateKHR: + case spv::Op::OpGroupNonUniformQuadAllKHR: + case spv::Op::OpGroupNonUniformQuadAnyKHR: return true; default: return false; } } -bool spvOpcodeIsScalarizable(SpvOp opcode) { +bool spvOpcodeIsScalarizable(spv::Op opcode) { switch (opcode) { - case SpvOpPhi: - case SpvOpCopyObject: - case SpvOpConvertFToU: - case SpvOpConvertFToS: - case SpvOpConvertSToF: - case SpvOpConvertUToF: - case SpvOpUConvert: - case SpvOpSConvert: - case SpvOpFConvert: - case SpvOpQuantizeToF16: - case SpvOpVectorInsertDynamic: - case SpvOpSNegate: - case SpvOpFNegate: - case SpvOpIAdd: - case SpvOpFAdd: - case SpvOpISub: - case SpvOpFSub: - case SpvOpIMul: - case SpvOpFMul: - case SpvOpUDiv: - case SpvOpSDiv: - case SpvOpFDiv: - case SpvOpUMod: - case SpvOpSRem: - case SpvOpSMod: - case SpvOpFRem: - case SpvOpFMod: - case SpvOpVectorTimesScalar: - case SpvOpIAddCarry: - case SpvOpISubBorrow: - case SpvOpUMulExtended: - case SpvOpSMulExtended: - case SpvOpShiftRightLogical: - case SpvOpShiftRightArithmetic: - case SpvOpShiftLeftLogical: - case SpvOpBitwiseOr: - case SpvOpBitwiseAnd: - case SpvOpNot: - case SpvOpBitFieldInsert: - case SpvOpBitFieldSExtract: - case SpvOpBitFieldUExtract: - case SpvOpBitReverse: - case SpvOpBitCount: - case SpvOpIsNan: - case SpvOpIsInf: - case SpvOpIsFinite: - case SpvOpIsNormal: - case SpvOpSignBitSet: - case SpvOpLessOrGreater: - case SpvOpOrdered: - case SpvOpUnordered: - case SpvOpLogicalEqual: - case SpvOpLogicalNotEqual: - case SpvOpLogicalOr: - case SpvOpLogicalAnd: - case SpvOpLogicalNot: - case SpvOpSelect: - case SpvOpIEqual: - case SpvOpINotEqual: - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: - case SpvOpULessThan: - case SpvOpSLessThan: - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: - case SpvOpFOrdEqual: - case SpvOpFUnordEqual: - case SpvOpFOrdNotEqual: - case SpvOpFUnordNotEqual: - case SpvOpFOrdLessThan: - case SpvOpFUnordLessThan: - case SpvOpFOrdGreaterThan: - case SpvOpFUnordGreaterThan: - case SpvOpFOrdLessThanEqual: - case SpvOpFUnordLessThanEqual: - case SpvOpFOrdGreaterThanEqual: - case SpvOpFUnordGreaterThanEqual: + case spv::Op::OpPhi: + case spv::Op::OpCopyObject: + case spv::Op::OpConvertFToU: + case spv::Op::OpConvertFToS: + case spv::Op::OpConvertSToF: + case spv::Op::OpConvertUToF: + case spv::Op::OpUConvert: + case spv::Op::OpSConvert: + case spv::Op::OpFConvert: + case spv::Op::OpQuantizeToF16: + case spv::Op::OpVectorInsertDynamic: + case spv::Op::OpSNegate: + case spv::Op::OpFNegate: + case spv::Op::OpIAdd: + case spv::Op::OpFAdd: + case spv::Op::OpISub: + case spv::Op::OpFSub: + case spv::Op::OpIMul: + case spv::Op::OpFMul: + case spv::Op::OpUDiv: + case spv::Op::OpSDiv: + case spv::Op::OpFDiv: + case spv::Op::OpUMod: + case spv::Op::OpSRem: + case spv::Op::OpSMod: + case spv::Op::OpFRem: + case spv::Op::OpFMod: + case spv::Op::OpVectorTimesScalar: + case spv::Op::OpIAddCarry: + case spv::Op::OpISubBorrow: + case spv::Op::OpUMulExtended: + case spv::Op::OpSMulExtended: + case spv::Op::OpShiftRightLogical: + case spv::Op::OpShiftRightArithmetic: + case spv::Op::OpShiftLeftLogical: + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpNot: + case spv::Op::OpBitFieldInsert: + case spv::Op::OpBitFieldSExtract: + case spv::Op::OpBitFieldUExtract: + case spv::Op::OpBitReverse: + case spv::Op::OpBitCount: + case spv::Op::OpIsNan: + case spv::Op::OpIsInf: + case spv::Op::OpIsFinite: + case spv::Op::OpIsNormal: + case spv::Op::OpSignBitSet: + case spv::Op::OpLessOrGreater: + case spv::Op::OpOrdered: + case spv::Op::OpUnordered: + case spv::Op::OpLogicalEqual: + case spv::Op::OpLogicalNotEqual: + case spv::Op::OpLogicalOr: + case spv::Op::OpLogicalAnd: + case spv::Op::OpLogicalNot: + case spv::Op::OpSelect: + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpFOrdEqual: + case spv::Op::OpFUnordEqual: + case spv::Op::OpFOrdNotEqual: + case spv::Op::OpFUnordNotEqual: + case spv::Op::OpFOrdLessThan: + case spv::Op::OpFUnordLessThan: + case spv::Op::OpFOrdGreaterThan: + case spv::Op::OpFUnordGreaterThan: + case spv::Op::OpFOrdLessThanEqual: + case spv::Op::OpFUnordLessThanEqual: + case spv::Op::OpFOrdGreaterThanEqual: + case spv::Op::OpFUnordGreaterThanEqual: return true; default: return false; } } -bool spvOpcodeIsDebug(SpvOp opcode) { +bool spvOpcodeIsDebug(spv::Op opcode) { switch (opcode) { - case SpvOpName: - case SpvOpMemberName: - case SpvOpSource: - case SpvOpSourceContinued: - case SpvOpSourceExtension: - case SpvOpString: - case SpvOpLine: - case SpvOpNoLine: + case spv::Op::OpName: + case spv::Op::OpMemberName: + case spv::Op::OpSource: + case spv::Op::OpSourceContinued: + case spv::Op::OpSourceExtension: + case spv::Op::OpString: + case spv::Op::OpLine: + case spv::Op::OpNoLine: + case spv::Op::OpModuleProcessed: return true; default: return false; } } -bool spvOpcodeIsCommutativeBinaryOperator(SpvOp opcode) { +bool spvOpcodeIsCommutativeBinaryOperator(spv::Op opcode) { switch (opcode) { - case SpvOpPtrEqual: - case SpvOpPtrNotEqual: - case SpvOpIAdd: - case SpvOpFAdd: - case SpvOpIMul: - case SpvOpFMul: - case SpvOpDot: - case SpvOpIAddCarry: - case SpvOpUMulExtended: - case SpvOpSMulExtended: - case SpvOpBitwiseOr: - case SpvOpBitwiseXor: - case SpvOpBitwiseAnd: - case SpvOpOrdered: - case SpvOpUnordered: - case SpvOpLogicalEqual: - case SpvOpLogicalNotEqual: - case SpvOpLogicalOr: - case SpvOpLogicalAnd: - case SpvOpIEqual: - case SpvOpINotEqual: - case SpvOpFOrdEqual: - case SpvOpFUnordEqual: - case SpvOpFOrdNotEqual: - case SpvOpFUnordNotEqual: + case spv::Op::OpPtrEqual: + case spv::Op::OpPtrNotEqual: + case spv::Op::OpIAdd: + case spv::Op::OpFAdd: + case spv::Op::OpIMul: + case spv::Op::OpFMul: + case spv::Op::OpDot: + case spv::Op::OpIAddCarry: + case spv::Op::OpUMulExtended: + case spv::Op::OpSMulExtended: + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseXor: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpOrdered: + case spv::Op::OpUnordered: + case spv::Op::OpLogicalEqual: + case spv::Op::OpLogicalNotEqual: + case spv::Op::OpLogicalOr: + case spv::Op::OpLogicalAnd: + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: + case spv::Op::OpFOrdEqual: + case spv::Op::OpFUnordEqual: + case spv::Op::OpFOrdNotEqual: + case spv::Op::OpFUnordNotEqual: return true; default: return false; } } -bool spvOpcodeIsLinearAlgebra(SpvOp opcode) { +bool spvOpcodeIsLinearAlgebra(spv::Op opcode) { switch (opcode) { - case SpvOpTranspose: - case SpvOpVectorTimesScalar: - case SpvOpMatrixTimesScalar: - case SpvOpVectorTimesMatrix: - case SpvOpMatrixTimesVector: - case SpvOpMatrixTimesMatrix: - case SpvOpOuterProduct: - case SpvOpDot: + case spv::Op::OpTranspose: + case spv::Op::OpVectorTimesScalar: + case spv::Op::OpMatrixTimesScalar: + case spv::Op::OpVectorTimesMatrix: + case spv::Op::OpMatrixTimesVector: + case spv::Op::OpMatrixTimesMatrix: + case spv::Op::OpOuterProduct: + case spv::Op::OpDot: return true; default: return false; } } -bool spvOpcodeIsImageSample(const SpvOp opcode) { +bool spvOpcodeIsImageSample(const spv::Op opcode) { switch (opcode) { - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: return true; default: return false; } } -std::vector spvOpcodeMemorySemanticsOperandIndices(SpvOp opcode) { +std::vector spvOpcodeMemorySemanticsOperandIndices(spv::Op opcode) { switch (opcode) { - case SpvOpMemoryBarrier: + case spv::Op::OpMemoryBarrier: return {1}; - case SpvOpAtomicStore: - case SpvOpControlBarrier: - case SpvOpAtomicFlagClear: - case SpvOpMemoryNamedBarrier: + case spv::Op::OpAtomicStore: + case spv::Op::OpControlBarrier: + case spv::Op::OpAtomicFlagClear: + case spv::Op::OpMemoryNamedBarrier: return {2}; - case SpvOpAtomicLoad: - case SpvOpAtomicExchange: - case SpvOpAtomicIIncrement: - case SpvOpAtomicIDecrement: - case SpvOpAtomicIAdd: - case SpvOpAtomicFAddEXT: - case SpvOpAtomicISub: - case SpvOpAtomicSMin: - case SpvOpAtomicUMin: - case SpvOpAtomicSMax: - case SpvOpAtomicUMax: - case SpvOpAtomicAnd: - case SpvOpAtomicOr: - case SpvOpAtomicXor: - case SpvOpAtomicFlagTestAndSet: + case spv::Op::OpAtomicLoad: + case spv::Op::OpAtomicExchange: + case spv::Op::OpAtomicIIncrement: + case spv::Op::OpAtomicIDecrement: + case spv::Op::OpAtomicIAdd: + case spv::Op::OpAtomicFAddEXT: + case spv::Op::OpAtomicISub: + case spv::Op::OpAtomicSMin: + case spv::Op::OpAtomicUMin: + case spv::Op::OpAtomicSMax: + case spv::Op::OpAtomicUMax: + case spv::Op::OpAtomicAnd: + case spv::Op::OpAtomicOr: + case spv::Op::OpAtomicXor: + case spv::Op::OpAtomicFlagTestAndSet: return {4}; - case SpvOpAtomicCompareExchange: - case SpvOpAtomicCompareExchangeWeak: + case spv::Op::OpAtomicCompareExchange: + case spv::Op::OpAtomicCompareExchangeWeak: return {4, 5}; default: return {}; } } -bool spvOpcodeIsAccessChain(SpvOp opcode) { +bool spvOpcodeIsAccessChain(spv::Op opcode) { switch (opcode) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: + case spv::Op::OpRawAccessChainNV: return true; default: return false; } } -bool spvOpcodeIsBit(SpvOp opcode) { +bool spvOpcodeIsBit(spv::Op opcode) { switch (opcode) { - case SpvOpShiftRightLogical: - case SpvOpShiftRightArithmetic: - case SpvOpShiftLeftLogical: - case SpvOpBitwiseOr: - case SpvOpBitwiseXor: - case SpvOpBitwiseAnd: - case SpvOpNot: - case SpvOpBitReverse: - case SpvOpBitCount: + case spv::Op::OpShiftRightLogical: + case spv::Op::OpShiftRightArithmetic: + case spv::Op::OpShiftLeftLogical: + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseXor: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpNot: + case spv::Op::OpBitReverse: + case spv::Op::OpBitCount: return true; default: return false; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.h index c8525a253..217aeb2b6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opcode.h @@ -29,7 +29,7 @@ const char* spvGeneratorStr(uint32_t generator); // Combines word_count and opcode enumerant in single word. -uint32_t spvOpcodeMake(uint16_t word_count, SpvOp opcode); +uint32_t spvOpcodeMake(uint16_t word_count, spv::Op opcode); // Splits word into into two constituent parts: word_count and opcode. void spvOpcodeSplit(const uint32_t word, uint16_t* word_count, @@ -45,117 +45,118 @@ spv_result_t spvOpcodeTableNameLookup(spv_target_env, // SPV_SUCCESS and writes a handle of the table entry into *entry. spv_result_t spvOpcodeTableValueLookup(spv_target_env, const spv_opcode_table table, - const SpvOp opcode, + const spv::Op opcode, spv_opcode_desc* entry); // Copies an instruction's word and fixes the endianness to host native. The // source instruction's stream/opcode/endianness is in the words/opcode/endian // parameter. The word_count parameter specifies the number of words to copy. // Writes copied instruction into *inst. -void spvInstructionCopy(const uint32_t* words, const SpvOp opcode, +void spvInstructionCopy(const uint32_t* words, const spv::Op opcode, const uint16_t word_count, const spv_endianness_t endian, spv_instruction_t* inst); // Determine if the given opcode is a scalar type. Returns zero if false, // non-zero otherwise. -int32_t spvOpcodeIsScalarType(const SpvOp opcode); +int32_t spvOpcodeIsScalarType(const spv::Op opcode); // Determines if the given opcode is a specialization constant. Returns zero if // false, non-zero otherwise. -int32_t spvOpcodeIsSpecConstant(const SpvOp opcode); +int32_t spvOpcodeIsSpecConstant(const spv::Op opcode); // Determines if the given opcode is a constant. Returns zero if false, non-zero // otherwise. -int32_t spvOpcodeIsConstant(const SpvOp opcode); +int32_t spvOpcodeIsConstant(const spv::Op opcode); // Returns true if the given opcode is a constant or undef. -bool spvOpcodeIsConstantOrUndef(const SpvOp opcode); +bool spvOpcodeIsConstantOrUndef(const spv::Op opcode); // Returns true if the given opcode is a scalar specialization constant. -bool spvOpcodeIsScalarSpecConstant(const SpvOp opcode); +bool spvOpcodeIsScalarSpecConstant(const spv::Op opcode); // Determines if the given opcode is a composite type. Returns zero if false, // non-zero otherwise. -int32_t spvOpcodeIsComposite(const SpvOp opcode); +int32_t spvOpcodeIsComposite(const spv::Op opcode); // Determines if the given opcode results in a pointer when using the logical // addressing model. Returns zero if false, non-zero otherwise. -int32_t spvOpcodeReturnsLogicalPointer(const SpvOp opcode); +int32_t spvOpcodeReturnsLogicalPointer(const spv::Op opcode); // Returns whether the given opcode could result in a pointer or a variable // pointer when using the logical addressing model. -bool spvOpcodeReturnsLogicalVariablePointer(const SpvOp opcode); +bool spvOpcodeReturnsLogicalVariablePointer(const spv::Op opcode); // Determines if the given opcode generates a type. Returns zero if false, // non-zero otherwise. -int32_t spvOpcodeGeneratesType(SpvOp opcode); +int32_t spvOpcodeGeneratesType(spv::Op opcode); // Returns true if the opcode adds a decoration to an id. -bool spvOpcodeIsDecoration(const SpvOp opcode); +bool spvOpcodeIsDecoration(const spv::Op opcode); // Returns true if the opcode is a load from memory into a result id. This // function only considers core instructions. -bool spvOpcodeIsLoad(const SpvOp opcode); +bool spvOpcodeIsLoad(const spv::Op opcode); // Returns true if the opcode is an atomic operation that uses the original // value. -bool spvOpcodeIsAtomicWithLoad(const SpvOp opcode); +bool spvOpcodeIsAtomicWithLoad(const spv::Op opcode); // Returns true if the opcode is an atomic operation. -bool spvOpcodeIsAtomicOp(const SpvOp opcode); +bool spvOpcodeIsAtomicOp(const spv::Op opcode); // Returns true if the given opcode is a branch instruction. -bool spvOpcodeIsBranch(SpvOp opcode); +bool spvOpcodeIsBranch(spv::Op opcode); // Returns true if the given opcode is a return instruction. -bool spvOpcodeIsReturn(SpvOp opcode); +bool spvOpcodeIsReturn(spv::Op opcode); -// Returns true if the given opcode aborts execution. -bool spvOpcodeIsAbort(SpvOp opcode); +// Returns true if the given opcode aborts execution. To abort means that after +// executing that instruction, no other instructions will be executed regardless +// of the context in which the instruction appears. Note that `OpUnreachable` +// is considered an abort even if its behaviour is undefined. +bool spvOpcodeIsAbort(spv::Op opcode); // Returns true if the given opcode is a return instruction or it aborts // execution. -bool spvOpcodeIsReturnOrAbort(SpvOp opcode); - -// Returns true if the given opcode is a kill instruction or it terminates -// execution. Note that branches, returns, and unreachables do not terminate -// execution. -bool spvOpcodeTerminatesExecution(SpvOp opcode); +bool spvOpcodeIsReturnOrAbort(spv::Op opcode); // Returns true if the given opcode is a basic block terminator. -bool spvOpcodeIsBlockTerminator(SpvOp opcode); +bool spvOpcodeIsBlockTerminator(spv::Op opcode); // Returns true if the given opcode always defines an opaque type. -bool spvOpcodeIsBaseOpaqueType(SpvOp opcode); +bool spvOpcodeIsBaseOpaqueType(spv::Op opcode); // Returns true if the given opcode is a non-uniform group operation. -bool spvOpcodeIsNonUniformGroupOperation(SpvOp opcode); +bool spvOpcodeIsNonUniformGroupOperation(spv::Op opcode); // Returns true if the opcode with vector inputs could be divided into a series // of independent scalar operations that would give the same result. -bool spvOpcodeIsScalarizable(SpvOp opcode); +bool spvOpcodeIsScalarizable(spv::Op opcode); // Returns true if the given opcode is a debug instruction. -bool spvOpcodeIsDebug(SpvOp opcode); +bool spvOpcodeIsDebug(spv::Op opcode); // Returns true for opcodes that are binary operators, // where the order of the operands is irrelevant. -bool spvOpcodeIsCommutativeBinaryOperator(SpvOp opcode); +bool spvOpcodeIsCommutativeBinaryOperator(spv::Op opcode); // Returns true for opcodes that represent linear algebra instructions. -bool spvOpcodeIsLinearAlgebra(SpvOp opcode); +bool spvOpcodeIsLinearAlgebra(spv::Op opcode); // Returns true for opcodes that represent image sample instructions. -bool spvOpcodeIsImageSample(SpvOp opcode); +bool spvOpcodeIsImageSample(spv::Op opcode); // Returns a vector containing the indices of the memory semantics // operands for |opcode|. -std::vector spvOpcodeMemorySemanticsOperandIndices(SpvOp opcode); +std::vector spvOpcodeMemorySemanticsOperandIndices(spv::Op opcode); // Returns true for opcodes that represent access chain instructions. -bool spvOpcodeIsAccessChain(SpvOp opcode); +bool spvOpcodeIsAccessChain(spv::Op opcode); // Returns true for opcodes that represent bit instructions. -bool spvOpcodeIsBit(SpvOp opcode); +bool spvOpcodeIsBit(spv::Op opcode); + +// Gets the name of an instruction, without the "Op" prefix. +const char* spvOpcodeString(const spv::Op opcode); #endif // SOURCE_OPCODE_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.cpp index 6d83e81e2..784884674 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.cpp @@ -26,7 +26,6 @@ #include "source/macro.h" #include "source/opcode.h" #include "source/spirv_constant.h" -#include "source/spirv_target_env.h" // For now, assume unified1 contains up to SPIR-V 1.3 and no later // SPIR-V version. @@ -48,7 +47,7 @@ spv_result_t spvOperandTableGet(spv_operand_table* pOperandTable, return SPV_SUCCESS; } -spv_result_t spvOperandTableNameLookup(spv_target_env env, +spv_result_t spvOperandTableNameLookup(spv_target_env, const spv_operand_table table, const spv_operand_type_t type, const char* name, @@ -57,24 +56,15 @@ spv_result_t spvOperandTableNameLookup(spv_target_env env, if (!table) return SPV_ERROR_INVALID_TABLE; if (!name || !pEntry) return SPV_ERROR_INVALID_POINTER; - const auto version = spvVersionForTargetEnv(env); for (uint64_t typeIndex = 0; typeIndex < table->count; ++typeIndex) { const auto& group = table->types[typeIndex]; if (type != group.type) continue; for (uint64_t index = 0; index < group.count; ++index) { const auto& entry = group.entries[index]; // We consider the current operand as available as long as - // 1. The target environment satisfies the minimal requirement of the - // operand; or - // 2. There is at least one extension enabling this operand; or - // 3. There is at least one capability enabling this operand. - // - // Note that the second rule assumes the extension enabling this operand - // is indeed requested in the SPIR-V code; checking that should be - // validator's work. - if (((version >= entry.minVersion && version <= entry.lastVersion) || - entry.numExtensions > 0u || entry.numCapabilities > 0u) && - nameLength == strlen(entry.name) && + // it is in the grammar. It might not be *valid* to use, + // but that should be checked by the validator, not by parsing. + if (nameLength == strlen(entry.name) && !strncmp(entry.name, name, nameLength)) { *pEntry = &entry; return SPV_SUCCESS; @@ -85,7 +75,7 @@ spv_result_t spvOperandTableNameLookup(spv_target_env env, return SPV_ERROR_INVALID_LOOKUP; } -spv_result_t spvOperandTableValueLookup(spv_target_env env, +spv_result_t spvOperandTableValueLookup(spv_target_env, const spv_operand_table table, const spv_operand_type_t type, const uint32_t value, @@ -106,33 +96,15 @@ spv_result_t spvOperandTableValueLookup(spv_target_env env, const auto beg = group.entries; const auto end = group.entries + group.count; - // We need to loop here because there can exist multiple symbols for the - // same operand value, and they can be introduced in different target - // environments, which means they can have different minimal version - // requirements. For example, SubgroupEqMaskKHR can exist in any SPIR-V - // version as long as the SPV_KHR_shader_ballot extension is there; but - // starting from SPIR-V 1.3, SubgroupEqMask, which has the same numeric - // value as SubgroupEqMaskKHR, is available in core SPIR-V without extension - // requirements. // Assumes the underlying table is already sorted ascendingly according to // opcode value. - const auto version = spvVersionForTargetEnv(env); - for (auto it = std::lower_bound(beg, end, needle, comp); - it != end && it->value == value; ++it) { - // We consider the current operand as available as long as - // 1. The target environment satisfies the minimal requirement of the - // operand; or - // 2. There is at least one extension enabling this operand; or - // 3. There is at least one capability enabling this operand. - // - // Note that the second rule assumes the extension enabling this operand - // is indeed requested in the SPIR-V code; checking that should be - // validator's work. - if ((version >= it->minVersion && version <= it->lastVersion) || - it->numExtensions > 0u || it->numCapabilities > 0u) { - *pEntry = it; - return SPV_SUCCESS; - } + auto it = std::lower_bound(beg, end, needle, comp); + if (it != end && it->value == value) { + // The current operand is considered available as long as + // it is in the grammar. It might not be *valid* to use, + // but that should be checked by the validator, not by parsing. + *pEntry = it; + return SPV_SUCCESS; } } @@ -151,6 +123,7 @@ const char* spvOperandTypeStr(spv_operand_type_t type) { case SPV_OPERAND_TYPE_LITERAL_INTEGER: case SPV_OPERAND_TYPE_OPTIONAL_LITERAL_INTEGER: case SPV_OPERAND_TYPE_OPTIONAL_LITERAL_NUMBER: + case SPV_OPERAND_TYPE_LITERAL_FLOAT: return "literal number"; case SPV_OPERAND_TYPE_OPTIONAL_TYPED_LITERAL_INTEGER: return "possibly multi-word literal integer"; @@ -232,6 +205,26 @@ const char* spvOperandTypeStr(spv_operand_type_t type) { case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT: case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT: return "packed vector format"; + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS: + case SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS: + return "cooperative matrix operands"; + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_LAYOUT: + return "cooperative matrix layout"; + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_USE: + return "cooperative matrix use"; + case SPV_OPERAND_TYPE_INITIALIZATION_MODE_QUALIFIER: + return "initialization mode qualifier"; + case SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER: + return "host access qualifier"; + case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL: + return "load cache control"; + case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL: + return "store cache control"; + case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: + return "named maximum number of registers"; + case SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS: + case SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS: + return "raw access chain operands"; case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_IMAGE: return "image"; @@ -321,6 +314,7 @@ bool spvOperandIsConcrete(spv_operand_type_t type) { } switch (type) { case SPV_OPERAND_TYPE_LITERAL_INTEGER: + case SPV_OPERAND_TYPE_LITERAL_FLOAT: case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: @@ -365,6 +359,13 @@ bool spvOperandIsConcrete(spv_operand_type_t type) { case SPV_OPERAND_TYPE_QUANTIZATION_MODES: case SPV_OPERAND_TYPE_OVERFLOW_MODES: case SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT: + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_LAYOUT: + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_USE: + case SPV_OPERAND_TYPE_INITIALIZATION_MODE_QUALIFIER: + case SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER: + case SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL: + case SPV_OPERAND_TYPE_STORE_CACHE_CONTROL: + case SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS: return true; default: break; @@ -383,6 +384,8 @@ bool spvOperandIsConcreteMask(spv_operand_type_t type) { case SPV_OPERAND_TYPE_FRAGMENT_SHADING_RATE: case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: + case SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS: + case SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS: return true; default: break; @@ -401,7 +404,9 @@ bool spvOperandIsOptional(spv_operand_type_t type) { case SPV_OPERAND_TYPE_OPTIONAL_LITERAL_STRING: case SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER: case SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT: + case SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS: case SPV_OPERAND_TYPE_OPTIONAL_CIV: + case SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS: return true; default: break; @@ -508,7 +513,7 @@ bool spvIsInIdType(spv_operand_type_t type) { } std::function spvOperandCanBeForwardDeclaredFunction( - SpvOp opcode) { + spv::Op opcode) { std::function out; if (spvOpcodeGeneratesType(opcode)) { // All types can use forward pointers. @@ -516,57 +521,57 @@ std::function spvOperandCanBeForwardDeclaredFunction( return out; } switch (opcode) { - case SpvOpExecutionMode: - case SpvOpExecutionModeId: - case SpvOpEntryPoint: - case SpvOpName: - case SpvOpMemberName: - case SpvOpSelectionMerge: - case SpvOpDecorate: - case SpvOpMemberDecorate: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorateStringGOOGLE: - case SpvOpBranch: - case SpvOpLoopMerge: + case spv::Op::OpExecutionMode: + case spv::Op::OpExecutionModeId: + case spv::Op::OpEntryPoint: + case spv::Op::OpName: + case spv::Op::OpMemberName: + case spv::Op::OpSelectionMerge: + case spv::Op::OpDecorate: + case spv::Op::OpMemberDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorateStringGOOGLE: + case spv::Op::OpBranch: + case spv::Op::OpLoopMerge: out = [](unsigned) { return true; }; break; - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: - case SpvOpBranchConditional: - case SpvOpSwitch: + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: out = [](unsigned index) { return index != 0; }; break; - case SpvOpFunctionCall: + case spv::Op::OpFunctionCall: // The Function parameter. out = [](unsigned index) { return index == 2; }; break; - case SpvOpPhi: + case spv::Op::OpPhi: out = [](unsigned index) { return index > 1; }; break; - case SpvOpEnqueueKernel: + case spv::Op::OpEnqueueKernel: // The Invoke parameter. out = [](unsigned index) { return index == 8; }; break; - case SpvOpGetKernelNDrangeSubGroupCount: - case SpvOpGetKernelNDrangeMaxSubGroupSize: + case spv::Op::OpGetKernelNDrangeSubGroupCount: + case spv::Op::OpGetKernelNDrangeMaxSubGroupSize: // The Invoke parameter. out = [](unsigned index) { return index == 3; }; break; - case SpvOpGetKernelWorkGroupSize: - case SpvOpGetKernelPreferredWorkGroupSizeMultiple: + case spv::Op::OpGetKernelWorkGroupSize: + case spv::Op::OpGetKernelPreferredWorkGroupSizeMultiple: // The Invoke parameter. out = [](unsigned index) { return index == 2; }; break; - case SpvOpTypeForwardPointer: + case spv::Op::OpTypeForwardPointer: out = [](unsigned index) { return index == 0; }; break; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: out = [](unsigned index) { return index == 1; }; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.h index 7c73c6f56..f74c93389 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.h @@ -57,12 +57,6 @@ spv_result_t spvOperandTableValueLookup(spv_target_env, // Gets the name string of the non-variable operand type. const char* spvOperandTypeStr(spv_operand_type_t type); -// Returns true if the given type is concrete. -bool spvOperandIsConcrete(spv_operand_type_t type); - -// Returns true if the given type is concrete and also a mask. -bool spvOperandIsConcreteMask(spv_operand_type_t type); - // Returns true if an operand of the given type is optional. bool spvOperandIsOptional(spv_operand_type_t type); @@ -139,7 +133,7 @@ bool spvIsInIdType(spv_operand_type_t type); // of the operand can be forward declared. This function will // used in the SSA validation stage of the pipeline std::function spvOperandCanBeForwardDeclaredFunction( - SpvOp opcode); + spv::Op opcode); // Takes the instruction key of a debug info extension instruction // and returns a function object that will return true if the index diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.kinds-unified1.inc b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.kinds-unified1.inc index 6d81293f6..ccfd69aae 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.kinds-unified1.inc +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/operand.kinds-unified1.inc @@ -1,167 +1,216 @@ -static const SpvCapability pygen_variable_caps_Addresses[] = {SpvCapabilityAddresses}; -static const SpvCapability pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL[] = {SpvCapabilityArbitraryPrecisionFixedPointINTEL}; -static const SpvCapability pygen_variable_caps_AsmINTEL[] = {SpvCapabilityAsmINTEL}; -static const SpvCapability pygen_variable_caps_AtomicStorage[] = {SpvCapabilityAtomicStorage}; -static const SpvCapability pygen_variable_caps_BindlessTextureNV[] = {SpvCapabilityBindlessTextureNV}; -static const SpvCapability pygen_variable_caps_ClipDistance[] = {SpvCapabilityClipDistance}; -static const SpvCapability pygen_variable_caps_ComputeDerivativeGroupLinearNV[] = {SpvCapabilityComputeDerivativeGroupLinearNV}; -static const SpvCapability pygen_variable_caps_ComputeDerivativeGroupQuadsNV[] = {SpvCapabilityComputeDerivativeGroupQuadsNV}; -static const SpvCapability pygen_variable_caps_CullDistance[] = {SpvCapabilityCullDistance}; -static const SpvCapability pygen_variable_caps_DenormFlushToZero[] = {SpvCapabilityDenormFlushToZero}; -static const SpvCapability pygen_variable_caps_DenormPreserve[] = {SpvCapabilityDenormPreserve}; -static const SpvCapability pygen_variable_caps_DeviceEnqueue[] = {SpvCapabilityDeviceEnqueue}; -static const SpvCapability pygen_variable_caps_DeviceGroup[] = {SpvCapabilityDeviceGroup}; -static const SpvCapability pygen_variable_caps_DrawParameters[] = {SpvCapabilityDrawParameters}; -static const SpvCapability pygen_variable_caps_DrawParametersMeshShadingNV[] = {SpvCapabilityDrawParameters, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_FPFastMathModeINTEL[] = {SpvCapabilityFPFastMathModeINTEL}; -static const SpvCapability pygen_variable_caps_FPGABufferLocationINTEL[] = {SpvCapabilityFPGABufferLocationINTEL}; -static const SpvCapability pygen_variable_caps_FPGAClusterAttributesINTEL[] = {SpvCapabilityFPGAClusterAttributesINTEL}; -static const SpvCapability pygen_variable_caps_FPGAKernelAttributesINTEL[] = {SpvCapabilityFPGAKernelAttributesINTEL}; -static const SpvCapability pygen_variable_caps_FPGALoopControlsINTEL[] = {SpvCapabilityFPGALoopControlsINTEL}; -static const SpvCapability pygen_variable_caps_FPGAMemoryAccessesINTEL[] = {SpvCapabilityFPGAMemoryAccessesINTEL}; -static const SpvCapability pygen_variable_caps_FPGAMemoryAttributesINTEL[] = {SpvCapabilityFPGAMemoryAttributesINTEL}; -static const SpvCapability pygen_variable_caps_FragmentBarycentricNVFragmentBarycentricKHR[] = {SpvCapabilityFragmentBarycentricNV, SpvCapabilityFragmentBarycentricKHR}; -static const SpvCapability pygen_variable_caps_FragmentDensityEXTShadingRateNV[] = {SpvCapabilityFragmentDensityEXT, SpvCapabilityShadingRateNV}; -static const SpvCapability pygen_variable_caps_FragmentFullyCoveredEXT[] = {SpvCapabilityFragmentFullyCoveredEXT}; -static const SpvCapability pygen_variable_caps_FragmentShaderPixelInterlockEXT[] = {SpvCapabilityFragmentShaderPixelInterlockEXT}; -static const SpvCapability pygen_variable_caps_FragmentShaderSampleInterlockEXT[] = {SpvCapabilityFragmentShaderSampleInterlockEXT}; -static const SpvCapability pygen_variable_caps_FragmentShaderShadingRateInterlockEXT[] = {SpvCapabilityFragmentShaderShadingRateInterlockEXT}; -static const SpvCapability pygen_variable_caps_FragmentShadingRateKHR[] = {SpvCapabilityFragmentShadingRateKHR}; -static const SpvCapability pygen_variable_caps_FunctionFloatControlINTEL[] = {SpvCapabilityFunctionFloatControlINTEL}; -static const SpvCapability pygen_variable_caps_FunctionPointersINTEL[] = {SpvCapabilityFunctionPointersINTEL}; -static const SpvCapability pygen_variable_caps_GenericPointer[] = {SpvCapabilityGenericPointer}; -static const SpvCapability pygen_variable_caps_Geometry[] = {SpvCapabilityGeometry}; -static const SpvCapability pygen_variable_caps_GeometryMeshShadingNV[] = {SpvCapabilityGeometry, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_GeometryShaderLayerShaderViewportIndexLayerEXTMeshShadingNV[] = {SpvCapabilityGeometry, SpvCapabilityShaderLayer, SpvCapabilityShaderViewportIndexLayerEXT, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_GeometryTessellation[] = {SpvCapabilityGeometry, SpvCapabilityTessellation}; -static const SpvCapability pygen_variable_caps_GeometryTessellationMeshShadingNV[] = {SpvCapabilityGeometry, SpvCapabilityTessellation, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_GeometryTessellationRayTracingNVRayTracingKHRMeshShadingNV[] = {SpvCapabilityGeometry, SpvCapabilityTessellation, SpvCapabilityRayTracingNV, SpvCapabilityRayTracingKHR, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_GeometryShaderPassthroughNV[] = {SpvCapabilityGeometryShaderPassthroughNV}; -static const SpvCapability pygen_variable_caps_GeometryStreams[] = {SpvCapabilityGeometryStreams}; -static const SpvCapability pygen_variable_caps_GroupNonUniform[] = {SpvCapabilityGroupNonUniform}; -static const SpvCapability pygen_variable_caps_GroupNonUniformClustered[] = {SpvCapabilityGroupNonUniformClustered}; -static const SpvCapability pygen_variable_caps_GroupNonUniformPartitionedNV[] = {SpvCapabilityGroupNonUniformPartitionedNV}; -static const SpvCapability pygen_variable_caps_IOPipesINTEL[] = {SpvCapabilityIOPipesINTEL}; -static const SpvCapability pygen_variable_caps_ImageBasic[] = {SpvCapabilityImageBasic}; -static const SpvCapability pygen_variable_caps_ImageBuffer[] = {SpvCapabilityImageBuffer}; -static const SpvCapability pygen_variable_caps_ImageBufferShaderNonUniform[] = {SpvCapabilityImageBuffer, SpvCapabilityShaderNonUniform}; -static const SpvCapability pygen_variable_caps_ImageGatherExtended[] = {SpvCapabilityImageGatherExtended}; -static const SpvCapability pygen_variable_caps_IndirectReferencesINTEL[] = {SpvCapabilityIndirectReferencesINTEL}; -static const SpvCapability pygen_variable_caps_InputAttachment[] = {SpvCapabilityInputAttachment}; -static const SpvCapability pygen_variable_caps_InputAttachmentShaderNonUniform[] = {SpvCapabilityInputAttachment, SpvCapabilityShaderNonUniform}; -static const SpvCapability pygen_variable_caps_Int64[] = {SpvCapabilityInt64}; -static const SpvCapability pygen_variable_caps_Int64ImageEXT[] = {SpvCapabilityInt64ImageEXT}; -static const SpvCapability pygen_variable_caps_Int8[] = {SpvCapabilityInt8}; -static const SpvCapability pygen_variable_caps_Kernel[] = {SpvCapabilityKernel}; -static const SpvCapability pygen_variable_caps_KernelGroupNonUniform[] = {SpvCapabilityKernel, SpvCapabilityGroupNonUniform}; -static const SpvCapability pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR[] = {SpvCapabilityKernel, SpvCapabilityGroupNonUniform, SpvCapabilitySubgroupBallotKHR}; -static const SpvCapability pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot[] = {SpvCapabilityKernel, SpvCapabilityGroupNonUniformArithmetic, SpvCapabilityGroupNonUniformBallot}; -static const SpvCapability pygen_variable_caps_KernelAttributesINTEL[] = {SpvCapabilityKernelAttributesINTEL}; -static const SpvCapability pygen_variable_caps_Linkage[] = {SpvCapabilityLinkage}; -static const SpvCapability pygen_variable_caps_LoopFuseINTEL[] = {SpvCapabilityLoopFuseINTEL}; -static const SpvCapability pygen_variable_caps_Matrix[] = {SpvCapabilityMatrix}; -static const SpvCapability pygen_variable_caps_MeshShadingNV[] = {SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_MinLod[] = {SpvCapabilityMinLod}; -static const SpvCapability pygen_variable_caps_MultiView[] = {SpvCapabilityMultiView}; -static const SpvCapability pygen_variable_caps_MultiViewport[] = {SpvCapabilityMultiViewport}; -static const SpvCapability pygen_variable_caps_MultiViewportShaderViewportIndexShaderViewportIndexLayerEXTMeshShadingNV[] = {SpvCapabilityMultiViewport, SpvCapabilityShaderViewportIndex, SpvCapabilityShaderViewportIndexLayerEXT, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_OptNoneINTEL[] = {SpvCapabilityOptNoneINTEL}; -static const SpvCapability pygen_variable_caps_PerViewAttributesNVMeshShadingNV[] = {SpvCapabilityPerViewAttributesNV, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_PhysicalStorageBufferAddresses[] = {SpvCapabilityPhysicalStorageBufferAddresses}; -static const SpvCapability pygen_variable_caps_Pipes[] = {SpvCapabilityPipes}; -static const SpvCapability pygen_variable_caps_RayQueryKHR[] = {SpvCapabilityRayQueryKHR}; -static const SpvCapability pygen_variable_caps_RayQueryKHRRayTracingKHR[] = {SpvCapabilityRayQueryKHR, SpvCapabilityRayTracingKHR}; -static const SpvCapability pygen_variable_caps_RayTracingKHR[] = {SpvCapabilityRayTracingKHR}; -static const SpvCapability pygen_variable_caps_RayTracingMotionBlurNV[] = {SpvCapabilityRayTracingMotionBlurNV}; -static const SpvCapability pygen_variable_caps_RayTracingNV[] = {SpvCapabilityRayTracingNV}; -static const SpvCapability pygen_variable_caps_RayTracingNVRayTracingKHR[] = {SpvCapabilityRayTracingNV, SpvCapabilityRayTracingKHR}; -static const SpvCapability pygen_variable_caps_RayTraversalPrimitiveCullingKHR[] = {SpvCapabilityRayTraversalPrimitiveCullingKHR}; -static const SpvCapability pygen_variable_caps_RoundToInfinityINTEL[] = {SpvCapabilityRoundToInfinityINTEL}; -static const SpvCapability pygen_variable_caps_RoundingModeRTE[] = {SpvCapabilityRoundingModeRTE}; -static const SpvCapability pygen_variable_caps_RoundingModeRTZ[] = {SpvCapabilityRoundingModeRTZ}; -static const SpvCapability pygen_variable_caps_SampleMaskOverrideCoverageNV[] = {SpvCapabilitySampleMaskOverrideCoverageNV}; -static const SpvCapability pygen_variable_caps_SampleMaskPostDepthCoverage[] = {SpvCapabilitySampleMaskPostDepthCoverage}; -static const SpvCapability pygen_variable_caps_SampleRateShading[] = {SpvCapabilitySampleRateShading}; -static const SpvCapability pygen_variable_caps_Sampled1D[] = {SpvCapabilitySampled1D}; -static const SpvCapability pygen_variable_caps_Sampled1DImage1D[] = {SpvCapabilitySampled1D, SpvCapabilityImage1D}; -static const SpvCapability pygen_variable_caps_SampledBuffer[] = {SpvCapabilitySampledBuffer}; -static const SpvCapability pygen_variable_caps_SampledBufferImageBuffer[] = {SpvCapabilitySampledBuffer, SpvCapabilityImageBuffer}; -static const SpvCapability pygen_variable_caps_SampledBufferShaderNonUniform[] = {SpvCapabilitySampledBuffer, SpvCapabilityShaderNonUniform}; -static const SpvCapability pygen_variable_caps_SampledCubeArray[] = {SpvCapabilitySampledCubeArray}; -static const SpvCapability pygen_variable_caps_SampledRect[] = {SpvCapabilitySampledRect}; -static const SpvCapability pygen_variable_caps_SampledRectImageRect[] = {SpvCapabilitySampledRect, SpvCapabilityImageRect}; -static const SpvCapability pygen_variable_caps_Shader[] = {SpvCapabilityShader}; -static const SpvCapability pygen_variable_caps_ShaderImageCubeArray[] = {SpvCapabilityShader, SpvCapabilityImageCubeArray}; -static const SpvCapability pygen_variable_caps_ShaderKernel[] = {SpvCapabilityShader, SpvCapabilityKernel}; -static const SpvCapability pygen_variable_caps_ShaderKernelImageMSArray[] = {SpvCapabilityShader, SpvCapabilityKernel, SpvCapabilityImageMSArray}; -static const SpvCapability pygen_variable_caps_ShaderUniformDecoration[] = {SpvCapabilityShader, SpvCapabilityUniformDecoration}; -static const SpvCapability pygen_variable_caps_ShaderVectorComputeINTEL[] = {SpvCapabilityShader, SpvCapabilityVectorComputeINTEL}; -static const SpvCapability pygen_variable_caps_ShaderNonUniform[] = {SpvCapabilityShaderNonUniform}; -static const SpvCapability pygen_variable_caps_ShaderSMBuiltinsNV[] = {SpvCapabilityShaderSMBuiltinsNV}; -static const SpvCapability pygen_variable_caps_ShaderStereoViewNV[] = {SpvCapabilityShaderStereoViewNV}; -static const SpvCapability pygen_variable_caps_ShaderViewportIndexLayerNV[] = {SpvCapabilityShaderViewportIndexLayerNV}; -static const SpvCapability pygen_variable_caps_ShaderViewportMaskNV[] = {SpvCapabilityShaderViewportMaskNV}; -static const SpvCapability pygen_variable_caps_ShaderViewportMaskNVMeshShadingNV[] = {SpvCapabilityShaderViewportMaskNV, SpvCapabilityMeshShadingNV}; -static const SpvCapability pygen_variable_caps_ShadingRateNVFragmentDensityEXT[] = {SpvCapabilityShadingRateNV, SpvCapabilityFragmentDensityEXT}; -static const SpvCapability pygen_variable_caps_SignedZeroInfNanPreserve[] = {SpvCapabilitySignedZeroInfNanPreserve}; -static const SpvCapability pygen_variable_caps_StencilExportEXT[] = {SpvCapabilityStencilExportEXT}; -static const SpvCapability pygen_variable_caps_StorageBuffer16BitAccessStorageUniformBufferBlock16[] = {SpvCapabilityStorageBuffer16BitAccess, SpvCapabilityStorageUniformBufferBlock16}; -static const SpvCapability pygen_variable_caps_StorageBuffer8BitAccess[] = {SpvCapabilityStorageBuffer8BitAccess}; -static const SpvCapability pygen_variable_caps_StorageImageExtendedFormats[] = {SpvCapabilityStorageImageExtendedFormats}; -static const SpvCapability pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot[] = {SpvCapabilitySubgroupBallotKHR, SpvCapabilityGroupNonUniformBallot}; -static const SpvCapability pygen_variable_caps_SubgroupDispatch[] = {SpvCapabilitySubgroupDispatch}; -static const SpvCapability pygen_variable_caps_Tessellation[] = {SpvCapabilityTessellation}; -static const SpvCapability pygen_variable_caps_TransformFeedback[] = {SpvCapabilityTransformFeedback}; -static const SpvCapability pygen_variable_caps_USMStorageClassesINTEL[] = {SpvCapabilityUSMStorageClassesINTEL}; -static const SpvCapability pygen_variable_caps_VariablePointersStorageBuffer[] = {SpvCapabilityVariablePointersStorageBuffer}; -static const SpvCapability pygen_variable_caps_VectorAnyINTEL[] = {SpvCapabilityVectorAnyINTEL}; -static const SpvCapability pygen_variable_caps_VectorComputeINTEL[] = {SpvCapabilityVectorComputeINTEL}; -static const SpvCapability pygen_variable_caps_VulkanMemoryModel[] = {SpvCapabilityVulkanMemoryModel}; -static const SpvCapability pygen_variable_caps_WorkgroupMemoryExplicitLayoutKHR[] = {SpvCapabilityWorkgroupMemoryExplicitLayoutKHR}; +static const spv::Capability pygen_variable_caps_Addresses[] = {spv::Capability::Addresses}; +static const spv::Capability pygen_variable_caps_ArbitraryPrecisionFixedPointINTEL[] = {spv::Capability::ArbitraryPrecisionFixedPointINTEL}; +static const spv::Capability pygen_variable_caps_AsmINTEL[] = {spv::Capability::AsmINTEL}; +static const spv::Capability pygen_variable_caps_AtomicStorage[] = {spv::Capability::AtomicStorage}; +static const spv::Capability pygen_variable_caps_BindlessTextureNV[] = {spv::Capability::BindlessTextureNV}; +static const spv::Capability pygen_variable_caps_CacheControlsINTEL[] = {spv::Capability::CacheControlsINTEL}; +static const spv::Capability pygen_variable_caps_ClipDistance[] = {spv::Capability::ClipDistance}; +static const spv::Capability pygen_variable_caps_ComputeDerivativeGroupLinearNV[] = {spv::Capability::ComputeDerivativeGroupLinearNV}; +static const spv::Capability pygen_variable_caps_ComputeDerivativeGroupQuadsNV[] = {spv::Capability::ComputeDerivativeGroupQuadsNV}; +static const spv::Capability pygen_variable_caps_CoreBuiltinsARM[] = {spv::Capability::CoreBuiltinsARM}; +static const spv::Capability pygen_variable_caps_CullDistance[] = {spv::Capability::CullDistance}; +static const spv::Capability pygen_variable_caps_DenormFlushToZero[] = {spv::Capability::DenormFlushToZero}; +static const spv::Capability pygen_variable_caps_DenormPreserve[] = {spv::Capability::DenormPreserve}; +static const spv::Capability pygen_variable_caps_DeviceEnqueue[] = {spv::Capability::DeviceEnqueue}; +static const spv::Capability pygen_variable_caps_DeviceGroup[] = {spv::Capability::DeviceGroup}; +static const spv::Capability pygen_variable_caps_DrawParameters[] = {spv::Capability::DrawParameters}; +static const spv::Capability pygen_variable_caps_DrawParametersMeshShadingNVMeshShadingEXT[] = {spv::Capability::DrawParameters, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_FPGAArgumentInterfacesINTEL[] = {spv::Capability::FPGAArgumentInterfacesINTEL}; +static const spv::Capability pygen_variable_caps_FPGABufferLocationINTEL[] = {spv::Capability::FPGABufferLocationINTEL}; +static const spv::Capability pygen_variable_caps_FPGAClusterAttributesINTEL[] = {spv::Capability::FPGAClusterAttributesINTEL}; +static const spv::Capability pygen_variable_caps_FPGAClusterAttributesV2INTEL[] = {spv::Capability::FPGAClusterAttributesV2INTEL}; +static const spv::Capability pygen_variable_caps_FPGADSPControlINTEL[] = {spv::Capability::FPGADSPControlINTEL}; +static const spv::Capability pygen_variable_caps_FPGAInvocationPipeliningAttributesINTEL[] = {spv::Capability::FPGAInvocationPipeliningAttributesINTEL}; +static const spv::Capability pygen_variable_caps_FPGAKernelAttributesINTEL[] = {spv::Capability::FPGAKernelAttributesINTEL}; +static const spv::Capability pygen_variable_caps_FPGAKernelAttributesv2INTEL[] = {spv::Capability::FPGAKernelAttributesv2INTEL}; +static const spv::Capability pygen_variable_caps_FPGALatencyControlINTEL[] = {spv::Capability::FPGALatencyControlINTEL}; +static const spv::Capability pygen_variable_caps_FPGALoopControlsINTEL[] = {spv::Capability::FPGALoopControlsINTEL}; +static const spv::Capability pygen_variable_caps_FPGAMemoryAccessesINTEL[] = {spv::Capability::FPGAMemoryAccessesINTEL}; +static const spv::Capability pygen_variable_caps_FPGAMemoryAttributesINTEL[] = {spv::Capability::FPGAMemoryAttributesINTEL}; +static const spv::Capability pygen_variable_caps_FPMaxErrorINTEL[] = {spv::Capability::FPMaxErrorINTEL}; +static const spv::Capability pygen_variable_caps_FloatControls2[] = {spv::Capability::FloatControls2}; +static const spv::Capability pygen_variable_caps_FloatControls2FPFastMathModeINTEL[] = {spv::Capability::FloatControls2, spv::Capability::FPFastMathModeINTEL}; +static const spv::Capability pygen_variable_caps_FragmentBarycentricNVFragmentBarycentricKHR[] = {spv::Capability::FragmentBarycentricNV, spv::Capability::FragmentBarycentricKHR}; +static const spv::Capability pygen_variable_caps_FragmentDensityEXTShadingRateNV[] = {spv::Capability::FragmentDensityEXT, spv::Capability::ShadingRateNV}; +static const spv::Capability pygen_variable_caps_FragmentFullyCoveredEXT[] = {spv::Capability::FragmentFullyCoveredEXT}; +static const spv::Capability pygen_variable_caps_FragmentShaderPixelInterlockEXT[] = {spv::Capability::FragmentShaderPixelInterlockEXT}; +static const spv::Capability pygen_variable_caps_FragmentShaderSampleInterlockEXT[] = {spv::Capability::FragmentShaderSampleInterlockEXT}; +static const spv::Capability pygen_variable_caps_FragmentShaderShadingRateInterlockEXT[] = {spv::Capability::FragmentShaderShadingRateInterlockEXT}; +static const spv::Capability pygen_variable_caps_FragmentShadingRateKHR[] = {spv::Capability::FragmentShadingRateKHR}; +static const spv::Capability pygen_variable_caps_FunctionFloatControlINTEL[] = {spv::Capability::FunctionFloatControlINTEL}; +static const spv::Capability pygen_variable_caps_FunctionPointersINTEL[] = {spv::Capability::FunctionPointersINTEL}; +static const spv::Capability pygen_variable_caps_GenericPointer[] = {spv::Capability::GenericPointer}; +static const spv::Capability pygen_variable_caps_Geometry[] = {spv::Capability::Geometry}; +static const spv::Capability pygen_variable_caps_GeometryMeshShadingNVMeshShadingEXT[] = {spv::Capability::Geometry, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_GeometryShaderLayerShaderViewportIndexLayerEXTMeshShadingNVMeshShadingEXT[] = {spv::Capability::Geometry, spv::Capability::ShaderLayer, spv::Capability::ShaderViewportIndexLayerEXT, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_GeometryTessellation[] = {spv::Capability::Geometry, spv::Capability::Tessellation}; +static const spv::Capability pygen_variable_caps_GeometryTessellationMeshShadingNVMeshShadingEXT[] = {spv::Capability::Geometry, spv::Capability::Tessellation, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_GeometryTessellationRayTracingNVRayTracingKHRMeshShadingNVMeshShadingEXT[] = {spv::Capability::Geometry, spv::Capability::Tessellation, spv::Capability::RayTracingNV, spv::Capability::RayTracingKHR, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_GeometryShaderPassthroughNV[] = {spv::Capability::GeometryShaderPassthroughNV}; +static const spv::Capability pygen_variable_caps_GeometryStreams[] = {spv::Capability::GeometryStreams}; +static const spv::Capability pygen_variable_caps_GlobalVariableFPGADecorationsINTEL[] = {spv::Capability::GlobalVariableFPGADecorationsINTEL}; +static const spv::Capability pygen_variable_caps_GlobalVariableHostAccessINTEL[] = {spv::Capability::GlobalVariableHostAccessINTEL}; +static const spv::Capability pygen_variable_caps_GroupNonUniform[] = {spv::Capability::GroupNonUniform}; +static const spv::Capability pygen_variable_caps_GroupNonUniformClustered[] = {spv::Capability::GroupNonUniformClustered}; +static const spv::Capability pygen_variable_caps_GroupNonUniformPartitionedNV[] = {spv::Capability::GroupNonUniformPartitionedNV}; +static const spv::Capability pygen_variable_caps_IOPipesINTEL[] = {spv::Capability::IOPipesINTEL}; +static const spv::Capability pygen_variable_caps_ImageBasic[] = {spv::Capability::ImageBasic}; +static const spv::Capability pygen_variable_caps_ImageBuffer[] = {spv::Capability::ImageBuffer}; +static const spv::Capability pygen_variable_caps_ImageBufferShaderNonUniform[] = {spv::Capability::ImageBuffer, spv::Capability::ShaderNonUniform}; +static const spv::Capability pygen_variable_caps_ImageGatherExtended[] = {spv::Capability::ImageGatherExtended}; +static const spv::Capability pygen_variable_caps_IndirectReferencesINTEL[] = {spv::Capability::IndirectReferencesINTEL}; +static const spv::Capability pygen_variable_caps_InputAttachment[] = {spv::Capability::InputAttachment}; +static const spv::Capability pygen_variable_caps_InputAttachmentShaderNonUniform[] = {spv::Capability::InputAttachment, spv::Capability::ShaderNonUniform}; +static const spv::Capability pygen_variable_caps_Int64[] = {spv::Capability::Int64}; +static const spv::Capability pygen_variable_caps_Int64ImageEXT[] = {spv::Capability::Int64ImageEXT}; +static const spv::Capability pygen_variable_caps_Int8[] = {spv::Capability::Int8}; +static const spv::Capability pygen_variable_caps_Kernel[] = {spv::Capability::Kernel}; +static const spv::Capability pygen_variable_caps_KernelFloatControls2[] = {spv::Capability::Kernel, spv::Capability::FloatControls2}; +static const spv::Capability pygen_variable_caps_KernelGroupNonUniform[] = {spv::Capability::Kernel, spv::Capability::GroupNonUniform}; +static const spv::Capability pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR[] = {spv::Capability::Kernel, spv::Capability::GroupNonUniform, spv::Capability::SubgroupBallotKHR}; +static const spv::Capability pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot[] = {spv::Capability::Kernel, spv::Capability::GroupNonUniformArithmetic, spv::Capability::GroupNonUniformBallot}; +static const spv::Capability pygen_variable_caps_KernelAttributesINTEL[] = {spv::Capability::KernelAttributesINTEL}; +static const spv::Capability pygen_variable_caps_Linkage[] = {spv::Capability::Linkage}; +static const spv::Capability pygen_variable_caps_LoopFuseINTEL[] = {spv::Capability::LoopFuseINTEL}; +static const spv::Capability pygen_variable_caps_Matrix[] = {spv::Capability::Matrix}; +static const spv::Capability pygen_variable_caps_MemoryAccessAliasingINTEL[] = {spv::Capability::MemoryAccessAliasingINTEL}; +static const spv::Capability pygen_variable_caps_MeshShadingEXT[] = {spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_MeshShadingNV[] = {spv::Capability::MeshShadingNV}; +static const spv::Capability pygen_variable_caps_MeshShadingNVMeshShadingEXT[] = {spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_MinLod[] = {spv::Capability::MinLod}; +static const spv::Capability pygen_variable_caps_MultiView[] = {spv::Capability::MultiView}; +static const spv::Capability pygen_variable_caps_MultiViewport[] = {spv::Capability::MultiViewport}; +static const spv::Capability pygen_variable_caps_MultiViewportShaderViewportIndexShaderViewportIndexLayerEXTMeshShadingNVMeshShadingEXT[] = {spv::Capability::MultiViewport, spv::Capability::ShaderViewportIndex, spv::Capability::ShaderViewportIndexLayerEXT, spv::Capability::MeshShadingNV, spv::Capability::MeshShadingEXT}; +static const spv::Capability pygen_variable_caps_OptNoneINTEL[] = {spv::Capability::OptNoneINTEL}; +static const spv::Capability pygen_variable_caps_PerViewAttributesNVMeshShadingNV[] = {spv::Capability::PerViewAttributesNV, spv::Capability::MeshShadingNV}; +static const spv::Capability pygen_variable_caps_PhysicalStorageBufferAddresses[] = {spv::Capability::PhysicalStorageBufferAddresses}; +static const spv::Capability pygen_variable_caps_Pipes[] = {spv::Capability::Pipes}; +static const spv::Capability pygen_variable_caps_QuadControlKHR[] = {spv::Capability::QuadControlKHR}; +static const spv::Capability pygen_variable_caps_RawAccessChainsNV[] = {spv::Capability::RawAccessChainsNV}; +static const spv::Capability pygen_variable_caps_RayCullMaskKHR[] = {spv::Capability::RayCullMaskKHR}; +static const spv::Capability pygen_variable_caps_RayQueryKHR[] = {spv::Capability::RayQueryKHR}; +static const spv::Capability pygen_variable_caps_RayQueryKHRRayTracingKHR[] = {spv::Capability::RayQueryKHR, spv::Capability::RayTracingKHR}; +static const spv::Capability pygen_variable_caps_RayTracingDisplacementMicromapNV[] = {spv::Capability::RayTracingDisplacementMicromapNV}; +static const spv::Capability pygen_variable_caps_RayTracingKHR[] = {spv::Capability::RayTracingKHR}; +static const spv::Capability pygen_variable_caps_RayTracingMotionBlurNV[] = {spv::Capability::RayTracingMotionBlurNV}; +static const spv::Capability pygen_variable_caps_RayTracingNV[] = {spv::Capability::RayTracingNV}; +static const spv::Capability pygen_variable_caps_RayTracingNVRayTracingKHR[] = {spv::Capability::RayTracingNV, spv::Capability::RayTracingKHR}; +static const spv::Capability pygen_variable_caps_RayTracingOpacityMicromapEXT[] = {spv::Capability::RayTracingOpacityMicromapEXT}; +static const spv::Capability pygen_variable_caps_RayTracingPositionFetchKHR[] = {spv::Capability::RayTracingPositionFetchKHR}; +static const spv::Capability pygen_variable_caps_RayTraversalPrimitiveCullingKHR[] = {spv::Capability::RayTraversalPrimitiveCullingKHR}; +static const spv::Capability pygen_variable_caps_RegisterLimitsINTEL[] = {spv::Capability::RegisterLimitsINTEL}; +static const spv::Capability pygen_variable_caps_RoundToInfinityINTEL[] = {spv::Capability::RoundToInfinityINTEL}; +static const spv::Capability pygen_variable_caps_RoundingModeRTE[] = {spv::Capability::RoundingModeRTE}; +static const spv::Capability pygen_variable_caps_RoundingModeRTZ[] = {spv::Capability::RoundingModeRTZ}; +static const spv::Capability pygen_variable_caps_RuntimeAlignedAttributeINTEL[] = {spv::Capability::RuntimeAlignedAttributeINTEL}; +static const spv::Capability pygen_variable_caps_SampleMaskOverrideCoverageNV[] = {spv::Capability::SampleMaskOverrideCoverageNV}; +static const spv::Capability pygen_variable_caps_SampleMaskPostDepthCoverage[] = {spv::Capability::SampleMaskPostDepthCoverage}; +static const spv::Capability pygen_variable_caps_SampleRateShading[] = {spv::Capability::SampleRateShading}; +static const spv::Capability pygen_variable_caps_Sampled1D[] = {spv::Capability::Sampled1D}; +static const spv::Capability pygen_variable_caps_SampledBuffer[] = {spv::Capability::SampledBuffer}; +static const spv::Capability pygen_variable_caps_SampledBufferShaderNonUniform[] = {spv::Capability::SampledBuffer, spv::Capability::ShaderNonUniform}; +static const spv::Capability pygen_variable_caps_SampledCubeArray[] = {spv::Capability::SampledCubeArray}; +static const spv::Capability pygen_variable_caps_SampledRect[] = {spv::Capability::SampledRect}; +static const spv::Capability pygen_variable_caps_Shader[] = {spv::Capability::Shader}; +static const spv::Capability pygen_variable_caps_ShaderKernel[] = {spv::Capability::Shader, spv::Capability::Kernel}; +static const spv::Capability pygen_variable_caps_ShaderUniformDecoration[] = {spv::Capability::Shader, spv::Capability::UniformDecoration}; +static const spv::Capability pygen_variable_caps_ShaderVectorComputeINTEL[] = {spv::Capability::Shader, spv::Capability::VectorComputeINTEL}; +static const spv::Capability pygen_variable_caps_ShaderEnqueueAMDX[] = {spv::Capability::ShaderEnqueueAMDX}; +static const spv::Capability pygen_variable_caps_ShaderInvocationReorderNV[] = {spv::Capability::ShaderInvocationReorderNV}; +static const spv::Capability pygen_variable_caps_ShaderNonUniform[] = {spv::Capability::ShaderNonUniform}; +static const spv::Capability pygen_variable_caps_ShaderSMBuiltinsNV[] = {spv::Capability::ShaderSMBuiltinsNV}; +static const spv::Capability pygen_variable_caps_ShaderStereoViewNV[] = {spv::Capability::ShaderStereoViewNV}; +static const spv::Capability pygen_variable_caps_ShaderViewportIndexLayerNV[] = {spv::Capability::ShaderViewportIndexLayerNV}; +static const spv::Capability pygen_variable_caps_ShaderViewportMaskNV[] = {spv::Capability::ShaderViewportMaskNV}; +static const spv::Capability pygen_variable_caps_ShaderViewportMaskNVMeshShadingNV[] = {spv::Capability::ShaderViewportMaskNV, spv::Capability::MeshShadingNV}; +static const spv::Capability pygen_variable_caps_ShadingRateNVFragmentDensityEXT[] = {spv::Capability::ShadingRateNV, spv::Capability::FragmentDensityEXT}; +static const spv::Capability pygen_variable_caps_SignedZeroInfNanPreserve[] = {spv::Capability::SignedZeroInfNanPreserve}; +static const spv::Capability pygen_variable_caps_StencilExportEXT[] = {spv::Capability::StencilExportEXT}; +static const spv::Capability pygen_variable_caps_StorageBuffer16BitAccessStorageUniformBufferBlock16[] = {spv::Capability::StorageBuffer16BitAccess, spv::Capability::StorageUniformBufferBlock16}; +static const spv::Capability pygen_variable_caps_StorageBuffer8BitAccess[] = {spv::Capability::StorageBuffer8BitAccess}; +static const spv::Capability pygen_variable_caps_StorageImageExtendedFormats[] = {spv::Capability::StorageImageExtendedFormats}; +static const spv::Capability pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot[] = {spv::Capability::SubgroupBallotKHR, spv::Capability::GroupNonUniformBallot}; +static const spv::Capability pygen_variable_caps_SubgroupDispatch[] = {spv::Capability::SubgroupDispatch}; +static const spv::Capability pygen_variable_caps_Tessellation[] = {spv::Capability::Tessellation}; +static const spv::Capability pygen_variable_caps_TileImageColorReadAccessEXT[] = {spv::Capability::TileImageColorReadAccessEXT}; +static const spv::Capability pygen_variable_caps_TileImageDepthReadAccessEXT[] = {spv::Capability::TileImageDepthReadAccessEXT}; +static const spv::Capability pygen_variable_caps_TileImageStencilReadAccessEXT[] = {spv::Capability::TileImageStencilReadAccessEXT}; +static const spv::Capability pygen_variable_caps_TransformFeedback[] = {spv::Capability::TransformFeedback}; +static const spv::Capability pygen_variable_caps_USMStorageClassesINTEL[] = {spv::Capability::USMStorageClassesINTEL}; +static const spv::Capability pygen_variable_caps_VariablePointersStorageBuffer[] = {spv::Capability::VariablePointersStorageBuffer}; +static const spv::Capability pygen_variable_caps_VectorAnyINTEL[] = {spv::Capability::VectorAnyINTEL}; +static const spv::Capability pygen_variable_caps_VectorComputeINTEL[] = {spv::Capability::VectorComputeINTEL}; +static const spv::Capability pygen_variable_caps_VulkanMemoryModel[] = {spv::Capability::VulkanMemoryModel}; +static const spv::Capability pygen_variable_caps_WorkgroupMemoryExplicitLayoutKHR[] = {spv::Capability::WorkgroupMemoryExplicitLayoutKHR}; +static const spvtools::Extension pygen_variable_exts_SPV_AMDX_shader_enqueue[] = {spvtools::Extension::kSPV_AMDX_shader_enqueue}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_gpu_shader_half_float_fetch[] = {spvtools::Extension::kSPV_AMD_gpu_shader_half_float_fetch}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_ballot[] = {spvtools::Extension::kSPV_AMD_shader_ballot}; +static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_tests[] = {spvtools::Extension::kSPV_AMD_shader_early_and_late_fragment_tests}; +static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export[] = {spvtools::Extension::kSPV_AMD_shader_early_and_late_fragment_tests, spvtools::Extension::kSPV_EXT_shader_stencil_export}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_explicit_vertex_parameter[] = {spvtools::Extension::kSPV_AMD_shader_explicit_vertex_parameter}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_fragment_mask[] = {spvtools::Extension::kSPV_AMD_shader_fragment_mask}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_shader_image_load_store_lod[] = {spvtools::Extension::kSPV_AMD_shader_image_load_store_lod}; static const spvtools::Extension pygen_variable_exts_SPV_AMD_texture_gather_bias_lod[] = {spvtools::Extension::kSPV_AMD_texture_gather_bias_lod}; +static const spvtools::Extension pygen_variable_exts_SPV_ARM_cooperative_matrix_layouts[] = {spvtools::Extension::kSPV_ARM_cooperative_matrix_layouts}; +static const spvtools::Extension pygen_variable_exts_SPV_ARM_core_builtins[] = {spvtools::Extension::kSPV_ARM_core_builtins}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_demote_to_helper_invocation[] = {spvtools::Extension::kSPV_EXT_demote_to_helper_invocation}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_descriptor_indexing[] = {spvtools::Extension::kSPV_EXT_descriptor_indexing}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_fragment_fully_covered[] = {spvtools::Extension::kSPV_EXT_fragment_fully_covered}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_fragment_invocation_densitySPV_NV_shading_rate[] = {spvtools::Extension::kSPV_EXT_fragment_invocation_density, spvtools::Extension::kSPV_NV_shading_rate}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_fragment_shader_interlock[] = {spvtools::Extension::kSPV_EXT_fragment_shader_interlock}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_mesh_shader[] = {spvtools::Extension::kSPV_EXT_mesh_shader}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_mesh_shaderSPV_KHR_shader_draw_parametersSPV_NV_mesh_shader[] = {spvtools::Extension::kSPV_EXT_mesh_shader, spvtools::Extension::kSPV_KHR_shader_draw_parameters, spvtools::Extension::kSPV_NV_mesh_shader}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader[] = {spvtools::Extension::kSPV_EXT_mesh_shader, spvtools::Extension::kSPV_NV_mesh_shader}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_opacity_micromap[] = {spvtools::Extension::kSPV_EXT_opacity_micromap}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer[] = {spvtools::Extension::kSPV_EXT_physical_storage_buffer, spvtools::Extension::kSPV_KHR_physical_storage_buffer}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_replicated_composites[] = {spvtools::Extension::kSPV_EXT_replicated_composites}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_atomic_float16_add[] = {spvtools::Extension::kSPV_EXT_shader_atomic_float16_add}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_atomic_float_add[] = {spvtools::Extension::kSPV_EXT_shader_atomic_float_add}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_atomic_float_min_max[] = {spvtools::Extension::kSPV_EXT_shader_atomic_float_min_max}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_image_int64[] = {spvtools::Extension::kSPV_EXT_shader_image_int64}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_stencil_export[] = {spvtools::Extension::kSPV_EXT_shader_stencil_export}; +static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_tile_image[] = {spvtools::Extension::kSPV_EXT_shader_tile_image}; static const spvtools::Extension pygen_variable_exts_SPV_EXT_shader_viewport_index_layerSPV_NV_viewport_array2[] = {spvtools::Extension::kSPV_EXT_shader_viewport_index_layer, spvtools::Extension::kSPV_NV_viewport_array2}; static const spvtools::Extension pygen_variable_exts_SPV_GOOGLE_hlsl_functionality1[] = {spvtools::Extension::kSPV_GOOGLE_hlsl_functionality1}; static const spvtools::Extension pygen_variable_exts_SPV_GOOGLE_user_type[] = {spvtools::Extension::kSPV_GOOGLE_user_type}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_arbitrary_precision_fixed_point[] = {spvtools::Extension::kSPV_INTEL_arbitrary_precision_fixed_point}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_arbitrary_precision_floating_point[] = {spvtools::Extension::kSPV_INTEL_arbitrary_precision_floating_point}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_arbitrary_precision_integers[] = {spvtools::Extension::kSPV_INTEL_arbitrary_precision_integers}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_bfloat16_conversion[] = {spvtools::Extension::kSPV_INTEL_bfloat16_conversion}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_blocking_pipes[] = {spvtools::Extension::kSPV_INTEL_blocking_pipes}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_cache_controls[] = {spvtools::Extension::kSPV_INTEL_cache_controls}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_debug_module[] = {spvtools::Extension::kSPV_INTEL_debug_module}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_device_side_avc_motion_estimation[] = {spvtools::Extension::kSPV_INTEL_device_side_avc_motion_estimation}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_float_controls2[] = {spvtools::Extension::kSPV_INTEL_float_controls2}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fp_fast_math_mode[] = {spvtools::Extension::kSPV_INTEL_fp_fast_math_mode}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fp_max_error[] = {spvtools::Extension::kSPV_INTEL_fp_max_error}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_argument_interfaces[] = {spvtools::Extension::kSPV_INTEL_fpga_argument_interfaces}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_buffer_location[] = {spvtools::Extension::kSPV_INTEL_fpga_buffer_location}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_cluster_attributes[] = {spvtools::Extension::kSPV_INTEL_fpga_cluster_attributes}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_dsp_control[] = {spvtools::Extension::kSPV_INTEL_fpga_dsp_control}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_invocation_pipelining_attributes[] = {spvtools::Extension::kSPV_INTEL_fpga_invocation_pipelining_attributes}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_latency_control[] = {spvtools::Extension::kSPV_INTEL_fpga_latency_control}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_loop_controls[] = {spvtools::Extension::kSPV_INTEL_fpga_loop_controls}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_memory_accesses[] = {spvtools::Extension::kSPV_INTEL_fpga_memory_accesses}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_memory_attributes[] = {spvtools::Extension::kSPV_INTEL_fpga_memory_attributes}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_fpga_reg[] = {spvtools::Extension::kSPV_INTEL_fpga_reg}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_function_pointers[] = {spvtools::Extension::kSPV_INTEL_function_pointers}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_global_variable_fpga_decorations[] = {spvtools::Extension::kSPV_INTEL_global_variable_fpga_decorations}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_global_variable_host_access[] = {spvtools::Extension::kSPV_INTEL_global_variable_host_access}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_inline_assembly[] = {spvtools::Extension::kSPV_INTEL_inline_assembly}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_io_pipes[] = {spvtools::Extension::kSPV_INTEL_io_pipes}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_kernel_attributes[] = {spvtools::Extension::kSPV_INTEL_kernel_attributes}; -static const spvtools::Extension pygen_variable_exts_SPV_INTEL_long_constant_composite[] = {spvtools::Extension::kSPV_INTEL_long_constant_composite}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_long_composites[] = {spvtools::Extension::kSPV_INTEL_long_composites}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_loop_fuse[] = {spvtools::Extension::kSPV_INTEL_loop_fuse}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_masked_gather_scatter[] = {spvtools::Extension::kSPV_INTEL_masked_gather_scatter}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_maximum_registers[] = {spvtools::Extension::kSPV_INTEL_maximum_registers}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_media_block_io[] = {spvtools::Extension::kSPV_INTEL_media_block_io}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_memory_access_aliasing[] = {spvtools::Extension::kSPV_INTEL_memory_access_aliasing}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_optnone[] = {spvtools::Extension::kSPV_INTEL_optnone}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_runtime_aligned[] = {spvtools::Extension::kSPV_INTEL_runtime_aligned}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_shader_integer_functions2[] = {spvtools::Extension::kSPV_INTEL_shader_integer_functions2}; +static const spvtools::Extension pygen_variable_exts_SPV_INTEL_split_barrier[] = {spvtools::Extension::kSPV_INTEL_split_barrier}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_subgroups[] = {spvtools::Extension::kSPV_INTEL_subgroups}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_unstructured_loop_controls[] = {spvtools::Extension::kSPV_INTEL_unstructured_loop_controls}; static const spvtools::Extension pygen_variable_exts_SPV_INTEL_usm_storage_classes[] = {spvtools::Extension::kSPV_INTEL_usm_storage_classes}; @@ -170,28 +219,35 @@ static const spvtools::Extension pygen_variable_exts_SPV_INTEL_vector_compute[] static const spvtools::Extension pygen_variable_exts_SPV_KHR_16bit_storage[] = {spvtools::Extension::kSPV_KHR_16bit_storage}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_8bit_storage[] = {spvtools::Extension::kSPV_KHR_8bit_storage}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_bit_instructions[] = {spvtools::Extension::kSPV_KHR_bit_instructions}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_cooperative_matrix[] = {spvtools::Extension::kSPV_KHR_cooperative_matrix}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_device_group[] = {spvtools::Extension::kSPV_KHR_device_group}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_expect_assume[] = {spvtools::Extension::kSPV_KHR_expect_assume}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_float_controls[] = {spvtools::Extension::kSPV_KHR_float_controls}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_float_controls2[] = {spvtools::Extension::kSPV_KHR_float_controls2}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_fragment_shader_barycentricSPV_NV_fragment_shader_barycentric[] = {spvtools::Extension::kSPV_KHR_fragment_shader_barycentric, spvtools::Extension::kSPV_NV_fragment_shader_barycentric}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_fragment_shading_rate[] = {spvtools::Extension::kSPV_KHR_fragment_shading_rate}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_integer_dot_product[] = {spvtools::Extension::kSPV_KHR_integer_dot_product}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_linkonce_odr[] = {spvtools::Extension::kSPV_KHR_linkonce_odr}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_maximal_reconvergence[] = {spvtools::Extension::kSPV_KHR_maximal_reconvergence}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_multiview[] = {spvtools::Extension::kSPV_KHR_multiview}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_no_integer_wrap_decoration[] = {spvtools::Extension::kSPV_KHR_no_integer_wrap_decoration}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_post_depth_coverage[] = {spvtools::Extension::kSPV_KHR_post_depth_coverage}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_quad_control[] = {spvtools::Extension::kSPV_KHR_quad_control}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_cull_mask[] = {spvtools::Extension::kSPV_KHR_ray_cull_mask}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_query[] = {spvtools::Extension::kSPV_KHR_ray_query}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_querySPV_KHR_ray_tracing[] = {spvtools::Extension::kSPV_KHR_ray_query, spvtools::Extension::kSPV_KHR_ray_tracing}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_tracing[] = {spvtools::Extension::kSPV_KHR_ray_tracing}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing[] = {spvtools::Extension::kSPV_KHR_ray_tracing, spvtools::Extension::kSPV_NV_ray_tracing}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_ray_tracing_position_fetch[] = {spvtools::Extension::kSPV_KHR_ray_tracing_position_fetch}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_atomic_counter_ops[] = {spvtools::Extension::kSPV_KHR_shader_atomic_counter_ops}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_ballot[] = {spvtools::Extension::kSPV_KHR_shader_ballot}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_clock[] = {spvtools::Extension::kSPV_KHR_shader_clock}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_draw_parameters[] = {spvtools::Extension::kSPV_KHR_shader_draw_parameters}; -static const spvtools::Extension pygen_variable_exts_SPV_KHR_shader_draw_parametersSPV_NV_mesh_shader[] = {spvtools::Extension::kSPV_KHR_shader_draw_parameters, spvtools::Extension::kSPV_NV_mesh_shader}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_storage_buffer_storage_classSPV_KHR_variable_pointers[] = {spvtools::Extension::kSPV_KHR_storage_buffer_storage_class, spvtools::Extension::kSPV_KHR_variable_pointers}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_subgroup_rotate[] = {spvtools::Extension::kSPV_KHR_subgroup_rotate}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_subgroup_uniform_control_flow[] = {spvtools::Extension::kSPV_KHR_subgroup_uniform_control_flow}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_subgroup_vote[] = {spvtools::Extension::kSPV_KHR_subgroup_vote}; +static const spvtools::Extension pygen_variable_exts_SPV_KHR_uniform_group_instructions[] = {spvtools::Extension::kSPV_KHR_uniform_group_instructions}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_variable_pointers[] = {spvtools::Extension::kSPV_KHR_variable_pointers}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_vulkan_memory_model[] = {spvtools::Extension::kSPV_KHR_vulkan_memory_model}; static const spvtools::Extension pygen_variable_exts_SPV_KHR_workgroup_memory_explicit_layout[] = {spvtools::Extension::kSPV_KHR_workgroup_memory_explicit_layout}; @@ -200,28 +256,34 @@ static const spvtools::Extension pygen_variable_exts_SPV_NVX_multiview_per_view_ static const spvtools::Extension pygen_variable_exts_SPV_NV_bindless_texture[] = {spvtools::Extension::kSPV_NV_bindless_texture}; static const spvtools::Extension pygen_variable_exts_SPV_NV_compute_shader_derivatives[] = {spvtools::Extension::kSPV_NV_compute_shader_derivatives}; static const spvtools::Extension pygen_variable_exts_SPV_NV_cooperative_matrix[] = {spvtools::Extension::kSPV_NV_cooperative_matrix}; +static const spvtools::Extension pygen_variable_exts_SPV_NV_displacement_micromap[] = {spvtools::Extension::kSPV_NV_displacement_micromap}; static const spvtools::Extension pygen_variable_exts_SPV_NV_geometry_shader_passthrough[] = {spvtools::Extension::kSPV_NV_geometry_shader_passthrough}; static const spvtools::Extension pygen_variable_exts_SPV_NV_mesh_shader[] = {spvtools::Extension::kSPV_NV_mesh_shader}; static const spvtools::Extension pygen_variable_exts_SPV_NV_mesh_shaderSPV_NV_viewport_array2[] = {spvtools::Extension::kSPV_NV_mesh_shader, spvtools::Extension::kSPV_NV_viewport_array2}; +static const spvtools::Extension pygen_variable_exts_SPV_NV_raw_access_chains[] = {spvtools::Extension::kSPV_NV_raw_access_chains}; static const spvtools::Extension pygen_variable_exts_SPV_NV_ray_tracing[] = {spvtools::Extension::kSPV_NV_ray_tracing}; static const spvtools::Extension pygen_variable_exts_SPV_NV_ray_tracing_motion_blur[] = {spvtools::Extension::kSPV_NV_ray_tracing_motion_blur}; static const spvtools::Extension pygen_variable_exts_SPV_NV_sample_mask_override_coverage[] = {spvtools::Extension::kSPV_NV_sample_mask_override_coverage}; +static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_atomic_fp16_vector[] = {spvtools::Extension::kSPV_NV_shader_atomic_fp16_vector}; static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_image_footprint[] = {spvtools::Extension::kSPV_NV_shader_image_footprint}; +static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_invocation_reorder[] = {spvtools::Extension::kSPV_NV_shader_invocation_reorder}; static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_sm_builtins[] = {spvtools::Extension::kSPV_NV_shader_sm_builtins}; static const spvtools::Extension pygen_variable_exts_SPV_NV_shader_subgroup_partitioned[] = {spvtools::Extension::kSPV_NV_shader_subgroup_partitioned}; static const spvtools::Extension pygen_variable_exts_SPV_NV_stereo_view_rendering[] = {spvtools::Extension::kSPV_NV_stereo_view_rendering}; static const spvtools::Extension pygen_variable_exts_SPV_NV_viewport_array2[] = {spvtools::Extension::kSPV_NV_viewport_array2}; +static const spvtools::Extension pygen_variable_exts_SPV_QCOM_image_processing[] = {spvtools::Extension::kSPV_QCOM_image_processing}; +static const spvtools::Extension pygen_variable_exts_SPV_QCOM_image_processing2[] = {spvtools::Extension::kSPV_QCOM_image_processing2}; static const spv_operand_desc_t pygen_variable_ImageOperandsEntries[] = { {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Bias", 0x0001, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Lod", 0x0002, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Grad", 0x0004, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstOffset", 0x0008, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Offset", 0x0010, 1, pygen_variable_caps_ImageGatherExtended, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ConstOffsets", 0x0020, 1, pygen_variable_caps_ImageGatherExtended, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Sample", 0x0040, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MinLod", 0x0080, 1, pygen_variable_caps_MinLod, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Bias", 0x0001, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Lod", 0x0002, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Grad", 0x0004, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstOffset", 0x0008, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Offset", 0x0010, 1, pygen_variable_caps_ImageGatherExtended, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ConstOffsets", 0x0020, 1, pygen_variable_caps_ImageGatherExtended, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Sample", 0x0040, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MinLod", 0x0080, 1, pygen_variable_caps_MinLod, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"MakeTexelAvailable", 0x0100, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakeTexelAvailableKHR", 0x0100, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakeTexelVisible", 0x0200, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, @@ -233,30 +295,33 @@ static const spv_operand_desc_t pygen_variable_ImageOperandsEntries[] = { {"SignExtend", 0x1000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"ZeroExtend", 0x2000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"Nontemporal", 0x4000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, - {"Offsets", 0x10000, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"Offsets", 0x10000, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FPFastMathModeEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NotNaN", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NotInf", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NSZ", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AllowRecip", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Fast", 0x0010, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AllowContractFastINTEL", 0x10000, 1, pygen_variable_caps_FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"AllowReassocINTEL", 0x20000, 1, pygen_variable_caps_FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NotNaN", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NotInf", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NSZ", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AllowRecip", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Fast", 0x0010, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AllowContract", 0x10000, 2, pygen_variable_caps_FloatControls2FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"AllowContractFastINTEL", 0x10000, 2, pygen_variable_caps_FloatControls2FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"AllowReassoc", 0x20000, 2, pygen_variable_caps_FloatControls2FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"AllowReassocINTEL", 0x20000, 2, pygen_variable_caps_FloatControls2FPFastMathModeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"AllowTransform", 0x40000, 1, pygen_variable_caps_FloatControls2, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_SelectionControlEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Flatten", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DontFlatten", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Flatten", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DontFlatten", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_LoopControlEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Unroll", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DontUnroll", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Unroll", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DontUnroll", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"DependencyInfinite", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"DependencyLength", 0x0008, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"MinIterations", 0x0010, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, @@ -264,38 +329,40 @@ static const spv_operand_desc_t pygen_variable_LoopControlEntries[] = { {"IterationMultiple", 0x0040, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"PeelCount", 0x0080, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"PartialCount", 0x0100, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"InitiationIntervalINTEL", 0x10000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"MaxConcurrencyINTEL", 0x20000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"DependencyArrayINTEL", 0x40000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"PipelineEnableINTEL", 0x80000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"LoopCoalesceINTEL", 0x100000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"MaxInterleavingINTEL", 0x200000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"SpeculatedIterationsINTEL", 0x400000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"NoFusionINTEL", 0x800000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_loop_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu} + {"InitiationIntervalINTEL", 0x10000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaxConcurrencyINTEL", 0x20000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"DependencyArrayINTEL", 0x40000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"PipelineEnableINTEL", 0x80000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"LoopCoalesceINTEL", 0x100000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaxInterleavingINTEL", 0x200000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"SpeculatedIterationsINTEL", 0x400000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"NoFusionINTEL", 0x800000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"LoopCountINTEL", 0x1000000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaxReinvocationDelayINTEL", 0x2000000, 1, pygen_variable_caps_FPGALoopControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FunctionControlEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Inline", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DontInline", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Pure", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Const", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Inline", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DontInline", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Pure", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Const", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"OptNoneINTEL", 0x10000, 1, pygen_variable_caps_OptNoneINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_MemorySemanticsEntries[] = { - {"Relaxed", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Acquire", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Release", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AcquireRelease", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SequentiallyConsistent", 0x0010, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UniformMemory", 0x0040, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubgroupMemory", 0x0080, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WorkgroupMemory", 0x0100, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CrossWorkgroupMemory", 0x0200, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicCounterMemory", 0x0400, 1, pygen_variable_caps_AtomicStorage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageMemory", 0x0800, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Relaxed", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Acquire", 0x0002, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Release", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AcquireRelease", 0x0008, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SequentiallyConsistent", 0x0010, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UniformMemory", 0x0040, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubgroupMemory", 0x0080, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WorkgroupMemory", 0x0100, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CrossWorkgroupMemory", 0x0200, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicCounterMemory", 0x0400, 1, pygen_variable_caps_AtomicStorage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageMemory", 0x0800, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"OutputMemory", 0x1000, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"OutputMemoryKHR", 0x1000, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakeAvailable", 0x2000, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, @@ -306,21 +373,23 @@ static const spv_operand_desc_t pygen_variable_MemorySemanticsEntries[] = { }; static const spv_operand_desc_t pygen_variable_MemoryAccessEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Volatile", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Aligned", 0x0002, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Nontemporal", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Volatile", 0x0001, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Aligned", 0x0002, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Nontemporal", 0x0004, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"MakePointerAvailable", 0x0008, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakePointerAvailableKHR", 0x0008, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakePointerVisible", 0x0010, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"MakePointerVisibleKHR", 0x0010, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"NonPrivatePointer", 0x0020, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, - {"NonPrivatePointerKHR", 0x0020, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu} + {"NonPrivatePointerKHR", 0x0020, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, + {"AliasScopeINTELMask", 0x10000, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"NoAliasINTELMask", 0x20000, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_KernelProfilingInfoEntries[] = { - {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CmdExecTime", 0x0001, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CmdExecTime", 0x0001, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_RayFlagsEntries[] = { @@ -334,7 +403,8 @@ static const spv_operand_desc_t pygen_variable_RayFlagsEntries[] = { {"CullOpaqueKHR", 0x0040, 2, pygen_variable_caps_RayQueryKHRRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"CullNoOpaqueKHR", 0x0080, 2, pygen_variable_caps_RayQueryKHRRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"SkipTrianglesKHR", 0x0100, 1, pygen_variable_caps_RayTraversalPrimitiveCullingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"SkipAABBsKHR", 0x0200, 1, pygen_variable_caps_RayTraversalPrimitiveCullingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} + {"SkipAABBsKHR", 0x0200, 1, pygen_variable_caps_RayTraversalPrimitiveCullingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ForceOpacityMicromap2StateEXT", 0x0400, 1, pygen_variable_caps_RayTracingOpacityMicromapEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FragmentShadingRateEntries[] = { @@ -344,88 +414,102 @@ static const spv_operand_desc_t pygen_variable_FragmentShadingRateEntries[] = { {"Horizontal4Pixels", 0x0008, 1, pygen_variable_caps_FragmentShadingRateKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; +static const spv_operand_desc_t pygen_variable_RawAccessChainOperandsEntries[] = { + {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"RobustnessPerComponentNV", 0x0001, 1, pygen_variable_caps_RawAccessChainsNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"RobustnessPerElementNV", 0x0002, 1, pygen_variable_caps_RawAccessChainsNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + static const spv_operand_desc_t pygen_variable_SourceLanguageEntries[] = { - {"Unknown", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ESSL", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GLSL", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OpenCL_C", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OpenCL_CPP", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"HLSL", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CPP_for_OpenCL", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"Unknown", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ESSL", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GLSL", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OpenCL_C", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OpenCL_CPP", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"HLSL", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CPP_for_OpenCL", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SYCL", 7, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"HERO_C", 8, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NZSL", 9, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WGSL", 10, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Slang", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Zig", 12, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ExecutionModelEntries[] = { - {"Vertex", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessellationControl", 1, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessellationEvaluation", 2, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Geometry", 3, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Fragment", 4, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GLCompute", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Kernel", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Vertex", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessellationControl", 1, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessellationEvaluation", 2, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Geometry", 3, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Fragment", 4, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GLCompute", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Kernel", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"TaskNV", 5267, 1, pygen_variable_caps_MeshShadingNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"MeshNV", 5268, 1, pygen_variable_caps_MeshShadingNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"RayGenerationNV", 5313, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"RayGenerationKHR", 5313, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"IntersectionNV", 5314, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"RayGenerationNV", 5313, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"IntersectionKHR", 5314, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"AnyHitNV", 5315, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"IntersectionNV", 5314, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"AnyHitKHR", 5315, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"ClosestHitNV", 5316, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"AnyHitNV", 5315, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"ClosestHitKHR", 5316, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"MissNV", 5317, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ClosestHitNV", 5316, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"MissKHR", 5317, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MissNV", 5317, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"CallableKHR", 5318, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"CallableNV", 5318, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"CallableKHR", 5318, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} + {"TaskEXT", 5364, 1, pygen_variable_caps_MeshShadingEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MeshEXT", 5365, 1, pygen_variable_caps_MeshShadingEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_AddressingModelEntries[] = { - {"Logical", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Physical32", 1, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Physical64", 2, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Logical", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Physical32", 1, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Physical64", 2, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"PhysicalStorageBuffer64", 5348, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"PhysicalStorageBuffer64EXT", 5348, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_MemoryModelEntries[] = { - {"Simple", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GLSL450", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OpenCL", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Simple", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GLSL450", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OpenCL", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"Vulkan", 3, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"VulkanKHR", 3, 1, pygen_variable_caps_VulkanMemoryModel, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ExecutionModeEntries[] = { - {"Invocations", 0, 1, pygen_variable_caps_Geometry, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpacingEqual", 1, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpacingFractionalEven", 2, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpacingFractionalOdd", 3, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VertexOrderCw", 4, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VertexOrderCcw", 5, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PixelCenterInteger", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OriginUpperLeft", 7, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OriginLowerLeft", 8, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EarlyFragmentTests", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PointMode", 10, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Xfb", 11, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DepthReplacing", 12, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DepthGreater", 14, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DepthLess", 15, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DepthUnchanged", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LocalSize", 17, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LocalSizeHint", 18, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputPoints", 19, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputLines", 20, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputLinesAdjacency", 21, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Triangles", 22, 2, pygen_variable_caps_GeometryTessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputTrianglesAdjacency", 23, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Quads", 24, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Isolines", 25, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OutputVertices", 26, 3, pygen_variable_caps_GeometryTessellationMeshShadingNV, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OutputPoints", 27, 2, pygen_variable_caps_GeometryMeshShadingNV, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OutputLineStrip", 28, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"OutputTriangleStrip", 29, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VecTypeHint", 30, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ContractionOff", 31, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Invocations", 0, 1, pygen_variable_caps_Geometry, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpacingEqual", 1, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpacingFractionalEven", 2, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpacingFractionalOdd", 3, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VertexOrderCw", 4, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VertexOrderCcw", 5, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PixelCenterInteger", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OriginUpperLeft", 7, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OriginLowerLeft", 8, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EarlyFragmentTests", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PointMode", 10, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Xfb", 11, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DepthReplacing", 12, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DepthGreater", 14, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DepthLess", 15, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DepthUnchanged", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LocalSize", 17, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LocalSizeHint", 18, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputPoints", 19, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputLines", 20, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputLinesAdjacency", 21, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Triangles", 22, 2, pygen_variable_caps_GeometryTessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputTrianglesAdjacency", 23, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Quads", 24, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Isolines", 25, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OutputVertices", 26, 4, pygen_variable_caps_GeometryTessellationMeshShadingNVMeshShadingEXT, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OutputPoints", 27, 3, pygen_variable_caps_GeometryMeshShadingNVMeshShadingEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OutputLineStrip", 28, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"OutputTriangleStrip", 29, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VecTypeHint", 30, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ContractionOff", 31, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"Initializer", 33, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"Finalizer", 34, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"SubgroupSize", 35, 1, pygen_variable_caps_SubgroupDispatch, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, @@ -433,6 +517,9 @@ static const spv_operand_desc_t pygen_variable_ExecutionModeEntries[] = { {"SubgroupsPerWorkgroupId", 37, 1, pygen_variable_caps_SubgroupDispatch, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, {"LocalSizeId", 38, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, {"LocalSizeHintId", 39, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, + {"NonCoherentColorAttachmentReadEXT", 4169, 1, pygen_variable_caps_TileImageColorReadAccessEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"NonCoherentDepthAttachmentReadEXT", 4170, 1, pygen_variable_caps_TileImageDepthReadAccessEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"NonCoherentStencilAttachmentReadEXT", 4171, 1, pygen_variable_caps_TileImageStencilReadAccessEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupUniformControlFlowKHR", 4421, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_subgroup_uniform_control_flow, {}, 0xffffffffu, 0xffffffffu}, {"PostDepthCoverage", 4446, 1, pygen_variable_caps_SampleMaskPostDepthCoverage, 1, pygen_variable_exts_SPV_KHR_post_depth_coverage, {}, 0xffffffffu, 0xffffffffu}, {"DenormPreserve", 4459, 1, pygen_variable_caps_DenormPreserve, 1, pygen_variable_exts_SPV_KHR_float_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, @@ -440,12 +527,29 @@ static const spv_operand_desc_t pygen_variable_ExecutionModeEntries[] = { {"SignedZeroInfNanPreserve", 4461, 1, pygen_variable_caps_SignedZeroInfNanPreserve, 1, pygen_variable_exts_SPV_KHR_float_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"RoundingModeRTE", 4462, 1, pygen_variable_caps_RoundingModeRTE, 1, pygen_variable_exts_SPV_KHR_float_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"RoundingModeRTZ", 4463, 1, pygen_variable_caps_RoundingModeRTZ, 1, pygen_variable_exts_SPV_KHR_float_controls, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"EarlyAndLateFragmentTestsAMD", 5017, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_tests, {}, 0xffffffffu, 0xffffffffu}, {"StencilRefReplacingEXT", 5027, 1, pygen_variable_caps_StencilExportEXT, 1, pygen_variable_exts_SPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, - {"OutputLinesNV", 5269, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, - {"OutputPrimitivesNV", 5270, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"CoalescingAMDX", 5069, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MaxNodeRecursionAMDX", 5071, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"StaticNumWorkgroupsAMDX", 5072, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"ShaderIndexAMDX", 5073, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"MaxNumWorkgroupsAMDX", 5077, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"StencilRefUnchangedFrontAMD", 5079, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"StencilRefGreaterFrontAMD", 5080, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"StencilRefLessFrontAMD", 5081, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"StencilRefUnchangedBackAMD", 5082, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"StencilRefGreaterBackAMD", 5083, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"StencilRefLessBackAMD", 5084, 1, pygen_variable_caps_StencilExportEXT, 2, pygen_variable_exts_SPV_AMD_shader_early_and_late_fragment_testsSPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"QuadDerivativesKHR", 5088, 1, pygen_variable_caps_QuadControlKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"RequireFullQuadsKHR", 5089, 1, pygen_variable_caps_QuadControlKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"OutputLinesEXT", 5269, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"OutputLinesNV", 5269, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"OutputPrimitivesEXT", 5270, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"OutputPrimitivesNV", 5270, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"DerivativeGroupQuadsNV", 5289, 1, pygen_variable_caps_ComputeDerivativeGroupQuadsNV, 1, pygen_variable_exts_SPV_NV_compute_shader_derivatives, {}, 0xffffffffu, 0xffffffffu}, {"DerivativeGroupLinearNV", 5290, 1, pygen_variable_caps_ComputeDerivativeGroupLinearNV, 1, pygen_variable_exts_SPV_NV_compute_shader_derivatives, {}, 0xffffffffu, 0xffffffffu}, - {"OutputTrianglesNV", 5298, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"OutputTrianglesEXT", 5298, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"OutputTrianglesNV", 5298, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"PixelInterlockOrderedEXT", 5366, 1, pygen_variable_caps_FragmentShaderPixelInterlockEXT, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, {}, 0xffffffffu, 0xffffffffu}, {"PixelInterlockUnorderedEXT", 5367, 1, pygen_variable_caps_FragmentShaderPixelInterlockEXT, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, {}, 0xffffffffu, 0xffffffffu}, {"SampleInterlockOrderedEXT", 5368, 1, pygen_variable_caps_FragmentShaderSampleInterlockEXT, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, {}, 0xffffffffu, 0xffffffffu}, @@ -461,158 +565,174 @@ static const spv_operand_desc_t pygen_variable_ExecutionModeEntries[] = { {"MaxWorkDimINTEL", 5894, 1, pygen_variable_caps_KernelAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_kernel_attributes, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"NoGlobalOffsetINTEL", 5895, 1, pygen_variable_caps_KernelAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_kernel_attributes, {}, 0xffffffffu, 0xffffffffu}, {"NumSIMDWorkitemsINTEL", 5896, 1, pygen_variable_caps_FPGAKernelAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_kernel_attributes, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"SchedulerTargetFmaxMhzINTEL", 5903, 1, pygen_variable_caps_FPGAKernelAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu} + {"SchedulerTargetFmaxMhzINTEL", 5903, 1, pygen_variable_caps_FPGAKernelAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaximallyReconvergesKHR", 6023, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_maximal_reconvergence, {}, 0xffffffffu, 0xffffffffu}, + {"FPFastMathDefault", 6028, 1, pygen_variable_caps_FloatControls2, 0, nullptr, {SPV_OPERAND_TYPE_ID, SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"StreamingInterfaceINTEL", 6154, 1, pygen_variable_caps_FPGAKernelAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"RegisterMapInterfaceINTEL", 6160, 1, pygen_variable_caps_FPGAKernelAttributesv2INTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"NamedBarrierCountINTEL", 6417, 1, pygen_variable_caps_VectorComputeINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaximumRegistersINTEL", 6461, 1, pygen_variable_caps_RegisterLimitsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaximumRegistersIdINTEL", 6462, 1, pygen_variable_caps_RegisterLimitsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"NamedMaximumRegistersINTEL", 6463, 1, pygen_variable_caps_RegisterLimitsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_StorageClassEntries[] = { - {"UniformConstant", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Input", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Uniform", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Output", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Workgroup", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CrossWorkgroup", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Private", 6, 2, pygen_variable_caps_ShaderVectorComputeINTEL, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Function", 7, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Generic", 8, 1, pygen_variable_caps_GenericPointer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PushConstant", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicCounter", 10, 1, pygen_variable_caps_AtomicStorage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Image", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"UniformConstant", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Input", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Uniform", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Output", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Workgroup", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CrossWorkgroup", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Private", 6, 2, pygen_variable_caps_ShaderVectorComputeINTEL, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Function", 7, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Generic", 8, 1, pygen_variable_caps_GenericPointer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PushConstant", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicCounter", 10, 1, pygen_variable_caps_AtomicStorage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Image", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"StorageBuffer", 12, 1, pygen_variable_caps_Shader, 2, pygen_variable_exts_SPV_KHR_storage_buffer_storage_classSPV_KHR_variable_pointers, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"CallableDataNV", 5328, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"TileImageEXT", 4172, 1, pygen_variable_caps_TileImageColorReadAccessEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"NodePayloadAMDX", 5068, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"NodeOutputPayloadAMDX", 5076, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"CallableDataKHR", 5328, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"IncomingCallableDataNV", 5329, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"CallableDataNV", 5328, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"IncomingCallableDataKHR", 5329, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"RayPayloadNV", 5338, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"IncomingCallableDataNV", 5329, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayPayloadKHR", 5338, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"HitAttributeNV", 5339, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"RayPayloadNV", 5338, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"HitAttributeKHR", 5339, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"IncomingRayPayloadNV", 5342, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"HitAttributeNV", 5339, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"IncomingRayPayloadKHR", 5342, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"ShaderRecordBufferNV", 5343, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"IncomingRayPayloadNV", 5342, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"ShaderRecordBufferKHR", 5343, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"ShaderRecordBufferNV", 5343, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"PhysicalStorageBuffer", 5349, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"PhysicalStorageBufferEXT", 5349, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, + {"HitObjectAttributeNV", 5385, 1, pygen_variable_caps_ShaderInvocationReorderNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"TaskPayloadWorkgroupEXT", 5402, 1, pygen_variable_caps_MeshShadingEXT, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"CodeSectionINTEL", 5605, 1, pygen_variable_caps_FunctionPointersINTEL, 1, pygen_variable_exts_SPV_INTEL_function_pointers, {}, 0xffffffffu, 0xffffffffu}, {"DeviceOnlyINTEL", 5936, 1, pygen_variable_caps_USMStorageClassesINTEL, 1, pygen_variable_exts_SPV_INTEL_usm_storage_classes, {}, 0xffffffffu, 0xffffffffu}, {"HostOnlyINTEL", 5937, 1, pygen_variable_caps_USMStorageClassesINTEL, 1, pygen_variable_exts_SPV_INTEL_usm_storage_classes, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_DimEntries[] = { - {"1D", 0, 2, pygen_variable_caps_Sampled1DImage1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"2D", 1, 3, pygen_variable_caps_ShaderKernelImageMSArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"3D", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Cube", 3, 2, pygen_variable_caps_ShaderImageCubeArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rect", 4, 2, pygen_variable_caps_SampledRectImageRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Buffer", 5, 2, pygen_variable_caps_SampledBufferImageBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubpassData", 6, 1, pygen_variable_caps_InputAttachment, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"1D", 0, 1, pygen_variable_caps_Sampled1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"2D", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"3D", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Cube", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rect", 4, 1, pygen_variable_caps_SampledRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Buffer", 5, 1, pygen_variable_caps_SampledBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubpassData", 6, 1, pygen_variable_caps_InputAttachment, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TileImageDataEXT", 4173, 1, pygen_variable_caps_TileImageColorReadAccessEXT, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_SamplerAddressingModeEntries[] = { - {"None", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ClampToEdge", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Clamp", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Repeat", 3, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RepeatMirrored", 4, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"None", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ClampToEdge", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Clamp", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Repeat", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RepeatMirrored", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_SamplerFilterModeEntries[] = { - {"Nearest", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Linear", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"Nearest", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Linear", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ImageFormatEntries[] = { - {"Unknown", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba32f", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba16f", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R32f", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba8", 4, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba8Snorm", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg32f", 6, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg16f", 7, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R11fG11fB10f", 8, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R16f", 9, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba16", 10, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgb10A2", 11, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg16", 12, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg8", 13, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R16", 14, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R8", 15, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba16Snorm", 16, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg16Snorm", 17, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg8Snorm", 18, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R16Snorm", 19, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R8Snorm", 20, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba32i", 21, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba16i", 22, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba8i", 23, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R32i", 24, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg32i", 25, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg16i", 26, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg8i", 27, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R16i", 28, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R8i", 29, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba32ui", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba16ui", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgba8ui", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R32ui", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rgb10a2ui", 34, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg32ui", 35, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg16ui", 36, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rg8ui", 37, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R16ui", 38, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R8ui", 39, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R64ui", 40, 1, pygen_variable_caps_Int64ImageEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"R64i", 41, 1, pygen_variable_caps_Int64ImageEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"Unknown", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba32f", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba16f", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R32f", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba8", 4, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba8Snorm", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg32f", 6, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg16f", 7, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R11fG11fB10f", 8, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R16f", 9, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba16", 10, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgb10A2", 11, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg16", 12, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg8", 13, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R16", 14, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R8", 15, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba16Snorm", 16, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg16Snorm", 17, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg8Snorm", 18, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R16Snorm", 19, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R8Snorm", 20, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba32i", 21, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba16i", 22, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba8i", 23, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R32i", 24, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg32i", 25, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg16i", 26, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg8i", 27, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R16i", 28, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R8i", 29, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba32ui", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba16ui", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgba8ui", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R32ui", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rgb10a2ui", 34, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg32ui", 35, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg16ui", 36, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rg8ui", 37, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R16ui", 38, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R8ui", 39, 1, pygen_variable_caps_StorageImageExtendedFormats, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R64ui", 40, 1, pygen_variable_caps_Int64ImageEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"R64i", 41, 1, pygen_variable_caps_Int64ImageEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ImageChannelOrderEntries[] = { - {"R", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"A", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RG", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RA", 3, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RGB", 4, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RGBA", 5, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BGRA", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ARGB", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Intensity", 8, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Luminance", 9, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Rx", 10, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RGx", 11, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RGBx", 12, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Depth", 13, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DepthStencil", 14, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"sRGB", 15, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"sRGBx", 16, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"sRGBA", 17, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"sBGRA", 18, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ABGR", 19, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"R", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"A", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RG", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RA", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RGB", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RGBA", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BGRA", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ARGB", 7, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Intensity", 8, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Luminance", 9, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Rx", 10, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RGx", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RGBx", 12, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Depth", 13, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DepthStencil", 14, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"sRGB", 15, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"sRGBx", 16, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"sRGBA", 17, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"sBGRA", 18, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ABGR", 19, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ImageChannelDataTypeEntries[] = { - {"SnormInt8", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SnormInt16", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormInt8", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormInt16", 3, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormShort565", 4, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormShort555", 5, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormInt101010", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SignedInt8", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SignedInt16", 8, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SignedInt32", 9, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnsignedInt8", 10, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnsignedInt16", 11, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnsignedInt32", 12, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"HalfFloat", 13, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Float", 14, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormInt24", 15, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UnormInt101010_2", 16, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"SnormInt8", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SnormInt16", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormInt8", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormInt16", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormShort565", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormShort555", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormInt101010", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SignedInt8", 7, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SignedInt16", 8, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SignedInt32", 9, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnsignedInt8", 10, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnsignedInt16", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnsignedInt32", 12, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"HalfFloat", 13, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Float", 14, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormInt24", 15, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnormInt101010_2", 16, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnsignedIntRaw10EXT", 19, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UnsignedIntRaw12EXT", 20, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FPRoundingModeEntries[] = { - {"RTE", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RTZ", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RTP", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"RTN", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"RTE", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RTZ", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RTP", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RTN", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FPDenormModeEntries[] = { @@ -644,86 +764,102 @@ static const spv_operand_desc_t pygen_variable_OverflowModesEntries[] = { }; static const spv_operand_desc_t pygen_variable_LinkageTypeEntries[] = { - {"Export", 0, 1, pygen_variable_caps_Linkage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Import", 1, 1, pygen_variable_caps_Linkage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Export", 0, 1, pygen_variable_caps_Linkage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Import", 1, 1, pygen_variable_caps_Linkage, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"LinkOnceODR", 2, 1, pygen_variable_caps_Linkage, 1, pygen_variable_exts_SPV_KHR_linkonce_odr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_AccessQualifierEntries[] = { - {"ReadOnly", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WriteOnly", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ReadWrite", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"ReadOnly", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WriteOnly", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ReadWrite", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_HostAccessQualifierEntries[] = { + {"NoneINTEL", 0, 1, pygen_variable_caps_GlobalVariableHostAccessINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ReadINTEL", 1, 1, pygen_variable_caps_GlobalVariableHostAccessINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"WriteINTEL", 2, 1, pygen_variable_caps_GlobalVariableHostAccessINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ReadWriteINTEL", 3, 1, pygen_variable_caps_GlobalVariableHostAccessINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_FunctionParameterAttributeEntries[] = { - {"Zext", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Sext", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ByVal", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Sret", 3, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoAlias", 4, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoCapture", 5, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoWrite", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoReadWrite", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"Zext", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Sext", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ByVal", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Sret", 3, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoAlias", 4, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoCapture", 5, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoWrite", 6, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoReadWrite", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"RuntimeAlignedINTEL", 5940, 1, pygen_variable_caps_RuntimeAlignedAttributeINTEL, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_DecorationEntries[] = { - {"RelaxedPrecision", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SpecId", 1, 2, pygen_variable_caps_ShaderKernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Block", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BufferBlock", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), SPV_SPIRV_VERSION_WORD(1,3)}, - {"RowMajor", 4, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ColMajor", 5, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ArrayStride", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MatrixStride", 7, 1, pygen_variable_caps_Matrix, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GLSLShared", 8, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GLSLPacked", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CPacked", 10, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"BuiltIn", 11, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_BUILT_IN}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoPerspective", 13, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Flat", 14, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Patch", 15, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Centroid", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Sample", 17, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Invariant", 18, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Restrict", 19, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Aliased", 20, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Volatile", 21, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Constant", 22, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Coherent", 23, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NonWritable", 24, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NonReadable", 25, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Uniform", 26, 2, pygen_variable_caps_ShaderUniformDecoration, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"RelaxedPrecision", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SpecId", 1, 2, pygen_variable_caps_ShaderKernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Block", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BufferBlock", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), SPV_SPIRV_VERSION_WORD(1,3)}, + {"RowMajor", 4, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ColMajor", 5, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ArrayStride", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MatrixStride", 7, 1, pygen_variable_caps_Matrix, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GLSLShared", 8, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GLSLPacked", 9, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CPacked", 10, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"BuiltIn", 11, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_BUILT_IN}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoPerspective", 13, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Flat", 14, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Patch", 15, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Centroid", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Sample", 17, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Invariant", 18, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Restrict", 19, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Aliased", 20, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Volatile", 21, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Constant", 22, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Coherent", 23, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NonWritable", 24, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NonReadable", 25, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Uniform", 26, 2, pygen_variable_caps_ShaderUniformDecoration, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"UniformId", 27, 2, pygen_variable_caps_ShaderUniformDecoration, 0, nullptr, {SPV_OPERAND_TYPE_SCOPE_ID}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, - {"SaturatedConversion", 28, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Stream", 29, 1, pygen_variable_caps_GeometryStreams, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Location", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Component", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Index", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Binding", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DescriptorSet", 34, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Offset", 35, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"XfbBuffer", 36, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"XfbStride", 37, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FuncParamAttr", 38, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FPRoundingMode", 39, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_FP_ROUNDING_MODE}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FPFastMathMode", 40, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LinkageAttributes", 41, 1, pygen_variable_caps_Linkage, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LINKAGE_TYPE}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NoContraction", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputAttachmentIndex", 43, 1, pygen_variable_caps_InputAttachment, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Alignment", 44, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"SaturatedConversion", 28, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Stream", 29, 1, pygen_variable_caps_GeometryStreams, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Location", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Component", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Index", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Binding", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DescriptorSet", 34, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Offset", 35, 1, pygen_variable_caps_Shader, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"XfbBuffer", 36, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"XfbStride", 37, 1, pygen_variable_caps_TransformFeedback, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FuncParamAttr", 38, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FPRoundingMode", 39, 0, nullptr, 0, nullptr, {SPV_OPERAND_TYPE_FP_ROUNDING_MODE}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FPFastMathMode", 40, 2, pygen_variable_caps_KernelFloatControls2, 0, nullptr, {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LinkageAttributes", 41, 1, pygen_variable_caps_Linkage, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LINKAGE_TYPE}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NoContraction", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputAttachmentIndex", 43, 1, pygen_variable_caps_InputAttachment, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Alignment", 44, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"MaxByteOffset", 45, 1, pygen_variable_caps_Addresses, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"AlignmentId", 46, 1, pygen_variable_caps_Kernel, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, {"MaxByteOffsetId", 47, 1, pygen_variable_caps_Addresses, 0, nullptr, {SPV_OPERAND_TYPE_ID}, SPV_SPIRV_VERSION_WORD(1,2), 0xffffffffu}, {"NoSignedWrap", 4469, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_no_integer_wrap_decoration, {}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, {"NoUnsignedWrap", 4470, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_no_integer_wrap_decoration, {}, SPV_SPIRV_VERSION_WORD(1,4), 0xffffffffu}, + {"WeightTextureQCOM", 4487, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing, {}, 0xffffffffu, 0xffffffffu}, + {"BlockMatchTextureQCOM", 4488, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing, {}, 0xffffffffu, 0xffffffffu}, + {"BlockMatchSamplerQCOM", 4499, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing2, {}, 0xffffffffu, 0xffffffffu}, {"ExplicitInterpAMD", 4999, 0, nullptr, 1, pygen_variable_exts_SPV_AMD_shader_explicit_vertex_parameter, {}, 0xffffffffu, 0xffffffffu}, + {"NodeSharesPayloadLimitsWithAMDX", 5019, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"NodeMaxPayloadsAMDX", 5020, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"TrackFinishWritingAMDX", 5078, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"PayloadNodeNameAMDX", 5091, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_STRING}, 0xffffffffu, 0xffffffffu}, {"OverrideCoverageNV", 5248, 1, pygen_variable_caps_SampleMaskOverrideCoverageNV, 1, pygen_variable_exts_SPV_NV_sample_mask_override_coverage, {}, 0xffffffffu, 0xffffffffu}, {"PassthroughNV", 5250, 1, pygen_variable_caps_GeometryShaderPassthroughNV, 1, pygen_variable_exts_SPV_NV_geometry_shader_passthrough, {}, 0xffffffffu, 0xffffffffu}, {"ViewportRelativeNV", 5252, 1, pygen_variable_caps_ShaderViewportMaskNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"SecondaryViewportRelativeNV", 5256, 1, pygen_variable_caps_ShaderStereoViewNV, 1, pygen_variable_exts_SPV_NV_stereo_view_rendering, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, - {"PerPrimitiveNV", 5271, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"PerPrimitiveEXT", 5271, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"PerPrimitiveNV", 5271, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"PerViewNV", 5272, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, - {"PerTaskNV", 5273, 1, pygen_variable_caps_MeshShadingNV, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"PerTaskNV", 5273, 2, pygen_variable_caps_MeshShadingNVMeshShadingEXT, 2, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"PerVertexKHR", 5285, 2, pygen_variable_caps_FragmentBarycentricNVFragmentBarycentricKHR, 2, pygen_variable_exts_SPV_KHR_fragment_shader_barycentricSPV_NV_fragment_shader_barycentric, {}, 0xffffffffu, 0xffffffffu}, {"PerVertexNV", 5285, 2, pygen_variable_caps_FragmentBarycentricNVFragmentBarycentricKHR, 2, pygen_variable_exts_SPV_KHR_fragment_shader_barycentricSPV_NV_fragment_shader_barycentric, {}, 0xffffffffu, 0xffffffffu}, {"NonUniform", 5300, 1, pygen_variable_caps_ShaderNonUniform, 1, pygen_variable_exts_SPV_EXT_descriptor_indexing, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, @@ -732,6 +868,7 @@ static const spv_operand_desc_t pygen_variable_DecorationEntries[] = { {"RestrictPointerEXT", 5355, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"AliasedPointer", 5356, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"AliasedPointerEXT", 5356, 1, pygen_variable_caps_PhysicalStorageBufferAddresses, 2, pygen_variable_exts_SPV_EXT_physical_storage_bufferSPV_KHR_physical_storage_buffer, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, + {"HitObjectShaderRecordBufferNV", 5386, 1, pygen_variable_caps_ShaderInvocationReorderNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"BindlessSamplerNV", 5398, 1, pygen_variable_caps_BindlessTextureNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"BindlessImageNV", 5399, 1, pygen_variable_caps_BindlessTextureNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"BoundSamplerNV", 5400, 1, pygen_variable_caps_BindlessTextureNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, @@ -764,62 +901,94 @@ static const spv_operand_desc_t pygen_variable_DecorationEntries[] = { {"MergeINTEL", 5834, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_memory_attributes, {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LITERAL_STRING}, 0xffffffffu, 0xffffffffu}, {"BankBitsINTEL", 5835, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_memory_attributes, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"ForcePow2DepthINTEL", 5836, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_memory_attributes, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"StridesizeINTEL", 5883, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"WordsizeINTEL", 5884, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"TrueDualPortINTEL", 5885, 1, pygen_variable_caps_FPGAMemoryAttributesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"BurstCoalesceINTEL", 5899, 1, pygen_variable_caps_FPGAMemoryAccessesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"CacheSizeINTEL", 5900, 1, pygen_variable_caps_FPGAMemoryAccessesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"DontStaticallyCoalesceINTEL", 5901, 1, pygen_variable_caps_FPGAMemoryAccessesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"PrefetchINTEL", 5902, 1, pygen_variable_caps_FPGAMemoryAccessesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"StallEnableINTEL", 5905, 1, pygen_variable_caps_FPGAClusterAttributesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"FuseLoopsInFunctionINTEL", 5907, 1, pygen_variable_caps_LoopFuseINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MathOpDSPModeINTEL", 5909, 1, pygen_variable_caps_FPGADSPControlINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"AliasScopeINTEL", 5914, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"NoAliasINTEL", 5915, 1, pygen_variable_caps_MemoryAccessAliasingINTEL, 0, nullptr, {SPV_OPERAND_TYPE_ID}, 0xffffffffu, 0xffffffffu}, + {"InitiationIntervalINTEL", 5917, 1, pygen_variable_caps_FPGAInvocationPipeliningAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MaxConcurrencyINTEL", 5918, 1, pygen_variable_caps_FPGAInvocationPipeliningAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"PipelineEnableINTEL", 5919, 1, pygen_variable_caps_FPGAInvocationPipeliningAttributesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"BufferLocationINTEL", 5921, 1, pygen_variable_caps_FPGABufferLocationINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"IOPipeStorageINTEL", 5944, 1, pygen_variable_caps_IOPipesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, {"FunctionFloatingPointModeINTEL", 6080, 1, pygen_variable_caps_FunctionFloatControlINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_FPOPERATION_MODE}, 0xffffffffu, 0xffffffffu}, {"SingleElementVectorINTEL", 6085, 1, pygen_variable_caps_VectorComputeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"VectorComputeCallableFunctionINTEL", 6087, 1, pygen_variable_caps_VectorComputeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, - {"MediaBlockIOINTEL", 6140, 1, pygen_variable_caps_VectorComputeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} + {"MediaBlockIOINTEL", 6140, 1, pygen_variable_caps_VectorComputeINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"StallFreeINTEL", 6151, 1, pygen_variable_caps_FPGAClusterAttributesV2INTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"FPMaxErrorDecorationINTEL", 6170, 1, pygen_variable_caps_FPMaxErrorINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_FLOAT}, 0xffffffffu, 0xffffffffu}, + {"LatencyControlLabelINTEL", 6172, 1, pygen_variable_caps_FPGALatencyControlINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"LatencyControlConstraintINTEL", 6173, 1, pygen_variable_caps_FPGALatencyControlINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"ConduitKernelArgumentINTEL", 6175, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"RegisterMapKernelArgumentINTEL", 6176, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceAddressWidthINTEL", 6177, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceDataWidthINTEL", 6178, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceLatencyINTEL", 6179, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceReadWriteModeINTEL", 6180, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_ACCESS_QUALIFIER}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceMaxBurstINTEL", 6181, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"MMHostInterfaceWaitRequestINTEL", 6182, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"StableKernelArgumentINTEL", 6183, 1, pygen_variable_caps_FPGAArgumentInterfacesINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"HostAccessINTEL", 6188, 1, pygen_variable_caps_GlobalVariableHostAccessINTEL, 0, nullptr, {SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER, SPV_OPERAND_TYPE_LITERAL_STRING}, 0xffffffffu, 0xffffffffu}, + {"InitModeINTEL", 6190, 1, pygen_variable_caps_GlobalVariableFPGADecorationsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_INITIALIZATION_MODE_QUALIFIER}, 0xffffffffu, 0xffffffffu}, + {"ImplementInRegisterMapINTEL", 6191, 1, pygen_variable_caps_GlobalVariableFPGADecorationsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER}, 0xffffffffu, 0xffffffffu}, + {"CacheControlLoadINTEL", 6442, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL}, 0xffffffffu, 0xffffffffu}, + {"CacheControlStoreINTEL", 6443, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_STORE_CACHE_CONTROL}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_BuiltInEntries[] = { - {"Position", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PointSize", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ClipDistance", 3, 1, pygen_variable_caps_ClipDistance, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CullDistance", 4, 1, pygen_variable_caps_CullDistance, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VertexId", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InstanceId", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PrimitiveId", 7, 5, pygen_variable_caps_GeometryTessellationRayTracingNVRayTracingKHRMeshShadingNV, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InvocationId", 8, 2, pygen_variable_caps_GeometryTessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Layer", 9, 4, pygen_variable_caps_GeometryShaderLayerShaderViewportIndexLayerEXTMeshShadingNV, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ViewportIndex", 10, 4, pygen_variable_caps_MultiViewportShaderViewportIndexShaderViewportIndexLayerEXTMeshShadingNV, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessLevelOuter", 11, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessLevelInner", 12, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessCoord", 13, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PatchVertices", 14, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FragCoord", 15, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"PointCoord", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FrontFacing", 17, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampleId", 18, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SamplePosition", 19, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampleMask", 20, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"FragDepth", 22, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"HelperInvocation", 23, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NumWorkgroups", 24, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WorkgroupSize", 25, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WorkgroupId", 26, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LocalInvocationId", 27, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GlobalInvocationId", 28, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LocalInvocationIndex", 29, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WorkDim", 30, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GlobalSize", 31, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"EnqueuedWorkgroupSize", 32, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GlobalOffset", 33, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GlobalLinearId", 34, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubgroupSize", 36, 3, pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubgroupMaxSize", 37, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NumSubgroups", 38, 2, pygen_variable_caps_KernelGroupNonUniform, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"NumEnqueuedSubgroups", 39, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubgroupId", 40, 2, pygen_variable_caps_KernelGroupNonUniform, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SubgroupLocalInvocationId", 41, 3, pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"VertexIndex", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InstanceIndex", 43, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Position", 0, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PointSize", 1, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ClipDistance", 3, 1, pygen_variable_caps_ClipDistance, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CullDistance", 4, 1, pygen_variable_caps_CullDistance, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VertexId", 5, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InstanceId", 6, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PrimitiveId", 7, 6, pygen_variable_caps_GeometryTessellationRayTracingNVRayTracingKHRMeshShadingNVMeshShadingEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InvocationId", 8, 2, pygen_variable_caps_GeometryTessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Layer", 9, 5, pygen_variable_caps_GeometryShaderLayerShaderViewportIndexLayerEXTMeshShadingNVMeshShadingEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ViewportIndex", 10, 5, pygen_variable_caps_MultiViewportShaderViewportIndexShaderViewportIndexLayerEXTMeshShadingNVMeshShadingEXT, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessLevelOuter", 11, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessLevelInner", 12, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessCoord", 13, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PatchVertices", 14, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FragCoord", 15, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"PointCoord", 16, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FrontFacing", 17, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampleId", 18, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SamplePosition", 19, 1, pygen_variable_caps_SampleRateShading, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampleMask", 20, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"FragDepth", 22, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"HelperInvocation", 23, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NumWorkgroups", 24, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WorkgroupSize", 25, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WorkgroupId", 26, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LocalInvocationId", 27, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GlobalInvocationId", 28, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LocalInvocationIndex", 29, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WorkDim", 30, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GlobalSize", 31, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"EnqueuedWorkgroupSize", 32, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GlobalOffset", 33, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GlobalLinearId", 34, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubgroupSize", 36, 3, pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubgroupMaxSize", 37, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NumSubgroups", 38, 2, pygen_variable_caps_KernelGroupNonUniform, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"NumEnqueuedSubgroups", 39, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubgroupId", 40, 2, pygen_variable_caps_KernelGroupNonUniform, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SubgroupLocalInvocationId", 41, 3, pygen_variable_caps_KernelGroupNonUniformSubgroupBallotKHR, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"VertexIndex", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InstanceIndex", 43, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CoreIDARM", 4160, 1, pygen_variable_caps_CoreBuiltinsARM, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CoreCountARM", 4161, 1, pygen_variable_caps_CoreBuiltinsARM, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CoreMaxIDARM", 4162, 1, pygen_variable_caps_CoreBuiltinsARM, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WarpIDARM", 4163, 1, pygen_variable_caps_CoreBuiltinsARM, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WarpMaxIDARM", 4164, 1, pygen_variable_caps_CoreBuiltinsARM, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"SubgroupEqMask", 4416, 2, pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot, 1, pygen_variable_exts_SPV_KHR_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"SubgroupEqMaskKHR", 4416, 2, pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot, 1, pygen_variable_exts_SPV_KHR_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"SubgroupGeMask", 4417, 2, pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot, 1, pygen_variable_exts_SPV_KHR_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, @@ -832,7 +1001,7 @@ static const spv_operand_desc_t pygen_variable_BuiltInEntries[] = { {"SubgroupLtMaskKHR", 4420, 2, pygen_variable_caps_SubgroupBallotKHRGroupNonUniformBallot, 1, pygen_variable_exts_SPV_KHR_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"BaseVertex", 4424, 1, pygen_variable_caps_DrawParameters, 1, pygen_variable_exts_SPV_KHR_shader_draw_parameters, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"BaseInstance", 4425, 1, pygen_variable_caps_DrawParameters, 1, pygen_variable_exts_SPV_KHR_shader_draw_parameters, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, - {"DrawIndex", 4426, 2, pygen_variable_caps_DrawParametersMeshShadingNV, 2, pygen_variable_exts_SPV_KHR_shader_draw_parametersSPV_NV_mesh_shader, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, + {"DrawIndex", 4426, 3, pygen_variable_caps_DrawParametersMeshShadingNVMeshShadingEXT, 3, pygen_variable_exts_SPV_EXT_mesh_shaderSPV_KHR_shader_draw_parametersSPV_NV_mesh_shader, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"PrimitiveShadingRateKHR", 4432, 1, pygen_variable_caps_FragmentShadingRateKHR, 1, pygen_variable_exts_SPV_KHR_fragment_shading_rate, {}, 0xffffffffu, 0xffffffffu}, {"DeviceIndex", 4438, 1, pygen_variable_caps_DeviceGroup, 1, pygen_variable_exts_SPV_KHR_device_group, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"ViewIndex", 4440, 1, pygen_variable_caps_MultiView, 1, pygen_variable_exts_SPV_KHR_multiview, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, @@ -845,6 +1014,8 @@ static const spv_operand_desc_t pygen_variable_BuiltInEntries[] = { {"BaryCoordSmoothSampleAMD", 4997, 0, nullptr, 1, pygen_variable_exts_SPV_AMD_shader_explicit_vertex_parameter, {}, 0xffffffffu, 0xffffffffu}, {"BaryCoordPullModelAMD", 4998, 0, nullptr, 1, pygen_variable_exts_SPV_AMD_shader_explicit_vertex_parameter, {}, 0xffffffffu, 0xffffffffu}, {"FragStencilRefEXT", 5014, 1, pygen_variable_caps_StencilExportEXT, 1, pygen_variable_exts_SPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, + {"CoalescedInputCountAMDX", 5021, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ShaderIndexAMDX", 5073, 1, pygen_variable_caps_ShaderEnqueueAMDX, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"ViewportMaskNV", 5253, 2, pygen_variable_caps_ShaderViewportMaskNVMeshShadingNV, 2, pygen_variable_exts_SPV_NV_mesh_shaderSPV_NV_viewport_array2, {}, 0xffffffffu, 0xffffffffu}, {"SecondaryPositionNV", 5257, 1, pygen_variable_caps_ShaderStereoViewNV, 1, pygen_variable_exts_SPV_NV_stereo_view_rendering, {}, 0xffffffffu, 0xffffffffu}, {"SecondaryViewportMaskNV", 5258, 1, pygen_variable_caps_ShaderStereoViewNV, 1, pygen_variable_exts_SPV_NV_stereo_view_rendering, {}, 0xffffffffu, 0xffffffffu}, @@ -867,56 +1038,66 @@ static const spv_operand_desc_t pygen_variable_BuiltInEntries[] = { {"FragmentSizeNV", 5292, 2, pygen_variable_caps_ShadingRateNVFragmentDensityEXT, 2, pygen_variable_exts_SPV_EXT_fragment_invocation_densitySPV_NV_shading_rate, {}, 0xffffffffu, 0xffffffffu}, {"FragInvocationCountEXT", 5293, 2, pygen_variable_caps_FragmentDensityEXTShadingRateNV, 2, pygen_variable_exts_SPV_EXT_fragment_invocation_densitySPV_NV_shading_rate, {}, 0xffffffffu, 0xffffffffu}, {"InvocationsPerPixelNV", 5293, 2, pygen_variable_caps_ShadingRateNVFragmentDensityEXT, 2, pygen_variable_exts_SPV_EXT_fragment_invocation_densitySPV_NV_shading_rate, {}, 0xffffffffu, 0xffffffffu}, - {"LaunchIdNV", 5319, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"PrimitivePointIndicesEXT", 5294, 1, pygen_variable_caps_MeshShadingEXT, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"PrimitiveLineIndicesEXT", 5295, 1, pygen_variable_caps_MeshShadingEXT, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"PrimitiveTriangleIndicesEXT", 5296, 1, pygen_variable_caps_MeshShadingEXT, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, + {"CullPrimitiveEXT", 5299, 1, pygen_variable_caps_MeshShadingEXT, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"LaunchIdKHR", 5319, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"LaunchSizeNV", 5320, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"LaunchIdNV", 5319, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"LaunchSizeKHR", 5320, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"WorldRayOriginNV", 5321, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"LaunchSizeNV", 5320, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"WorldRayOriginKHR", 5321, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"WorldRayDirectionNV", 5322, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"WorldRayOriginNV", 5321, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"WorldRayDirectionKHR", 5322, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"ObjectRayOriginNV", 5323, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"WorldRayDirectionNV", 5322, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"ObjectRayOriginKHR", 5323, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"ObjectRayDirectionNV", 5324, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"ObjectRayOriginNV", 5323, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"ObjectRayDirectionKHR", 5324, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"RayTminNV", 5325, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"ObjectRayDirectionNV", 5324, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayTminKHR", 5325, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"RayTmaxNV", 5326, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"RayTminNV", 5325, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayTmaxKHR", 5326, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"InstanceCustomIndexNV", 5327, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"RayTmaxNV", 5326, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"InstanceCustomIndexKHR", 5327, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"ObjectToWorldNV", 5330, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"InstanceCustomIndexNV", 5327, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"ObjectToWorldKHR", 5330, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"WorldToObjectNV", 5331, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"ObjectToWorldNV", 5330, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"WorldToObjectKHR", 5331, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"WorldToObjectNV", 5331, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"HitTNV", 5332, 1, pygen_variable_caps_RayTracingNV, 1, pygen_variable_exts_SPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, - {"HitKindNV", 5333, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"HitKindKHR", 5333, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"HitKindNV", 5333, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"CurrentRayTimeNV", 5334, 1, pygen_variable_caps_RayTracingMotionBlurNV, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, {}, 0xffffffffu, 0xffffffffu}, - {"IncomingRayFlagsNV", 5351, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"HitTriangleVertexPositionsKHR", 5335, 1, pygen_variable_caps_RayTracingPositionFetchKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"HitMicroTriangleVertexPositionsNV", 5337, 1, pygen_variable_caps_RayTracingDisplacementMicromapNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"HitMicroTriangleVertexBarycentricsNV", 5344, 1, pygen_variable_caps_RayTracingDisplacementMicromapNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, {"IncomingRayFlagsKHR", 5351, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"IncomingRayFlagsNV", 5351, 2, pygen_variable_caps_RayTracingNVRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_tracingSPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayGeometryIndexKHR", 5352, 1, pygen_variable_caps_RayTracingKHR, 1, pygen_variable_exts_SPV_KHR_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"WarpsPerSMNV", 5374, 1, pygen_variable_caps_ShaderSMBuiltinsNV, 1, pygen_variable_exts_SPV_NV_shader_sm_builtins, {}, 0xffffffffu, 0xffffffffu}, {"SMCountNV", 5375, 1, pygen_variable_caps_ShaderSMBuiltinsNV, 1, pygen_variable_exts_SPV_NV_shader_sm_builtins, {}, 0xffffffffu, 0xffffffffu}, {"WarpIDNV", 5376, 1, pygen_variable_caps_ShaderSMBuiltinsNV, 1, pygen_variable_exts_SPV_NV_shader_sm_builtins, {}, 0xffffffffu, 0xffffffffu}, - {"SMIDNV", 5377, 1, pygen_variable_caps_ShaderSMBuiltinsNV, 1, pygen_variable_exts_SPV_NV_shader_sm_builtins, {}, 0xffffffffu, 0xffffffffu} + {"SMIDNV", 5377, 1, pygen_variable_caps_ShaderSMBuiltinsNV, 1, pygen_variable_exts_SPV_NV_shader_sm_builtins, {}, 0xffffffffu, 0xffffffffu}, + {"HitKindFrontFacingMicroTriangleNV", 5405, 1, pygen_variable_caps_RayTracingDisplacementMicromapNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"HitKindBackFacingMicroTriangleNV", 5406, 1, pygen_variable_caps_RayTracingDisplacementMicromapNV, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"CullMaskKHR", 6021, 1, pygen_variable_caps_RayCullMaskKHR, 1, pygen_variable_exts_SPV_KHR_ray_cull_mask, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_ScopeEntries[] = { - {"CrossDevice", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Device", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Workgroup", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Subgroup", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Invocation", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"CrossDevice", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Device", 1, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Workgroup", 2, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Subgroup", 3, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Invocation", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"QueueFamily", 5, 1, pygen_variable_caps_VulkanMemoryModel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"QueueFamilyKHR", 5, 1, pygen_variable_caps_VulkanMemoryModel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"ShaderCallKHR", 6, 1, pygen_variable_caps_RayTracingKHR, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_GroupOperationEntries[] = { - {"Reduce", 0, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InclusiveScan", 1, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ExclusiveScan", 2, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Reduce", 0, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InclusiveScan", 1, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ExclusiveScan", 2, 3, pygen_variable_caps_KernelGroupNonUniformArithmeticGroupNonUniformBallot, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"ClusteredReduce", 3, 1, pygen_variable_caps_GroupNonUniformClustered, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"PartitionedReduceNV", 6, 1, pygen_variable_caps_GroupNonUniformPartitionedNV, 1, pygen_variable_exts_SPV_NV_shader_subgroup_partitioned, {}, 0xffffffffu, 0xffffffffu}, {"PartitionedInclusiveScanNV", 7, 1, pygen_variable_caps_GroupNonUniformPartitionedNV, 1, pygen_variable_exts_SPV_NV_shader_subgroup_partitioned, {}, 0xffffffffu, 0xffffffffu}, @@ -924,68 +1105,68 @@ static const spv_operand_desc_t pygen_variable_GroupOperationEntries[] = { }; static const spv_operand_desc_t pygen_variable_KernelEnqueueFlagsEntries[] = { - {"NoWait", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WaitKernel", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"WaitWorkGroup", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu} + {"NoWait", 0, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WaitKernel", 1, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"WaitWorkGroup", 2, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { - {"Matrix", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Shader", 1, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Geometry", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Tessellation", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Addresses", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Linkage", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Kernel", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Vector16", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Float16Buffer", 8, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Float16", 9, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Float64", 10, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Int64", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Int64Atomics", 12, 1, pygen_variable_caps_Int64, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageBasic", 13, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageReadWrite", 14, 1, pygen_variable_caps_ImageBasic, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageMipmap", 15, 1, pygen_variable_caps_ImageBasic, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Pipes", 17, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Groups", 18, 0, nullptr, 1, pygen_variable_exts_SPV_AMD_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DeviceEnqueue", 19, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"LiteralSampler", 20, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"AtomicStorage", 21, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Int16", 22, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TessellationPointSize", 23, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GeometryPointSize", 24, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageGatherExtended", 25, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageImageMultisample", 27, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"UniformBufferArrayDynamicIndexing", 28, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampledImageArrayDynamicIndexing", 29, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageBufferArrayDynamicIndexing", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageImageArrayDynamicIndexing", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ClipDistance", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"CullDistance", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageCubeArray", 34, 1, pygen_variable_caps_SampledCubeArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampleRateShading", 35, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageRect", 36, 1, pygen_variable_caps_SampledRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampledRect", 37, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GenericPointer", 38, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Int8", 39, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InputAttachment", 40, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SparseResidency", 41, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MinLod", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Sampled1D", 43, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"Image1D", 44, 1, pygen_variable_caps_Sampled1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampledCubeArray", 45, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"SampledBuffer", 46, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageBuffer", 47, 1, pygen_variable_caps_SampledBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageMSArray", 48, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageImageExtendedFormats", 49, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"ImageQuery", 50, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"DerivativeControl", 51, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"InterpolationFunction", 52, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"TransformFeedback", 53, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"GeometryStreams", 54, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageImageReadWithoutFormat", 55, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"StorageImageWriteWithoutFormat", 56, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, - {"MultiViewport", 57, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, + {"Matrix", 0, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Shader", 1, 1, pygen_variable_caps_Matrix, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Geometry", 2, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Tessellation", 3, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Addresses", 4, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Linkage", 5, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Kernel", 6, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Vector16", 7, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Float16Buffer", 8, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Float16", 9, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Float64", 10, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Int64", 11, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Int64Atomics", 12, 1, pygen_variable_caps_Int64, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageBasic", 13, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageReadWrite", 14, 1, pygen_variable_caps_ImageBasic, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageMipmap", 15, 1, pygen_variable_caps_ImageBasic, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Pipes", 17, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Groups", 18, 0, nullptr, 1, pygen_variable_exts_SPV_AMD_shader_ballot, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DeviceEnqueue", 19, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"LiteralSampler", 20, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"AtomicStorage", 21, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Int16", 22, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TessellationPointSize", 23, 1, pygen_variable_caps_Tessellation, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GeometryPointSize", 24, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageGatherExtended", 25, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageImageMultisample", 27, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"UniformBufferArrayDynamicIndexing", 28, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampledImageArrayDynamicIndexing", 29, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageBufferArrayDynamicIndexing", 30, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageImageArrayDynamicIndexing", 31, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ClipDistance", 32, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"CullDistance", 33, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageCubeArray", 34, 1, pygen_variable_caps_SampledCubeArray, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampleRateShading", 35, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageRect", 36, 1, pygen_variable_caps_SampledRect, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampledRect", 37, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GenericPointer", 38, 1, pygen_variable_caps_Addresses, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Int8", 39, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InputAttachment", 40, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SparseResidency", 41, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MinLod", 42, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Sampled1D", 43, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"Image1D", 44, 1, pygen_variable_caps_Sampled1D, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampledCubeArray", 45, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"SampledBuffer", 46, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageBuffer", 47, 1, pygen_variable_caps_SampledBuffer, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageMSArray", 48, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageImageExtendedFormats", 49, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"ImageQuery", 50, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"DerivativeControl", 51, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"InterpolationFunction", 52, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"TransformFeedback", 53, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"GeometryStreams", 54, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageImageReadWithoutFormat", 55, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"StorageImageWriteWithoutFormat", 56, 1, pygen_variable_caps_Shader, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, + {"MultiViewport", 57, 1, pygen_variable_caps_Geometry, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,0), 0xffffffffu}, {"SubgroupDispatch", 58, 1, pygen_variable_caps_DeviceEnqueue, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"NamedBarrier", 59, 1, pygen_variable_caps_Kernel, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, {"PipeStorage", 60, 1, pygen_variable_caps_Pipes, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,1), 0xffffffffu}, @@ -1000,12 +1181,17 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"ShaderLayer", 69, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"ShaderViewportIndex", 70, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"UniformDecoration", 71, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"CoreBuiltinsARM", 4165, 0, nullptr, 1, pygen_variable_exts_SPV_ARM_core_builtins, {}, 0xffffffffu, 0xffffffffu}, + {"TileImageColorReadAccessEXT", 4166, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_tile_image, {}, 0xffffffffu, 0xffffffffu}, + {"TileImageDepthReadAccessEXT", 4167, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_tile_image, {}, 0xffffffffu, 0xffffffffu}, + {"TileImageStencilReadAccessEXT", 4168, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_tile_image, {}, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixLayoutsARM", 4201, 0, nullptr, 1, pygen_variable_exts_SPV_ARM_cooperative_matrix_layouts, {}, 0xffffffffu, 0xffffffffu}, {"FragmentShadingRateKHR", 4422, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_fragment_shading_rate, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupBallotKHR", 4423, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_shader_ballot, {}, 0xffffffffu, 0xffffffffu}, {"DrawParameters", 4427, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_shader_draw_parameters, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"WorkgroupMemoryExplicitLayoutKHR", 4428, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_workgroup_memory_explicit_layout, {}, 0xffffffffu, 0xffffffffu}, {"WorkgroupMemoryExplicitLayout8BitAccessKHR", 4429, 1, pygen_variable_caps_WorkgroupMemoryExplicitLayoutKHR, 1, pygen_variable_exts_SPV_KHR_workgroup_memory_explicit_layout, {}, 0xffffffffu, 0xffffffffu}, - {"WorkgroupMemoryExplicitLayout16BitAccessKHR", 4430, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_workgroup_memory_explicit_layout, {}, 0xffffffffu, 0xffffffffu}, + {"WorkgroupMemoryExplicitLayout16BitAccessKHR", 4430, 1, pygen_variable_caps_WorkgroupMemoryExplicitLayoutKHR, 1, pygen_variable_exts_SPV_KHR_workgroup_memory_explicit_layout, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupVoteKHR", 4431, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_subgroup_vote, {}, 0xffffffffu, 0xffffffffu}, {"StorageBuffer16BitAccess", 4433, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_16bit_storage, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, {"StorageUniformBufferBlock16", 4433, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_16bit_storage, {}, SPV_SPIRV_VERSION_WORD(1,3), 0xffffffffu}, @@ -1031,13 +1217,19 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"RayQueryKHR", 4472, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_ray_query, {}, 0xffffffffu, 0xffffffffu}, {"RayTraversalPrimitiveCullingKHR", 4478, 2, pygen_variable_caps_RayQueryKHRRayTracingKHR, 2, pygen_variable_exts_SPV_KHR_ray_querySPV_KHR_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayTracingKHR", 4479, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, + {"TextureSampleWeightedQCOM", 4484, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing, {}, 0xffffffffu, 0xffffffffu}, + {"TextureBoxFilterQCOM", 4485, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing, {}, 0xffffffffu, 0xffffffffu}, + {"TextureBlockMatchQCOM", 4486, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing, {}, 0xffffffffu, 0xffffffffu}, + {"TextureBlockMatch2QCOM", 4498, 0, nullptr, 1, pygen_variable_exts_SPV_QCOM_image_processing2, {}, 0xffffffffu, 0xffffffffu}, {"Float16ImageAMD", 5008, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMD_gpu_shader_half_float_fetch, {}, 0xffffffffu, 0xffffffffu}, {"ImageGatherBiasLodAMD", 5009, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMD_texture_gather_bias_lod, {}, 0xffffffffu, 0xffffffffu}, {"FragmentMaskAMD", 5010, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMD_shader_fragment_mask, {}, 0xffffffffu, 0xffffffffu}, {"StencilExportEXT", 5013, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_shader_stencil_export, {}, 0xffffffffu, 0xffffffffu}, {"ImageReadWriteLodAMD", 5015, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMD_shader_image_load_store_lod, {}, 0xffffffffu, 0xffffffffu}, {"Int64ImageEXT", 5016, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_shader_image_int64, {}, 0xffffffffu, 0xffffffffu}, - {"ShaderClockKHR", 5055, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_shader_clock, {}, 0xffffffffu, 0xffffffffu}, + {"ShaderClockKHR", 5055, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_shader_clock, {}, 0xffffffffu, 0xffffffffu}, + {"ShaderEnqueueAMDX", 5067, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_AMDX_shader_enqueue, {}, 0xffffffffu, 0xffffffffu}, + {"QuadControlKHR", 5087, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_quad_control, {}, 0xffffffffu, 0xffffffffu}, {"SampleMaskOverrideCoverageNV", 5249, 1, pygen_variable_caps_SampleRateShading, 1, pygen_variable_exts_SPV_NV_sample_mask_override_coverage, {}, 0xffffffffu, 0xffffffffu}, {"GeometryShaderPassthroughNV", 5251, 1, pygen_variable_caps_Geometry, 1, pygen_variable_exts_SPV_NV_geometry_shader_passthrough, {}, 0xffffffffu, 0xffffffffu}, {"ShaderViewportIndexLayerEXT", 5254, 1, pygen_variable_caps_MultiViewport, 2, pygen_variable_exts_SPV_EXT_shader_viewport_index_layerSPV_NV_viewport_array2, {}, 0xffffffffu, 0xffffffffu}, @@ -1048,6 +1240,7 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"FragmentFullyCoveredEXT", 5265, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_fragment_fully_covered, {}, 0xffffffffu, 0xffffffffu}, {"MeshShadingNV", 5266, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_NV_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"ImageFootprintNV", 5282, 0, nullptr, 1, pygen_variable_exts_SPV_NV_shader_image_footprint, {}, 0xffffffffu, 0xffffffffu}, + {"MeshShadingEXT", 5283, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_mesh_shader, {}, 0xffffffffu, 0xffffffffu}, {"FragmentBarycentricKHR", 5284, 0, nullptr, 2, pygen_variable_exts_SPV_KHR_fragment_shader_barycentricSPV_NV_fragment_shader_barycentric, {}, 0xffffffffu, 0xffffffffu}, {"FragmentBarycentricNV", 5284, 0, nullptr, 2, pygen_variable_exts_SPV_KHR_fragment_shader_barycentricSPV_NV_fragment_shader_barycentric, {}, 0xffffffffu, 0xffffffffu}, {"ComputeDerivativeGroupQuadsNV", 5288, 0, nullptr, 1, pygen_variable_exts_SPV_NV_compute_shader_derivatives, {}, 0xffffffffu, 0xffffffffu}, @@ -1078,6 +1271,7 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"UniformTexelBufferArrayNonUniformIndexingEXT", 5311, 2, pygen_variable_caps_SampledBufferShaderNonUniform, 1, pygen_variable_exts_SPV_EXT_descriptor_indexing, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"StorageTexelBufferArrayNonUniformIndexing", 5312, 2, pygen_variable_caps_ImageBufferShaderNonUniform, 1, pygen_variable_exts_SPV_EXT_descriptor_indexing, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, {"StorageTexelBufferArrayNonUniformIndexingEXT", 5312, 2, pygen_variable_caps_ImageBufferShaderNonUniform, 1, pygen_variable_exts_SPV_EXT_descriptor_indexing, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, + {"RayTracingPositionFetchKHR", 5336, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_ray_tracing_position_fetch, {}, 0xffffffffu, 0xffffffffu}, {"RayTracingNV", 5340, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_NV_ray_tracing, {}, 0xffffffffu, 0xffffffffu}, {"RayTracingMotionBlurNV", 5341, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_NV_ray_tracing_motion_blur, {}, 0xffffffffu, 0xffffffffu}, {"VulkanMemoryModel", 5345, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_vulkan_memory_model, {}, SPV_SPIRV_VERSION_WORD(1,5), 0xffffffffu}, @@ -1095,7 +1289,14 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"FragmentShaderPixelInterlockEXT", 5378, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_fragment_shader_interlock, {}, 0xffffffffu, 0xffffffffu}, {"DemoteToHelperInvocation", 5379, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_demote_to_helper_invocation, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, {"DemoteToHelperInvocationEXT", 5379, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_EXT_demote_to_helper_invocation, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"DisplacementMicromapNV", 5380, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_NV_displacement_micromap, {}, 0xffffffffu, 0xffffffffu}, + {"RayTracingOpacityMicromapEXT", 5381, 2, pygen_variable_caps_RayQueryKHRRayTracingKHR, 1, pygen_variable_exts_SPV_EXT_opacity_micromap, {}, 0xffffffffu, 0xffffffffu}, + {"ShaderInvocationReorderNV", 5383, 1, pygen_variable_caps_RayTracingKHR, 1, pygen_variable_exts_SPV_NV_shader_invocation_reorder, {}, 0xffffffffu, 0xffffffffu}, {"BindlessTextureNV", 5390, 0, nullptr, 1, pygen_variable_exts_SPV_NV_bindless_texture, {}, 0xffffffffu, 0xffffffffu}, + {"RayQueryPositionFetchKHR", 5391, 1, pygen_variable_caps_Shader, 1, pygen_variable_exts_SPV_KHR_ray_tracing_position_fetch, {}, 0xffffffffu, 0xffffffffu}, + {"AtomicFloat16VectorNV", 5404, 0, nullptr, 1, pygen_variable_exts_SPV_NV_shader_atomic_fp16_vector, {}, 0xffffffffu, 0xffffffffu}, + {"RayTracingDisplacementMicromapNV", 5409, 1, pygen_variable_caps_RayTracingKHR, 1, pygen_variable_exts_SPV_NV_displacement_micromap, {}, 0xffffffffu, 0xffffffffu}, + {"RawAccessChainsNV", 5414, 0, nullptr, 1, pygen_variable_exts_SPV_NV_raw_access_chains, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupShuffleINTEL", 5568, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_subgroups, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupBufferBlockIOINTEL", 5569, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_subgroups, {}, 0xffffffffu, 0xffffffffu}, {"SubgroupImageBlockIOINTEL", 5570, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_subgroups, {}, 0xffffffffu, 0xffffffffu}, @@ -1128,9 +1329,13 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"FPGAMemoryAccessesINTEL", 5898, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_memory_accesses, {}, 0xffffffffu, 0xffffffffu}, {"FPGAClusterAttributesINTEL", 5904, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_cluster_attributes, {}, 0xffffffffu, 0xffffffffu}, {"LoopFuseINTEL", 5906, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_loop_fuse, {}, 0xffffffffu, 0xffffffffu}, + {"FPGADSPControlINTEL", 5908, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_dsp_control, {}, 0xffffffffu, 0xffffffffu}, + {"MemoryAccessAliasingINTEL", 5910, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_memory_access_aliasing, {}, 0xffffffffu, 0xffffffffu}, + {"FPGAInvocationPipeliningAttributesINTEL", 5916, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_invocation_pipelining_attributes, {}, 0xffffffffu, 0xffffffffu}, {"FPGABufferLocationINTEL", 5920, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_buffer_location, {}, 0xffffffffu, 0xffffffffu}, {"ArbitraryPrecisionFixedPointINTEL", 5922, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_arbitrary_precision_fixed_point, {}, 0xffffffffu, 0xffffffffu}, {"USMStorageClassesINTEL", 5935, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_usm_storage_classes, {}, 0xffffffffu, 0xffffffffu}, + {"RuntimeAlignedAttributeINTEL", 5939, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_runtime_aligned, {}, 0xffffffffu, 0xffffffffu}, {"IOPipesINTEL", 5943, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_io_pipes, {}, 0xffffffffu, 0xffffffffu}, {"BlockingPipesINTEL", 5945, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_blocking_pipes, {}, 0xffffffffu, 0xffffffffu}, {"FPGARegINTEL", 5948, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_reg, {}, 0xffffffffu, 0xffffffffu}, @@ -1142,13 +1347,31 @@ static const spv_operand_desc_t pygen_variable_CapabilityEntries[] = { {"DotProductInput4x8BitPackedKHR", 6018, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, {"DotProduct", 6019, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, {"DotProductKHR", 6019, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu}, + {"RayCullMaskKHR", 6020, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_ray_cull_mask, {}, 0xffffffffu, 0xffffffffu}, + {"CooperativeMatrixKHR", 6022, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_cooperative_matrix, {}, 0xffffffffu, 0xffffffffu}, + {"ReplicatedCompositesEXT", 6024, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_replicated_composites, {}, 0xffffffffu, 0xffffffffu}, {"BitInstructions", 6025, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_bit_instructions, {}, 0xffffffffu, 0xffffffffu}, + {"GroupNonUniformRotateKHR", 6026, 1, pygen_variable_caps_GroupNonUniform, 1, pygen_variable_exts_SPV_KHR_subgroup_rotate, {}, 0xffffffffu, 0xffffffffu}, + {"FloatControls2", 6029, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_float_controls2, {}, 0xffffffffu, 0xffffffffu}, {"AtomicFloat32AddEXT", 6033, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_atomic_float_add, {}, 0xffffffffu, 0xffffffffu}, {"AtomicFloat64AddEXT", 6034, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_atomic_float_add, {}, 0xffffffffu, 0xffffffffu}, - {"LongConstantCompositeINTEL", 6089, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_long_constant_composite, {}, 0xffffffffu, 0xffffffffu}, + {"LongCompositesINTEL", 6089, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_long_composites, {}, 0xffffffffu, 0xffffffffu}, {"OptNoneINTEL", 6094, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_optnone, {}, 0xffffffffu, 0xffffffffu}, {"AtomicFloat16AddEXT", 6095, 0, nullptr, 1, pygen_variable_exts_SPV_EXT_shader_atomic_float16_add, {}, 0xffffffffu, 0xffffffffu}, - {"DebugInfoModuleINTEL", 6114, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_debug_module, {}, 0xffffffffu, 0xffffffffu} + {"DebugInfoModuleINTEL", 6114, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_debug_module, {}, 0xffffffffu, 0xffffffffu}, + {"BFloat16ConversionINTEL", 6115, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_bfloat16_conversion, {}, 0xffffffffu, 0xffffffffu}, + {"SplitBarrierINTEL", 6141, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_split_barrier, {}, 0xffffffffu, 0xffffffffu}, + {"FPGAClusterAttributesV2INTEL", 6150, 1, pygen_variable_caps_FPGAClusterAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_fpga_cluster_attributes, {}, 0xffffffffu, 0xffffffffu}, + {"FPGAKernelAttributesv2INTEL", 6161, 1, pygen_variable_caps_FPGAKernelAttributesINTEL, 1, pygen_variable_exts_SPV_INTEL_kernel_attributes, {}, 0xffffffffu, 0xffffffffu}, + {"FPMaxErrorINTEL", 6169, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fp_max_error, {}, 0xffffffffu, 0xffffffffu}, + {"FPGALatencyControlINTEL", 6171, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_latency_control, {}, 0xffffffffu, 0xffffffffu}, + {"FPGAArgumentInterfacesINTEL", 6174, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_fpga_argument_interfaces, {}, 0xffffffffu, 0xffffffffu}, + {"GlobalVariableHostAccessINTEL", 6187, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_global_variable_host_access, {}, 0xffffffffu, 0xffffffffu}, + {"GlobalVariableFPGADecorationsINTEL", 6189, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_global_variable_fpga_decorations, {}, 0xffffffffu, 0xffffffffu}, + {"GroupUniformArithmeticKHR", 6400, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_uniform_group_instructions, {}, 0xffffffffu, 0xffffffffu}, + {"MaskedGatherScatterINTEL", 6427, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_masked_gather_scatter, {}, 0xffffffffu, 0xffffffffu}, + {"CacheControlsINTEL", 6441, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_cache_controls, {}, 0xffffffffu, 0xffffffffu}, + {"RegisterLimitsINTEL", 6460, 0, nullptr, 1, pygen_variable_exts_SPV_INTEL_maximum_registers, {}, 0xffffffffu, 0xffffffffu} }; static const spv_operand_desc_t pygen_variable_RayQueryIntersectionEntries[] = { @@ -1172,6 +1395,52 @@ static const spv_operand_desc_t pygen_variable_PackedVectorFormatEntries[] = { {"PackedVectorFormat4x8BitKHR", 0, 0, nullptr, 1, pygen_variable_exts_SPV_KHR_integer_dot_product, {}, SPV_SPIRV_VERSION_WORD(1,6), 0xffffffffu} }; +static const spv_operand_desc_t pygen_variable_CooperativeMatrixOperandsEntries[] = { + {"NoneKHR", 0x0000, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixASignedComponentsKHR", 0x0001, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixBSignedComponentsKHR", 0x0002, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixCSignedComponentsKHR", 0x0004, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixResultSignedComponentsKHR", 0x0008, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"SaturatingAccumulationKHR", 0x0010, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_CooperativeMatrixLayoutEntries[] = { + {"RowMajorKHR", 0, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ColumnMajorKHR", 1, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"RowBlockedInterleavedARM", 4202, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ColumnBlockedInterleavedARM", 4203, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_CooperativeMatrixUseEntries[] = { + {"MatrixAKHR", 0, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixBKHR", 1, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"MatrixAccumulatorKHR", 2, 0, nullptr, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_InitializationModeQualifierEntries[] = { + {"InitOnDeviceReprogramINTEL", 0, 1, pygen_variable_caps_GlobalVariableFPGADecorationsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"InitOnDeviceResetINTEL", 1, 1, pygen_variable_caps_GlobalVariableFPGADecorationsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_LoadCacheControlEntries[] = { + {"UncachedINTEL", 0, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"CachedINTEL", 1, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"StreamingINTEL", 2, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"InvalidateAfterReadINTEL", 3, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"ConstCachedINTEL", 4, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_StoreCacheControlEntries[] = { + {"UncachedINTEL", 0, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"WriteThroughINTEL", 1, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"WriteBackINTEL", 2, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu}, + {"StreamingINTEL", 3, 1, pygen_variable_caps_CacheControlsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + +static const spv_operand_desc_t pygen_variable_NamedMaximumNumberOfRegistersEntries[] = { + {"AutoINTEL", 0, 1, pygen_variable_caps_RegisterLimitsINTEL, 0, nullptr, {}, 0xffffffffu, 0xffffffffu} +}; + static const spv_operand_desc_t pygen_variable_DebugInfoFlagsEntries[] = { {"None", 0x0000, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, {"FlagIsProtected", 0x01, 0, nullptr, 0, nullptr, {}, SPV_SPIRV_VERSION_WORD(1, 0), 0xffffffffu}, @@ -1301,6 +1570,7 @@ static const spv_operand_desc_group_t pygen_variable_OperandInfoTable[] = { {SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO, ARRAY_SIZE(pygen_variable_KernelProfilingInfoEntries), pygen_variable_KernelProfilingInfoEntries}, {SPV_OPERAND_TYPE_RAY_FLAGS, ARRAY_SIZE(pygen_variable_RayFlagsEntries), pygen_variable_RayFlagsEntries}, {SPV_OPERAND_TYPE_FRAGMENT_SHADING_RATE, ARRAY_SIZE(pygen_variable_FragmentShadingRateEntries), pygen_variable_FragmentShadingRateEntries}, + {SPV_OPERAND_TYPE_RAW_ACCESS_CHAIN_OPERANDS, ARRAY_SIZE(pygen_variable_RawAccessChainOperandsEntries), pygen_variable_RawAccessChainOperandsEntries}, {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, ARRAY_SIZE(pygen_variable_SourceLanguageEntries), pygen_variable_SourceLanguageEntries}, {SPV_OPERAND_TYPE_EXECUTION_MODEL, ARRAY_SIZE(pygen_variable_ExecutionModelEntries), pygen_variable_ExecutionModelEntries}, {SPV_OPERAND_TYPE_ADDRESSING_MODEL, ARRAY_SIZE(pygen_variable_AddressingModelEntries), pygen_variable_AddressingModelEntries}, @@ -1320,6 +1590,7 @@ static const spv_operand_desc_group_t pygen_variable_OperandInfoTable[] = { {SPV_OPERAND_TYPE_OVERFLOW_MODES, ARRAY_SIZE(pygen_variable_OverflowModesEntries), pygen_variable_OverflowModesEntries}, {SPV_OPERAND_TYPE_LINKAGE_TYPE, ARRAY_SIZE(pygen_variable_LinkageTypeEntries), pygen_variable_LinkageTypeEntries}, {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, ARRAY_SIZE(pygen_variable_AccessQualifierEntries), pygen_variable_AccessQualifierEntries}, + {SPV_OPERAND_TYPE_HOST_ACCESS_QUALIFIER, ARRAY_SIZE(pygen_variable_HostAccessQualifierEntries), pygen_variable_HostAccessQualifierEntries}, {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE, ARRAY_SIZE(pygen_variable_FunctionParameterAttributeEntries), pygen_variable_FunctionParameterAttributeEntries}, {SPV_OPERAND_TYPE_DECORATION, ARRAY_SIZE(pygen_variable_DecorationEntries), pygen_variable_DecorationEntries}, {SPV_OPERAND_TYPE_BUILT_IN, ARRAY_SIZE(pygen_variable_BuiltInEntries), pygen_variable_BuiltInEntries}, @@ -1331,6 +1602,13 @@ static const spv_operand_desc_group_t pygen_variable_OperandInfoTable[] = { {SPV_OPERAND_TYPE_RAY_QUERY_COMMITTED_INTERSECTION_TYPE, ARRAY_SIZE(pygen_variable_RayQueryCommittedIntersectionTypeEntries), pygen_variable_RayQueryCommittedIntersectionTypeEntries}, {SPV_OPERAND_TYPE_RAY_QUERY_CANDIDATE_INTERSECTION_TYPE, ARRAY_SIZE(pygen_variable_RayQueryCandidateIntersectionTypeEntries), pygen_variable_RayQueryCandidateIntersectionTypeEntries}, {SPV_OPERAND_TYPE_PACKED_VECTOR_FORMAT, ARRAY_SIZE(pygen_variable_PackedVectorFormatEntries), pygen_variable_PackedVectorFormatEntries}, + {SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_OPERANDS, ARRAY_SIZE(pygen_variable_CooperativeMatrixOperandsEntries), pygen_variable_CooperativeMatrixOperandsEntries}, + {SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_LAYOUT, ARRAY_SIZE(pygen_variable_CooperativeMatrixLayoutEntries), pygen_variable_CooperativeMatrixLayoutEntries}, + {SPV_OPERAND_TYPE_COOPERATIVE_MATRIX_USE, ARRAY_SIZE(pygen_variable_CooperativeMatrixUseEntries), pygen_variable_CooperativeMatrixUseEntries}, + {SPV_OPERAND_TYPE_INITIALIZATION_MODE_QUALIFIER, ARRAY_SIZE(pygen_variable_InitializationModeQualifierEntries), pygen_variable_InitializationModeQualifierEntries}, + {SPV_OPERAND_TYPE_LOAD_CACHE_CONTROL, ARRAY_SIZE(pygen_variable_LoadCacheControlEntries), pygen_variable_LoadCacheControlEntries}, + {SPV_OPERAND_TYPE_STORE_CACHE_CONTROL, ARRAY_SIZE(pygen_variable_StoreCacheControlEntries), pygen_variable_StoreCacheControlEntries}, + {SPV_OPERAND_TYPE_NAMED_MAXIMUM_NUMBER_OF_REGISTERS, ARRAY_SIZE(pygen_variable_NamedMaximumNumberOfRegistersEntries), pygen_variable_NamedMaximumNumberOfRegistersEntries}, {SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS, ARRAY_SIZE(pygen_variable_DebugInfoFlagsEntries), pygen_variable_DebugInfoFlagsEntries}, {SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING, ARRAY_SIZE(pygen_variable_DebugBaseTypeAttributeEncodingEntries), pygen_variable_DebugBaseTypeAttributeEncodingEntries}, {SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE, ARRAY_SIZE(pygen_variable_DebugCompositeTypeEntries), pygen_variable_DebugCompositeTypeEntries}, @@ -1344,6 +1622,8 @@ static const spv_operand_desc_group_t pygen_variable_OperandInfoTable[] = { {SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_IMPORTED_ENTITY, ARRAY_SIZE(pygen_variable_CLDEBUG100_DebugImportedEntityEntries), pygen_variable_CLDEBUG100_DebugImportedEntityEntries}, {SPV_OPERAND_TYPE_OPTIONAL_IMAGE, ARRAY_SIZE(pygen_variable_ImageOperandsEntries), pygen_variable_ImageOperandsEntries}, {SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, ARRAY_SIZE(pygen_variable_MemoryAccessEntries), pygen_variable_MemoryAccessEntries}, + {SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS, ARRAY_SIZE(pygen_variable_RawAccessChainOperandsEntries), pygen_variable_RawAccessChainOperandsEntries}, {SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER, ARRAY_SIZE(pygen_variable_AccessQualifierEntries), pygen_variable_AccessQualifierEntries}, - {SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT, ARRAY_SIZE(pygen_variable_PackedVectorFormatEntries), pygen_variable_PackedVectorFormatEntries} + {SPV_OPERAND_TYPE_OPTIONAL_PACKED_VECTOR_FORMAT, ARRAY_SIZE(pygen_variable_PackedVectorFormatEntries), pygen_variable_PackedVectorFormatEntries}, + {SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS, ARRAY_SIZE(pygen_variable_CooperativeMatrixOperandsEntries), pygen_variable_CooperativeMatrixOperandsEntries} }; \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/CMakeLists.txt b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/CMakeLists.txt index 7508dc028..4e7d92d5e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/CMakeLists.txt +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/CMakeLists.txt @@ -12,8 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. set(SPIRV_TOOLS_OPT_SOURCES + fix_func_call_arguments.h aggressive_dead_code_elim_pass.h amd_ext_to_khr.h + analyze_live_input_pass.h basic_block.h block_merge_pass.h block_merge_util.h @@ -45,7 +47,9 @@ set(SPIRV_TOOLS_OPT_SOURCES eliminate_dead_constant_pass.h eliminate_dead_functions_pass.h eliminate_dead_functions_util.h + eliminate_dead_io_components_pass.h eliminate_dead_members_pass.h + eliminate_dead_output_stores_pass.h empty_pass.h feature_manager.h fix_storage_class.h @@ -66,11 +70,14 @@ set(SPIRV_TOOLS_OPT_SOURCES instruction.h instruction_list.h instrument_pass.h + interface_var_sroa.h + invocation_interlock_placement_pass.h interp_fixup_pass.h ir_builder.h ir_context.h ir_loader.h licm_pass.h + liveness.h local_access_chain_convert_pass.h local_redundancy_elimination.h local_single_block_elim_pass.h @@ -87,6 +94,7 @@ set(SPIRV_TOOLS_OPT_SOURCES loop_unswitch_pass.h mem_pass.h merge_return_pass.h + modify_maximal_reconvergence.h module.h null_pass.h passes.h @@ -99,6 +107,7 @@ set(SPIRV_TOOLS_OPT_SOURCES reflect.h register_pressure.h relax_float_ops_pass.h + remove_dontinline_pass.h remove_duplicates_pass.h remove_unused_interface_variables_pass.h replace_desc_array_access_using_var_index.h @@ -114,7 +123,9 @@ set(SPIRV_TOOLS_OPT_SOURCES strip_debug_info_pass.h strip_nonsemantic_info_pass.h struct_cfg_analysis.h + switch_descriptorset_pass.h tree_iterator.h + trim_capabilities_pass.h type_manager.h types.h unify_const_pass.h @@ -124,8 +135,10 @@ set(SPIRV_TOOLS_OPT_SOURCES workaround1209.h wrap_opkill.h + fix_func_call_arguments.cpp aggressive_dead_code_elim_pass.cpp amd_ext_to_khr.cpp + analyze_live_input_pass.cpp basic_block.cpp block_merge_pass.cpp block_merge_util.cpp @@ -157,7 +170,9 @@ set(SPIRV_TOOLS_OPT_SOURCES eliminate_dead_constant_pass.cpp eliminate_dead_functions_pass.cpp eliminate_dead_functions_util.cpp + eliminate_dead_io_components_pass.cpp eliminate_dead_members_pass.cpp + eliminate_dead_output_stores_pass.cpp feature_manager.cpp fix_storage_class.cpp flatten_decoration_pass.cpp @@ -177,10 +192,13 @@ set(SPIRV_TOOLS_OPT_SOURCES instruction.cpp instruction_list.cpp instrument_pass.cpp + interface_var_sroa.cpp + invocation_interlock_placement_pass.cpp interp_fixup_pass.cpp ir_context.cpp ir_loader.cpp licm_pass.cpp + liveness.cpp local_access_chain_convert_pass.cpp local_redundancy_elimination.cpp local_single_block_elim_pass.cpp @@ -197,6 +215,7 @@ set(SPIRV_TOOLS_OPT_SOURCES loop_unswitch_pass.cpp mem_pass.cpp merge_return_pass.cpp + modify_maximal_reconvergence.cpp module.cpp optimizer.cpp pass.cpp @@ -207,6 +226,7 @@ set(SPIRV_TOOLS_OPT_SOURCES redundancy_elimination.cpp register_pressure.cpp relax_float_ops_pass.cpp + remove_dontinline_pass.cpp remove_duplicates_pass.cpp remove_unused_interface_variables_pass.cpp replace_desc_array_access_using_var_index.cpp @@ -222,6 +242,8 @@ set(SPIRV_TOOLS_OPT_SOURCES strip_debug_info_pass.cpp strip_nonsemantic_info_pass.cpp struct_cfg_analysis.cpp + switch_descriptorset_pass.cpp + trim_capabilities_pass.cpp type_manager.cpp types.cpp unify_const_pass.cpp @@ -257,10 +279,7 @@ set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries") spvtools_check_symbol_exports(SPIRV-Tools-opt) if(ENABLE_SPIRV_TOOLS_INSTALL) - install(TARGETS SPIRV-Tools-opt EXPORT SPIRV-Tools-optTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS SPIRV-Tools-opt EXPORT SPIRV-Tools-optTargets) export(EXPORT SPIRV-Tools-optTargets FILE SPIRV-Tools-optTargets.cmake) spvtools_config_package_dir(SPIRV-Tools-opt PACKAGE_DIR) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp index 9827c535a..4737da5f9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.cpp @@ -21,61 +21,58 @@ #include #include "source/cfa.h" -#include "source/latest_version_glsl_std_450_header.h" #include "source/opt/eliminate_dead_functions_util.h" #include "source/opt/ir_builder.h" -#include "source/opt/iterator.h" #include "source/opt/reflect.h" #include "source/spirv_constant.h" #include "source/util/string_utils.h" namespace spvtools { namespace opt { - namespace { -const uint32_t kTypePointerStorageClassInIdx = 0; -const uint32_t kEntryPointFunctionIdInIdx = 1; -const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; -const uint32_t kLoopMergeContinueBlockIdInIdx = 1; -const uint32_t kCopyMemoryTargetAddrInIdx = 0; -const uint32_t kCopyMemorySourceAddrInIdx = 1; -const uint32_t kLoadSourceAddrInIdx = 0; -const uint32_t kDebugDeclareOperandVariableIndex = 5; -const uint32_t kGlobalVariableVariableIndex = 12; +constexpr uint32_t kTypePointerStorageClassInIdx = 0; +constexpr uint32_t kEntryPointFunctionIdInIdx = 1; +constexpr uint32_t kSelectionMergeMergeBlockIdInIdx = 0; +constexpr uint32_t kLoopMergeContinueBlockIdInIdx = 1; +constexpr uint32_t kCopyMemoryTargetAddrInIdx = 0; +constexpr uint32_t kCopyMemorySourceAddrInIdx = 1; +constexpr uint32_t kLoadSourceAddrInIdx = 0; +constexpr uint32_t kDebugDeclareOperandVariableIndex = 5; +constexpr uint32_t kGlobalVariableVariableIndex = 12; // Sorting functor to present annotation instructions in an easy-to-process // order. The functor orders by opcode first and falls back on unique id // ordering if both instructions have the same opcode. // // Desired priority: -// SpvOpGroupDecorate -// SpvOpGroupMemberDecorate -// SpvOpDecorate -// SpvOpMemberDecorate -// SpvOpDecorateId -// SpvOpDecorateStringGOOGLE -// SpvOpDecorationGroup +// spv::Op::OpGroupDecorate +// spv::Op::OpGroupMemberDecorate +// spv::Op::OpDecorate +// spv::Op::OpMemberDecorate +// spv::Op::OpDecorateId +// spv::Op::OpDecorateStringGOOGLE +// spv::Op::OpDecorationGroup struct DecorationLess { bool operator()(const Instruction* lhs, const Instruction* rhs) const { assert(lhs && rhs); - SpvOp lhsOp = lhs->opcode(); - SpvOp rhsOp = rhs->opcode(); + spv::Op lhsOp = lhs->opcode(); + spv::Op rhsOp = rhs->opcode(); if (lhsOp != rhsOp) { #define PRIORITY_CASE(opcode) \ if (lhsOp == opcode && rhsOp != opcode) return true; \ if (rhsOp == opcode && lhsOp != opcode) return false; // OpGroupDecorate and OpGroupMember decorate are highest priority to // eliminate dead targets early and simplify subsequent checks. - PRIORITY_CASE(SpvOpGroupDecorate) - PRIORITY_CASE(SpvOpGroupMemberDecorate) - PRIORITY_CASE(SpvOpDecorate) - PRIORITY_CASE(SpvOpMemberDecorate) - PRIORITY_CASE(SpvOpDecorateId) - PRIORITY_CASE(SpvOpDecorateStringGOOGLE) + PRIORITY_CASE(spv::Op::OpGroupDecorate) + PRIORITY_CASE(spv::Op::OpGroupMemberDecorate) + PRIORITY_CASE(spv::Op::OpDecorate) + PRIORITY_CASE(spv::Op::OpMemberDecorate) + PRIORITY_CASE(spv::Op::OpDecorateId) + PRIORITY_CASE(spv::Op::OpDecorateStringGOOGLE) // OpDecorationGroup is lowest priority to ensure use/def chains remain // usable for instructions that target this group. - PRIORITY_CASE(SpvOpDecorationGroup) + PRIORITY_CASE(spv::Op::OpDecorationGroup) #undef PRIORITY_CASE } @@ -86,25 +83,26 @@ struct DecorationLess { } // namespace -bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, uint32_t storageClass) { +bool AggressiveDCEPass::IsVarOfStorage(uint32_t varId, + spv::StorageClass storageClass) { if (varId == 0) return false; const Instruction* varInst = get_def_use_mgr()->GetDef(varId); - const SpvOp op = varInst->opcode(); - if (op != SpvOpVariable) return false; + const spv::Op op = varInst->opcode(); + if (op != spv::Op::OpVariable) return false; const uint32_t varTypeId = varInst->type_id(); const Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); - if (varTypeInst->opcode() != SpvOpTypePointer) return false; - return varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) == - storageClass; + if (varTypeInst->opcode() != spv::Op::OpTypePointer) return false; + return spv::StorageClass(varTypeInst->GetSingleWordInOperand( + kTypePointerStorageClassInIdx)) == storageClass; } bool AggressiveDCEPass::IsLocalVar(uint32_t varId, Function* func) { - if (IsVarOfStorage(varId, SpvStorageClassFunction)) { + if (IsVarOfStorage(varId, spv::StorageClass::Function)) { return true; } - if (!IsVarOfStorage(varId, SpvStorageClassPrivate) && - !IsVarOfStorage(varId, SpvStorageClassWorkgroup)) { + if (!IsVarOfStorage(varId, spv::StorageClass::Private) && + !IsVarOfStorage(varId, spv::StorageClass::Workgroup)) { return false; } @@ -122,21 +120,21 @@ void AggressiveDCEPass::AddStores(Function* func, uint32_t ptrId) { if (blk && blk->GetParent() != func) return; switch (user->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpCopyObject: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpCopyObject: this->AddStores(func, user->result_id()); break; - case SpvOpLoad: + case spv::Op::OpLoad: break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: if (user->GetSingleWordInOperand(kCopyMemoryTargetAddrInIdx) == ptrId) { AddToWorklist(user); } break; // If default, assume it stores e.g. frexp, modf, function call - case SpvOpStore: + case spv::Op::OpStore: default: AddToWorklist(user); break; @@ -154,11 +152,12 @@ bool AggressiveDCEPass::AllExtensionsSupported() const { // Only allow NonSemantic.Shader.DebugInfo.100, we cannot safely optimise // around unknown extended instruction sets even if they are non-semantic for (auto& inst : context()->module()->ext_inst_imports()) { - assert(inst.opcode() == SpvOpExtInstImport && + assert(inst.opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = inst.GetInOperand(0).AsString(); if (spvtools::utils::starts_with(extension_name, "NonSemantic.") && - extension_name != "NonSemantic.Shader.DebugInfo.100") { + (extension_name != "NonSemantic.Shader.DebugInfo.100") && + (extension_name != "NonSemantic.DebugPrintf")) { return false; } } @@ -172,11 +171,11 @@ bool AggressiveDCEPass::IsTargetDead(Instruction* inst) { // This must be a decoration group. We go through annotations in a specific // order. So if this is not used by any group or group member decorates, it // is dead. - assert(tInst->opcode() == SpvOpDecorationGroup); + assert(tInst->opcode() == spv::Op::OpDecorationGroup); bool dead = true; get_def_use_mgr()->ForEachUser(tInst, [&dead](Instruction* user) { - if (user->opcode() == SpvOpGroupDecorate || - user->opcode() == SpvOpGroupMemberDecorate) + if (user->opcode() == spv::Op::OpGroupDecorate || + user->opcode() == spv::Op::OpGroupMemberDecorate) dead = false; }); return dead; @@ -197,7 +196,7 @@ void AggressiveDCEPass::ProcessLoad(Function* func, uint32_t varId) { void AggressiveDCEPass::AddBranch(uint32_t labelId, BasicBlock* bp) { std::unique_ptr newBranch( - new Instruction(context(), SpvOpBranch, 0, 0, + new Instruction(context(), spv::Op::OpBranch, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}})); context()->AnalyzeDefUse(&*newBranch); context()->set_instr_block(&*newBranch, bp); @@ -206,8 +205,8 @@ void AggressiveDCEPass::AddBranch(uint32_t labelId, BasicBlock* bp) { void AggressiveDCEPass::AddBreaksAndContinuesToWorklist( Instruction* mergeInst) { - assert(mergeInst->opcode() == SpvOpSelectionMerge || - mergeInst->opcode() == SpvOpLoopMerge); + assert(mergeInst->opcode() == spv::Op::OpSelectionMerge || + mergeInst->opcode() == spv::Op::OpLoopMerge); BasicBlock* header = context()->get_instr_block(mergeInst); const uint32_t mergeId = mergeInst->GetSingleWordInOperand(0); @@ -223,7 +222,7 @@ void AggressiveDCEPass::AddBreaksAndContinuesToWorklist( } }); - if (mergeInst->opcode() != SpvOpLoopMerge) { + if (mergeInst->opcode() != spv::Op::OpLoopMerge) { return; } @@ -231,26 +230,27 @@ void AggressiveDCEPass::AddBreaksAndContinuesToWorklist( const uint32_t contId = mergeInst->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); get_def_use_mgr()->ForEachUser(contId, [&contId, this](Instruction* user) { - SpvOp op = user->opcode(); - if (op == SpvOpBranchConditional || op == SpvOpSwitch) { + spv::Op op = user->opcode(); + if (op == spv::Op::OpBranchConditional || op == spv::Op::OpSwitch) { // A conditional branch or switch can only be a continue if it does not // have a merge instruction or its merge block is not the continue block. Instruction* hdrMerge = GetMergeInstruction(user); - if (hdrMerge != nullptr && hdrMerge->opcode() == SpvOpSelectionMerge) { + if (hdrMerge != nullptr && + hdrMerge->opcode() == spv::Op::OpSelectionMerge) { uint32_t hdrMergeId = hdrMerge->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); if (hdrMergeId == contId) return; // Need to mark merge instruction too AddToWorklist(hdrMerge); } - } else if (op == SpvOpBranch) { + } else if (op == spv::Op::OpBranch) { // An unconditional branch can only be a continue if it is not // branching to its own merge block. BasicBlock* blk = context()->get_instr_block(user); Instruction* hdrBranch = GetHeaderBranch(blk); if (hdrBranch == nullptr) return; Instruction* hdrMerge = GetMergeInstruction(hdrBranch); - if (hdrMerge->opcode() == SpvOpLoopMerge) return; + if (hdrMerge->opcode() == spv::Op::OpLoopMerge) return; uint32_t hdrMergeId = hdrMerge->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); if (contId == hdrMergeId) return; @@ -277,11 +277,11 @@ bool AggressiveDCEPass::KillDeadInstructions( uint32_t merge_block_id = 0; (*bi)->ForEachInst([this, &modified, &merge_block_id](Instruction* inst) { if (IsLive(inst)) return; - if (inst->opcode() == SpvOpLabel) return; + if (inst->opcode() == spv::Op::OpLabel) return; // If dead instruction is selection merge, remember merge block // for new branch at end of block - if (inst->opcode() == SpvOpSelectionMerge || - inst->opcode() == SpvOpLoopMerge) + if (inst->opcode() == spv::Op::OpSelectionMerge || + inst->opcode() == spv::Op::OpLoopMerge) merge_block_id = inst->GetSingleWordInOperand(0); to_kill_.push_back(inst); modified = true; @@ -295,19 +295,19 @@ bool AggressiveDCEPass::KillDeadInstructions( } auto merge_terminator = (*bi)->terminator(); - if (merge_terminator->opcode() == SpvOpUnreachable) { + if (merge_terminator->opcode() == spv::Op::OpUnreachable) { // The merge was unreachable. This is undefined behaviour so just // return (or return an undef). Then mark the new return as live. auto func_ret_type_inst = get_def_use_mgr()->GetDef(func->type_id()); - if (func_ret_type_inst->opcode() == SpvOpTypeVoid) { - merge_terminator->SetOpcode(SpvOpReturn); + if (func_ret_type_inst->opcode() == spv::Op::OpTypeVoid) { + merge_terminator->SetOpcode(spv::Op::OpReturn); } else { // Find an undef for the return value and make sure it gets kept by // the pass. auto undef_id = Type2Undef(func->type_id()); auto undef = get_def_use_mgr()->GetDef(undef_id); live_insts_.Set(undef->unique_id()); - merge_terminator->SetOpcode(SpvOpReturnValue); + merge_terminator->SetOpcode(spv::Op::OpReturnValue); merge_terminator->SetInOperands({{SPV_OPERAND_TYPE_ID, {undef_id}}}); get_def_use_mgr()->AnalyzeInstUse(merge_terminator); } @@ -338,23 +338,25 @@ void AggressiveDCEPass::ProcessWorkList(Function* func) { } } +void AggressiveDCEPass::AddDebugScopeToWorkList(const Instruction* inst) { + auto scope = inst->GetDebugScope(); + auto lex_scope_id = scope.GetLexicalScope(); + if (lex_scope_id != kNoDebugScope) + AddToWorklist(get_def_use_mgr()->GetDef(lex_scope_id)); + auto inlined_at_id = scope.GetInlinedAt(); + if (inlined_at_id != kNoInlinedAt) + AddToWorklist(get_def_use_mgr()->GetDef(inlined_at_id)); +} + void AggressiveDCEPass::AddDebugInstructionsToWorkList( const Instruction* inst) { for (auto& line_inst : inst->dbg_line_insts()) { if (line_inst.IsDebugLineInst()) { AddOperandsToWorkList(&line_inst); } + AddDebugScopeToWorkList(&line_inst); } - - if (inst->GetDebugScope().GetLexicalScope() != kNoDebugScope) { - auto* scope = - get_def_use_mgr()->GetDef(inst->GetDebugScope().GetLexicalScope()); - AddToWorklist(scope); - } - if (inst->GetDebugInlinedAt() != kNoInlinedAt) { - auto* inlined_at = get_def_use_mgr()->GetDef(inst->GetDebugInlinedAt()); - AddToWorklist(inlined_at); - } + AddDebugScopeToWorkList(inst); } void AggressiveDCEPass::AddDecorationsToWorkList(const Instruction* inst) { @@ -367,11 +369,11 @@ void AggressiveDCEPass::AddDecorationsToWorkList(const Instruction* inst) { // We only care about OpDecorateId instructions because the are the only // decorations that will reference an id that will have to be kept live // because of that use. - if (dec->opcode() != SpvOpDecorateId) { + if (dec->opcode() != spv::Op::OpDecorateId) { continue; } - if (dec->GetSingleWordInOperand(1) == - SpvDecorationHlslCounterBufferGOOGLE) { + if (spv::Decoration(dec->GetSingleWordInOperand(1)) == + spv::Decoration::HlslCounterBufferGOOGLE) { // These decorations should not force the use id to be live. It will be // removed if either the target or the in operand are dead. continue; @@ -389,7 +391,7 @@ void AggressiveDCEPass::MarkLoadedVariablesAsLive(Function* func, } std::vector AggressiveDCEPass::GetLoadedVariables(Instruction* inst) { - if (inst->opcode() == SpvOpFunctionCall) { + if (inst->opcode() == spv::Op::OpFunctionCall) { return GetLoadedVariablesFromFunctionCall(inst); } uint32_t var_id = GetLoadedVariableFromNonFunctionCalls(inst); @@ -407,11 +409,11 @@ uint32_t AggressiveDCEPass::GetLoadedVariableFromNonFunctionCalls( } switch (inst->opcode()) { - case SpvOpLoad: - case SpvOpImageTexelPointer: + case spv::Op::OpLoad: + case spv::Op::OpImageTexelPointer: return GetVariableId(inst->GetSingleWordInOperand(kLoadSourceAddrInIdx)); - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: return GetVariableId( inst->GetSingleWordInOperand(kCopyMemorySourceAddrInIdx)); default: @@ -434,8 +436,11 @@ uint32_t AggressiveDCEPass::GetLoadedVariableFromNonFunctionCalls( std::vector AggressiveDCEPass::GetLoadedVariablesFromFunctionCall( const Instruction* inst) { - assert(inst->opcode() == SpvOpFunctionCall); + assert(inst->opcode() == spv::Op::OpFunctionCall); std::vector live_variables; + // NOTE: we should only be checking function call parameters here, not the + // function itself, however, `IsPtr` will trivially return false for + // OpFunction inst->ForEachInId([this, &live_variables](const uint32_t* operand_id) { if (!IsPtr(*operand_id)) return; uint32_t var_id = GetVariableId(*operand_id); @@ -479,7 +484,7 @@ void AggressiveDCEPass::MarkBlockAsLive(Instruction* inst) { // the loop, so the loop construct must be live. We exclude the label because // it does not matter how many times it is executed. This could be extended // to more instructions, but we will need it for now. - if (inst->opcode() != SpvOpLabel) + if (inst->opcode() != spv::Op::OpLabel) MarkLoopConstructAsLiveIfLoopHeader(basic_block); Instruction* next_branch_inst = GetBranchForNextHeader(basic_block); @@ -489,8 +494,8 @@ void AggressiveDCEPass::MarkBlockAsLive(Instruction* inst) { AddToWorklist(mergeInst); } - if (inst->opcode() == SpvOpLoopMerge || - inst->opcode() == SpvOpSelectionMerge) { + if (inst->opcode() == spv::Op::OpLoopMerge || + inst->opcode() == spv::Op::OpSelectionMerge) { AddBreaksAndContinuesToWorklist(inst); } } @@ -527,27 +532,27 @@ void AggressiveDCEPass::InitializeWorkList( // cleaned up. for (auto& bi : structured_order) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - SpvOp op = ii->opcode(); + spv::Op op = ii->opcode(); if (ii->IsBranch()) { continue; } switch (op) { - case SpvOpStore: { + case spv::Op::OpStore: { uint32_t var_id = 0; (void)GetPtr(&*ii, &var_id); if (!IsLocalVar(var_id, func)) AddToWorklist(&*ii); } break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: { + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: { uint32_t var_id = 0; uint32_t target_addr_id = ii->GetSingleWordInOperand(kCopyMemoryTargetAddrInIdx); (void)GetPtr(target_addr_id, &var_id); if (!IsLocalVar(var_id, func)) AddToWorklist(&*ii); } break; - case SpvOpLoopMerge: - case SpvOpSelectionMerge: - case SpvOpUnreachable: + case spv::Op::OpLoopMerge: + case spv::Op::OpSelectionMerge: + case spv::Op::OpUnreachable: break; default: { // Function calls, atomics, function params, function returns, etc. @@ -576,8 +581,10 @@ void AggressiveDCEPass::InitializeModuleScopeLiveInstructions() { auto* var = get_def_use_mgr()->GetDef(entry.GetSingleWordInOperand(i)); auto storage_class = var->GetSingleWordInOperand(0u); // Vulkan support outputs without an associated input, but not inputs - // without an associated output. - if (storage_class == SpvStorageClassOutput) { + // without an associated output. Don't remove outputs unless explicitly + // allowed. + if (!remove_outputs_ && + spv::StorageClass(storage_class) == spv::StorageClass::Output) { AddToWorklist(var); } } @@ -586,24 +593,29 @@ void AggressiveDCEPass::InitializeModuleScopeLiveInstructions() { } } for (auto& anno : get_module()->annotations()) { - if (anno.opcode() == SpvOpDecorate) { + if (anno.opcode() == spv::Op::OpDecorate) { // Keep workgroup size. - if (anno.GetSingleWordInOperand(1u) == SpvDecorationBuiltIn && - anno.GetSingleWordInOperand(2u) == SpvBuiltInWorkgroupSize) { + if (spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::BuiltIn && + spv::BuiltIn(anno.GetSingleWordInOperand(2u)) == + spv::BuiltIn::WorkgroupSize) { AddToWorklist(&anno); } if (context()->preserve_bindings()) { // Keep all bindings. - if ((anno.GetSingleWordInOperand(1u) == SpvDecorationDescriptorSet) || - (anno.GetSingleWordInOperand(1u) == SpvDecorationBinding)) { + if ((spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::DescriptorSet) || + (spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::Binding)) { AddToWorklist(&anno); } } if (context()->preserve_spec_constants()) { // Keep all specialization constant instructions - if (anno.GetSingleWordInOperand(1u) == SpvDecorationSpecId) { + if (spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::SpecId) { AddToWorklist(&anno); } } @@ -622,7 +634,7 @@ void AggressiveDCEPass::InitializeModuleScopeLiveInstructions() { debug_global_seen = true; dbg.ForEachInId([this](const uint32_t* iid) { Instruction* in_inst = get_def_use_mgr()->GetDef(*iid); - if (in_inst->opcode() == SpvOpVariable) return; + if (in_inst->opcode() == spv::Op::OpVariable) return; AddToWorklist(in_inst); }); } @@ -630,24 +642,34 @@ void AggressiveDCEPass::InitializeModuleScopeLiveInstructions() { auto dbg_none = context()->get_debug_info_mgr()->GetDebugInfoNone(); AddToWorklist(dbg_none); } + + // Add top level DebugInfo to worklist + for (auto& dbg : get_module()->ext_inst_debuginfo()) { + auto op = dbg.GetShader100DebugOpcode(); + if (op == NonSemanticShaderDebugInfo100DebugCompilationUnit || + op == NonSemanticShaderDebugInfo100DebugEntryPoint || + op == NonSemanticShaderDebugInfo100DebugSourceContinued) { + AddToWorklist(&dbg); + } + } } Pass::Status AggressiveDCEPass::ProcessImpl() { // Current functionality assumes shader capability // TODO(greg-lunarg): Handle additional capabilities - if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) return Status::SuccessWithoutChange; // Current functionality assumes relaxed logical addressing (see // instruction.h) // TODO(greg-lunarg): Handle non-logical addressing - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Addresses)) return Status::SuccessWithoutChange; // The variable pointer extension is no longer needed to use the capability, // so we have to look for the capability. if (context()->get_feature_mgr()->HasCapability( - SpvCapabilityVariablePointersStorageBuffer)) + spv::Capability::VariablePointersStorageBuffer)) return Status::SuccessWithoutChange; // If any extensions in the module are not explicitly supported, @@ -659,9 +681,14 @@ Pass::Status AggressiveDCEPass::ProcessImpl() { InitializeModuleScopeLiveInstructions(); - // Process all entry point functions. - ProcessFunction pfn = [this](Function* fp) { return AggressiveDCE(fp); }; - modified |= context()->ProcessReachableCallTree(pfn); + // Run |AggressiveDCE| on the remaining functions. The order does not matter, + // since |AggressiveDCE| is intra-procedural. This can mean that function + // will become dead if all function call to them are removed. These dead + // function will still be in the module after this pass. We expect this to be + // rare. + for (Function& fp : *context()->module()) { + modified |= AggressiveDCE(&fp); + } // If the decoration manager is kept live then the context will try to keep it // up to date. ADCE deals with group decorations by changing the operands in @@ -687,8 +714,9 @@ Pass::Status AggressiveDCEPass::ProcessImpl() { } // Cleanup all CFG including all unreachable blocks. - ProcessFunction cleanup = [this](Function* f) { return CFGCleanup(f); }; - modified |= context()->ProcessReachableCallTree(cleanup); + for (Function& fp : *context()->module()) { + modified |= CFGCleanup(&fp); + } return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; } @@ -725,7 +753,7 @@ bool AggressiveDCEPass::ProcessGlobalValues() { bool modified = false; Instruction* instruction = &*get_module()->debug2_begin(); while (instruction) { - if (instruction->opcode() != SpvOpName) { + if (instruction->opcode() != spv::Op::OpName) { instruction = instruction->NextNode(); continue; } @@ -746,22 +774,22 @@ bool AggressiveDCEPass::ProcessGlobalValues() { std::sort(annotations.begin(), annotations.end(), DecorationLess()); for (auto annotation : annotations) { switch (annotation->opcode()) { - case SpvOpDecorate: - case SpvOpMemberDecorate: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorateStringGOOGLE: + case spv::Op::OpDecorate: + case spv::Op::OpMemberDecorate: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorateStringGOOGLE: if (IsTargetDead(annotation)) { context()->KillInst(annotation); modified = true; } break; - case SpvOpDecorateId: + case spv::Op::OpDecorateId: if (IsTargetDead(annotation)) { context()->KillInst(annotation); modified = true; } else { - if (annotation->GetSingleWordInOperand(1) == - SpvDecorationHlslCounterBufferGOOGLE) { + if (spv::Decoration(annotation->GetSingleWordInOperand(1)) == + spv::Decoration::HlslCounterBufferGOOGLE) { // HlslCounterBuffer will reference an id other than the target. // If that id is dead, then the decoration can be removed as well. uint32_t counter_buffer_id = annotation->GetSingleWordInOperand(2); @@ -774,7 +802,7 @@ bool AggressiveDCEPass::ProcessGlobalValues() { } } break; - case SpvOpGroupDecorate: { + case spv::Op::OpGroupDecorate: { // Go through the targets of this group decorate. Remove each dead // target. If all targets are dead, remove this decoration. bool dead = true; @@ -800,7 +828,7 @@ bool AggressiveDCEPass::ProcessGlobalValues() { } break; } - case SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { // Go through the targets of this group member decorate. Remove each // dead target (and member index). If all targets are dead, remove this // decoration. @@ -828,7 +856,7 @@ bool AggressiveDCEPass::ProcessGlobalValues() { } break; } - case SpvOpDecorationGroup: + case spv::Op::OpDecorationGroup: // By the time we hit decoration groups we've checked everything that // can target them. So if they have no uses they must be dead. if (get_def_use_mgr()->NumUsers(annotation) == 0) { @@ -869,7 +897,7 @@ bool AggressiveDCEPass::ProcessGlobalValues() { // this live as it does not have a result id. This is a little too // conservative since it is not known if the structure type that needed // it is still live. TODO(greg-lunarg): Only save if needed. - if (val.opcode() == SpvOpTypeForwardPointer) { + if (val.opcode() == spv::Op::OpTypeForwardPointer) { uint32_t ptr_ty_id = val.GetSingleWordInOperand(0); Instruction* ptr_ty_inst = get_def_use_mgr()->GetDef(ptr_ty_id); if (IsLive(ptr_ty_inst)) continue; @@ -913,6 +941,8 @@ Pass::Status AggressiveDCEPass::Process() { void AggressiveDCEPass::InitExtensions() { extensions_allowlist_.clear(); + + // clang-format off extensions_allowlist_.insert({ "SPV_AMD_shader_explicit_vertex_parameter", "SPV_AMD_shader_trinary_minmax", @@ -955,11 +985,13 @@ void AggressiveDCEPass::InitExtensions() { "SPV_NV_shader_image_footprint", "SPV_NV_shading_rate", "SPV_NV_mesh_shader", + "SPV_EXT_mesh_shader", "SPV_NV_ray_tracing", "SPV_KHR_ray_tracing", "SPV_KHR_ray_query", "SPV_EXT_fragment_invocation_density", "SPV_EXT_physical_storage_buffer", + "SPV_KHR_physical_storage_buffer", "SPV_KHR_terminate_invocation", "SPV_KHR_shader_clock", "SPV_KHR_vulkan_memory_model", @@ -967,7 +999,14 @@ void AggressiveDCEPass::InitExtensions() { "SPV_KHR_integer_dot_product", "SPV_EXT_shader_image_int64", "SPV_KHR_non_semantic_info", + "SPV_KHR_uniform_group_instructions", + "SPV_KHR_fragment_shader_barycentric", + "SPV_NV_bindless_texture", + "SPV_EXT_shader_atomic_float_add", + "SPV_EXT_fragment_shader_interlock", + "SPV_NV_compute_shader_derivatives" }); + // clang-format on } Instruction* AggressiveDCEPass::GetHeaderBranch(BasicBlock* blk) { @@ -1063,8 +1102,9 @@ bool AggressiveDCEPass::IsEntryPoint(Function* func) { } bool AggressiveDCEPass::HasCall(Function* func) { - return !func->WhileEachInst( - [](Instruction* inst) { return inst->opcode() != SpvOpFunctionCall; }); + return !func->WhileEachInst([](Instruction* inst) { + return inst->opcode() != spv::Op::OpFunctionCall; + }); } void AggressiveDCEPass::MarkFirstBlockAsLive(Function* func) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h index 1b3fd1e85..fbe08ad03 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/aggressive_dead_code_elim_pass.h @@ -44,8 +44,10 @@ class AggressiveDCEPass : public MemPass { using GetBlocksFunction = std::function*(const BasicBlock*)>; - AggressiveDCEPass(bool preserve_interface = false) - : preserve_interface_(preserve_interface) {} + AggressiveDCEPass(bool preserve_interface = false, + bool remove_outputs = false) + : preserve_interface_(preserve_interface), + remove_outputs_(remove_outputs) {} const char* name() const override { return "eliminate-dead-code-aggressive"; } Status Process() override; @@ -63,9 +65,14 @@ class AggressiveDCEPass : public MemPass { // is not allowed. bool preserve_interface_; + // Output variables can be removed from the interface if this is true. + // This is safe if the caller knows that the corresponding input variable + // in the following shader has been removed. It is false by default. + bool remove_outputs_; + // Return true if |varId| is a variable of |storageClass|. |varId| must either // be 0 or the result of an instruction. - bool IsVarOfStorage(uint32_t varId, uint32_t storageClass); + bool IsVarOfStorage(uint32_t varId, spv::StorageClass storageClass); // Return true if the instance of the variable |varId| can only be access in // |func|. For example, a function scope variable, or a private variable @@ -178,6 +185,9 @@ class AggressiveDCEPass : public MemPass { // Adds all decorations of |inst| to the work list. void AddDecorationsToWorkList(const Instruction* inst); + // Adds DebugScope instruction associated with |inst| to the work list. + void AddDebugScopeToWorkList(const Instruction* inst); + // Adds all debug instruction associated with |inst| to the work list. void AddDebugInstructionsToWorkList(const Instruction* inst); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.cpp index dd9bafda3..a314567f8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.cpp @@ -24,7 +24,6 @@ namespace spvtools { namespace opt { - namespace { enum AmdShaderBallotExtOpcodes { @@ -136,19 +135,19 @@ bool ReplaceTrinaryMid(IRContext* ctx, Instruction* inst, // Returns a folding rule that will replace the opcode with |opcode| and add // the capabilities required. The folding rule assumes it is folding an // OpGroup*NonUniformAMD instruction from the SPV_AMD_shader_ballot extension. -template +template bool ReplaceGroupNonuniformOperationOpCode( IRContext* ctx, Instruction* inst, const std::vector&) { switch (new_opcode) { - case SpvOpGroupNonUniformIAdd: - case SpvOpGroupNonUniformFAdd: - case SpvOpGroupNonUniformUMin: - case SpvOpGroupNonUniformSMin: - case SpvOpGroupNonUniformFMin: - case SpvOpGroupNonUniformUMax: - case SpvOpGroupNonUniformSMax: - case SpvOpGroupNonUniformFMax: + case spv::Op::OpGroupNonUniformIAdd: + case spv::Op::OpGroupNonUniformFAdd: + case spv::Op::OpGroupNonUniformUMin: + case spv::Op::OpGroupNonUniformSMin: + case spv::Op::OpGroupNonUniformFMin: + case spv::Op::OpGroupNonUniformUMax: + case spv::Op::OpGroupNonUniformSMax: + case spv::Op::OpGroupNonUniformFMax: break; default: assert( @@ -157,21 +156,21 @@ bool ReplaceGroupNonuniformOperationOpCode( } switch (inst->opcode()) { - case SpvOpGroupIAddNonUniformAMD: - case SpvOpGroupFAddNonUniformAMD: - case SpvOpGroupUMinNonUniformAMD: - case SpvOpGroupSMinNonUniformAMD: - case SpvOpGroupFMinNonUniformAMD: - case SpvOpGroupUMaxNonUniformAMD: - case SpvOpGroupSMaxNonUniformAMD: - case SpvOpGroupFMaxNonUniformAMD: + case spv::Op::OpGroupIAddNonUniformAMD: + case spv::Op::OpGroupFAddNonUniformAMD: + case spv::Op::OpGroupUMinNonUniformAMD: + case spv::Op::OpGroupSMinNonUniformAMD: + case spv::Op::OpGroupFMinNonUniformAMD: + case spv::Op::OpGroupUMaxNonUniformAMD: + case spv::Op::OpGroupSMaxNonUniformAMD: + case spv::Op::OpGroupFMaxNonUniformAMD: break; default: assert(false && "Should be replacing a group non uniform arithmetic operation."); } - ctx->AddCapability(SpvCapabilityGroupNonUniformArithmetic); + ctx->AddCapability(spv::Capability::GroupNonUniformArithmetic); inst->SetOpcode(new_opcode); return true; } @@ -215,8 +214,8 @@ bool ReplaceSwizzleInvocations(IRContext* ctx, Instruction* inst, analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); ctx->AddExtension("SPV_KHR_shader_ballot"); - ctx->AddCapability(SpvCapabilityGroupNonUniformBallot); - ctx->AddCapability(SpvCapabilityGroupNonUniformShuffle); + ctx->AddCapability(spv::Capability::GroupNonUniformBallot); + ctx->AddCapability(spv::Capability::GroupNonUniformShuffle); InstructionBuilder ir_builder( ctx, inst, @@ -226,8 +225,8 @@ bool ReplaceSwizzleInvocations(IRContext* ctx, Instruction* inst, uint32_t offset_id = inst->GetSingleWordInOperand(3); // Get the subgroup invocation id. - uint32_t var_id = - ctx->GetBuiltinInputVarId(SpvBuiltInSubgroupLocalInvocationId); + uint32_t var_id = ctx->GetBuiltinInputVarId( + uint32_t(spv::BuiltIn::SubgroupLocalInvocationId)); assert(var_id != 0 && "Could not get SubgroupLocalInvocationId variable."); Instruction* var_inst = ctx->get_def_use_mgr()->GetDef(var_id); Instruction* var_ptr_type = @@ -239,35 +238,38 @@ bool ReplaceSwizzleInvocations(IRContext* ctx, Instruction* inst, uint32_t quad_mask = ir_builder.GetUintConstantId(3); // This gives the offset in the group of 4 of this invocation. - Instruction* quad_idx = ir_builder.AddBinaryOp(uint_type_id, SpvOpBitwiseAnd, - id->result_id(), quad_mask); + Instruction* quad_idx = ir_builder.AddBinaryOp( + uint_type_id, spv::Op::OpBitwiseAnd, id->result_id(), quad_mask); // Get the invocation id of the first invocation in the group of 4. - Instruction* quad_ldr = ir_builder.AddBinaryOp( - uint_type_id, SpvOpBitwiseXor, id->result_id(), quad_idx->result_id()); + Instruction* quad_ldr = + ir_builder.AddBinaryOp(uint_type_id, spv::Op::OpBitwiseXor, + id->result_id(), quad_idx->result_id()); // Get the offset of the target invocation from the offset vector. Instruction* my_offset = - ir_builder.AddBinaryOp(uint_type_id, SpvOpVectorExtractDynamic, offset_id, - quad_idx->result_id()); + ir_builder.AddBinaryOp(uint_type_id, spv::Op::OpVectorExtractDynamic, + offset_id, quad_idx->result_id()); // Determine the index of the invocation to read from. - Instruction* target_inv = ir_builder.AddBinaryOp( - uint_type_id, SpvOpIAdd, quad_ldr->result_id(), my_offset->result_id()); + Instruction* target_inv = + ir_builder.AddBinaryOp(uint_type_id, spv::Op::OpIAdd, + quad_ldr->result_id(), my_offset->result_id()); // Do the group operations uint32_t uint_max_id = ir_builder.GetUintConstantId(0xFFFFFFFF); - uint32_t subgroup_scope = ir_builder.GetUintConstantId(SpvScopeSubgroup); + uint32_t subgroup_scope = + ir_builder.GetUintConstantId(uint32_t(spv::Scope::Subgroup)); const auto* ballot_value_const = const_mgr->GetConstant( type_mgr->GetUIntVectorType(4), {uint_max_id, uint_max_id, uint_max_id, uint_max_id}); Instruction* ballot_value = const_mgr->GetDefiningInstruction(ballot_value_const); Instruction* is_active = ir_builder.AddNaryOp( - type_mgr->GetBoolTypeId(), SpvOpGroupNonUniformBallotBitExtract, + type_mgr->GetBoolTypeId(), spv::Op::OpGroupNonUniformBallotBitExtract, {subgroup_scope, ballot_value->result_id(), target_inv->result_id()}); Instruction* shuffle = - ir_builder.AddNaryOp(inst->type_id(), SpvOpGroupNonUniformShuffle, + ir_builder.AddNaryOp(inst->type_id(), spv::Op::OpGroupNonUniformShuffle, {subgroup_scope, data_id, target_inv->result_id()}); // Create the null constant to use in the select. @@ -276,7 +278,7 @@ bool ReplaceSwizzleInvocations(IRContext* ctx, Instruction* inst, Instruction* null_inst = const_mgr->GetDefiningInstruction(null); // Build the select. - inst->SetOpcode(SpvOpSelect); + inst->SetOpcode(spv::Op::OpSelect); Instruction::OperandList new_operands; new_operands.push_back({SPV_OPERAND_TYPE_ID, {is_active->result_id()}}); new_operands.push_back({SPV_OPERAND_TYPE_ID, {shuffle->result_id()}}); @@ -327,8 +329,8 @@ bool ReplaceSwizzleInvocationsMasked( analysis::DefUseManager* def_use_mgr = ctx->get_def_use_mgr(); analysis::ConstantManager* const_mgr = ctx->get_constant_mgr(); - ctx->AddCapability(SpvCapabilityGroupNonUniformBallot); - ctx->AddCapability(SpvCapabilityGroupNonUniformShuffle); + ctx->AddCapability(spv::Capability::GroupNonUniformBallot); + ctx->AddCapability(spv::Capability::GroupNonUniformShuffle); InstructionBuilder ir_builder( ctx, inst, @@ -338,7 +340,7 @@ bool ReplaceSwizzleInvocationsMasked( uint32_t data_id = inst->GetSingleWordInOperand(2); Instruction* mask_inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(3)); - assert(mask_inst->opcode() == SpvOpConstantComposite && + assert(mask_inst->opcode() == spv::Op::OpConstantComposite && "The mask is suppose to be a vector constant."); assert(mask_inst->NumInOperands() == 3 && "The mask is suppose to have 3 components."); @@ -348,8 +350,8 @@ bool ReplaceSwizzleInvocationsMasked( uint32_t uint_z = mask_inst->GetSingleWordInOperand(2); // Get the subgroup invocation id. - uint32_t var_id = - ctx->GetBuiltinInputVarId(SpvBuiltInSubgroupLocalInvocationId); + uint32_t var_id = ctx->GetBuiltinInputVarId( + uint32_t(spv::BuiltIn::SubgroupLocalInvocationId)); ctx->AddExtension("SPV_KHR_shader_ballot"); assert(var_id != 0 && "Could not get SubgroupLocalInvocationId variable."); Instruction* var_inst = ctx->get_def_use_mgr()->GetDef(var_id); @@ -361,28 +363,30 @@ bool ReplaceSwizzleInvocationsMasked( // Do the bitwise operations. uint32_t mask_extended = ir_builder.GetUintConstantId(0xFFFFFFE0); - Instruction* and_mask = ir_builder.AddBinaryOp(uint_type_id, SpvOpBitwiseOr, - uint_x, mask_extended); - Instruction* and_result = ir_builder.AddBinaryOp( - uint_type_id, SpvOpBitwiseAnd, id->result_id(), and_mask->result_id()); + Instruction* and_mask = ir_builder.AddBinaryOp( + uint_type_id, spv::Op::OpBitwiseOr, uint_x, mask_extended); + Instruction* and_result = + ir_builder.AddBinaryOp(uint_type_id, spv::Op::OpBitwiseAnd, + id->result_id(), and_mask->result_id()); Instruction* or_result = ir_builder.AddBinaryOp( - uint_type_id, SpvOpBitwiseOr, and_result->result_id(), uint_y); + uint_type_id, spv::Op::OpBitwiseOr, and_result->result_id(), uint_y); Instruction* target_inv = ir_builder.AddBinaryOp( - uint_type_id, SpvOpBitwiseXor, or_result->result_id(), uint_z); + uint_type_id, spv::Op::OpBitwiseXor, or_result->result_id(), uint_z); // Do the group operations uint32_t uint_max_id = ir_builder.GetUintConstantId(0xFFFFFFFF); - uint32_t subgroup_scope = ir_builder.GetUintConstantId(SpvScopeSubgroup); + uint32_t subgroup_scope = + ir_builder.GetUintConstantId(uint32_t(spv::Scope::Subgroup)); const auto* ballot_value_const = const_mgr->GetConstant( type_mgr->GetUIntVectorType(4), {uint_max_id, uint_max_id, uint_max_id, uint_max_id}); Instruction* ballot_value = const_mgr->GetDefiningInstruction(ballot_value_const); Instruction* is_active = ir_builder.AddNaryOp( - type_mgr->GetBoolTypeId(), SpvOpGroupNonUniformBallotBitExtract, + type_mgr->GetBoolTypeId(), spv::Op::OpGroupNonUniformBallotBitExtract, {subgroup_scope, ballot_value->result_id(), target_inv->result_id()}); Instruction* shuffle = - ir_builder.AddNaryOp(inst->type_id(), SpvOpGroupNonUniformShuffle, + ir_builder.AddNaryOp(inst->type_id(), spv::Op::OpGroupNonUniformShuffle, {subgroup_scope, data_id, target_inv->result_id()}); // Create the null constant to use in the select. @@ -391,7 +395,7 @@ bool ReplaceSwizzleInvocationsMasked( Instruction* null_inst = const_mgr->GetDefiningInstruction(null); // Build the select. - inst->SetOpcode(SpvOpSelect); + inst->SetOpcode(spv::Op::OpSelect); Instruction::OperandList new_operands; new_operands.push_back({SPV_OPERAND_TYPE_ID, {is_active->result_id()}}); new_operands.push_back({SPV_OPERAND_TYPE_ID, {shuffle->result_id()}}); @@ -420,9 +424,9 @@ bool ReplaceSwizzleInvocationsMasked( // Also adding the capabilities and builtins that are needed. bool ReplaceWriteInvocation(IRContext* ctx, Instruction* inst, const std::vector&) { - uint32_t var_id = - ctx->GetBuiltinInputVarId(SpvBuiltInSubgroupLocalInvocationId); - ctx->AddCapability(SpvCapabilitySubgroupBallotKHR); + uint32_t var_id = ctx->GetBuiltinInputVarId( + uint32_t(spv::BuiltIn::SubgroupLocalInvocationId)); + ctx->AddCapability(spv::Capability::SubgroupBallotKHR); ctx->AddExtension("SPV_KHR_shader_ballot"); assert(var_id != 0 && "Could not get SubgroupLocalInvocationId variable."); Instruction* var_inst = ctx->get_def_use_mgr()->GetDef(var_id); @@ -437,11 +441,11 @@ bool ReplaceWriteInvocation(IRContext* ctx, Instruction* inst, analysis::Bool bool_type; uint32_t bool_type_id = ctx->get_type_mgr()->GetTypeInstruction(&bool_type); Instruction* cmp = - ir_builder.AddBinaryOp(bool_type_id, SpvOpIEqual, t->result_id(), + ir_builder.AddBinaryOp(bool_type_id, spv::Op::OpIEqual, t->result_id(), inst->GetSingleWordInOperand(4)); // Build a select. - inst->SetOpcode(SpvOpSelect); + inst->SetOpcode(spv::Op::OpSelect); Instruction::OperandList new_operands; new_operands.push_back({SPV_OPERAND_TYPE_ID, {cmp->result_id()}}); new_operands.push_back(inst->GetInOperand(3)); @@ -479,14 +483,15 @@ bool ReplaceMbcnt(IRContext* context, Instruction* inst, analysis::TypeManager* type_mgr = context->get_type_mgr(); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); - uint32_t var_id = context->GetBuiltinInputVarId(SpvBuiltInSubgroupLtMask); + uint32_t var_id = + context->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::SubgroupLtMask)); assert(var_id != 0 && "Could not get SubgroupLtMask variable."); - context->AddCapability(SpvCapabilityGroupNonUniformBallot); + context->AddCapability(spv::Capability::GroupNonUniformBallot); Instruction* var_inst = def_use_mgr->GetDef(var_id); Instruction* var_ptr_type = def_use_mgr->GetDef(var_inst->type_id()); Instruction* var_type = def_use_mgr->GetDef(var_ptr_type->GetSingleWordInOperand(1)); - assert(var_type->opcode() == SpvOpTypeVector && + assert(var_type->opcode() == spv::Op::OpTypeVector && "Variable is suppose to be a vector of 4 ints"); // Get the type for the shuffle. @@ -509,11 +514,12 @@ bool ReplaceMbcnt(IRContext* context, Instruction* inst, Instruction* shuffle = ir_builder.AddVectorShuffle( shuffle_type_id, load->result_id(), load->result_id(), {0, 1}); Instruction* bitcast = ir_builder.AddUnaryOp( - mask_inst->type_id(), SpvOpBitcast, shuffle->result_id()); - Instruction* t = ir_builder.AddBinaryOp(mask_inst->type_id(), SpvOpBitwiseAnd, - bitcast->result_id(), mask_id); + mask_inst->type_id(), spv::Op::OpBitcast, shuffle->result_id()); + Instruction* t = + ir_builder.AddBinaryOp(mask_inst->type_id(), spv::Op::OpBitwiseAnd, + bitcast->result_id(), mask_id); - inst->SetOpcode(SpvOpBitCount); + inst->SetOpcode(spv::Op::OpBitCount); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {t->result_id()}}}); context->UpdateDefUse(inst); return true; @@ -599,11 +605,11 @@ bool ReplaceCubeFaceCoord(IRContext* ctx, Instruction* inst, // Negate the input values. Instruction* nx = - ir_builder.AddUnaryOp(float_type_id, SpvOpFNegate, x->result_id()); + ir_builder.AddUnaryOp(float_type_id, spv::Op::OpFNegate, x->result_id()); Instruction* ny = - ir_builder.AddUnaryOp(float_type_id, SpvOpFNegate, y->result_id()); + ir_builder.AddUnaryOp(float_type_id, spv::Op::OpFNegate, y->result_id()); Instruction* nz = - ir_builder.AddUnaryOp(float_type_id, SpvOpFNegate, z->result_id()); + ir_builder.AddUnaryOp(float_type_id, spv::Op::OpFNegate, z->result_id()); // Get the abolsute values of the inputs. Instruction* ax = ir_builder.AddNaryExtendedInstruction( @@ -614,12 +620,12 @@ bool ReplaceCubeFaceCoord(IRContext* ctx, Instruction* inst, float_type_id, glsl405_ext_inst_id, GLSLstd450FAbs, {z->result_id()}); // Find which values are negative. Used in later computations. - Instruction* is_z_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - z->result_id(), f0_const_id); - Instruction* is_y_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - y->result_id(), f0_const_id); - Instruction* is_x_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - x->result_id(), f0_const_id); + Instruction* is_z_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, z->result_id(), f0_const_id); + Instruction* is_y_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, y->result_id(), f0_const_id); + Instruction* is_x_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, x->result_id(), f0_const_id); // Compute cubema Instruction* amax_x_y = ir_builder.AddNaryExtendedInstruction( @@ -628,19 +634,21 @@ bool ReplaceCubeFaceCoord(IRContext* ctx, Instruction* inst, Instruction* amax = ir_builder.AddNaryExtendedInstruction( float_type_id, glsl405_ext_inst_id, GLSLstd450FMax, {az->result_id(), amax_x_y->result_id()}); - Instruction* cubema = ir_builder.AddBinaryOp(float_type_id, SpvOpFMul, + Instruction* cubema = ir_builder.AddBinaryOp(float_type_id, spv::Op::OpFMul, f2_const_id, amax->result_id()); // Do the comparisons needed for computing cubesc and cubetc. Instruction* is_z_max = - ir_builder.AddBinaryOp(bool_id, SpvOpFOrdGreaterThanEqual, + ir_builder.AddBinaryOp(bool_id, spv::Op::OpFOrdGreaterThanEqual, az->result_id(), amax_x_y->result_id()); - Instruction* not_is_z_max = - ir_builder.AddUnaryOp(bool_id, SpvOpLogicalNot, is_z_max->result_id()); - Instruction* y_gr_x = ir_builder.AddBinaryOp( - bool_id, SpvOpFOrdGreaterThanEqual, ay->result_id(), ax->result_id()); - Instruction* is_y_max = ir_builder.AddBinaryOp( - bool_id, SpvOpLogicalAnd, not_is_z_max->result_id(), y_gr_x->result_id()); + Instruction* not_is_z_max = ir_builder.AddUnaryOp( + bool_id, spv::Op::OpLogicalNot, is_z_max->result_id()); + Instruction* y_gr_x = + ir_builder.AddBinaryOp(bool_id, spv::Op::OpFOrdGreaterThanEqual, + ay->result_id(), ax->result_id()); + Instruction* is_y_max = + ir_builder.AddBinaryOp(bool_id, spv::Op::OpLogicalAnd, + not_is_z_max->result_id(), y_gr_x->result_id()); // Select the correct value for cubesc. Instruction* cubesc_case_1 = ir_builder.AddSelect( @@ -667,10 +675,10 @@ bool ReplaceCubeFaceCoord(IRContext* ctx, Instruction* inst, Instruction* denom = ir_builder.AddCompositeConstruct( v2_float_type_id, {cubema->result_id(), cubema->result_id()}); Instruction* div = ir_builder.AddBinaryOp( - v2_float_type_id, SpvOpFDiv, cube->result_id(), denom->result_id()); + v2_float_type_id, spv::Op::OpFDiv, cube->result_id(), denom->result_id()); // Get the final result by adding 0.5 to |div|. - inst->SetOpcode(SpvOpFAdd); + inst->SetOpcode(spv::Op::OpFAdd); Instruction::OperandList new_operands; new_operands.push_back({SPV_OPERAND_TYPE_ID, {div->result_id()}}); new_operands.push_back({SPV_OPERAND_TYPE_ID, {vec_const_id}}); @@ -752,22 +760,23 @@ bool ReplaceCubeFaceIndex(IRContext* ctx, Instruction* inst, float_type_id, glsl405_ext_inst_id, GLSLstd450FAbs, {z->result_id()}); // Find which values are negative. Used in later computations. - Instruction* is_z_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - z->result_id(), f0_const_id); - Instruction* is_y_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - y->result_id(), f0_const_id); - Instruction* is_x_neg = ir_builder.AddBinaryOp(bool_id, SpvOpFOrdLessThan, - x->result_id(), f0_const_id); + Instruction* is_z_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, z->result_id(), f0_const_id); + Instruction* is_y_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, y->result_id(), f0_const_id); + Instruction* is_x_neg = ir_builder.AddBinaryOp( + bool_id, spv::Op::OpFOrdLessThan, x->result_id(), f0_const_id); // Find the max value. Instruction* amax_x_y = ir_builder.AddNaryExtendedInstruction( float_type_id, glsl405_ext_inst_id, GLSLstd450FMax, {ax->result_id(), ay->result_id()}); Instruction* is_z_max = - ir_builder.AddBinaryOp(bool_id, SpvOpFOrdGreaterThanEqual, + ir_builder.AddBinaryOp(bool_id, spv::Op::OpFOrdGreaterThanEqual, az->result_id(), amax_x_y->result_id()); - Instruction* y_gr_x = ir_builder.AddBinaryOp( - bool_id, SpvOpFOrdGreaterThanEqual, ay->result_id(), ax->result_id()); + Instruction* y_gr_x = + ir_builder.AddBinaryOp(bool_id, spv::Op::OpFOrdGreaterThanEqual, + ay->result_id(), ax->result_id()); // Get the value for each case. Instruction* case_z = ir_builder.AddSelect( @@ -783,7 +792,7 @@ bool ReplaceCubeFaceIndex(IRContext* ctx, Instruction* inst, case_y->result_id(), case_x->result_id()); // Get the final result by adding 0.5 to |div|. - inst->SetOpcode(SpvOpSelect); + inst->SetOpcode(spv::Op::OpSelect); Instruction::OperandList new_operands; new_operands.push_back({SPV_OPERAND_TYPE_ID, {is_z_max->result_id()}}); new_operands.push_back({SPV_OPERAND_TYPE_ID, {case_z->result_id()}}); @@ -813,11 +822,12 @@ bool ReplaceTimeAMD(IRContext* ctx, Instruction* inst, ctx, inst, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); ctx->AddExtension("SPV_KHR_shader_clock"); - ctx->AddCapability(SpvCapabilityShaderClockKHR); + ctx->AddCapability(spv::Capability::ShaderClockKHR); - inst->SetOpcode(SpvOpReadClockKHR); + inst->SetOpcode(spv::Op::OpReadClockKHR); Instruction::OperandList args; - uint32_t subgroup_scope_id = ir_builder.GetUintConstantId(SpvScopeSubgroup); + uint32_t subgroup_scope_id = + ir_builder.GetUintConstantId(uint32_t(spv::Scope::Subgroup)); args.push_back({SPV_OPERAND_TYPE_ID, {subgroup_scope_id}}); inst->SetInOperands(std::move(args)); ctx->UpdateDefUse(inst); @@ -831,22 +841,22 @@ class AmdExtFoldingRules : public FoldingRules { protected: virtual void AddFoldingRules() override { - rules_[SpvOpGroupIAddNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupFAddNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupUMinNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupSMinNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupFMinNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupUMaxNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupSMaxNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); - rules_[SpvOpGroupFMaxNonUniformAMD].push_back( - ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupIAddNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupFAddNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupUMinNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupSMinNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupFMinNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupUMaxNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupSMaxNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); + rules_[spv::Op::OpGroupFMaxNonUniformAMD].push_back( + ReplaceGroupNonuniformOperationOpCode); uint32_t extension_id = context()->module()->GetExtInstImportId("SPV_AMD_shader_ballot"); @@ -934,7 +944,7 @@ Pass::Status AmdExtensionToKhrPass::Process() { std::vector to_be_killed; for (Instruction& inst : context()->module()->extensions()) { - if (inst.opcode() == SpvOpExtension) { + if (inst.opcode() == spv::Op::OpExtension) { if (ext_to_remove.count(inst.GetInOperand(0).AsString()) != 0) { to_be_killed.push_back(&inst); } @@ -942,7 +952,7 @@ Pass::Status AmdExtensionToKhrPass::Process() { } for (Instruction& inst : context()->ext_inst_imports()) { - if (inst.opcode() == SpvOpExtInstImport) { + if (inst.opcode() == spv::Op::OpExtInstImport) { if (ext_to_remove.count(inst.GetInOperand(0).AsString()) != 0) { to_be_killed.push_back(&inst); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.h index fd3dab4e7..6a39d953a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/amd_ext_to_khr.h @@ -23,7 +23,7 @@ namespace spvtools { namespace opt { // Replaces the extensions VK_AMD_shader_ballot, VK_AMD_gcn_shader, and -// VK_AMD_shader_trinary_minmax with equivalant code using core instructions and +// VK_AMD_shader_trinary_minmax with equivalent code using core instructions and // capabilities. class AmdExtensionToKhrPass : public Pass { public: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.cpp new file mode 100644 index 000000000..529e68467 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.cpp @@ -0,0 +1,45 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/analyze_live_input_pass.h" + +#include "source/opt/ir_context.h" + +namespace spvtools { +namespace opt { + +Pass::Status AnalyzeLiveInputPass::Process() { + // Current functionality assumes shader capability + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) + return Status::SuccessWithoutChange; + Pass::Status status = DoLiveInputAnalysis(); + return status; +} + +Pass::Status AnalyzeLiveInputPass::DoLiveInputAnalysis() { + // Current functionality only supports frag, tesc, tese or geom shaders. + // Report failure for any other stage. + auto stage = context()->GetStage(); + if (stage != spv::ExecutionModel::Fragment && + stage != spv::ExecutionModel::TessellationControl && + stage != spv::ExecutionModel::TessellationEvaluation && + stage != spv::ExecutionModel::Geometry) + return Status::Failure; + context()->get_liveness_mgr()->GetLiveness(live_locs_, live_builtins_); + return Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.h new file mode 100644 index 000000000..ab292effe --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/analyze_live_input_pass.h @@ -0,0 +1,57 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_ANALYZE_LIVE_INPUT_H_ +#define SOURCE_OPT_ANALYZE_LIVE_INPUT_H_ + +#include + +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class AnalyzeLiveInputPass : public Pass { + public: + explicit AnalyzeLiveInputPass(std::unordered_set* live_locs, + std::unordered_set* live_builtins) + : live_locs_(live_locs), live_builtins_(live_builtins) {} + + const char* name() const override { return "analyze-live-input"; } + Status Process() override; + + // Return the mask of preserved Analyses. + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisDefUse | + IRContext::kAnalysisInstrToBlockMapping | + IRContext::kAnalysisCombinators | IRContext::kAnalysisCFG | + IRContext::kAnalysisDominatorAnalysis | + IRContext::kAnalysisLoopAnalysis | IRContext::kAnalysisNameMap | + IRContext::kAnalysisConstants | IRContext::kAnalysisTypes; + } + + private: + // Do live input analysis + Status DoLiveInputAnalysis(); + + std::unordered_set* live_locs_; + std::unordered_set* live_builtins_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_ANALYZE_LIVE_INPUT_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.cpp index e82a744af..a9fc8e2f7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.cpp @@ -16,20 +16,16 @@ #include -#include "source/opt/function.h" #include "source/opt/ir_context.h" -#include "source/opt/module.h" #include "source/opt/reflect.h" #include "source/util/make_unique.h" namespace spvtools { namespace opt { namespace { - -const uint32_t kLoopMergeContinueBlockIdInIdx = 1; -const uint32_t kLoopMergeMergeBlockIdInIdx = 0; -const uint32_t kSelectionMergeMergeBlockIdInIdx = 0; - +constexpr uint32_t kLoopMergeContinueBlockIdInIdx = 1; +constexpr uint32_t kLoopMergeMergeBlockIdInIdx = 0; +constexpr uint32_t kSelectionMergeMergeBlockIdInIdx = 0; } // namespace BasicBlock* BasicBlock::Clone(IRContext* context) const { @@ -58,7 +54,7 @@ const Instruction* BasicBlock::GetMergeInst() const { if (iter != cbegin()) { --iter; const auto opcode = iter->opcode(); - if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { + if (opcode == spv::Op::OpLoopMerge || opcode == spv::Op::OpSelectionMerge) { result = &*iter; } } @@ -73,7 +69,7 @@ Instruction* BasicBlock::GetMergeInst() { if (iter != begin()) { --iter; const auto opcode = iter->opcode(); - if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { + if (opcode == spv::Op::OpLoopMerge || opcode == spv::Op::OpSelectionMerge) { result = &*iter; } } @@ -82,7 +78,7 @@ Instruction* BasicBlock::GetMergeInst() { const Instruction* BasicBlock::GetLoopMergeInst() const { if (auto* merge = GetMergeInst()) { - if (merge->opcode() == SpvOpLoopMerge) { + if (merge->opcode() == spv::Op::OpLoopMerge) { return merge; } } @@ -91,7 +87,7 @@ const Instruction* BasicBlock::GetLoopMergeInst() const { Instruction* BasicBlock::GetLoopMergeInst() { if (auto* merge = GetMergeInst()) { - if (merge->opcode() == SpvOpLoopMerge) { + if (merge->opcode() == spv::Op::OpLoopMerge) { return merge; } } @@ -100,7 +96,7 @@ Instruction* BasicBlock::GetLoopMergeInst() { void BasicBlock::KillAllInsts(bool killLabel) { ForEachInst([killLabel](Instruction* ip) { - if (killLabel || ip->opcode() != SpvOpLabel) { + if (killLabel || ip->opcode() != spv::Op::OpLabel) { ip->context()->KillInst(ip); } }); @@ -118,10 +114,10 @@ bool BasicBlock::WhileEachSuccessorLabel( const std::function& f) const { const auto br = &insts_.back(); switch (br->opcode()) { - case SpvOpBranch: + case spv::Op::OpBranch: return f(br->GetOperand(0).words[0]); - case SpvOpBranchConditional: - case SpvOpSwitch: { + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: { bool is_first = true; return br->WhileEachInId([&is_first, &f](const uint32_t* idp) { if (!is_first) return f(*idp); @@ -138,13 +134,13 @@ void BasicBlock::ForEachSuccessorLabel( const std::function& f) { auto br = &insts_.back(); switch (br->opcode()) { - case SpvOpBranch: { + case spv::Op::OpBranch: { uint32_t tmp_id = br->GetOperand(0).words[0]; f(&tmp_id); if (tmp_id != br->GetOperand(0).words[0]) br->SetOperand(0, {tmp_id}); } break; - case SpvOpBranchConditional: - case SpvOpSwitch: { + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: { bool is_first = true; br->ForEachInId([&is_first, &f](uint32_t* idp) { if (!is_first) f(idp); @@ -171,7 +167,8 @@ void BasicBlock::ForMergeAndContinueLabel( --ii; if (ii == insts_.begin()) return; --ii; - if (ii->opcode() == SpvOpSelectionMerge || ii->opcode() == SpvOpLoopMerge) { + if (ii->opcode() == spv::Op::OpSelectionMerge || + ii->opcode() == spv::Op::OpLoopMerge) { ii->ForEachInId([&f](const uint32_t* idp) { f(*idp); }); } } @@ -182,9 +179,9 @@ uint32_t BasicBlock::MergeBlockIdIfAny() const { uint32_t mbid = 0; if (merge_ii != cbegin()) { --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) { + if (merge_ii->opcode() == spv::Op::OpLoopMerge) { mbid = merge_ii->GetSingleWordInOperand(kLoopMergeMergeBlockIdInIdx); - } else if (merge_ii->opcode() == SpvOpSelectionMerge) { + } else if (merge_ii->opcode() == spv::Op::OpSelectionMerge) { mbid = merge_ii->GetSingleWordInOperand(kSelectionMergeMergeBlockIdInIdx); } } @@ -204,7 +201,7 @@ uint32_t BasicBlock::ContinueBlockIdIfAny() const { uint32_t cbid = 0; if (merge_ii != cbegin()) { --merge_ii; - if (merge_ii->opcode() == SpvOpLoopMerge) { + if (merge_ii->opcode() == spv::Op::OpLoopMerge) { cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx); } } @@ -241,9 +238,9 @@ BasicBlock* BasicBlock::SplitBasicBlock(IRContext* context, uint32_t label_id, iterator iter) { assert(!insts_.empty()); - std::unique_ptr new_block_temp = - MakeUnique(MakeUnique( - context, SpvOpLabel, 0, label_id, std::initializer_list{})); + std::unique_ptr new_block_temp = MakeUnique( + MakeUnique(context, spv::Op::OpLabel, 0, label_id, + std::initializer_list{})); BasicBlock* new_block = new_block_temp.get(); function_->InsertBasicBlockAfter(std::move(new_block_temp), this); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.h index 6741a50f2..24d5fceb3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/basic_block.h @@ -83,7 +83,7 @@ class BasicBlock { const Instruction* GetMergeInst() const; Instruction* GetMergeInst(); - // Returns the OpLoopMerge instruciton in this basic block, if it exists. + // Returns the OpLoopMerge instruction in this basic block, if it exists. // Otherwise return null. May be used whenever tail() can be used. const Instruction* GetLoopMergeInst() const; Instruction* GetLoopMergeInst(); @@ -319,7 +319,7 @@ inline bool BasicBlock::WhileEachPhiInst( Instruction* inst = &insts_.front(); while (inst != nullptr) { Instruction* next_instruction = inst->NextNode(); - if (inst->opcode() != SpvOpPhi) break; + if (inst->opcode() != spv::Op::OpPhi) break; if (!inst->WhileEachInst(f, run_on_debug_line_insts)) return false; inst = next_instruction; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_pass.cpp index ef7f31fe0..d6c33e52b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_pass.cpp @@ -16,11 +16,8 @@ #include "source/opt/block_merge_pass.h" -#include - #include "source/opt/block_merge_util.h" #include "source/opt/ir_context.h" -#include "source/opt/iterator.h" namespace spvtools { namespace opt { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_util.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_util.cpp index 8ae8020a5..42f695f23 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_util.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/block_merge_util.cpp @@ -20,7 +20,6 @@ namespace spvtools { namespace opt { namespace blockmergeutil { - namespace { // Returns true if |block| contains a merge instruction. @@ -34,14 +33,15 @@ bool IsHeader(IRContext* context, uint32_t id) { // Returns true if |id| is the merge target of a merge instruction. bool IsMerge(IRContext* context, uint32_t id) { - return !context->get_def_use_mgr()->WhileEachUse(id, [](Instruction* user, - uint32_t index) { - SpvOp op = user->opcode(); - if ((op == SpvOpLoopMerge || op == SpvOpSelectionMerge) && index == 0u) { - return false; - } - return true; - }); + return !context->get_def_use_mgr()->WhileEachUse( + id, [](Instruction* user, uint32_t index) { + spv::Op op = user->opcode(); + if ((op == spv::Op::OpLoopMerge || op == spv::Op::OpSelectionMerge) && + index == 0u) { + return false; + } + return true; + }); } // Returns true if |block| is the merge target of a merge instruction. @@ -53,8 +53,8 @@ bool IsMerge(IRContext* context, BasicBlock* block) { bool IsContinue(IRContext* context, uint32_t id) { return !context->get_def_use_mgr()->WhileEachUse( id, [](Instruction* user, uint32_t index) { - SpvOp op = user->opcode(); - if (op == SpvOpLoopMerge && index == 1u) { + spv::Op op = user->opcode(); + if (op == spv::Op::OpLoopMerge && index == 1u) { return false; } return true; @@ -82,7 +82,7 @@ bool CanMergeWithSuccessor(IRContext* context, BasicBlock* block) { auto ii = block->end(); --ii; Instruction* br = &*ii; - if (br->opcode() != SpvOpBranch) { + if (br->opcode() != spv::Op::OpBranch) { return false; } @@ -98,6 +98,17 @@ bool CanMergeWithSuccessor(IRContext* context, BasicBlock* block) { return false; } + // Note: This means that the instructions in a break block will execute as if + // they were still diverged according to the loop iteration. This restricts + // potential transformations an implementation may perform on the IR to match + // shader author expectations. Similarly, instructions in the loop construct + // cannot be moved into the continue construct unless it can be proven that + // invocations are always converged. + if (succ_is_merge && context->get_feature_mgr()->HasExtension( + kSPV_KHR_maximal_reconvergence)) { + return false; + } + if (pred_is_merge && IsContinue(context, lab_id)) { // Cannot merge a continue target with a merge block. return false; @@ -119,12 +130,33 @@ bool CanMergeWithSuccessor(IRContext* context, BasicBlock* block) { // The merge must be a loop merge because a selection merge cannot be // followed by an unconditional branch. BasicBlock* succ_block = context->get_instr_block(lab_id); - SpvOp succ_term_op = succ_block->terminator()->opcode(); - assert(merge_inst->opcode() == SpvOpLoopMerge); - if (succ_term_op != SpvOpBranch && succ_term_op != SpvOpBranchConditional) { + spv::Op succ_term_op = succ_block->terminator()->opcode(); + assert(merge_inst->opcode() == spv::Op::OpLoopMerge); + if (succ_term_op != spv::Op::OpBranch && + succ_term_op != spv::Op::OpBranchConditional) { return false; } } + + if (succ_is_merge || IsContinue(context, lab_id)) { + auto* struct_cfg = context->GetStructuredCFGAnalysis(); + auto switch_block_id = struct_cfg->ContainingSwitch(block->id()); + if (switch_block_id) { + auto switch_merge_id = struct_cfg->SwitchMergeBlock(switch_block_id); + const auto* switch_inst = + &*block->GetParent()->FindBlock(switch_block_id)->tail(); + for (uint32_t i = 1; i < switch_inst->NumInOperands(); i += 2) { + auto target_id = switch_inst->GetSingleWordInOperand(i); + if (target_id == block->id() && target_id != switch_merge_id) { + // Case constructs must be structurally dominated by the OpSwitch. + // Since the successor is the merge/continue for another construct, + // merging the blocks would break that requirement. + return false; + } + } + } + } + return true; } @@ -150,6 +182,11 @@ void MergeWithSuccessor(IRContext* context, Function* func, // sbi must follow bi in func's ordering. assert(sbi != func->end()); + if (sbi->tail()->opcode() == spv::Op::OpSwitch && + sbi->MergeBlockIdIfAny() != 0) { + context->InvalidateAnalyses(IRContext::Analysis::kAnalysisStructuredCFG); + } + // Update the inst-to-block mapping for the instructions in sbi. for (auto& inst : *sbi) { context->set_instr_block(&inst, &*bi); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ccp_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ccp_pass.cpp index 5099b477a..46bfc907d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ccp_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ccp_pass.cpp @@ -24,19 +24,15 @@ #include "source/opt/fold.h" #include "source/opt/function.h" -#include "source/opt/module.h" #include "source/opt/propagator.h" namespace spvtools { namespace opt { - namespace { - // This SSA id is never defined nor referenced in the IR. It is a special ID // which represents varying values. When an ID is found to have a varying // value, its entry in the |values_| table maps to kVaryingSSAId. -const uint32_t kVaryingSSAId = std::numeric_limits::max(); - +constexpr uint32_t kVaryingSSAId = std::numeric_limits::max(); } // namespace bool CCPPass::IsVaryingValue(uint32_t id) const { return id == kVaryingSSAId; } @@ -136,7 +132,7 @@ SSAPropagator::PropStatus CCPPass::VisitAssignment(Instruction* instr) { // If this is a copy operation, and the RHS is a known constant, assign its // value to the LHS. - if (instr->opcode() == SpvOpCopyObject) { + if (instr->opcode() == spv::Op::OpCopyObject) { uint32_t rhs_id = instr->GetSingleWordInOperand(0); auto it = values_.find(rhs_id); if (it != values_.end()) { @@ -172,7 +168,8 @@ SSAPropagator::PropStatus CCPPass::VisitAssignment(Instruction* instr) { if (folded_inst != nullptr) { // We do not want to change the body of the function by adding new // instructions. When folding we can only generate new constants. - assert(folded_inst->IsConstant() && + assert((folded_inst->IsConstant() || + IsSpecConstantInst(folded_inst->opcode())) && "CCP is only interested in constant values."); uint32_t new_val = ComputeLatticeMeet(instr, folded_inst->result_id()); values_[instr->result_id()] = new_val; @@ -210,10 +207,10 @@ SSAPropagator::PropStatus CCPPass::VisitBranch(Instruction* instr, *dest_bb = nullptr; uint32_t dest_label = 0; - if (instr->opcode() == SpvOpBranch) { + if (instr->opcode() == spv::Op::OpBranch) { // An unconditional jump always goes to its unique destination. dest_label = instr->GetSingleWordInOperand(0); - } else if (instr->opcode() == SpvOpBranchConditional) { + } else if (instr->opcode() == spv::Op::OpBranchConditional) { // For a conditional branch, determine whether the predicate selector has a // known value in |values_|. If it does, set the destination block // according to the selector's boolean value. @@ -242,7 +239,7 @@ SSAPropagator::PropStatus CCPPass::VisitBranch(Instruction* instr, // For an OpSwitch, extract the value taken by the switch selector and check // which of the target literals it matches. The branch associated with that // literal is the taken branch. - assert(instr->opcode() == SpvOpSwitch); + assert(instr->opcode() == spv::Op::OpSwitch); if (instr->GetOperand(0).words.size() != 1) { // If the selector is wider than 32-bits, return varying. TODO(dnovillo): // Add support for wider constants. @@ -289,7 +286,7 @@ SSAPropagator::PropStatus CCPPass::VisitBranch(Instruction* instr, SSAPropagator::PropStatus CCPPass::VisitInstruction(Instruction* instr, BasicBlock** dest_bb) { *dest_bb = nullptr; - if (instr->opcode() == SpvOpPhi) { + if (instr->opcode() == spv::Op::OpPhi) { return VisitPhi(instr); } else if (instr->IsBranch()) { return VisitBranch(instr, dest_bb); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.cpp index ac0fcc368..4c4bb2568 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.cpp @@ -29,16 +29,16 @@ namespace { using cbb_ptr = const opt::BasicBlock*; // Universal Limit of ResultID + 1 -const int kMaxResultId = 0x400000; +constexpr int kMaxResultId = 0x400000; } // namespace CFG::CFG(Module* module) : module_(module), pseudo_entry_block_(std::unique_ptr( - new Instruction(module->context(), SpvOpLabel, 0, 0, {}))), + new Instruction(module->context(), spv::Op::OpLabel, 0, 0, {}))), pseudo_exit_block_(std::unique_ptr(new Instruction( - module->context(), SpvOpLabel, 0, kMaxResultId, {}))) { + module->context(), spv::Op::OpLabel, 0, kMaxResultId, {}))) { for (auto& fn : *module) { for (auto& blk : fn) { RegisterBlock(&blk); @@ -74,14 +74,21 @@ void CFG::RemoveNonExistingEdges(uint32_t blk_id) { void CFG::ComputeStructuredOrder(Function* func, BasicBlock* root, std::list* order) { + ComputeStructuredOrder(func, root, nullptr, order); +} + +void CFG::ComputeStructuredOrder(Function* func, BasicBlock* root, + BasicBlock* end, + std::list* order) { assert(module_->context()->get_feature_mgr()->HasCapability( - SpvCapabilityShader) && + spv::Capability::Shader) && "This only works on structured control flow"); // Compute structured successors and do DFS. ComputeStructuredSuccessors(func); auto ignore_block = [](cbb_ptr) {}; - auto ignore_edge = [](cbb_ptr, cbb_ptr) {}; + auto terminal = [end](cbb_ptr bb) { return bb == end; }; + auto get_structured_successors = [this](const BasicBlock* b) { return &(block2structured_succs_[b]); }; @@ -92,7 +99,7 @@ void CFG::ComputeStructuredOrder(Function* func, BasicBlock* root, order->push_front(const_cast(b)); }; CFA::DepthFirstTraversal(root, get_structured_successors, - ignore_block, post_order, ignore_edge); + ignore_block, post_order, terminal); } void CFG::ForEachBlockInPostOrder(BasicBlock* bb, @@ -205,7 +212,7 @@ BasicBlock* CFG::SplitLoopHeader(BasicBlock* bb) { // Find the back edge BasicBlock* latch_block = nullptr; Function::iterator latch_block_iter = header_it; - while (++latch_block_iter != fn->end()) { + for (; latch_block_iter != fn->end(); ++latch_block_iter) { // If blocks are in the proper order, then the only branch that appears // after the header is the latch. if (std::find(pred.begin(), pred.end(), latch_block_iter->id()) != @@ -221,7 +228,7 @@ BasicBlock* CFG::SplitLoopHeader(BasicBlock* bb) { // Create the new header bb basic bb. // Leave the phi instructions behind. auto iter = bb->begin(); - while (iter->opcode() == SpvOpPhi) { + while (iter->opcode() == spv::Op::OpPhi) { ++iter; } @@ -237,6 +244,15 @@ BasicBlock* CFG::SplitLoopHeader(BasicBlock* bb) { context->set_instr_block(inst, new_header); }); + // If |bb| was the latch block, the branch back to the header is not in + // |new_header|. + if (latch_block == bb) { + if (new_header->ContinueBlockId() == bb->id()) { + new_header->GetLoopMergeInst()->SetInOperand(1, {new_header_id}); + } + latch_block = new_header; + } + // Adjust the OpPhi instructions as needed. bb->ForEachPhiInst([latch_block, bb, new_header, context](Instruction* phi) { std::vector preheader_phi_ops; @@ -288,7 +304,7 @@ BasicBlock* CFG::SplitLoopHeader(BasicBlock* bb) { context, bb, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); bb->AddInstruction( - MakeUnique(context, SpvOpBranch, 0, 0, + MakeUnique(context, spv::Op::OpBranch, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {new_header->id()}}})); context->AnalyzeUses(bb->terminator()); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.h index f28068229..fa4fef2d5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg.h @@ -30,7 +30,7 @@ class CFG { public: explicit CFG(Module* module); - // Return the list of predecesors for basic block with label |blkid|. + // Return the list of predecessors for basic block with label |blkid|. // TODO(dnovillo): Move this to BasicBlock. const std::vector& preds(uint32_t blk_id) const { assert(label2preds_.count(blk_id)); @@ -66,6 +66,14 @@ class CFG { void ComputeStructuredOrder(Function* func, BasicBlock* root, std::list* order); + // Compute structured block order into |order| for |func| starting at |root| + // and ending at |end|. This order has the property that dominators come + // before all blocks they dominate, merge blocks come after all blocks that + // are in the control constructs of their header, and continue blocks come + // after all the blocks in the body of their loop. + void ComputeStructuredOrder(Function* func, BasicBlock* root, BasicBlock* end, + std::list* order); + // Applies |f| to all blocks that can be reach from |bb| in post order. void ForEachBlockInPostOrder(BasicBlock* bb, const std::function& f); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg_cleanup_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg_cleanup_pass.cpp index 6d48637a4..26fed89fb 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg_cleanup_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/cfg_cleanup_pass.cpp @@ -16,13 +16,9 @@ // constructs (e.g., unreachable basic blocks, empty control flow structures, // etc) -#include -#include - #include "source/opt/cfg_cleanup_pass.h" #include "source/opt/function.h" -#include "source/opt/module.h" namespace spvtools { namespace opt { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/code_sink.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/code_sink.cpp index cd7779747..90231791e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/code_sink.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/code_sink.cpp @@ -14,11 +14,9 @@ #include "code_sink.h" -#include #include #include "source/opt/instruction.h" -#include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/util/bit_vector.h" @@ -50,7 +48,8 @@ bool CodeSinkingPass::SinkInstructionsInBB(BasicBlock* bb) { } bool CodeSinkingPass::SinkInstruction(Instruction* inst) { - if (inst->opcode() != SpvOpLoad && inst->opcode() != SpvOpAccessChain) { + if (inst->opcode() != spv::Op::OpLoad && + inst->opcode() != spv::Op::OpAccessChain) { return false; } @@ -60,7 +59,7 @@ bool CodeSinkingPass::SinkInstruction(Instruction* inst) { if (BasicBlock* target_bb = FindNewBasicBlockFor(inst)) { Instruction* pos = &*target_bb->begin(); - while (pos->opcode() == SpvOpPhi) { + while (pos->opcode() == spv::Op::OpPhi) { pos = pos->NextNode(); } @@ -79,7 +78,7 @@ BasicBlock* CodeSinkingPass::FindNewBasicBlockFor(Instruction* inst) { std::unordered_set bbs_with_uses; get_def_use_mgr()->ForEachUse( inst, [&bbs_with_uses, this](Instruction* use, uint32_t idx) { - if (use->opcode() != SpvOpPhi) { + if (use->opcode() != spv::Op::OpPhi) { BasicBlock* use_bb = context()->get_instr_block(use); if (use_bb) { bbs_with_uses.insert(use_bb->id()); @@ -99,7 +98,7 @@ BasicBlock* CodeSinkingPass::FindNewBasicBlockFor(Instruction* inst) { // of succ_bb, then |inst| can be moved to succ_bb. If succ_bb, has move // then one predecessor, then moving |inst| into succ_bb could cause it to // be executed more often, so the search has to stop. - if (bb->terminator()->opcode() == SpvOpBranch) { + if (bb->terminator()->opcode() == spv::Op::OpBranch) { uint32_t succ_bb_id = bb->terminator()->GetSingleWordInOperand(0); if (cfg()->preds(succ_bb_id).size() == 1) { bb = context()->get_instr_block(succ_bb_id); @@ -113,7 +112,8 @@ BasicBlock* CodeSinkingPass::FindNewBasicBlockFor(Instruction* inst) { // instruction or an OpLoopMerge, then it is a break or continue. We could // figure it out, but not worth doing it now. Instruction* merge_inst = bb->GetMergeInst(); - if (merge_inst == nullptr || merge_inst->opcode() != SpvOpSelectionMerge) { + if (merge_inst == nullptr || + merge_inst->opcode() != spv::Op::OpSelectionMerge) { break; } @@ -173,7 +173,7 @@ bool CodeSinkingPass::ReferencesMutableMemory(Instruction* inst) { } Instruction* base_ptr = inst->GetBaseAddress(); - if (base_ptr->opcode() != SpvOpVariable) { + if (base_ptr->opcode() != spv::Op::OpVariable) { return true; } @@ -185,7 +185,8 @@ bool CodeSinkingPass::ReferencesMutableMemory(Instruction* inst) { return true; } - if (base_ptr->GetSingleWordInOperand(0) != SpvStorageClassUniform) { + if (spv::StorageClass(base_ptr->GetSingleWordInOperand(0)) != + spv::StorageClass::Uniform) { return true; } @@ -200,41 +201,41 @@ bool CodeSinkingPass::HasUniformMemorySync() { bool has_sync = false; get_module()->ForEachInst([this, &has_sync](Instruction* inst) { switch (inst->opcode()) { - case SpvOpMemoryBarrier: { + case spv::Op::OpMemoryBarrier: { uint32_t mem_semantics_id = inst->GetSingleWordInOperand(1); if (IsSyncOnUniform(mem_semantics_id)) { has_sync = true; } break; } - case SpvOpControlBarrier: - case SpvOpAtomicLoad: - case SpvOpAtomicStore: - case SpvOpAtomicExchange: - case SpvOpAtomicIIncrement: - case SpvOpAtomicIDecrement: - case SpvOpAtomicIAdd: - case SpvOpAtomicFAddEXT: - case SpvOpAtomicISub: - case SpvOpAtomicSMin: - case SpvOpAtomicUMin: - case SpvOpAtomicFMinEXT: - case SpvOpAtomicSMax: - case SpvOpAtomicUMax: - case SpvOpAtomicFMaxEXT: - case SpvOpAtomicAnd: - case SpvOpAtomicOr: - case SpvOpAtomicXor: - case SpvOpAtomicFlagTestAndSet: - case SpvOpAtomicFlagClear: { + case spv::Op::OpControlBarrier: + case spv::Op::OpAtomicLoad: + case spv::Op::OpAtomicStore: + case spv::Op::OpAtomicExchange: + case spv::Op::OpAtomicIIncrement: + case spv::Op::OpAtomicIDecrement: + case spv::Op::OpAtomicIAdd: + case spv::Op::OpAtomicFAddEXT: + case spv::Op::OpAtomicISub: + case spv::Op::OpAtomicSMin: + case spv::Op::OpAtomicUMin: + case spv::Op::OpAtomicFMinEXT: + case spv::Op::OpAtomicSMax: + case spv::Op::OpAtomicUMax: + case spv::Op::OpAtomicFMaxEXT: + case spv::Op::OpAtomicAnd: + case spv::Op::OpAtomicOr: + case spv::Op::OpAtomicXor: + case spv::Op::OpAtomicFlagTestAndSet: + case spv::Op::OpAtomicFlagClear: { uint32_t mem_semantics_id = inst->GetSingleWordInOperand(2); if (IsSyncOnUniform(mem_semantics_id)) { has_sync = true; } break; } - case SpvOpAtomicCompareExchange: - case SpvOpAtomicCompareExchangeWeak: + case spv::Op::OpAtomicCompareExchange: + case spv::Op::OpAtomicCompareExchangeWeak: if (IsSyncOnUniform(inst->GetSingleWordInOperand(2)) || IsSyncOnUniform(inst->GetSingleWordInOperand(3))) { has_sync = true; @@ -259,28 +260,30 @@ bool CodeSinkingPass::IsSyncOnUniform(uint32_t mem_semantics_id) const { // If it does not affect uniform memory, then it is does not apply to uniform // memory. - if ((mem_semantics_int & SpvMemorySemanticsUniformMemoryMask) == 0) { + if ((mem_semantics_int & uint32_t(spv::MemorySemanticsMask::UniformMemory)) == + 0) { return false; } // Check if there is an acquire or release. If so not, this it does not add // any memory constraints. - return (mem_semantics_int & (SpvMemorySemanticsAcquireMask | - SpvMemorySemanticsAcquireReleaseMask | - SpvMemorySemanticsReleaseMask)) != 0; + return (mem_semantics_int & + uint32_t(spv::MemorySemanticsMask::Acquire | + spv::MemorySemanticsMask::AcquireRelease | + spv::MemorySemanticsMask::Release)) != 0; } bool CodeSinkingPass::HasPossibleStore(Instruction* var_inst) { - assert(var_inst->opcode() == SpvOpVariable || - var_inst->opcode() == SpvOpAccessChain || - var_inst->opcode() == SpvOpPtrAccessChain); + assert(var_inst->opcode() == spv::Op::OpVariable || + var_inst->opcode() == spv::Op::OpAccessChain || + var_inst->opcode() == spv::Op::OpPtrAccessChain); return get_def_use_mgr()->WhileEachUser(var_inst, [this](Instruction* use) { switch (use->opcode()) { - case SpvOpStore: + case spv::Op::OpStore: return true; - case SpvOpAccessChain: - case SpvOpPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpPtrAccessChain: return HasPossibleStore(use); default: return false; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.cpp index 142897a2e..99ec79625 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.cpp @@ -44,10 +44,10 @@ bool CombineAccessChains::ProcessFunction(Function& function) { function.entry().get(), [&modified, this](BasicBlock* block) { block->ForEachInst([&modified, this](Instruction* inst) { switch (inst->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: modified |= CombineAccessChain(inst); break; default: @@ -76,10 +76,10 @@ uint32_t CombineAccessChains::GetConstantValue( uint32_t CombineAccessChains::GetArrayStride(const Instruction* inst) { uint32_t array_stride = 0; context()->get_decoration_mgr()->WhileEachDecoration( - inst->type_id(), SpvDecorationArrayStride, + inst->type_id(), uint32_t(spv::Decoration::ArrayStride), [&array_stride](const Instruction& decoration) { - assert(decoration.opcode() != SpvOpDecorateId); - if (decoration.opcode() == SpvOpDecorate) { + assert(decoration.opcode() != spv::Op::OpDecorateId); + if (decoration.opcode() == spv::Op::OpDecorate) { array_stride = decoration.GetSingleWordInOperand(1); } else { array_stride = decoration.GetSingleWordInOperand(2); @@ -200,18 +200,18 @@ bool CombineAccessChains::CreateNewInputOperands( } bool CombineAccessChains::CombineAccessChain(Instruction* inst) { - assert((inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpAccessChain || - inst->opcode() == SpvOpInBoundsAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain) && + assert((inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpAccessChain || + inst->opcode() == spv::Op::OpInBoundsAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain) && "Wrong opcode. Expected an access chain."); Instruction* ptr_input = context()->get_def_use_mgr()->GetDef(inst->GetSingleWordInOperand(0)); - if (ptr_input->opcode() != SpvOpAccessChain && - ptr_input->opcode() != SpvOpInBoundsAccessChain && - ptr_input->opcode() != SpvOpPtrAccessChain && - ptr_input->opcode() != SpvOpInBoundsPtrAccessChain) { + if (ptr_input->opcode() != spv::Op::OpAccessChain && + ptr_input->opcode() != spv::Op::OpInBoundsAccessChain && + ptr_input->opcode() != spv::Op::OpPtrAccessChain && + ptr_input->opcode() != spv::Op::OpInBoundsPtrAccessChain) { return false; } @@ -246,7 +246,7 @@ bool CombineAccessChains::CombineAccessChain(Instruction* inst) { } else if (inst->NumInOperands() == 1) { // |inst| is a no-op, change it to a copy. Instruction simplification will // clean it up. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); } else { std::vector new_operands; if (!CreateNewInputOperands(ptr_input, inst, &new_operands)) return false; @@ -259,23 +259,25 @@ bool CombineAccessChains::CombineAccessChain(Instruction* inst) { return true; } -SpvOp CombineAccessChains::UpdateOpcode(SpvOp base_opcode, SpvOp input_opcode) { - auto IsInBounds = [](SpvOp opcode) { - return opcode == SpvOpInBoundsPtrAccessChain || - opcode == SpvOpInBoundsAccessChain; +spv::Op CombineAccessChains::UpdateOpcode(spv::Op base_opcode, + spv::Op input_opcode) { + auto IsInBounds = [](spv::Op opcode) { + return opcode == spv::Op::OpInBoundsPtrAccessChain || + opcode == spv::Op::OpInBoundsAccessChain; }; - if (input_opcode == SpvOpInBoundsPtrAccessChain) { - if (!IsInBounds(base_opcode)) return SpvOpPtrAccessChain; - } else if (input_opcode == SpvOpInBoundsAccessChain) { - if (!IsInBounds(base_opcode)) return SpvOpAccessChain; + if (input_opcode == spv::Op::OpInBoundsPtrAccessChain) { + if (!IsInBounds(base_opcode)) return spv::Op::OpPtrAccessChain; + } else if (input_opcode == spv::Op::OpInBoundsAccessChain) { + if (!IsInBounds(base_opcode)) return spv::Op::OpAccessChain; } return input_opcode; } -bool CombineAccessChains::IsPtrAccessChain(SpvOp opcode) { - return opcode == SpvOpPtrAccessChain || opcode == SpvOpInBoundsPtrAccessChain; +bool CombineAccessChains::IsPtrAccessChain(spv::Op opcode) { + return opcode == spv::Op::OpPtrAccessChain || + opcode == spv::Op::OpInBoundsPtrAccessChain; } bool CombineAccessChains::Has64BitIndices(Instruction* inst) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.h index 531209ec1..32ee50d30 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/combine_access_chains.h @@ -68,10 +68,10 @@ class CombineAccessChains : public Pass { std::vector* new_operands); // Returns the opcode to use for the combined access chain. - SpvOp UpdateOpcode(SpvOp base_opcode, SpvOp input_opcode); + spv::Op UpdateOpcode(spv::Op base_opcode, spv::Op input_opcode); // Returns true if |opcode| is a pointer access chain. - bool IsPtrAccessChain(SpvOp opcode); + bool IsPtrAccessChain(spv::Op opcode); // Returns true if |inst| (an access chain) has 64-bit indices. bool Has64BitIndices(Instruction* inst); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/compact_ids_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/compact_ids_pass.cpp index 8815b8c65..5a2a54b17 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/compact_ids_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/compact_ids_pass.cpp @@ -44,6 +44,11 @@ Pass::Status CompactIdsPass::Process() { bool modified = false; std::unordered_map result_id_mapping; + // Disable automatic DebugInfo analysis for the life of the CompactIds pass. + // The DebugInfo manager requires the SPIR-V to be valid to run, but this is + // not true at all times in CompactIds as it remaps all ids. + context()->InvalidateAnalyses(IRContext::kAnalysisDebugInfo); + context()->module()->ForEachInst( [&result_id_mapping, &modified](Instruction* inst) { auto operand = inst->begin(); @@ -86,7 +91,8 @@ Pass::Status CompactIdsPass::Process() { }, true); - if (modified) { + if (context()->module()->id_bound() != result_id_mapping.size() + 1) { + modified = true; context()->module()->SetIdBound( static_cast(result_id_mapping.size() + 1)); // There are ids in the feature manager that could now be invalid diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.cpp index 836eba2cb..17900af24 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.cpp @@ -19,8 +19,60 @@ namespace spvtools { namespace opt { namespace { +constexpr uint32_t kExtractCompositeIdInIdx = 0; + +// Returns the value obtained by extracting the |number_of_bits| least +// significant bits from |value|, and sign-extending it to 64-bits. +uint64_t SignExtendValue(uint64_t value, uint32_t number_of_bits) { + if (number_of_bits == 64) return value; + + uint64_t mask_for_sign_bit = 1ull << (number_of_bits - 1); + uint64_t mask_for_significant_bits = (mask_for_sign_bit << 1) - 1ull; + if (value & mask_for_sign_bit) { + // Set upper bits to 1 + value |= ~mask_for_significant_bits; + } else { + // Clear the upper bits + value &= mask_for_significant_bits; + } + return value; +} + +// Returns the value obtained by extracting the |number_of_bits| least +// significant bits from |value|, and zero-extending it to 64-bits. +uint64_t ZeroExtendValue(uint64_t value, uint32_t number_of_bits) { + if (number_of_bits == 64) return value; + + uint64_t mask_for_first_bit_to_clear = 1ull << (number_of_bits); + uint64_t mask_for_bits_to_keep = mask_for_first_bit_to_clear - 1; + value &= mask_for_bits_to_keep; + return value; +} + +// Returns a constant whose value is `value` and type is `type`. This constant +// will be generated by `const_mgr`. The type must be a scalar integer type. +const analysis::Constant* GenerateIntegerConstant( + const analysis::Integer* integer_type, uint64_t result, + analysis::ConstantManager* const_mgr) { + assert(integer_type != nullptr); -const uint32_t kExtractCompositeIdInIdx = 0; + std::vector words; + if (integer_type->width() == 64) { + // In the 64-bit case, two words are needed to represent the value. + words = {static_cast(result), + static_cast(result >> 32)}; + } else { + // In all other cases, only a single word is needed. + assert(integer_type->width() <= 32); + if (integer_type->IsSigned()) { + result = SignExtendValue(result, integer_type->width()); + } else { + result = ZeroExtendValue(result, integer_type->width()); + } + words = {static_cast(result)}; + } + return const_mgr->GetConstant(integer_type, words); +} // Returns a constants with the value NaN of the given type. Only works for // 32-bit and 64-bit float point types. Returns |nullptr| if an error occurs. @@ -74,7 +126,7 @@ bool HasFloatingPoint(const analysis::Type* type) { // Returns a constants with the value |-val| of the given type. Only works for // 32-bit and 64-bit float point types. Returns |nullptr| if an error occurs. -const analysis::Constant* negateFPConst(const analysis::Type* result_type, +const analysis::Constant* NegateFPConst(const analysis::Type* result_type, const analysis::Constant* val, analysis::ConstantManager* const_mgr) { const analysis::Float* float_type = result_type->AsFloat(); @@ -89,6 +141,22 @@ const analysis::Constant* negateFPConst(const analysis::Type* result_type, return nullptr; } +// Returns a constants with the value |-val| of the given type. +const analysis::Constant* NegateIntConst(const analysis::Type* result_type, + const analysis::Constant* val, + analysis::ConstantManager* const_mgr) { + const analysis::Integer* int_type = result_type->AsInteger(); + assert(int_type != nullptr); + + if (val->AsNullConstant()) { + return val; + } + + uint64_t new_value = static_cast(-val->GetSignExtendedValue()); + return const_mgr->GetIntConst(new_value, int_type->width(), + int_type->IsSigned()); +} + // Folds an OpcompositeExtract where input is a composite constant. ConstantFoldingRule FoldExtractWithConstants() { return [](IRContext* context, Instruction* inst, @@ -120,11 +188,102 @@ ConstantFoldingRule FoldExtractWithConstants() { }; } +// Folds an OpcompositeInsert where input is a composite constant. +ConstantFoldingRule FoldInsertWithConstants() { + return [](IRContext* context, Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Constant* object = constants[0]; + const analysis::Constant* composite = constants[1]; + if (object == nullptr || composite == nullptr) { + return nullptr; + } + + // If there is more than 1 index, then each additional constant used by the + // index will need to be recreated to use the inserted object. + std::vector chain; + std::vector components; + const analysis::Type* type = nullptr; + const uint32_t final_index = (inst->NumInOperands() - 1); + + // Work down hierarchy of all indexes + for (uint32_t i = 2; i < inst->NumInOperands(); ++i) { + type = composite->type(); + + if (composite->AsNullConstant()) { + // Make new composite so it can be inserted in the index with the + // non-null value + if (const auto new_composite = + const_mgr->GetNullCompositeConstant(type)) { + // Keep track of any indexes along the way to last index + if (i != final_index) { + chain.push_back(new_composite); + } + components = new_composite->AsCompositeConstant()->GetComponents(); + } else { + // Unsupported input type (such as structs) + return nullptr; + } + } else { + // Keep track of any indexes along the way to last index + if (i != final_index) { + chain.push_back(composite); + } + components = composite->AsCompositeConstant()->GetComponents(); + } + const uint32_t index = inst->GetSingleWordInOperand(i); + composite = components[index]; + } + + // Final index in hierarchy is inserted with new object. + const uint32_t final_operand = inst->GetSingleWordInOperand(final_index); + std::vector ids; + for (size_t i = 0; i < components.size(); i++) { + const analysis::Constant* constant = + (i == final_operand) ? object : components[i]; + Instruction* member_inst = const_mgr->GetDefiningInstruction(constant); + ids.push_back(member_inst->result_id()); + } + const analysis::Constant* new_constant = const_mgr->GetConstant(type, ids); + + // Work backwards up the chain and replace each index with new constant. + for (size_t i = chain.size(); i > 0; i--) { + // Need to insert any previous instruction into the module first. + // Can't just insert in types_values_begin() because it will move above + // where the types are declared. + // Can't compare with location of inst because not all new added + // instructions are added to types_values_ + auto iter = context->types_values_end(); + Module::inst_iterator* pos = &iter; + const_mgr->BuildInstructionAndAddToModule(new_constant, pos); + + composite = chain[i - 1]; + components = composite->AsCompositeConstant()->GetComponents(); + type = composite->type(); + ids.clear(); + for (size_t k = 0; k < components.size(); k++) { + const uint32_t index = + inst->GetSingleWordInOperand(1 + static_cast(i)); + const analysis::Constant* constant = + (k == index) ? new_constant : components[k]; + const uint32_t constant_id = + const_mgr->FindDeclaredConstant(constant, 0); + ids.push_back(constant_id); + } + new_constant = const_mgr->GetConstant(type, ids); + } + + // If multiple constants were created, only need to return the top index. + return new_constant; + }; +} + ConstantFoldingRule FoldVectorShuffleWithConstants() { return [](IRContext* context, Instruction* inst, const std::vector& constants) -> const analysis::Constant* { - assert(inst->opcode() == SpvOpVectorShuffle); + assert(inst->opcode() == spv::Op::OpVectorShuffle); const analysis::Constant* c1 = constants[0]; const analysis::Constant* c2 = constants[1]; if (c1 == nullptr || c2 == nullptr) { @@ -180,7 +339,7 @@ ConstantFoldingRule FoldVectorTimesScalar() { return [](IRContext* context, Instruction* inst, const std::vector& constants) -> const analysis::Constant* { - assert(inst->opcode() == SpvOpVectorTimesScalar); + assert(inst->opcode() == spv::Op::OpVectorTimesScalar); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); analysis::TypeManager* type_mgr = context->get_type_mgr(); @@ -251,6 +410,264 @@ ConstantFoldingRule FoldVectorTimesScalar() { }; } +// Returns to the constant that results from tranposing |matrix|. The result +// will have type |result_type|, and |matrix| must exist in |context|. The +// result constant will also exist in |context|. +const analysis::Constant* TransposeMatrix(const analysis::Constant* matrix, + analysis::Matrix* result_type, + IRContext* context) { + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + if (matrix->AsNullConstant() != nullptr) { + return const_mgr->GetNullCompositeConstant(result_type); + } + + const auto& columns = matrix->AsMatrixConstant()->GetComponents(); + uint32_t number_of_rows = columns[0]->type()->AsVector()->element_count(); + + // Collect the ids of the elements in their new positions. + std::vector> result_elements(number_of_rows); + for (const analysis::Constant* column : columns) { + if (column->AsNullConstant()) { + column = const_mgr->GetNullCompositeConstant(column->type()); + } + const auto& column_components = column->AsVectorConstant()->GetComponents(); + + for (uint32_t row = 0; row < number_of_rows; ++row) { + result_elements[row].push_back( + const_mgr->GetDefiningInstruction(column_components[row]) + ->result_id()); + } + } + + // Create the constant for each row in the result, and collect the ids. + std::vector result_columns(number_of_rows); + for (uint32_t col = 0; col < number_of_rows; ++col) { + auto* element = const_mgr->GetConstant(result_type->element_type(), + result_elements[col]); + result_columns[col] = + const_mgr->GetDefiningInstruction(element)->result_id(); + } + + // Create the matrix constant from the row ids, and return it. + return const_mgr->GetConstant(result_type, result_columns); +} + +const analysis::Constant* FoldTranspose( + IRContext* context, Instruction* inst, + const std::vector& constants) { + assert(inst->opcode() == spv::Op::OpTranspose); + + analysis::TypeManager* type_mgr = context->get_type_mgr(); + if (!inst->IsFloatingPointFoldingAllowed()) { + if (HasFloatingPoint(type_mgr->GetType(inst->type_id()))) { + return nullptr; + } + } + + const analysis::Constant* matrix = constants[0]; + if (matrix == nullptr) { + return nullptr; + } + + auto* result_type = type_mgr->GetType(inst->type_id()); + return TransposeMatrix(matrix, result_type->AsMatrix(), context); +} + +ConstantFoldingRule FoldVectorTimesMatrix() { + return [](IRContext* context, Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + assert(inst->opcode() == spv::Op::OpVectorTimesMatrix); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + if (HasFloatingPoint(type_mgr->GetType(inst->type_id()))) { + return nullptr; + } + } + + const analysis::Constant* c1 = constants[0]; + const analysis::Constant* c2 = constants[1]; + + if (c1 == nullptr || c2 == nullptr) { + return nullptr; + } + + // Check result type. + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + assert(vector_type != nullptr); + const analysis::Type* element_type = vector_type->element_type(); + assert(element_type != nullptr); + const analysis::Float* float_type = element_type->AsFloat(); + assert(float_type != nullptr); + + // Check types of c1 and c2. + assert(c1->type()->AsVector() == vector_type); + assert(c1->type()->AsVector()->element_type() == element_type && + c2->type()->AsMatrix()->element_type() == vector_type); + + uint32_t resultVectorSize = result_type->AsVector()->element_count(); + std::vector ids; + + if ((c1 && c1->IsZero()) || (c2 && c2->IsZero())) { + std::vector words(float_type->width() / 32, 0); + for (uint32_t i = 0; i < resultVectorSize; ++i) { + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } + + // Get a float vector that is the result of vector-times-matrix. + std::vector c1_components = + c1->GetVectorComponents(const_mgr); + std::vector c2_components = + c2->AsMatrixConstant()->GetComponents(); + + if (float_type->width() == 32) { + for (uint32_t i = 0; i < resultVectorSize; ++i) { + float result_scalar = 0.0f; + if (!c2_components[i]->AsNullConstant()) { + const analysis::VectorConstant* c2_vec = + c2_components[i]->AsVectorConstant(); + for (uint32_t j = 0; j < c2_vec->GetComponents().size(); ++j) { + float c1_scalar = c1_components[j]->GetFloat(); + float c2_scalar = c2_vec->GetComponents()[j]->GetFloat(); + result_scalar += c1_scalar * c2_scalar; + } + } + utils::FloatProxy result(result_scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } else if (float_type->width() == 64) { + for (uint32_t i = 0; i < c2_components.size(); ++i) { + double result_scalar = 0.0; + if (!c2_components[i]->AsNullConstant()) { + const analysis::VectorConstant* c2_vec = + c2_components[i]->AsVectorConstant(); + for (uint32_t j = 0; j < c2_vec->GetComponents().size(); ++j) { + double c1_scalar = c1_components[j]->GetDouble(); + double c2_scalar = c2_vec->GetComponents()[j]->GetDouble(); + result_scalar += c1_scalar * c2_scalar; + } + } + utils::FloatProxy result(result_scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } + return nullptr; + }; +} + +ConstantFoldingRule FoldMatrixTimesVector() { + return [](IRContext* context, Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + assert(inst->opcode() == spv::Op::OpMatrixTimesVector); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + + if (!inst->IsFloatingPointFoldingAllowed()) { + if (HasFloatingPoint(type_mgr->GetType(inst->type_id()))) { + return nullptr; + } + } + + const analysis::Constant* c1 = constants[0]; + const analysis::Constant* c2 = constants[1]; + + if (c1 == nullptr || c2 == nullptr) { + return nullptr; + } + + // Check result type. + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + assert(vector_type != nullptr); + const analysis::Type* element_type = vector_type->element_type(); + assert(element_type != nullptr); + const analysis::Float* float_type = element_type->AsFloat(); + assert(float_type != nullptr); + + // Check types of c1 and c2. + assert(c1->type()->AsMatrix()->element_type() == vector_type); + assert(c2->type()->AsVector()->element_type() == element_type); + + uint32_t resultVectorSize = result_type->AsVector()->element_count(); + std::vector ids; + + if ((c1 && c1->IsZero()) || (c2 && c2->IsZero())) { + std::vector words(float_type->width() / 32, 0); + for (uint32_t i = 0; i < resultVectorSize; ++i) { + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } + + // Get a float vector that is the result of matrix-times-vector. + std::vector c1_components = + c1->AsMatrixConstant()->GetComponents(); + std::vector c2_components = + c2->GetVectorComponents(const_mgr); + + if (float_type->width() == 32) { + for (uint32_t i = 0; i < resultVectorSize; ++i) { + float result_scalar = 0.0f; + for (uint32_t j = 0; j < c1_components.size(); ++j) { + if (!c1_components[j]->AsNullConstant()) { + float c1_scalar = c1_components[j] + ->AsVectorConstant() + ->GetComponents()[i] + ->GetFloat(); + float c2_scalar = c2_components[j]->GetFloat(); + result_scalar += c1_scalar * c2_scalar; + } + } + utils::FloatProxy result(result_scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } else if (float_type->width() == 64) { + for (uint32_t i = 0; i < resultVectorSize; ++i) { + double result_scalar = 0.0; + for (uint32_t j = 0; j < c1_components.size(); ++j) { + if (!c1_components[j]->AsNullConstant()) { + double c1_scalar = c1_components[j] + ->AsVectorConstant() + ->GetComponents()[i] + ->GetDouble(); + double c2_scalar = c2_components[j]->GetDouble(); + result_scalar += c1_scalar * c2_scalar; + } + } + utils::FloatProxy result(result_scalar); + std::vector words = result.GetWords(); + const analysis::Constant* new_elem = + const_mgr->GetConstant(float_type, words); + ids.push_back(const_mgr->GetDefiningInstruction(new_elem)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + } + return nullptr; + }; +} + ConstantFoldingRule FoldCompositeWithConstants() { // Folds an OpCompositeConstruct where all of the inputs are constants to a // constant. A new constant is created if necessary. @@ -271,9 +688,9 @@ ConstantFoldingRule FoldCompositeWithConstants() { } uint32_t component_type_id = 0; - if (type_inst->opcode() == SpvOpTypeStruct) { + if (type_inst->opcode() == spv::Op::OpTypeStruct) { component_type_id = type_inst->GetSingleWordInOperand(i); - } else if (type_inst->opcode() == SpvOpTypeArray) { + } else if (type_inst->opcode() == spv::Op::OpTypeArray) { component_type_id = type_inst->GetSingleWordInOperand(0); } @@ -302,13 +719,13 @@ using BinaryScalarFoldingRule = std::function; -// Returns a |ConstantFoldingRule| that folds unary floating point scalar ops -// using |scalar_rule| and unary float point vectors ops by applying +// Returns a |ConstantFoldingRule| that folds unary scalar ops +// using |scalar_rule| and unary vectors ops by applying // |scalar_rule| to the elements of the vector. The |ConstantFoldingRule| // that is returned assumes that |constants| contains 1 entry. If they are // not |nullptr|, then their type is either |Float| or |Integer| or a |Vector| // whose element type is |Float| or |Integer|. -ConstantFoldingRule FoldFPUnaryOp(UnaryScalarFoldingRule scalar_rule) { +ConstantFoldingRule FoldUnaryOp(UnaryScalarFoldingRule scalar_rule) { return [scalar_rule](IRContext* context, Instruction* inst, const std::vector& constants) -> const analysis::Constant* { @@ -317,12 +734,8 @@ ConstantFoldingRule FoldFPUnaryOp(UnaryScalarFoldingRule scalar_rule) { const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); const analysis::Vector* vector_type = result_type->AsVector(); - if (!inst->IsFloatingPointFoldingAllowed()) { - return nullptr; - } - const analysis::Constant* arg = - (inst->opcode() == SpvOpExtInst) ? constants[1] : constants[0]; + (inst->opcode() == spv::Op::OpExtInst) ? constants[1] : constants[0]; if (arg == nullptr) { return nullptr; @@ -355,6 +768,83 @@ ConstantFoldingRule FoldFPUnaryOp(UnaryScalarFoldingRule scalar_rule) { }; } +// Returns a |ConstantFoldingRule| that folds binary scalar ops +// using |scalar_rule| and binary vectors ops by applying +// |scalar_rule| to the elements of the vector. The folding rule assumes that op +// has two inputs. For regular instruction, those are in operands 0 and 1. For +// extended instruction, they are in operands 1 and 2. If an element in +// |constants| is not nullprt, then the constant's type is |Float|, |Integer|, +// or |Vector| whose element type is |Float| or |Integer|. +ConstantFoldingRule FoldBinaryOp(BinaryScalarFoldingRule scalar_rule) { + return [scalar_rule](IRContext* context, Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + assert(constants.size() == inst->NumInOperands()); + assert(constants.size() == (inst->opcode() == spv::Op::OpExtInst ? 3 : 2)); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* result_type = type_mgr->GetType(inst->type_id()); + const analysis::Vector* vector_type = result_type->AsVector(); + + const analysis::Constant* arg1 = + (inst->opcode() == spv::Op::OpExtInst) ? constants[1] : constants[0]; + const analysis::Constant* arg2 = + (inst->opcode() == spv::Op::OpExtInst) ? constants[2] : constants[1]; + + if (arg1 == nullptr || arg2 == nullptr) { + return nullptr; + } + + if (vector_type == nullptr) { + return scalar_rule(result_type, arg1, arg2, const_mgr); + } + + std::vector a_components; + std::vector b_components; + std::vector results_components; + + a_components = arg1->GetVectorComponents(const_mgr); + b_components = arg2->GetVectorComponents(const_mgr); + assert(a_components.size() == b_components.size()); + + // Fold each component of the vector. + for (uint32_t i = 0; i < a_components.size(); ++i) { + results_components.push_back(scalar_rule(vector_type->element_type(), + a_components[i], b_components[i], + const_mgr)); + if (results_components[i] == nullptr) { + return nullptr; + } + } + + // Build the constant object and return it. + std::vector ids; + for (const analysis::Constant* member : results_components) { + ids.push_back(const_mgr->GetDefiningInstruction(member)->result_id()); + } + return const_mgr->GetConstant(vector_type, ids); + }; +} + +// Returns a |ConstantFoldingRule| that folds unary floating point scalar ops +// using |scalar_rule| and unary float point vectors ops by applying +// |scalar_rule| to the elements of the vector. The |ConstantFoldingRule| +// that is returned assumes that |constants| contains 1 entry. If they are +// not |nullptr|, then their type is either |Float| or |Integer| or a |Vector| +// whose element type is |Float| or |Integer|. +ConstantFoldingRule FoldFPUnaryOp(UnaryScalarFoldingRule scalar_rule) { + auto folding_rule = FoldUnaryOp(scalar_rule); + return [folding_rule](IRContext* context, Instruction* inst, + const std::vector& constants) + -> const analysis::Constant* { + if (!inst->IsFloatingPointFoldingAllowed()) { + return nullptr; + } + + return folding_rule(context, inst, constants); + }; +} + // Returns the result of folding the constants in |constants| according the // |scalar_rule|. If |result_type| is a vector, then |scalar_rule| is applied // per component. @@ -412,7 +902,7 @@ ConstantFoldingRule FoldFPBinaryOp(BinaryScalarFoldingRule scalar_rule) { if (!inst->IsFloatingPointFoldingAllowed()) { return nullptr; } - if (inst->opcode() == SpvOpExtInst) { + if (inst->opcode() == spv::Op::OpExtInst) { return FoldFPBinaryOp(scalar_rule, inst->type_id(), {constants[1], constants[2]}, context); } @@ -550,7 +1040,7 @@ ConstantFoldingRule FoldFAdd() { return FoldFPBinaryOp(FOLD_FPARITH_OP(+)); } ConstantFoldingRule FoldFMul() { return FoldFPBinaryOp(FOLD_FPARITH_OP(*)); } // Returns the constant that results from evaluating |numerator| / 0.0. Returns -// |nullptr| if the result could not be evalutated. +// |nullptr| if the result could not be evaluated. const analysis::Constant* FoldFPScalarDivideByZero( const analysis::Type* result_type, const analysis::Constant* numerator, analysis::ConstantManager* const_mgr) { @@ -568,7 +1058,7 @@ const analysis::Constant* FoldFPScalarDivideByZero( } if (numerator->AsFloatConstant()->GetValueAsDouble() < 0.0) { - result = negateFPConst(result_type, result, const_mgr); + result = NegateFPConst(result_type, result, const_mgr); } return result; } @@ -587,13 +1077,18 @@ const analysis::Constant* FoldScalarFPDivide( return FoldFPScalarDivideByZero(result_type, numerator, const_mgr); } + uint32_t width = denominator->type()->AsFloat()->width(); + if (width != 32 && width != 64) { + return nullptr; + } + const analysis::FloatConstant* denominator_float = denominator->AsFloatConstant(); if (denominator_float && denominator->GetValueAsDouble() == -0.0) { const analysis::Constant* result = FoldFPScalarDivideByZero(result_type, numerator, const_mgr); if (result != nullptr) - result = negateFPConst(result_type, result, const_mgr); + result = NegateFPConst(result_type, result, const_mgr); return result; } else { return FOLD_FPARITH_OP(/)(result_type, numerator, denominator, const_mgr); @@ -757,20 +1252,10 @@ ConstantFoldingRule FoldOpDotWithConstants() { }; } -// This function defines a |UnaryScalarFoldingRule| that subtracts the constant -// from zero. -UnaryScalarFoldingRule FoldFNegateOp() { - return [](const analysis::Type* result_type, const analysis::Constant* a, - analysis::ConstantManager* const_mgr) -> const analysis::Constant* { - assert(result_type != nullptr && a != nullptr); - assert(result_type == a->type()); - return negateFPConst(result_type, a, const_mgr); - }; -} - -ConstantFoldingRule FoldFNegate() { return FoldFPUnaryOp(FoldFNegateOp()); } +ConstantFoldingRule FoldFNegate() { return FoldFPUnaryOp(NegateFPConst); } +ConstantFoldingRule FoldSNegate() { return FoldUnaryOp(NegateIntConst); } -ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { +ConstantFoldingRule FoldFClampFeedingCompare(spv::Op cmp_opcode) { return [cmp_opcode](IRContext* context, Instruction* inst, const std::vector& constants) -> const analysis::Constant* { @@ -798,7 +1283,7 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { return nullptr; } - if (operand_inst->opcode() != SpvOpExtInst) { + if (operand_inst->opcode() != spv::Op::OpExtInst) { return nullptr; } @@ -822,25 +1307,25 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { bool result = false; switch (cmp_opcode) { - case SpvOpFOrdLessThan: - case SpvOpFUnordLessThan: - case SpvOpFOrdGreaterThanEqual: - case SpvOpFUnordGreaterThanEqual: + case spv::Op::OpFOrdLessThan: + case spv::Op::OpFUnordLessThan: + case spv::Op::OpFOrdGreaterThanEqual: + case spv::Op::OpFUnordGreaterThanEqual: if (constants[0]) { if (min_const) { if (constants[0]->GetValueAsDouble() < min_const->GetValueAsDouble()) { found_result = true; - result = (cmp_opcode == SpvOpFOrdLessThan || - cmp_opcode == SpvOpFUnordLessThan); + result = (cmp_opcode == spv::Op::OpFOrdLessThan || + cmp_opcode == spv::Op::OpFUnordLessThan); } } if (max_const) { if (constants[0]->GetValueAsDouble() >= max_const->GetValueAsDouble()) { found_result = true; - result = !(cmp_opcode == SpvOpFOrdLessThan || - cmp_opcode == SpvOpFUnordLessThan); + result = !(cmp_opcode == spv::Op::OpFOrdLessThan || + cmp_opcode == spv::Op::OpFUnordLessThan); } } } @@ -850,8 +1335,8 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { if (max_const->GetValueAsDouble() < constants[1]->GetValueAsDouble()) { found_result = true; - result = (cmp_opcode == SpvOpFOrdLessThan || - cmp_opcode == SpvOpFUnordLessThan); + result = (cmp_opcode == spv::Op::OpFOrdLessThan || + cmp_opcode == spv::Op::OpFUnordLessThan); } } @@ -859,31 +1344,31 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { if (min_const->GetValueAsDouble() >= constants[1]->GetValueAsDouble()) { found_result = true; - result = !(cmp_opcode == SpvOpFOrdLessThan || - cmp_opcode == SpvOpFUnordLessThan); + result = !(cmp_opcode == spv::Op::OpFOrdLessThan || + cmp_opcode == spv::Op::OpFUnordLessThan); } } } break; - case SpvOpFOrdGreaterThan: - case SpvOpFUnordGreaterThan: - case SpvOpFOrdLessThanEqual: - case SpvOpFUnordLessThanEqual: + case spv::Op::OpFOrdGreaterThan: + case spv::Op::OpFUnordGreaterThan: + case spv::Op::OpFOrdLessThanEqual: + case spv::Op::OpFUnordLessThanEqual: if (constants[0]) { if (min_const) { if (constants[0]->GetValueAsDouble() <= min_const->GetValueAsDouble()) { found_result = true; - result = (cmp_opcode == SpvOpFOrdLessThanEqual || - cmp_opcode == SpvOpFUnordLessThanEqual); + result = (cmp_opcode == spv::Op::OpFOrdLessThanEqual || + cmp_opcode == spv::Op::OpFUnordLessThanEqual); } } if (max_const) { if (constants[0]->GetValueAsDouble() > max_const->GetValueAsDouble()) { found_result = true; - result = !(cmp_opcode == SpvOpFOrdLessThanEqual || - cmp_opcode == SpvOpFUnordLessThanEqual); + result = !(cmp_opcode == spv::Op::OpFOrdLessThanEqual || + cmp_opcode == spv::Op::OpFUnordLessThanEqual); } } } @@ -893,8 +1378,8 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { if (max_const->GetValueAsDouble() <= constants[1]->GetValueAsDouble()) { found_result = true; - result = (cmp_opcode == SpvOpFOrdLessThanEqual || - cmp_opcode == SpvOpFUnordLessThanEqual); + result = (cmp_opcode == spv::Op::OpFOrdLessThanEqual || + cmp_opcode == spv::Op::OpFUnordLessThanEqual); } } @@ -902,8 +1387,8 @@ ConstantFoldingRule FoldFClampFeedingCompare(uint32_t cmp_opcode) { if (min_const->GetValueAsDouble() > constants[1]->GetValueAsDouble()) { found_result = true; - result = !(cmp_opcode == SpvOpFOrdLessThanEqual || - cmp_opcode == SpvOpFUnordLessThanEqual); + result = !(cmp_opcode == spv::Op::OpFOrdLessThanEqual || + cmp_opcode == spv::Op::OpFUnordLessThanEqual); } } } @@ -930,7 +1415,7 @@ ConstantFoldingRule FoldFMix() { const std::vector& constants) -> const analysis::Constant* { analysis::ConstantManager* const_mgr = context->get_constant_mgr(); - assert(inst->opcode() == SpvOpExtInst && + assert(inst->opcode() == spv::Op::OpExtInst && "Expecting an extended instruction."); assert(inst->GetSingleWordInOperand(0) == context->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && @@ -996,17 +1481,6 @@ ConstantFoldingRule FoldFMix() { }; } -template -IntType FoldIClamp(IntType x, IntType min_val, IntType max_val) { - if (x < min_val) { - x = min_val; - } - if (x > max_val) { - x = max_val; - } - return x; -} - const analysis::Constant* FoldMin(const analysis::Type* result_type, const analysis::Constant* a, const analysis::Constant* b, @@ -1091,7 +1565,7 @@ const analysis::Constant* FoldMax(const analysis::Type* result_type, const analysis::Constant* FoldClamp1( IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpExtInst && + assert(inst->opcode() == spv::Op::OpExtInst && "Expecting an extended instruction."); assert(inst->GetSingleWordInOperand(0) == context->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && @@ -1117,7 +1591,7 @@ const analysis::Constant* FoldClamp1( const analysis::Constant* FoldClamp2( IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpExtInst && + assert(inst->opcode() == spv::Op::OpExtInst && "Expecting an extended instruction."); assert(inst->GetSingleWordInOperand(0) == context->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && @@ -1145,7 +1619,7 @@ const analysis::Constant* FoldClamp2( const analysis::Constant* FoldClamp3( IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpExtInst && + assert(inst->opcode() == spv::Op::OpExtInst && "Expecting an extended instruction."); assert(inst->GetSingleWordInOperand(0) == context->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && @@ -1169,7 +1643,7 @@ const analysis::Constant* FoldClamp3( return nullptr; } -UnaryScalarFoldingRule FoldFTranscendentalUnary(double (__cdecl *fp)(double)) { +UnaryScalarFoldingRule FoldFTranscendentalUnary(double (*fp)(double)) { return [fp](const analysis::Type* result_type, const analysis::Constant* a, analysis::ConstantManager* const_mgr) -> const analysis::Constant* { @@ -1194,7 +1668,8 @@ UnaryScalarFoldingRule FoldFTranscendentalUnary(double (__cdecl *fp)(double)) { }; } -BinaryScalarFoldingRule FoldFTranscendentalBinary(double (__cdecl *fp)(double, double)) { +BinaryScalarFoldingRule FoldFTranscendentalBinary(double (*fp)(double, + double)) { return [fp](const analysis::Type* result_type, const analysis::Constant* a, const analysis::Constant* b, @@ -1222,6 +1697,74 @@ BinaryScalarFoldingRule FoldFTranscendentalBinary(double (__cdecl *fp)(double, d return nullptr; }; } + +enum Sign { Signed, Unsigned }; + +// Returns a BinaryScalarFoldingRule that applies `op` to the scalars. +// The `signedness` is used to determine if the operands should be interpreted +// as signed or unsigned. If the operands are signed, the value will be sign +// extended before the value is passed to `op`. Otherwise the values will be +// zero extended. +template +BinaryScalarFoldingRule FoldBinaryIntegerOperation(uint64_t (*op)(uint64_t, + uint64_t)) { + return + [op](const analysis::Type* result_type, const analysis::Constant* a, + const analysis::Constant* b, + analysis::ConstantManager* const_mgr) -> const analysis::Constant* { + assert(result_type != nullptr && a != nullptr && b != nullptr); + const analysis::Integer* integer_type = result_type->AsInteger(); + assert(integer_type != nullptr); + assert(a->type()->kind() == analysis::Type::kInteger); + assert(b->type()->kind() == analysis::Type::kInteger); + assert(integer_type->width() == a->type()->AsInteger()->width()); + assert(integer_type->width() == b->type()->AsInteger()->width()); + + // In SPIR-V, all operations support unsigned types, but the way they + // are interpreted depends on the opcode. This is why we use the + // template argument to determine how to interpret the operands. + uint64_t ia = (signedness == Signed ? a->GetSignExtendedValue() + : a->GetZeroExtendedValue()); + uint64_t ib = (signedness == Signed ? b->GetSignExtendedValue() + : b->GetZeroExtendedValue()); + uint64_t result = op(ia, ib); + + const analysis::Constant* result_constant = + GenerateIntegerConstant(integer_type, result, const_mgr); + return result_constant; + }; +} + +// A scalar folding rule that folds OpSConvert. +const analysis::Constant* FoldScalarSConvert( + const analysis::Type* result_type, const analysis::Constant* a, + analysis::ConstantManager* const_mgr) { + assert(result_type != nullptr); + assert(a != nullptr); + assert(const_mgr != nullptr); + const analysis::Integer* integer_type = result_type->AsInteger(); + assert(integer_type && "The result type of an SConvert"); + int64_t value = a->GetSignExtendedValue(); + return GenerateIntegerConstant(integer_type, value, const_mgr); +} + +// A scalar folding rule that folds OpUConvert. +const analysis::Constant* FoldScalarUConvert( + const analysis::Type* result_type, const analysis::Constant* a, + analysis::ConstantManager* const_mgr) { + assert(result_type != nullptr); + assert(a != nullptr); + assert(const_mgr != nullptr); + const analysis::Integer* integer_type = result_type->AsInteger(); + assert(integer_type && "The result type of an UConvert"); + uint64_t value = a->GetZeroExtendedValue(); + + // If the operand was an unsigned value with less than 32-bit, it would have + // been sign extended earlier, and we need to clear those bits. + auto* operand_type = a->type()->AsInteger(); + value = ZeroExtendValue(value, operand_type->width()); + return GenerateIntegerConstant(integer_type, value, const_mgr); +} } // namespace void ConstantFoldingRules::AddFoldingRules() { @@ -1230,66 +1773,114 @@ void ConstantFoldingRules::AddFoldingRules() { // applies to the instruction, the rest of the rules will not be attempted. // Take that into consideration. - rules_[SpvOpCompositeConstruct].push_back(FoldCompositeWithConstants()); - - rules_[SpvOpCompositeExtract].push_back(FoldExtractWithConstants()); - - rules_[SpvOpConvertFToS].push_back(FoldFToI()); - rules_[SpvOpConvertFToU].push_back(FoldFToI()); - rules_[SpvOpConvertSToF].push_back(FoldIToF()); - rules_[SpvOpConvertUToF].push_back(FoldIToF()); - - rules_[SpvOpDot].push_back(FoldOpDotWithConstants()); - rules_[SpvOpFAdd].push_back(FoldFAdd()); - rules_[SpvOpFDiv].push_back(FoldFDiv()); - rules_[SpvOpFMul].push_back(FoldFMul()); - rules_[SpvOpFSub].push_back(FoldFSub()); - - rules_[SpvOpFOrdEqual].push_back(FoldFOrdEqual()); - - rules_[SpvOpFUnordEqual].push_back(FoldFUnordEqual()); - - rules_[SpvOpFOrdNotEqual].push_back(FoldFOrdNotEqual()); - - rules_[SpvOpFUnordNotEqual].push_back(FoldFUnordNotEqual()); - - rules_[SpvOpFOrdLessThan].push_back(FoldFOrdLessThan()); - rules_[SpvOpFOrdLessThan].push_back( - FoldFClampFeedingCompare(SpvOpFOrdLessThan)); - - rules_[SpvOpFUnordLessThan].push_back(FoldFUnordLessThan()); - rules_[SpvOpFUnordLessThan].push_back( - FoldFClampFeedingCompare(SpvOpFUnordLessThan)); - - rules_[SpvOpFOrdGreaterThan].push_back(FoldFOrdGreaterThan()); - rules_[SpvOpFOrdGreaterThan].push_back( - FoldFClampFeedingCompare(SpvOpFOrdGreaterThan)); - - rules_[SpvOpFUnordGreaterThan].push_back(FoldFUnordGreaterThan()); - rules_[SpvOpFUnordGreaterThan].push_back( - FoldFClampFeedingCompare(SpvOpFUnordGreaterThan)); - - rules_[SpvOpFOrdLessThanEqual].push_back(FoldFOrdLessThanEqual()); - rules_[SpvOpFOrdLessThanEqual].push_back( - FoldFClampFeedingCompare(SpvOpFOrdLessThanEqual)); - - rules_[SpvOpFUnordLessThanEqual].push_back(FoldFUnordLessThanEqual()); - rules_[SpvOpFUnordLessThanEqual].push_back( - FoldFClampFeedingCompare(SpvOpFUnordLessThanEqual)); - - rules_[SpvOpFOrdGreaterThanEqual].push_back(FoldFOrdGreaterThanEqual()); - rules_[SpvOpFOrdGreaterThanEqual].push_back( - FoldFClampFeedingCompare(SpvOpFOrdGreaterThanEqual)); - - rules_[SpvOpFUnordGreaterThanEqual].push_back(FoldFUnordGreaterThanEqual()); - rules_[SpvOpFUnordGreaterThanEqual].push_back( - FoldFClampFeedingCompare(SpvOpFUnordGreaterThanEqual)); - - rules_[SpvOpVectorShuffle].push_back(FoldVectorShuffleWithConstants()); - rules_[SpvOpVectorTimesScalar].push_back(FoldVectorTimesScalar()); - - rules_[SpvOpFNegate].push_back(FoldFNegate()); - rules_[SpvOpQuantizeToF16].push_back(FoldQuantizeToF16()); + rules_[spv::Op::OpCompositeConstruct].push_back(FoldCompositeWithConstants()); + + rules_[spv::Op::OpCompositeExtract].push_back(FoldExtractWithConstants()); + rules_[spv::Op::OpCompositeInsert].push_back(FoldInsertWithConstants()); + + rules_[spv::Op::OpConvertFToS].push_back(FoldFToI()); + rules_[spv::Op::OpConvertFToU].push_back(FoldFToI()); + rules_[spv::Op::OpConvertSToF].push_back(FoldIToF()); + rules_[spv::Op::OpConvertUToF].push_back(FoldIToF()); + rules_[spv::Op::OpSConvert].push_back(FoldUnaryOp(FoldScalarSConvert)); + rules_[spv::Op::OpUConvert].push_back(FoldUnaryOp(FoldScalarUConvert)); + + rules_[spv::Op::OpDot].push_back(FoldOpDotWithConstants()); + rules_[spv::Op::OpFAdd].push_back(FoldFAdd()); + rules_[spv::Op::OpFDiv].push_back(FoldFDiv()); + rules_[spv::Op::OpFMul].push_back(FoldFMul()); + rules_[spv::Op::OpFSub].push_back(FoldFSub()); + + rules_[spv::Op::OpFOrdEqual].push_back(FoldFOrdEqual()); + + rules_[spv::Op::OpFUnordEqual].push_back(FoldFUnordEqual()); + + rules_[spv::Op::OpFOrdNotEqual].push_back(FoldFOrdNotEqual()); + + rules_[spv::Op::OpFUnordNotEqual].push_back(FoldFUnordNotEqual()); + + rules_[spv::Op::OpFOrdLessThan].push_back(FoldFOrdLessThan()); + rules_[spv::Op::OpFOrdLessThan].push_back( + FoldFClampFeedingCompare(spv::Op::OpFOrdLessThan)); + + rules_[spv::Op::OpFUnordLessThan].push_back(FoldFUnordLessThan()); + rules_[spv::Op::OpFUnordLessThan].push_back( + FoldFClampFeedingCompare(spv::Op::OpFUnordLessThan)); + + rules_[spv::Op::OpFOrdGreaterThan].push_back(FoldFOrdGreaterThan()); + rules_[spv::Op::OpFOrdGreaterThan].push_back( + FoldFClampFeedingCompare(spv::Op::OpFOrdGreaterThan)); + + rules_[spv::Op::OpFUnordGreaterThan].push_back(FoldFUnordGreaterThan()); + rules_[spv::Op::OpFUnordGreaterThan].push_back( + FoldFClampFeedingCompare(spv::Op::OpFUnordGreaterThan)); + + rules_[spv::Op::OpFOrdLessThanEqual].push_back(FoldFOrdLessThanEqual()); + rules_[spv::Op::OpFOrdLessThanEqual].push_back( + FoldFClampFeedingCompare(spv::Op::OpFOrdLessThanEqual)); + + rules_[spv::Op::OpFUnordLessThanEqual].push_back(FoldFUnordLessThanEqual()); + rules_[spv::Op::OpFUnordLessThanEqual].push_back( + FoldFClampFeedingCompare(spv::Op::OpFUnordLessThanEqual)); + + rules_[spv::Op::OpFOrdGreaterThanEqual].push_back(FoldFOrdGreaterThanEqual()); + rules_[spv::Op::OpFOrdGreaterThanEqual].push_back( + FoldFClampFeedingCompare(spv::Op::OpFOrdGreaterThanEqual)); + + rules_[spv::Op::OpFUnordGreaterThanEqual].push_back( + FoldFUnordGreaterThanEqual()); + rules_[spv::Op::OpFUnordGreaterThanEqual].push_back( + FoldFClampFeedingCompare(spv::Op::OpFUnordGreaterThanEqual)); + + rules_[spv::Op::OpVectorShuffle].push_back(FoldVectorShuffleWithConstants()); + rules_[spv::Op::OpVectorTimesScalar].push_back(FoldVectorTimesScalar()); + rules_[spv::Op::OpVectorTimesMatrix].push_back(FoldVectorTimesMatrix()); + rules_[spv::Op::OpMatrixTimesVector].push_back(FoldMatrixTimesVector()); + rules_[spv::Op::OpTranspose].push_back(FoldTranspose); + + rules_[spv::Op::OpFNegate].push_back(FoldFNegate()); + rules_[spv::Op::OpSNegate].push_back(FoldSNegate()); + rules_[spv::Op::OpQuantizeToF16].push_back(FoldQuantizeToF16()); + + rules_[spv::Op::OpIAdd].push_back( + FoldBinaryOp(FoldBinaryIntegerOperation( + [](uint64_t a, uint64_t b) { return a + b; }))); + rules_[spv::Op::OpISub].push_back( + FoldBinaryOp(FoldBinaryIntegerOperation( + [](uint64_t a, uint64_t b) { return a - b; }))); + rules_[spv::Op::OpIMul].push_back( + FoldBinaryOp(FoldBinaryIntegerOperation( + [](uint64_t a, uint64_t b) { return a * b; }))); + rules_[spv::Op::OpUDiv].push_back( + FoldBinaryOp(FoldBinaryIntegerOperation( + [](uint64_t a, uint64_t b) { return (b != 0 ? a / b : 0); }))); + rules_[spv::Op::OpSDiv].push_back(FoldBinaryOp( + FoldBinaryIntegerOperation([](uint64_t a, uint64_t b) { + return (b != 0 ? static_cast(static_cast(a) / + static_cast(b)) + : 0); + }))); + rules_[spv::Op::OpUMod].push_back( + FoldBinaryOp(FoldBinaryIntegerOperation( + [](uint64_t a, uint64_t b) { return (b != 0 ? a % b : 0); }))); + + rules_[spv::Op::OpSRem].push_back(FoldBinaryOp( + FoldBinaryIntegerOperation([](uint64_t a, uint64_t b) { + return (b != 0 ? static_cast(static_cast(a) % + static_cast(b)) + : 0); + }))); + + rules_[spv::Op::OpSMod].push_back(FoldBinaryOp( + FoldBinaryIntegerOperation([](uint64_t a, uint64_t b) { + if (b == 0) return static_cast(0ull); + + int64_t signed_a = static_cast(a); + int64_t signed_b = static_cast(b); + int64_t result = signed_a % signed_b; + if ((signed_b < 0) != (result < 0)) result += signed_b; + return static_cast(result); + }))); // Add rules for GLSLstd450 FeatureManager* feature_manager = context_->get_feature_mgr(); @@ -1345,7 +1936,7 @@ void ConstantFoldingRules::AddFoldingRules() { FoldFPUnaryOp(FoldFTranscendentalUnary(std::log))); #ifdef __ANDROID__ - // Android NDK r15c tageting ABI 15 doesn't have full support for C++11 + // Android NDK r15c targeting ABI 15 doesn't have full support for C++11 // (no std::exp2/log2). ::exp2 is available from C99 but ::log2 isn't // available up until ABI 18 so we use a shim auto log2_shim = [](double v) -> double { return log(v) / log(2.0); }; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.h index 41ee2aa22..fa345321f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/const_folding_rules.h @@ -88,7 +88,7 @@ class ConstantFoldingRules { // Returns true if there is at least 1 folding rule for |inst|. const std::vector& GetRulesForInstruction( const Instruction* inst) const { - if (inst->opcode() != SpvOpExtInst) { + if (inst->opcode() != spv::Op::OpExtInst) { auto it = rules_.find(inst->opcode()); if (it != rules_.end()) { return it->second.value; @@ -108,9 +108,15 @@ class ConstantFoldingRules { virtual void AddFoldingRules(); protected: + struct hasher { + size_t operator()(const spv::Op& op) const noexcept { + return std::hash()(uint32_t(op)); + } + }; + // |rules[opcode]| is the set of rules that can be applied to instructions // with |opcode| as the opcode. - std::unordered_map rules_; + std::unordered_map rules_; // The folding rules for extended instructions. std::map ext_rules_; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.cpp index d286cd267..6eebbb572 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.cpp @@ -14,7 +14,6 @@ #include "source/opt/constants.h" -#include #include #include "source/opt/ir_context.h" @@ -158,6 +157,7 @@ Type* ConstantManager::GetType(const Instruction* inst) const { std::vector ConstantManager::GetOperandConstants( const Instruction* inst) const { std::vector constants; + constants.reserve(inst->NumInOperands()); for (uint32_t i = 0; i < inst->NumInOperands(); i++) { const Operand* operand = &inst->GetInOperand(i); if (operand->type != SPV_OPERAND_TYPE_ID) { @@ -305,16 +305,16 @@ const Constant* ConstantManager::GetConstantFromInst(const Instruction* inst) { switch (inst->opcode()) { // OpConstant{True|False} have the value embedded in the opcode. So they // are not handled by the for-loop above. Here we add the value explicitly. - case SpvOp::SpvOpConstantTrue: + case spv::Op::OpConstantTrue: literal_words_or_ids.push_back(true); break; - case SpvOp::SpvOpConstantFalse: + case spv::Op::OpConstantFalse: literal_words_or_ids.push_back(false); break; - case SpvOp::SpvOpConstantNull: - case SpvOp::SpvOpConstant: - case SpvOp::SpvOpConstantComposite: - case SpvOp::SpvOpSpecConstantComposite: + case spv::Op::OpConstantNull: + case spv::Op::OpConstant: + case spv::Op::OpConstantComposite: + case spv::Op::OpSpecConstantComposite: break; default: return nullptr; @@ -328,22 +328,22 @@ std::unique_ptr ConstantManager::CreateInstruction( uint32_t type = (type_id == 0) ? context()->get_type_mgr()->GetId(c->type()) : type_id; if (c->AsNullConstant()) { - return MakeUnique(context(), SpvOp::SpvOpConstantNull, type, - id, std::initializer_list{}); + return MakeUnique(context(), spv::Op::OpConstantNull, type, id, + std::initializer_list{}); } else if (const BoolConstant* bc = c->AsBoolConstant()) { return MakeUnique( context(), - bc->value() ? SpvOp::SpvOpConstantTrue : SpvOp::SpvOpConstantFalse, - type, id, std::initializer_list{}); + bc->value() ? spv::Op::OpConstantTrue : spv::Op::OpConstantFalse, type, + id, std::initializer_list{}); } else if (const IntConstant* ic = c->AsIntConstant()) { return MakeUnique( - context(), SpvOp::SpvOpConstant, type, id, + context(), spv::Op::OpConstant, type, id, std::initializer_list{ Operand(spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, ic->words())}); } else if (const FloatConstant* fc = c->AsFloatConstant()) { return MakeUnique( - context(), SpvOp::SpvOpConstant, type, id, + context(), spv::Op::OpConstant, type, id, std::initializer_list{ Operand(spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, fc->words())}); @@ -361,9 +361,9 @@ std::unique_ptr ConstantManager::CreateCompositeInstruction( uint32_t component_index = 0; for (const Constant* component_const : cc->GetComponents()) { uint32_t component_type_id = 0; - if (type_inst && type_inst->opcode() == SpvOpTypeStruct) { + if (type_inst && type_inst->opcode() == spv::Op::OpTypeStruct) { component_type_id = type_inst->GetSingleWordInOperand(component_index); - } else if (type_inst && type_inst->opcode() == SpvOpTypeArray) { + } else if (type_inst && type_inst->opcode() == spv::Op::OpTypeArray) { component_type_id = type_inst->GetSingleWordInOperand(0); } uint32_t id = FindDeclaredConstant(component_const, component_type_id); @@ -380,7 +380,7 @@ std::unique_ptr ConstantManager::CreateCompositeInstruction( } uint32_t type = (type_id == 0) ? context()->get_type_mgr()->GetId(cc->type()) : type_id; - return MakeUnique(context(), SpvOp::SpvOpConstantComposite, type, + return MakeUnique(context(), spv::Op::OpConstantComposite, type, result_id, std::move(operands)); } @@ -390,6 +390,43 @@ const Constant* ConstantManager::GetConstant( return cst ? RegisterConstant(std::move(cst)) : nullptr; } +const Constant* ConstantManager::GetNullCompositeConstant(const Type* type) { + std::vector literal_words_or_id; + + if (type->AsVector()) { + const Type* element_type = type->AsVector()->element_type(); + const uint32_t null_id = GetNullConstId(element_type); + const uint32_t element_count = type->AsVector()->element_count(); + for (uint32_t i = 0; i < element_count; i++) { + literal_words_or_id.push_back(null_id); + } + } else if (type->AsMatrix()) { + const Type* element_type = type->AsMatrix()->element_type(); + const uint32_t null_id = GetNullConstId(element_type); + const uint32_t element_count = type->AsMatrix()->element_count(); + for (uint32_t i = 0; i < element_count; i++) { + literal_words_or_id.push_back(null_id); + } + } else if (type->AsStruct()) { + // TODO (sfricke-lunarg) add proper struct support + return nullptr; + } else if (type->AsArray()) { + const Type* element_type = type->AsArray()->element_type(); + const uint32_t null_id = GetNullConstId(element_type); + assert(type->AsArray()->length_info().words[0] == + analysis::Array::LengthInfo::kConstant && + "unexpected array length"); + const uint32_t element_count = type->AsArray()->length_info().words[0]; + for (uint32_t i = 0; i < element_count; i++) { + literal_words_or_id.push_back(null_id); + } + } else { + return nullptr; + } + + return GetConstant(type, literal_words_or_id); +} + const Constant* ConstantManager::GetNumericVectorConstantWithWords( const Vector* type, const std::vector& literal_words) { const auto* element_type = type->element_type(); @@ -398,6 +435,8 @@ const Constant* ConstantManager::GetNumericVectorConstantWithWords( words_per_element = float_type->width() / 32; else if (const auto* int_type = element_type->AsInteger()) words_per_element = int_type->width() / 32; + else if (element_type->AsBool() != nullptr) + words_per_element = 1; if (words_per_element != 1 && words_per_element != 2) return nullptr; @@ -444,18 +483,48 @@ const Constant* ConstantManager::GetDoubleConst(double val) { return c; } -uint32_t ConstantManager::GetSIntConst(int32_t val) { +uint32_t ConstantManager::GetSIntConstId(int32_t val) { Type* sint_type = context()->get_type_mgr()->GetSIntType(); const Constant* c = GetConstant(sint_type, {static_cast(val)}); return GetDefiningInstruction(c)->result_id(); } -uint32_t ConstantManager::GetUIntConst(uint32_t val) { +const Constant* ConstantManager::GetIntConst(uint64_t val, int32_t bitWidth, + bool isSigned) { + Type* int_type = context()->get_type_mgr()->GetIntType(bitWidth, isSigned); + + if (isSigned) { + // Sign extend the value. + int32_t num_of_bit_to_ignore = 64 - bitWidth; + val = static_cast(val << num_of_bit_to_ignore) >> + num_of_bit_to_ignore; + } else if (bitWidth < 64) { + // Clear the upper bit that are not used. + uint64_t mask = ((1ull << bitWidth) - 1); + val &= mask; + } + + if (bitWidth <= 32) { + return GetConstant(int_type, {static_cast(val)}); + } + + // If the value is more than 32-bit, we need to split the operands into two + // 32-bit integers. + return GetConstant( + int_type, {static_cast(val), static_cast(val >> 32)}); +} + +uint32_t ConstantManager::GetUIntConstId(uint32_t val) { Type* uint_type = context()->get_type_mgr()->GetUIntType(); const Constant* c = GetConstant(uint_type, {val}); return GetDefiningInstruction(c)->result_id(); } +uint32_t ConstantManager::GetNullConstId(const Type* type) { + const Constant* c = GetConstant(type, {}); + return GetDefiningInstruction(c)->result_id(); +} + std::vector Constant::GetVectorComponents( analysis::ConstantManager* const_mgr) const { std::vector components; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.h index 10f7bd688..ae8dc6259 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/constants.h @@ -163,6 +163,21 @@ class ScalarConstant : public Constant { return is_zero; } + uint32_t GetU32BitValue() const { + // Relies on unsigned values smaller than 32-bit being zero extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 1); + return words()[0]; + } + + uint64_t GetU64BitValue() const { + // Relies on unsigned values smaller than 64-bit being zero extended. See + // section 2.2.1 of the SPIR-V spec. + assert(words().size() == 2); + return static_cast(words()[1]) << 32 | + static_cast(words()[0]); + } + protected: ScalarConstant(const Type* ty, const std::vector& w) : Constant(ty), words_(w) {} @@ -189,13 +204,6 @@ class IntConstant : public ScalarConstant { return words()[0]; } - uint32_t GetU32BitValue() const { - // Relies on unsigned values smaller than 32-bit being zero extended. See - // section 2.2.1 of the SPIR-V spec. - assert(words().size() == 1); - return words()[0]; - } - int64_t GetS64BitValue() const { // Relies on unsigned values smaller than 64-bit being sign extended. See // section 2.2.1 of the SPIR-V spec. @@ -204,14 +212,6 @@ class IntConstant : public ScalarConstant { static_cast(words()[0]); } - uint64_t GetU64BitValue() const { - // Relies on unsigned values smaller than 64-bit being zero extended. See - // section 2.2.1 of the SPIR-V spec. - assert(words().size() == 2); - return static_cast(words()[1]) << 32 | - static_cast(words()[0]); - } - // Make a copy of this IntConstant instance. std::unique_ptr CopyIntConstant() const { return MakeUnique(type_->AsInteger(), words_); @@ -520,6 +520,14 @@ class ConstantManager { literal_words_or_ids.end())); } + // Takes a type and creates a OpConstantComposite + // This allows a + // OpConstantNull %composite_type + // to become a + // OpConstantComposite %composite_type %null %null ... etc + // Assumes type is a Composite already, otherwise returns null + const Constant* GetNullCompositeConstant(const Type* type); + // Gets or creates a unique Constant instance of Vector type |type| with // numeric elements and a vector of constant defining words |literal_words|. // If a Constant instance existed already in the constant pool, it returns a @@ -541,7 +549,7 @@ class ConstantManager { // instruction at the end of the current module's types section. // // |type_id| is an optional argument for disambiguating equivalent types. If - // |type_id| is specified, the contant returned will have that type id. + // |type_id| is specified, the constant returned will have that type id. Instruction* GetDefiningInstruction(const Constant* c, uint32_t type_id = 0, Module::inst_iterator* pos = nullptr); @@ -649,10 +657,19 @@ class ConstantManager { const Constant* GetDoubleConst(double val); // Returns the id of a 32-bit signed integer constant with value |val|. - uint32_t GetSIntConst(int32_t val); + uint32_t GetSIntConstId(int32_t val); + + // Returns an integer constant with `bitWidth` and value |val|. If `isSigned` + // is true, the constant will be a signed integer. Otherwise it will be + // unsigned. Only the `bitWidth` lower order bits of |val| will be used. The + // rest will be ignored. + const Constant* GetIntConst(uint64_t val, int32_t bitWidth, bool isSigned); // Returns the id of a 32-bit unsigned integer constant with value |val|. - uint32_t GetUIntConst(uint32_t val); + uint32_t GetUIntConstId(uint32_t val); + + // Returns the id of a OpConstantNull with type of |type|. + uint32_t GetNullConstId(const Type* type); private: // Creates a Constant instance with the given type and a vector of constant diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/control_dependence.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/control_dependence.cpp index f4879e0f3..3d4813963 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/control_dependence.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/control_dependence.cpp @@ -16,15 +16,12 @@ #include #include -#include -#include #include "source/opt/basic_block.h" #include "source/opt/cfg.h" #include "source/opt/dominator_analysis.h" #include "source/opt/function.h" #include "source/opt/instruction.h" -#include "spirv/unified1/spirv.h" // Computes the control dependence graph (CDG) using the algorithm in Cytron // 1991, "Efficiently Computing Static Single Assignment Form and the Control @@ -49,8 +46,8 @@ uint32_t ControlDependence::GetConditionID(const CFG& cfg) const { } const BasicBlock* source_bb = cfg.block(source_bb_id()); const Instruction* branch = source_bb->terminator(); - assert((branch->opcode() == SpvOpBranchConditional || - branch->opcode() == SpvOpSwitch) && + assert((branch->opcode() == spv::Op::OpBranchConditional || + branch->opcode() == spv::Op::OpSwitch) && "invalid control dependence; last instruction must be conditional " "branch or switch"); return branch->GetSingleWordInOperand(0); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.cpp index b127eabe9..e243bedf0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.cpp @@ -18,19 +18,16 @@ #include "source/opt/ir_builder.h" -namespace { - -// Indices of operands in SPIR-V instructions -static const int kImageSampleDrefIdInIdx = 2; - -} // anonymous namespace - namespace spvtools { namespace opt { +namespace { +// Indices of operands in SPIR-V instructions +constexpr int kImageSampleDrefIdInIdx = 2; +} // namespace bool ConvertToHalfPass::IsArithmetic(Instruction* inst) { return target_ops_core_.count(inst->opcode()) != 0 || - (inst->opcode() == SpvOpExtInst && + (inst->opcode() == spv::Op::OpExtInst && inst->GetSingleWordInOperand(0) == context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && target_ops_450_.count(inst->GetSingleWordInOperand(1)) != 0); @@ -42,12 +39,21 @@ bool ConvertToHalfPass::IsFloat(Instruction* inst, uint32_t width) { return Pass::IsFloat(ty_id, width); } +bool ConvertToHalfPass::IsStruct(Instruction* inst) { + uint32_t ty_id = inst->type_id(); + if (ty_id == 0) return false; + Instruction* ty_inst = Pass::GetBaseType(ty_id); + return (ty_inst->opcode() == spv::Op::OpTypeStruct); +} + bool ConvertToHalfPass::IsDecoratedRelaxed(Instruction* inst) { uint32_t r_id = inst->result_id(); for (auto r_inst : get_decoration_mgr()->GetDecorationsFor(r_id, false)) - if (r_inst->opcode() == SpvOpDecorate && - r_inst->GetSingleWordInOperand(1) == SpvDecorationRelaxedPrecision) + if (r_inst->opcode() == spv::Op::OpDecorate && + spv::Decoration(r_inst->GetSingleWordInOperand(1)) == + spv::Decoration::RelaxedPrecision) { return true; + } return false; } @@ -57,6 +63,10 @@ bool ConvertToHalfPass::IsRelaxed(uint32_t id) { void ConvertToHalfPass::AddRelaxed(uint32_t id) { relaxed_ids_set_.insert(id); } +bool ConvertToHalfPass::CanRelaxOpOperands(Instruction* inst) { + return image_ops_.count(inst->opcode()) == 0; +} + analysis::Type* ConvertToHalfPass::FloatScalarType(uint32_t width) { analysis::Float float_ty(width); return context()->get_type_mgr()->GetRegisteredType(&float_ty); @@ -82,12 +92,12 @@ analysis::Type* ConvertToHalfPass::FloatMatrixType(uint32_t v_cnt, uint32_t ConvertToHalfPass::EquivFloatTypeId(uint32_t ty_id, uint32_t width) { analysis::Type* reg_equiv_ty; Instruction* ty_inst = get_def_use_mgr()->GetDef(ty_id); - if (ty_inst->opcode() == SpvOpTypeMatrix) + if (ty_inst->opcode() == spv::Op::OpTypeMatrix) reg_equiv_ty = FloatMatrixType(ty_inst->GetSingleWordInOperand(1), ty_inst->GetSingleWordInOperand(0), width); - else if (ty_inst->opcode() == SpvOpTypeVector) + else if (ty_inst->opcode() == spv::Op::OpTypeVector) reg_equiv_ty = FloatVectorType(ty_inst->GetSingleWordInOperand(1), width); - else // SpvOpTypeFloat + else // spv::Op::OpTypeFloat reg_equiv_ty = FloatScalarType(width); return context()->get_type_mgr()->GetTypeInstruction(reg_equiv_ty); } @@ -102,18 +112,18 @@ void ConvertToHalfPass::GenConvert(uint32_t* val_idp, uint32_t width, InstructionBuilder builder( context(), inst, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - if (val_inst->opcode() == SpvOpUndef) - cvt_inst = builder.AddNullaryOp(nty_id, SpvOpUndef); + if (val_inst->opcode() == spv::Op::OpUndef) + cvt_inst = builder.AddNullaryOp(nty_id, spv::Op::OpUndef); else - cvt_inst = builder.AddUnaryOp(nty_id, SpvOpFConvert, *val_idp); + cvt_inst = builder.AddUnaryOp(nty_id, spv::Op::OpFConvert, *val_idp); *val_idp = cvt_inst->result_id(); } bool ConvertToHalfPass::MatConvertCleanup(Instruction* inst) { - if (inst->opcode() != SpvOpFConvert) return false; + if (inst->opcode() != spv::Op::OpFConvert) return false; uint32_t mty_id = inst->type_id(); Instruction* mty_inst = get_def_use_mgr()->GetDef(mty_id); - if (mty_inst->opcode() != SpvOpTypeMatrix) return false; + if (mty_inst->opcode() != spv::Op::OpTypeMatrix) return false; uint32_t vty_id = mty_inst->GetSingleWordInOperand(0); uint32_t v_cnt = mty_inst->GetSingleWordInOperand(1); Instruction* vty_inst = get_def_use_mgr()->GetDef(vty_id); @@ -130,18 +140,18 @@ bool ConvertToHalfPass::MatConvertCleanup(Instruction* inst) { std::vector opnds = {}; for (uint32_t vidx = 0; vidx < v_cnt; ++vidx) { Instruction* ext_inst = builder.AddIdLiteralOp( - orig_vty_id, SpvOpCompositeExtract, orig_mat_id, vidx); + orig_vty_id, spv::Op::OpCompositeExtract, orig_mat_id, vidx); Instruction* cvt_inst = - builder.AddUnaryOp(vty_id, SpvOpFConvert, ext_inst->result_id()); + builder.AddUnaryOp(vty_id, spv::Op::OpFConvert, ext_inst->result_id()); opnds.push_back({SPV_OPERAND_TYPE_ID, {cvt_inst->result_id()}}); } uint32_t mat_id = TakeNextId(); std::unique_ptr mat_inst(new Instruction( - context(), SpvOpCompositeConstruct, mty_id, mat_id, opnds)); + context(), spv::Op::OpCompositeConstruct, mty_id, mat_id, opnds)); (void)builder.AddInstruction(std::move(mat_inst)); context()->ReplaceAllUsesWith(inst->result_id(), mat_id); // Turn original instruction into copy so it is valid. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetResultType(EquivFloatTypeId(mty_id, orig_width)); get_def_use_mgr()->AnalyzeInstUse(inst); return true; @@ -150,16 +160,30 @@ bool ConvertToHalfPass::MatConvertCleanup(Instruction* inst) { bool ConvertToHalfPass::RemoveRelaxedDecoration(uint32_t id) { return context()->get_decoration_mgr()->RemoveDecorationsFrom( id, [](const Instruction& dec) { - if (dec.opcode() == SpvOpDecorate && - dec.GetSingleWordInOperand(1u) == SpvDecorationRelaxedPrecision) + if (dec.opcode() == spv::Op::OpDecorate && + spv::Decoration(dec.GetSingleWordInOperand(1u)) == + spv::Decoration::RelaxedPrecision) { return true; - else + } else return false; }); } bool ConvertToHalfPass::GenHalfArith(Instruction* inst) { bool modified = false; + // If this is a OpCompositeExtract instruction and has a struct operand, we + // should not relax this instruction. Doing so could cause a mismatch between + // the result type and the struct member type. + bool hasStructOperand = false; + if (inst->opcode() == spv::Op::OpCompositeExtract) { + inst->ForEachInId([&hasStructOperand, this](uint32_t* idp) { + Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); + if (IsStruct(op_inst)) hasStructOperand = true; + }); + if (hasStructOperand) { + return false; + } + } // Convert all float32 based operands to float16 equivalent and change // instruction type to float16 equivalent. inst->ForEachInId([&inst, &modified, this](uint32_t* idp) { @@ -181,7 +205,7 @@ bool ConvertToHalfPass::ProcessPhi(Instruction* inst, uint32_t from_width, uint32_t to_width) { // Add converts of any float operands to to_width if they are of from_width. // If converting to 16, change type of phi to float16 equivalent and remember - // result id. Converts need to be added to preceeding blocks. + // result id. Converts need to be added to preceding blocks. uint32_t ocnt = 0; uint32_t* prev_idp; bool modified = false; @@ -196,8 +220,8 @@ bool ConvertToHalfPass::ProcessPhi(Instruction* inst, uint32_t from_width, auto insert_before = bp->tail(); if (insert_before != bp->begin()) { --insert_before; - if (insert_before->opcode() != SpvOpSelectionMerge && - insert_before->opcode() != SpvOpLoopMerge) + if (insert_before->opcode() != spv::Op::OpSelectionMerge && + insert_before->opcode() != spv::Op::OpLoopMerge) ++insert_before; } GenConvert(prev_idp, to_width, &*insert_before); @@ -229,7 +253,8 @@ bool ConvertToHalfPass::ProcessConvert(Instruction* inst) { // changed to half. uint32_t val_id = inst->GetSingleWordInOperand(0); Instruction* val_inst = get_def_use_mgr()->GetDef(val_id); - if (inst->type_id() == val_inst->type_id()) inst->SetOpcode(SpvOpCopyObject); + if (inst->type_id() == val_inst->type_id()) + inst->SetOpcode(spv::Op::OpCopyObject); return true; // modified } @@ -251,7 +276,7 @@ bool ConvertToHalfPass::ProcessImageRef(Instruction* inst) { bool ConvertToHalfPass::ProcessDefault(Instruction* inst) { // If non-relaxed instruction has changed operands, need to convert // them back to float32 - if (inst->opcode() == SpvOpPhi) return ProcessPhi(inst, 16u, 32u); + if (inst->opcode() == spv::Op::OpPhi) return ProcessPhi(inst, 16u, 32u); bool modified = false; inst->ForEachInId([&inst, &modified, this](uint32_t* idp) { if (converted_ids_.count(*idp) == 0) return; @@ -269,9 +294,9 @@ bool ConvertToHalfPass::GenHalfInst(Instruction* inst) { bool inst_relaxed = IsRelaxed(inst->result_id()); if (IsArithmetic(inst) && inst_relaxed) modified = GenHalfArith(inst); - else if (inst->opcode() == SpvOpPhi && inst_relaxed) + else if (inst->opcode() == spv::Op::OpPhi && inst_relaxed) modified = ProcessPhi(inst, 32u, 16u); - else if (inst->opcode() == SpvOpFConvert) + else if (inst->opcode() == spv::Op::OpFConvert) modified = ProcessConvert(inst); else if (image_ops_.count(inst->opcode()) != 0) modified = ProcessImageRef(inst); @@ -291,11 +316,19 @@ bool ConvertToHalfPass::CloseRelaxInst(Instruction* inst) { if (closure_ops_.count(inst->opcode()) == 0) return false; // Can relax if all float operands are relaxed bool relax = true; - inst->ForEachInId([&relax, this](uint32_t* idp) { + bool hasStructOperand = false; + inst->ForEachInId([&relax, &hasStructOperand, this](uint32_t* idp) { Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); + if (IsStruct(op_inst)) hasStructOperand = true; if (!IsFloat(op_inst, 32)) return; if (!IsRelaxed(*idp)) relax = false; }); + // If the instruction has a struct operand, we should not relax it, even if + // all its uses are relaxed. Doing so could cause a mismatch between the + // result type and the struct member type. + if (hasStructOperand) { + return false; + } if (relax) { AddRelaxed(inst->result_id()); return true; @@ -304,7 +337,8 @@ bool ConvertToHalfPass::CloseRelaxInst(Instruction* inst) { relax = true; get_def_use_mgr()->ForEachUser(inst, [&relax, this](Instruction* uinst) { if (uinst->result_id() == 0 || !IsFloat(uinst, 32) || - (!IsDecoratedRelaxed(uinst) && !IsRelaxed(uinst->result_id()))) { + (!IsDecoratedRelaxed(uinst) && !IsRelaxed(uinst->result_id())) || + !CanRelaxOpOperands(uinst)) { relax = false; return; } @@ -350,7 +384,7 @@ Pass::Status ConvertToHalfPass::ProcessImpl() { }; bool modified = context()->ProcessReachableCallTree(pfn); // If modified, make sure module has Float16 capability - if (modified) context()->AddCapability(SpvCapabilityFloat16); + if (modified) context()->AddCapability(spv::Capability::Float16); // Remove all RelaxedPrecision decorations from instructions and globals for (auto c_id : relaxed_ids_set_) { modified |= RemoveRelaxedDecoration(c_id); @@ -371,44 +405,44 @@ Pass::Status ConvertToHalfPass::Process() { void ConvertToHalfPass::Initialize() { target_ops_core_ = { - SpvOpVectorExtractDynamic, - SpvOpVectorInsertDynamic, - SpvOpVectorShuffle, - SpvOpCompositeConstruct, - SpvOpCompositeInsert, - SpvOpCompositeExtract, - SpvOpCopyObject, - SpvOpTranspose, - SpvOpConvertSToF, - SpvOpConvertUToF, - // SpvOpFConvert, - // SpvOpQuantizeToF16, - SpvOpFNegate, - SpvOpFAdd, - SpvOpFSub, - SpvOpFMul, - SpvOpFDiv, - SpvOpFMod, - SpvOpVectorTimesScalar, - SpvOpMatrixTimesScalar, - SpvOpVectorTimesMatrix, - SpvOpMatrixTimesVector, - SpvOpMatrixTimesMatrix, - SpvOpOuterProduct, - SpvOpDot, - SpvOpSelect, - SpvOpFOrdEqual, - SpvOpFUnordEqual, - SpvOpFOrdNotEqual, - SpvOpFUnordNotEqual, - SpvOpFOrdLessThan, - SpvOpFUnordLessThan, - SpvOpFOrdGreaterThan, - SpvOpFUnordGreaterThan, - SpvOpFOrdLessThanEqual, - SpvOpFUnordLessThanEqual, - SpvOpFOrdGreaterThanEqual, - SpvOpFUnordGreaterThanEqual, + spv::Op::OpVectorExtractDynamic, + spv::Op::OpVectorInsertDynamic, + spv::Op::OpVectorShuffle, + spv::Op::OpCompositeConstruct, + spv::Op::OpCompositeInsert, + spv::Op::OpCompositeExtract, + spv::Op::OpCopyObject, + spv::Op::OpTranspose, + spv::Op::OpConvertSToF, + spv::Op::OpConvertUToF, + // spv::Op::OpFConvert, + // spv::Op::OpQuantizeToF16, + spv::Op::OpFNegate, + spv::Op::OpFAdd, + spv::Op::OpFSub, + spv::Op::OpFMul, + spv::Op::OpFDiv, + spv::Op::OpFMod, + spv::Op::OpVectorTimesScalar, + spv::Op::OpMatrixTimesScalar, + spv::Op::OpVectorTimesMatrix, + spv::Op::OpMatrixTimesVector, + spv::Op::OpMatrixTimesMatrix, + spv::Op::OpOuterProduct, + spv::Op::OpDot, + spv::Op::OpSelect, + spv::Op::OpFOrdEqual, + spv::Op::OpFUnordEqual, + spv::Op::OpFOrdNotEqual, + spv::Op::OpFUnordNotEqual, + spv::Op::OpFOrdLessThan, + spv::Op::OpFUnordLessThan, + spv::Op::OpFOrdGreaterThan, + spv::Op::OpFUnordGreaterThan, + spv::Op::OpFOrdLessThanEqual, + spv::Op::OpFUnordLessThanEqual, + spv::Op::OpFOrdGreaterThanEqual, + spv::Op::OpFUnordGreaterThanEqual, }; target_ops_450_ = { GLSLstd450Round, GLSLstd450RoundEven, GLSLstd450Trunc, GLSLstd450FAbs, @@ -427,53 +461,53 @@ void ConvertToHalfPass::Initialize() { GLSLstd450Ldexp, GLSLstd450Length, GLSLstd450Distance, GLSLstd450Cross, GLSLstd450Normalize, GLSLstd450FaceForward, GLSLstd450Reflect, GLSLstd450Refract, GLSLstd450NMin, GLSLstd450NMax, GLSLstd450NClamp}; - image_ops_ = {SpvOpImageSampleImplicitLod, - SpvOpImageSampleExplicitLod, - SpvOpImageSampleDrefImplicitLod, - SpvOpImageSampleDrefExplicitLod, - SpvOpImageSampleProjImplicitLod, - SpvOpImageSampleProjExplicitLod, - SpvOpImageSampleProjDrefImplicitLod, - SpvOpImageSampleProjDrefExplicitLod, - SpvOpImageFetch, - SpvOpImageGather, - SpvOpImageDrefGather, - SpvOpImageRead, - SpvOpImageSparseSampleImplicitLod, - SpvOpImageSparseSampleExplicitLod, - SpvOpImageSparseSampleDrefImplicitLod, - SpvOpImageSparseSampleDrefExplicitLod, - SpvOpImageSparseSampleProjImplicitLod, - SpvOpImageSparseSampleProjExplicitLod, - SpvOpImageSparseSampleProjDrefImplicitLod, - SpvOpImageSparseSampleProjDrefExplicitLod, - SpvOpImageSparseFetch, - SpvOpImageSparseGather, - SpvOpImageSparseDrefGather, - SpvOpImageSparseTexelsResident, - SpvOpImageSparseRead}; + image_ops_ = {spv::Op::OpImageSampleImplicitLod, + spv::Op::OpImageSampleExplicitLod, + spv::Op::OpImageSampleDrefImplicitLod, + spv::Op::OpImageSampleDrefExplicitLod, + spv::Op::OpImageSampleProjImplicitLod, + spv::Op::OpImageSampleProjExplicitLod, + spv::Op::OpImageSampleProjDrefImplicitLod, + spv::Op::OpImageSampleProjDrefExplicitLod, + spv::Op::OpImageFetch, + spv::Op::OpImageGather, + spv::Op::OpImageDrefGather, + spv::Op::OpImageRead, + spv::Op::OpImageSparseSampleImplicitLod, + spv::Op::OpImageSparseSampleExplicitLod, + spv::Op::OpImageSparseSampleDrefImplicitLod, + spv::Op::OpImageSparseSampleDrefExplicitLod, + spv::Op::OpImageSparseSampleProjImplicitLod, + spv::Op::OpImageSparseSampleProjExplicitLod, + spv::Op::OpImageSparseSampleProjDrefImplicitLod, + spv::Op::OpImageSparseSampleProjDrefExplicitLod, + spv::Op::OpImageSparseFetch, + spv::Op::OpImageSparseGather, + spv::Op::OpImageSparseDrefGather, + spv::Op::OpImageSparseTexelsResident, + spv::Op::OpImageSparseRead}; dref_image_ops_ = { - SpvOpImageSampleDrefImplicitLod, - SpvOpImageSampleDrefExplicitLod, - SpvOpImageSampleProjDrefImplicitLod, - SpvOpImageSampleProjDrefExplicitLod, - SpvOpImageDrefGather, - SpvOpImageSparseSampleDrefImplicitLod, - SpvOpImageSparseSampleDrefExplicitLod, - SpvOpImageSparseSampleProjDrefImplicitLod, - SpvOpImageSparseSampleProjDrefExplicitLod, - SpvOpImageSparseDrefGather, + spv::Op::OpImageSampleDrefImplicitLod, + spv::Op::OpImageSampleDrefExplicitLod, + spv::Op::OpImageSampleProjDrefImplicitLod, + spv::Op::OpImageSampleProjDrefExplicitLod, + spv::Op::OpImageDrefGather, + spv::Op::OpImageSparseSampleDrefImplicitLod, + spv::Op::OpImageSparseSampleDrefExplicitLod, + spv::Op::OpImageSparseSampleProjDrefImplicitLod, + spv::Op::OpImageSparseSampleProjDrefExplicitLod, + spv::Op::OpImageSparseDrefGather, }; closure_ops_ = { - SpvOpVectorExtractDynamic, - SpvOpVectorInsertDynamic, - SpvOpVectorShuffle, - SpvOpCompositeConstruct, - SpvOpCompositeInsert, - SpvOpCompositeExtract, - SpvOpCopyObject, - SpvOpTranspose, - SpvOpPhi, + spv::Op::OpVectorExtractDynamic, + spv::Op::OpVectorInsertDynamic, + spv::Op::OpVectorShuffle, + spv::Op::OpCompositeConstruct, + spv::Op::OpCompositeInsert, + spv::Op::OpCompositeExtract, + spv::Op::OpCopyObject, + spv::Op::OpTranspose, + spv::Op::OpPhi, }; relaxed_ids_set_.clear(); converted_ids_.clear(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.h index c6e84d1b7..8e10c4fb9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_half_pass.h @@ -45,6 +45,7 @@ class ConvertToHalfPass : public Pass { // Return true if |inst| returns scalar, vector or matrix type with base // float and |width| bool IsFloat(Instruction* inst, uint32_t width); + bool IsStruct(Instruction* inst); // Return true if |inst| is decorated with RelaxedPrecision bool IsDecoratedRelaxed(Instruction* inst); @@ -55,6 +56,9 @@ class ConvertToHalfPass : public Pass { // Add |id| to the relaxed id set void AddRelaxed(uint32_t id); + // Return true if the instruction's operands can be relaxed + bool CanRelaxOpOperands(Instruction* inst); + // Return type id for float with |width| analysis::Type* FloatScalarType(uint32_t width); @@ -120,20 +124,26 @@ class ConvertToHalfPass : public Pass { // Initialize state for converting to half void Initialize(); + struct hasher { + size_t operator()(const spv::Op& op) const noexcept { + return std::hash()(uint32_t(op)); + } + }; + // Set of core operations to be processed - std::unordered_set target_ops_core_; + std::unordered_set target_ops_core_; // Set of 450 extension operations to be processed std::unordered_set target_ops_450_; - // Set of sample operations - std::unordered_set image_ops_; + // Set of all sample operations, including dref and non-dref operations + std::unordered_set image_ops_; - // Set of dref sample operations - std::unordered_set dref_image_ops_; + // Set of only dref sample operations + std::unordered_set dref_image_ops_; - // Set of dref sample operations - std::unordered_set closure_ops_; + // Set of operations that can be marked as relaxed + std::unordered_set closure_ops_; // Set of ids of all relaxed instructions std::unordered_set relaxed_ids_set_; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.cpp index e84d3578a..c82db41ce 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.cpp @@ -16,7 +16,6 @@ #include #include -#include #include "source/opt/ir_builder.h" #include "source/util/make_unique.h" @@ -70,7 +69,7 @@ uint32_t GetImageTypeOfSampledImage(analysis::TypeManager* type_mgr, Instruction* GetNonCopyObjectDef(analysis::DefUseManager* def_use_mgr, uint32_t inst_id) { Instruction* inst = def_use_mgr->GetDef(inst_id); - while (inst->opcode() == SpvOpCopyObject) { + while (inst->opcode() == spv::Op::OpCopyObject) { inst_id = inst->GetSingleWordInOperand(0u); inst = def_use_mgr->GetDef(inst_id); } @@ -87,8 +86,9 @@ bool ConvertToSampledImagePass::GetDescriptorSetBinding( bool found_binding_to_convert = false; for (auto decorate : decoration_manager->GetDecorationsFor(inst.result_id(), false)) { - uint32_t decoration = decorate->GetSingleWordInOperand(1u); - if (decoration == SpvDecorationDescriptorSet) { + spv::Decoration decoration = + spv::Decoration(decorate->GetSingleWordInOperand(1u)); + if (decoration == spv::Decoration::DescriptorSet) { if (found_descriptor_set_to_convert) { assert(false && "A resource has two OpDecorate for the descriptor set"); return false; @@ -96,7 +96,7 @@ bool ConvertToSampledImagePass::GetDescriptorSetBinding( descriptor_set_binding->descriptor_set = decorate->GetSingleWordInOperand(2u); found_descriptor_set_to_convert = true; - } else if (decoration == SpvDecorationBinding) { + } else if (decoration == spv::Decoration::Binding) { if (found_binding_to_convert) { assert(false && "A resource has two OpDecorate for the binding"); return false; @@ -116,7 +116,7 @@ bool ConvertToSampledImagePass::ShouldResourceBeConverted( const analysis::Type* ConvertToSampledImagePass::GetVariableType( const Instruction& variable) const { - if (variable.opcode() != SpvOpVariable) return nullptr; + if (variable.opcode() != spv::Op::OpVariable) return nullptr; auto* type = context()->get_type_mgr()->GetType(variable.type_id()); auto* pointer_type = type->AsPointer(); if (!pointer_type) return nullptr; @@ -124,12 +124,12 @@ const analysis::Type* ConvertToSampledImagePass::GetVariableType( return pointer_type->pointee_type(); } -SpvStorageClass ConvertToSampledImagePass::GetStorageClass( +spv::StorageClass ConvertToSampledImagePass::GetStorageClass( const Instruction& variable) const { - assert(variable.opcode() == SpvOpVariable); + assert(variable.opcode() == spv::Op::OpVariable); auto* type = context()->get_type_mgr()->GetType(variable.type_id()); auto* pointer_type = type->AsPointer(); - if (!pointer_type) return SpvStorageClassMax; + if (!pointer_type) return spv::StorageClass::Max; return pointer_type->storage_class(); } @@ -205,12 +205,12 @@ Pass::Status ConvertToSampledImagePass::Process() { void ConvertToSampledImagePass::FindUses(const Instruction* inst, std::vector* uses, - uint32_t user_opcode) const { + spv::Op user_opcode) const { auto* def_use_mgr = context()->get_def_use_mgr(); def_use_mgr->ForEachUser(inst, [uses, user_opcode, this](Instruction* user) { if (user->opcode() == user_opcode) { uses->push_back(user); - } else if (user->opcode() == SpvOpCopyObject) { + } else if (user->opcode() == spv::Op::OpCopyObject) { FindUses(user, uses, user_opcode); } }); @@ -221,21 +221,21 @@ void ConvertToSampledImagePass::FindUsesOfImage( auto* def_use_mgr = context()->get_def_use_mgr(); def_use_mgr->ForEachUser(image, [uses, this](Instruction* user) { switch (user->opcode()) { - case SpvOpImageFetch: - case SpvOpImageRead: - case SpvOpImageWrite: - case SpvOpImageQueryFormat: - case SpvOpImageQueryOrder: - case SpvOpImageQuerySizeLod: - case SpvOpImageQuerySize: - case SpvOpImageQueryLevels: - case SpvOpImageQuerySamples: - case SpvOpImageSparseFetch: + case spv::Op::OpImageFetch: + case spv::Op::OpImageRead: + case spv::Op::OpImageWrite: + case spv::Op::OpImageQueryFormat: + case spv::Op::OpImageQueryOrder: + case spv::Op::OpImageQuerySizeLod: + case spv::Op::OpImageQuerySize: + case spv::Op::OpImageQueryLevels: + case spv::Op::OpImageQuerySamples: + case spv::Op::OpImageSparseFetch: uses->push_back(user); default: break; } - if (user->opcode() == SpvOpCopyObject) { + if (user->opcode() == spv::Op::OpCopyObject) { FindUsesOfImage(user, uses); } }); @@ -248,7 +248,7 @@ Instruction* ConvertToSampledImagePass::CreateImageExtraction( IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); return builder.AddUnaryOp( GetImageTypeOfSampledImage(context()->get_type_mgr(), sampled_image), - SpvOpImage, sampled_image->result_id()); + spv::Op::OpImage, sampled_image->result_id()); } uint32_t ConvertToSampledImagePass::GetSampledImageTypeForImage( @@ -284,7 +284,7 @@ bool ConvertToSampledImagePass:: auto* def_use_mgr = context()->get_def_use_mgr(); uint32_t sampler_id = sampled_image_inst->GetSingleWordInOperand(1u); auto* sampler_load = def_use_mgr->GetDef(sampler_id); - if (sampler_load->opcode() != SpvOpLoad) return false; + if (sampler_load->opcode() != spv::Op::OpLoad) return false; auto* sampler = def_use_mgr->GetDef(sampler_load->GetSingleWordInOperand(0u)); DescriptorSetAndBinding sampler_descriptor_set_binding; return GetDescriptorSetBinding(*sampler, &sampler_descriptor_set_binding) && @@ -295,7 +295,7 @@ void ConvertToSampledImagePass::UpdateSampledImageUses( Instruction* image_load, Instruction* image_extraction, const DescriptorSetAndBinding& image_descriptor_set_binding) { std::vector sampled_image_users; - FindUses(image_load, &sampled_image_users, SpvOpSampledImage); + FindUses(image_load, &sampled_image_users, spv::Op::OpSampledImage); auto* def_use_mgr = context()->get_def_use_mgr(); for (auto* sampled_image_inst : sampled_image_users) { @@ -328,7 +328,7 @@ bool ConvertToSampledImagePass::ConvertImageVariableToSampledImage( context()->get_type_mgr()->GetType(sampled_image_type_id); if (sampled_image_type == nullptr) return false; auto storage_class = GetStorageClass(*image_variable); - if (storage_class == SpvStorageClassMax) return false; + if (storage_class == spv::StorageClass::Max) return false; analysis::Pointer sampled_image_pointer(sampled_image_type, storage_class); // Make sure |image_variable| is behind its type i.e., avoid the forward @@ -343,7 +343,7 @@ Pass::Status ConvertToSampledImagePass::UpdateImageVariableToSampledImage( Instruction* image_variable, const DescriptorSetAndBinding& descriptor_set_binding) { std::vector image_variable_loads; - FindUses(image_variable, &image_variable_loads, SpvOpLoad); + FindUses(image_variable, &image_variable_loads, spv::Op::OpLoad); if (image_variable_loads.empty()) return Status::SuccessWithoutChange; const uint32_t sampled_image_type_id = @@ -364,14 +364,14 @@ Pass::Status ConvertToSampledImagePass::UpdateImageVariableToSampledImage( bool ConvertToSampledImagePass::DoesSampledImageReferenceImage( Instruction* sampled_image_inst, Instruction* image_variable) { - if (sampled_image_inst->opcode() != SpvOpSampledImage) return false; + if (sampled_image_inst->opcode() != spv::Op::OpSampledImage) return false; auto* def_use_mgr = context()->get_def_use_mgr(); auto* image_load = GetNonCopyObjectDef( def_use_mgr, sampled_image_inst->GetSingleWordInOperand(0u)); - if (image_load->opcode() != SpvOpLoad) return false; + if (image_load->opcode() != spv::Op::OpLoad) return false; auto* image = GetNonCopyObjectDef(def_use_mgr, image_load->GetSingleWordInOperand(0u)); - return image->opcode() == SpvOpVariable && + return image->opcode() == spv::Op::OpVariable && image->result_id() == image_variable->result_id(); } @@ -381,10 +381,10 @@ Pass::Status ConvertToSampledImagePass::CheckUsesOfSamplerVariable( if (image_to_be_combined_with == nullptr) return Status::Failure; std::vector sampler_variable_loads; - FindUses(sampler_variable, &sampler_variable_loads, SpvOpLoad); + FindUses(sampler_variable, &sampler_variable_loads, spv::Op::OpLoad); for (auto* load : sampler_variable_loads) { std::vector sampled_image_users; - FindUses(load, &sampled_image_users, SpvOpSampledImage); + FindUses(load, &sampled_image_users, spv::Op::OpSampledImage); for (auto* sampled_image_inst : sampled_image_users) { if (!DoesSampledImageReferenceImage(sampled_image_inst, image_to_be_combined_with)) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.h index d3938af7d..a8b1501e6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/convert_to_sampled_image_pass.h @@ -120,13 +120,13 @@ class ConvertToSampledImagePass : public Pass { const analysis::Type* GetVariableType(const Instruction& variable) const; // Returns the storage class of |variable|. - SpvStorageClass GetStorageClass(const Instruction& variable) const; + spv::StorageClass GetStorageClass(const Instruction& variable) const; // Finds |inst|'s users whose opcode is |user_opcode| or users of OpCopyObject // instructions of |inst| whose opcode is |user_opcode| and puts them in // |uses|. void FindUses(const Instruction* inst, std::vector* uses, - uint32_t user_opcode) const; + spv::Op user_opcode) const; // Finds OpImage* instructions using |image| or OpCopyObject instructions that // copy |image| and puts them in |uses|. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.cpp index 62ed5e77a..c2bea8ad0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.cpp @@ -22,12 +22,12 @@ namespace spvtools { namespace opt { namespace { -const uint32_t kLoadPointerInOperand = 0; -const uint32_t kStorePointerInOperand = 0; -const uint32_t kStoreObjectInOperand = 1; -const uint32_t kCompositeExtractObjectInOperand = 0; -const uint32_t kTypePointerStorageClassInIdx = 0; -const uint32_t kTypePointerPointeeInIdx = 1; +constexpr uint32_t kLoadPointerInOperand = 0; +constexpr uint32_t kStorePointerInOperand = 0; +constexpr uint32_t kStoreObjectInOperand = 1; +constexpr uint32_t kCompositeExtractObjectInOperand = 0; +constexpr uint32_t kTypePointerStorageClassInIdx = 0; +constexpr uint32_t kTypePointerPointeeInIdx = 1; bool IsDebugDeclareOrValue(Instruction* di) { auto dbg_opcode = di->GetCommonDebugOpcode(); @@ -35,6 +35,32 @@ bool IsDebugDeclareOrValue(Instruction* di) { dbg_opcode == CommonDebugInfoDebugValue; } +// Returns the number of members in |type|. If |type| is not a composite type +// or the number of components is not known at compile time, the return value +// will be 0. +uint32_t GetNumberOfMembers(const analysis::Type* type, IRContext* context) { + if (const analysis::Struct* struct_type = type->AsStruct()) { + return static_cast(struct_type->element_types().size()); + } else if (const analysis::Array* array_type = type->AsArray()) { + const analysis::Constant* length_const = + context->get_constant_mgr()->FindDeclaredConstant( + array_type->LengthId()); + + if (length_const == nullptr) { + // This can happen if the length is an OpSpecConstant. + return 0; + } + assert(length_const->type()->AsInteger()); + return length_const->GetU32(); + } else if (const analysis::Vector* vector_type = type->AsVector()) { + return vector_type->element_count(); + } else if (const analysis::Matrix* matrix_type = type->AsMatrix()) { + return matrix_type->element_count(); + } else { + return 0; + } +} + } // namespace Pass::Status CopyPropagateArrays::Process() { @@ -46,8 +72,8 @@ Pass::Status CopyPropagateArrays::Process() { BasicBlock* entry_bb = &*function.begin(); - for (auto var_inst = entry_bb->begin(); var_inst->opcode() == SpvOpVariable; - ++var_inst) { + for (auto var_inst = entry_bb->begin(); + var_inst->opcode() == spv::Op::OpVariable; ++var_inst) { if (!IsPointerToArrayType(var_inst->type_id())) { continue; } @@ -76,7 +102,7 @@ Pass::Status CopyPropagateArrays::Process() { std::unique_ptr CopyPropagateArrays::FindSourceObjectIfPossible(Instruction* var_inst, Instruction* store_inst) { - assert(var_inst->opcode() == SpvOpVariable && "Expecting a variable."); + assert(var_inst->opcode() == spv::Op::OpVariable && "Expecting a variable."); // Check that the variable is a composite object where |store_inst| // dominates all of its loads. @@ -114,7 +140,7 @@ Instruction* CopyPropagateArrays::FindStoreInstruction( Instruction* store_inst = nullptr; get_def_use_mgr()->WhileEachUser( var_inst, [&store_inst, var_inst](Instruction* use) { - if (use->opcode() == SpvOpStore && + if (use->opcode() == spv::Op::OpStore && use->GetSingleWordInOperand(kStorePointerInOperand) == var_inst->result_id()) { if (store_inst == nullptr) { @@ -132,7 +158,7 @@ Instruction* CopyPropagateArrays::FindStoreInstruction( void CopyPropagateArrays::PropagateObject(Instruction* var_inst, MemoryObject* source, Instruction* insertion_point) { - assert(var_inst->opcode() == SpvOpVariable && + assert(var_inst->opcode() == spv::Op::OpVariable && "This function propagates variables."); Instruction* new_access_chain = BuildNewAccessChain(insertion_point, source); @@ -151,22 +177,32 @@ Instruction* CopyPropagateArrays::BuildNewAccessChain( return source->GetVariable(); } + source->BuildConstants(); + std::vector access_ids(source->AccessChain().size()); + std::transform( + source->AccessChain().cbegin(), source->AccessChain().cend(), + access_ids.begin(), [](const AccessChainEntry& entry) { + assert(entry.is_result_id && "Constants needs to be built first."); + return entry.result_id; + }); + return builder.AddAccessChain(source->GetPointerTypeId(this), - source->GetVariable()->result_id(), - source->AccessChain()); + source->GetVariable()->result_id(), access_ids); } bool CopyPropagateArrays::HasNoStores(Instruction* ptr_inst) { return get_def_use_mgr()->WhileEachUser(ptr_inst, [this](Instruction* use) { - if (use->opcode() == SpvOpLoad) { + if (use->opcode() == spv::Op::OpLoad) { return true; - } else if (use->opcode() == SpvOpAccessChain) { + } else if (use->opcode() == spv::Op::OpAccessChain) { return HasNoStores(use); - } else if (use->IsDecoration() || use->opcode() == SpvOpName) { + } else if (use->IsDecoration() || use->opcode() == spv::Op::OpName) { return true; - } else if (use->opcode() == SpvOpStore) { + } else if (use->opcode() == spv::Op::OpStore) { return false; - } else if (use->opcode() == SpvOpImageTexelPointer) { + } else if (use->opcode() == spv::Op::OpImageTexelPointer) { + return true; + } else if (use->opcode() == spv::Op::OpEntryPoint) { return true; } // Some other instruction. Be conservative. @@ -183,19 +219,19 @@ bool CopyPropagateArrays::HasValidReferencesOnly(Instruction* ptr_inst, return get_def_use_mgr()->WhileEachUser( ptr_inst, [this, store_inst, dominator_analysis, ptr_inst](Instruction* use) { - if (use->opcode() == SpvOpLoad || - use->opcode() == SpvOpImageTexelPointer) { + if (use->opcode() == spv::Op::OpLoad || + use->opcode() == spv::Op::OpImageTexelPointer) { // TODO: If there are many load in the same BB as |store_inst| the // time to do the multiple traverses can add up. Consider collecting // those loads and doing a single traversal. return dominator_analysis->Dominates(store_inst, use); - } else if (use->opcode() == SpvOpAccessChain) { + } else if (use->opcode() == spv::Op::OpAccessChain) { return HasValidReferencesOnly(use, store_inst); - } else if (use->IsDecoration() || use->opcode() == SpvOpName) { + } else if (use->IsDecoration() || use->opcode() == spv::Op::OpName) { return true; - } else if (use->opcode() == SpvOpStore) { + } else if (use->opcode() == spv::Op::OpStore) { // If we are storing to part of the object it is not an candidate. - return ptr_inst->opcode() == SpvOpVariable && + return ptr_inst->opcode() == spv::Op::OpVariable && store_inst->GetSingleWordInOperand(kStorePointerInOperand) == ptr_inst->result_id(); } else if (IsDebugDeclareOrValue(use)) { @@ -211,15 +247,15 @@ CopyPropagateArrays::GetSourceObjectIfAny(uint32_t result) { Instruction* result_inst = context()->get_def_use_mgr()->GetDef(result); switch (result_inst->opcode()) { - case SpvOpLoad: + case spv::Op::OpLoad: return BuildMemoryObjectFromLoad(result_inst); - case SpvOpCompositeExtract: + case spv::Op::OpCompositeExtract: return BuildMemoryObjectFromExtract(result_inst); - case SpvOpCompositeConstruct: + case spv::Op::OpCompositeConstruct: return BuildMemoryObjectFromCompositeConstruct(result_inst); - case SpvOpCopyObject: + case spv::Op::OpCopyObject: return GetSourceObjectIfAny(result_inst->GetSingleWordInOperand(0)); - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: return BuildMemoryObjectFromInsert(result_inst); default: return nullptr; @@ -241,7 +277,7 @@ CopyPropagateArrays::BuildMemoryObjectFromLoad(Instruction* load_inst) { // // It is built in reverse order because the different |OpAccessChain| // instructions are visited in reverse order from which they are applied. - while (current_inst->opcode() == SpvOpAccessChain) { + while (current_inst->opcode() == spv::Op::OpAccessChain) { for (uint32_t i = current_inst->NumInOperands() - 1; i >= 1; --i) { uint32_t element_index_id = current_inst->GetSingleWordInOperand(i); components_in_reverse.push_back(element_index_id); @@ -253,7 +289,7 @@ CopyPropagateArrays::BuildMemoryObjectFromLoad(Instruction* load_inst) { // instruction followed by a series of |OpAccessChain| instructions, then // return |nullptr| because we cannot identify the owner or access chain // exactly. - if (current_inst->opcode() != SpvOpVariable) { + if (current_inst->opcode() != spv::Op::OpVariable) { return nullptr; } @@ -266,38 +302,28 @@ CopyPropagateArrays::BuildMemoryObjectFromLoad(Instruction* load_inst) { std::unique_ptr CopyPropagateArrays::BuildMemoryObjectFromExtract(Instruction* extract_inst) { - assert(extract_inst->opcode() == SpvOpCompositeExtract && + assert(extract_inst->opcode() == spv::Op::OpCompositeExtract && "Expecting an OpCompositeExtract instruction."); - analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); - std::unique_ptr result = GetSourceObjectIfAny( extract_inst->GetSingleWordInOperand(kCompositeExtractObjectInOperand)); - if (result) { - analysis::Integer int_type(32, false); - const analysis::Type* uint32_type = - context()->get_type_mgr()->GetRegisteredType(&int_type); - - std::vector components; - // Convert the indices in the extract instruction to a series of ids that - // can be used by the |OpAccessChain| instruction. - for (uint32_t i = 1; i < extract_inst->NumInOperands(); ++i) { - uint32_t index = extract_inst->GetSingleWordInOperand(i); - const analysis::Constant* index_const = - const_mgr->GetConstant(uint32_type, {index}); - components.push_back( - const_mgr->GetDefiningInstruction(index_const)->result_id()); - } - result->GetMember(components); - return result; + if (!result) { + return nullptr; + } + + // Copy the indices of the extract instruction to |OpAccessChain| indices. + std::vector components; + for (uint32_t i = 1; i < extract_inst->NumInOperands(); ++i) { + components.push_back({false, {extract_inst->GetSingleWordInOperand(i)}}); } - return nullptr; + result->PushIndirection(components); + return result; } std::unique_ptr CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct( Instruction* conststruct_inst) { - assert(conststruct_inst->opcode() == SpvOpCompositeConstruct && + assert(conststruct_inst->opcode() == spv::Op::OpCompositeConstruct && "Expecting an OpCompositeConstruct instruction."); // If every operand in the instruction are part of the same memory object, and @@ -315,19 +341,12 @@ CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct( return nullptr; } - analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); - const analysis::Constant* last_access = - const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); - if (!last_access || !last_access->type()->AsInteger()) { + AccessChainEntry last_access = memory_object->AccessChain().back(); + if (!IsAccessChainIndexValidAndEqualTo(last_access, 0)) { return nullptr; } - if (last_access->GetU32() != 0) { - return nullptr; - } - - memory_object->GetParent(); - + memory_object->PopIndirection(); if (memory_object->GetNumberOfMembers() != conststruct_inst->NumInOperands()) { return nullptr; @@ -349,13 +368,8 @@ CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct( return nullptr; } - last_access = - const_mgr->FindDeclaredConstant(member_object->AccessChain().back()); - if (!last_access || !last_access->type()->AsInteger()) { - return nullptr; - } - - if (last_access->GetU32() != i) { + last_access = member_object->AccessChain().back(); + if (!IsAccessChainIndexValidAndEqualTo(last_access, i)) { return nullptr; } } @@ -364,27 +378,14 @@ CopyPropagateArrays::BuildMemoryObjectFromCompositeConstruct( std::unique_ptr CopyPropagateArrays::BuildMemoryObjectFromInsert(Instruction* insert_inst) { - assert(insert_inst->opcode() == SpvOpCompositeInsert && + assert(insert_inst->opcode() == spv::Op::OpCompositeInsert && "Expecting an OpCompositeInsert instruction."); analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); analysis::TypeManager* type_mgr = context()->get_type_mgr(); - analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); const analysis::Type* result_type = type_mgr->GetType(insert_inst->type_id()); - uint32_t number_of_elements = 0; - if (const analysis::Struct* struct_type = result_type->AsStruct()) { - number_of_elements = - static_cast(struct_type->element_types().size()); - } else if (const analysis::Array* array_type = result_type->AsArray()) { - const analysis::Constant* length_const = - const_mgr->FindDeclaredConstant(array_type->LengthId()); - number_of_elements = length_const->GetU32(); - } else if (const analysis::Vector* vector_type = result_type->AsVector()) { - number_of_elements = vector_type->element_count(); - } else if (const analysis::Matrix* matrix_type = result_type->AsMatrix()) { - number_of_elements = matrix_type->element_count(); - } + uint32_t number_of_elements = GetNumberOfMembers(result_type, context()); if (number_of_elements == 0) { return nullptr; @@ -409,22 +410,17 @@ CopyPropagateArrays::BuildMemoryObjectFromInsert(Instruction* insert_inst) { return nullptr; } - const analysis::Constant* last_access = - const_mgr->FindDeclaredConstant(memory_object->AccessChain().back()); - if (!last_access || !last_access->type()->AsInteger()) { + AccessChainEntry last_access = memory_object->AccessChain().back(); + if (!IsAccessChainIndexValidAndEqualTo(last_access, number_of_elements - 1)) { return nullptr; } - if (last_access->GetU32() != number_of_elements - 1) { - return nullptr; - } - - memory_object->GetParent(); + memory_object->PopIndirection(); Instruction* current_insert = def_use_mgr->GetDef(insert_inst->GetSingleWordInOperand(1)); for (uint32_t i = number_of_elements - 1; i > 0; --i) { - if (current_insert->opcode() != SpvOpCompositeInsert) { + if (current_insert->opcode() != spv::Op::OpCompositeInsert) { return nullptr; } @@ -456,14 +452,9 @@ CopyPropagateArrays::BuildMemoryObjectFromInsert(Instruction* insert_inst) { return nullptr; } - const analysis::Constant* current_last_access = - const_mgr->FindDeclaredConstant( - current_memory_object->AccessChain().back()); - if (!current_last_access || !current_last_access->type()->AsInteger()) { - return nullptr; - } - - if (current_last_access->GetU32() != i - 1) { + AccessChainEntry current_last_access = + current_memory_object->AccessChain().back(); + if (!IsAccessChainIndexValidAndEqualTo(current_last_access, i - 1)) { return nullptr; } current_insert = @@ -473,6 +464,21 @@ CopyPropagateArrays::BuildMemoryObjectFromInsert(Instruction* insert_inst) { return memory_object; } +bool CopyPropagateArrays::IsAccessChainIndexValidAndEqualTo( + const AccessChainEntry& entry, uint32_t value) const { + if (!entry.is_result_id) { + return entry.immediate == value; + } + + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + const analysis::Constant* constant = + const_mgr->FindDeclaredConstant(entry.result_id); + if (!constant || !constant->type()->AsInteger()) { + return false; + } + return constant->GetU32() == value; +} + bool CopyPropagateArrays::IsPointerToArrayType(uint32_t type_id) { analysis::TypeManager* type_mgr = context()->get_type_mgr(); analysis::Pointer* pointer_type = type_mgr->GetType(type_id)->AsPointer(); @@ -507,7 +513,7 @@ bool CopyPropagateArrays::CanUpdateUses(Instruction* original_ptr_inst, if (IsDebugDeclareOrValue(use)) return true; switch (use->opcode()) { - case SpvOpLoad: { + case spv::Op::OpLoad: { analysis::Pointer* pointer_type = type->AsPointer(); uint32_t new_type_id = type_mgr->GetId(pointer_type->pointee_type()); @@ -516,7 +522,7 @@ bool CopyPropagateArrays::CanUpdateUses(Instruction* original_ptr_inst, } return true; } - case SpvOpAccessChain: { + case spv::Op::OpAccessChain: { analysis::Pointer* pointer_type = type->AsPointer(); const analysis::Type* pointee_type = pointer_type->pointee_type(); @@ -530,6 +536,12 @@ bool CopyPropagateArrays::CanUpdateUses(Instruction* original_ptr_inst, // Variable index means the type is a type where every element // is the same type. Use element 0 to get the type. access_chain.push_back(0); + + // We are trying to access a struct with variable indices. + // This cannot happen. + if (pointee_type->kind() == analysis::Type::kStruct) { + return false; + } } } @@ -548,7 +560,7 @@ bool CopyPropagateArrays::CanUpdateUses(Instruction* original_ptr_inst, } return true; } - case SpvOpCompositeExtract: { + case spv::Op::OpCompositeExtract: { std::vector access_chain; for (uint32_t i = 1; i < use->NumInOperands(); ++i) { access_chain.push_back(use->GetSingleWordInOperand(i)); @@ -566,13 +578,13 @@ bool CopyPropagateArrays::CanUpdateUses(Instruction* original_ptr_inst, } return true; } - case SpvOpStore: + case spv::Op::OpStore: // If needed, we can create an element-by-element copy to change the // type of the value being stored. This way we can always handled // stores. return true; - case SpvOpImageTexelPointer: - case SpvOpName: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpName: return true; default: return use->IsDecoration(); @@ -599,8 +611,8 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, if (use->IsCommonDebugInstr()) { switch (use->GetCommonDebugOpcode()) { case CommonDebugInfoDebugDeclare: { - if (new_ptr_inst->opcode() == SpvOpVariable || - new_ptr_inst->opcode() == SpvOpFunctionParameter) { + if (new_ptr_inst->opcode() == spv::Op::OpVariable || + new_ptr_inst->opcode() == spv::Op::OpFunctionParameter) { context()->ForgetUses(use); use->SetOperand(index, {new_ptr_inst->result_id()}); context()->AnalyzeUses(use); @@ -641,7 +653,7 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, } switch (use->opcode()) { - case SpvOpLoad: { + case spv::Op::OpLoad: { // Replace the actual use. context()->ForgetUses(use); use->SetOperand(index, {new_ptr_inst->result_id()}); @@ -659,7 +671,7 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, context()->AnalyzeUses(use); } } break; - case SpvOpAccessChain: { + case spv::Op::OpAccessChain: { // Update the actual use. context()->ForgetUses(use); use->SetOperand(index, {new_ptr_inst->result_id()}); @@ -686,7 +698,7 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, pointer_type_inst->GetSingleWordInOperand(kTypePointerPointeeInIdx), access_chain); - SpvStorageClass storage_class = static_cast( + spv::StorageClass storage_class = static_cast( pointer_type_inst->GetSingleWordInOperand( kTypePointerStorageClassInIdx)); @@ -701,7 +713,7 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, context()->AnalyzeUses(use); } } break; - case SpvOpCompositeExtract: { + case spv::Op::OpCompositeExtract: { // Update the actual use. context()->ForgetUses(use); use->SetOperand(index, {new_ptr_inst->result_id()}); @@ -722,7 +734,7 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, context()->AnalyzeUses(use); } } break; - case SpvOpStore: + case spv::Op::OpStore: // If the use is the pointer, then it is the single store to that // variable. We do not want to replace it. Instead, it will become // dead after all of the loads are removed, and ADCE will get rid of it. @@ -745,11 +757,11 @@ void CopyPropagateArrays::UpdateUses(Instruction* original_ptr_inst, context()->AnalyzeUses(use); } break; - case SpvOpImageTexelPointer: - // We treat an OpImageTexelPointer as a load. The result type should - // always have the Image storage class, and should not need to be - // updated. - + case spv::Op::OpDecorate: + // We treat an OpImageTexelPointer as a load. The result type should + // always have the Image storage class, and should not need to be + // updated. + case spv::Op::OpImageTexelPointer: // Replace the actual use. context()->ForgetUses(use); use->SetOperand(index, {new_ptr_inst->result_id()}); @@ -767,13 +779,13 @@ uint32_t CopyPropagateArrays::GetMemberTypeId( for (uint32_t element_index : access_chain) { Instruction* type_inst = get_def_use_mgr()->GetDef(id); switch (type_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeMatrix: - case SpvOpTypeVector: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeVector: id = type_inst->GetSingleWordInOperand(0); break; - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: id = type_inst->GetSingleWordInOperand(element_index); break; default: @@ -785,8 +797,8 @@ uint32_t CopyPropagateArrays::GetMemberTypeId( return id; } -void CopyPropagateArrays::MemoryObject::GetMember( - const std::vector& access_chain) { +void CopyPropagateArrays::MemoryObject::PushIndirection( + const std::vector& access_chain) { access_chain_.insert(access_chain_.end(), access_chain.begin(), access_chain.end()); } @@ -801,43 +813,34 @@ uint32_t CopyPropagateArrays::MemoryObject::GetNumberOfMembers() { std::vector access_indices = GetAccessIds(); type = type_mgr->GetMemberType(type, access_indices); - if (const analysis::Struct* struct_type = type->AsStruct()) { - return static_cast(struct_type->element_types().size()); - } else if (const analysis::Array* array_type = type->AsArray()) { - const analysis::Constant* length_const = - context->get_constant_mgr()->FindDeclaredConstant( - array_type->LengthId()); - assert(length_const->type()->AsInteger()); - return length_const->GetU32(); - } else if (const analysis::Vector* vector_type = type->AsVector()) { - return vector_type->element_count(); - } else if (const analysis::Matrix* matrix_type = type->AsMatrix()) { - return matrix_type->element_count(); - } else { - return 0; - } + return opt::GetNumberOfMembers(type, context); } - template CopyPropagateArrays::MemoryObject::MemoryObject(Instruction* var_inst, iterator begin, iterator end) - : variable_inst_(var_inst), access_chain_(begin, end) {} + : variable_inst_(var_inst) { + std::transform(begin, end, std::back_inserter(access_chain_), + [](uint32_t id) { + return AccessChainEntry{true, {id}}; + }); +} std::vector CopyPropagateArrays::MemoryObject::GetAccessIds() const { analysis::ConstantManager* const_mgr = variable_inst_->context()->get_constant_mgr(); - std::vector access_indices; - for (uint32_t id : AccessChain()) { - const analysis::Constant* element_index_const = - const_mgr->FindDeclaredConstant(id); - if (!element_index_const) { - access_indices.push_back(0); - } else { - access_indices.push_back(element_index_const->GetU32()); - } - } - return access_indices; + std::vector indices(AccessChain().size()); + std::transform(AccessChain().cbegin(), AccessChain().cend(), indices.begin(), + [&const_mgr](const AccessChainEntry& entry) { + if (entry.is_result_id) { + const analysis::Constant* constant = + const_mgr->FindDeclaredConstant(entry.result_id); + return constant == nullptr ? 0 : constant->GetU32(); + } + + return entry.immediate; + }); + return indices; } bool CopyPropagateArrays::MemoryObject::Contains( @@ -858,5 +861,24 @@ bool CopyPropagateArrays::MemoryObject::Contains( return true; } +void CopyPropagateArrays::MemoryObject::BuildConstants() { + for (auto& entry : access_chain_) { + if (entry.is_result_id) { + continue; + } + + auto context = variable_inst_->context(); + analysis::Integer int_type(32, false); + const analysis::Type* uint32_type = + context->get_type_mgr()->GetRegisteredType(&int_type); + analysis::ConstantManager* const_mgr = context->get_constant_mgr(); + const analysis::Constant* index_const = + const_mgr->GetConstant(uint32_type, {entry.immediate}); + entry.result_id = + const_mgr->GetDefiningInstruction(index_const)->result_id(); + entry.is_result_id = true; + } +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.h index f4314a74b..c6ca7d251 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/copy_prop_arrays.h @@ -35,7 +35,7 @@ namespace opt { // // The hard part is keeping all of the types correct. We do not want to // have to do too large a search to update everything, which may not be -// possible, do we give up if we see any instruction that might be hard to +// possible, so we give up if we see any instruction that might be hard to // update. class CopyPropagateArrays : public MemPass { @@ -52,6 +52,22 @@ class CopyPropagateArrays : public MemPass { } private: + // Represents one index in the OpAccessChain instruction. It can be either + // an instruction's result_id (OpConstant by ex), or a immediate value. + // Immediate values are used to prepare the final access chain without + // creating OpConstant instructions until done. + struct AccessChainEntry { + bool is_result_id; + union { + uint32_t result_id; + uint32_t immediate; + }; + + bool operator!=(const AccessChainEntry& other) const { + return other.is_result_id != is_result_id || other.result_id != result_id; + } + }; + // The class used to identify a particular memory object. This memory object // will be owned by a particular variable, meaning that the memory is part of // that variable. It could be the entire variable or a member of the @@ -70,12 +86,12 @@ class CopyPropagateArrays : public MemPass { // (starting from the current member). The elements in |access_chain| are // interpreted the same as the indices in the |OpAccessChain| // instruction. - void GetMember(const std::vector& access_chain); + void PushIndirection(const std::vector& access_chain); // Change |this| to now represent the first enclosing object to which it // belongs. (Remove the last element off the access_chain). It is invalid // to call this function if |this| does not represent a member of its owner. - void GetParent() { + void PopIndirection() { assert(IsMember()); access_chain_.pop_back(); } @@ -85,7 +101,8 @@ class CopyPropagateArrays : public MemPass { bool IsMember() const { return !access_chain_.empty(); } // Returns the number of members in the object represented by |this|. If - // |this| does not represent a composite type, the return value will be 0. + // |this| does not represent a composite type or the number of components is + // not known at compile time, the return value will be 0. uint32_t GetNumberOfMembers(); // Returns the owning variable that the memory object is contained in. @@ -95,7 +112,13 @@ class CopyPropagateArrays : public MemPass { // member that |this| represents starting from the owning variable. These // values are to be interpreted the same way the indices are in an // |OpAccessChain| instruction. - const std::vector& AccessChain() const { return access_chain_; } + const std::vector& AccessChain() const { + return access_chain_; + } + + // Converts all immediate values in the AccessChain their OpConstant + // equivalent. + void BuildConstants(); // Returns the type id of the pointer type that can be used to point to this // memory object. @@ -112,13 +135,13 @@ class CopyPropagateArrays : public MemPass { var_pointer_inst->GetSingleWordInOperand(1), GetAccessIds()); uint32_t member_pointer_type_id = type_mgr->FindPointerToType( - member_type_id, static_cast( + member_type_id, static_cast( var_pointer_inst->GetSingleWordInOperand(0))); return member_pointer_type_id; } // Returns the storage class of the memory object. - SpvStorageClass GetStorageClass() const { + spv::StorageClass GetStorageClass() const { analysis::TypeManager* type_mgr = GetVariable()->context()->get_type_mgr(); const analysis::Pointer* pointer_type = @@ -137,7 +160,7 @@ class CopyPropagateArrays : public MemPass { // The access chain to reach the particular member the memory object // represents. It should be interpreted the same way the indices in an // |OpAccessChain| are interpreted. - std::vector access_chain_; + std::vector access_chain_; std::vector GetAccessIds() const; }; @@ -185,17 +208,21 @@ class CopyPropagateArrays : public MemPass { // Returns the memory object that at some point was equivalent to the result // of |insert_inst|. If a memory object cannot be identified, the return - // value is |nullptr\. The opcode of |insert_inst| must be + // value is |nullptr|. The opcode of |insert_inst| must be // |OpCompositeInsert|. This function looks for a series of // |OpCompositeInsert| instructions that insert the elements one at a time in // order from beginning to end. std::unique_ptr BuildMemoryObjectFromInsert( Instruction* insert_inst); + // Return true if the given entry can represent the given value. + bool IsAccessChainIndexValidAndEqualTo(const AccessChainEntry& entry, + uint32_t value) const; + // Return true if |type_id| is a pointer type whose pointee type is an array. bool IsPointerToArrayType(uint32_t type_id); - // Returns true of there are not stores using |ptr_inst| or something derived + // Returns true if there are not stores using |ptr_inst| or something derived // from it. bool HasNoStores(Instruction* ptr_inst); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dataflow.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dataflow.cpp index c91fad08e..63737f198 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dataflow.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dataflow.cpp @@ -14,7 +14,6 @@ #include "source/opt/dataflow.h" -#include #include namespace spvtools { @@ -78,7 +77,7 @@ void ForwardDataFlowAnalysis::EnqueueUsers(Instruction* inst) { } void ForwardDataFlowAnalysis::EnqueueBlockSuccessors(Instruction* inst) { - if (inst->opcode() != SpvOpLabel) return; + if (inst->opcode() != spv::Op::OpLabel) return; context() .cfg() ->block(inst->result_id()) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.cpp index cc616ca6e..1526b9e05 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.cpp @@ -23,34 +23,30 @@ #include "source/cfa.h" #include "source/opt/ir_context.h" -#include "source/opt/iterator.h" #include "source/opt/struct_cfg_analysis.h" #include "source/util/make_unique.h" namespace spvtools { namespace opt { - namespace { - -const uint32_t kBranchCondTrueLabIdInIdx = 1; -const uint32_t kBranchCondFalseLabIdInIdx = 2; - -} // anonymous namespace +constexpr uint32_t kBranchCondTrueLabIdInIdx = 1; +constexpr uint32_t kBranchCondFalseLabIdInIdx = 2; +} // namespace bool DeadBranchElimPass::GetConstCondition(uint32_t condId, bool* condVal) { bool condIsConst; Instruction* cInst = get_def_use_mgr()->GetDef(condId); switch (cInst->opcode()) { - case SpvOpConstantNull: - case SpvOpConstantFalse: { + case spv::Op::OpConstantNull: + case spv::Op::OpConstantFalse: { *condVal = false; condIsConst = true; } break; - case SpvOpConstantTrue: { + case spv::Op::OpConstantTrue: { *condVal = true; condIsConst = true; } break; - case SpvOpLogicalNot: { + case spv::Op::OpLogicalNot: { bool negVal; condIsConst = GetConstCondition(cInst->GetSingleWordInOperand(0), &negVal); @@ -65,13 +61,13 @@ bool DeadBranchElimPass::GetConstInteger(uint32_t selId, uint32_t* selVal) { Instruction* sInst = get_def_use_mgr()->GetDef(selId); uint32_t typeId = sInst->type_id(); Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); - if (!typeInst || (typeInst->opcode() != SpvOpTypeInt)) return false; + if (!typeInst || (typeInst->opcode() != spv::Op::OpTypeInt)) return false; // TODO(greg-lunarg): Support non-32 bit ints if (typeInst->GetSingleWordInOperand(0) != 32) return false; - if (sInst->opcode() == SpvOpConstant) { + if (sInst->opcode() == spv::Op::OpConstant) { *selVal = sInst->GetSingleWordInOperand(0); return true; - } else if (sInst->opcode() == SpvOpConstantNull) { + } else if (sInst->opcode() == spv::Op::OpConstantNull) { *selVal = 0; return true; } @@ -81,7 +77,7 @@ bool DeadBranchElimPass::GetConstInteger(uint32_t selId, uint32_t* selVal) { void DeadBranchElimPass::AddBranch(uint32_t labelId, BasicBlock* bp) { assert(get_def_use_mgr()->GetDef(labelId) != nullptr); std::unique_ptr newBranch( - new Instruction(context(), SpvOpBranch, 0, 0, + new Instruction(context(), spv::Op::OpBranch, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {labelId}}})); context()->AnalyzeDefUse(&*newBranch); context()->set_instr_block(&*newBranch, bp); @@ -115,13 +111,13 @@ bool DeadBranchElimPass::MarkLiveBlocks( Instruction* terminator = block->terminator(); uint32_t live_lab_id = 0; // Check if the terminator has a single valid successor. - if (terminator->opcode() == SpvOpBranchConditional) { + if (terminator->opcode() == spv::Op::OpBranchConditional) { bool condVal; if (GetConstCondition(terminator->GetSingleWordInOperand(0u), &condVal)) { live_lab_id = terminator->GetSingleWordInOperand( condVal ? kBranchCondTrueLabIdInIdx : kBranchCondFalseLabIdInIdx); } - } else if (terminator->opcode() == SpvOpSwitch) { + } else if (terminator->opcode() == spv::Op::OpSwitch) { uint32_t sel_val; if (GetConstInteger(terminator->GetSingleWordInOperand(0u), &sel_val)) { // Search switch operands for selector value, set live_lab_id to @@ -194,8 +190,8 @@ bool DeadBranchElimPass::SimplifyBranch(BasicBlock* block, uint32_t live_lab_id) { Instruction* merge_inst = block->GetMergeInst(); Instruction* terminator = block->terminator(); - if (merge_inst && merge_inst->opcode() == SpvOpSelectionMerge) { - if (merge_inst->NextNode()->opcode() == SpvOpSwitch && + if (merge_inst && merge_inst->opcode() == spv::Op::OpSelectionMerge) { + if (merge_inst->NextNode()->opcode() == spv::Op::OpSwitch && SwitchHasNestedBreak(block->id())) { if (terminator->NumInOperands() == 2) { // We cannot remove the branch, and it already has a single case, so no @@ -266,7 +262,7 @@ bool DeadBranchElimPass::FixPhiNodesInLiveBlocks( for (auto& block : *func) { if (live_blocks.count(&block)) { for (auto iter = block.begin(); iter != block.end();) { - if (iter->opcode() != SpvOpPhi) { + if (iter->opcode() != spv::Op::OpPhi) { break; } @@ -292,7 +288,7 @@ bool DeadBranchElimPass::FixPhiNodesInLiveBlocks( cont_iter->second == &block && inst->NumInOperands() > 4) { if (get_def_use_mgr() ->GetDef(inst->GetSingleWordInOperand(i - 1)) - ->opcode() == SpvOpUndef) { + ->opcode() == spv::Op::OpUndef) { // Already undef incoming value, no change necessary. operands.push_back(inst->GetInOperand(i - 1)); operands.push_back(inst->GetInOperand(i)); @@ -378,14 +374,14 @@ bool DeadBranchElimPass::EraseDeadBlocks( if (unreachable_continues.count(&*ebi)) { uint32_t cont_id = unreachable_continues.find(&*ebi)->second->id(); if (ebi->begin() != ebi->tail() || - ebi->terminator()->opcode() != SpvOpBranch || + ebi->terminator()->opcode() != spv::Op::OpBranch || ebi->terminator()->GetSingleWordInOperand(0u) != cont_id) { // Make unreachable, but leave the label. KillAllInsts(&*ebi, false); // Add unconditional branch to header. assert(unreachable_continues.count(&*ebi)); ebi->AddInstruction(MakeUnique( - context(), SpvOpBranch, 0, 0, + context(), spv::Op::OpBranch, 0, 0, std::initializer_list{{SPV_OPERAND_TYPE_ID, {cont_id}}})); get_def_use_mgr()->AnalyzeInstUse(&*ebi->tail()); context()->set_instr_block(&*ebi->tail(), &*ebi); @@ -394,12 +390,12 @@ bool DeadBranchElimPass::EraseDeadBlocks( ++ebi; } else if (unreachable_merges.count(&*ebi)) { if (ebi->begin() != ebi->tail() || - ebi->terminator()->opcode() != SpvOpUnreachable) { + ebi->terminator()->opcode() != spv::Op::OpUnreachable) { // Make unreachable, but leave the label. KillAllInsts(&*ebi, false); // Add unreachable terminator. ebi->AddInstruction( - MakeUnique(context(), SpvOpUnreachable, 0, 0, + MakeUnique(context(), spv::Op::OpUnreachable, 0, 0, std::initializer_list{})); context()->AnalyzeUses(ebi->terminator()); context()->set_instr_block(ebi->terminator(), &*ebi); @@ -459,22 +455,13 @@ void DeadBranchElimPass::FixBlockOrder() { }; // Reorders blocks according to structured order. - ProcessFunction reorder_structured = [this](Function* function) { - std::list order; - context()->cfg()->ComputeStructuredOrder(function, &*function->begin(), - &order); - std::vector blocks; - for (auto block : order) { - blocks.push_back(block); - } - for (uint32_t i = 1; i < blocks.size(); ++i) { - function->MoveBasicBlockToAfter(blocks[i]->id(), blocks[i - 1]); - } + ProcessFunction reorder_structured = [](Function* function) { + function->ReorderBasicBlocksInStructuredOrder(); return true; }; // Structured order is more intuitive so use it where possible. - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) { + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) { context()->ProcessReachableCallTree(reorder_structured); } else { context()->ProcessReachableCallTree(reorder_dominators); @@ -486,7 +473,8 @@ Pass::Status DeadBranchElimPass::Process() { // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate for (auto& ai : get_module()->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; + if (ai.opcode() == spv::Op::OpGroupDecorate) + return Status::SuccessWithoutChange; // Process all entry point functions ProcessFunction pfn = [this](Function* fp) { return EliminateDeadBranches(fp); @@ -510,7 +498,7 @@ Instruction* DeadBranchElimPass::FindFirstExitFromSelectionMerge( Instruction* branch = start_block->terminator(); uint32_t next_block_id = 0; switch (branch->opcode()) { - case SpvOpBranchConditional: + case spv::Op::OpBranchConditional: next_block_id = start_block->MergeBlockIdIfAny(); if (next_block_id == 0) { // If a possible target is the |loop_merge_id| or |loop_continue_id|, @@ -539,7 +527,7 @@ Instruction* DeadBranchElimPass::FindFirstExitFromSelectionMerge( } } break; - case SpvOpSwitch: + case spv::Op::OpSwitch: next_block_id = start_block->MergeBlockIdIfAny(); if (next_block_id == 0) { // A switch with no merge instructions can have at most 5 targets: @@ -587,7 +575,7 @@ Instruction* DeadBranchElimPass::FindFirstExitFromSelectionMerge( // The fall through is case 3. } break; - case SpvOpBranch: + case spv::Op::OpBranch: // Need to check if this is the header of a loop nested in the // selection construct. next_block_id = start_block->MergeBlockIdIfAny(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.h index c350bb2f0..198bad2dc 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_branch_elim_pass.h @@ -158,7 +158,7 @@ class DeadBranchElimPass : public MemPass { uint32_t cont_id, uint32_t header_id, uint32_t merge_id, std::unordered_set* blocks_with_back_edges); - // Returns true if there is a brach to the merge node of the selection + // Returns true if there is a branch to the merge node of the selection // construct |switch_header_id| that is inside a nested selection construct or // in the header of the nested selection construct. bool SwitchHasNestedBreak(uint32_t switch_header_id); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_insert_elim_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_insert_elim_pass.cpp index d877f0f96..f985e4c26 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_insert_elim_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_insert_elim_pass.cpp @@ -23,32 +23,29 @@ namespace spvtools { namespace opt { - namespace { - -const uint32_t kTypeVectorCountInIdx = 1; -const uint32_t kTypeMatrixCountInIdx = 1; -const uint32_t kTypeArrayLengthIdInIdx = 1; -const uint32_t kTypeIntWidthInIdx = 0; -const uint32_t kConstantValueInIdx = 0; -const uint32_t kInsertObjectIdInIdx = 0; -const uint32_t kInsertCompositeIdInIdx = 1; - -} // anonymous namespace +constexpr uint32_t kTypeVectorCountInIdx = 1; +constexpr uint32_t kTypeMatrixCountInIdx = 1; +constexpr uint32_t kTypeArrayLengthIdInIdx = 1; +constexpr uint32_t kTypeIntWidthInIdx = 0; +constexpr uint32_t kConstantValueInIdx = 0; +constexpr uint32_t kInsertObjectIdInIdx = 0; +constexpr uint32_t kInsertCompositeIdInIdx = 1; +} // namespace uint32_t DeadInsertElimPass::NumComponents(Instruction* typeInst) { switch (typeInst->opcode()) { - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { return typeInst->GetSingleWordInOperand(kTypeVectorCountInIdx); } break; - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { return typeInst->GetSingleWordInOperand(kTypeMatrixCountInIdx); } break; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { uint32_t lenId = typeInst->GetSingleWordInOperand(kTypeArrayLengthIdInIdx); Instruction* lenInst = get_def_use_mgr()->GetDef(lenId); - if (lenInst->opcode() != SpvOpConstant) return 0; + if (lenInst->opcode() != spv::Op::OpConstant) return 0; uint32_t lenTypeId = lenInst->type_id(); Instruction* lenTypeInst = get_def_use_mgr()->GetDef(lenTypeId); // TODO(greg-lunarg): Support non-32-bit array length @@ -56,7 +53,7 @@ uint32_t DeadInsertElimPass::NumComponents(Instruction* typeInst) { return 0; return lenInst->GetSingleWordInOperand(kConstantValueInIdx); } break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { return typeInst->NumInOperands(); } break; default: { return 0; } break; @@ -68,10 +65,10 @@ void DeadInsertElimPass::MarkInsertChain( uint32_t extOffset, std::unordered_set* visited_phis) { // Not currently optimizing array inserts. Instruction* typeInst = get_def_use_mgr()->GetDef(insertChain->type_id()); - if (typeInst->opcode() == SpvOpTypeArray) return; + if (typeInst->opcode() == spv::Op::OpTypeArray) return; // Insert chains are only composed of inserts and phis - if (insertChain->opcode() != SpvOpCompositeInsert && - insertChain->opcode() != SpvOpPhi) + if (insertChain->opcode() != spv::Op::OpCompositeInsert && + insertChain->opcode() != spv::Op::OpPhi) return; // If extract indices are empty, mark all subcomponents if type // is constant length. @@ -89,7 +86,7 @@ void DeadInsertElimPass::MarkInsertChain( } } Instruction* insInst = insertChain; - while (insInst->opcode() == SpvOpCompositeInsert) { + while (insInst->opcode() == spv::Op::OpCompositeInsert) { // If no extract indices, mark insert and inserted object (which might // also be an insert chain) and continue up the chain though the input // composite. @@ -139,7 +136,7 @@ void DeadInsertElimPass::MarkInsertChain( insInst = get_def_use_mgr()->GetDef(compId); } // If insert chain ended with phi, do recursive call on each operand - if (insInst->opcode() != SpvOpPhi) return; + if (insInst->opcode() != spv::Op::OpPhi) return; // Mark phi visited to prevent potential infinite loop. If phi is already // visited, return to avoid infinite loop. if (visited_phis->count(insInst->result_id()) != 0) return; @@ -179,17 +176,17 @@ bool DeadInsertElimPass::EliminateDeadInsertsOnePass(Function* func) { for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { // Only process Inserts and composite Phis - SpvOp op = ii->opcode(); + spv::Op op = ii->opcode(); Instruction* typeInst = get_def_use_mgr()->GetDef(ii->type_id()); - if (op != SpvOpCompositeInsert && - (op != SpvOpPhi || !spvOpcodeIsComposite(typeInst->opcode()))) + if (op != spv::Op::OpCompositeInsert && + (op != spv::Op::OpPhi || !spvOpcodeIsComposite(typeInst->opcode()))) continue; // The marking algorithm can be expensive for large arrays and the // efficacy of eliminating dead inserts into arrays is questionable. // Skip optimizing array inserts for now. Just mark them live. // TODO(greg-lunarg): Eliminate dead array inserts - if (op == SpvOpCompositeInsert) { - if (typeInst->opcode() == SpvOpTypeArray) { + if (op == spv::Op::OpCompositeInsert) { + if (typeInst->opcode() == spv::Op::OpTypeArray) { liveInserts_.insert(ii->result_id()); continue; } @@ -198,11 +195,11 @@ bool DeadInsertElimPass::EliminateDeadInsertsOnePass(Function* func) { get_def_use_mgr()->ForEachUser(id, [&ii, this](Instruction* user) { if (user->IsCommonDebugInstr()) return; switch (user->opcode()) { - case SpvOpCompositeInsert: - case SpvOpPhi: + case spv::Op::OpCompositeInsert: + case spv::Op::OpPhi: // Use by insert or phi does not initiate marking break; - case SpvOpCompositeExtract: { + case spv::Op::OpCompositeExtract: { // Capture extract indices std::vector extIndices; uint32_t icnt = 0; @@ -216,7 +213,8 @@ bool DeadInsertElimPass::EliminateDeadInsertsOnePass(Function* func) { } break; default: { // Mark inserts in chain for all components - MarkInsertChain(&*ii, nullptr, 0, nullptr); + std::unordered_set visited_phis; + MarkInsertChain(&*ii, nullptr, 0, &visited_phis); } break; } }); @@ -226,7 +224,7 @@ bool DeadInsertElimPass::EliminateDeadInsertsOnePass(Function* func) { std::vector dead_instructions; for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { - if (ii->opcode() != SpvOpCompositeInsert) continue; + if (ii->opcode() != spv::Op::OpCompositeInsert) continue; const uint32_t id = ii->result_id(); if (liveInserts_.find(id) != liveInserts_.end()) continue; const uint32_t replId = diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_variable_elimination.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_variable_elimination.cpp index 283710684..e39132c22 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_variable_elimination.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dead_variable_elimination.cpp @@ -33,7 +33,7 @@ Pass::Status DeadVariableElimination::Process() { // Get the reference count for all of the global OpVariable instructions. for (auto& inst : context()->types_values()) { - if (inst.opcode() != SpvOp::SpvOpVariable) { + if (inst.opcode() != spv::Op::OpVariable) { continue; } @@ -43,11 +43,11 @@ Pass::Status DeadVariableElimination::Process() { // Check the linkage. If it is exported, it could be reference somewhere // else, so we must keep the variable around. get_decoration_mgr()->ForEachDecoration( - result_id, SpvDecorationLinkageAttributes, + result_id, uint32_t(spv::Decoration::LinkageAttributes), [&count](const Instruction& linkage_instruction) { uint32_t last_operand = linkage_instruction.NumOperands() - 1; - if (linkage_instruction.GetSingleWordOperand(last_operand) == - SpvLinkageTypeExport) { + if (spv::LinkageType(linkage_instruction.GetSingleWordOperand( + last_operand)) == spv::LinkageType::Export) { count = kMustKeep; } }); @@ -57,7 +57,8 @@ Pass::Status DeadVariableElimination::Process() { // at the uses and count the number of real references. count = 0; get_def_use_mgr()->ForEachUser(result_id, [&count](Instruction* user) { - if (!IsAnnotationInst(user->opcode()) && user->opcode() != SpvOpName) { + if (!IsAnnotationInst(user->opcode()) && + user->opcode() != spv::Op::OpName) { ++count; } }); @@ -81,7 +82,7 @@ Pass::Status DeadVariableElimination::Process() { void DeadVariableElimination::DeleteVariable(uint32_t result_id) { Instruction* inst = get_def_use_mgr()->GetDef(result_id); - assert(inst->opcode() == SpvOpVariable && + assert(inst->opcode() == spv::Op::OpVariable && "Should not be trying to delete anything other than an OpVariable."); // Look for an initializer that references another variable. We need to know @@ -93,7 +94,7 @@ void DeadVariableElimination::DeleteVariable(uint32_t result_id) { // TODO: Handle OpSpecConstantOP which might be defined in terms of other // variables. Will probably require a unified dead code pass that does all // instruction types. (Issue 906) - if (initializer->opcode() == SpvOpVariable) { + if (initializer->opcode() == spv::Op::OpVariable) { uint32_t initializer_id = initializer->result_id(); size_t& count = reference_count_[initializer_id]; if (count != kMustKeep) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.cpp index 060e0d931..1e614c6ff 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.cpp @@ -1,4 +1,5 @@ -// Copyright (c) 2020 Google LLC +// Copyright (c) 2020-2022 Google LLC +// Copyright (c) 2022 LunarG Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,31 +22,31 @@ // Constants for OpenCL.DebugInfo.100 & NonSemantic.Shader.DebugInfo.100 // extension instructions. -static const uint32_t kOpLineOperandLineIndex = 1; -static const uint32_t kLineOperandIndexDebugFunction = 7; -static const uint32_t kLineOperandIndexDebugLexicalBlock = 5; -static const uint32_t kDebugFunctionOperandFunctionIndex = 13; -static const uint32_t kDebugFunctionDefinitionOperandDebugFunctionIndex = 4; -static const uint32_t kDebugFunctionDefinitionOperandOpFunctionIndex = 5; -static const uint32_t kDebugFunctionOperandParentIndex = 9; -static const uint32_t kDebugTypeCompositeOperandParentIndex = 9; -static const uint32_t kDebugLexicalBlockOperandParentIndex = 7; -static const uint32_t kDebugInlinedAtOperandInlinedIndex = 6; -static const uint32_t kDebugExpressOperandOperationIndex = 4; -static const uint32_t kDebugDeclareOperandLocalVariableIndex = 4; -static const uint32_t kDebugDeclareOperandVariableIndex = 5; -static const uint32_t kDebugValueOperandExpressionIndex = 6; -static const uint32_t kDebugOperationOperandOperationIndex = 4; -static const uint32_t kOpVariableOperandStorageClassIndex = 2; -static const uint32_t kDebugLocalVariableOperandParentIndex = 9; -static const uint32_t kExtInstInstructionInIdx = 1; -static const uint32_t kDebugGlobalVariableOperandFlagsIndex = 12; -static const uint32_t kDebugLocalVariableOperandFlagsIndex = 10; - namespace spvtools { namespace opt { namespace analysis { namespace { +constexpr uint32_t kOpLineOperandLineIndex = 1; +constexpr uint32_t kLineOperandIndexDebugFunction = 7; +constexpr uint32_t kLineOperandIndexDebugLexicalBlock = 5; +constexpr uint32_t kLineOperandIndexDebugLine = 5; +constexpr uint32_t kDebugFunctionOperandFunctionIndex = 13; +constexpr uint32_t kDebugFunctionDefinitionOperandDebugFunctionIndex = 4; +constexpr uint32_t kDebugFunctionDefinitionOperandOpFunctionIndex = 5; +constexpr uint32_t kDebugFunctionOperandParentIndex = 9; +constexpr uint32_t kDebugTypeCompositeOperandParentIndex = 9; +constexpr uint32_t kDebugLexicalBlockOperandParentIndex = 7; +constexpr uint32_t kDebugInlinedAtOperandInlinedIndex = 6; +constexpr uint32_t kDebugExpressOperandOperationIndex = 4; +constexpr uint32_t kDebugDeclareOperandLocalVariableIndex = 4; +constexpr uint32_t kDebugDeclareOperandVariableIndex = 5; +constexpr uint32_t kDebugValueOperandExpressionIndex = 6; +constexpr uint32_t kDebugOperationOperandOperationIndex = 4; +constexpr uint32_t kOpVariableOperandStorageClassIndex = 2; +constexpr uint32_t kDebugLocalVariableOperandParentIndex = 9; +constexpr uint32_t kExtInstInstructionInIdx = 1; +constexpr uint32_t kDebugGlobalVariableOperandFlagsIndex = 12; +constexpr uint32_t kDebugLocalVariableOperandFlagsIndex = 10; void SetInlinedOperand(Instruction* dbg_inlined_at, uint32_t inlined_operand) { assert(dbg_inlined_at); @@ -149,12 +150,13 @@ void DebugInfoManager::RegisterDbgDeclare(uint32_t var_id, // Create new constant directly into global value area, bypassing the // Constant manager. This is used when the DefUse or Constant managers // are invalid and cannot be regenerated due to the module being in an -// inconsistant state e.g. in the middle of significant modification +// inconsistent state e.g. in the middle of significant modification // such as inlining. Invalidate Constant and DefUse managers if used. uint32_t AddNewConstInGlobals(IRContext* context, uint32_t const_value) { uint32_t id = context->TakeNextId(); std::unique_ptr new_const(new Instruction( - context, SpvOpConstant, context->get_type_mgr()->GetUIntTypeId(), id, + context, spv::Op::OpConstant, context->get_type_mgr()->GetUIntTypeId(), + id, { {spv_operand_type_t::SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, {const_value}}, @@ -210,7 +212,15 @@ uint32_t DebugInfoManager::CreateDebugInlinedAt(const Instruction* line, break; } } else { - line_number = line->GetSingleWordOperand(kOpLineOperandLineIndex); + if (line->opcode() == spv::Op::OpLine) { + line_number = line->GetSingleWordOperand(kOpLineOperandLineIndex); + } else if (line->GetShader100DebugOpcode() == + NonSemanticShaderDebugInfo100DebugLine) { + line_number = line->GetSingleWordOperand(kLineOperandIndexDebugLine); + } else { + assert(false && + "Unreachable. A line instruction must be OpLine or DebugLine"); + } // If we need the line number as an ID, generate that constant now. // If Constant or DefUse managers are invalid, generate constant @@ -219,18 +229,20 @@ uint32_t DebugInfoManager::CreateDebugInlinedAt(const Instruction* line, // DefUse manager which cannot be done during inlining. The extra // constants that may be generated here is likely not significant // and will likely be cleaned up in later passes. - if (line_number_type == spv_operand_type_t::SPV_OPERAND_TYPE_ID) { + if (line_number_type == spv_operand_type_t::SPV_OPERAND_TYPE_ID && + line->opcode() == spv::Op::OpLine) { if (!context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse) || !context()->AreAnalysesValid(IRContext::Analysis::kAnalysisConstants)) line_number = AddNewConstInGlobals(context(), line_number); else - line_number = context()->get_constant_mgr()->GetUIntConst(line_number); + line_number = + context()->get_constant_mgr()->GetUIntConstId(line_number); } } uint32_t result_id = context()->TakeNextId(); std::unique_ptr inlined_at(new Instruction( - context(), SpvOpExtInst, context()->get_type_mgr()->GetVoidTypeId(), + context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), result_id, { {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {setId}}, @@ -323,8 +335,8 @@ Instruction* DebugInfoManager::GetDebugOperationWithDeref() { if (context()->get_feature_mgr()->GetExtInstImportId_OpenCL100DebugInfo()) { deref_operation = std::unique_ptr(new Instruction( - context(), SpvOpExtInst, context()->get_type_mgr()->GetVoidTypeId(), - result_id, + context(), spv::Op::OpExtInst, + context()->get_type_mgr()->GetVoidTypeId(), result_id, { {SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, {SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER, @@ -333,11 +345,11 @@ Instruction* DebugInfoManager::GetDebugOperationWithDeref() { {static_cast(OpenCLDebugInfo100Deref)}}, })); } else { - uint32_t deref_id = context()->get_constant_mgr()->GetUIntConst( + uint32_t deref_id = context()->get_constant_mgr()->GetUIntConstId( NonSemanticShaderDebugInfo100Deref); deref_operation = std::unique_ptr( - new Instruction(context(), SpvOpExtInst, + new Instruction(context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), result_id, { {SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, @@ -379,7 +391,7 @@ Instruction* DebugInfoManager::GetDebugInfoNone() { uint32_t result_id = context()->TakeNextId(); std::unique_ptr dbg_info_none_inst(new Instruction( - context(), SpvOpExtInst, context()->get_type_mgr()->GetVoidTypeId(), + context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), result_id, { {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, @@ -403,7 +415,7 @@ Instruction* DebugInfoManager::GetEmptyDebugExpression() { uint32_t result_id = context()->TakeNextId(); std::unique_ptr empty_debug_expr(new Instruction( - context(), SpvOpExtInst, context()->get_type_mgr()->GetVoidTypeId(), + context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), result_id, { {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, @@ -516,7 +528,7 @@ bool DebugInfoManager::IsDeclareVisibleToInstr(Instruction* dbg_declare, assert(scope != nullptr); std::vector scope_ids; - if (scope->opcode() == SpvOpPhi) { + if (scope->opcode() == spv::Op::OpPhi) { scope_ids.push_back(scope->GetDebugScope().GetLexicalScope()); for (uint32_t i = 0; i < scope->NumInOperands(); i += 2) { auto* value = context()->get_def_use_mgr()->GetDef( @@ -546,10 +558,10 @@ bool DebugInfoManager::IsDeclareVisibleToInstr(Instruction* dbg_declare, return false; } -bool DebugInfoManager::AddDebugValueIfVarDeclIsVisible( - Instruction* scope_and_line, uint32_t variable_id, uint32_t value_id, - Instruction* insert_pos, - std::unordered_set* invisible_decls) { +bool DebugInfoManager::AddDebugValueForVariable(Instruction* scope_and_line, + uint32_t variable_id, + uint32_t value_id, + Instruction* insert_pos) { assert(scope_and_line != nullptr); auto dbg_decl_itr = var_id_to_dbg_decl_.find(variable_id); @@ -557,16 +569,11 @@ bool DebugInfoManager::AddDebugValueIfVarDeclIsVisible( bool modified = false; for (auto* dbg_decl_or_val : dbg_decl_itr->second) { - if (!IsDeclareVisibleToInstr(dbg_decl_or_val, scope_and_line)) { - if (invisible_decls) invisible_decls->insert(dbg_decl_or_val); - continue; - } - // Avoid inserting the new DebugValue between OpPhi or OpVariable // instructions. Instruction* insert_before = insert_pos->NextNode(); - while (insert_before->opcode() == SpvOpPhi || - insert_before->opcode() == SpvOpVariable) { + while (insert_before->opcode() == spv::Op::OpPhi || + insert_before->opcode() == spv::Op::OpVariable) { insert_before = insert_before->NextNode(); } modified |= AddDebugValueForDecl(dbg_decl_or_val, value_id, insert_before, @@ -647,9 +654,10 @@ uint32_t DebugInfoManager::GetVariableIdOfDebugValueUsedForDeclare( } auto* var = context()->get_def_use_mgr()->GetDef(var_id); - if (var->opcode() == SpvOpVariable && - SpvStorageClass(var->GetSingleWordOperand( - kOpVariableOperandStorageClassIndex)) == SpvStorageClassFunction) { + if (var->opcode() == spv::Op::OpVariable && + spv::StorageClass( + var->GetSingleWordOperand(kOpVariableOperandStorageClassIndex)) == + spv::StorageClass::Function) { return var_id; } return 0; @@ -756,8 +764,8 @@ void DebugInfoManager::ConvertDebugGlobalToLocalVariable( CommonDebugInfoDebugGlobalVariable) { return; } - assert(local_var->opcode() == SpvOpVariable || - local_var->opcode() == SpvOpFunctionParameter); + assert(local_var->opcode() == spv::Op::OpVariable || + local_var->opcode() == spv::Op::OpFunctionParameter); // Convert |dbg_global_var| to DebugLocalVariable dbg_global_var->SetInOperand(kExtInstInstructionInIdx, @@ -774,7 +782,7 @@ void DebugInfoManager::ConvertDebugGlobalToLocalVariable( // Create a DebugDeclare std::unique_ptr new_dbg_decl(new Instruction( - context(), SpvOpExtInst, context()->get_type_mgr()->GetVoidTypeId(), + context(), spv::Op::OpExtInst, context()->get_type_mgr()->GetVoidTypeId(), context()->TakeNextId(), { {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {GetDbgSetImportId()}}, @@ -788,7 +796,7 @@ void DebugInfoManager::ConvertDebugGlobalToLocalVariable( })); // Must insert after all OpVariables in block Instruction* insert_before = local_var; - while (insert_before->opcode() == SpvOpVariable) + while (insert_before->opcode() == spv::Op::OpVariable) insert_before = insert_before->NextNode(); auto* added_dbg_decl = insert_before->InsertBefore(std::move(new_dbg_decl)); if (context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse)) @@ -849,7 +857,7 @@ void DebugInfoManager::ClearDebugInfo(Instruction* instr) { fn_id_to_dbg_fn_.erase(fn_id); } if (instr->GetShader100DebugOpcode() == - NonSemanticShaderDebugInfo100DebugFunction) { + NonSemanticShaderDebugInfo100DebugFunctionDefinition) { auto fn_id = instr->GetSingleWordOperand( kDebugFunctionDefinitionOperandOpFunctionIndex); fn_id_to_dbg_fn_.erase(fn_id); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.h index df34b30f4..abb7b9a08 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/debug_info_manager.h @@ -15,6 +15,7 @@ #ifndef SOURCE_OPT_DEBUG_INFO_MANAGER_H_ #define SOURCE_OPT_DEBUG_INFO_MANAGER_H_ +#include #include #include @@ -144,12 +145,10 @@ class DebugInfoManager { // Generates a DebugValue instruction with value |value_id| for every local // variable that is in the scope of |scope_and_line| and whose memory is // |variable_id| and inserts it after the instruction |insert_pos|. - // Returns whether a DebugValue is added or not. |invisible_decls| returns - // DebugDeclares invisible to |scope_and_line|. - bool AddDebugValueIfVarDeclIsVisible( - Instruction* scope_and_line, uint32_t variable_id, uint32_t value_id, - Instruction* insert_pos, - std::unordered_set* invisible_decls); + // Returns whether a DebugValue is added or not. + bool AddDebugValueForVariable(Instruction* scope_and_line, + uint32_t variable_id, uint32_t value_id, + Instruction* insert_pos); // Creates a DebugValue for DebugDeclare |dbg_decl| and inserts it before // |insert_before|. The new DebugValue has the same line and scope as @@ -244,9 +243,18 @@ class DebugInfoManager { // operand is the function. std::unordered_map fn_id_to_dbg_fn_; + // Orders Instruction* for use in associative containers (i.e. less than + // ordering). Unique Id is used. + typedef Instruction* InstPtr; + struct InstPtrLess { + bool operator()(const InstPtr& lhs, const InstPtr& rhs) const { + return lhs->unique_id() < rhs->unique_id(); + } + }; + // Mapping from variable or value ids to DebugDeclare or DebugValue // instructions whose operand is the variable or value. - std::unordered_map> + std::unordered_map> var_id_to_dbg_decl_; // Mapping from DebugScope ids to users. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.cpp index 2146c359d..3e95dbc35 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.cpp @@ -22,6 +22,9 @@ #include "source/opt/ir_context.h" +namespace spvtools { +namespace opt { +namespace analysis { namespace { using InstructionVector = std::vector; using DecorationSet = std::set; @@ -49,10 +52,6 @@ bool IsSubset(const DecorationSet& a, const DecorationSet& b) { } } // namespace -namespace spvtools { -namespace opt { -namespace analysis { - bool DecorationManager::RemoveDecorationsFrom( uint32_t id, std::function pred) { bool was_modified = false; @@ -76,8 +75,8 @@ bool DecorationManager::RemoveDecorationsFrom( // applying the group. std::unordered_set indirect_decorations_to_remove; for (Instruction* inst : decorations_info.indirect_decorations) { - assert(inst->opcode() == SpvOpGroupDecorate || - inst->opcode() == SpvOpGroupMemberDecorate); + assert(inst->opcode() == spv::Op::OpGroupDecorate || + inst->opcode() == spv::Op::OpGroupMemberDecorate); std::vector group_decorations_to_keep; const uint32_t group_id = inst->GetSingleWordInOperand(0u); @@ -99,7 +98,8 @@ bool DecorationManager::RemoveDecorationsFrom( } // Otherwise, remove |id| from the targets of |group_id| - const uint32_t stride = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + const uint32_t stride = + inst->opcode() == spv::Op::OpGroupDecorate ? 1u : 2u; for (uint32_t i = 1u; i < inst->NumInOperands();) { if (inst->GetSingleWordInOperand(i) != id) { i += stride; @@ -212,16 +212,16 @@ bool DecorationManager::HaveTheSameDecorations(uint32_t id1, } switch (inst->opcode()) { - case SpvOpDecorate: + case spv::Op::OpDecorate: decorate_set->emplace(std::move(decoration_payload)); break; - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: member_decorate_set->emplace(std::move(decoration_payload)); break; - case SpvOpDecorateId: + case spv::Op::OpDecorateId: decorate_id_set->emplace(std::move(decoration_payload)); break; - case SpvOpDecorateStringGOOGLE: + case spv::Op::OpDecorateStringGOOGLE: decorate_string_set->emplace(std::move(decoration_payload)); break; default: @@ -278,16 +278,16 @@ bool DecorationManager::HaveSubsetOfDecorations(uint32_t id1, } switch (inst->opcode()) { - case SpvOpDecorate: + case spv::Op::OpDecorate: decorate_set->emplace(std::move(decoration_payload)); break; - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: member_decorate_set->emplace(std::move(decoration_payload)); break; - case SpvOpDecorateId: + case spv::Op::OpDecorateId: decorate_id_set->emplace(std::move(decoration_payload)); break; - case SpvOpDecorateStringGOOGLE: + case spv::Op::OpDecorateStringGOOGLE: decorate_string_set->emplace(std::move(decoration_payload)); break; default: @@ -328,10 +328,10 @@ bool DecorationManager::AreDecorationsTheSame(const Instruction* inst1, const Instruction* inst2, bool ignore_target) const { switch (inst1->opcode()) { - case SpvOpDecorate: - case SpvOpMemberDecorate: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: + case spv::Op::OpDecorate: + case spv::Op::OpMemberDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: break; default: return false; @@ -358,17 +358,18 @@ void DecorationManager::AnalyzeDecorations() { void DecorationManager::AddDecoration(Instruction* inst) { switch (inst->opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorate: { + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorate: { const auto target_id = inst->GetSingleWordInOperand(0u); id_to_decoration_insts_[target_id].direct_decorations.push_back(inst); break; } - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: { - const uint32_t start = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: { + const uint32_t start = + inst->opcode() == spv::Op::OpGroupDecorate ? 1u : 2u; const uint32_t stride = start; for (uint32_t i = start; i < inst->NumInOperands(); i += stride) { const auto target_id = inst->GetSingleWordInOperand(i); @@ -384,7 +385,7 @@ void DecorationManager::AddDecoration(Instruction* inst) { } } -void DecorationManager::AddDecoration(SpvOp opcode, +void DecorationManager::AddDecoration(spv::Op opcode, std::vector opnds) { IRContext* ctx = module_->context(); std::unique_ptr newDecoOp( @@ -394,7 +395,7 @@ void DecorationManager::AddDecoration(SpvOp opcode, void DecorationManager::AddDecoration(uint32_t inst_id, uint32_t decoration) { AddDecoration( - SpvOpDecorate, + spv::Op::OpDecorate, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {inst_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {decoration}}}); } @@ -402,7 +403,7 @@ void DecorationManager::AddDecoration(uint32_t inst_id, uint32_t decoration) { void DecorationManager::AddDecorationVal(uint32_t inst_id, uint32_t decoration, uint32_t decoration_value) { AddDecoration( - SpvOpDecorate, + spv::Op::OpDecorate, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {inst_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {decoration}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, @@ -413,7 +414,7 @@ void DecorationManager::AddMemberDecoration(uint32_t inst_id, uint32_t member, uint32_t decoration, uint32_t decoration_value) { AddDecoration( - SpvOpMemberDecorate, + spv::Op::OpMemberDecorate, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {inst_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {member}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {decoration}}, @@ -436,9 +437,10 @@ std::vector DecorationManager::InternalGetDecorationsFor( [include_linkage, &decorations](const std::vector& direct_decorations) { for (Instruction* inst : direct_decorations) { - const bool is_linkage = inst->opcode() == SpvOpDecorate && - inst->GetSingleWordInOperand(1u) == - SpvDecorationLinkageAttributes; + const bool is_linkage = + inst->opcode() == spv::Op::OpDecorate && + spv::Decoration(inst->GetSingleWordInOperand(1u)) == + spv::Decoration::LinkageAttributes; if (include_linkage || !is_linkage) decorations.push_back(inst); } }; @@ -459,17 +461,17 @@ std::vector DecorationManager::InternalGetDecorationsFor( bool DecorationManager::WhileEachDecoration( uint32_t id, uint32_t decoration, - std::function f) { + std::function f) const { for (const Instruction* inst : GetDecorationsFor(id, true)) { switch (inst->opcode()) { - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: if (inst->GetSingleWordInOperand(2) == decoration) { if (!f(*inst)) return false; } break; - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: if (inst->GetSingleWordInOperand(1) == decoration) { if (!f(*inst)) return false; } @@ -483,14 +485,19 @@ bool DecorationManager::WhileEachDecoration( void DecorationManager::ForEachDecoration( uint32_t id, uint32_t decoration, - std::function f) { + std::function f) const { WhileEachDecoration(id, decoration, [&f](const Instruction& inst) { f(inst); return true; }); } -bool DecorationManager::HasDecoration(uint32_t id, uint32_t decoration) { +bool DecorationManager::HasDecoration(uint32_t id, + spv::Decoration decoration) const { + return HasDecoration(id, static_cast(decoration)); +} + +bool DecorationManager::HasDecoration(uint32_t id, uint32_t decoration) const { bool has_decoration = false; ForEachDecoration(id, decoration, [&has_decoration](const Instruction&) { has_decoration = true; @@ -523,14 +530,14 @@ void DecorationManager::CloneDecorations(uint32_t from, uint32_t to) { decoration_list->second.indirect_decorations; for (Instruction* inst : indirect_decorations) { switch (inst->opcode()) { - case SpvOpGroupDecorate: + case spv::Op::OpGroupDecorate: context->ForgetUses(inst); // add |to| to list of decorated id's inst->AddOperand( Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {to})); context->AnalyzeUses(inst); break; - case SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { context->ForgetUses(inst); // for each (id == from), add (to, literal) as operands const uint32_t num_operands = inst->NumOperands(); @@ -554,13 +561,13 @@ void DecorationManager::CloneDecorations(uint32_t from, uint32_t to) { void DecorationManager::CloneDecorations( uint32_t from, uint32_t to, - const std::vector& decorations_to_copy) { + const std::vector& decorations_to_copy) { const auto decoration_list = id_to_decoration_insts_.find(from); if (decoration_list == id_to_decoration_insts_.end()) return; auto context = module_->context(); for (Instruction* inst : decoration_list->second.direct_decorations) { if (std::find(decorations_to_copy.begin(), decorations_to_copy.end(), - inst->GetSingleWordInOperand(1)) == + spv::Decoration(inst->GetSingleWordInOperand(1))) == decorations_to_copy.end()) { continue; } @@ -579,11 +586,11 @@ void DecorationManager::CloneDecorations( decoration_list->second.indirect_decorations; for (Instruction* inst : indirect_decorations) { switch (inst->opcode()) { - case SpvOpGroupDecorate: + case spv::Op::OpGroupDecorate: CloneDecorations(inst->GetSingleWordInOperand(0), to, decorations_to_copy); break; - case SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { assert(false && "The source id is not suppose to be a type."); break; } @@ -599,18 +606,19 @@ void DecorationManager::RemoveDecoration(Instruction* inst) { }; switch (inst->opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorate: { + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorate: { const auto target_id = inst->GetSingleWordInOperand(0u); auto const iter = id_to_decoration_insts_.find(target_id); if (iter == id_to_decoration_insts_.end()) return; remove_from_container(iter->second.direct_decorations); } break; - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: { - const uint32_t stride = inst->opcode() == SpvOpGroupDecorate ? 1u : 2u; + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: { + const uint32_t stride = + inst->opcode() == spv::Op::OpGroupDecorate ? 1u : 2u; for (uint32_t i = 1u; i < inst->NumInOperands(); i += stride) { const auto target_id = inst->GetSingleWordInOperand(i); auto const iter = id_to_decoration_insts_.find(target_id); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.h index fe78f2ce6..2be016a71 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/decoration_manager.h @@ -71,14 +71,14 @@ class DecorationManager { bool include_linkage); std::vector GetDecorationsFor(uint32_t id, bool include_linkage) const; - // Returns whether two IDs have the same decorations. Two SpvOpGroupDecorate - // instructions that apply the same decorations but to different IDs, still - // count as being the same. + // Returns whether two IDs have the same decorations. Two + // spv::Op::OpGroupDecorate instructions that apply the same decorations but + // to different IDs, still count as being the same. bool HaveTheSameDecorations(uint32_t id1, uint32_t id2) const; - // Returns whether two IDs have the same decorations. Two SpvOpGroupDecorate - // instructions that apply the same decorations but to different IDs, still - // count as being the same. + // Returns whether two IDs have the same decorations. Two + // spv::Op::OpGroupDecorate instructions that apply the same decorations but + // to different IDs, still count as being the same. bool HaveSubsetOfDecorations(uint32_t id1, uint32_t id2) const; // Returns whether the two decorations instructions are the same and are @@ -92,20 +92,21 @@ class DecorationManager { // Returns whether a decoration instruction for |id| with decoration // |decoration| exists or not. - bool HasDecoration(uint32_t id, uint32_t decoration); + bool HasDecoration(uint32_t id, uint32_t decoration) const; + bool HasDecoration(uint32_t id, spv::Decoration decoration) const; // |f| is run on each decoration instruction for |id| with decoration // |decoration|. Processed are all decorations which target |id| either // directly or indirectly by Decoration Groups. void ForEachDecoration(uint32_t id, uint32_t decoration, - std::function f); + std::function f) const; // |f| is run on each decoration instruction for |id| with decoration // |decoration|. Processes all decoration which target |id| either directly or // indirectly through decoration groups. If |f| returns false, iteration is // terminated and this function returns false. bool WhileEachDecoration(uint32_t id, uint32_t decoration, - std::function f); + std::function f) const; // |f| is run on each decoration instruction for |id| with decoration // |decoration|. Processes all decoration which target |id| either directly or @@ -123,14 +124,15 @@ class DecorationManager { // Same as above, but only clone the decoration if the decoration operand is // in |decorations_to_copy|. This function has the extra restriction that // |from| and |to| must not be an object, not a type. - void CloneDecorations(uint32_t from, uint32_t to, - const std::vector& decorations_to_copy); + void CloneDecorations( + uint32_t from, uint32_t to, + const std::vector& decorations_to_copy); // Informs the decoration manager of a new decoration that it needs to track. void AddDecoration(Instruction* inst); // Add decoration with |opcode| and operands |opnds|. - void AddDecoration(SpvOp opcode, const std::vector opnds); + void AddDecoration(spv::Op opcode, const std::vector opnds); // Add |decoration| of |inst_id| to module. void AddDecoration(uint32_t inst_id, uint32_t decoration); @@ -140,7 +142,7 @@ class DecorationManager { uint32_t decoration_value); // Add |decoration, decoration_value| of |inst_id, member| to module. - void AddMemberDecoration(uint32_t member, uint32_t inst_id, + void AddMemberDecoration(uint32_t inst_id, uint32_t member, uint32_t decoration, uint32_t decoration_value); friend bool operator==(const DecorationManager&, const DecorationManager&); @@ -195,9 +197,9 @@ class DecorationManager { // Mapping from ids to the instructions applying a decoration to those ids. // In other words, for each id you get all decoration instructions - // referencing that id, be it directly (SpvOpDecorate, SpvOpMemberDecorate - // and SpvOpDecorateId), or indirectly (SpvOpGroupDecorate, - // SpvOpMemberGroupDecorate). + // referencing that id, be it directly (spv::Op::OpDecorate, + // spv::Op::OpMemberDecorate and spv::Op::OpDecorateId), or indirectly + // (spv::Op::OpGroupDecorate, spv::Op::OpMemberGroupDecorate). std::unordered_map id_to_decoration_insts_; // The enclosing module. Module* module_; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/def_use_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/def_use_manager.h index d66575d31..13cf9bd3e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/def_use_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/def_use_manager.h @@ -27,28 +27,6 @@ namespace spvtools { namespace opt { namespace analysis { -// Class for representing a use of id. Note that: -// * Result type id is a use. -// * Ids referenced in OpSectionMerge & OpLoopMerge are considered as use. -// * Ids referenced in OpPhi's in operands are considered as use. -struct Use { - Instruction* inst; // Instruction using the id. - uint32_t operand_index; // logical operand index of the id use. This can be - // the index of result type id. -}; - -inline bool operator==(const Use& lhs, const Use& rhs) { - return lhs.inst == rhs.inst && lhs.operand_index == rhs.operand_index; -} - -inline bool operator!=(const Use& lhs, const Use& rhs) { return !(lhs == rhs); } - -inline bool operator<(const Use& lhs, const Use& rhs) { - if (lhs.inst < rhs.inst) return true; - if (lhs.inst > rhs.inst) return false; - return lhs.operand_index < rhs.operand_index; -} - // Definition should never be null. User can be null, however, such an entry // should be used only for searching (e.g. all users of a particular definition) // and never stored in a container. @@ -190,7 +168,7 @@ class DefUseManager { // Returns the annotation instrunctions which are a direct use of the given // |id|. This means when the decorations are applied through decoration // group(s), this function will just return the OpGroupDecorate - // instrcution(s) which refer to the given id as an operand. The OpDecorate + // instruction(s) which refer to the given id as an operand. The OpDecorate // instructions which decorate the decoration group will not be returned. std::vector GetAnnotations(uint32_t id) const; @@ -210,7 +188,7 @@ class DefUseManager { friend bool CompareAndPrintDifferences(const DefUseManager&, const DefUseManager&); - // If |inst| has not already been analysed, then analyses its defintion and + // If |inst| has not already been analysed, then analyses its definition and // uses. void UpdateDefUse(Instruction* inst); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.cpp index 7263c1203..2c0f4829f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.cpp @@ -22,8 +22,9 @@ namespace opt { namespace { bool IsDecorationBinding(Instruction* inst) { - if (inst->opcode() != SpvOpDecorate) return false; - return inst->GetSingleWordInOperand(1u) == SpvDecorationBinding; + if (inst->opcode() != spv::Op::OpDecorate) return false; + return spv::Decoration(inst->GetSingleWordInOperand(1u)) == + spv::Decoration::Binding; } } // namespace @@ -53,10 +54,11 @@ Pass::Status DescriptorScalarReplacement::Process() { bool DescriptorScalarReplacement::ReplaceCandidate(Instruction* var) { std::vector access_chain_work_list; std::vector load_work_list; + std::vector entry_point_work_list; bool failed = !get_def_use_mgr()->WhileEachUser( - var->result_id(), - [this, &access_chain_work_list, &load_work_list](Instruction* use) { - if (use->opcode() == SpvOpName) { + var->result_id(), [this, &access_chain_work_list, &load_work_list, + &entry_point_work_list](Instruction* use) { + if (use->opcode() == spv::Op::OpName) { return true; } @@ -65,13 +67,16 @@ bool DescriptorScalarReplacement::ReplaceCandidate(Instruction* var) { } switch (use->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: access_chain_work_list.push_back(use); return true; - case SpvOpLoad: + case spv::Op::OpLoad: load_work_list.push_back(use); return true; + case spv::Op::OpEntryPoint: + entry_point_work_list.push_back(use); + return true; default: context()->EmitErrorMessage( "Variable cannot be replaced: invalid instruction", use); @@ -94,6 +99,11 @@ bool DescriptorScalarReplacement::ReplaceCandidate(Instruction* var) { return false; } } + for (Instruction* use : entry_point_work_list) { + if (!ReplaceEntryPoint(var, use)) { + return false; + } + } return true; } @@ -118,7 +128,7 @@ bool DescriptorScalarReplacement::ReplaceAccessChain(Instruction* var, if (use->NumInOperands() == 2) { // We are not indexing into the replacement variable. We can replaces the - // access chain with the replacement varibale itself. + // access chain with the replacement variable itself. context()->ReplaceAllUsesWith(use->result_id(), replacement_var); context()->KillInst(use); return true; @@ -135,8 +145,8 @@ bool DescriptorScalarReplacement::ReplaceAccessChain(Instruction* var, // Use the replacement variable as the base address. new_operands.push_back({SPV_OPERAND_TYPE_ID, {replacement_var}}); - // Drop the first index because it is consumed by the replacment, and copy the - // rest. + // Drop the first index because it is consumed by the replacement, and copy + // the rest. for (uint32_t i = 4; i < use->NumOperands(); i++) { new_operands.emplace_back(use->GetOperand(i)); } @@ -146,6 +156,42 @@ bool DescriptorScalarReplacement::ReplaceAccessChain(Instruction* var, return true; } +bool DescriptorScalarReplacement::ReplaceEntryPoint(Instruction* var, + Instruction* use) { + // Build a new |OperandList| for |use| that removes |var| and adds its + // replacement variables. + Instruction::OperandList new_operands; + + // Copy all operands except |var|. + bool found = false; + for (uint32_t idx = 0; idx < use->NumOperands(); idx++) { + Operand& op = use->GetOperand(idx); + if (op.type == SPV_OPERAND_TYPE_ID && op.words[0] == var->result_id()) { + found = true; + } else { + new_operands.emplace_back(op); + } + } + + if (!found) { + context()->EmitErrorMessage( + "Variable cannot be replaced: invalid instruction", use); + return false; + } + + // Add all new replacement variables. + uint32_t num_replacement_vars = + descsroautil::GetNumberOfElementsForArrayOrStruct(context(), var); + for (uint32_t i = 0; i < num_replacement_vars; i++) { + new_operands.push_back( + {SPV_OPERAND_TYPE_ID, {GetReplacementVariable(var, i)}}); + } + + use->ReplaceOperands(new_operands); + context()->UpdateDefUse(use); + return true; +} + uint32_t DescriptorScalarReplacement::GetReplacementVariable(Instruction* var, uint32_t idx) { auto replacement_vars = replacement_variables_.find(var); @@ -184,7 +230,7 @@ void DescriptorScalarReplacement::CopyDecorationsForNewVariable( // Handle OpMemberDecorate instructions. for (auto old_decoration : get_decoration_mgr()->GetDecorationsFor( old_var_type->result_id(), true)) { - assert(old_decoration->opcode() == SpvOpMemberDecorate); + assert(old_decoration->opcode() == spv::Op::OpMemberDecorate); if (old_decoration->GetSingleWordInOperand(1u) != index) continue; CreateNewDecorationForMemberDecorate(old_decoration, new_var_id); } @@ -212,8 +258,8 @@ uint32_t DescriptorScalarReplacement::GetNewBindingForElement( void DescriptorScalarReplacement::CreateNewDecorationForNewVariable( Instruction* old_decoration, uint32_t new_var_id, uint32_t new_binding) { - assert(old_decoration->opcode() == SpvOpDecorate || - old_decoration->opcode() == SpvOpDecorateString); + assert(old_decoration->opcode() == spv::Op::OpDecorate || + old_decoration->opcode() == spv::Op::OpDecorateString); std::unique_ptr new_decoration(old_decoration->Clone(context())); new_decoration->SetInOperand(0, {new_var_id}); @@ -231,25 +277,25 @@ void DescriptorScalarReplacement::CreateNewDecorationForMemberDecorate( auto new_decorate_operand_end = old_member_decoration->end(); operands.insert(operands.end(), new_decorate_operand_begin, new_decorate_operand_end); - get_decoration_mgr()->AddDecoration(SpvOpDecorate, std::move(operands)); + get_decoration_mgr()->AddDecoration(spv::Op::OpDecorate, std::move(operands)); } uint32_t DescriptorScalarReplacement::CreateReplacementVariable( Instruction* var, uint32_t idx) { // The storage class for the new variable is the same as the original. - SpvStorageClass storage_class = - static_cast(var->GetSingleWordInOperand(0)); + spv::StorageClass storage_class = + static_cast(var->GetSingleWordInOperand(0)); // The type for the new variable will be a pointer to type of the elements of // the array. uint32_t ptr_type_id = var->type_id(); Instruction* ptr_type_inst = get_def_use_mgr()->GetDef(ptr_type_id); - assert(ptr_type_inst->opcode() == SpvOpTypePointer && + assert(ptr_type_inst->opcode() == spv::Op::OpTypePointer && "Variable should be a pointer to an array or structure."); uint32_t pointee_type_id = ptr_type_inst->GetSingleWordInOperand(1); Instruction* pointee_type_inst = get_def_use_mgr()->GetDef(pointee_type_id); - const bool is_array = pointee_type_inst->opcode() == SpvOpTypeArray; - const bool is_struct = pointee_type_inst->opcode() == SpvOpTypeStruct; + const bool is_array = pointee_type_inst->opcode() == spv::Op::OpTypeArray; + const bool is_struct = pointee_type_inst->opcode() == spv::Op::OpTypeStruct; assert((is_array || is_struct) && "Variable should be a pointer to an array or structure."); @@ -263,7 +309,7 @@ uint32_t DescriptorScalarReplacement::CreateReplacementVariable( // Create the variable. uint32_t id = TakeNextId(); std::unique_ptr variable( - new Instruction(context(), SpvOpVariable, ptr_element_type_id, id, + new Instruction(context(), spv::Op::OpVariable, ptr_element_type_id, id, std::initializer_list{ {SPV_OPERAND_TYPE_STORAGE_CLASS, {static_cast(storage_class)}}})); @@ -293,7 +339,7 @@ uint32_t DescriptorScalarReplacement::CreateReplacementVariable( } std::unique_ptr new_name(new Instruction( - context(), SpvOpName, 0, 0, + context(), spv::Op::OpName, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {id}}, {SPV_OPERAND_TYPE_LITERAL_STRING, utils::MakeVector(name_str)}})); @@ -315,14 +361,14 @@ uint32_t DescriptorScalarReplacement::GetNumBindingsUsedByType( Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); // If it's a pointer, look at the underlying type. - if (type_inst->opcode() == SpvOpTypePointer) { + if (type_inst->opcode() == spv::Op::OpTypePointer) { type_id = type_inst->GetSingleWordInOperand(1); type_inst = get_def_use_mgr()->GetDef(type_id); } // Arrays consume N*M binding numbers where N is the array length, and M is // the number of bindings used by each array element. - if (type_inst->opcode() == SpvOpTypeArray) { + if (type_inst->opcode() == spv::Op::OpTypeArray) { uint32_t element_type_id = type_inst->GetSingleWordInOperand(0); uint32_t length_id = type_inst->GetSingleWordInOperand(1); const analysis::Constant* length_const = @@ -335,7 +381,7 @@ uint32_t DescriptorScalarReplacement::GetNumBindingsUsedByType( // The number of bindings consumed by a structure is the sum of the bindings // used by its members. - if (type_inst->opcode() == SpvOpTypeStruct && + if (type_inst->opcode() == spv::Op::OpTypeStruct && !descsroautil::IsTypeOfStructuredBuffer(context(), type_inst)) { uint32_t sum = 0; for (uint32_t i = 0; i < type_inst->NumInOperands(); i++) @@ -353,12 +399,12 @@ bool DescriptorScalarReplacement::ReplaceLoadedValue(Instruction* var, // |value| is the OpLoad instruction that has loaded |var|. // The function expects all users of |value| to be OpCompositeExtract // instructions. Otherwise the function returns false with an error message. - assert(value->opcode() == SpvOpLoad); + assert(value->opcode() == spv::Op::OpLoad); assert(value->GetSingleWordInOperand(0) == var->result_id()); std::vector work_list; bool failed = !get_def_use_mgr()->WhileEachUser( value->result_id(), [this, &work_list](Instruction* use) { - if (use->opcode() != SpvOpCompositeExtract) { + if (use->opcode() != spv::Op::OpCompositeExtract) { context()->EmitErrorMessage( "Variable cannot be replaced: invalid instruction", use); return false; @@ -384,7 +430,7 @@ bool DescriptorScalarReplacement::ReplaceLoadedValue(Instruction* var, bool DescriptorScalarReplacement::ReplaceCompositeExtract( Instruction* var, Instruction* extract) { - assert(extract->opcode() == SpvOpCompositeExtract); + assert(extract->opcode() == spv::Op::OpCompositeExtract); // We're currently only supporting extractions of one index at a time. If we // need to, we can handle cases with multiple indexes in the future. if (extract->NumInOperands() != 2) { @@ -400,7 +446,7 @@ bool DescriptorScalarReplacement::ReplaceCompositeExtract( // OpCompositeExtract. uint32_t load_id = TakeNextId(); std::unique_ptr load( - new Instruction(context(), SpvOpLoad, extract->type_id(), load_id, + new Instruction(context(), spv::Op::OpLoad, extract->type_id(), load_id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {replacement_var}}})); Instruction* load_instr = load.get(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.h index 6a24fd871..901be3e98 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa.h @@ -64,6 +64,11 @@ class DescriptorScalarReplacement : public Pass { // otherwise. bool ReplaceLoadedValue(Instruction* var, Instruction* value); + // Replaces the given composite variable |var| in the OpEntryPoint with the + // new replacement variables, one for each element of the array |var|. Returns + // |true| if successful, and |false| otherwise. + bool ReplaceEntryPoint(Instruction* var, Instruction* use); + // Replaces the given OpCompositeExtract |extract| and all of its references // with an OpLoad of a replacement variable. |var| is the variable with // composite type whose value is being used by |extract|. Assumes that diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa_util.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa_util.cpp index 1954e2cc3..dba3de9c0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa_util.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/desc_sroa_util.cpp @@ -17,12 +17,11 @@ namespace spvtools { namespace opt { namespace { - -const uint32_t kOpAccessChainInOperandIndexes = 1; +constexpr uint32_t kOpAccessChainInOperandIndexes = 1; // Returns the length of array type |type|. uint32_t GetLengthOfArrayType(IRContext* context, Instruction* type) { - assert(type->opcode() == SpvOpTypeArray && "type must be array"); + assert(type->opcode() == spv::Op::OpTypeArray && "type must be array"); uint32_t length_id = type->GetSingleWordInOperand(1); const analysis::Constant* length_const = context->get_constant_mgr()->FindDeclaredConstant(length_id); @@ -35,20 +34,20 @@ uint32_t GetLengthOfArrayType(IRContext* context, Instruction* type) { namespace descsroautil { bool IsDescriptorArray(IRContext* context, Instruction* var) { - if (var->opcode() != SpvOpVariable) { + if (var->opcode() != spv::Op::OpVariable) { return false; } uint32_t ptr_type_id = var->type_id(); Instruction* ptr_type_inst = context->get_def_use_mgr()->GetDef(ptr_type_id); - if (ptr_type_inst->opcode() != SpvOpTypePointer) { + if (ptr_type_inst->opcode() != spv::Op::OpTypePointer) { return false; } uint32_t var_type_id = ptr_type_inst->GetSingleWordInOperand(1); Instruction* var_type_inst = context->get_def_use_mgr()->GetDef(var_type_id); - if (var_type_inst->opcode() != SpvOpTypeArray && - var_type_inst->opcode() != SpvOpTypeStruct) { + if (var_type_inst->opcode() != spv::Op::OpTypeArray && + var_type_inst->opcode() != spv::Op::OpTypeStruct) { return false; } @@ -59,23 +58,23 @@ bool IsDescriptorArray(IRContext* context, Instruction* var) { } if (!context->get_decoration_mgr()->HasDecoration( - var->result_id(), SpvDecorationDescriptorSet)) { + var->result_id(), uint32_t(spv::Decoration::DescriptorSet))) { return false; } - return context->get_decoration_mgr()->HasDecoration(var->result_id(), - SpvDecorationBinding); + return context->get_decoration_mgr()->HasDecoration( + var->result_id(), uint32_t(spv::Decoration::Binding)); } bool IsTypeOfStructuredBuffer(IRContext* context, const Instruction* type) { - if (type->opcode() != SpvOpTypeStruct) { + if (type->opcode() != spv::Op::OpTypeStruct) { return false; } // All buffers have offset decorations for members of their structure types. // This is how we distinguish it from a structure of descriptors. - return context->get_decoration_mgr()->HasDecoration(type->result_id(), - SpvDecorationOffset); + return context->get_decoration_mgr()->HasDecoration( + type->result_id(), uint32_t(spv::Decoration::Offset)); } const analysis::Constant* GetAccessChainIndexAsConst( @@ -99,15 +98,15 @@ uint32_t GetNumberOfElementsForArrayOrStruct(IRContext* context, Instruction* var) { uint32_t ptr_type_id = var->type_id(); Instruction* ptr_type_inst = context->get_def_use_mgr()->GetDef(ptr_type_id); - assert(ptr_type_inst->opcode() == SpvOpTypePointer && + assert(ptr_type_inst->opcode() == spv::Op::OpTypePointer && "Variable should be a pointer to an array or structure."); uint32_t pointee_type_id = ptr_type_inst->GetSingleWordInOperand(1); Instruction* pointee_type_inst = context->get_def_use_mgr()->GetDef(pointee_type_id); - if (pointee_type_inst->opcode() == SpvOpTypeArray) { + if (pointee_type_inst->opcode() == spv::Op::OpTypeArray) { return GetLengthOfArrayType(context, pointee_type_inst); } - assert(pointee_type_inst->opcode() == SpvOpTypeStruct && + assert(pointee_type_inst->opcode() == spv::Op::OpTypeStruct && "Variable should be a pointer to an array or structure."); return pointee_type_inst->NumInOperands(); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_analysis.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_analysis.cpp index b692d26a2..eb6dfc9e0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_analysis.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_analysis.cpp @@ -64,7 +64,7 @@ bool DominatorAnalysisBase::Dominates(Instruction* a, Instruction* b) const { // We handle OpLabel instructions explicitly since they are not stored in the // instruction list. - if (current->opcode() == SpvOpLabel) { + if (current->opcode() == spv::Op::OpLabel) { return true; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_tree.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_tree.cpp index 8f423e3db..3c161a9b2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_tree.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/dominator_tree.cpp @@ -48,18 +48,18 @@ namespace { // BBType - BasicBlock type. Will either be BasicBlock or DominatorTreeNode // SuccessorLambda - Lamdba matching the signature of 'const // std::vector*(const BBType *A)'. Will return a vector of the nodes -// succeding BasicBlock A. +// succeeding BasicBlock A. // PostLambda - Lamdba matching the signature of 'void (const BBType*)' will be // called on each node traversed AFTER their children. // PreLambda - Lamdba matching the signature of 'void (const BBType*)' will be // called on each node traversed BEFORE their children. template -static void DepthFirstSearch(const BBType* bb, SuccessorLambda successors, - PreLambda pre, PostLambda post) { - // Ignore backedge operation. - auto nop_backedge = [](const BBType*, const BBType*) {}; - CFA::DepthFirstTraversal(bb, successors, pre, post, nop_backedge); +void DepthFirstSearch(const BBType* bb, SuccessorLambda successors, + PreLambda pre, PostLambda post) { + auto no_terminal_blocks = [](const BBType*) { return false; }; + CFA::DepthFirstTraversal(bb, successors, pre, post, + no_terminal_blocks); } // Wrapper around CFA::DepthFirstTraversal to provide an interface to perform @@ -69,13 +69,12 @@ static void DepthFirstSearch(const BBType* bb, SuccessorLambda successors, // BBType - BasicBlock type. Will either be BasicBlock or DominatorTreeNode // SuccessorLambda - Lamdba matching the signature of 'const // std::vector*(const BBType *A)'. Will return a vector of the nodes -// succeding BasicBlock A. +// succeeding BasicBlock A. // PostLambda - Lamdba matching the signature of 'void (const BBType*)' will be // called on each node traversed after their children. template -static void DepthFirstSearchPostOrder(const BBType* bb, - SuccessorLambda successors, - PostLambda post) { +void DepthFirstSearchPostOrder(const BBType* bb, SuccessorLambda successors, + PostLambda post) { // Ignore preorder operation. auto nop_preorder = [](const BBType*) {}; DepthFirstSearch(bb, successors, nop_preorder, post); @@ -103,7 +102,8 @@ class BasicBlockSuccessorHelper { using Function = typename GetFunctionClass::FunctionType; using BasicBlockListTy = std::vector; - using BasicBlockMapTy = std::map; + using BasicBlockMapTy = + std::unordered_map; public: // For compliance with the dominance tree computation, entry nodes are @@ -158,19 +158,7 @@ BasicBlockSuccessorHelper::BasicBlockSuccessorHelper( template void BasicBlockSuccessorHelper::CreateSuccessorMap( Function& f, const BasicBlock* placeholder_start_node) { - std::map id_to_BB_map; - auto GetSuccessorBasicBlock = [&f, &id_to_BB_map](uint32_t successor_id) { - BasicBlock*& Succ = id_to_BB_map[successor_id]; - if (!Succ) { - for (BasicBlock& BBIt : f) { - if (successor_id == BBIt.id()) { - Succ = &BBIt; - break; - } - } - } - return Succ; - }; + IRContext* context = f.DefInst().context(); if (invert_graph_) { // For the post dominator tree, we see the inverted graph. @@ -184,9 +172,8 @@ void BasicBlockSuccessorHelper::CreateSuccessorMap( BasicBlockListTy& pred_list = predecessors_[&bb]; const auto& const_bb = bb; const_bb.ForEachSuccessorLabel( - [this, &pred_list, &bb, - &GetSuccessorBasicBlock](const uint32_t successor_id) { - BasicBlock* succ = GetSuccessorBasicBlock(successor_id); + [this, &pred_list, &bb, context](const uint32_t successor_id) { + BasicBlock* succ = context->get_instr_block(successor_id); // Inverted graph: our successors in the CFG // are our predecessors in the inverted graph. this->successors_[succ].push_back(&bb); @@ -206,8 +193,8 @@ void BasicBlockSuccessorHelper::CreateSuccessorMap( BasicBlockListTy& succ_list = successors_[&bb]; const auto& const_bb = bb; - const_bb.ForEachSuccessorLabel([&,this](const uint32_t successor_id) { - BasicBlock* succ = GetSuccessorBasicBlock(successor_id); + const_bb.ForEachSuccessorLabel([&](const uint32_t successor_id) { + BasicBlock* succ = context->get_instr_block(successor_id); succ_list.push_back(succ); predecessors_[succ].push_back(&bb); }); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp index d368bd145..500fd8af9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_constant_pass.cpp @@ -20,7 +20,6 @@ #include #include "source/opt/def_use_manager.h" -#include "source/opt/ir_context.h" #include "source/opt/log.h" #include "source/opt/reflect.h" @@ -40,7 +39,7 @@ Pass::Status EliminateDeadConstantPass::Process() { context()->get_def_use_mgr()->ForEachUse( const_id, [&count](Instruction* user, uint32_t index) { (void)index; - SpvOp op = user->opcode(); + spv::Op op = user->opcode(); if (!(IsAnnotationInst(op) || IsDebug1Inst(op) || IsDebug2Inst(op) || IsDebug3Inst(op))) { ++count; @@ -59,9 +58,9 @@ Pass::Status EliminateDeadConstantPass::Process() { Instruction* inst = *working_list.begin(); // Back propagate if the instruction contains IDs in its operands. switch (inst->opcode()) { - case SpvOp::SpvOpConstantComposite: - case SpvOp::SpvOpSpecConstantComposite: - case SpvOp::SpvOpSpecConstantOp: + case spv::Op::OpConstantComposite: + case spv::Op::OpSpecConstantComposite: + case spv::Op::OpSpecConstantOp: for (uint32_t i = 0; i < inst->NumInOperands(); i++) { // SpecConstantOp instruction contains 'opcode' as its operand. Need // to exclude such operands when decreasing uses. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_functions_util.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_functions_util.cpp index 1379120ff..e95b7f6a8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_functions_util.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_functions_util.cpp @@ -28,16 +28,18 @@ Module::iterator EliminateFunction(IRContext* context, ->ForEachInst( [context, first_func, func_iter, &seen_func_end, &to_kill](Instruction* inst) { - if (inst->opcode() == SpvOpFunctionEnd) { + if (inst->opcode() == spv::Op::OpFunctionEnd) { seen_func_end = true; } // Move non-semantic instructions to the previous function or // global values if this is the first function. - if (seen_func_end && inst->opcode() == SpvOpExtInst) { + if (seen_func_end && inst->opcode() == spv::Op::OpExtInst) { assert(inst->IsNonSemanticInstruction()); if (to_kill.find(inst) != to_kill.end()) return; std::unique_ptr clone(inst->Clone(context)); - context->ForgetUses(inst); + // Clear uses of "inst" to in case this moves a dependent chain of + // instructions. + context->get_def_use_mgr()->ClearInst(inst); context->AnalyzeDefUse(clone.get()); if (first_func) { context->AddGlobalValue(std::move(clone)); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.cpp new file mode 100644 index 000000000..5553a3362 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.cpp @@ -0,0 +1,256 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/eliminate_dead_io_components_pass.h" + +#include + +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" +#include "source/util/bit_vector.h" + +namespace spvtools { +namespace opt { +namespace { +constexpr uint32_t kAccessChainBaseInIdx = 0; +constexpr uint32_t kAccessChainIndex0InIdx = 1; +constexpr uint32_t kAccessChainIndex1InIdx = 2; +constexpr uint32_t kConstantValueInIdx = 0; +} // namespace + +Pass::Status EliminateDeadIOComponentsPass::Process() { + // Only process input and output variables + if (elim_sclass_ != spv::StorageClass::Input && + elim_sclass_ != spv::StorageClass::Output) { + if (consumer()) { + std::string message = + "EliminateDeadIOComponentsPass only valid for input and output " + "variables."; + consumer()(SPV_MSG_ERROR, 0, {0, 0, 0}, message.c_str()); + } + return Status::Failure; + } + // If safe mode, only process Input variables in vertex shader + const auto stage = context()->GetStage(); + if (safe_mode_ && !(stage == spv::ExecutionModel::Vertex && + elim_sclass_ == spv::StorageClass::Input)) + return Status::SuccessWithoutChange; + // Current functionality assumes shader capability. + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) + return Status::SuccessWithoutChange; + // Current functionality assumes vert, frag, tesc, tese or geom shader. + // TODO(issue #4988): Add GLCompute. + if (stage != spv::ExecutionModel::Vertex && + stage != spv::ExecutionModel::Fragment && + stage != spv::ExecutionModel::TessellationControl && + stage != spv::ExecutionModel::TessellationEvaluation && + stage != spv::ExecutionModel::Geometry) + return Status::SuccessWithoutChange; + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + bool modified = false; + std::vector vars_to_move; + for (auto& var : context()->types_values()) { + if (var.opcode() != spv::Op::OpVariable) { + continue; + } + analysis::Type* var_type = type_mgr->GetType(var.type_id()); + analysis::Pointer* ptr_type = var_type->AsPointer(); + if (ptr_type == nullptr) { + continue; + } + const auto sclass = ptr_type->storage_class(); + if (sclass != elim_sclass_) { + continue; + } + // For tesc, or input variables in tese or geom shaders, + // there is a outer per-vertex-array that must be ignored + // for the purposes of this analysis/optimization. Do the + // analysis on the inner type in these cases. + bool skip_first_index = false; + auto core_type = ptr_type->pointee_type(); + if (stage == spv::ExecutionModel::TessellationControl || + (sclass == spv::StorageClass::Input && + (stage == spv::ExecutionModel::TessellationEvaluation || + stage == spv::ExecutionModel::Geometry))) { + auto arr_type = core_type->AsArray(); + if (!arr_type) continue; + core_type = arr_type->element_type(); + skip_first_index = true; + } + const analysis::Array* arr_type = core_type->AsArray(); + if (arr_type != nullptr) { + // Only process array if input of vertex shader, or output of + // fragment shader. Otherwise, if one shader has a runtime index and the + // other does not, interface incompatibility can occur. + if (!((sclass == spv::StorageClass::Input && + stage == spv::ExecutionModel::Vertex) || + (sclass == spv::StorageClass::Output && + stage == spv::ExecutionModel::Fragment))) + continue; + unsigned arr_len_id = arr_type->LengthId(); + Instruction* arr_len_inst = def_use_mgr->GetDef(arr_len_id); + if (arr_len_inst->opcode() != spv::Op::OpConstant) { + continue; + } + // SPIR-V requires array size is >= 1, so this works for signed or + // unsigned size. + unsigned original_max = + arr_len_inst->GetSingleWordInOperand(kConstantValueInIdx) - 1; + unsigned max_idx = FindMaxIndex(var, original_max); + if (max_idx != original_max) { + ChangeArrayLength(var, max_idx + 1); + vars_to_move.push_back(&var); + modified = true; + } + continue; + } + const analysis::Struct* struct_type = core_type->AsStruct(); + if (struct_type == nullptr) continue; + const auto elt_types = struct_type->element_types(); + unsigned original_max = static_cast(elt_types.size()) - 1; + unsigned max_idx = FindMaxIndex(var, original_max, skip_first_index); + if (max_idx != original_max) { + ChangeIOVarStructLength(var, max_idx + 1); + vars_to_move.push_back(&var); + modified = true; + } + } + + // Move changed vars after their new type instruction to preserve backward + // referencing. + for (auto var : vars_to_move) { + auto type_id = var->type_id(); + auto type_inst = def_use_mgr->GetDef(type_id); + var->RemoveFromList(); + var->InsertAfter(type_inst); + } + + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +unsigned EliminateDeadIOComponentsPass::FindMaxIndex( + const Instruction& var, const unsigned original_max, + const bool skip_first_index) { + unsigned max = 0; + bool seen_non_const_ac = false; + assert(var.opcode() == spv::Op::OpVariable && "must be variable"); + context()->get_def_use_mgr()->WhileEachUser( + var.result_id(), [&max, &seen_non_const_ac, var, skip_first_index, + this](Instruction* use) { + auto use_opcode = use->opcode(); + if (use_opcode == spv::Op::OpLoad || use_opcode == spv::Op::OpStore || + use_opcode == spv::Op::OpCopyMemory || + use_opcode == spv::Op::OpCopyMemorySized || + use_opcode == spv::Op::OpCopyObject) { + seen_non_const_ac = true; + return false; + } + if (use->opcode() != spv::Op::OpAccessChain && + use->opcode() != spv::Op::OpInBoundsAccessChain) { + return true; + } + // OpAccessChain with no indices currently not optimized + if (use->NumInOperands() == 1 || + (skip_first_index && use->NumInOperands() == 2)) { + seen_non_const_ac = true; + return false; + } + const unsigned base_id = + use->GetSingleWordInOperand(kAccessChainBaseInIdx); + USE_ASSERT(base_id == var.result_id() && "unexpected base"); + const unsigned in_idx = skip_first_index ? kAccessChainIndex1InIdx + : kAccessChainIndex0InIdx; + const unsigned idx_id = use->GetSingleWordInOperand(in_idx); + Instruction* idx_inst = context()->get_def_use_mgr()->GetDef(idx_id); + if (idx_inst->opcode() != spv::Op::OpConstant) { + seen_non_const_ac = true; + return false; + } + unsigned value = idx_inst->GetSingleWordInOperand(kConstantValueInIdx); + if (value > max) max = value; + return true; + }); + return seen_non_const_ac ? original_max : max; +} + +void EliminateDeadIOComponentsPass::ChangeArrayLength(Instruction& arr_var, + unsigned length) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::Pointer* ptr_type = + type_mgr->GetType(arr_var.type_id())->AsPointer(); + const analysis::Array* arr_ty = ptr_type->pointee_type()->AsArray(); + assert(arr_ty && "expecting array type"); + uint32_t length_id = const_mgr->GetUIntConstId(length); + analysis::Array new_arr_ty(arr_ty->element_type(), + arr_ty->GetConstantLengthInfo(length_id, length)); + analysis::Type* reg_new_arr_ty = type_mgr->GetRegisteredType(&new_arr_ty); + analysis::Pointer new_ptr_ty(reg_new_arr_ty, ptr_type->storage_class()); + analysis::Type* reg_new_ptr_ty = type_mgr->GetRegisteredType(&new_ptr_ty); + uint32_t new_ptr_ty_id = type_mgr->GetTypeInstruction(reg_new_ptr_ty); + arr_var.SetResultType(new_ptr_ty_id); + def_use_mgr->AnalyzeInstUse(&arr_var); +} + +void EliminateDeadIOComponentsPass::ChangeIOVarStructLength(Instruction& io_var, + unsigned length) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::Pointer* ptr_type = + type_mgr->GetType(io_var.type_id())->AsPointer(); + auto core_type = ptr_type->pointee_type(); + // Check for per-vertex-array of struct from tesc, tese and geom and grab + // embedded struct type. + const auto arr_type = core_type->AsArray(); + if (arr_type) core_type = arr_type->element_type(); + const analysis::Struct* struct_ty = core_type->AsStruct(); + assert(struct_ty && "expecting struct type"); + const auto orig_elt_types = struct_ty->element_types(); + std::vector new_elt_types; + for (unsigned u = 0; u < length; ++u) + new_elt_types.push_back(orig_elt_types[u]); + analysis::Struct new_struct_ty(new_elt_types); + uint32_t old_struct_ty_id = type_mgr->GetTypeInstruction(struct_ty); + std::vector decorations = + context()->get_decoration_mgr()->GetDecorationsFor(old_struct_ty_id, + true); + for (auto dec : decorations) { + if (dec->opcode() == spv::Op::OpMemberDecorate) { + uint32_t midx = dec->GetSingleWordInOperand(1); + if (midx >= length) continue; + } + type_mgr->AttachDecoration(*dec, &new_struct_ty); + } + // Clone name instructions for new struct type + analysis::Type* reg_new_str_ty = type_mgr->GetRegisteredType(&new_struct_ty); + uint32_t new_struct_ty_id = type_mgr->GetTypeInstruction(reg_new_str_ty); + context()->CloneNames(old_struct_ty_id, new_struct_ty_id, length); + // Attach new type to var + analysis::Type* reg_new_var_ty = reg_new_str_ty; + if (arr_type) { + analysis::Array new_arr_ty(reg_new_var_ty, arr_type->length_info()); + reg_new_var_ty = type_mgr->GetRegisteredType(&new_arr_ty); + } + analysis::Pointer new_ptr_ty(reg_new_var_ty, elim_sclass_); + analysis::Type* reg_new_ptr_ty = type_mgr->GetRegisteredType(&new_ptr_ty); + uint32_t new_ptr_ty_id = type_mgr->GetTypeInstruction(reg_new_ptr_ty); + io_var.SetResultType(new_ptr_ty_id); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + def_use_mgr->AnalyzeInstUse(&io_var); +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.h new file mode 100644 index 000000000..ef4dfb717 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_io_components_pass.h @@ -0,0 +1,75 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_ELIMINATE_DEAD_INPUT_COMPONENTS_H_ +#define SOURCE_OPT_ELIMINATE_DEAD_INPUT_COMPONENTS_H_ + +#include + +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class EliminateDeadIOComponentsPass : public Pass { + public: + explicit EliminateDeadIOComponentsPass(spv::StorageClass elim_sclass, + bool safe_mode = true) + : elim_sclass_(elim_sclass), safe_mode_(safe_mode) {} + + const char* name() const override { + return "eliminate-dead-input-components"; + } + Status Process() override; + + // Return the mask of preserved Analyses. + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisDefUse | + IRContext::kAnalysisInstrToBlockMapping | + IRContext::kAnalysisCombinators | IRContext::kAnalysisCFG | + IRContext::kAnalysisDominatorAnalysis | + IRContext::kAnalysisLoopAnalysis | IRContext::kAnalysisNameMap | + IRContext::kAnalysisConstants | IRContext::kAnalysisTypes; + } + + private: + // Find the max constant used to index the variable declared by |var| + // through OpAccessChain or OpInBoundsAccessChain. If any non-constant + // indices or non-Op*AccessChain use of |var|, return |original_max|. + unsigned FindMaxIndex(const Instruction& var, const unsigned original_max, + const bool skip_first_index = false); + + // Change the length of the array |inst| to |length| + void ChangeArrayLength(Instruction& inst, unsigned length); + + // Change the length of the struct in |io_var| to |length|. |io_var| + // is either the struct or a per-vertex-array of the struct. + void ChangeIOVarStructLength(Instruction& io_var, unsigned length); + + // Storage class to be optimized. Must be Input or Output. + spv::StorageClass elim_sclass_; + + // Only make changes that will not cause interface incompatibility if done + // standalone. Currently this is only Input variables in vertex shaders. + bool safe_mode_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_ELIMINATE_DEAD_INPUT_COMPONENTS_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_members_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_members_pass.cpp index a24ba8f41..1c98502e2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_members_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_members_pass.cpp @@ -17,17 +17,16 @@ #include "ir_builder.h" #include "source/opt/ir_context.h" +namespace spvtools { +namespace opt { namespace { -const uint32_t kRemovedMember = 0xFFFFFFFF; -const uint32_t kSpecConstOpOpcodeIdx = 0; +constexpr uint32_t kRemovedMember = 0xFFFFFFFF; +constexpr uint32_t kSpecConstOpOpcodeIdx = 0; constexpr uint32_t kArrayElementTypeIdx = 0; } // namespace -namespace spvtools { -namespace opt { - Pass::Status EliminateDeadMembersPass::Process() { - if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) return Status::SuccessWithoutChange; FindLiveMembers(); @@ -38,30 +37,30 @@ Pass::Status EliminateDeadMembersPass::Process() { } void EliminateDeadMembersPass::FindLiveMembers() { - // Until we have implemented the rewritting of OpSpecConsantOp instructions, + // Until we have implemented the rewriting of OpSpecConsantOp instructions, // we have to mark them as fully used just to be safe. for (auto& inst : get_module()->types_values()) { - if (inst.opcode() == SpvOpSpecConstantOp) { - switch (inst.GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) { - case SpvOpCompositeExtract: + if (inst.opcode() == spv::Op::OpSpecConstantOp) { + switch (spv::Op(inst.GetSingleWordInOperand(kSpecConstOpOpcodeIdx))) { + case spv::Op::OpCompositeExtract: MarkMembersAsLiveForExtract(&inst); break; - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: // Nothing specific to do. break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: assert(false && "Not implemented yet."); break; default: break; } - } else if (inst.opcode() == SpvOpVariable) { - switch (inst.GetSingleWordInOperand(0)) { - case SpvStorageClassInput: - case SpvStorageClassOutput: + } else if (inst.opcode() == spv::Op::OpVariable) { + switch (spv::StorageClass(inst.GetSingleWordInOperand(0))) { + case spv::StorageClass::Input: + case spv::StorageClass::Output: MarkPointeeTypeAsFullUsed(inst.type_id()); break; default: @@ -86,34 +85,34 @@ void EliminateDeadMembersPass::FindLiveMembers(const Function& function) { void EliminateDeadMembersPass::FindLiveMembers(const Instruction* inst) { switch (inst->opcode()) { - case SpvOpStore: + case spv::Op::OpStore: MarkMembersAsLiveForStore(inst); break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: MarkMembersAsLiveForCopyMemory(inst); break; - case SpvOpCompositeExtract: + case spv::Op::OpCompositeExtract: MarkMembersAsLiveForExtract(inst); break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: MarkMembersAsLiveForAccessChain(inst); break; - case SpvOpReturnValue: + case spv::Op::OpReturnValue: // This should be an issue only if we are returning from the entry point. // However, for now I will keep it more conservative because functions are // often inlined leaving only the entry points. MarkOperandTypeAsFullyUsed(inst, 0); break; - case SpvOpArrayLength: + case spv::Op::OpArrayLength: MarkMembersAsLiveForArrayLength(inst); break; - case SpvOpLoad: - case SpvOpCompositeInsert: - case SpvOpCompositeConstruct: + case spv::Op::OpLoad: + case spv::Op::OpCompositeInsert: + case spv::Op::OpCompositeConstruct: break; default: // This path is here for safety. All instructions that can reference @@ -131,7 +130,7 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForStore( // memory that is read outside of the shader. Other passes can remove all // store to memory that is not visible outside of the shader, so we do not // complicate the code for now. - assert(inst->opcode() == SpvOpStore); + assert(inst->opcode() == spv::Op::OpStore); uint32_t object_id = inst->GetSingleWordInOperand(1); Instruction* object_inst = context()->get_def_use_mgr()->GetDef(object_id); uint32_t object_type_id = object_inst->type_id(); @@ -143,15 +142,15 @@ void EliminateDeadMembersPass::MarkTypeAsFullyUsed(uint32_t type_id) { assert(type_inst != nullptr); switch (type_inst->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: // Mark every member and its type as fully used. for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { used_members_[type_id].insert(i); MarkTypeAsFullyUsed(type_inst->GetSingleWordInOperand(i)); } break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: MarkTypeAsFullyUsed( type_inst->GetSingleWordInOperand(kArrayElementTypeIdx)); break; @@ -162,7 +161,7 @@ void EliminateDeadMembersPass::MarkTypeAsFullyUsed(uint32_t type_id) { void EliminateDeadMembersPass::MarkPointeeTypeAsFullUsed(uint32_t ptr_type_id) { Instruction* ptr_type_inst = get_def_use_mgr()->GetDef(ptr_type_id); - assert(ptr_type_inst->opcode() == SpvOpTypePointer); + assert(ptr_type_inst->opcode() == spv::Op::OpTypePointer); MarkTypeAsFullyUsed(ptr_type_inst->GetSingleWordInOperand(1)); } @@ -178,12 +177,13 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForCopyMemory( void EliminateDeadMembersPass::MarkMembersAsLiveForExtract( const Instruction* inst) { - assert(inst->opcode() == SpvOpCompositeExtract || - (inst->opcode() == SpvOpSpecConstantOp && - inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx) == - SpvOpCompositeExtract)); + assert(inst->opcode() == spv::Op::OpCompositeExtract || + (inst->opcode() == spv::Op::OpSpecConstantOp && + spv::Op(inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) == + spv::Op::OpCompositeExtract)); - uint32_t first_operand = (inst->opcode() == SpvOpSpecConstantOp ? 1 : 0); + uint32_t first_operand = + (inst->opcode() == spv::Op::OpSpecConstantOp ? 1 : 0); uint32_t composite_id = inst->GetSingleWordInOperand(first_operand); Instruction* composite_inst = get_def_use_mgr()->GetDef(composite_id); uint32_t type_id = composite_inst->type_id(); @@ -192,14 +192,14 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForExtract( Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); uint32_t member_idx = inst->GetSingleWordInOperand(i); switch (type_inst->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: used_members_[type_id].insert(member_idx); type_id = type_inst->GetSingleWordInOperand(member_idx); break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: type_id = type_inst->GetSingleWordInOperand(0); break; default: @@ -210,10 +210,10 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForExtract( void EliminateDeadMembersPass::MarkMembersAsLiveForAccessChain( const Instruction* inst) { - assert(inst->opcode() == SpvOpAccessChain || - inst->opcode() == SpvOpInBoundsAccessChain || - inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain); + assert(inst->opcode() == spv::Op::OpAccessChain || + inst->opcode() == spv::Op::OpInBoundsAccessChain || + inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain); uint32_t pointer_id = inst->GetSingleWordInOperand(0); Instruction* pointer_inst = get_def_use_mgr()->GetDef(pointer_id); @@ -225,14 +225,14 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForAccessChain( // For a pointer access chain, we need to skip the |element| index. It is not // a reference to the member of a struct, and it does not change the type. - uint32_t i = (inst->opcode() == SpvOpAccessChain || - inst->opcode() == SpvOpInBoundsAccessChain + uint32_t i = (inst->opcode() == spv::Op::OpAccessChain || + inst->opcode() == spv::Op::OpInBoundsAccessChain ? 1 : 2); for (; i < inst->NumInOperands(); ++i) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); switch (type_inst->opcode()) { - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const analysis::IntConstant* member_idx = const_mgr->FindDeclaredConstant(inst->GetSingleWordInOperand(i)) ->AsIntConstant(); @@ -242,10 +242,10 @@ void EliminateDeadMembersPass::MarkMembersAsLiveForAccessChain( used_members_[type_id].insert(index); type_id = type_inst->GetSingleWordInOperand(index); } break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: type_id = type_inst->GetSingleWordInOperand(0); break; default: @@ -263,7 +263,7 @@ void EliminateDeadMembersPass::MarkOperandTypeAsFullyUsed( void EliminateDeadMembersPass::MarkMembersAsLiveForArrayLength( const Instruction* inst) { - assert(inst->opcode() == SpvOpArrayLength); + assert(inst->opcode() == spv::Op::OpArrayLength); uint32_t object_id = inst->GetSingleWordInOperand(0); Instruction* object_inst = get_def_use_mgr()->GetDef(object_id); uint32_t pointer_type_id = object_inst->type_id(); @@ -278,7 +278,7 @@ bool EliminateDeadMembersPass::RemoveDeadMembers() { // First update all of the OpTypeStruct instructions. get_module()->ForEachInst([&modified, this](Instruction* inst) { switch (inst->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: modified |= UpdateOpTypeStruct(inst); break; default: @@ -289,47 +289,47 @@ bool EliminateDeadMembersPass::RemoveDeadMembers() { // Now update all of the instructions that reference the OpTypeStructs. get_module()->ForEachInst([&modified, this](Instruction* inst) { switch (inst->opcode()) { - case SpvOpMemberName: + case spv::Op::OpMemberName: modified |= UpdateOpMemberNameOrDecorate(inst); break; - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: modified |= UpdateOpMemberNameOrDecorate(inst); break; - case SpvOpGroupMemberDecorate: + case spv::Op::OpGroupMemberDecorate: modified |= UpdateOpGroupMemberDecorate(inst); break; - case SpvOpSpecConstantComposite: - case SpvOpConstantComposite: - case SpvOpCompositeConstruct: + case spv::Op::OpSpecConstantComposite: + case spv::Op::OpConstantComposite: + case spv::Op::OpCompositeConstruct: modified |= UpdateConstantComposite(inst); break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: modified |= UpdateAccessChain(inst); break; - case SpvOpCompositeExtract: + case spv::Op::OpCompositeExtract: modified |= UpdateCompsiteExtract(inst); break; - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: modified |= UpdateCompositeInsert(inst); break; - case SpvOpArrayLength: + case spv::Op::OpArrayLength: modified |= UpdateOpArrayLength(inst); break; - case SpvOpSpecConstantOp: - switch (inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) { - case SpvOpCompositeExtract: + case spv::Op::OpSpecConstantOp: + switch (spv::Op(inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx))) { + case spv::Op::OpCompositeExtract: modified |= UpdateCompsiteExtract(inst); break; - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: modified |= UpdateCompositeInsert(inst); break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: assert(false && "Not implemented yet."); break; default: @@ -344,7 +344,7 @@ bool EliminateDeadMembersPass::RemoveDeadMembers() { } bool EliminateDeadMembersPass::UpdateOpTypeStruct(Instruction* inst) { - assert(inst->opcode() == SpvOpTypeStruct); + assert(inst->opcode() == spv::Op::OpTypeStruct); const auto& live_members = used_members_[inst->result_id()]; if (live_members.size() == inst->NumInOperands()) { @@ -362,8 +362,8 @@ bool EliminateDeadMembersPass::UpdateOpTypeStruct(Instruction* inst) { } bool EliminateDeadMembersPass::UpdateOpMemberNameOrDecorate(Instruction* inst) { - assert(inst->opcode() == SpvOpMemberName || - inst->opcode() == SpvOpMemberDecorate); + assert(inst->opcode() == spv::Op::OpMemberName || + inst->opcode() == spv::Op::OpMemberDecorate); uint32_t type_id = inst->GetSingleWordInOperand(0); auto live_members = used_members_.find(type_id); @@ -388,7 +388,7 @@ bool EliminateDeadMembersPass::UpdateOpMemberNameOrDecorate(Instruction* inst) { } bool EliminateDeadMembersPass::UpdateOpGroupMemberDecorate(Instruction* inst) { - assert(inst->opcode() == SpvOpGroupMemberDecorate); + assert(inst->opcode() == spv::Op::OpGroupMemberDecorate); bool modified = false; @@ -429,9 +429,9 @@ bool EliminateDeadMembersPass::UpdateOpGroupMemberDecorate(Instruction* inst) { } bool EliminateDeadMembersPass::UpdateConstantComposite(Instruction* inst) { - assert(inst->opcode() == SpvOpSpecConstantComposite || - inst->opcode() == SpvOpConstantComposite || - inst->opcode() == SpvOpCompositeConstruct); + assert(inst->opcode() == spv::Op::OpSpecConstantComposite || + inst->opcode() == spv::Op::OpConstantComposite || + inst->opcode() == spv::Op::OpCompositeConstruct); uint32_t type_id = inst->type_id(); bool modified = false; @@ -450,10 +450,10 @@ bool EliminateDeadMembersPass::UpdateConstantComposite(Instruction* inst) { } bool EliminateDeadMembersPass::UpdateAccessChain(Instruction* inst) { - assert(inst->opcode() == SpvOpAccessChain || - inst->opcode() == SpvOpInBoundsAccessChain || - inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain); + assert(inst->opcode() == spv::Op::OpAccessChain || + inst->opcode() == spv::Op::OpInBoundsAccessChain || + inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain); uint32_t pointer_id = inst->GetSingleWordInOperand(0); Instruction* pointer_inst = get_def_use_mgr()->GetDef(pointer_id); @@ -467,8 +467,8 @@ bool EliminateDeadMembersPass::UpdateAccessChain(Instruction* inst) { new_operands.emplace_back(inst->GetInOperand(0)); // For pointer access chains we want to copy the element operand. - if (inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain) { + if (inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain) { new_operands.emplace_back(inst->GetInOperand(1)); } @@ -476,7 +476,7 @@ bool EliminateDeadMembersPass::UpdateAccessChain(Instruction* inst) { i < inst->NumInOperands(); ++i) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); switch (type_inst->opcode()) { - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const analysis::IntConstant* member_idx = const_mgr->FindDeclaredConstant(inst->GetSingleWordInOperand(i)) ->AsIntConstant(); @@ -501,10 +501,10 @@ bool EliminateDeadMembersPass::UpdateAccessChain(Instruction* inst) { // index. type_id = type_inst->GetSingleWordInOperand(new_member_idx); } break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: new_operands.emplace_back(inst->GetInOperand(i)); type_id = type_inst->GetSingleWordInOperand(0); break; @@ -539,13 +539,13 @@ uint32_t EliminateDeadMembersPass::GetNewMemberIndex(uint32_t type_id, } bool EliminateDeadMembersPass::UpdateCompsiteExtract(Instruction* inst) { - assert(inst->opcode() == SpvOpCompositeExtract || - (inst->opcode() == SpvOpSpecConstantOp && - inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx) == - SpvOpCompositeExtract)); + assert(inst->opcode() == spv::Op::OpCompositeExtract || + (inst->opcode() == spv::Op::OpSpecConstantOp && + spv::Op(inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) == + spv::Op::OpCompositeExtract)); uint32_t first_operand = 0; - if (inst->opcode() == SpvOpSpecConstantOp) { + if (inst->opcode() == spv::Op::OpSpecConstantOp) { first_operand = 1; } uint32_t object_id = inst->GetSingleWordInOperand(first_operand); @@ -569,15 +569,15 @@ bool EliminateDeadMembersPass::UpdateCompsiteExtract(Instruction* inst) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); switch (type_inst->opcode()) { - case SpvOpTypeStruct: - // The type will have already been rewriten, so use the new member + case spv::Op::OpTypeStruct: + // The type will have already been rewritten, so use the new member // index. type_id = type_inst->GetSingleWordInOperand(new_member_idx); break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: type_id = type_inst->GetSingleWordInOperand(0); break; default: @@ -594,13 +594,13 @@ bool EliminateDeadMembersPass::UpdateCompsiteExtract(Instruction* inst) { } bool EliminateDeadMembersPass::UpdateCompositeInsert(Instruction* inst) { - assert(inst->opcode() == SpvOpCompositeInsert || - (inst->opcode() == SpvOpSpecConstantOp && - inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx) == - SpvOpCompositeInsert)); + assert(inst->opcode() == spv::Op::OpCompositeInsert || + (inst->opcode() == spv::Op::OpSpecConstantOp && + spv::Op(inst->GetSingleWordInOperand(kSpecConstOpOpcodeIdx)) == + spv::Op::OpCompositeInsert)); uint32_t first_operand = 0; - if (inst->opcode() == SpvOpSpecConstantOp) { + if (inst->opcode() == spv::Op::OpSpecConstantOp) { first_operand = 1; } @@ -630,15 +630,15 @@ bool EliminateDeadMembersPass::UpdateCompositeInsert(Instruction* inst) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); switch (type_inst->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: // The type will have already been rewritten, so use the new member // index. type_id = type_inst->GetSingleWordInOperand(new_member_idx); break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: type_id = type_inst->GetSingleWordInOperand(0); break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.cpp new file mode 100644 index 000000000..99711a16e --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.cpp @@ -0,0 +1,237 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/eliminate_dead_output_stores_pass.h" + +#include "source/opt/instruction.h" +#include "source/opt/ir_context.h" + +namespace spvtools { +namespace opt { +namespace { +constexpr uint32_t kDecorationLocationInIdx = 2; +constexpr uint32_t kOpDecorateMemberMemberInIdx = 1; +constexpr uint32_t kOpDecorateBuiltInLiteralInIdx = 2; +constexpr uint32_t kOpDecorateMemberBuiltInLiteralInIdx = 3; +constexpr uint32_t kOpAccessChainIdx0InIdx = 1; +constexpr uint32_t kOpConstantValueInIdx = 0; +} // namespace + +Pass::Status EliminateDeadOutputStoresPass::Process() { + // Current functionality assumes shader capability + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) + return Status::SuccessWithoutChange; + Pass::Status status = DoDeadOutputStoreElimination(); + return status; +} + +void EliminateDeadOutputStoresPass::InitializeElimination() { + kill_list_.clear(); +} + +bool EliminateDeadOutputStoresPass::IsLiveBuiltin(uint32_t bi) { + return live_builtins_->find(bi) != live_builtins_->end(); +} + +bool EliminateDeadOutputStoresPass::AnyLocsAreLive(uint32_t start, + uint32_t count) { + auto finish = start + count; + for (uint32_t u = start; u < finish; ++u) { + if (live_locs_->find(u) != live_locs_->end()) return true; + } + return false; +} + +void EliminateDeadOutputStoresPass::KillAllStoresOfRef(Instruction* ref) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + if (ref->opcode() == spv::Op::OpStore) { + kill_list_.push_back(ref); + return; + } + assert((ref->opcode() == spv::Op::OpAccessChain || + ref->opcode() == spv::Op::OpInBoundsAccessChain) && + "unexpected use of output variable"); + def_use_mgr->ForEachUser(ref, [this](Instruction* user) { + if (user->opcode() == spv::Op::OpStore) kill_list_.push_back(user); + }); +} + +void EliminateDeadOutputStoresPass::KillAllDeadStoresOfLocRef( + Instruction* ref, Instruction* var) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::DecorationManager* deco_mgr = context()->get_decoration_mgr(); + analysis::LivenessManager* live_mgr = context()->get_liveness_mgr(); + // Find variable location if present. + uint32_t start_loc = 0; + auto var_id = var->result_id(); + bool no_loc = deco_mgr->WhileEachDecoration( + var_id, uint32_t(spv::Decoration::Location), + [&start_loc](const Instruction& deco) { + assert(deco.opcode() == spv::Op::OpDecorate && "unexpected decoration"); + start_loc = deco.GetSingleWordInOperand(kDecorationLocationInIdx); + return false; + }); + // Find patch decoration if present + bool is_patch = !deco_mgr->WhileEachDecoration( + var_id, uint32_t(spv::Decoration::Patch), [](const Instruction& deco) { + if (deco.opcode() != spv::Op::OpDecorate) + assert(false && "unexpected decoration"); + return false; + }); + // Compute offset and final type of reference. If no location found + // or any stored locations are live, return without removing stores. + auto ptr_type = type_mgr->GetType(var->type_id())->AsPointer(); + assert(ptr_type && "unexpected var type"); + auto var_type = ptr_type->pointee_type(); + uint32_t ref_loc = start_loc; + auto curr_type = var_type; + if (ref->opcode() == spv::Op::OpAccessChain || + ref->opcode() == spv::Op::OpInBoundsAccessChain) { + live_mgr->AnalyzeAccessChainLoc(ref, &curr_type, &ref_loc, &no_loc, + is_patch, /* input */ false); + } + if (no_loc || AnyLocsAreLive(ref_loc, live_mgr->GetLocSize(curr_type))) + return; + // Kill all stores based on this reference + KillAllStoresOfRef(ref); +} + +void EliminateDeadOutputStoresPass::KillAllDeadStoresOfBuiltinRef( + Instruction* ref, Instruction* var) { + auto deco_mgr = context()->get_decoration_mgr(); + auto def_use_mgr = context()->get_def_use_mgr(); + auto type_mgr = context()->get_type_mgr(); + auto live_mgr = context()->get_liveness_mgr(); + // Search for builtin decoration of base variable + uint32_t builtin = uint32_t(spv::BuiltIn::Max); + auto var_id = var->result_id(); + (void)deco_mgr->WhileEachDecoration( + var_id, uint32_t(spv::Decoration::BuiltIn), + [&builtin](const Instruction& deco) { + assert(deco.opcode() == spv::Op::OpDecorate && "unexpected decoration"); + builtin = deco.GetSingleWordInOperand(kOpDecorateBuiltInLiteralInIdx); + return false; + }); + // If analyzed builtin and not live, kill stores. + if (builtin != uint32_t(spv::BuiltIn::Max)) { + if (live_mgr->IsAnalyzedBuiltin(builtin) && !IsLiveBuiltin(builtin)) + KillAllStoresOfRef(ref); + return; + } + // Search for builtin decoration on indexed member + auto ref_op = ref->opcode(); + if (ref_op != spv::Op::OpAccessChain && + ref_op != spv::Op::OpInBoundsAccessChain) { + return; + } + uint32_t in_idx = kOpAccessChainIdx0InIdx; + analysis::Type* var_type = type_mgr->GetType(var->type_id()); + analysis::Pointer* ptr_type = var_type->AsPointer(); + auto curr_type = ptr_type->pointee_type(); + auto arr_type = curr_type->AsArray(); + if (arr_type) { + curr_type = arr_type->element_type(); + ++in_idx; + } + auto str_type = curr_type->AsStruct(); + auto str_type_id = type_mgr->GetId(str_type); + auto member_idx_id = ref->GetSingleWordInOperand(in_idx); + auto member_idx_inst = def_use_mgr->GetDef(member_idx_id); + assert(member_idx_inst->opcode() == spv::Op::OpConstant && + "unexpected non-constant index"); + auto ac_idx = member_idx_inst->GetSingleWordInOperand(kOpConstantValueInIdx); + (void)deco_mgr->WhileEachDecoration( + str_type_id, uint32_t(spv::Decoration::BuiltIn), + [ac_idx, &builtin](const Instruction& deco) { + assert(deco.opcode() == spv::Op::OpMemberDecorate && + "unexpected decoration"); + auto deco_idx = + deco.GetSingleWordInOperand(kOpDecorateMemberMemberInIdx); + if (deco_idx == ac_idx) { + builtin = + deco.GetSingleWordInOperand(kOpDecorateMemberBuiltInLiteralInIdx); + return false; + } + return true; + }); + assert(builtin != uint32_t(spv::BuiltIn::Max) && "builtin not found"); + // If analyzed builtin and not live, kill stores. + if (live_mgr->IsAnalyzedBuiltin(builtin) && !IsLiveBuiltin(builtin)) + KillAllStoresOfRef(ref); +} + +Pass::Status EliminateDeadOutputStoresPass::DoDeadOutputStoreElimination() { + // Current implementation only supports vert, tesc, tese, geom shaders + auto stage = context()->GetStage(); + if (stage != spv::ExecutionModel::Vertex && + stage != spv::ExecutionModel::TessellationControl && + stage != spv::ExecutionModel::TessellationEvaluation && + stage != spv::ExecutionModel::Geometry) + return Status::Failure; + InitializeElimination(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::DecorationManager* deco_mgr = context()->get_decoration_mgr(); + // Process all output variables + for (auto& var : context()->types_values()) { + if (var.opcode() != spv::Op::OpVariable) { + continue; + } + analysis::Type* var_type = type_mgr->GetType(var.type_id()); + analysis::Pointer* ptr_type = var_type->AsPointer(); + if (ptr_type->storage_class() != spv::StorageClass::Output) { + continue; + } + // If builtin decoration on variable, process as builtin. + auto var_id = var.result_id(); + bool is_builtin = false; + if (deco_mgr->HasDecoration(var_id, uint32_t(spv::Decoration::BuiltIn))) { + is_builtin = true; + } else { + // If interface block with builtin members, process as builtin. + // Strip off outer array type if present. + auto curr_type = ptr_type->pointee_type(); + auto arr_type = curr_type->AsArray(); + if (arr_type) curr_type = arr_type->element_type(); + auto str_type = curr_type->AsStruct(); + if (str_type) { + auto str_type_id = type_mgr->GetId(str_type); + if (deco_mgr->HasDecoration(str_type_id, + uint32_t(spv::Decoration::BuiltIn))) + is_builtin = true; + } + } + // For each store or access chain using var, if dead builtin or all its + // locations are dead, kill store or all access chain's stores + def_use_mgr->ForEachUser( + var_id, [this, &var, is_builtin](Instruction* user) { + auto op = user->opcode(); + if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName || + op == spv::Op::OpDecorate || user->IsNonSemanticInstruction()) + return; + if (is_builtin) + KillAllDeadStoresOfBuiltinRef(user, &var); + else + KillAllDeadStoresOfLocRef(user, &var); + }); + } + for (auto& kinst : kill_list_) context()->KillInst(kinst); + + return kill_list_.empty() ? Status::SuccessWithoutChange + : Status::SuccessWithChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.h new file mode 100644 index 000000000..676d4f4f0 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/eliminate_dead_output_stores_pass.h @@ -0,0 +1,81 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_ELIMINATE_DEAD_OUTPUT_STORES_H_ +#define SOURCE_OPT_ELIMINATE_DEAD_OUTPUT_STORES_H_ + +#include + +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class EliminateDeadOutputStoresPass : public Pass { + public: + explicit EliminateDeadOutputStoresPass( + std::unordered_set* live_locs, + std::unordered_set* live_builtins) + : live_locs_(live_locs), live_builtins_(live_builtins) {} + + const char* name() const override { return "eliminate-dead-output-stores"; } + Status Process() override; + + // Return the mask of preserved Analyses. + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisDefUse | + IRContext::kAnalysisInstrToBlockMapping | + IRContext::kAnalysisCombinators | IRContext::kAnalysisCFG | + IRContext::kAnalysisDominatorAnalysis | + IRContext::kAnalysisLoopAnalysis | IRContext::kAnalysisNameMap | + IRContext::kAnalysisConstants | IRContext::kAnalysisTypes; + } + + private: + // Initialize elimination + void InitializeElimination(); + + // Do dead output store analysis + Status DoDeadOutputStoreElimination(); + + // Kill all stores resulting from |ref|. + void KillAllStoresOfRef(Instruction* ref); + + // Kill all dead stores resulting from |user| of loc-based |var|. + void KillAllDeadStoresOfLocRef(Instruction* user, Instruction* var); + + // Kill all dead stores resulting from |user| of builtin |var|. + void KillAllDeadStoresOfBuiltinRef(Instruction* user, Instruction* var); + + // Return true if any of |count| locations starting at location |start| are + // live. + bool AnyLocsAreLive(uint32_t start, uint32_t count); + + // Return true if builtin |bi| is live. + bool IsLiveBuiltin(uint32_t bi); + + std::unordered_set* live_locs_; + std::unordered_set* live_builtins_; + + std::vector kill_list_; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_ELIMINATE_DEAD_OUTPUT_STORES_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.cpp index a59027167..51883706a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.cpp @@ -14,8 +14,6 @@ #include "source/opt/feature_manager.h" -#include -#include #include #include "source/enum_string_mapping.h" @@ -36,42 +34,44 @@ void FeatureManager::AddExtensions(Module* module) { } void FeatureManager::AddExtension(Instruction* ext) { - assert(ext->opcode() == SpvOpExtension && + assert(ext->opcode() == spv::Op::OpExtension && "Expecting an extension instruction."); const std::string name = ext->GetInOperand(0u).AsString(); Extension extension; if (GetExtensionFromString(name.c_str(), &extension)) { - extensions_.Add(extension); + extensions_.insert(extension); } } void FeatureManager::RemoveExtension(Extension ext) { - if (!extensions_.Contains(ext)) return; - extensions_.Remove(ext); + if (!extensions_.contains(ext)) return; + extensions_.erase(ext); } -void FeatureManager::AddCapability(SpvCapability cap) { - if (capabilities_.Contains(cap)) return; +void FeatureManager::AddCapability(spv::Capability cap) { + if (capabilities_.contains(cap)) return; - capabilities_.Add(cap); + capabilities_.insert(cap); spv_operand_desc desc = {}; - if (SPV_SUCCESS == - grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { - CapabilitySet(desc->numCapabilities, desc->capabilities) - .ForEach([this](SpvCapability c) { AddCapability(c); }); + if (SPV_SUCCESS == grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, + uint32_t(cap), &desc)) { + for (auto capability : + CapabilitySet(desc->numCapabilities, desc->capabilities)) { + AddCapability(capability); + } } } -void FeatureManager::RemoveCapability(SpvCapability cap) { - if (!capabilities_.Contains(cap)) return; - capabilities_.Remove(cap); +void FeatureManager::RemoveCapability(spv::Capability cap) { + if (!capabilities_.contains(cap)) return; + capabilities_.erase(cap); } void FeatureManager::AddCapabilities(Module* module) { for (Instruction& inst : module->capabilities()) { - AddCapability(static_cast(inst.GetSingleWordInOperand(0))); + AddCapability(static_cast(inst.GetSingleWordInOperand(0))); } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.h index 68c8e9a23..d150a2fa2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/feature_manager.h @@ -25,27 +25,19 @@ namespace opt { // Tracks features enabled by a module. The IRContext has a FeatureManager. class FeatureManager { public: - explicit FeatureManager(const AssemblyGrammar& grammar) : grammar_(grammar) {} - // Returns true if |ext| is an enabled extension in the module. - bool HasExtension(Extension ext) const { return extensions_.Contains(ext); } - - // Removes the given |extension| from the current FeatureManager. - void RemoveExtension(Extension extension); + bool HasExtension(Extension ext) const { return extensions_.contains(ext); } // Returns true if |cap| is an enabled capability in the module. - bool HasCapability(SpvCapability cap) const { - return capabilities_.Contains(cap); + bool HasCapability(spv::Capability cap) const { + return capabilities_.contains(cap); } - // Removes the given |capability| from the current FeatureManager. - void RemoveCapability(SpvCapability capability); - - // Analyzes |module| and records enabled extensions and capabilities. - void Analyze(Module* module); + // Returns the capabilities the module declares. + inline const CapabilitySet& GetCapabilities() const { return capabilities_; } - CapabilitySet* GetCapabilities() { return &capabilities_; } - const CapabilitySet* GetCapabilities() const { return &capabilities_; } + // Returns the extensions the module imports. + inline const ExtensionSet& GetExtensions() const { return extensions_; } uint32_t GetExtInstImportId_GLSLstd450() const { return extinst_importid_GLSLstd450_; @@ -64,23 +56,34 @@ class FeatureManager { return !(a == b); } - // Adds the given |capability| and all implied capabilities into the current - // FeatureManager. - void AddCapability(SpvCapability capability); + private: + explicit FeatureManager(const AssemblyGrammar& grammar) : grammar_(grammar) {} + + // Analyzes |module| and records enabled extensions and capabilities. + void Analyze(Module* module); // Add the extension |ext| to the feature manager. void AddExtension(Instruction* ext); - // Analyzes |module| and records imported external instruction sets. - void AddExtInstImportIds(Module* module); - - private: // Analyzes |module| and records enabled extensions. void AddExtensions(Module* module); + // Removes the given |extension| from the current FeatureManager. + void RemoveExtension(Extension extension); + + // Adds the given |capability| and all implied capabilities into the current + // FeatureManager. + void AddCapability(spv::Capability capability); + // Analyzes |module| and records enabled capabilities. void AddCapabilities(Module* module); + // Removes the given |capability| from the current FeatureManager. + void RemoveCapability(spv::Capability capability); + + // Analyzes |module| and records imported external instruction sets. + void AddExtInstImportIds(Module* module); + // Auxiliary object for querying SPIR-V grammar facts. const AssemblyGrammar& grammar_; @@ -100,6 +103,8 @@ class FeatureManager { // Common NonSemanticShader100DebugInfo external instruction import ids, // cached for performance. uint32_t extinst_importid_Shader100DebugInfo_ = 0; + + friend class IRContext; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.cpp new file mode 100644 index 000000000..f3486bed3 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.cpp @@ -0,0 +1,91 @@ +// Copyright (c) 2022 Advanced Micro Devices, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "fix_func_call_arguments.h" + +#include "ir_builder.h" + +using namespace spvtools; +using namespace opt; + +bool FixFuncCallArgumentsPass::ModuleHasASingleFunction() { + auto funcsNum = get_module()->end() - get_module()->begin(); + return funcsNum == 1; +} + +Pass::Status FixFuncCallArgumentsPass::Process() { + bool modified = false; + if (ModuleHasASingleFunction()) return Status::SuccessWithoutChange; + for (auto& func : *get_module()) { + func.ForEachInst([this, &modified](Instruction* inst) { + if (inst->opcode() == spv::Op::OpFunctionCall) { + modified |= FixFuncCallArguments(inst); + } + }); + } + return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; +} + +bool FixFuncCallArgumentsPass::FixFuncCallArguments( + Instruction* func_call_inst) { + bool modified = false; + for (uint32_t i = 0; i < func_call_inst->NumInOperands(); ++i) { + Operand& op = func_call_inst->GetInOperand(i); + if (op.type != SPV_OPERAND_TYPE_ID) continue; + Instruction* operand_inst = get_def_use_mgr()->GetDef(op.AsId()); + if (operand_inst->opcode() == spv::Op::OpAccessChain) { + uint32_t var_id = + ReplaceAccessChainFuncCallArguments(func_call_inst, operand_inst); + func_call_inst->SetInOperand(i, {var_id}); + modified = true; + } + } + if (modified) { + context()->UpdateDefUse(func_call_inst); + } + return modified; +} + +uint32_t FixFuncCallArgumentsPass::ReplaceAccessChainFuncCallArguments( + Instruction* func_call_inst, Instruction* operand_inst) { + InstructionBuilder builder( + context(), func_call_inst, + IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); + + Instruction* next_insert_point = func_call_inst->NextNode(); + // Get Variable insertion point + Function* func = context()->get_instr_block(func_call_inst)->GetParent(); + Instruction* variable_insertion_point = &*(func->begin()->begin()); + Instruction* op_ptr_type = get_def_use_mgr()->GetDef(operand_inst->type_id()); + Instruction* op_type = + get_def_use_mgr()->GetDef(op_ptr_type->GetSingleWordInOperand(1)); + uint32_t varType = context()->get_type_mgr()->FindPointerToType( + op_type->result_id(), spv::StorageClass::Function); + // Create new variable + builder.SetInsertPoint(variable_insertion_point); + Instruction* var = + builder.AddVariable(varType, uint32_t(spv::StorageClass::Function)); + // Load access chain to the new variable before function call + builder.SetInsertPoint(func_call_inst); + + uint32_t operand_id = operand_inst->result_id(); + Instruction* load = builder.AddLoad(op_type->result_id(), operand_id); + builder.AddStore(var->result_id(), load->result_id()); + // Load return value to the acesschain after function call + builder.SetInsertPoint(next_insert_point); + load = builder.AddLoad(op_type->result_id(), var->result_id()); + builder.AddStore(operand_id, load->result_id()); + + return var->result_id(); +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.h new file mode 100644 index 000000000..15781b8c6 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_func_call_arguments.h @@ -0,0 +1,47 @@ +// Copyright (c) 2022 Advanced Micro Devices, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef _VAR_FUNC_CALL_PASS_H +#define _VAR_FUNC_CALL_PASS_H + +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { +class FixFuncCallArgumentsPass : public Pass { + public: + FixFuncCallArgumentsPass() {} + const char* name() const override { return "fix-for-funcall-param"; } + Status Process() override; + // Returns true if the module has one one function. + bool ModuleHasASingleFunction(); + // Copies from the memory pointed to by |operand_inst| to a new function scope + // variable created before |func_call_inst|, and + // copies the value of the new variable back to the memory pointed to by + // |operand_inst| after |funct_call_inst| Returns the id of + // the new variable. + uint32_t ReplaceAccessChainFuncCallArguments(Instruction* func_call_inst, + Instruction* operand_inst); + + // Fix function call |func_call_inst| non memory object arguments + bool FixFuncCallArguments(Instruction* func_call_inst); + + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisTypes; + } +}; +} // namespace opt +} // namespace spvtools + +#endif // _VAR_FUNC_CALL_PASS_H \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.cpp index 04eb1326c..564cd1b8a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.cpp @@ -26,7 +26,7 @@ Pass::Status FixStorageClass::Process() { bool modified = false; get_module()->ForEachInst([this, &modified](Instruction* inst) { - if (inst->opcode() == SpvOpVariable) { + if (inst->opcode() == spv::Op::OpVariable) { std::set seen; std::vector> uses; get_def_use_mgr()->ForEachUse(inst, @@ -37,7 +37,7 @@ Pass::Status FixStorageClass::Process() { for (auto& use : uses) { modified |= PropagateStorageClass( use.first, - static_cast(inst->GetSingleWordInOperand(0)), + static_cast(inst->GetSingleWordInOperand(0)), &seen); assert(seen.empty() && "Seen was not properly reset."); modified |= @@ -50,14 +50,14 @@ Pass::Status FixStorageClass::Process() { } bool FixStorageClass::PropagateStorageClass(Instruction* inst, - SpvStorageClass storage_class, + spv::StorageClass storage_class, std::set* seen) { if (!IsPointerResultType(inst)) { return false; } if (IsPointerToStorageClass(inst, storage_class)) { - if (inst->opcode() == SpvOpPhi) { + if (inst->opcode() == spv::Op::OpPhi) { if (!seen->insert(inst->result_id()).second) { return false; } @@ -71,34 +71,34 @@ bool FixStorageClass::PropagateStorageClass(Instruction* inst, modified |= PropagateStorageClass(use, storage_class, seen); } - if (inst->opcode() == SpvOpPhi) { + if (inst->opcode() == spv::Op::OpPhi) { seen->erase(inst->result_id()); } return modified; } switch (inst->opcode()) { - case SpvOpAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpCopyObject: - case SpvOpPhi: - case SpvOpSelect: + case spv::Op::OpAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpCopyObject: + case spv::Op::OpPhi: + case spv::Op::OpSelect: FixInstructionStorageClass(inst, storage_class, seen); return true; - case SpvOpFunctionCall: + case spv::Op::OpFunctionCall: // We cannot be sure of the actual connection between the storage class // of the parameter and the storage class of the result, so we should not // do anything. If the result type needs to be fixed, the function call // should be inlined. return false; - case SpvOpImageTexelPointer: - case SpvOpLoad: - case SpvOpStore: - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: - case SpvOpVariable: - case SpvOpBitcast: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpLoad: + case spv::Op::OpStore: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: + case spv::Op::OpVariable: + case spv::Op::OpBitcast: // Nothing to change for these opcode. The result type is the same // regardless of the storage class of the operand. return false; @@ -109,9 +109,9 @@ bool FixStorageClass::PropagateStorageClass(Instruction* inst, } } -void FixStorageClass::FixInstructionStorageClass(Instruction* inst, - SpvStorageClass storage_class, - std::set* seen) { +void FixStorageClass::FixInstructionStorageClass( + Instruction* inst, spv::StorageClass storage_class, + std::set* seen) { assert(IsPointerResultType(inst) && "The result type of the instruction must be a pointer."); @@ -126,10 +126,10 @@ void FixStorageClass::FixInstructionStorageClass(Instruction* inst, } void FixStorageClass::ChangeResultStorageClass( - Instruction* inst, SpvStorageClass storage_class) const { + Instruction* inst, spv::StorageClass storage_class) const { analysis::TypeManager* type_mgr = context()->get_type_mgr(); Instruction* result_type_inst = get_def_use_mgr()->GetDef(inst->type_id()); - assert(result_type_inst->opcode() == SpvOpTypePointer); + assert(result_type_inst->opcode() == spv::Op::OpTypePointer); uint32_t pointee_type_id = result_type_inst->GetSingleWordInOperand(1); uint32_t new_result_type_id = type_mgr->FindPointerToType(pointee_type_id, storage_class); @@ -147,7 +147,7 @@ bool FixStorageClass::IsPointerResultType(Instruction* inst) { } bool FixStorageClass::IsPointerToStorageClass(Instruction* inst, - SpvStorageClass storage_class) { + spv::StorageClass storage_class) { analysis::TypeManager* type_mgr = context()->get_type_mgr(); analysis::Type* pType = type_mgr->GetType(inst->type_id()); const analysis::Pointer* result_type = pType->AsPointer(); @@ -180,39 +180,39 @@ bool FixStorageClass::PropagateType(Instruction* inst, uint32_t type_id, // particular type, then we want find that type. uint32_t new_type_id = 0; switch (inst->opcode()) { - case SpvOpAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: if (op_idx == 2) { new_type_id = WalkAccessChainType(inst, type_id); } break; - case SpvOpCopyObject: + case spv::Op::OpCopyObject: new_type_id = type_id; break; - case SpvOpPhi: + case spv::Op::OpPhi: if (seen->insert(inst->result_id()).second) { new_type_id = type_id; } break; - case SpvOpSelect: + case spv::Op::OpSelect: if (op_idx > 2) { new_type_id = type_id; } break; - case SpvOpFunctionCall: + case spv::Op::OpFunctionCall: // We cannot be sure of the actual connection between the type // of the parameter and the type of the result, so we should not // do anything. If the result type needs to be fixed, the function call // should be inlined. return false; - case SpvOpLoad: { + case spv::Op::OpLoad: { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); new_type_id = type_inst->GetSingleWordInOperand(1); break; } - case SpvOpStore: { + case spv::Op::OpStore: { uint32_t obj_id = inst->GetSingleWordInOperand(1); Instruction* obj_inst = get_def_use_mgr()->GetDef(obj_id); uint32_t obj_type_id = obj_inst->type_id(); @@ -237,18 +237,18 @@ bool FixStorageClass::PropagateType(Instruction* inst, uint32_t type_id, context()->UpdateDefUse(inst); } } break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: // TODO: May need to expand the copy as we do with the stores. break; - case SpvOpCompositeConstruct: - case SpvOpCompositeExtract: - case SpvOpCompositeInsert: + case spv::Op::OpCompositeConstruct: + case spv::Op::OpCompositeExtract: + case spv::Op::OpCompositeInsert: // TODO: DXC does not seem to generate code that will require changes to // these opcode. The can be implemented when they come up. break; - case SpvOpImageTexelPointer: - case SpvOpBitcast: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpBitcast: // Nothing to change for these opcode. The result type is the same // regardless of the type of the operand. return false; @@ -278,7 +278,7 @@ bool FixStorageClass::PropagateType(Instruction* inst, uint32_t type_id, PropagateType(use.first, new_type_id, use.second, seen); } - if (inst->opcode() == SpvOpPhi) { + if (inst->opcode() == spv::Op::OpPhi) { seen->erase(inst->result_id()); } } @@ -288,12 +288,12 @@ bool FixStorageClass::PropagateType(Instruction* inst, uint32_t type_id, uint32_t FixStorageClass::WalkAccessChainType(Instruction* inst, uint32_t id) { uint32_t start_idx = 0; switch (inst->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: start_idx = 1; break; - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: start_idx = 2; break; default: @@ -302,23 +302,29 @@ uint32_t FixStorageClass::WalkAccessChainType(Instruction* inst, uint32_t id) { } Instruction* orig_type_inst = get_def_use_mgr()->GetDef(id); - assert(orig_type_inst->opcode() == SpvOpTypePointer); + assert(orig_type_inst->opcode() == spv::Op::OpTypePointer); id = orig_type_inst->GetSingleWordInOperand(1); for (uint32_t i = start_idx; i < inst->NumInOperands(); ++i) { Instruction* type_inst = get_def_use_mgr()->GetDef(id); switch (type_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeMatrix: - case SpvOpTypeVector: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeVector: id = type_inst->GetSingleWordInOperand(0); break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const analysis::Constant* index_const = context()->get_constant_mgr()->FindDeclaredConstant( inst->GetSingleWordInOperand(i)); - uint32_t index = index_const->GetU32(); + // It is highly unlikely that any type would have more fields than could + // be indexed by a 32-bit integer, and GetSingleWordInOperand only takes + // a 32-bit value, so we would not be able to handle it anyway. But the + // specification does allow any scalar integer type, treated as signed, + // so we simply downcast the index to 32-bits. + uint32_t index = + static_cast(index_const->GetSignExtendedValue()); id = type_inst->GetSingleWordInOperand(index); break; } @@ -330,8 +336,8 @@ uint32_t FixStorageClass::WalkAccessChainType(Instruction* inst, uint32_t id) { } return context()->get_type_mgr()->FindPointerToType( - id, - static_cast(orig_type_inst->GetSingleWordInOperand(0))); + id, static_cast( + orig_type_inst->GetSingleWordInOperand(0))); } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.h index e72e864a6..6c67acd37 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fix_storage_class.h @@ -48,7 +48,7 @@ class FixStorageClass : public Pass { // appropriate, and propagates the change to the users of |inst| as well. // Returns true of any changes were made. // |seen| is used to track OpPhi instructions that should not be processed. - bool PropagateStorageClass(Instruction* inst, SpvStorageClass storage_class, + bool PropagateStorageClass(Instruction* inst, spv::StorageClass storage_class, std::set* seen); // Changes the storage class of the result of |inst| to |storage_class|. @@ -58,13 +58,13 @@ class FixStorageClass : public Pass { // |seen| is used to track OpPhi instructions that should not be processed by // |PropagateStorageClass| void FixInstructionStorageClass(Instruction* inst, - SpvStorageClass storage_class, + spv::StorageClass storage_class, std::set* seen); // Changes the storage class of the result of |inst| to |storage_class|. The // result type of |inst| must be a pointer. void ChangeResultStorageClass(Instruction* inst, - SpvStorageClass storage_class) const; + spv::StorageClass storage_class) const; // Returns true if the result type of |inst| is a pointer. bool IsPointerResultType(Instruction* inst); @@ -72,7 +72,7 @@ class FixStorageClass : public Pass { // Returns true if the result of |inst| is a pointer to storage class // |storage_class|. bool IsPointerToStorageClass(Instruction* inst, - SpvStorageClass storage_class); + spv::StorageClass storage_class); // Change |inst| to match that operand |op_idx| now has type |type_id|, and // adjust any uses of |inst| accordingly. Returns true if the code changed. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/flatten_decoration_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/flatten_decoration_pass.cpp index f4de9116f..c878c097e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/flatten_decoration_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/flatten_decoration_pass.cpp @@ -49,16 +49,16 @@ Pass::Status FlattenDecorationPass::Process() { // Rely on unordered_map::operator[] to create its entries on first access. for (const auto& inst : annotations) { switch (inst.opcode()) { - case SpvOp::SpvOpDecorationGroup: + case spv::Op::OpDecorationGroup: group_ids.insert(inst.result_id()); break; - case SpvOp::SpvOpGroupDecorate: { + case spv::Op::OpGroupDecorate: { Words& words = normal_uses[inst.GetSingleWordInOperand(0)]; for (uint32_t i = 1; i < inst.NumInOperandWords(); i++) { words.push_back(inst.GetSingleWordInOperand(i)); } } break; - case SpvOp::SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { Words& words = member_uses[inst.GetSingleWordInOperand(0)]; for (uint32_t i = 1; i < inst.NumInOperandWords(); i++) { words.push_back(inst.GetSingleWordInOperand(i)); @@ -77,12 +77,12 @@ Pass::Status FlattenDecorationPass::Process() { // Should we replace this instruction? bool replace = false; switch (inst_iter->opcode()) { - case SpvOp::SpvOpDecorationGroup: - case SpvOp::SpvOpGroupDecorate: - case SpvOp::SpvOpGroupMemberDecorate: + case spv::Op::OpDecorationGroup: + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: replace = true; break; - case SpvOp::SpvOpDecorate: { + case spv::Op::OpDecorate: { // If this decoration targets a group, then replace it // by sets of normal and member decorations. const uint32_t group = inst_iter->GetSingleWordOperand(0); @@ -115,7 +115,7 @@ Pass::Status FlattenDecorationPass::Process() { operands.insert(operands.end(), decoration_operands_iter, inst_iter->end()); std::unique_ptr new_inst(new Instruction( - context(), SpvOp::SpvOpMemberDecorate, 0, 0, operands)); + context(), spv::Op::OpMemberDecorate, 0, 0, operands)); inst_iter = inst_iter.InsertBefore(std::move(new_inst)); ++inst_iter; replace = true; @@ -146,7 +146,7 @@ Pass::Status FlattenDecorationPass::Process() { if (!group_ids.empty()) { for (auto debug_inst_iter = context()->debug2_begin(); debug_inst_iter != context()->debug2_end();) { - if (debug_inst_iter->opcode() == SpvOp::SpvOpName) { + if (debug_inst_iter->opcode() == spv::Op::OpName) { const uint32_t target = debug_inst_iter->GetSingleWordOperand(0); if (group_ids.count(target)) { debug_inst_iter = debug_inst_iter.Erase(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.cpp index 6550fb4fd..942da6835 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.cpp @@ -21,7 +21,6 @@ #include "source/opt/const_folding_rules.h" #include "source/opt/def_use_manager.h" #include "source/opt/folding_rules.h" -#include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" namespace spvtools { @@ -42,23 +41,24 @@ namespace { } // namespace -uint32_t InstructionFolder::UnaryOperate(SpvOp opcode, uint32_t operand) const { +uint32_t InstructionFolder::UnaryOperate(spv::Op opcode, + uint32_t operand) const { switch (opcode) { // Arthimetics - case SpvOp::SpvOpSNegate: { + case spv::Op::OpSNegate: { int32_t s_operand = static_cast(operand); if (s_operand == std::numeric_limits::min()) { return s_operand; } return -s_operand; } - case SpvOp::SpvOpNot: + case spv::Op::OpNot: return ~operand; - case SpvOp::SpvOpLogicalNot: + case spv::Op::OpLogicalNot: return !static_cast(operand); - case SpvOp::SpvOpUConvert: + case spv::Op::OpUConvert: return operand; - case SpvOp::SpvOpSConvert: + case spv::Op::OpSConvert: return operand; default: assert(false && @@ -67,63 +67,11 @@ uint32_t InstructionFolder::UnaryOperate(SpvOp opcode, uint32_t operand) const { } } -uint32_t InstructionFolder::BinaryOperate(SpvOp opcode, uint32_t a, +uint32_t InstructionFolder::BinaryOperate(spv::Op opcode, uint32_t a, uint32_t b) const { switch (opcode) { - // Arthimetics - case SpvOp::SpvOpIAdd: - return a + b; - case SpvOp::SpvOpISub: - return a - b; - case SpvOp::SpvOpIMul: - return a * b; - case SpvOp::SpvOpUDiv: - if (b != 0) { - return a / b; - } else { - // Dividing by 0 is undefined, so we will just pick 0. - return 0; - } - case SpvOp::SpvOpSDiv: - if (b != 0u) { - return (static_cast(a)) / (static_cast(b)); - } else { - // Dividing by 0 is undefined, so we will just pick 0. - return 0; - } - case SpvOp::SpvOpSRem: { - // The sign of non-zero result comes from the first operand: a. This is - // guaranteed by C++11 rules for integer division operator. The division - // result is rounded toward zero, so the result of '%' has the sign of - // the first operand. - if (b != 0u) { - return static_cast(a) % static_cast(b); - } else { - // Remainder when dividing with 0 is undefined, so we will just pick 0. - return 0; - } - } - case SpvOp::SpvOpSMod: { - // The sign of non-zero result comes from the second operand: b - if (b != 0u) { - int32_t rem = BinaryOperate(SpvOp::SpvOpSRem, a, b); - int32_t b_prim = static_cast(b); - return (rem + b_prim) % b_prim; - } else { - // Mod with 0 is undefined, so we will just pick 0. - return 0; - } - } - case SpvOp::SpvOpUMod: - if (b != 0u) { - return (a % b); - } else { - // Mod with 0 is undefined, so we will just pick 0. - return 0; - } - // Shifting - case SpvOp::SpvOpShiftRightLogical: + case spv::Op::OpShiftRightLogical: if (b >= 32) { // This is undefined behaviour when |b| > 32. Choose 0 for consistency. // When |b| == 32, doing the shift in C++ in undefined, but the result @@ -131,7 +79,7 @@ uint32_t InstructionFolder::BinaryOperate(SpvOp opcode, uint32_t a, return 0; } return a >> b; - case SpvOp::SpvOpShiftRightArithmetic: + case spv::Op::OpShiftRightArithmetic: if (b > 32) { // This is undefined behaviour. Choose 0 for consistency. return 0; @@ -146,7 +94,7 @@ uint32_t InstructionFolder::BinaryOperate(SpvOp opcode, uint32_t a, } } return (static_cast(a)) >> b; - case SpvOp::SpvOpShiftLeftLogical: + case spv::Op::OpShiftLeftLogical: if (b >= 32) { // This is undefined behaviour when |b| > 32. Choose 0 for consistency. // When |b| == 32, doing the shift in C++ in undefined, but the result @@ -156,43 +104,43 @@ uint32_t InstructionFolder::BinaryOperate(SpvOp opcode, uint32_t a, return a << b; // Bitwise operations - case SpvOp::SpvOpBitwiseOr: + case spv::Op::OpBitwiseOr: return a | b; - case SpvOp::SpvOpBitwiseAnd: + case spv::Op::OpBitwiseAnd: return a & b; - case SpvOp::SpvOpBitwiseXor: + case spv::Op::OpBitwiseXor: return a ^ b; // Logical - case SpvOp::SpvOpLogicalEqual: + case spv::Op::OpLogicalEqual: return (static_cast(a)) == (static_cast(b)); - case SpvOp::SpvOpLogicalNotEqual: + case spv::Op::OpLogicalNotEqual: return (static_cast(a)) != (static_cast(b)); - case SpvOp::SpvOpLogicalOr: + case spv::Op::OpLogicalOr: return (static_cast(a)) || (static_cast(b)); - case SpvOp::SpvOpLogicalAnd: + case spv::Op::OpLogicalAnd: return (static_cast(a)) && (static_cast(b)); // Comparison - case SpvOp::SpvOpIEqual: + case spv::Op::OpIEqual: return a == b; - case SpvOp::SpvOpINotEqual: + case spv::Op::OpINotEqual: return a != b; - case SpvOp::SpvOpULessThan: + case spv::Op::OpULessThan: return a < b; - case SpvOp::SpvOpSLessThan: + case spv::Op::OpSLessThan: return (static_cast(a)) < (static_cast(b)); - case SpvOp::SpvOpUGreaterThan: + case spv::Op::OpUGreaterThan: return a > b; - case SpvOp::SpvOpSGreaterThan: + case spv::Op::OpSGreaterThan: return (static_cast(a)) > (static_cast(b)); - case SpvOp::SpvOpULessThanEqual: + case spv::Op::OpULessThanEqual: return a <= b; - case SpvOp::SpvOpSLessThanEqual: + case spv::Op::OpSLessThanEqual: return (static_cast(a)) <= (static_cast(b)); - case SpvOp::SpvOpUGreaterThanEqual: + case spv::Op::OpUGreaterThanEqual: return a >= b; - case SpvOp::SpvOpSGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: return (static_cast(a)) >= (static_cast(b)); default: assert(false && @@ -201,10 +149,10 @@ uint32_t InstructionFolder::BinaryOperate(SpvOp opcode, uint32_t a, } } -uint32_t InstructionFolder::TernaryOperate(SpvOp opcode, uint32_t a, uint32_t b, - uint32_t c) const { +uint32_t InstructionFolder::TernaryOperate(spv::Op opcode, uint32_t a, + uint32_t b, uint32_t c) const { switch (opcode) { - case SpvOp::SpvOpSelect: + case spv::Op::OpSelect: return (static_cast(a)) ? b : c; default: assert(false && @@ -214,7 +162,7 @@ uint32_t InstructionFolder::TernaryOperate(SpvOp opcode, uint32_t a, uint32_t b, } uint32_t InstructionFolder::OperateWords( - SpvOp opcode, const std::vector& operand_words) const { + spv::Op opcode, const std::vector& operand_words) const { switch (operand_words.size()) { case 1: return UnaryOperate(opcode, operand_words.front()); @@ -233,7 +181,7 @@ bool InstructionFolder::FoldInstructionInternal(Instruction* inst) const { auto identity_map = [](uint32_t id) { return id; }; Instruction* folded_inst = FoldInstructionToConstant(inst, identity_map); if (folded_inst != nullptr) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {folded_inst->result_id()}}}); return true; } @@ -256,7 +204,7 @@ bool InstructionFolder::FoldInstructionInternal(Instruction* inst) const { // result in 32 bit word. Scalar constants with longer than 32-bit width are // not accepted in this function. uint32_t InstructionFolder::FoldScalars( - SpvOp opcode, + spv::Op opcode, const std::vector& operands) const { assert(IsFoldableOpcode(opcode) && "Unhandled instruction opcode in FoldScalars"); @@ -282,7 +230,7 @@ uint32_t InstructionFolder::FoldScalars( bool InstructionFolder::FoldBinaryIntegerOpToConstant( Instruction* inst, const std::function& id_map, uint32_t* result) const { - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); analysis::ConstantManager* const_manger = context_->get_constant_mgr(); uint32_t ids[2]; @@ -300,7 +248,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( switch (opcode) { // Arthimetics - case SpvOp::SpvOpIMul: + case spv::Op::OpIMul: for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr && constants[i]->IsZero()) { *result = 0; @@ -308,11 +256,11 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( } } break; - case SpvOp::SpvOpUDiv: - case SpvOp::SpvOpSDiv: - case SpvOp::SpvOpSRem: - case SpvOp::SpvOpSMod: - case SpvOp::SpvOpUMod: + case spv::Op::OpUDiv: + case spv::Op::OpSDiv: + case spv::Op::OpSRem: + case spv::Op::OpSMod: + case spv::Op::OpUMod: // This changes undefined behaviour (ie divide by 0) into a 0. for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr && constants[i]->IsZero()) { @@ -323,8 +271,8 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( break; // Shifting - case SpvOp::SpvOpShiftRightLogical: - case SpvOp::SpvOpShiftLeftLogical: + case spv::Op::OpShiftRightLogical: + case spv::Op::OpShiftLeftLogical: if (constants[1] != nullptr) { // When shifting by a value larger than the size of the result, the // result is undefined. We are setting the undefined behaviour to a @@ -339,7 +287,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( break; // Bitwise operations - case SpvOp::SpvOpBitwiseOr: + case spv::Op::OpBitwiseOr: for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr) { // TODO: Change the mask against a value based on the bit width of the @@ -353,7 +301,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( } } break; - case SpvOp::SpvOpBitwiseAnd: + case spv::Op::OpBitwiseAnd: for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr) { if (constants[i]->IsZero()) { @@ -365,7 +313,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( break; // Comparison - case SpvOp::SpvOpULessThan: + case spv::Op::OpULessThan: if (constants[0] != nullptr && constants[0]->GetU32BitValue() == UINT32_MAX) { *result = false; @@ -376,7 +324,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpSLessThan: + case spv::Op::OpSLessThan: if (constants[0] != nullptr && constants[0]->GetS32BitValue() == INT32_MAX) { *result = false; @@ -388,7 +336,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpUGreaterThan: + case spv::Op::OpUGreaterThan: if (constants[0] != nullptr && constants[0]->IsZero()) { *result = false; return true; @@ -399,7 +347,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpSGreaterThan: + case spv::Op::OpSGreaterThan: if (constants[0] != nullptr && constants[0]->GetS32BitValue() == INT32_MIN) { *result = false; @@ -411,7 +359,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpULessThanEqual: + case spv::Op::OpULessThanEqual: if (constants[0] != nullptr && constants[0]->IsZero()) { *result = true; return true; @@ -422,7 +370,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpSLessThanEqual: + case spv::Op::OpSLessThanEqual: if (constants[0] != nullptr && constants[0]->GetS32BitValue() == INT32_MIN) { *result = true; @@ -434,7 +382,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpUGreaterThanEqual: + case spv::Op::OpUGreaterThanEqual: if (constants[0] != nullptr && constants[0]->GetU32BitValue() == UINT32_MAX) { *result = true; @@ -445,7 +393,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( return true; } break; - case SpvOp::SpvOpSGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: if (constants[0] != nullptr && constants[0]->GetS32BitValue() == INT32_MAX) { *result = true; @@ -466,7 +414,7 @@ bool InstructionFolder::FoldBinaryIntegerOpToConstant( bool InstructionFolder::FoldBinaryBooleanOpToConstant( Instruction* inst, const std::function& id_map, uint32_t* result) const { - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); analysis::ConstantManager* const_manger = context_->get_constant_mgr(); uint32_t ids[2]; @@ -484,7 +432,7 @@ bool InstructionFolder::FoldBinaryBooleanOpToConstant( switch (opcode) { // Logical - case SpvOp::SpvOpLogicalOr: + case spv::Op::OpLogicalOr: for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr) { if (constants[i]->value()) { @@ -494,7 +442,7 @@ bool InstructionFolder::FoldBinaryBooleanOpToConstant( } } break; - case SpvOp::SpvOpLogicalAnd: + case spv::Op::OpLogicalAnd: for (uint32_t i = 0; i < 2; i++) { if (constants[i] != nullptr) { if (!constants[i]->value()) { @@ -526,7 +474,7 @@ bool InstructionFolder::FoldIntegerOpToConstant( } std::vector InstructionFolder::FoldVectors( - SpvOp opcode, uint32_t num_dims, + spv::Op opcode, uint32_t num_dims, const std::vector& operands) const { assert(IsFoldableOpcode(opcode) && "Unhandled instruction opcode in FoldVectors"); @@ -540,7 +488,7 @@ std::vector InstructionFolder::FoldVectors( // in 32-bit words here. The reason of not using FoldScalars() here // is that we do not create temporary null constants as components // when the vector operand is a NullConstant because Constant creation - // may need extra checks for the validity and that is not manageed in + // may need extra checks for the validity and that is not managed in // here. if (const analysis::ScalarConstant* scalar_component = vector_operand->GetComponents().at(d)->AsScalarConstant()) { @@ -570,44 +518,44 @@ std::vector InstructionFolder::FoldVectors( return result; } -bool InstructionFolder::IsFoldableOpcode(SpvOp opcode) const { +bool InstructionFolder::IsFoldableOpcode(spv::Op opcode) const { // NOTE: Extend to more opcodes as new cases are handled in the folder // functions. switch (opcode) { - case SpvOp::SpvOpBitwiseAnd: - case SpvOp::SpvOpBitwiseOr: - case SpvOp::SpvOpBitwiseXor: - case SpvOp::SpvOpIAdd: - case SpvOp::SpvOpIEqual: - case SpvOp::SpvOpIMul: - case SpvOp::SpvOpINotEqual: - case SpvOp::SpvOpISub: - case SpvOp::SpvOpLogicalAnd: - case SpvOp::SpvOpLogicalEqual: - case SpvOp::SpvOpLogicalNot: - case SpvOp::SpvOpLogicalNotEqual: - case SpvOp::SpvOpLogicalOr: - case SpvOp::SpvOpNot: - case SpvOp::SpvOpSDiv: - case SpvOp::SpvOpSelect: - case SpvOp::SpvOpSGreaterThan: - case SpvOp::SpvOpSGreaterThanEqual: - case SpvOp::SpvOpShiftLeftLogical: - case SpvOp::SpvOpShiftRightArithmetic: - case SpvOp::SpvOpShiftRightLogical: - case SpvOp::SpvOpSLessThan: - case SpvOp::SpvOpSLessThanEqual: - case SpvOp::SpvOpSMod: - case SpvOp::SpvOpSNegate: - case SpvOp::SpvOpSRem: - case SpvOp::SpvOpSConvert: - case SpvOp::SpvOpUConvert: - case SpvOp::SpvOpUDiv: - case SpvOp::SpvOpUGreaterThan: - case SpvOp::SpvOpUGreaterThanEqual: - case SpvOp::SpvOpULessThan: - case SpvOp::SpvOpULessThanEqual: - case SpvOp::SpvOpUMod: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseXor: + case spv::Op::OpIAdd: + case spv::Op::OpIEqual: + case spv::Op::OpIMul: + case spv::Op::OpINotEqual: + case spv::Op::OpISub: + case spv::Op::OpLogicalAnd: + case spv::Op::OpLogicalEqual: + case spv::Op::OpLogicalNot: + case spv::Op::OpLogicalNotEqual: + case spv::Op::OpLogicalOr: + case spv::Op::OpNot: + case spv::Op::OpSDiv: + case spv::Op::OpSelect: + case spv::Op::OpSGreaterThan: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpShiftLeftLogical: + case spv::Op::OpShiftRightArithmetic: + case spv::Op::OpShiftRightLogical: + case spv::Op::OpSLessThan: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpSMod: + case spv::Op::OpSNegate: + case spv::Op::OpSRem: + case spv::Op::OpSConvert: + case spv::Op::OpUConvert: + case spv::Op::OpUDiv: + case spv::Op::OpUGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpULessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpUMod: return true; default: return false; @@ -627,7 +575,7 @@ Instruction* InstructionFolder::FoldInstructionToConstant( Instruction* inst, std::function id_map) const { analysis::ConstantManager* const_mgr = context_->get_constant_mgr(); - if (!inst->IsFoldableByFoldScalar() && + if (!inst->IsFoldableByFoldScalar() && !inst->IsFoldableByFoldVector() && !GetConstantFoldingRules().HasFoldingRule(inst)) { return nullptr; } @@ -662,45 +610,87 @@ Instruction* InstructionFolder::FoldInstructionToConstant( } } - uint32_t result_val = 0; bool successful = false; + // If all parameters are constant, fold the instruction to a constant. - if (!missing_constants && inst->IsFoldableByFoldScalar()) { - result_val = FoldScalars(inst->opcode(), constants); - successful = true; - } + if (inst->IsFoldableByFoldScalar()) { + uint32_t result_val = 0; - if (!successful && inst->IsFoldableByFoldScalar()) { - successful = FoldIntegerOpToConstant(inst, id_map, &result_val); - } + if (!missing_constants) { + result_val = FoldScalars(inst->opcode(), constants); + successful = true; + } + + if (!successful) { + successful = FoldIntegerOpToConstant(inst, id_map, &result_val); + } + + if (successful) { + const analysis::Constant* result_const = + const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); + Instruction* folded_inst = + const_mgr->GetDefiningInstruction(result_const, inst->type_id()); + return folded_inst; + } + } else if (inst->IsFoldableByFoldVector()) { + std::vector result_val; + + if (!missing_constants) { + if (Instruction* inst_type = + context_->get_def_use_mgr()->GetDef(inst->type_id())) { + result_val = FoldVectors( + inst->opcode(), inst_type->GetSingleWordInOperand(1), constants); + successful = true; + } + } - if (successful) { - const analysis::Constant* result_const = - const_mgr->GetConstant(const_mgr->GetType(inst), {result_val}); - Instruction* folded_inst = - const_mgr->GetDefiningInstruction(result_const, inst->type_id()); - return folded_inst; + if (successful) { + const analysis::Constant* result_const = + const_mgr->GetNumericVectorConstantWithWords( + const_mgr->GetType(inst)->AsVector(), result_val); + Instruction* folded_inst = + const_mgr->GetDefiningInstruction(result_const, inst->type_id()); + return folded_inst; + } } + return nullptr; } bool InstructionFolder::IsFoldableType(Instruction* type_inst) const { + return IsFoldableScalarType(type_inst) || IsFoldableVectorType(type_inst); +} + +bool InstructionFolder::IsFoldableScalarType(Instruction* type_inst) const { // Support 32-bit integers. - if (type_inst->opcode() == SpvOpTypeInt) { + if (type_inst->opcode() == spv::Op::OpTypeInt) { return type_inst->GetSingleWordInOperand(0) == 32; } // Support booleans. - if (type_inst->opcode() == SpvOpTypeBool) { + if (type_inst->opcode() == spv::Op::OpTypeBool) { return true; } // Nothing else yet. return false; } +bool InstructionFolder::IsFoldableVectorType(Instruction* type_inst) const { + // Support vectors with foldable components + if (type_inst->opcode() == spv::Op::OpTypeVector) { + uint32_t component_type_id = type_inst->GetSingleWordInOperand(0); + Instruction* def_component_type = + context_->get_def_use_mgr()->GetDef(component_type_id); + return def_component_type != nullptr && + IsFoldableScalarType(def_component_type); + } + // Nothing else yet. + return false; +} + bool InstructionFolder::FoldInstruction(Instruction* inst) const { bool modified = false; Instruction* folded_inst(inst); - while (folded_inst->opcode() != SpvOpCopyObject && + while (folded_inst->opcode() != spv::Op::OpCopyObject && FoldInstructionInternal(&*folded_inst)) { modified = true; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.h index 9e7c4705e..42da65e4d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold.h @@ -55,7 +55,7 @@ class InstructionFolder { // IsFoldableOpcode test. If any error occurs during folding, the folder will // fail with a call to assert. uint32_t FoldScalars( - SpvOp opcode, + spv::Op opcode, const std::vector& operands) const; // Returns the result of performing an operation with the given |opcode| over @@ -72,12 +72,12 @@ class InstructionFolder { // IsFoldableOpcode test. If any error occurs during folding, the folder will // fail with a call to assert. std::vector FoldVectors( - SpvOp opcode, uint32_t num_dims, + spv::Op opcode, uint32_t num_dims, const std::vector& operands) const; // Returns true if |opcode| represents an operation handled by FoldScalars or // FoldVectors. - bool IsFoldableOpcode(SpvOp opcode) const; + bool IsFoldableOpcode(spv::Op opcode) const; // Returns true if |cst| is supported by FoldScalars and FoldVectors. bool IsFoldableConstant(const analysis::Constant* cst) const; @@ -86,6 +86,14 @@ class InstructionFolder { // result type is |type_inst|. bool IsFoldableType(Instruction* type_inst) const; + // Returns true if |FoldInstructionToConstant| could fold an instruction whose + // result type is |type_inst|. + bool IsFoldableScalarType(Instruction* type_inst) const; + + // Returns true if |FoldInstructionToConstant| could fold an instruction whose + // result type is |type_inst|. + bool IsFoldableVectorType(Instruction* type_inst) const; + // Tries to fold |inst| to a single constant, when the input ids to |inst| // have been substituted using |id_map|. Returns a pointer to the OpConstant* // instruction if successful. If necessary, a new constant instruction is @@ -126,22 +134,22 @@ class InstructionFolder { // Returns the single-word result from performing the given unary operation on // the operand value which is passed in as a 32-bit word. - uint32_t UnaryOperate(SpvOp opcode, uint32_t operand) const; + uint32_t UnaryOperate(spv::Op opcode, uint32_t operand) const; // Returns the single-word result from performing the given binary operation // on the operand values which are passed in as two 32-bit word. - uint32_t BinaryOperate(SpvOp opcode, uint32_t a, uint32_t b) const; + uint32_t BinaryOperate(spv::Op opcode, uint32_t a, uint32_t b) const; // Returns the single-word result from performing the given ternary operation // on the operand values which are passed in as three 32-bit word. - uint32_t TernaryOperate(SpvOp opcode, uint32_t a, uint32_t b, + uint32_t TernaryOperate(spv::Op opcode, uint32_t a, uint32_t b, uint32_t c) const; // Returns the single-word result from performing the given operation on the // operand words. This only works with 32-bit operations and uses boolean // convention that 0u is false, and anything else is boolean true. // TODO(qining): Support operands other than 32-bit wide. - uint32_t OperateWords(SpvOp opcode, + uint32_t OperateWords(spv::Op opcode, const std::vector& operand_words) const; bool FoldInstructionInternal(Instruction* inst) const; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp index 8ab717ea8..c568027d2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.cpp @@ -15,12 +15,9 @@ #include "source/opt/fold_spec_constant_op_and_composite_pass.h" #include -#include #include #include "source/opt/constants.h" -#include "source/opt/fold.h" -#include "source/opt/ir_context.h" #include "source/util/make_unique.h" namespace spvtools { @@ -28,6 +25,7 @@ namespace opt { Pass::Status FoldSpecConstantOpAndCompositePass::Process() { bool modified = false; + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); // Traverse through all the constant defining instructions. For Normal // Constants whose values are determined and do not depend on OpUndef // instructions, records their values in two internal maps: id_to_const_val_ @@ -62,17 +60,17 @@ Pass::Status FoldSpecConstantOpAndCompositePass::Process() { // used in OpSpecConstant{Composite|Op} instructions. // TODO(qining): If the constant or its type has decoration, we may need // to skip it. - if (context()->get_constant_mgr()->GetType(inst) && - !context()->get_constant_mgr()->GetType(inst)->decoration_empty()) + if (const_mgr->GetType(inst) && + !const_mgr->GetType(inst)->decoration_empty()) continue; - switch (SpvOp opcode = inst->opcode()) { + switch (spv::Op opcode = inst->opcode()) { // Records the values of Normal Constants. - case SpvOp::SpvOpConstantTrue: - case SpvOp::SpvOpConstantFalse: - case SpvOp::SpvOpConstant: - case SpvOp::SpvOpConstantNull: - case SpvOp::SpvOpConstantComposite: - case SpvOp::SpvOpSpecConstantComposite: { + case spv::Op::OpConstantTrue: + case spv::Op::OpConstantFalse: + case spv::Op::OpConstant: + case spv::Op::OpConstantNull: + case spv::Op::OpConstantComposite: + case spv::Op::OpSpecConstantComposite: { // A Constant instance will be created if the given instruction is a // Normal Constant whose value(s) are fixed. Note that for a composite // Spec Constant defined with OpSpecConstantComposite instruction, if @@ -80,15 +78,14 @@ Pass::Status FoldSpecConstantOpAndCompositePass::Process() { // Constant will be turned in to a Normal Constant. In that case, a // Constant instance should also be created successfully and recorded // in the id_to_const_val_ and const_val_to_id_ mapps. - if (auto const_value = - context()->get_constant_mgr()->GetConstantFromInst(inst)) { + if (auto const_value = const_mgr->GetConstantFromInst(inst)) { // Need to replace the OpSpecConstantComposite instruction with a // corresponding OpConstantComposite instruction. - if (opcode == SpvOp::SpvOpSpecConstantComposite) { - inst->SetOpcode(SpvOp::SpvOpConstantComposite); + if (opcode == spv::Op::OpSpecConstantComposite) { + inst->SetOpcode(spv::Op::OpConstantComposite); modified = true; } - context()->get_constant_mgr()->MapConstantToInst(const_value, inst); + const_mgr->MapConstantToInst(const_value, inst); } break; } @@ -99,7 +96,7 @@ Pass::Status FoldSpecConstantOpAndCompositePass::Process() { // Constants will be added to id_to_const_val_ and const_val_to_id_ so // that we can use the new Normal Constants when folding following Spec // Constants. - case SpvOp::SpvOpSpecConstantOp: + case spv::Op::OpSpecConstantOp: modified |= ProcessOpSpecConstantOp(&inst_iter); break; default: @@ -115,23 +112,12 @@ bool FoldSpecConstantOpAndCompositePass::ProcessOpSpecConstantOp( Instruction* folded_inst = nullptr; assert(inst->GetInOperand(0).type == SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER && - "The first in-operand of OpSpecContantOp instruction must be of " + "The first in-operand of OpSpecConstantOp instruction must be of " "SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER type"); - switch (static_cast(inst->GetSingleWordInOperand(0))) { - case SpvOp::SpvOpCompositeExtract: - case SpvOp::SpvOpVectorShuffle: - case SpvOp::SpvOpCompositeInsert: - case SpvOp::SpvOpQuantizeToF16: - folded_inst = FoldWithInstructionFolder(pos); - break; - default: - // TODO: This should use the instruction folder as well, but some folding - // rules are missing. - - // Component-wise operations. - folded_inst = DoComponentWiseOperation(pos); - break; + folded_inst = FoldWithInstructionFolder(pos); + if (!folded_inst) { + folded_inst = DoComponentWiseOperation(pos); } if (!folded_inst) return false; @@ -144,17 +130,9 @@ bool FoldSpecConstantOpAndCompositePass::ProcessOpSpecConstantOp( return true; } -uint32_t FoldSpecConstantOpAndCompositePass::GetTypeComponent( - uint32_t typeId, uint32_t element) const { - Instruction* type = context()->get_def_use_mgr()->GetDef(typeId); - uint32_t subtype = type->GetTypeComponent(element); - assert(subtype != 0); - - return subtype; -} - Instruction* FoldSpecConstantOpAndCompositePass::FoldWithInstructionFolder( Module::inst_iterator* inst_iter_ptr) { + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); // If one of operands to the instruction is not a // constant, then we cannot fold this spec constant. for (uint32_t i = 1; i < (*inst_iter_ptr)->NumInOperands(); i++) { @@ -164,7 +142,7 @@ Instruction* FoldSpecConstantOpAndCompositePass::FoldWithInstructionFolder( continue; } uint32_t id = operand.words[0]; - if (context()->get_constant_mgr()->FindDeclaredConstant(id) == nullptr) { + if (const_mgr->FindDeclaredConstant(id) == nullptr) { return nullptr; } } @@ -173,7 +151,7 @@ Instruction* FoldSpecConstantOpAndCompositePass::FoldWithInstructionFolder( // instruction and pass it to the instruction folder. std::unique_ptr inst((*inst_iter_ptr)->Clone(context())); inst->SetOpcode( - static_cast((*inst_iter_ptr)->GetSingleWordInOperand(0))); + static_cast((*inst_iter_ptr)->GetSingleWordInOperand(0))); inst->RemoveOperand(2); // We want the current instruction to be replaced by an |OpConstant*| @@ -187,8 +165,9 @@ Instruction* FoldSpecConstantOpAndCompositePass::FoldWithInstructionFolder( Instruction* new_const_inst = context()->get_instruction_folder().FoldInstructionToConstant( inst.get(), identity_map); - assert(new_const_inst != nullptr && - "Failed to fold instruction that must be folded."); + + // new_const_inst == null indicates we cannot fold this spec constant + if (!new_const_inst) return nullptr; // Get the instruction before |pos| to insert after. |pos| cannot be the // first instruction in the list because its type has to come first. @@ -211,89 +190,10 @@ Instruction* FoldSpecConstantOpAndCompositePass::FoldWithInstructionFolder( new_const_inst->InsertAfter(insert_pos); get_def_use_mgr()->AnalyzeInstDefUse(new_const_inst); } + const_mgr->MapInst(new_const_inst); return new_const_inst; } -Instruction* FoldSpecConstantOpAndCompositePass::DoVectorShuffle( - Module::inst_iterator* pos) { - Instruction* inst = &**pos; - analysis::Vector* result_vec_type = - context()->get_constant_mgr()->GetType(inst)->AsVector(); - assert(inst->NumInOperands() - 1 > 2 && - "OpSpecConstantOp DoVectorShuffle instruction requires more than 2 " - "operands (2 vector ids and at least one literal operand"); - assert(result_vec_type && - "The result of VectorShuffle must be of type vector"); - - // A temporary null constants that can be used as the components of the result - // vector. This is needed when any one of the vector operands are null - // constant. - const analysis::Constant* null_component_constants = nullptr; - - // Get a concatenated vector of scalar constants. The vector should be built - // with the components from the first and the second operand of VectorShuffle. - std::vector concatenated_components; - // Note that for OpSpecConstantOp, the second in-operand is the first id - // operand. The first in-operand is the spec opcode. - for (uint32_t i : {1, 2}) { - assert(inst->GetInOperand(i).type == SPV_OPERAND_TYPE_ID && - "The vector operand must have a SPV_OPERAND_TYPE_ID type"); - uint32_t operand_id = inst->GetSingleWordInOperand(i); - auto operand_const = - context()->get_constant_mgr()->FindDeclaredConstant(operand_id); - if (!operand_const) return nullptr; - const analysis::Type* operand_type = operand_const->type(); - assert(operand_type->AsVector() && - "The first two operand of VectorShuffle must be of vector type"); - if (auto vec_const = operand_const->AsVectorConstant()) { - // case 1: current operand is a non-null vector constant. - concatenated_components.insert(concatenated_components.end(), - vec_const->GetComponents().begin(), - vec_const->GetComponents().end()); - } else if (operand_const->AsNullConstant()) { - // case 2: current operand is a null vector constant. Create a temporary - // null scalar constant as the component. - if (!null_component_constants) { - const analysis::Type* component_type = - operand_type->AsVector()->element_type(); - null_component_constants = - context()->get_constant_mgr()->GetConstant(component_type, {}); - } - // Append the null scalar consts to the concatenated components - // vector. - concatenated_components.insert(concatenated_components.end(), - operand_type->AsVector()->element_count(), - null_component_constants); - } else { - // no other valid cases - return nullptr; - } - } - // Create null component constants if there are any. The component constants - // must be added to the module before the dependee composite constants to - // satisfy SSA def-use dominance. - if (null_component_constants) { - context()->get_constant_mgr()->BuildInstructionAndAddToModule( - null_component_constants, pos); - } - // Create the new vector constant with the selected components. - std::vector selected_components; - for (uint32_t i = 3; i < inst->NumInOperands(); i++) { - assert(inst->GetInOperand(i).type == SPV_OPERAND_TYPE_LITERAL_INTEGER && - "The literal operand must of type SPV_OPERAND_TYPE_LITERAL_INTEGER"); - uint32_t literal = inst->GetSingleWordInOperand(i); - assert(literal < concatenated_components.size() && - "Literal index out of bound of the concatenated vector"); - selected_components.push_back(concatenated_components[literal]); - } - auto new_vec_const = MakeUnique( - result_vec_type, selected_components); - auto reg_vec_const = - context()->get_constant_mgr()->RegisterConstant(std::move(new_vec_const)); - return context()->get_constant_mgr()->BuildInstructionAndAddToModule( - reg_vec_const, pos); -} - namespace { // A helper function to check the type for component wise operations. Returns // true if the type: @@ -374,9 +274,9 @@ utils::SmallVector EncodeIntegerAsWords(const analysis::Type& type, Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( Module::inst_iterator* pos) { const Instruction* inst = &**pos; - const analysis::Type* result_type = - context()->get_constant_mgr()->GetType(inst); - SpvOp spec_opcode = static_cast(inst->GetSingleWordInOperand(0)); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + const analysis::Type* result_type = const_mgr->GetType(inst); + spv::Op spec_opcode = static_cast(inst->GetSingleWordInOperand(0)); // Check and collect operands. std::vector operands; @@ -400,10 +300,9 @@ Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( // Scalar operation const uint32_t result_val = context()->get_instruction_folder().FoldScalars(spec_opcode, operands); - auto result_const = context()->get_constant_mgr()->GetConstant( + auto result_const = const_mgr->GetConstant( result_type, EncodeIntegerAsWords(*result_type, result_val)); - return context()->get_constant_mgr()->BuildInstructionAndAddToModule( - result_const, pos); + return const_mgr->BuildInstructionAndAddToModule(result_const, pos); } else if (result_type->AsVector()) { // Vector operation const analysis::Type* element_type = @@ -414,11 +313,10 @@ Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( operands); std::vector result_vector_components; for (const uint32_t r : result_vec) { - if (auto rc = context()->get_constant_mgr()->GetConstant( + if (auto rc = const_mgr->GetConstant( element_type, EncodeIntegerAsWords(*element_type, r))) { result_vector_components.push_back(rc); - if (!context()->get_constant_mgr()->BuildInstructionAndAddToModule( - rc, pos)) { + if (!const_mgr->BuildInstructionAndAddToModule(rc, pos)) { assert(false && "Failed to build and insert constant declaring instruction " "for the given vector component constant"); @@ -429,10 +327,8 @@ Instruction* FoldSpecConstantOpAndCompositePass::DoComponentWiseOperation( } auto new_vec_const = MakeUnique( result_type->AsVector(), result_vector_components); - auto reg_vec_const = context()->get_constant_mgr()->RegisterConstant( - std::move(new_vec_const)); - return context()->get_constant_mgr()->BuildInstructionAndAddToModule( - reg_vec_const, pos); + auto reg_vec_const = const_mgr->RegisterConstant(std::move(new_vec_const)); + return const_mgr->BuildInstructionAndAddToModule(reg_vec_const, pos); } else { // Cannot process invalid component wise operation. The result of component // wise operation must be of integer or bool scalar or vector of diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h index 361d3cacb..9a8fb403d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/fold_spec_constant_op_and_composite_pass.h @@ -58,22 +58,11 @@ class FoldSpecConstantOpAndCompositePass : public Pass { // |inst_iter_ptr| using the instruction folder. Instruction* FoldWithInstructionFolder(Module::inst_iterator* inst_iter_ptr); - // Try to fold the OpSpecConstantOp VectorShuffle instruction pointed by the - // given instruction iterator to a normal constant defining instruction. - // Returns the pointer to the new constant defining instruction if succeeded. - // Otherwise return nullptr. - Instruction* DoVectorShuffle(Module::inst_iterator* inst_iter_ptr); - // Try to fold the OpSpecConstantOp instruction // pointed by the given instruction iterator to a normal constant defining // instruction. Returns the pointer to the new constant defining instruction // if succeeded, otherwise return nullptr. Instruction* DoComponentWiseOperation(Module::inst_iterator* inst_iter_ptr); - - // Returns the |element|'th subtype of |type|. - // - // |type| must be a composite type. - uint32_t GetTypeComponent(uint32_t type, uint32_t element) const; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.cpp index 4904f1862..5c68e291c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.cpp @@ -14,7 +14,6 @@ #include "source/opt/folding_rules.h" -#include #include #include #include @@ -27,15 +26,15 @@ namespace spvtools { namespace opt { namespace { -const uint32_t kExtractCompositeIdInIdx = 0; -const uint32_t kInsertObjectIdInIdx = 0; -const uint32_t kInsertCompositeIdInIdx = 1; -const uint32_t kExtInstSetIdInIdx = 0; -const uint32_t kExtInstInstructionInIdx = 1; -const uint32_t kFMixXIdInIdx = 2; -const uint32_t kFMixYIdInIdx = 3; -const uint32_t kFMixAIdInIdx = 4; -const uint32_t kStoreObjectInIdx = 1; +constexpr uint32_t kExtractCompositeIdInIdx = 0; +constexpr uint32_t kInsertObjectIdInIdx = 0; +constexpr uint32_t kInsertCompositeIdInIdx = 1; +constexpr uint32_t kExtInstSetIdInIdx = 0; +constexpr uint32_t kExtInstInstructionInIdx = 1; +constexpr uint32_t kFMixXIdInIdx = 2; +constexpr uint32_t kFMixYIdInIdx = 3; +constexpr uint32_t kFMixAIdInIdx = 4; +constexpr uint32_t kStoreObjectInIdx = 1; // Some image instructions may contain an "image operands" argument. // Returns the operand index for the "image operands". @@ -43,33 +42,33 @@ const uint32_t kStoreObjectInIdx = 1; int32_t ImageOperandsMaskInOperandIndex(Instruction* inst) { const auto opcode = inst->opcode(); switch (opcode) { - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageFetch: - case SpvOpImageRead: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseFetch: - case SpvOpImageSparseRead: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageFetch: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseFetch: + case spv::Op::OpImageSparseRead: return inst->NumOperands() > 4 ? 2 : -1; - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageGather: - case SpvOpImageDrefGather: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: - case SpvOpImageSparseGather: - case SpvOpImageSparseDrefGather: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: return inst->NumOperands() > 5 ? 3 : -1; - case SpvOpImageWrite: + case spv::Op::OpImageWrite: return inst->NumOperands() > 3 ? 3 : -1; default: return -1; @@ -136,25 +135,28 @@ std::vector GetWordsFromScalarIntConstant( const analysis::IntConstant* c) { assert(c != nullptr); uint32_t width = c->type()->AsInteger()->width(); - assert(width == 32 || width == 64); + assert(width == 8 || width == 16 || width == 32 || width == 64); if (width == 64) { uint64_t uval = static_cast(c->GetU64()); return ExtractInts(uval); } - return {c->GetU32()}; + // Section 2.2.1 of the SPIR-V spec guarantees that all integer types + // smaller than 32-bits are automatically zero or sign extended to 32-bits. + return {c->GetU32BitValue()}; } std::vector GetWordsFromScalarFloatConstant( const analysis::FloatConstant* c) { assert(c != nullptr); uint32_t width = c->type()->AsFloat()->width(); - assert(width == 32 || width == 64); + assert(width == 16 || width == 32 || width == 64); if (width == 64) { utils::FloatProxy result(c->GetDouble()); return result.GetWords(); } - utils::FloatProxy result(c->GetFloat()); - return result.GetWords(); + // Section 2.2.1 of the SPIR-V spec guarantees that all floating-point types + // smaller than 32-bits are automatically zero extended to 32-bits. + return {c->GetU32BitValue()}; } std::vector GetWordsFromNumericScalarOrVectorConstant( @@ -277,6 +279,11 @@ uint32_t Reciprocal(analysis::ConstantManager* const_mgr, uint32_t width = c->type()->AsFloat()->width(); assert(width == 32 || width == 64); std::vector words; + + if (c->IsZero()) { + return 0; + } + if (width == 64) { spvtools::utils::FloatProxy result(1.0 / c->GetDouble()); if (!IsValidResult(result.getAsFloat())) return 0; @@ -296,7 +303,7 @@ uint32_t Reciprocal(analysis::ConstantManager* const_mgr, FoldingRule ReciprocalFDiv() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFDiv); + assert(inst->opcode() == spv::Op::OpFDiv); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -325,7 +332,7 @@ FoldingRule ReciprocalFDiv() { // Don't fold a null constant. return false; } - inst->SetOpcode(SpvOpFMul); + inst->SetOpcode(spv::Op::OpFMul); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0u)}}, {SPV_OPERAND_TYPE_ID, {id}}}); @@ -340,7 +347,8 @@ FoldingRule ReciprocalFDiv() { FoldingRule MergeNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + assert(inst->opcode() == spv::Op::OpFNegate || + inst->opcode() == spv::Op::OpSNegate); (void)constants; const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -354,7 +362,7 @@ FoldingRule MergeNegateArithmetic() { if (op_inst->opcode() == inst->opcode()) { // Elide negates. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0u)}}}); return true; @@ -374,7 +382,8 @@ FoldingRule MergeNegateArithmetic() { FoldingRule MergeNegateMulDivArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + assert(inst->opcode() == spv::Op::OpFNegate || + inst->opcode() == spv::Op::OpSNegate); (void)constants; analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = @@ -390,9 +399,10 @@ FoldingRule MergeNegateMulDivArithmetic() { uint32_t width = ElementWidth(type); if (width != 32 && width != 64) return false; - SpvOp opcode = op_inst->opcode(); - if (opcode == SpvOpFMul || opcode == SpvOpFDiv || opcode == SpvOpIMul || - opcode == SpvOpSDiv || opcode == SpvOpUDiv) { + spv::Op opcode = op_inst->opcode(); + if (opcode == spv::Op::OpFMul || opcode == spv::Op::OpFDiv || + opcode == spv::Op::OpIMul || opcode == spv::Op::OpSDiv || + opcode == spv::Op::OpUDiv) { std::vector op_constants = const_mgr->GetOperandConstants(op_inst); // Merge negate into mul or div if one operand is constant. @@ -405,7 +415,8 @@ FoldingRule MergeNegateMulDivArithmetic() { : op_inst->GetSingleWordInOperand(1u); // Change this instruction to a mul/div. inst->SetOpcode(op_inst->opcode()); - if (opcode == SpvOpFDiv || opcode == SpvOpUDiv || opcode == SpvOpSDiv) { + if (opcode == spv::Op::OpFDiv || opcode == spv::Op::OpUDiv || + opcode == spv::Op::OpSDiv) { uint32_t op0 = zero_is_variable ? non_const_id : neg_id; uint32_t op1 = zero_is_variable ? neg_id : non_const_id; inst->SetInOperands( @@ -432,7 +443,8 @@ FoldingRule MergeNegateMulDivArithmetic() { FoldingRule MergeNegateAddSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFNegate || inst->opcode() == SpvOpSNegate); + assert(inst->opcode() == spv::Op::OpFNegate || + inst->opcode() == spv::Op::OpSNegate); (void)constants; analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = @@ -448,14 +460,16 @@ FoldingRule MergeNegateAddSubArithmetic() { uint32_t width = ElementWidth(type); if (width != 32 && width != 64) return false; - if (op_inst->opcode() == SpvOpFAdd || op_inst->opcode() == SpvOpFSub || - op_inst->opcode() == SpvOpIAdd || op_inst->opcode() == SpvOpISub) { + if (op_inst->opcode() == spv::Op::OpFAdd || + op_inst->opcode() == spv::Op::OpFSub || + op_inst->opcode() == spv::Op::OpIAdd || + op_inst->opcode() == spv::Op::OpISub) { std::vector op_constants = const_mgr->GetOperandConstants(op_inst); if (op_constants[0] || op_constants[1]) { bool zero_is_variable = op_constants[0] == nullptr; - bool is_add = (op_inst->opcode() == SpvOpFAdd) || - (op_inst->opcode() == SpvOpIAdd); + bool is_add = (op_inst->opcode() == spv::Op::OpFAdd) || + (op_inst->opcode() == spv::Op::OpIAdd); bool swap_operands = !is_add || zero_is_variable; bool negate_const = is_add; const analysis::Constant* c = ConstInput(op_constants); @@ -473,7 +487,8 @@ FoldingRule MergeNegateAddSubArithmetic() { uint32_t op1 = zero_is_variable ? const_id : op_inst->GetSingleWordInOperand(1u); if (swap_operands) std::swap(op0, op1); - inst->SetOpcode(HasFloatingPoint(type) ? SpvOpFSub : SpvOpISub); + inst->SetOpcode(HasFloatingPoint(type) ? spv::Op::OpFSub + : spv::Op::OpISub); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {op0}}, {SPV_OPERAND_TYPE_ID, {op1}}}); return true; @@ -504,7 +519,7 @@ bool HasZero(const analysis::Constant* c) { // id. Returns 0 if the result is not a valid value. The input types must be // Float. uint32_t PerformFloatingPointOperation(analysis::ConstantManager* const_mgr, - SpvOp opcode, + spv::Op opcode, const analysis::Constant* input1, const analysis::Constant* input2) { const analysis::Type* type = input1->type(); @@ -527,17 +542,17 @@ uint32_t PerformFloatingPointOperation(analysis::ConstantManager* const_mgr, } \ static_assert(true, "require extra semicolon") switch (opcode) { - case SpvOpFMul: + case spv::Op::OpFMul: FOLD_OP(*); break; - case SpvOpFDiv: + case spv::Op::OpFDiv: if (HasZero(input2)) return 0; FOLD_OP(/); break; - case SpvOpFAdd: + case spv::Op::OpFAdd: FOLD_OP(+); break; - case SpvOpFSub: + case spv::Op::OpFSub: FOLD_OP(-); break; default: @@ -553,7 +568,8 @@ uint32_t PerformFloatingPointOperation(analysis::ConstantManager* const_mgr, // id. Returns 0 if the result is not a valid value. The input types must be // Integers. uint32_t PerformIntegerOperation(analysis::ConstantManager* const_mgr, - SpvOp opcode, const analysis::Constant* input1, + spv::Op opcode, + const analysis::Constant* input1, const analysis::Constant* input2) { assert(input1->type()->AsInteger()); const analysis::Integer* type = input1->type()->AsInteger(); @@ -574,17 +590,17 @@ uint32_t PerformIntegerOperation(analysis::ConstantManager* const_mgr, } \ static_assert(true, "require extra semicolon") switch (opcode) { - case SpvOpIMul: + case spv::Op::OpIMul: FOLD_OP(*); break; - case SpvOpSDiv: - case SpvOpUDiv: + case spv::Op::OpSDiv: + case spv::Op::OpUDiv: assert(false && "Should not merge integer division"); break; - case SpvOpIAdd: + case spv::Op::OpIAdd: FOLD_OP(+); break; - case SpvOpISub: + case spv::Op::OpISub: FOLD_OP(-); break; default: @@ -599,7 +615,7 @@ uint32_t PerformIntegerOperation(analysis::ConstantManager* const_mgr, // Performs |input1| |opcode| |input2| and returns the merged constant result // id. Returns 0 if the result is not a valid value. The input types must be // Integers, Floats or Vectors of such. -uint32_t PerformOperation(analysis::ConstantManager* const_mgr, SpvOp opcode, +uint32_t PerformOperation(analysis::ConstantManager* const_mgr, spv::Op opcode, const analysis::Constant* input1, const analysis::Constant* input2) { assert(input1 && input2); @@ -659,7 +675,8 @@ uint32_t PerformOperation(analysis::ConstantManager* const_mgr, SpvOp opcode, FoldingRule MergeMulMulArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFMul || inst->opcode() == SpvOpIMul); + assert(inst->opcode() == spv::Op::OpFMul || + inst->opcode() == spv::Op::OpIMul); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -711,7 +728,7 @@ FoldingRule MergeMulMulArithmetic() { FoldingRule MergeMulDivArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFMul); + assert(inst->opcode() == spv::Op::OpFMul); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); @@ -725,10 +742,10 @@ FoldingRule MergeMulDivArithmetic() { for (uint32_t i = 0; i < 2; i++) { uint32_t op_id = inst->GetSingleWordInOperand(i); Instruction* op_inst = def_use_mgr->GetDef(op_id); - if (op_inst->opcode() == SpvOpFDiv) { + if (op_inst->opcode() == spv::Op::OpFDiv) { if (op_inst->GetSingleWordInOperand(1) == inst->GetSingleWordInOperand(1 - i)) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0)}}}); return true; @@ -741,7 +758,7 @@ FoldingRule MergeMulDivArithmetic() { Instruction* other_inst = NonConstInput(context, constants[0], inst); if (!other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFDiv) { + if (other_inst->opcode() == spv::Op::OpFDiv) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); @@ -785,7 +802,8 @@ FoldingRule MergeMulDivArithmetic() { FoldingRule MergeMulNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFMul || inst->opcode() == SpvOpIMul); + assert(inst->opcode() == spv::Op::OpFMul || + inst->opcode() == spv::Op::OpIMul); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -801,8 +819,8 @@ FoldingRule MergeMulNegateArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFNegate || - other_inst->opcode() == SpvOpSNegate) { + if (other_inst->opcode() == spv::Op::OpFNegate || + other_inst->opcode() == spv::Op::OpSNegate) { uint32_t neg_id = NegateConstant(const_mgr, const_input1); inst->SetInOperands( @@ -825,7 +843,7 @@ FoldingRule MergeMulNegateArithmetic() { FoldingRule MergeDivDivArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFDiv); + assert(inst->opcode() == spv::Op::OpFDiv); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -848,10 +866,10 @@ FoldingRule MergeDivDivArithmetic() { bool other_first_is_variable = other_constants[0] == nullptr; - SpvOp merge_op = inst->opcode(); + spv::Op merge_op = inst->opcode(); if (other_first_is_variable) { // Constants magnify. - merge_op = SpvOpFMul; + merge_op = spv::Op::OpFMul; } // This is an x / (*) case. Swap the inputs. Doesn't harm multiply @@ -865,10 +883,10 @@ FoldingRule MergeDivDivArithmetic() { ? other_inst->GetSingleWordInOperand(0u) : other_inst->GetSingleWordInOperand(1u); - SpvOp op = inst->opcode(); + spv::Op op = inst->opcode(); if (!first_is_variable && !other_first_is_variable) { // Effectively div of 1/x, so change to multiply. - op = SpvOpFMul; + op = spv::Op::OpFMul; } uint32_t op1 = merged_id; @@ -896,7 +914,7 @@ FoldingRule MergeDivDivArithmetic() { FoldingRule MergeDivMulArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFDiv); + assert(inst->opcode() == spv::Op::OpFDiv); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -910,11 +928,11 @@ FoldingRule MergeDivMulArithmetic() { uint32_t op_id = inst->GetSingleWordInOperand(0); Instruction* op_inst = def_use_mgr->GetDef(op_id); - if (op_inst->opcode() == SpvOpFMul) { + if (op_inst->opcode() == spv::Op::OpFMul) { for (uint32_t i = 0; i < 2; i++) { if (op_inst->GetSingleWordInOperand(i) == inst->GetSingleWordInOperand(1)) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(1 - i)}}}); return true; @@ -928,7 +946,7 @@ FoldingRule MergeDivMulArithmetic() { if (!other_inst->IsFloatingPointFoldingAllowed()) return false; bool first_is_variable = constants[0] == nullptr; - if (other_inst->opcode() == SpvOpFMul) { + if (other_inst->opcode() == spv::Op::OpFMul) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); @@ -968,7 +986,7 @@ FoldingRule MergeDivMulArithmetic() { FoldingRule MergeDivNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFDiv); + assert(inst->opcode() == spv::Op::OpFDiv); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); if (!inst->IsFloatingPointFoldingAllowed()) return false; @@ -978,7 +996,7 @@ FoldingRule MergeDivNegateArithmetic() { if (!other_inst->IsFloatingPointFoldingAllowed()) return false; bool first_is_variable = constants[0] == nullptr; - if (other_inst->opcode() == SpvOpFNegate) { + if (other_inst->opcode() == spv::Op::OpFNegate) { uint32_t neg_id = NegateConstant(const_mgr, const_input1); if (first_is_variable) { @@ -1004,7 +1022,8 @@ FoldingRule MergeDivNegateArithmetic() { FoldingRule MergeAddNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + assert(inst->opcode() == spv::Op::OpFAdd || + inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); bool uses_float = HasFloatingPoint(type); @@ -1016,9 +1035,10 @@ FoldingRule MergeAddNegateArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpSNegate || - other_inst->opcode() == SpvOpFNegate) { - inst->SetOpcode(HasFloatingPoint(type) ? SpvOpFSub : SpvOpISub); + if (other_inst->opcode() == spv::Op::OpSNegate || + other_inst->opcode() == spv::Op::OpFNegate) { + inst->SetOpcode(HasFloatingPoint(type) ? spv::Op::OpFSub + : spv::Op::OpISub); uint32_t const_id = constants[0] ? inst->GetSingleWordInOperand(0u) : inst->GetSingleWordInOperand(1u); inst->SetInOperands( @@ -1037,7 +1057,8 @@ FoldingRule MergeAddNegateArithmetic() { FoldingRule MergeSubNegateArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + assert(inst->opcode() == spv::Op::OpFSub || + inst->opcode() == spv::Op::OpISub); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); @@ -1053,15 +1074,15 @@ FoldingRule MergeSubNegateArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpSNegate || - other_inst->opcode() == SpvOpFNegate) { + if (other_inst->opcode() == spv::Op::OpSNegate || + other_inst->opcode() == spv::Op::OpFNegate) { uint32_t op1 = 0; uint32_t op2 = 0; - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); if (constants[0] != nullptr) { op1 = other_inst->GetSingleWordInOperand(0u); op2 = inst->GetSingleWordInOperand(0u); - opcode = HasFloatingPoint(type) ? SpvOpFAdd : SpvOpIAdd; + opcode = HasFloatingPoint(type) ? spv::Op::OpFAdd : spv::Op::OpIAdd; } else { op1 = NegateConstant(const_mgr, const_input1); op2 = other_inst->GetSingleWordInOperand(0u); @@ -1085,7 +1106,8 @@ FoldingRule MergeSubNegateArithmetic() { FoldingRule MergeAddAddArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + assert(inst->opcode() == spv::Op::OpFAdd || + inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -1101,8 +1123,8 @@ FoldingRule MergeAddAddArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFAdd || - other_inst->opcode() == SpvOpIAdd) { + if (other_inst->opcode() == spv::Op::OpFAdd || + other_inst->opcode() == spv::Op::OpIAdd) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); @@ -1132,7 +1154,8 @@ FoldingRule MergeAddAddArithmetic() { FoldingRule MergeAddSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + assert(inst->opcode() == spv::Op::OpFAdd || + inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -1148,15 +1171,15 @@ FoldingRule MergeAddSubArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFSub || - other_inst->opcode() == SpvOpISub) { + if (other_inst->opcode() == spv::Op::OpFSub || + other_inst->opcode() == spv::Op::OpISub) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); if (!const_input2) return false; bool first_is_variable = other_constants[0] == nullptr; - SpvOp op = inst->opcode(); + spv::Op op = inst->opcode(); uint32_t op1 = 0; uint32_t op2 = 0; if (first_is_variable) { @@ -1191,7 +1214,8 @@ FoldingRule MergeAddSubArithmetic() { FoldingRule MergeSubAddArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + assert(inst->opcode() == spv::Op::OpFSub || + inst->opcode() == spv::Op::OpISub); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -1207,8 +1231,8 @@ FoldingRule MergeSubAddArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFAdd || - other_inst->opcode() == SpvOpIAdd) { + if (other_inst->opcode() == spv::Op::OpFAdd || + other_inst->opcode() == spv::Op::OpIAdd) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); @@ -1223,7 +1247,7 @@ FoldingRule MergeSubAddArithmetic() { // Subtract the constants. uint32_t merged_id = PerformOperation(const_mgr, inst->opcode(), const_input1, const_input2); - SpvOp op = inst->opcode(); + spv::Op op = inst->opcode(); uint32_t op1 = 0; uint32_t op2 = 0; if (constants[0] == nullptr) { @@ -1256,7 +1280,8 @@ FoldingRule MergeSubAddArithmetic() { FoldingRule MergeSubSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFSub || inst->opcode() == SpvOpISub); + assert(inst->opcode() == spv::Op::OpFSub || + inst->opcode() == spv::Op::OpISub); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -1272,8 +1297,8 @@ FoldingRule MergeSubSubArithmetic() { if (uses_float && !other_inst->IsFloatingPointFoldingAllowed()) return false; - if (other_inst->opcode() == SpvOpFSub || - other_inst->opcode() == SpvOpISub) { + if (other_inst->opcode() == spv::Op::OpFSub || + other_inst->opcode() == spv::Op::OpISub) { std::vector other_constants = const_mgr->GetOperandConstants(other_inst); const analysis::Constant* const_input2 = ConstInput(other_constants); @@ -1284,9 +1309,9 @@ FoldingRule MergeSubSubArithmetic() { // Merge the constants. uint32_t merged_id = 0; - SpvOp merge_op = inst->opcode(); + spv::Op merge_op = inst->opcode(); if (other_constants[0] == nullptr) { - merge_op = uses_float ? SpvOpFAdd : SpvOpIAdd; + merge_op = uses_float ? spv::Op::OpFAdd : spv::Op::OpIAdd; } else if (constants[0] == nullptr) { std::swap(const_input1, const_input2); } @@ -1294,10 +1319,10 @@ FoldingRule MergeSubSubArithmetic() { PerformOperation(const_mgr, merge_op, const_input1, const_input2); if (merged_id == 0) return false; - SpvOp op = inst->opcode(); + spv::Op op = inst->opcode(); if (constants[0] != nullptr && other_constants[0] != nullptr) { // Change the operation. - op = uses_float ? SpvOpFAdd : SpvOpIAdd; + op = uses_float ? spv::Op::OpFAdd : spv::Op::OpIAdd; } uint32_t op1 = 0; @@ -1325,13 +1350,14 @@ bool MergeGenericAddendSub(uint32_t addend, uint32_t sub, Instruction* inst) { IRContext* context = inst->context(); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* sub_inst = def_use_mgr->GetDef(sub); - if (sub_inst->opcode() != SpvOpFSub && sub_inst->opcode() != SpvOpISub) + if (sub_inst->opcode() != spv::Op::OpFSub && + sub_inst->opcode() != spv::Op::OpISub) return false; - if (sub_inst->opcode() == SpvOpFSub && + if (sub_inst->opcode() == spv::Op::OpFSub && !sub_inst->IsFloatingPointFoldingAllowed()) return false; if (addend != sub_inst->GetSingleWordInOperand(1)) return false; - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {sub_inst->GetSingleWordInOperand(0)}}}); context->UpdateDefUse(inst); @@ -1347,7 +1373,8 @@ bool MergeGenericAddendSub(uint32_t addend, uint32_t sub, Instruction* inst) { FoldingRule MergeGenericAddSubArithmetic() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + assert(inst->opcode() == spv::Op::OpFAdd || + inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); bool uses_float = HasFloatingPoint(type); @@ -1375,7 +1402,8 @@ bool FactorAddMulsOpnds(uint32_t factor0_0, uint32_t factor0_1, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); Instruction* new_add_inst = ir_builder.AddBinaryOp( inst->type_id(), inst->opcode(), factor0_1, factor1_1); - inst->SetOpcode(inst->opcode() == SpvOpFAdd ? SpvOpFMul : SpvOpIMul); + inst->SetOpcode(inst->opcode() == spv::Op::OpFAdd ? spv::Op::OpFMul + : spv::Op::OpIMul); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {factor0_0}}, {SPV_OPERAND_TYPE_ID, {new_add_inst->result_id()}}}); context->UpdateDefUse(inst); @@ -1387,7 +1415,8 @@ bool FactorAddMulsOpnds(uint32_t factor0_0, uint32_t factor0_1, FoldingRule FactorAddMuls() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpFAdd || inst->opcode() == SpvOpIAdd); + assert(inst->opcode() == spv::Op::OpFAdd || + inst->opcode() == spv::Op::OpIAdd); const analysis::Type* type = context->get_type_mgr()->GetType(inst->type_id()); bool uses_float = HasFloatingPoint(type); @@ -1396,13 +1425,13 @@ FoldingRule FactorAddMuls() { analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); uint32_t add_op0 = inst->GetSingleWordInOperand(0); Instruction* add_op0_inst = def_use_mgr->GetDef(add_op0); - if (add_op0_inst->opcode() != SpvOpFMul && - add_op0_inst->opcode() != SpvOpIMul) + if (add_op0_inst->opcode() != spv::Op::OpFMul && + add_op0_inst->opcode() != spv::Op::OpIMul) return false; uint32_t add_op1 = inst->GetSingleWordInOperand(1); Instruction* add_op1_inst = def_use_mgr->GetDef(add_op1); - if (add_op1_inst->opcode() != SpvOpFMul && - add_op1_inst->opcode() != SpvOpIMul) + if (add_op1_inst->opcode() != spv::Op::OpFMul && + add_op1_inst->opcode() != spv::Op::OpIMul) return false; // Only perform this optimization if both of the muls only have one use. @@ -1410,7 +1439,7 @@ FoldingRule FactorAddMuls() { if (def_use_mgr->NumUses(add_op0_inst) > 1) return false; if (def_use_mgr->NumUses(add_op1_inst) > 1) return false; - if (add_op0_inst->opcode() == SpvOpFMul && + if (add_op0_inst->opcode() == spv::Op::OpFMul && (!add_op0_inst->IsFloatingPointFoldingAllowed() || !add_op1_inst->IsFloatingPointFoldingAllowed())) return false; @@ -1430,10 +1459,137 @@ FoldingRule FactorAddMuls() { }; } +// Replaces |inst| inplace with an FMA instruction |(x*y)+a|. +void ReplaceWithFma(Instruction* inst, uint32_t x, uint32_t y, uint32_t a) { + uint32_t ext = + inst->context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); + + if (ext == 0) { + inst->context()->AddExtInstImport("GLSL.std.450"); + ext = inst->context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); + assert(ext != 0 && + "Could not add the GLSL.std.450 extended instruction set"); + } + + std::vector operands; + operands.push_back({SPV_OPERAND_TYPE_ID, {ext}}); + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, {GLSLstd450Fma}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {x}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {y}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {a}}); + + inst->SetOpcode(spv::Op::OpExtInst); + inst->SetInOperands(std::move(operands)); +} + +// Folds a multiple and add into an Fma. +// +// Cases: +// (x * y) + a = Fma x y a +// a + (x * y) = Fma x y a +bool MergeMulAddArithmetic(IRContext* context, Instruction* inst, + const std::vector&) { + assert(inst->opcode() == spv::Op::OpFAdd); + + if (!inst->IsFloatingPointFoldingAllowed()) { + return false; + } + + analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); + for (int i = 0; i < 2; i++) { + uint32_t op_id = inst->GetSingleWordInOperand(i); + Instruction* op_inst = def_use_mgr->GetDef(op_id); + + if (op_inst->opcode() != spv::Op::OpFMul) { + continue; + } + + if (!op_inst->IsFloatingPointFoldingAllowed()) { + continue; + } + + uint32_t x = op_inst->GetSingleWordInOperand(0); + uint32_t y = op_inst->GetSingleWordInOperand(1); + uint32_t a = inst->GetSingleWordInOperand((i + 1) % 2); + ReplaceWithFma(inst, x, y, a); + return true; + } + return false; +} + +// Replaces |sub| inplace with an FMA instruction |(x*y)+a| where |a| first gets +// negated if |negate_addition| is true, otherwise |x| gets negated. +void ReplaceWithFmaAndNegate(Instruction* sub, uint32_t x, uint32_t y, + uint32_t a, bool negate_addition) { + uint32_t ext = + sub->context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); + + if (ext == 0) { + sub->context()->AddExtInstImport("GLSL.std.450"); + ext = sub->context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); + assert(ext != 0 && + "Could not add the GLSL.std.450 extended instruction set"); + } + + InstructionBuilder ir_builder( + sub->context(), sub, + IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); + + Instruction* neg = ir_builder.AddUnaryOp(sub->type_id(), spv::Op::OpFNegate, + negate_addition ? a : x); + uint32_t neg_op = neg->result_id(); // -a : -x + + std::vector operands; + operands.push_back({SPV_OPERAND_TYPE_ID, {ext}}); + operands.push_back({SPV_OPERAND_TYPE_LITERAL_INTEGER, {GLSLstd450Fma}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {negate_addition ? x : neg_op}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {y}}); + operands.push_back({SPV_OPERAND_TYPE_ID, {negate_addition ? neg_op : a}}); + + sub->SetOpcode(spv::Op::OpExtInst); + sub->SetInOperands(std::move(operands)); +} + +// Folds a multiply and subtract into an Fma and negation. +// +// Cases: +// (x * y) - a = Fma x y -a +// a - (x * y) = Fma -x y a +bool MergeMulSubArithmetic(IRContext* context, Instruction* sub, + const std::vector&) { + assert(sub->opcode() == spv::Op::OpFSub); + + if (!sub->IsFloatingPointFoldingAllowed()) { + return false; + } + + analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); + for (int i = 0; i < 2; i++) { + uint32_t op_id = sub->GetSingleWordInOperand(i); + Instruction* mul = def_use_mgr->GetDef(op_id); + + if (mul->opcode() != spv::Op::OpFMul) { + continue; + } + + if (!mul->IsFloatingPointFoldingAllowed()) { + continue; + } + + uint32_t x = mul->GetSingleWordInOperand(0); + uint32_t y = mul->GetSingleWordInOperand(1); + uint32_t a = sub->GetSingleWordInOperand((i + 1) % 2); + ReplaceWithFmaAndNegate(sub, x, y, a, i == 0); + return true; + } + return false; +} + FoldingRule IntMultipleBy1() { return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpIMul && "Wrong opcode. Should be OpIMul."); + assert(inst->opcode() == spv::Op::OpIMul && + "Wrong opcode. Should be OpIMul."); for (uint32_t i = 0; i < 2; i++) { if (constants[i] == nullptr) { continue; @@ -1445,7 +1601,7 @@ FoldingRule IntMultipleBy1() { bool is_one = (width == 32) ? int_constant->GetU32BitValue() == 1u : int_constant->GetU64BitValue() == 1ull; if (is_one) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(1 - i)}}}); return true; @@ -1462,7 +1618,7 @@ FoldingRule IntMultipleBy1() { uint32_t GetNumOfElementsContributedByOperand(IRContext* context, const Instruction* inst, uint32_t index) { - assert(inst->opcode() == SpvOpCompositeConstruct); + assert(inst->opcode() == spv::Op::OpCompositeConstruct); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::TypeManager* type_mgr = context->get_type_mgr(); @@ -1493,14 +1649,17 @@ uint32_t GetNumOfElementsContributedByOperand(IRContext* context, // out-of-bounds. |inst| must be an |OpCompositeConstruct| instruction. std::vector GetExtractOperandsForElementOfCompositeConstruct( IRContext* context, const Instruction* inst, uint32_t result_index) { - assert(inst->opcode() == SpvOpCompositeConstruct); + assert(inst->opcode() == spv::Op::OpCompositeConstruct); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::TypeManager* type_mgr = context->get_type_mgr(); analysis::Type* result_type = type_mgr->GetType(inst->type_id()); if (result_type->AsVector() == nullptr) { - uint32_t id = inst->GetSingleWordInOperand(result_index); - return {Operand(SPV_OPERAND_TYPE_ID, {id})}; + if (result_index < inst->NumInOperands()) { + uint32_t id = inst->GetSingleWordInOperand(result_index); + return {Operand(SPV_OPERAND_TYPE_ID, {id})}; + } + return {}; } // If the result type is a vector, then vector operands are concatenated. @@ -1532,7 +1691,7 @@ bool CompositeConstructFeedingExtract( const std::vector&) { // If the input to an OpCompositeExtract is an OpCompositeConstruct, // then we can simply use the appropriate element in the construction. - assert(inst->opcode() == SpvOpCompositeExtract && + assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); @@ -1544,7 +1703,7 @@ bool CompositeConstructFeedingExtract( uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); Instruction* cinst = def_use_mgr->GetDef(cid); - if (cinst->opcode() != SpvOpCompositeConstruct) { + if (cinst->opcode() != spv::Op::OpCompositeConstruct) { return false; } @@ -1566,13 +1725,64 @@ bool CompositeConstructFeedingExtract( if (operands.size() == 1) { // If there were no extra indices, then we have the final object. No need // to extract any more. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); } inst->SetInOperands(std::move(operands)); return true; } +// Walks the indexes chain from |start| to |end| of an OpCompositeInsert or +// OpCompositeExtract instruction, and returns the type of the final element +// being accessed. +const analysis::Type* GetElementType(uint32_t type_id, + Instruction::iterator start, + Instruction::iterator end, + const analysis::TypeManager* type_mgr) { + const analysis::Type* type = type_mgr->GetType(type_id); + for (auto index : make_range(std::move(start), std::move(end))) { + assert(index.type == SPV_OPERAND_TYPE_LITERAL_INTEGER && + index.words.size() == 1); + if (auto* array_type = type->AsArray()) { + type = array_type->element_type(); + } else if (auto* matrix_type = type->AsMatrix()) { + type = matrix_type->element_type(); + } else if (auto* struct_type = type->AsStruct()) { + type = struct_type->element_types()[index.words[0]]; + } else { + type = nullptr; + } + } + return type; +} + +// Returns true of |inst_1| and |inst_2| have the same indexes that will be used +// to index into a composite object, excluding the last index. The two +// instructions must have the same opcode, and be either OpCompositeExtract or +// OpCompositeInsert instructions. +bool HaveSameIndexesExceptForLast(Instruction* inst_1, Instruction* inst_2) { + assert(inst_1->opcode() == inst_2->opcode() && + "Expecting the opcodes to be the same."); + assert((inst_1->opcode() == spv::Op::OpCompositeInsert || + inst_1->opcode() == spv::Op::OpCompositeExtract) && + "Instructions must be OpCompositeInsert or OpCompositeExtract."); + + if (inst_1->NumInOperands() != inst_2->NumInOperands()) { + return false; + } + + uint32_t first_index_position = + (inst_1->opcode() == spv::Op::OpCompositeInsert ? 2 : 1); + for (uint32_t i = first_index_position; i < inst_1->NumInOperands() - 1; + i++) { + if (inst_1->GetSingleWordInOperand(i) != + inst_2->GetSingleWordInOperand(i)) { + return false; + } + } + return true; +} + // If the OpCompositeConstruct is simply putting back together elements that // where extracted from the same source, we can simply reuse the source. // @@ -1581,7 +1791,7 @@ bool CompositeConstructFeedingExtract( bool CompositeExtractFeedingConstruct( IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpCompositeConstruct && + assert(inst->opcode() == spv::Op::OpCompositeConstruct && "Wrong opcode. Should be OpCompositeConstruct."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); uint32_t original_id = 0; @@ -1595,19 +1805,24 @@ bool CompositeExtractFeedingConstruct( // - extractions // - extracting the same position they are inserting // - all extract from the same id. + Instruction* first_element_inst = nullptr; for (uint32_t i = 0; i < inst->NumInOperands(); ++i) { const uint32_t element_id = inst->GetSingleWordInOperand(i); Instruction* element_inst = def_use_mgr->GetDef(element_id); + if (first_element_inst == nullptr) { + first_element_inst = element_inst; + } - if (element_inst->opcode() != SpvOpCompositeExtract) { + if (element_inst->opcode() != spv::Op::OpCompositeExtract) { return false; } - if (element_inst->NumInOperands() != 2) { + if (!HaveSameIndexesExceptForLast(element_inst, first_element_inst)) { return false; } - if (element_inst->GetSingleWordInOperand(1) != i) { + if (element_inst->GetSingleWordInOperand(element_inst->NumInOperands() - + 1) != i) { return false; } @@ -1623,26 +1838,44 @@ bool CompositeExtractFeedingConstruct( // The last check it to see that the object being extracted from is the // correct type. Instruction* original_inst = def_use_mgr->GetDef(original_id); - if (original_inst->type_id() != inst->type_id()) { + analysis::TypeManager* type_mgr = context->get_type_mgr(); + const analysis::Type* original_type = + GetElementType(original_inst->type_id(), first_element_inst->begin() + 3, + first_element_inst->end() - 1, type_mgr); + + if (original_type == nullptr) { return false; } - // Simplify by using the original object. - inst->SetOpcode(SpvOpCopyObject); - inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {original_id}}}); + if (inst->type_id() != type_mgr->GetId(original_type)) { + return false; + } + + if (first_element_inst->NumInOperands() == 2) { + // Simplify by using the original object. + inst->SetOpcode(spv::Op::OpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {original_id}}}); + return true; + } + + // Copies the original id and all indexes except for the last to the new + // extract instruction. + inst->SetOpcode(spv::Op::OpCompositeExtract); + inst->SetInOperands(std::vector(first_element_inst->begin() + 2, + first_element_inst->end() - 1)); return true; } FoldingRule InsertFeedingExtract() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpCompositeExtract && + assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); Instruction* cinst = def_use_mgr->GetDef(cid); - if (cinst->opcode() != SpvOpCompositeInsert) { + if (cinst->opcode() != spv::Op::OpCompositeInsert) { return false; } @@ -1662,7 +1895,7 @@ FoldingRule InsertFeedingExtract() { // We are extracting the element that was inserted. if (i == inst->NumInOperands() && i + 1 == cinst->NumInOperands()) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {cinst->GetSingleWordInOperand(kInsertObjectIdInIdx)}}}); @@ -1711,14 +1944,14 @@ FoldingRule InsertFeedingExtract() { FoldingRule VectorShuffleFeedingExtract() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpCompositeExtract && + assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::TypeManager* type_mgr = context->get_type_mgr(); uint32_t cid = inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); Instruction* cinst = def_use_mgr->GetDef(cid); - if (cinst->opcode() != SpvOpVectorShuffle) { + if (cinst->opcode() != spv::Op::OpVectorShuffle) { return false; } @@ -1739,7 +1972,7 @@ FoldingRule VectorShuffleFeedingExtract() { // Extracting an undefined value so fold this extract into an undef. const uint32_t undef_literal_value = 0xffffffff; if (new_index == undef_literal_value) { - inst->SetOpcode(SpvOpUndef); + inst->SetOpcode(spv::Op::OpUndef); inst->SetInOperands({}); return true; } @@ -1767,7 +2000,7 @@ FoldingRule VectorShuffleFeedingExtract() { FoldingRule FMixFeedingExtract() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpCompositeExtract && + assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -1776,7 +2009,7 @@ FoldingRule FMixFeedingExtract() { inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); Instruction* composite_inst = def_use_mgr->GetDef(composite_id); - if (composite_inst->opcode() != SpvOpExtInst) { + if (composite_inst->opcode() != spv::Op::OpExtInst) { return false; } @@ -1796,7 +2029,7 @@ FoldingRule FMixFeedingExtract() { a->SetInOperand(kExtractCompositeIdInIdx, {a_id}); context->get_instruction_folder().FoldInstruction(a.get()); - if (a->opcode() != SpvOpCopyObject) { + if (a->opcode() != spv::Op::OpCopyObject) { return false; } @@ -1833,12 +2066,153 @@ FoldingRule FMixFeedingExtract() { }; } +// Returns the number of elements in the composite type |type|. Returns 0 if +// |type| is a scalar value. Return UINT32_MAX when the size is unknown at +// compile time. +uint32_t GetNumberOfElements(const analysis::Type* type) { + if (auto* vector_type = type->AsVector()) { + return vector_type->element_count(); + } + if (auto* matrix_type = type->AsMatrix()) { + return matrix_type->element_count(); + } + if (auto* struct_type = type->AsStruct()) { + return static_cast(struct_type->element_types().size()); + } + if (auto* array_type = type->AsArray()) { + if (array_type->length_info().words[0] == + analysis::Array::LengthInfo::kConstant && + array_type->length_info().words.size() == 2) { + return array_type->length_info().words[1]; + } + return UINT32_MAX; + } + return 0; +} + +// Returns a map with the set of values that were inserted into an object by +// the chain of OpCompositeInsertInstruction starting with |inst|. +// The map will map the index to the value inserted at that index. An empty map +// will be returned if the map could not be properly generated. +std::map GetInsertedValues(Instruction* inst) { + analysis::DefUseManager* def_use_mgr = inst->context()->get_def_use_mgr(); + std::map values_inserted; + Instruction* current_inst = inst; + while (current_inst->opcode() == spv::Op::OpCompositeInsert) { + if (current_inst->NumInOperands() > inst->NumInOperands()) { + // This is to catch the case + // %2 = OpCompositeInsert %m2x2int %v2int_1_0 %m2x2int_undef 0 + // %3 = OpCompositeInsert %m2x2int %int_4 %2 0 0 + // %4 = OpCompositeInsert %m2x2int %v2int_2_3 %3 1 + // In this case we cannot do a single construct to get the matrix. + uint32_t partially_inserted_element_index = + current_inst->GetSingleWordInOperand(inst->NumInOperands() - 1); + if (values_inserted.count(partially_inserted_element_index) == 0) + return {}; + } + if (HaveSameIndexesExceptForLast(inst, current_inst)) { + values_inserted.insert( + {current_inst->GetSingleWordInOperand(current_inst->NumInOperands() - + 1), + current_inst->GetSingleWordInOperand(kInsertObjectIdInIdx)}); + } + current_inst = def_use_mgr->GetDef( + current_inst->GetSingleWordInOperand(kInsertCompositeIdInIdx)); + } + return values_inserted; +} + +// Returns true of there is an entry in |values_inserted| for every element of +// |Type|. +bool DoInsertedValuesCoverEntireObject( + const analysis::Type* type, std::map& values_inserted) { + uint32_t container_size = GetNumberOfElements(type); + if (container_size != values_inserted.size()) { + return false; + } + + if (values_inserted.rbegin()->first >= container_size) { + return false; + } + return true; +} + +// Returns the type of the element that immediately contains the element being +// inserted by the OpCompositeInsert instruction |inst|. +const analysis::Type* GetContainerType(Instruction* inst) { + assert(inst->opcode() == spv::Op::OpCompositeInsert); + analysis::TypeManager* type_mgr = inst->context()->get_type_mgr(); + return GetElementType(inst->type_id(), inst->begin() + 4, inst->end() - 1, + type_mgr); +} + +// Returns an OpCompositeConstruct instruction that build an object with +// |type_id| out of the values in |values_inserted|. Each value will be +// placed at the index corresponding to the value. The new instruction will +// be placed before |insert_before|. +Instruction* BuildCompositeConstruct( + uint32_t type_id, const std::map& values_inserted, + Instruction* insert_before) { + InstructionBuilder ir_builder( + insert_before->context(), insert_before, + IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); + + std::vector ids_in_order; + for (auto it : values_inserted) { + ids_in_order.push_back(it.second); + } + Instruction* construct = + ir_builder.AddCompositeConstruct(type_id, ids_in_order); + return construct; +} + +// Replaces the OpCompositeInsert |inst| that inserts |construct| into the same +// object as |inst| with final index removed. If the resulting +// OpCompositeInsert instruction would have no remaining indexes, the +// instruction is replaced with an OpCopyObject instead. +void InsertConstructedObject(Instruction* inst, const Instruction* construct) { + if (inst->NumInOperands() == 3) { + inst->SetOpcode(spv::Op::OpCopyObject); + inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {construct->result_id()}}}); + } else { + inst->SetInOperand(kInsertObjectIdInIdx, {construct->result_id()}); + inst->RemoveOperand(inst->NumOperands() - 1); + } +} + +// Replaces a series of |OpCompositeInsert| instruction that cover the entire +// object with an |OpCompositeConstruct|. +bool CompositeInsertToCompositeConstruct( + IRContext* context, Instruction* inst, + const std::vector&) { + assert(inst->opcode() == spv::Op::OpCompositeInsert && + "Wrong opcode. Should be OpCompositeInsert."); + if (inst->NumInOperands() < 3) return false; + + std::map values_inserted = GetInsertedValues(inst); + const analysis::Type* container_type = GetContainerType(inst); + if (container_type == nullptr) { + return false; + } + + if (!DoInsertedValuesCoverEntireObject(container_type, values_inserted)) { + return false; + } + + analysis::TypeManager* type_mgr = context->get_type_mgr(); + Instruction* construct = BuildCompositeConstruct( + type_mgr->GetId(container_type), values_inserted, inst); + InsertConstructedObject(inst, construct); + return true; +} + FoldingRule RedundantPhi() { // An OpPhi instruction where all values are the same or the result of the phi // itself, can be replaced by the value itself. return [](IRContext*, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpPhi && "Wrong opcode. Should be OpPhi."); + assert(inst->opcode() == spv::Op::OpPhi && + "Wrong opcode. Should be OpPhi."); uint32_t incoming_value = 0; @@ -1862,7 +2236,7 @@ FoldingRule RedundantPhi() { } // We have a single incoming value. Simplify using that value. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {incoming_value}}}); return true; }; @@ -1871,7 +2245,7 @@ FoldingRule RedundantPhi() { FoldingRule BitCastScalarOrVector() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpBitcast && constants.size() == 1); + assert(inst->opcode() == spv::Op::OpBitcast && constants.size() == 1); if (constants[0] == nullptr) return false; const analysis::Type* type = @@ -1891,7 +2265,7 @@ FoldingRule BitCastScalarOrVector() { auto new_feeder_id = const_mgr->GetDefiningInstruction(bitcasted_constant, inst->type_id()) ->result_id(); - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {new_feeder_id}}}); return true; }; @@ -1902,7 +2276,7 @@ FoldingRule RedundantSelect() { // constant can be replaced by one of the values return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpSelect && + assert(inst->opcode() == spv::Op::OpSelect && "Wrong opcode. Should be OpSelect."); assert(inst->NumInOperands() == 3); assert(constants.size() == 3); @@ -1912,14 +2286,14 @@ FoldingRule RedundantSelect() { if (true_id == false_id) { // Both results are the same, condition doesn't matter - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {true_id}}}); return true; } else if (constants[0]) { const analysis::Type* type = constants[0]->type(); if (type->AsBool()) { // Scalar constant value, select the corresponding value. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); if (constants[0]->AsNullConstant() || !constants[0]->AsBoolConstant()->value()) { inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {false_id}}}); @@ -1931,7 +2305,7 @@ FoldingRule RedundantSelect() { assert(type->AsVector()); if (constants[0]->AsNullConstant()) { // All values come from false id. - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {false_id}}}); return true; } else { @@ -1958,7 +2332,7 @@ FoldingRule RedundantSelect() { } } - inst->SetOpcode(SpvOpVectorShuffle); + inst->SetOpcode(spv::Op::OpVectorShuffle); inst->SetInOperands(std::move(ops)); return true; } @@ -2018,7 +2392,8 @@ FloatConstantKind getFloatConstantKind(const analysis::Constant* constant) { FoldingRule RedundantFAdd() { return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFAdd && "Wrong opcode. Should be OpFAdd."); + assert(inst->opcode() == spv::Op::OpFAdd && + "Wrong opcode. Should be OpFAdd."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed()) { @@ -2029,7 +2404,7 @@ FoldingRule RedundantFAdd() { FloatConstantKind kind1 = getFloatConstantKind(constants[1]); if (kind0 == FloatConstantKind::Zero || kind1 == FloatConstantKind::Zero) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand( kind0 == FloatConstantKind::Zero ? 1 : 0)}}}); @@ -2043,7 +2418,8 @@ FoldingRule RedundantFAdd() { FoldingRule RedundantFSub() { return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFSub && "Wrong opcode. Should be OpFSub."); + assert(inst->opcode() == spv::Op::OpFSub && + "Wrong opcode. Should be OpFSub."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed()) { @@ -2054,14 +2430,14 @@ FoldingRule RedundantFSub() { FloatConstantKind kind1 = getFloatConstantKind(constants[1]); if (kind0 == FloatConstantKind::Zero) { - inst->SetOpcode(SpvOpFNegate); + inst->SetOpcode(spv::Op::OpFNegate); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(1)}}}); return true; } if (kind1 == FloatConstantKind::Zero) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); return true; @@ -2074,7 +2450,8 @@ FoldingRule RedundantFSub() { FoldingRule RedundantFMul() { return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFMul && "Wrong opcode. Should be OpFMul."); + assert(inst->opcode() == spv::Op::OpFMul && + "Wrong opcode. Should be OpFMul."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed()) { @@ -2085,7 +2462,7 @@ FoldingRule RedundantFMul() { FloatConstantKind kind1 = getFloatConstantKind(constants[1]); if (kind0 == FloatConstantKind::Zero || kind1 == FloatConstantKind::Zero) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand( kind0 == FloatConstantKind::Zero ? 0 : 1)}}}); @@ -2093,7 +2470,7 @@ FoldingRule RedundantFMul() { } if (kind0 == FloatConstantKind::One || kind1 == FloatConstantKind::One) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand( kind0 == FloatConstantKind::One ? 1 : 0)}}}); @@ -2107,7 +2484,8 @@ FoldingRule RedundantFMul() { FoldingRule RedundantFDiv() { return [](IRContext*, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpFDiv && "Wrong opcode. Should be OpFDiv."); + assert(inst->opcode() == spv::Op::OpFDiv && + "Wrong opcode. Should be OpFDiv."); assert(constants.size() == 2); if (!inst->IsFloatingPointFoldingAllowed()) { @@ -2118,14 +2496,14 @@ FoldingRule RedundantFDiv() { FloatConstantKind kind1 = getFloatConstantKind(constants[1]); if (kind0 == FloatConstantKind::Zero) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); return true; } if (kind1 == FloatConstantKind::One) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(0)}}}); return true; @@ -2138,7 +2516,7 @@ FoldingRule RedundantFDiv() { FoldingRule RedundantFMix() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpExtInst && + assert(inst->opcode() == spv::Op::OpExtInst && "Wrong opcode. Should be OpExtInst."); if (!inst->IsFloatingPointFoldingAllowed()) { @@ -2156,7 +2534,7 @@ FoldingRule RedundantFMix() { FloatConstantKind kind4 = getFloatConstantKind(constants[4]); if (kind4 == FloatConstantKind::Zero || kind4 == FloatConstantKind::One) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); inst->SetInOperands( {{SPV_OPERAND_TYPE_ID, {inst->GetSingleWordInOperand(kind4 == FloatConstantKind::Zero @@ -2174,7 +2552,8 @@ FoldingRule RedundantFMix() { FoldingRule RedundantIAdd() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpIAdd && "Wrong opcode. Should be OpIAdd."); + assert(inst->opcode() == spv::Op::OpIAdd && + "Wrong opcode. Should be OpIAdd."); uint32_t operand = std::numeric_limits::max(); const analysis::Type* operand_type = nullptr; @@ -2190,9 +2569,9 @@ FoldingRule RedundantIAdd() { const analysis::Type* inst_type = context->get_type_mgr()->GetType(inst->type_id()); if (inst_type->IsSame(operand_type)) { - inst->SetOpcode(SpvOpCopyObject); + inst->SetOpcode(spv::Op::OpCopyObject); } else { - inst->SetOpcode(SpvOpBitcast); + inst->SetOpcode(spv::Op::OpBitcast); } inst->SetInOperands({{SPV_OPERAND_TYPE_ID, {operand}}}); return true; @@ -2206,7 +2585,8 @@ FoldingRule RedundantIAdd() { FoldingRule DotProductDoingExtract() { return [](IRContext* context, Instruction* inst, const std::vector& constants) { - assert(inst->opcode() == SpvOpDot && "Wrong opcode. Should be OpDot."); + assert(inst->opcode() == spv::Op::OpDot && + "Wrong opcode. Should be OpDot."); analysis::ConstantManager* const_mgr = context->get_constant_mgr(); @@ -2232,7 +2612,7 @@ FoldingRule DotProductDoingExtract() { std::vector components; components = constants[i]->GetVectorComponents(const_mgr); - const uint32_t kNotFound = std::numeric_limits::max(); + constexpr uint32_t kNotFound = std::numeric_limits::max(); uint32_t component_with_one = kNotFound; bool all_others_zero = true; @@ -2265,7 +2645,7 @@ FoldingRule DotProductDoingExtract() { operands.push_back( {SPV_OPERAND_TYPE_LITERAL_INTEGER, {component_with_one}}); - inst->SetOpcode(SpvOpCompositeExtract); + inst->SetOpcode(spv::Op::OpCompositeExtract); inst->SetInOperands(std::move(operands)); return true; } @@ -2280,20 +2660,22 @@ FoldingRule DotProductDoingExtract() { FoldingRule StoringUndef() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpStore && "Wrong opcode. Should be OpStore."); + assert(inst->opcode() == spv::Op::OpStore && + "Wrong opcode. Should be OpStore."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); // If this is a volatile store, the store cannot be removed. if (inst->NumInOperands() == 3) { - if (inst->GetSingleWordInOperand(2) & SpvMemoryAccessVolatileMask) { + if (inst->GetSingleWordInOperand(2) & + uint32_t(spv::MemoryAccessMask::Volatile)) { return false; } } uint32_t object_id = inst->GetSingleWordInOperand(kStoreObjectInIdx); Instruction* object_inst = def_use_mgr->GetDef(object_id); - if (object_inst->opcode() == SpvOpUndef) { + if (object_inst->opcode() == spv::Op::OpUndef) { inst->ToNop(); return true; } @@ -2304,7 +2686,7 @@ FoldingRule StoringUndef() { FoldingRule VectorShuffleFeedingShuffle() { return [](IRContext* context, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpVectorShuffle && + assert(inst->opcode() == spv::Op::OpVectorShuffle && "Wrong opcode. Should be OpVectorShuffle."); analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); @@ -2317,13 +2699,13 @@ FoldingRule VectorShuffleFeedingShuffle() { uint32_t op0_length = op0_type->element_count(); bool feeder_is_op0 = true; - if (feeding_shuffle_inst->opcode() != SpvOpVectorShuffle) { + if (feeding_shuffle_inst->opcode() != spv::Op::OpVectorShuffle) { feeding_shuffle_inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(1)); feeder_is_op0 = false; } - if (feeding_shuffle_inst->opcode() != SpvOpVectorShuffle) { + if (feeding_shuffle_inst->opcode() != spv::Op::OpVectorShuffle) { return false; } @@ -2368,7 +2750,7 @@ FoldingRule VectorShuffleFeedingShuffle() { // fold. return false; } - } else { + } else if (component_index != undef_literal) { if (new_feeder_id == 0) { // First time through, save the id of the operand the element comes // from. @@ -2382,7 +2764,7 @@ FoldingRule VectorShuffleFeedingShuffle() { component_index -= feeder_op0_length; } - if (!feeder_is_op0) { + if (!feeder_is_op0 && component_index != undef_literal) { component_index += op0_length; } } @@ -2410,7 +2792,8 @@ FoldingRule VectorShuffleFeedingShuffle() { if (adjustment != 0) { for (uint32_t i = 2; i < new_operands.size(); i++) { - if (inst->GetSingleWordInOperand(i) >= op0_length) { + uint32_t operand = inst->GetSingleWordInOperand(i); + if (operand >= op0_length && operand != undef_literal) { new_operands[i].words[0] -= adjustment; } } @@ -2433,7 +2816,7 @@ FoldingRule VectorShuffleFeedingShuffle() { FoldingRule RemoveRedundantOperands() { return [](IRContext*, Instruction* inst, const std::vector&) { - assert(inst->opcode() == SpvOpEntryPoint && + assert(inst->opcode() == spv::Op::OpEntryPoint && "Wrong opcode. Should be OpEntryPoint."); bool has_redundant_operand = false; std::unordered_set seen_operands; @@ -2466,46 +2849,56 @@ FoldingRule UpdateImageOperands() { const std::vector& constants) { const auto opcode = inst->opcode(); (void)opcode; - assert((opcode == SpvOpImageSampleImplicitLod || - opcode == SpvOpImageSampleExplicitLod || - opcode == SpvOpImageSampleDrefImplicitLod || - opcode == SpvOpImageSampleDrefExplicitLod || - opcode == SpvOpImageSampleProjImplicitLod || - opcode == SpvOpImageSampleProjExplicitLod || - opcode == SpvOpImageSampleProjDrefImplicitLod || - opcode == SpvOpImageSampleProjDrefExplicitLod || - opcode == SpvOpImageFetch || opcode == SpvOpImageGather || - opcode == SpvOpImageDrefGather || opcode == SpvOpImageRead || - opcode == SpvOpImageWrite || - opcode == SpvOpImageSparseSampleImplicitLod || - opcode == SpvOpImageSparseSampleExplicitLod || - opcode == SpvOpImageSparseSampleDrefImplicitLod || - opcode == SpvOpImageSparseSampleDrefExplicitLod || - opcode == SpvOpImageSparseSampleProjImplicitLod || - opcode == SpvOpImageSparseSampleProjExplicitLod || - opcode == SpvOpImageSparseSampleProjDrefImplicitLod || - opcode == SpvOpImageSparseSampleProjDrefExplicitLod || - opcode == SpvOpImageSparseFetch || - opcode == SpvOpImageSparseGather || - opcode == SpvOpImageSparseDrefGather || - opcode == SpvOpImageSparseRead) && + assert((opcode == spv::Op::OpImageSampleImplicitLod || + opcode == spv::Op::OpImageSampleExplicitLod || + opcode == spv::Op::OpImageSampleDrefImplicitLod || + opcode == spv::Op::OpImageSampleDrefExplicitLod || + opcode == spv::Op::OpImageSampleProjImplicitLod || + opcode == spv::Op::OpImageSampleProjExplicitLod || + opcode == spv::Op::OpImageSampleProjDrefImplicitLod || + opcode == spv::Op::OpImageSampleProjDrefExplicitLod || + opcode == spv::Op::OpImageFetch || + opcode == spv::Op::OpImageGather || + opcode == spv::Op::OpImageDrefGather || + opcode == spv::Op::OpImageRead || opcode == spv::Op::OpImageWrite || + opcode == spv::Op::OpImageSparseSampleImplicitLod || + opcode == spv::Op::OpImageSparseSampleExplicitLod || + opcode == spv::Op::OpImageSparseSampleDrefImplicitLod || + opcode == spv::Op::OpImageSparseSampleDrefExplicitLod || + opcode == spv::Op::OpImageSparseSampleProjImplicitLod || + opcode == spv::Op::OpImageSparseSampleProjExplicitLod || + opcode == spv::Op::OpImageSparseSampleProjDrefImplicitLod || + opcode == spv::Op::OpImageSparseSampleProjDrefExplicitLod || + opcode == spv::Op::OpImageSparseFetch || + opcode == spv::Op::OpImageSparseGather || + opcode == spv::Op::OpImageSparseDrefGather || + opcode == spv::Op::OpImageSparseRead) && "Wrong opcode. Should be an image instruction."); int32_t operand_index = ImageOperandsMaskInOperandIndex(inst); if (operand_index >= 0) { auto image_operands = inst->GetSingleWordInOperand(operand_index); - if (image_operands & SpvImageOperandsOffsetMask) { + if (image_operands & uint32_t(spv::ImageOperandsMask::Offset)) { uint32_t offset_operand_index = operand_index + 1; - if (image_operands & SpvImageOperandsBiasMask) offset_operand_index++; - if (image_operands & SpvImageOperandsLodMask) offset_operand_index++; - if (image_operands & SpvImageOperandsGradMask) + if (image_operands & uint32_t(spv::ImageOperandsMask::Bias)) + offset_operand_index++; + if (image_operands & uint32_t(spv::ImageOperandsMask::Lod)) + offset_operand_index++; + if (image_operands & uint32_t(spv::ImageOperandsMask::Grad)) offset_operand_index += 2; - assert(((image_operands & SpvImageOperandsConstOffsetMask) == 0) && + assert(((image_operands & + uint32_t(spv::ImageOperandsMask::ConstOffset)) == 0) && "Offset and ConstOffset may not be used together"); if (offset_operand_index < inst->NumOperands()) { if (constants[offset_operand_index]) { - image_operands = image_operands | SpvImageOperandsConstOffsetMask; - image_operands = image_operands & ~SpvImageOperandsOffsetMask; + if (constants[offset_operand_index]->IsZero()) { + inst->RemoveInOperand(offset_operand_index); + } else { + image_operands = image_operands | + uint32_t(spv::ImageOperandsMask::ConstOffset); + } + image_operands = + image_operands & ~uint32_t(spv::ImageOperandsMask::Offset); inst->SetInOperand(operand_index, {image_operands}); return true; } @@ -2524,104 +2917,119 @@ void FoldingRules::AddFoldingRules() { // Note that the order in which rules are added to the list matters. If a rule // applies to the instruction, the rest of the rules will not be attempted. // Take that into consideration. - rules_[SpvOpBitcast].push_back(BitCastScalarOrVector()); - - rules_[SpvOpCompositeConstruct].push_back(CompositeExtractFeedingConstruct); - - rules_[SpvOpCompositeExtract].push_back(InsertFeedingExtract()); - rules_[SpvOpCompositeExtract].push_back(CompositeConstructFeedingExtract); - rules_[SpvOpCompositeExtract].push_back(VectorShuffleFeedingExtract()); - rules_[SpvOpCompositeExtract].push_back(FMixFeedingExtract()); - - rules_[SpvOpDot].push_back(DotProductDoingExtract()); - - rules_[SpvOpEntryPoint].push_back(RemoveRedundantOperands()); - - rules_[SpvOpFAdd].push_back(RedundantFAdd()); - rules_[SpvOpFAdd].push_back(MergeAddNegateArithmetic()); - rules_[SpvOpFAdd].push_back(MergeAddAddArithmetic()); - rules_[SpvOpFAdd].push_back(MergeAddSubArithmetic()); - rules_[SpvOpFAdd].push_back(MergeGenericAddSubArithmetic()); - rules_[SpvOpFAdd].push_back(FactorAddMuls()); - - rules_[SpvOpFDiv].push_back(RedundantFDiv()); - rules_[SpvOpFDiv].push_back(ReciprocalFDiv()); - rules_[SpvOpFDiv].push_back(MergeDivDivArithmetic()); - rules_[SpvOpFDiv].push_back(MergeDivMulArithmetic()); - rules_[SpvOpFDiv].push_back(MergeDivNegateArithmetic()); - - rules_[SpvOpFMul].push_back(RedundantFMul()); - rules_[SpvOpFMul].push_back(MergeMulMulArithmetic()); - rules_[SpvOpFMul].push_back(MergeMulDivArithmetic()); - rules_[SpvOpFMul].push_back(MergeMulNegateArithmetic()); - - rules_[SpvOpFNegate].push_back(MergeNegateArithmetic()); - rules_[SpvOpFNegate].push_back(MergeNegateAddSubArithmetic()); - rules_[SpvOpFNegate].push_back(MergeNegateMulDivArithmetic()); - - rules_[SpvOpFSub].push_back(RedundantFSub()); - rules_[SpvOpFSub].push_back(MergeSubNegateArithmetic()); - rules_[SpvOpFSub].push_back(MergeSubAddArithmetic()); - rules_[SpvOpFSub].push_back(MergeSubSubArithmetic()); - - rules_[SpvOpIAdd].push_back(RedundantIAdd()); - rules_[SpvOpIAdd].push_back(MergeAddNegateArithmetic()); - rules_[SpvOpIAdd].push_back(MergeAddAddArithmetic()); - rules_[SpvOpIAdd].push_back(MergeAddSubArithmetic()); - rules_[SpvOpIAdd].push_back(MergeGenericAddSubArithmetic()); - rules_[SpvOpIAdd].push_back(FactorAddMuls()); - - rules_[SpvOpIMul].push_back(IntMultipleBy1()); - rules_[SpvOpIMul].push_back(MergeMulMulArithmetic()); - rules_[SpvOpIMul].push_back(MergeMulNegateArithmetic()); - - rules_[SpvOpISub].push_back(MergeSubNegateArithmetic()); - rules_[SpvOpISub].push_back(MergeSubAddArithmetic()); - rules_[SpvOpISub].push_back(MergeSubSubArithmetic()); - - rules_[SpvOpPhi].push_back(RedundantPhi()); - - rules_[SpvOpSNegate].push_back(MergeNegateArithmetic()); - rules_[SpvOpSNegate].push_back(MergeNegateMulDivArithmetic()); - rules_[SpvOpSNegate].push_back(MergeNegateAddSubArithmetic()); - - rules_[SpvOpSelect].push_back(RedundantSelect()); - - rules_[SpvOpStore].push_back(StoringUndef()); - - rules_[SpvOpVectorShuffle].push_back(VectorShuffleFeedingShuffle()); - - rules_[SpvOpImageSampleImplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleExplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleDrefImplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleDrefExplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleProjImplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleProjExplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleProjDrefImplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSampleProjDrefExplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageFetch].push_back(UpdateImageOperands()); - rules_[SpvOpImageGather].push_back(UpdateImageOperands()); - rules_[SpvOpImageDrefGather].push_back(UpdateImageOperands()); - rules_[SpvOpImageRead].push_back(UpdateImageOperands()); - rules_[SpvOpImageWrite].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseSampleImplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseSampleExplicitLod].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseSampleDrefImplicitLod].push_back( + rules_[spv::Op::OpBitcast].push_back(BitCastScalarOrVector()); + + rules_[spv::Op::OpCompositeConstruct].push_back( + CompositeExtractFeedingConstruct); + + rules_[spv::Op::OpCompositeExtract].push_back(InsertFeedingExtract()); + rules_[spv::Op::OpCompositeExtract].push_back( + CompositeConstructFeedingExtract); + rules_[spv::Op::OpCompositeExtract].push_back(VectorShuffleFeedingExtract()); + rules_[spv::Op::OpCompositeExtract].push_back(FMixFeedingExtract()); + + rules_[spv::Op::OpCompositeInsert].push_back( + CompositeInsertToCompositeConstruct); + + rules_[spv::Op::OpDot].push_back(DotProductDoingExtract()); + + rules_[spv::Op::OpEntryPoint].push_back(RemoveRedundantOperands()); + + rules_[spv::Op::OpFAdd].push_back(RedundantFAdd()); + rules_[spv::Op::OpFAdd].push_back(MergeAddNegateArithmetic()); + rules_[spv::Op::OpFAdd].push_back(MergeAddAddArithmetic()); + rules_[spv::Op::OpFAdd].push_back(MergeAddSubArithmetic()); + rules_[spv::Op::OpFAdd].push_back(MergeGenericAddSubArithmetic()); + rules_[spv::Op::OpFAdd].push_back(FactorAddMuls()); + rules_[spv::Op::OpFAdd].push_back(MergeMulAddArithmetic); + + rules_[spv::Op::OpFDiv].push_back(RedundantFDiv()); + rules_[spv::Op::OpFDiv].push_back(ReciprocalFDiv()); + rules_[spv::Op::OpFDiv].push_back(MergeDivDivArithmetic()); + rules_[spv::Op::OpFDiv].push_back(MergeDivMulArithmetic()); + rules_[spv::Op::OpFDiv].push_back(MergeDivNegateArithmetic()); + + rules_[spv::Op::OpFMul].push_back(RedundantFMul()); + rules_[spv::Op::OpFMul].push_back(MergeMulMulArithmetic()); + rules_[spv::Op::OpFMul].push_back(MergeMulDivArithmetic()); + rules_[spv::Op::OpFMul].push_back(MergeMulNegateArithmetic()); + + rules_[spv::Op::OpFNegate].push_back(MergeNegateArithmetic()); + rules_[spv::Op::OpFNegate].push_back(MergeNegateAddSubArithmetic()); + rules_[spv::Op::OpFNegate].push_back(MergeNegateMulDivArithmetic()); + + rules_[spv::Op::OpFSub].push_back(RedundantFSub()); + rules_[spv::Op::OpFSub].push_back(MergeSubNegateArithmetic()); + rules_[spv::Op::OpFSub].push_back(MergeSubAddArithmetic()); + rules_[spv::Op::OpFSub].push_back(MergeSubSubArithmetic()); + rules_[spv::Op::OpFSub].push_back(MergeMulSubArithmetic); + + rules_[spv::Op::OpIAdd].push_back(RedundantIAdd()); + rules_[spv::Op::OpIAdd].push_back(MergeAddNegateArithmetic()); + rules_[spv::Op::OpIAdd].push_back(MergeAddAddArithmetic()); + rules_[spv::Op::OpIAdd].push_back(MergeAddSubArithmetic()); + rules_[spv::Op::OpIAdd].push_back(MergeGenericAddSubArithmetic()); + rules_[spv::Op::OpIAdd].push_back(FactorAddMuls()); + + rules_[spv::Op::OpIMul].push_back(IntMultipleBy1()); + rules_[spv::Op::OpIMul].push_back(MergeMulMulArithmetic()); + rules_[spv::Op::OpIMul].push_back(MergeMulNegateArithmetic()); + + rules_[spv::Op::OpISub].push_back(MergeSubNegateArithmetic()); + rules_[spv::Op::OpISub].push_back(MergeSubAddArithmetic()); + rules_[spv::Op::OpISub].push_back(MergeSubSubArithmetic()); + + rules_[spv::Op::OpPhi].push_back(RedundantPhi()); + + rules_[spv::Op::OpSNegate].push_back(MergeNegateArithmetic()); + rules_[spv::Op::OpSNegate].push_back(MergeNegateMulDivArithmetic()); + rules_[spv::Op::OpSNegate].push_back(MergeNegateAddSubArithmetic()); + + rules_[spv::Op::OpSelect].push_back(RedundantSelect()); + + rules_[spv::Op::OpStore].push_back(StoringUndef()); + + rules_[spv::Op::OpVectorShuffle].push_back(VectorShuffleFeedingShuffle()); + + rules_[spv::Op::OpImageSampleImplicitLod].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSampleExplicitLod].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSampleDrefImplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSampleDrefExplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSampleProjImplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSampleProjExplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSampleProjDrefImplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSampleProjDrefExplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageFetch].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageGather].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageDrefGather].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageRead].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageWrite].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSparseSampleImplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSparseSampleExplicitLod].push_back( + UpdateImageOperands()); + rules_[spv::Op::OpImageSparseSampleDrefImplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseSampleDrefExplicitLod].push_back( + rules_[spv::Op::OpImageSparseSampleDrefExplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseSampleProjImplicitLod].push_back( + rules_[spv::Op::OpImageSparseSampleProjImplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseSampleProjExplicitLod].push_back( + rules_[spv::Op::OpImageSparseSampleProjExplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseSampleProjDrefImplicitLod].push_back( + rules_[spv::Op::OpImageSparseSampleProjDrefImplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseSampleProjDrefExplicitLod].push_back( + rules_[spv::Op::OpImageSparseSampleProjDrefExplicitLod].push_back( UpdateImageOperands()); - rules_[SpvOpImageSparseFetch].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseGather].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseDrefGather].push_back(UpdateImageOperands()); - rules_[SpvOpImageSparseRead].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSparseFetch].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSparseGather].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSparseDrefGather].push_back(UpdateImageOperands()); + rules_[spv::Op::OpImageSparseRead].push_back(UpdateImageOperands()); FeatureManager* feature_manager = context_->get_feature_mgr(); // Add rules for GLSLstd450 diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.h index f1a86395c..b51e0ce4a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/folding_rules.h @@ -64,7 +64,7 @@ class FoldingRules { virtual ~FoldingRules() = default; const FoldingRuleSet& GetRulesForInstruction(Instruction* inst) const { - if (inst->opcode() != SpvOpExtInst) { + if (inst->opcode() != spv::Op::OpExtInst) { auto it = rules_.find(inst->opcode()); if (it != rules_.end()) { return it->second; @@ -86,8 +86,14 @@ class FoldingRules { virtual void AddFoldingRules(); protected: + struct hasher { + size_t operator()(const spv::Op& op) const noexcept { + return std::hash()(uint32_t(op)); + } + }; + // The folding rules for core instructions. - std::unordered_map rules_; + std::unordered_map rules_; // The folding rules for extended instructions. struct Key { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp index 10e98fd8b..3f89e56c0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/freeze_spec_constant_value_pass.cpp @@ -23,21 +23,21 @@ Pass::Status FreezeSpecConstantValuePass::Process() { auto ctx = context(); ctx->module()->ForEachInst([&modified, ctx](Instruction* inst) { switch (inst->opcode()) { - case SpvOp::SpvOpSpecConstant: - inst->SetOpcode(SpvOp::SpvOpConstant); + case spv::Op::OpSpecConstant: + inst->SetOpcode(spv::Op::OpConstant); modified = true; break; - case SpvOp::SpvOpSpecConstantTrue: - inst->SetOpcode(SpvOp::SpvOpConstantTrue); + case spv::Op::OpSpecConstantTrue: + inst->SetOpcode(spv::Op::OpConstantTrue); modified = true; break; - case SpvOp::SpvOpSpecConstantFalse: - inst->SetOpcode(SpvOp::SpvOpConstantFalse); + case spv::Op::OpSpecConstantFalse: + inst->SetOpcode(spv::Op::OpConstantFalse); modified = true; break; - case SpvOp::SpvOpDecorate: - if (inst->GetSingleWordInOperand(1) == - SpvDecoration::SpvDecorationSpecId) { + case spv::Op::OpDecorate: + if (spv::Decoration(inst->GetSingleWordInOperand(1)) == + spv::Decoration::SpecId) { ctx->KillInst(inst); modified = true; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.cpp index 38c669510..2ee88eca8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.cpp @@ -15,9 +15,7 @@ #include "source/opt/function.h" #include -#include -#include "function.h" #include "ir_context.h" #include "source/util/bit_vector.h" @@ -264,11 +262,19 @@ std::string Function::PrettyPrint(uint32_t options) const { std::ostringstream str; ForEachInst([&str, options](const Instruction* inst) { str << inst->PrettyPrint(options); - if (inst->opcode() != SpvOpFunctionEnd) { + if (inst->opcode() != spv::Op::OpFunctionEnd) { str << std::endl; } }); return str.str(); } + +void Function::ReorderBasicBlocksInStructuredOrder() { + std::list order; + IRContext* context = this->def_inst_->context(); + context->cfg()->ComputeStructuredOrder(this, blocks_[0].get(), &order); + ReorderBasicBlocks(order.begin(), order.end()); +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.h index 917bf5843..8c0472cd2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/function.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -180,7 +181,19 @@ class Function { // Returns true is a function declaration and not a function definition. bool IsDeclaration() { return begin() == end(); } + // Reorders the basic blocks in the function to match the structured order. + void ReorderBasicBlocksInStructuredOrder(); + private: + // Reorders the basic blocks in the function to match the order given by the + // range |{begin,end}|. The range must contain every basic block in the + // function, and no extras. + template + void ReorderBasicBlocks(It begin, It end); + + template + bool ContainsAllBlocksInTheFunction(It begin, It end); + // The OpFunction instruction that begins the definition of this function. std::unique_ptr def_inst_; // All parameters to this function. @@ -240,7 +253,7 @@ inline void Function::RemoveEmptyBlocks() { auto first_empty = std::remove_if(std::begin(blocks_), std::end(blocks_), [](const std::unique_ptr& bb) -> bool { - return bb->GetLabelInst()->opcode() == SpvOpNop; + return bb->GetLabelInst()->opcode() == spv::Op::OpNop; }); blocks_.erase(first_empty, std::end(blocks_)); } @@ -262,6 +275,34 @@ inline void Function::AddNonSemanticInstruction( non_semantic_.emplace_back(std::move(non_semantic)); } +template +void Function::ReorderBasicBlocks(It begin, It end) { + // Asserts to make sure every node in the function is in new_order. + assert(ContainsAllBlocksInTheFunction(begin, end)); + + // We have a pointer to all the elements in order, so we can release all + // pointers in |block_|, and then create the new unique pointers from |{begin, + // end}|. + std::for_each(blocks_.begin(), blocks_.end(), + [](std::unique_ptr& bb) { bb.release(); }); + std::transform(begin, end, blocks_.begin(), [](BasicBlock* bb) { + return std::unique_ptr(bb); + }); +} + +template +bool Function::ContainsAllBlocksInTheFunction(It begin, It end) { + std::unordered_multiset range(begin, end); + if (range.size() != blocks_.size()) { + return false; + } + + for (auto& bb : blocks_) { + if (range.count(bb.get()) == 0) return false; + } + return true; +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.cpp index 336dcd83e..e765c3976 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.cpp @@ -13,7 +13,7 @@ // limitations under the License. // This pass injects code in a graphics shader to implement guarantees -// satisfying Vulkan's robustBufferAcces rules. Robust access rules permit +// satisfying Vulkan's robustBufferAccess rules. Robust access rules permit // an out-of-bounds access to be redirected to an access of the same type // (load, store, etc.) but within the same root object. // @@ -74,7 +74,7 @@ // Pointers are always (correctly) typed and so the address and number of // consecutive locations are fully determined by the pointer. // -// - A pointer value orginates as one of few cases: +// - A pointer value originates as one of few cases: // // - OpVariable for an interface object or an array of them: image, // buffer (UBO or SSBO), sampler, sampled-image, push-constant, input @@ -141,24 +141,17 @@ #include "graphics_robust_access_pass.h" -#include -#include #include #include -#include #include -#include "constants.h" -#include "def_use_manager.h" #include "function.h" #include "ir_context.h" -#include "module.h" #include "pass.h" #include "source/diagnostic.h" #include "source/util/make_unique.h" #include "spirv-tools/libspirv.h" #include "spirv/unified1/GLSL.std.450.h" -#include "spirv/unified1/spirv.h" #include "type_manager.h" #include "types.h" @@ -194,14 +187,15 @@ spvtools::DiagnosticStream GraphicsRobustAccessPass::Fail() { spv_result_t GraphicsRobustAccessPass::IsCompatibleModule() { auto* feature_mgr = context()->get_feature_mgr(); - if (!feature_mgr->HasCapability(SpvCapabilityShader)) + if (!feature_mgr->HasCapability(spv::Capability::Shader)) return Fail() << "Can only process Shader modules"; - if (feature_mgr->HasCapability(SpvCapabilityVariablePointers)) + if (feature_mgr->HasCapability(spv::Capability::VariablePointers)) return Fail() << "Can't process modules with VariablePointers capability"; - if (feature_mgr->HasCapability(SpvCapabilityVariablePointersStorageBuffer)) + if (feature_mgr->HasCapability( + spv::Capability::VariablePointersStorageBuffer)) return Fail() << "Can't process modules with VariablePointersStorageBuffer " "capability"; - if (feature_mgr->HasCapability(SpvCapabilityRuntimeDescriptorArrayEXT)) { + if (feature_mgr->HasCapability(spv::Capability::RuntimeDescriptorArrayEXT)) { // These have a RuntimeArray outside of Block-decorated struct. There // is no way to compute the array length from within SPIR-V. return Fail() << "Can't process modules with RuntimeDescriptorArrayEXT " @@ -210,8 +204,9 @@ spv_result_t GraphicsRobustAccessPass::IsCompatibleModule() { { auto* inst = context()->module()->GetMemoryModel(); - const auto addressing_model = inst->GetSingleWordOperand(0); - if (addressing_model != SpvAddressingModelLogical) + const auto addressing_model = + spv::AddressingModel(inst->GetSingleWordOperand(0)); + if (addressing_model != spv::AddressingModel::Logical) return Fail() << "Addressing model must be Logical. Found " << inst->PrettyPrint(); } @@ -237,11 +232,11 @@ bool GraphicsRobustAccessPass::ProcessAFunction(opt::Function* function) { for (auto& block : *function) { for (auto& inst : block) { switch (inst.opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: access_chains.push_back(&inst); break; - case SpvOpImageTexelPointer: + case spv::Op::OpImageTexelPointer: image_texel_pointers.push_back(&inst); break; default: @@ -268,7 +263,7 @@ void GraphicsRobustAccessPass::ClampIndicesForAccessChain( auto* def_use_mgr = context()->get_def_use_mgr(); auto* type_mgr = context()->get_type_mgr(); const bool have_int64_cap = - context()->get_feature_mgr()->HasCapability(SpvCapabilityInt64); + context()->get_feature_mgr()->HasCapability(spv::Capability::Int64); // Replaces one of the OpAccessChain index operands with a new value. // Updates def-use analysis. @@ -451,7 +446,7 @@ void GraphicsRobustAccessPass::ClampIndicesForAccessChain( // It doesn't matter if 1 is signed or unsigned. auto* one = GetValueForType(1, wider_type); auto* count_minus_1 = InsertInst( - &inst, SpvOpISub, type_mgr->GetId(wider_type), TakeNextId(), + &inst, spv::Op::OpISub, type_mgr->GetId(wider_type), TakeNextId(), {{SPV_OPERAND_TYPE_ID, {count_inst->result_id()}}, {SPV_OPERAND_TYPE_ID, {one->result_id()}}}); auto* zero = GetValueForType(0, wider_type); @@ -486,15 +481,15 @@ void GraphicsRobustAccessPass::ClampIndicesForAccessChain( Instruction* index_inst = GetDef(index_id); switch (pointee_type->opcode()) { - case SpvOpTypeMatrix: // Use column count - case SpvOpTypeVector: // Use component count + case spv::Op::OpTypeMatrix: // Use column count + case spv::Op::OpTypeVector: // Use component count { const uint32_t count = pointee_type->GetSingleWordOperand(2); clamp_to_literal_count(idx, count); pointee_type = GetDef(pointee_type->GetSingleWordOperand(1)); } break; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { // The array length can be a spec constant, so go through the general // case. Instruction* array_len = GetDef(pointee_type->GetSingleWordOperand(2)); @@ -502,11 +497,11 @@ void GraphicsRobustAccessPass::ClampIndicesForAccessChain( pointee_type = GetDef(pointee_type->GetSingleWordOperand(1)); } break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { // SPIR-V requires the index to be an OpConstant. // We need to know the index literal value so we can compute the next // pointee type. - if (index_inst->opcode() != SpvOpConstant || + if (index_inst->opcode() != spv::Op::OpConstant || !constant_mgr->GetConstantFromInst(index_inst) ->type() ->AsInteger()) { @@ -537,7 +532,7 @@ void GraphicsRobustAccessPass::ClampIndicesForAccessChain( // No need to clamp this index. We just checked that it's valid. } break; - case SpvOpTypeRuntimeArray: { + case spv::Op::OpTypeRuntimeArray: { auto* array_len = MakeRuntimeArrayLengthInst(&inst, idx); if (!array_len) { // We've already signaled an error. return; @@ -571,16 +566,16 @@ uint32_t GraphicsRobustAccessPass::GetGlslInsts() { module_status_.glsl_insts_id = TakeNextId(); std::vector words = spvtools::utils::MakeVector(glsl); auto import_inst = MakeUnique( - context(), SpvOpExtInstImport, 0, module_status_.glsl_insts_id, + context(), spv::Op::OpExtInstImport, 0, module_status_.glsl_insts_id, std::initializer_list{ Operand{SPV_OPERAND_TYPE_LITERAL_STRING, std::move(words)}}); Instruction* inst = import_inst.get(); context()->module()->AddExtInstImport(std::move(import_inst)); module_status_.modified = true; context()->AnalyzeDefUse(inst); - // Reanalyze the feature list, since we added an extended instruction - // set improt. - context()->get_feature_mgr()->Analyze(context()->module()); + // Invalidates the feature manager, since we added an extended instruction + // set import. + context()->ResetFeatureManager(); } } return module_status_.glsl_insts_id; @@ -609,8 +604,8 @@ opt::Instruction* opt::GraphicsRobustAccessPass::WidenInteger( auto type_id = context()->get_type_mgr()->GetId(unsigned_type); auto conversion_id = TakeNextId(); auto* conversion = InsertInst( - before_inst, (sign_extend ? SpvOpSConvert : SpvOpUConvert), type_id, - conversion_id, {{SPV_OPERAND_TYPE_ID, {value->result_id()}}}); + before_inst, (sign_extend ? spv::Op::OpSConvert : spv::Op::OpUConvert), + type_id, conversion_id, {{SPV_OPERAND_TYPE_ID, {value->result_id()}}}); return conversion; } @@ -628,7 +623,7 @@ Instruction* GraphicsRobustAccessPass::MakeUMinInst( (void)xwidth; (void)ywidth; auto* smin_inst = InsertInst( - where, SpvOpExtInst, x->type_id(), smin_id, + where, spv::Op::OpExtInst, x->type_id(), smin_id, { {SPV_OPERAND_TYPE_ID, {glsl_insts_id}}, {SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER, {GLSLstd450UMin}}, @@ -655,7 +650,7 @@ Instruction* GraphicsRobustAccessPass::MakeSClampInst( (void)minwidth; (void)maxwidth; auto* clamp_inst = InsertInst( - where, SpvOpExtInst, x->type_id(), clamp_id, + where, spv::Op::OpExtInst, x->type_id(), clamp_id, { {SPV_OPERAND_TYPE_ID, {glsl_insts_id}}, {SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER, {GLSLstd450SClamp}}, @@ -689,13 +684,13 @@ Instruction* GraphicsRobustAccessPass::MakeRuntimeArrayLengthInst( Instruction* pointer_to_containing_struct = nullptr; while (steps_remaining > 0) { switch (current_access_chain->opcode()) { - case SpvOpCopyObject: + case spv::Op::OpCopyObject: // Whoops. Walk right through this one. current_access_chain = GetDef(current_access_chain->GetSingleWordInOperand(0)); break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: { + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: { const int first_index_operand = 3; // How many indices in this access chain contribute to getting us // to an element in the runtime array? @@ -793,7 +788,8 @@ Instruction* GraphicsRobustAccessPass::MakeRuntimeArrayLengthInst( analysis::Integer uint_type_for_query(32, false); auto* uint_type = type_mgr->GetRegisteredType(&uint_type_for_query); auto* array_len = InsertInst( - access_chain, SpvOpArrayLength, type_mgr->GetId(uint_type), array_len_id, + access_chain, spv::Op::OpArrayLength, type_mgr->GetId(uint_type), + array_len_id, {{SPV_OPERAND_TYPE_ID, {pointer_to_containing_struct->result_id()}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, {member_index_of_runtime_array}}}); return array_len; @@ -839,11 +835,11 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( // Declare the ImageQuery capability if the module doesn't already have it. auto* feature_mgr = context()->get_feature_mgr(); - if (!feature_mgr->HasCapability(SpvCapabilityImageQuery)) { + if (!feature_mgr->HasCapability(spv::Capability::ImageQuery)) { auto cap = MakeUnique( - context(), SpvOpCapability, 0, 0, + context(), spv::Op::OpCapability, 0, 0, std::initializer_list{ - {SPV_OPERAND_TYPE_CAPABILITY, {SpvCapabilityImageQuery}}}); + {SPV_OPERAND_TYPE_CAPABILITY, {spv::Capability::ImageQuery}}}); def_use_mgr->AnalyzeInstDefUse(cap.get()); context()->AddCapability(std::move(cap)); feature_mgr->Analyze(context()->module()); @@ -890,21 +886,21 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( const int arrayness_bonus = arrayed ? 1 : 0; int num_coords = 0; switch (dim) { - case SpvDimBuffer: + case spv::Dim::Buffer: case SpvDim1D: num_coords = 1; break; - case SpvDimCube: + case spv::Dim::Cube: // For cube, we need bounds for x, y, but not face. - case SpvDimRect: + case spv::Dim::Rect: case SpvDim2D: num_coords = 2; break; case SpvDim3D: num_coords = 3; break; - case SpvDimSubpassData: - case SpvDimMax: + case spv::Dim::SubpassData: + case spv::Dim::Max: return Fail() << "Invalid image dimension for OpImageTexelPointer: " << int(dim); break; @@ -941,12 +937,12 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( const uint32_t image_id = TakeNextId(); auto* image = - InsertInst(image_texel_pointer, SpvOpLoad, image_type_id, image_id, + InsertInst(image_texel_pointer, spv::Op::OpLoad, image_type_id, image_id, {{SPV_OPERAND_TYPE_ID, {image_ptr->result_id()}}}); const uint32_t query_size_id = TakeNextId(); auto* query_size = - InsertInst(image_texel_pointer, SpvOpImageQuerySize, + InsertInst(image_texel_pointer, spv::Op::OpImageQuerySize, type_mgr->GetTypeInstruction(query_size_type), query_size_id, {{SPV_OPERAND_TYPE_ID, {image->result_id()}}}); @@ -958,11 +954,11 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( constant_mgr->GetDefiningInstruction(component_0)->result_id(); // If the image is a cube array, then the last component of the queried - // size is the layer count. In the query, we have to accomodate folding + // size is the layer count. In the query, we have to accommodate folding // in the face index ranging from 0 through 5. The inclusive upper bound // on the third coordinate therefore is multiplied by 6. auto* query_size_including_faces = query_size; - if (arrayed && (dim == SpvDimCube)) { + if (arrayed && (dim == spv::Dim::Cube)) { // Multiply the last coordinate by 6. auto* component_6 = constant_mgr->GetConstant(coord_component_type, {6}); const uint32_t component_6_id = @@ -974,7 +970,7 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( constant_mgr->GetDefiningInstruction(multiplicand); const auto query_size_including_faces_id = TakeNextId(); query_size_including_faces = InsertInst( - image_texel_pointer, SpvOpIMul, + image_texel_pointer, spv::Op::OpIMul, type_mgr->GetTypeInstruction(query_size_type), query_size_including_faces_id, {{SPV_OPERAND_TYPE_ID, {query_size_including_faces->result_id()}}, @@ -998,7 +994,7 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( const uint32_t query_max_including_faces_id = TakeNextId(); auto* query_max_including_faces = InsertInst( - image_texel_pointer, SpvOpISub, + image_texel_pointer, spv::Op::OpISub, type_mgr->GetTypeInstruction(query_size_type), query_max_including_faces_id, {{SPV_OPERAND_TYPE_ID, {query_size_including_faces->result_id()}}, @@ -1016,12 +1012,12 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( // Get the sample count via OpImageQuerySamples const auto query_samples_id = TakeNextId(); auto* query_samples = InsertInst( - image_texel_pointer, SpvOpImageQuerySamples, + image_texel_pointer, spv::Op::OpImageQuerySamples, constant_mgr->GetDefiningInstruction(component_0)->type_id(), query_samples_id, {{SPV_OPERAND_TYPE_ID, {image->result_id()}}}); const auto max_samples_id = TakeNextId(); - auto* max_samples = InsertInst(image_texel_pointer, SpvOpImageQuerySamples, + auto* max_samples = InsertInst(image_texel_pointer, spv::Op::OpImageQuerySamples, query_samples->type_id(), max_samples_id, {{SPV_OPERAND_TYPE_ID, {query_samples_id}}, {SPV_OPERAND_TYPE_ID, {component_1_id}}}); @@ -1043,7 +1039,7 @@ spv_result_t GraphicsRobustAccessPass::ClampCoordinateForImageTexelPointer( } opt::Instruction* GraphicsRobustAccessPass::InsertInst( - opt::Instruction* where_inst, SpvOp opcode, uint32_t type_id, + opt::Instruction* where_inst, spv::Op opcode, uint32_t type_id, uint32_t result_id, const Instruction::OperandList& operands) { module_status_.modified = true; auto* result = where_inst->InsertBefore( diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.h index 6fc692c13..a7ffe115b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/graphics_robust_access_pass.h @@ -111,7 +111,7 @@ class GraphicsRobustAccessPass : public Pass { Instruction* max, Instruction* where); // Returns a new instruction which evaluates to the length the runtime array - // referenced by the access chain at the specfied index. The instruction is + // referenced by the access chain at the specified index. The instruction is // inserted before the access chain instruction. Returns a null pointer in // some cases if assumptions are violated (rather than asserting out). opt::Instruction* MakeRuntimeArrayLengthInst(Instruction* access_chain, @@ -133,7 +133,7 @@ class GraphicsRobustAccessPass : public Pass { // Returns a new instruction inserted before |where_inst|, and created from // the remaining arguments. Registers the definitions and uses of the new // instruction and also records its block. - opt::Instruction* InsertInst(opt::Instruction* where_inst, SpvOp opcode, + opt::Instruction* InsertInst(opt::Instruction* where_inst, spv::Op opcode, uint32_t type_id, uint32_t result_id, const Instruction::OperandList& operands); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/if_conversion.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/if_conversion.cpp index 492066177..5912cf12d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/if_conversion.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/if_conversion.cpp @@ -23,7 +23,7 @@ namespace spvtools { namespace opt { Pass::Status IfConversion::Process() { - if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) { + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) { return Status::SuccessWithoutChange; } @@ -40,7 +40,7 @@ Pass::Status IfConversion::Process() { // Get an insertion point. auto iter = block.begin(); - while (iter != block.end() && iter->opcode() == SpvOpPhi) { + while (iter != block.end() && iter->opcode() == spv::Op::OpPhi) { ++iter; } @@ -160,27 +160,37 @@ bool IfConversion::CheckBlock(BasicBlock* block, DominatorAnalysis* dominators, BasicBlock* inc1 = context()->get_instr_block(preds[1]); if (dominators->Dominates(block, inc1)) return false; + if (inc0 == inc1) { + // If the predecessor blocks are the same, then there is only 1 value for + // the OpPhi. Other transformation should be able to simplify that. + return false; + } // All phis will have the same common dominator, so cache the result // for this block. If there is no common dominator, then we cannot transform // any phi in this basic block. *common = dominators->CommonDominator(inc0, inc1); if (!*common || cfg()->IsPseudoEntryBlock(*common)) return false; Instruction* branch = (*common)->terminator(); - if (branch->opcode() != SpvOpBranchConditional) return false; + if (branch->opcode() != spv::Op::OpBranchConditional) return false; auto merge = (*common)->GetMergeInst(); - if (!merge || merge->opcode() != SpvOpSelectionMerge) return false; + if (!merge || merge->opcode() != spv::Op::OpSelectionMerge) return false; + if (spv::SelectionControlMask(merge->GetSingleWordInOperand(1)) == + spv::SelectionControlMask::DontFlatten) { + return false; + } if ((*common)->MergeBlockIdIfAny() != block->id()) return false; return true; } bool IfConversion::CheckPhiUsers(Instruction* phi, BasicBlock* block) { - return get_def_use_mgr()->WhileEachUser(phi, [block, - this](Instruction* user) { - if (user->opcode() == SpvOpPhi && context()->get_instr_block(user) == block) - return false; - return true; - }); + return get_def_use_mgr()->WhileEachUser( + phi, [block, this](Instruction* user) { + if (user->opcode() == spv::Op::OpPhi && + context()->get_instr_block(user) == block) + return false; + return true; + }); } uint32_t IfConversion::SplatCondition(analysis::Vector* vec_data_ty, @@ -200,9 +210,9 @@ uint32_t IfConversion::SplatCondition(analysis::Vector* vec_data_ty, bool IfConversion::CheckType(uint32_t id) { Instruction* type = get_def_use_mgr()->GetDef(id); - SpvOp op = type->opcode(); - if (spvOpcodeIsScalarType(op) || op == SpvOpTypePointer || - op == SpvOpTypeVector) + spv::Op op = type->opcode(); + if (spvOpcodeIsScalarType(op) || op == spv::Op::OpTypePointer || + op == spv::Op::OpTypeVector) return true; return false; } @@ -248,7 +258,7 @@ void IfConversion::HoistInstruction(Instruction* inst, BasicBlock* target_block, }); Instruction* insertion_pos = target_block->terminator(); - if ((insertion_pos)->PreviousNode()->opcode() == SpvOpSelectionMerge) { + if ((insertion_pos)->PreviousNode()->opcode() == spv::Op::OpSelectionMerge) { insertion_pos = insertion_pos->PreviousNode(); } inst->RemoveFromList(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_opaque_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_opaque_pass.cpp index fe9c67993..90a4c2247 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_opaque_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_opaque_pass.cpp @@ -21,26 +21,24 @@ namespace spvtools { namespace opt { namespace { - -const uint32_t kTypePointerTypeIdInIdx = 1; - -} // anonymous namespace +constexpr uint32_t kTypePointerTypeIdInIdx = 1; +} // namespace bool InlineOpaquePass::IsOpaqueType(uint32_t typeId) { const Instruction* typeInst = get_def_use_mgr()->GetDef(typeId); switch (typeInst->opcode()) { - case SpvOpTypeSampler: - case SpvOpTypeImage: - case SpvOpTypeSampledImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampledImage: return true; - case SpvOpTypePointer: + case spv::Op::OpTypePointer: return IsOpaqueType( typeInst->GetSingleWordInOperand(kTypePointerTypeIdInIdx)); default: break; } // TODO(greg-lunarg): Handle arrays containing opaque type - if (typeInst->opcode() != SpvOpTypeStruct) return false; + if (typeInst->opcode() != spv::Op::OpTypeStruct) return false; // Return true if any member is opaque return !typeInst->WhileEachInId([this](const uint32_t* tid) { if (IsOpaqueType(*tid)) return false; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.cpp index 2cc31258e..318643341 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.cpp @@ -23,24 +23,24 @@ #include "source/opt/reflect.h" #include "source/util/make_unique.h" -// Indices of operands in SPIR-V instructions - -static const int kSpvFunctionCallFunctionId = 2; -static const int kSpvFunctionCallArgumentId = 3; -static const int kSpvReturnValueId = 0; - namespace spvtools { namespace opt { +namespace { +// Indices of operands in SPIR-V instructions +constexpr int kSpvFunctionCallFunctionId = 2; +constexpr int kSpvFunctionCallArgumentId = 3; +constexpr int kSpvReturnValueId = 0; +} // namespace uint32_t InlinePass::AddPointerToType(uint32_t type_id, - SpvStorageClass storage_class) { + spv::StorageClass storage_class) { uint32_t resultId = context()->TakeNextId(); if (resultId == 0) { return resultId; } std::unique_ptr type_inst( - new Instruction(context(), SpvOpTypePointer, 0, resultId, + new Instruction(context(), spv::Op::OpTypePointer, 0, resultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, {uint32_t(storage_class)}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {type_id}}})); @@ -48,8 +48,8 @@ uint32_t InlinePass::AddPointerToType(uint32_t type_id, analysis::Type* pointeeTy; std::unique_ptr pointerTy; std::tie(pointeeTy, pointerTy) = - context()->get_type_mgr()->GetTypeAndPointerType(type_id, - SpvStorageClassFunction); + context()->get_type_mgr()->GetTypeAndPointerType( + type_id, spv::StorageClass::Function); context()->get_type_mgr()->RegisterType(resultId, *pointerTy); return resultId; } @@ -57,7 +57,7 @@ uint32_t InlinePass::AddPointerToType(uint32_t type_id, void InlinePass::AddBranch(uint32_t label_id, std::unique_ptr* block_ptr) { std::unique_ptr newBranch( - new Instruction(context(), SpvOpBranch, 0, 0, + new Instruction(context(), spv::Op::OpBranch, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {label_id}}})); (*block_ptr)->AddInstruction(std::move(newBranch)); } @@ -66,7 +66,7 @@ void InlinePass::AddBranchCond(uint32_t cond_id, uint32_t true_id, uint32_t false_id, std::unique_ptr* block_ptr) { std::unique_ptr newBranch( - new Instruction(context(), SpvOpBranchConditional, 0, 0, + new Instruction(context(), spv::Op::OpBranchConditional, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cond_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {true_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {false_id}}})); @@ -76,7 +76,7 @@ void InlinePass::AddBranchCond(uint32_t cond_id, uint32_t true_id, void InlinePass::AddLoopMerge(uint32_t merge_id, uint32_t continue_id, std::unique_ptr* block_ptr) { std::unique_ptr newLoopMerge(new Instruction( - context(), SpvOpLoopMerge, 0, 0, + context(), spv::Op::OpLoopMerge, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {merge_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {continue_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LOOP_CONTROL, {0}}})); @@ -88,7 +88,7 @@ void InlinePass::AddStore(uint32_t ptr_id, uint32_t val_id, const Instruction* line_inst, const DebugScope& dbg_scope) { std::unique_ptr newStore( - new Instruction(context(), SpvOpStore, 0, 0, + new Instruction(context(), spv::Op::OpStore, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {val_id}}})); if (line_inst != nullptr) { @@ -103,7 +103,7 @@ void InlinePass::AddLoad(uint32_t type_id, uint32_t resultId, uint32_t ptr_id, const Instruction* line_inst, const DebugScope& dbg_scope) { std::unique_ptr newLoad( - new Instruction(context(), SpvOpLoad, type_id, resultId, + new Instruction(context(), spv::Op::OpLoad, type_id, resultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptr_id}}})); if (line_inst != nullptr) { newLoad->AddDebugLine(line_inst); @@ -114,27 +114,27 @@ void InlinePass::AddLoad(uint32_t type_id, uint32_t resultId, uint32_t ptr_id, std::unique_ptr InlinePass::NewLabel(uint32_t label_id) { std::unique_ptr newLabel( - new Instruction(context(), SpvOpLabel, 0, label_id, {})); + new Instruction(context(), spv::Op::OpLabel, 0, label_id, {})); return newLabel; } uint32_t InlinePass::GetFalseId() { if (false_id_ != 0) return false_id_; - false_id_ = get_module()->GetGlobalValue(SpvOpConstantFalse); + false_id_ = get_module()->GetGlobalValue(spv::Op::OpConstantFalse); if (false_id_ != 0) return false_id_; - uint32_t boolId = get_module()->GetGlobalValue(SpvOpTypeBool); + uint32_t boolId = get_module()->GetGlobalValue(spv::Op::OpTypeBool); if (boolId == 0) { boolId = context()->TakeNextId(); if (boolId == 0) { return 0; } - get_module()->AddGlobalValue(SpvOpTypeBool, boolId, 0); + get_module()->AddGlobalValue(spv::Op::OpTypeBool, boolId, 0); } false_id_ = context()->TakeNextId(); if (false_id_ == 0) { return 0; } - get_module()->AddGlobalValue(SpvOpConstantFalse, false_id_, boolId); + get_module()->AddGlobalValue(spv::Op::OpConstantFalse, false_id_, boolId); return false_id_; } @@ -157,10 +157,10 @@ bool InlinePass::CloneAndMapLocals( analysis::DebugInlinedAtContext* inlined_at_ctx) { auto callee_block_itr = calleeFn->begin(); auto callee_var_itr = callee_block_itr->begin(); - while (callee_var_itr->opcode() == SpvOp::SpvOpVariable || + while (callee_var_itr->opcode() == spv::Op::OpVariable || callee_var_itr->GetCommonDebugOpcode() == CommonDebugInfoDebugDeclare) { - if (callee_var_itr->opcode() != SpvOp::SpvOpVariable) { + if (callee_var_itr->opcode() != spv::Op::OpVariable) { ++callee_var_itr; continue; } @@ -191,10 +191,11 @@ uint32_t InlinePass::CreateReturnVar( "Cannot create a return variable of type void."); // Find or create ptr to callee return type. uint32_t returnVarTypeId = - type_mgr->FindPointerToType(calleeTypeId, SpvStorageClassFunction); + type_mgr->FindPointerToType(calleeTypeId, spv::StorageClass::Function); if (returnVarTypeId == 0) { - returnVarTypeId = AddPointerToType(calleeTypeId, SpvStorageClassFunction); + returnVarTypeId = + AddPointerToType(calleeTypeId, spv::StorageClass::Function); if (returnVarTypeId == 0) { return 0; } @@ -206,17 +207,31 @@ uint32_t InlinePass::CreateReturnVar( return 0; } - std::unique_ptr var_inst( - new Instruction(context(), SpvOpVariable, returnVarTypeId, returnVarId, - {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, - {SpvStorageClassFunction}}})); + std::unique_ptr var_inst(new Instruction( + context(), spv::Op::OpVariable, returnVarTypeId, returnVarId, + {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, + {(uint32_t)spv::StorageClass::Function}}})); new_vars->push_back(std::move(var_inst)); get_decoration_mgr()->CloneDecorations(calleeFn->result_id(), returnVarId); + + // Decorate the return var with AliasedPointer if the storage class of the + // pointee type is PhysicalStorageBuffer. + auto const pointee_type = + type_mgr->GetType(returnVarTypeId)->AsPointer()->pointee_type(); + if (pointee_type->AsPointer() != nullptr) { + if (pointee_type->AsPointer()->storage_class() == + spv::StorageClass::PhysicalStorageBuffer) { + get_decoration_mgr()->AddDecoration( + returnVarId, uint32_t(spv::Decoration::AliasedPointer)); + } + } + return returnVarId; } bool InlinePass::IsSameBlockOp(const Instruction* inst) const { - return inst->opcode() == SpvOpSampledImage || inst->opcode() == SpvOpImage; + return inst->opcode() == spv::Op::OpSampledImage || + inst->opcode() == spv::Op::OpImage; } bool InlinePass::CloneSameBlockOps( @@ -299,9 +314,9 @@ InstructionList::iterator InlinePass::AddStoresForVariableInitializers( std::unique_ptr* new_blk_ptr, UptrVectorIterator callee_first_block_itr) { auto callee_itr = callee_first_block_itr->begin(); - while (callee_itr->opcode() == SpvOp::SpvOpVariable || + while (callee_itr->opcode() == spv::Op::OpVariable || callee_itr->GetCommonDebugOpcode() == CommonDebugInfoDebugDeclare) { - if (callee_itr->opcode() == SpvOp::SpvOpVariable && + if (callee_itr->opcode() == spv::Op::OpVariable && callee_itr->NumInOperands() == 2) { assert(callee2caller.count(callee_itr->result_id()) && "Expected the variable to have already been mapped."); @@ -330,7 +345,8 @@ bool InlinePass::InlineSingleInstruction( BasicBlock* new_blk_ptr, const Instruction* inst, uint32_t dbg_inlined_at) { // If we have return, it must be at the end of the callee. We will handle // it at the end. - if (inst->opcode() == SpvOpReturnValue || inst->opcode() == SpvOpReturn) + if (inst->opcode() == spv::Op::OpReturnValue || + inst->opcode() == spv::Op::OpReturn) return true; // Copy callee instruction and remap all input Ids. @@ -366,7 +382,7 @@ std::unique_ptr InlinePass::InlineReturn( analysis::DebugInlinedAtContext* inlined_at_ctx, Function* calleeFn, const Instruction* inst, uint32_t returnVarId) { // Store return value to return variable. - if (inst->opcode() == SpvOpReturnValue) { + if (inst->opcode() == spv::Op::OpReturnValue) { assert(returnVarId != 0); uint32_t valId = inst->GetInOperand(kSpvReturnValueId).words[0]; const auto mapItr = callee2caller.find(valId); @@ -388,7 +404,8 @@ std::unique_ptr InlinePass::InlineReturn( } if (returnLabelId == 0) return new_blk_ptr; - if (inst->opcode() == SpvOpReturn || inst->opcode() == SpvOpReturnValue) + if (inst->opcode() == spv::Op::OpReturn || + inst->opcode() == spv::Op::OpReturnValue) AddBranch(returnLabelId, &new_blk_ptr); new_blocks->push_back(std::move(new_blk_ptr)); return MakeUnique(NewLabel(returnLabelId)); @@ -499,7 +516,7 @@ void InlinePass::MoveLoopMergeInstToFirstBlock( // Insert a modified copy of the loop merge into the first block. auto loop_merge_itr = last->tail(); --loop_merge_itr; - assert(loop_merge_itr->opcode() == SpvOpLoopMerge); + assert(loop_merge_itr->opcode() == spv::Op::OpLoopMerge); std::unique_ptr cp_inst(loop_merge_itr->Clone(context())); first->tail().InsertBefore(std::move(cp_inst)); @@ -508,6 +525,37 @@ void InlinePass::MoveLoopMergeInstToFirstBlock( delete &*loop_merge_itr; } +void InlinePass::UpdateSingleBlockLoopContinueTarget( + uint32_t new_id, std::vector>* new_blocks) { + auto& header = new_blocks->front(); + auto* merge_inst = header->GetLoopMergeInst(); + + // The back-edge block is split at the branch to create a new back-edge + // block. The old block is modified to branch to the new block. The loop + // merge instruction is updated to declare the new block as the continue + // target. This has the effect of changing the loop from being a large + // continue construct and an empty loop construct to being a loop with a loop + // construct and a trivial continue construct. This change is made to satisfy + // structural dominance. + + // Add the new basic block. + std::unique_ptr new_block = + MakeUnique(NewLabel(new_id)); + auto& old_backedge = new_blocks->back(); + auto old_branch = old_backedge->tail(); + + // Move the old back edge into the new block. + std::unique_ptr br(&*old_branch); + new_block->AddInstruction(std::move(br)); + + // Add a branch to the new block from the old back-edge block. + AddBranch(new_id, &old_backedge); + new_blocks->push_back(std::move(new_block)); + + // Update the loop's continue target to the new block. + merge_inst->SetInOperand(1u, {new_id}); +} + bool InlinePass::GenInlineCode( std::vector>* new_blocks, std::vector>* new_vars, @@ -639,9 +687,19 @@ bool InlinePass::GenInlineCode( // Finalize inline code. new_blocks->push_back(std::move(new_blk_ptr)); - if (caller_is_loop_header && (new_blocks->size() > 1)) + if (caller_is_loop_header && (new_blocks->size() > 1)) { MoveLoopMergeInstToFirstBlock(new_blocks); + // If the loop was a single basic block previously, update it's structure. + auto& header = new_blocks->front(); + auto* merge_inst = header->GetLoopMergeInst(); + if (merge_inst->GetSingleWordInOperand(1u) == header->id()) { + auto new_id = context()->TakeNextId(); + if (new_id == 0) return false; + UpdateSingleBlockLoopContinueTarget(new_id, new_blocks); + } + } + // Update block map given replacement blocks. for (auto& blk : *new_blocks) { id2block_[blk->id()] = &*blk; @@ -655,7 +713,7 @@ bool InlinePass::GenInlineCode( } bool InlinePass::IsInlinableFunctionCall(const Instruction* inst) { - if (inst->opcode() != SpvOp::SpvOpFunctionCall) return false; + if (inst->opcode() != spv::Op::OpFunctionCall) return false; const uint32_t calleeFnId = inst->GetSingleWordOperand(kSpvFunctionCallFunctionId); const auto ci = inlinable_.find(calleeFnId); @@ -697,7 +755,7 @@ void InlinePass::UpdateSucceedingPhis( bool InlinePass::HasNoReturnInLoop(Function* func) { // If control not structured, do not do loop/return analysis // TODO: Analyze returns in non-structured control flow - if (!context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) + if (!context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) return false; const auto structured_analysis = context()->GetStructuredCFGAnalysis(); // Search for returns in structured construct. @@ -735,7 +793,7 @@ bool InlinePass::IsInlinableFunction(Function* func) { if (func->cbegin() == func->cend()) return false; // Do not inline functions with DontInline flag. - if (func->control_mask() & SpvFunctionControlDontInlineMask) { + if (func->control_mask() & uint32_t(spv::FunctionControlMask::DontInline)) { return false; } @@ -753,22 +811,25 @@ bool InlinePass::IsInlinableFunction(Function* func) { return false; } - // Do not inline functions with an OpKill if they are called from a continue - // construct. If it is inlined into a continue construct it will generate - // invalid code. + // Do not inline functions with an abort instruction if they are called from a + // continue construct. If it is inlined into a continue construct the backedge + // will no longer post-dominate the continue target, which is invalid. An + // `OpUnreachable` is acceptable because it will not change post-dominance if + // it is statically unreachable. bool func_is_called_from_continue = funcs_called_from_continue_.count(func->result_id()) != 0; - if (func_is_called_from_continue && ContainsKillOrTerminateInvocation(func)) { + if (func_is_called_from_continue && ContainsAbortOtherThanUnreachable(func)) { return false; } return true; } -bool InlinePass::ContainsKillOrTerminateInvocation(Function* func) const { +bool InlinePass::ContainsAbortOtherThanUnreachable(Function* func) const { return !func->WhileEachInst([](Instruction* inst) { - return !spvOpcodeTerminatesExecution(inst->opcode()); + return inst->opcode() == spv::Op::OpUnreachable || + !spvOpcodeIsAbort(inst->opcode()); }); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.h index 9a5429bac..1c9d60e32 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inline_pass.h @@ -44,7 +44,7 @@ class InlinePass : public Pass { // Add pointer to type to module and return resultId. Returns 0 if the type // could not be created. - uint32_t AddPointerToType(uint32_t type_id, SpvStorageClass storage_class); + uint32_t AddPointerToType(uint32_t type_id, spv::StorageClass storage_class); // Add unconditional branch to labelId to end of block block_ptr. void AddBranch(uint32_t labelId, std::unique_ptr* block_ptr); @@ -139,9 +139,9 @@ class InlinePass : public Pass { // Return true if |func| is a function that can be inlined. bool IsInlinableFunction(Function* func); - // Returns true if |func| contains an OpKill or OpTerminateInvocation - // instruction. - bool ContainsKillOrTerminateInvocation(Function* func) const; + // Returns true if |func| contains an abort instruction that is not an + // `OpUnreachable` instruction. + bool ContainsAbortOtherThanUnreachable(Function* func) const; // Update phis in succeeding blocks to point to new last block void UpdateSucceedingPhis( @@ -235,6 +235,12 @@ class InlinePass : public Pass { // Move the OpLoopMerge from the last block back to the first. void MoveLoopMergeInstToFirstBlock( std::vector>* new_blocks); + + // Update the structure of single block loops so that the inlined code ends + // up in the loop construct and a new continue target is added to satisfy + // structural dominance. + void UpdateSingleBlockLoopContinueTarget( + uint32_t new_id, std::vector>* new_blocks); }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.cpp index 5607239aa..8e7d4f83e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.cpp @@ -16,95 +16,128 @@ #include "inst_bindless_check_pass.h" -namespace { +#include "source/spirv_constant.h" +namespace spvtools { +namespace opt { +namespace { // Input Operand Indices -static const int kSpvImageSampleImageIdInIdx = 0; -static const int kSpvSampledImageImageIdInIdx = 0; -static const int kSpvSampledImageSamplerIdInIdx = 1; -static const int kSpvImageSampledImageIdInIdx = 0; -static const int kSpvCopyObjectOperandIdInIdx = 0; -static const int kSpvLoadPtrIdInIdx = 0; -static const int kSpvAccessChainBaseIdInIdx = 0; -static const int kSpvAccessChainIndex0IdInIdx = 1; -static const int kSpvTypeArrayTypeIdInIdx = 0; -static const int kSpvTypeArrayLengthIdInIdx = 1; -static const int kSpvConstantValueInIdx = 0; -static const int kSpvVariableStorageClassInIdx = 0; -static const int kSpvTypePtrTypeIdInIdx = 1; -static const int kSpvTypeImageDim = 1; -static const int kSpvTypeImageDepth = 2; -static const int kSpvTypeImageArrayed = 3; -static const int kSpvTypeImageMS = 4; -static const int kSpvTypeImageSampled = 5; -} // anonymous namespace +constexpr int kSpvImageSampleImageIdInIdx = 0; +constexpr int kSpvSampledImageImageIdInIdx = 0; +constexpr int kSpvSampledImageSamplerIdInIdx = 1; +constexpr int kSpvImageSampledImageIdInIdx = 0; +constexpr int kSpvCopyObjectOperandIdInIdx = 0; +constexpr int kSpvLoadPtrIdInIdx = 0; +constexpr int kSpvAccessChainBaseIdInIdx = 0; +constexpr int kSpvAccessChainIndex0IdInIdx = 1; +constexpr int kSpvTypeArrayTypeIdInIdx = 0; +constexpr int kSpvVariableStorageClassInIdx = 0; +constexpr int kSpvTypePtrTypeIdInIdx = 1; +constexpr int kSpvTypeImageDim = 1; +constexpr int kSpvTypeImageDepth = 2; +constexpr int kSpvTypeImageArrayed = 3; +constexpr int kSpvTypeImageMS = 4; +} // namespace -// Avoid unused variable warning/error on Linux -#ifndef NDEBUG -#define USE_ASSERT(x) assert(x) -#else -#define USE_ASSERT(x) ((void)(x)) -#endif +// This is a stub function for use with Import linkage +// clang-format off +// GLSL: +//bool inst_bindless_check_desc(const uint shader_id, const uint inst_num, const uvec4 stage_info, const uint desc_set, +// const uint binding, const uint desc_index, const uint byte_offset) { +//} +// clang-format on +uint32_t InstBindlessCheckPass::GenDescCheckFunctionId() { + enum { + kShaderId = 0, + kInstructionIndex = 1, + kStageInfo = 2, + kDescSet = 3, + kDescBinding = 4, + kDescIndex = 5, + kByteOffset = 6, + kNumArgs + }; + if (check_desc_func_id_ != 0) { + return check_desc_func_id_; + } -namespace spvtools { -namespace opt { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + const analysis::Integer* uint_type = GetInteger(32, false); + const analysis::Vector v4uint(uint_type, 4); + const analysis::Type* v4uint_type = type_mgr->GetRegisteredType(&v4uint); + std::vector param_types(kNumArgs, uint_type); + param_types[2] = v4uint_type; + + const uint32_t func_id = TakeNextId(); + std::unique_ptr func = + StartFunction(func_id, type_mgr->GetBoolType(), param_types); + + func->SetFunctionEnd(EndFunction()); + + static const std::string func_name{"inst_bindless_check_desc"}; + context()->AddFunctionDeclaration(std::move(func)); + context()->AddDebug2Inst(NewName(func_id, func_name)); + std::vector operands{ + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {func_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + {uint32_t(spv::Decoration::LinkageAttributes)}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_STRING, + utils::MakeVector(func_name.c_str())}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LINKAGE_TYPE, + {uint32_t(spv::LinkageType::Import)}}, + }; + get_decoration_mgr()->AddDecoration(spv::Op::OpDecorate, operands); -uint32_t InstBindlessCheckPass::GenDebugReadLength( - uint32_t var_id, InstructionBuilder* builder) { - uint32_t desc_set_idx = - var2desc_set_[var_id] + kDebugInputBindlessOffsetLengths; - uint32_t desc_set_idx_id = builder->GetUintConstantId(desc_set_idx); - uint32_t binding_idx_id = builder->GetUintConstantId(var2binding_[var_id]); - return GenDebugDirectRead({desc_set_idx_id, binding_idx_id}, builder); + check_desc_func_id_ = func_id; + // Make sure function doesn't get processed by + // InstrumentPass::InstProcessCallTreeFromRoots() + param2output_func_id_[3] = func_id; + return check_desc_func_id_; } -uint32_t InstBindlessCheckPass::GenDebugReadInit(uint32_t var_id, - uint32_t desc_idx_id, - InstructionBuilder* builder) { - uint32_t binding_idx_id = builder->GetUintConstantId(var2binding_[var_id]); - uint32_t u_desc_idx_id = GenUintCastCode(desc_idx_id, builder); - // If desc index checking is not enabled, we know the offset of initialization - // entries is 1, so we can avoid loading this value and just add 1 to the - // descriptor set. - if (!desc_idx_enabled_) { - uint32_t desc_set_idx_id = - builder->GetUintConstantId(var2desc_set_[var_id] + 1); - return GenDebugDirectRead({desc_set_idx_id, binding_idx_id, u_desc_idx_id}, - builder); - } else { - uint32_t desc_set_base_id = - builder->GetUintConstantId(kDebugInputBindlessInitOffset); - uint32_t desc_set_idx_id = - builder->GetUintConstantId(var2desc_set_[var_id]); - return GenDebugDirectRead( - {desc_set_base_id, desc_set_idx_id, binding_idx_id, u_desc_idx_id}, - builder); - } +// clang-format off +// GLSL: +// result = inst_bindless_check_desc(shader_id, inst_idx, stage_info, desc_set, binding, desc_idx, offset); +// +// clang-format on +uint32_t InstBindlessCheckPass::GenDescCheckCall( + uint32_t inst_idx, uint32_t stage_idx, uint32_t var_id, + uint32_t desc_idx_id, uint32_t offset_id, InstructionBuilder* builder) { + const uint32_t func_id = GenDescCheckFunctionId(); + const std::vector args = { + builder->GetUintConstantId(shader_id_), + builder->GetUintConstantId(inst_idx), + GenStageInfo(stage_idx, builder), + builder->GetUintConstantId(var2desc_set_[var_id]), + builder->GetUintConstantId(var2binding_[var_id]), + GenUintCastCode(desc_idx_id, builder), + offset_id}; + return GenReadFunctionCall(GetBoolId(), func_id, args, builder); } uint32_t InstBindlessCheckPass::CloneOriginalImage( uint32_t old_image_id, InstructionBuilder* builder) { Instruction* new_image_inst; Instruction* old_image_inst = get_def_use_mgr()->GetDef(old_image_id); - if (old_image_inst->opcode() == SpvOpLoad) { + if (old_image_inst->opcode() == spv::Op::OpLoad) { new_image_inst = builder->AddLoad( old_image_inst->type_id(), old_image_inst->GetSingleWordInOperand(kSpvLoadPtrIdInIdx)); - } else if (old_image_inst->opcode() == SpvOp::SpvOpSampledImage) { + } else if (old_image_inst->opcode() == spv::Op::OpSampledImage) { uint32_t clone_id = CloneOriginalImage( old_image_inst->GetSingleWordInOperand(kSpvSampledImageImageIdInIdx), builder); new_image_inst = builder->AddBinaryOp( - old_image_inst->type_id(), SpvOpSampledImage, clone_id, + old_image_inst->type_id(), spv::Op::OpSampledImage, clone_id, old_image_inst->GetSingleWordInOperand(kSpvSampledImageSamplerIdInIdx)); - } else if (old_image_inst->opcode() == SpvOp::SpvOpImage) { + } else if (old_image_inst->opcode() == spv::Op::OpImage) { uint32_t clone_id = CloneOriginalImage( old_image_inst->GetSingleWordInOperand(kSpvImageSampledImageIdInIdx), builder); - new_image_inst = - builder->AddUnaryOp(old_image_inst->type_id(), SpvOpImage, clone_id); + new_image_inst = builder->AddUnaryOp(old_image_inst->type_id(), + spv::Op::OpImage, clone_id); } else { - assert(old_image_inst->opcode() == SpvOp::SpvOpCopyObject && + assert(old_image_inst->opcode() == spv::Op::OpCopyObject && "expecting OpCopyObject"); uint32_t clone_id = CloneOriginalImage( old_image_inst->GetSingleWordInOperand(kSpvCopyObjectOperandIdInIdx), @@ -150,38 +183,38 @@ uint32_t InstBindlessCheckPass::CloneOriginalReference( uint32_t InstBindlessCheckPass::GetImageId(Instruction* inst) { switch (inst->opcode()) { - case SpvOp::SpvOpImageSampleImplicitLod: - case SpvOp::SpvOpImageSampleExplicitLod: - case SpvOp::SpvOpImageSampleDrefImplicitLod: - case SpvOp::SpvOpImageSampleDrefExplicitLod: - case SpvOp::SpvOpImageSampleProjImplicitLod: - case SpvOp::SpvOpImageSampleProjExplicitLod: - case SpvOp::SpvOpImageSampleProjDrefImplicitLod: - case SpvOp::SpvOpImageSampleProjDrefExplicitLod: - case SpvOp::SpvOpImageGather: - case SpvOp::SpvOpImageDrefGather: - case SpvOp::SpvOpImageQueryLod: - case SpvOp::SpvOpImageSparseSampleImplicitLod: - case SpvOp::SpvOpImageSparseSampleExplicitLod: - case SpvOp::SpvOpImageSparseSampleDrefImplicitLod: - case SpvOp::SpvOpImageSparseSampleDrefExplicitLod: - case SpvOp::SpvOpImageSparseSampleProjImplicitLod: - case SpvOp::SpvOpImageSparseSampleProjExplicitLod: - case SpvOp::SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOp::SpvOpImageSparseSampleProjDrefExplicitLod: - case SpvOp::SpvOpImageSparseGather: - case SpvOp::SpvOpImageSparseDrefGather: - case SpvOp::SpvOpImageFetch: - case SpvOp::SpvOpImageRead: - case SpvOp::SpvOpImageQueryFormat: - case SpvOp::SpvOpImageQueryOrder: - case SpvOp::SpvOpImageQuerySizeLod: - case SpvOp::SpvOpImageQuerySize: - case SpvOp::SpvOpImageQueryLevels: - case SpvOp::SpvOpImageQuerySamples: - case SpvOp::SpvOpImageSparseFetch: - case SpvOp::SpvOpImageSparseRead: - case SpvOp::SpvOpImageWrite: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImageQueryLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: + case spv::Op::OpImageFetch: + case spv::Op::OpImageRead: + case spv::Op::OpImageQueryFormat: + case spv::Op::OpImageQueryOrder: + case spv::Op::OpImageQuerySizeLod: + case spv::Op::OpImageQuerySize: + case spv::Op::OpImageQueryLevels: + case spv::Op::OpImageQuerySamples: + case spv::Op::OpImageSparseFetch: + case spv::Op::OpImageSparseRead: + case spv::Op::OpImageWrite: return inst->GetSingleWordInOperand(kSpvImageSampleImageIdInIdx); default: break; @@ -197,56 +230,58 @@ Instruction* InstBindlessCheckPass::GetPointeeTypeInst(Instruction* ptr_inst) { bool InstBindlessCheckPass::AnalyzeDescriptorReference(Instruction* ref_inst, RefAnalysis* ref) { ref->ref_inst = ref_inst; - if (ref_inst->opcode() == SpvOpLoad || ref_inst->opcode() == SpvOpStore) { + if (ref_inst->opcode() == spv::Op::OpLoad || + ref_inst->opcode() == spv::Op::OpStore) { ref->desc_load_id = 0; ref->ptr_id = ref_inst->GetSingleWordInOperand(kSpvLoadPtrIdInIdx); Instruction* ptr_inst = get_def_use_mgr()->GetDef(ref->ptr_id); - if (ptr_inst->opcode() != SpvOp::SpvOpAccessChain) return false; + if (ptr_inst->opcode() != spv::Op::OpAccessChain) return false; ref->var_id = ptr_inst->GetSingleWordInOperand(kSpvAccessChainBaseIdInIdx); Instruction* var_inst = get_def_use_mgr()->GetDef(ref->var_id); - if (var_inst->opcode() != SpvOp::SpvOpVariable) return false; - uint32_t storage_class = - var_inst->GetSingleWordInOperand(kSpvVariableStorageClassInIdx); + if (var_inst->opcode() != spv::Op::OpVariable) return false; + spv::StorageClass storage_class = spv::StorageClass( + var_inst->GetSingleWordInOperand(kSpvVariableStorageClassInIdx)); switch (storage_class) { - case SpvStorageClassUniform: - case SpvStorageClassStorageBuffer: + case spv::StorageClass::Uniform: + case spv::StorageClass::StorageBuffer: break; default: return false; break; } // Check for deprecated storage block form - if (storage_class == SpvStorageClassUniform) { + if (storage_class == spv::StorageClass::Uniform) { uint32_t var_ty_id = var_inst->type_id(); Instruction* var_ty_inst = get_def_use_mgr()->GetDef(var_ty_id); uint32_t ptr_ty_id = var_ty_inst->GetSingleWordInOperand(kSpvTypePtrTypeIdInIdx); Instruction* ptr_ty_inst = get_def_use_mgr()->GetDef(ptr_ty_id); - SpvOp ptr_ty_op = ptr_ty_inst->opcode(); + spv::Op ptr_ty_op = ptr_ty_inst->opcode(); uint32_t block_ty_id = - (ptr_ty_op == SpvOpTypeArray || ptr_ty_op == SpvOpTypeRuntimeArray) + (ptr_ty_op == spv::Op::OpTypeArray || + ptr_ty_op == spv::Op::OpTypeRuntimeArray) ? ptr_ty_inst->GetSingleWordInOperand(kSpvTypeArrayTypeIdInIdx) : ptr_ty_id; assert(get_def_use_mgr()->GetDef(block_ty_id)->opcode() == - SpvOpTypeStruct && + spv::Op::OpTypeStruct && "unexpected block type"); bool block_found = get_decoration_mgr()->FindDecoration( - block_ty_id, SpvDecorationBlock, + block_ty_id, uint32_t(spv::Decoration::Block), [](const Instruction&) { return true; }); if (!block_found) { // If block decoration not found, verify deprecated form of SSBO bool buffer_block_found = get_decoration_mgr()->FindDecoration( - block_ty_id, SpvDecorationBufferBlock, + block_ty_id, uint32_t(spv::Decoration::BufferBlock), [](const Instruction&) { return true; }); USE_ASSERT(buffer_block_found && "block decoration not found"); - storage_class = SpvStorageClassStorageBuffer; + storage_class = spv::StorageClass::StorageBuffer; } } - ref->strg_class = storage_class; + ref->strg_class = uint32_t(storage_class); Instruction* desc_type_inst = GetPointeeTypeInst(var_inst); switch (desc_type_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: // A load through a descriptor array will have at least 3 operands. We // do not want to instrument loads of descriptors here which are part of // an image-based reference. @@ -255,9 +290,18 @@ bool InstBindlessCheckPass::AnalyzeDescriptorReference(Instruction* ref_inst, ptr_inst->GetSingleWordInOperand(kSpvAccessChainIndex0IdInIdx); break; default: - ref->desc_idx_id = 0; break; } + auto decos = + context()->get_decoration_mgr()->GetDecorationsFor(ref->var_id, false); + for (const auto& deco : decos) { + spv::Decoration d = spv::Decoration(deco->GetSingleWordInOperand(1u)); + if (d == spv::Decoration::DescriptorSet) { + ref->set = deco->GetSingleWordInOperand(2u); + } else if (d == spv::Decoration::Binding) { + ref->binding = deco->GetSingleWordInOperand(2u); + } + } return true; } // Reference is not load or store. If not an image-based reference, return. @@ -268,29 +312,29 @@ bool InstBindlessCheckPass::AnalyzeDescriptorReference(Instruction* ref_inst, Instruction* desc_load_inst; for (;;) { desc_load_inst = get_def_use_mgr()->GetDef(desc_load_id); - if (desc_load_inst->opcode() == SpvOp::SpvOpSampledImage) + if (desc_load_inst->opcode() == spv::Op::OpSampledImage) desc_load_id = desc_load_inst->GetSingleWordInOperand(kSpvSampledImageImageIdInIdx); - else if (desc_load_inst->opcode() == SpvOp::SpvOpImage) + else if (desc_load_inst->opcode() == spv::Op::OpImage) desc_load_id = desc_load_inst->GetSingleWordInOperand(kSpvImageSampledImageIdInIdx); - else if (desc_load_inst->opcode() == SpvOp::SpvOpCopyObject) + else if (desc_load_inst->opcode() == spv::Op::OpCopyObject) desc_load_id = desc_load_inst->GetSingleWordInOperand(kSpvCopyObjectOperandIdInIdx); else break; } - if (desc_load_inst->opcode() != SpvOp::SpvOpLoad) { + if (desc_load_inst->opcode() != spv::Op::OpLoad) { // TODO(greg-lunarg): Handle additional possibilities? return false; } ref->desc_load_id = desc_load_id; ref->ptr_id = desc_load_inst->GetSingleWordInOperand(kSpvLoadPtrIdInIdx); Instruction* ptr_inst = get_def_use_mgr()->GetDef(ref->ptr_id); - if (ptr_inst->opcode() == SpvOp::SpvOpVariable) { + if (ptr_inst->opcode() == spv::Op::OpVariable) { ref->desc_idx_id = 0; ref->var_id = ref->ptr_id; - } else if (ptr_inst->opcode() == SpvOp::SpvOpAccessChain) { + } else if (ptr_inst->opcode() == spv::Op::OpAccessChain) { if (ptr_inst->NumInOperands() != 2) { assert(false && "unexpected bindless index number"); return false; @@ -299,7 +343,7 @@ bool InstBindlessCheckPass::AnalyzeDescriptorReference(Instruction* ref_inst, ptr_inst->GetSingleWordInOperand(kSpvAccessChainIndex0IdInIdx); ref->var_id = ptr_inst->GetSingleWordInOperand(kSpvAccessChainBaseIdInIdx); Instruction* var_inst = get_def_use_mgr()->GetDef(ref->var_id); - if (var_inst->opcode() != SpvOpVariable) { + if (var_inst->opcode() != spv::Op::OpVariable) { assert(false && "unexpected bindless base"); return false; } @@ -307,6 +351,16 @@ bool InstBindlessCheckPass::AnalyzeDescriptorReference(Instruction* ref_inst, // TODO(greg-lunarg): Handle additional possibilities? return false; } + auto decos = + context()->get_decoration_mgr()->GetDecorationsFor(ref->var_id, false); + for (const auto& deco : decos) { + spv::Decoration d = spv::Decoration(deco->GetSingleWordInOperand(1u)); + if (d == spv::Decoration::DescriptorSet) { + ref->set = deco->GetSingleWordInOperand(2u); + } else if (d == spv::Decoration::Binding) { + ref->binding = deco->GetSingleWordInOperand(2u); + } + } return true; } @@ -376,13 +430,13 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, uint32_t buff_ty_id; uint32_t ac_in_idx = 1; switch (desc_ty_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: buff_ty_id = desc_ty_inst->GetSingleWordInOperand(0); ++ac_in_idx; break; default: - assert(desc_ty_inst->opcode() == SpvOpTypeStruct && + assert(desc_ty_inst->opcode() == spv::Op::OpTypeStruct && "unexpected descriptor type"); buff_ty_id = desc_ty_inst->result_id(); break; @@ -400,19 +454,20 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, Instruction* curr_ty_inst = get_def_use_mgr()->GetDef(curr_ty_id); uint32_t curr_offset_id = 0; switch (curr_ty_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: { + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: { // Get array stride and multiply by current index - uint32_t arr_stride = FindStride(curr_ty_id, SpvDecorationArrayStride); + uint32_t arr_stride = + FindStride(curr_ty_id, uint32_t(spv::Decoration::ArrayStride)); uint32_t arr_stride_id = builder->GetUintConstantId(arr_stride); uint32_t curr_idx_32b_id = Gen32BitCvtCode(curr_idx_id, builder); Instruction* curr_offset_inst = builder->AddBinaryOp( - GetUintId(), SpvOpIMul, arr_stride_id, curr_idx_32b_id); + GetUintId(), spv::Op::OpIMul, arr_stride_id, curr_idx_32b_id); curr_offset_id = curr_offset_inst->result_id(); // Get element type for next step curr_ty_id = curr_ty_inst->GetSingleWordInOperand(0); } break; - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { assert(matrix_stride != 0 && "missing matrix stride"); matrix_stride_id = builder->GetUintConstantId(matrix_stride); uint32_t vec_ty_id = curr_ty_inst->GetSingleWordInOperand(0); @@ -430,40 +485,40 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, } uint32_t curr_idx_32b_id = Gen32BitCvtCode(curr_idx_id, builder); Instruction* curr_offset_inst = builder->AddBinaryOp( - GetUintId(), SpvOpIMul, col_stride_id, curr_idx_32b_id); + GetUintId(), spv::Op::OpIMul, col_stride_id, curr_idx_32b_id); curr_offset_id = curr_offset_inst->result_id(); // Get element type for next step curr_ty_id = vec_ty_id; in_matrix = true; } break; - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { // If inside a row major matrix type, multiply index by matrix stride, // else multiply by component size uint32_t comp_ty_id = curr_ty_inst->GetSingleWordInOperand(0u); uint32_t curr_idx_32b_id = Gen32BitCvtCode(curr_idx_id, builder); if (in_matrix && !col_major) { Instruction* curr_offset_inst = builder->AddBinaryOp( - GetUintId(), SpvOpIMul, matrix_stride_id, curr_idx_32b_id); + GetUintId(), spv::Op::OpIMul, matrix_stride_id, curr_idx_32b_id); curr_offset_id = curr_offset_inst->result_id(); } else { uint32_t comp_ty_sz = ByteSize(comp_ty_id, 0u, false, false); uint32_t comp_ty_sz_id = builder->GetUintConstantId(comp_ty_sz); Instruction* curr_offset_inst = builder->AddBinaryOp( - GetUintId(), SpvOpIMul, comp_ty_sz_id, curr_idx_32b_id); + GetUintId(), spv::Op::OpIMul, comp_ty_sz_id, curr_idx_32b_id); curr_offset_id = curr_offset_inst->result_id(); } // Get element type for next step curr_ty_id = comp_ty_id; } break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { // Get buffer byte offset for the referenced member Instruction* curr_idx_inst = get_def_use_mgr()->GetDef(curr_idx_id); - assert(curr_idx_inst->opcode() == SpvOpConstant && + assert(curr_idx_inst->opcode() == spv::Op::OpConstant && "unexpected struct index"); uint32_t member_idx = curr_idx_inst->GetSingleWordInOperand(0); uint32_t member_offset = 0xdeadbeef; bool found = get_decoration_mgr()->FindDecoration( - curr_ty_id, SpvDecorationOffset, + curr_ty_id, uint32_t(spv::Decoration::Offset), [&member_idx, &member_offset](const Instruction& deco_inst) { if (deco_inst.GetSingleWordInOperand(1u) != member_idx) return false; @@ -477,7 +532,7 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, // enclosing struct type at the member index. If none found, reset // stride to 0. found = get_decoration_mgr()->FindDecoration( - curr_ty_id, SpvDecorationMatrixStride, + curr_ty_id, uint32_t(spv::Decoration::MatrixStride), [&member_idx, &matrix_stride](const Instruction& deco_inst) { if (deco_inst.GetSingleWordInOperand(1u) != member_idx) return false; @@ -487,7 +542,7 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, if (!found) matrix_stride = 0; // Look for column major decoration found = get_decoration_mgr()->FindDecoration( - curr_ty_id, SpvDecorationColMajor, + curr_ty_id, uint32_t(spv::Decoration::ColMajor), [&member_idx, &col_major](const Instruction& deco_inst) { if (deco_inst.GetSingleWordInOperand(1u) != member_idx) return false; @@ -504,7 +559,7 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, sum_id = curr_offset_id; else { Instruction* sum_inst = - builder->AddBinaryOp(GetUintId(), SpvOpIAdd, sum_id, curr_offset_id); + builder->AddIAdd(GetUintId(), sum_id, curr_offset_id); sum_id = sum_inst->result_id(); } ++ac_in_idx; @@ -513,14 +568,12 @@ uint32_t InstBindlessCheckPass::GenLastByteIdx(RefAnalysis* ref, uint32_t bsize = ByteSize(curr_ty_id, matrix_stride, col_major, in_matrix); uint32_t last = bsize - 1; uint32_t last_id = builder->GetUintConstantId(last); - Instruction* sum_inst = - builder->AddBinaryOp(GetUintId(), SpvOpIAdd, sum_id, last_id); + Instruction* sum_inst = builder->AddIAdd(GetUintId(), sum_id, last_id); return sum_inst->result_id(); } void InstBindlessCheckPass::GenCheckCode( - uint32_t check_id, uint32_t error_id, uint32_t offset_id, - uint32_t length_id, uint32_t stage_idx, RefAnalysis* ref, + uint32_t check_id, RefAnalysis* ref, std::vector>* new_blocks) { BasicBlock* back_blk_ptr = &*new_blocks->back(); InstructionBuilder builder( @@ -534,44 +587,39 @@ void InstBindlessCheckPass::GenCheckCode( std::unique_ptr merge_label(NewLabel(merge_blk_id)); std::unique_ptr valid_label(NewLabel(valid_blk_id)); std::unique_ptr invalid_label(NewLabel(invalid_blk_id)); - (void)builder.AddConditionalBranch(check_id, valid_blk_id, invalid_blk_id, - merge_blk_id, SpvSelectionControlMaskNone); + (void)builder.AddConditionalBranch( + check_id, valid_blk_id, invalid_blk_id, merge_blk_id, + uint32_t(spv::SelectionControlMask::MaskNone)); // Gen valid bounds branch std::unique_ptr new_blk_ptr( new BasicBlock(std::move(valid_label))); builder.SetInsertPoint(&*new_blk_ptr); uint32_t new_ref_id = CloneOriginalReference(ref, &builder); + uint32_t null_id = 0; + uint32_t ref_type_id = ref->ref_inst->type_id(); (void)builder.AddBranch(merge_blk_id); new_blocks->push_back(std::move(new_blk_ptr)); // Gen invalid block new_blk_ptr.reset(new BasicBlock(std::move(invalid_label))); builder.SetInsertPoint(&*new_blk_ptr); - uint32_t u_index_id = GenUintCastCode(ref->desc_idx_id, &builder); - if (offset_id != 0) { - // Buffer OOB - uint32_t u_offset_id = GenUintCastCode(offset_id, &builder); - uint32_t u_length_id = GenUintCastCode(length_id, &builder); - GenDebugStreamWrite(uid2offset_[ref->ref_inst->unique_id()], stage_idx, - {error_id, u_index_id, u_offset_id, u_length_id}, - &builder); - } else if (buffer_bounds_enabled_ || texel_buffer_enabled_) { - // Uninitialized Descriptor - Return additional unused zero so all error - // modes will use same debug stream write function - uint32_t u_length_id = GenUintCastCode(length_id, &builder); - GenDebugStreamWrite( - uid2offset_[ref->ref_inst->unique_id()], stage_idx, - {error_id, u_index_id, u_length_id, builder.GetUintConstantId(0)}, - &builder); - } else { - // Uninitialized Descriptor - Normal error return - uint32_t u_length_id = GenUintCastCode(length_id, &builder); - GenDebugStreamWrite(uid2offset_[ref->ref_inst->unique_id()], stage_idx, - {error_id, u_index_id, u_length_id}, &builder); + + // Generate a ConstantNull, converting to uint64 if the type cannot be a null. + if (new_ref_id != 0) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::Type* ref_type = type_mgr->GetType(ref_type_id); + if (ref_type->AsPointer() != nullptr) { + context()->AddCapability(spv::Capability::Int64); + uint32_t null_u64_id = GetNullId(GetUint64Id()); + Instruction* null_ptr_inst = builder.AddUnaryOp( + ref_type_id, spv::Op::OpConvertUToPtr, null_u64_id); + null_id = null_ptr_inst->result_id(); + } else { + null_id = GetNullId(ref_type_id); + } } // Remember last invalid block id uint32_t last_invalid_blk_id = new_blk_ptr->GetLabelInst()->result_id(); // Gen zero for invalid reference - uint32_t ref_type_id = ref->ref_inst->type_id(); (void)builder.AddBranch(merge_blk_id); new_blocks->push_back(std::move(new_blk_ptr)); // Gen merge block @@ -582,8 +630,7 @@ void InstBindlessCheckPass::GenCheckCode( // reference. if (new_ref_id != 0) { Instruction* phi_inst = builder.AddPhi( - ref_type_id, {new_ref_id, valid_blk_id, GetNullId(ref_type_id), - last_invalid_blk_id}); + ref_type_id, {new_ref_id, valid_blk_id, null_id, last_invalid_blk_id}); context()->ReplaceAllUsesWith(ref->ref_inst->result_id(), phi_inst->result_id()); } @@ -591,186 +638,67 @@ void InstBindlessCheckPass::GenCheckCode( context()->KillInst(ref->ref_inst); } -void InstBindlessCheckPass::GenDescIdxCheckCode( +void InstBindlessCheckPass::GenDescCheckCode( BasicBlock::iterator ref_inst_itr, UptrVectorIterator ref_block_itr, uint32_t stage_idx, std::vector>* new_blocks) { - // Look for reference through indexed descriptor. If found, analyze and - // save components. If not, return. + // Look for reference through descriptor. If not, return. RefAnalysis ref; if (!AnalyzeDescriptorReference(&*ref_inst_itr, &ref)) return; - Instruction* ptr_inst = get_def_use_mgr()->GetDef(ref.ptr_id); - if (ptr_inst->opcode() != SpvOp::SpvOpAccessChain) return; - // If index and bound both compile-time constants and index < bound, - // return without changing - Instruction* var_inst = get_def_use_mgr()->GetDef(ref.var_id); - Instruction* desc_type_inst = GetPointeeTypeInst(var_inst); - uint32_t length_id = 0; - if (desc_type_inst->opcode() == SpvOpTypeArray) { - length_id = - desc_type_inst->GetSingleWordInOperand(kSpvTypeArrayLengthIdInIdx); - Instruction* index_inst = get_def_use_mgr()->GetDef(ref.desc_idx_id); - Instruction* length_inst = get_def_use_mgr()->GetDef(length_id); - if (index_inst->opcode() == SpvOpConstant && - length_inst->opcode() == SpvOpConstant && - index_inst->GetSingleWordInOperand(kSpvConstantValueInIdx) < - length_inst->GetSingleWordInOperand(kSpvConstantValueInIdx)) - return; - } else if (!desc_idx_enabled_ || - desc_type_inst->opcode() != SpvOpTypeRuntimeArray) { - return; - } - // Move original block's preceding instructions into first new block std::unique_ptr new_blk_ptr; + // Move original block's preceding instructions into first new block MovePreludeCode(ref_inst_itr, ref_block_itr, &new_blk_ptr); InstructionBuilder builder( context(), &*new_blk_ptr, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); new_blocks->push_back(std::move(new_blk_ptr)); - uint32_t error_id = builder.GetUintConstantId(kInstErrorBindlessBounds); - // If length id not yet set, descriptor array is runtime size so - // generate load of length from stage's debug input buffer. - if (length_id == 0) { - assert(desc_type_inst->opcode() == SpvOpTypeRuntimeArray && - "unexpected bindless type"); - length_id = GenDebugReadLength(ref.var_id, &builder); - } - // Generate full runtime bounds test code with true branch - // being full reference and false branch being debug output and zero - // for the referenced value. - uint32_t desc_idx_32b_id = Gen32BitCvtCode(ref.desc_idx_id, &builder); - uint32_t length_32b_id = Gen32BitCvtCode(length_id, &builder); - Instruction* ult_inst = builder.AddBinaryOp(GetBoolId(), SpvOpULessThan, - desc_idx_32b_id, length_32b_id); - ref.desc_idx_id = desc_idx_32b_id; - GenCheckCode(ult_inst->result_id(), error_id, 0u, length_id, stage_idx, &ref, - new_blocks); - // Move original block's remaining code into remainder/merge block and add - // to new blocks - BasicBlock* back_blk_ptr = &*new_blocks->back(); - MovePostludeCode(ref_block_itr, back_blk_ptr); -} - -void InstBindlessCheckPass::GenDescInitCheckCode( - BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, - std::vector>* new_blocks) { - // Look for reference through descriptor. If not, return. - RefAnalysis ref; - if (!AnalyzeDescriptorReference(&*ref_inst_itr, &ref)) return; // Determine if we can only do initialization check - bool init_check = false; - if (ref.desc_load_id != 0 || !buffer_bounds_enabled_) { - init_check = true; + uint32_t ref_id = builder.GetUintConstantId(0u); + spv::Op op = ref.ref_inst->opcode(); + if (ref.desc_load_id != 0) { + uint32_t num_in_oprnds = ref.ref_inst->NumInOperands(); + if ((op == spv::Op::OpImageRead && num_in_oprnds == 2) || + (op == spv::Op::OpImageFetch && num_in_oprnds == 2) || + (op == spv::Op::OpImageWrite && num_in_oprnds == 3)) { + Instruction* image_inst = get_def_use_mgr()->GetDef(ref.image_id); + uint32_t image_ty_id = image_inst->type_id(); + Instruction* image_ty_inst = get_def_use_mgr()->GetDef(image_ty_id); + if (spv::Dim(image_ty_inst->GetSingleWordInOperand(kSpvTypeImageDim)) == + spv::Dim::Buffer) { + if ((image_ty_inst->GetSingleWordInOperand(kSpvTypeImageDepth) == 0) && + (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageArrayed) == + 0) && + (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageMS) == 0)) { + ref_id = GenUintCastCode(ref.ref_inst->GetSingleWordInOperand(1), + &builder); + } + } + } } else { // For now, only do bounds check for non-aggregate types. Otherwise // just do descriptor initialization check. // TODO(greg-lunarg): Do bounds check for aggregate loads and stores Instruction* ref_ptr_inst = get_def_use_mgr()->GetDef(ref.ptr_id); Instruction* pte_type_inst = GetPointeeTypeInst(ref_ptr_inst); - uint32_t pte_type_op = pte_type_inst->opcode(); - if (pte_type_op == SpvOpTypeArray || pte_type_op == SpvOpTypeRuntimeArray || - pte_type_op == SpvOpTypeStruct) - init_check = true; + spv::Op pte_type_op = pte_type_inst->opcode(); + if (pte_type_op != spv::Op::OpTypeArray && + pte_type_op != spv::Op::OpTypeRuntimeArray && + pte_type_op != spv::Op::OpTypeStruct) { + ref_id = GenLastByteIdx(&ref, &builder); + } } - // If initialization check and not enabled, return - if (init_check && !desc_init_enabled_) return; - // Move original block's preceding instructions into first new block - std::unique_ptr new_blk_ptr; - MovePreludeCode(ref_inst_itr, ref_block_itr, &new_blk_ptr); - InstructionBuilder builder( - context(), &*new_blk_ptr, - IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - new_blocks->push_back(std::move(new_blk_ptr)); - // If initialization check, use reference value of zero. - // Else use the index of the last byte referenced. - uint32_t ref_id = init_check ? builder.GetUintConstantId(0u) - : GenLastByteIdx(&ref, &builder); // Read initialization/bounds from debug input buffer. If index id not yet // set, binding is single descriptor, so set index to constant 0. if (ref.desc_idx_id == 0) ref.desc_idx_id = builder.GetUintConstantId(0u); - uint32_t init_id = GenDebugReadInit(ref.var_id, ref.desc_idx_id, &builder); - // Generate runtime initialization/bounds test code with true branch - // being full reference and false branch being debug output and zero - // for the referenced value. - Instruction* ult_inst = - builder.AddBinaryOp(GetBoolId(), SpvOpULessThan, ref_id, init_id); - uint32_t error = init_check ? kInstErrorBindlessUninit - : (ref.strg_class == SpvStorageClassUniform - ? kInstErrorBuffOOBUniform - : kInstErrorBuffOOBStorage); - uint32_t error_id = builder.GetUintConstantId(error); - GenCheckCode(ult_inst->result_id(), error_id, init_check ? 0 : ref_id, - init_check ? builder.GetUintConstantId(0u) : init_id, stage_idx, - &ref, new_blocks); - // Move original block's remaining code into remainder/merge block and add - // to new blocks - BasicBlock* back_blk_ptr = &*new_blocks->back(); - MovePostludeCode(ref_block_itr, back_blk_ptr); -} + uint32_t check_id = + GenDescCheckCall(ref.ref_inst->unique_id(), stage_idx, ref.var_id, + ref.desc_idx_id, ref_id, &builder); -void InstBindlessCheckPass::GenTexBuffCheckCode( - BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, - std::vector>* new_blocks) { - // Only process OpImageRead and OpImageWrite with no optional operands - Instruction* ref_inst = &*ref_inst_itr; - SpvOp op = ref_inst->opcode(); - uint32_t num_in_oprnds = ref_inst->NumInOperands(); - if (!((op == SpvOpImageRead && num_in_oprnds == 2) || - (op == SpvOpImageFetch && num_in_oprnds == 2) || - (op == SpvOpImageWrite && num_in_oprnds == 3))) - return; - // Pull components from descriptor reference - RefAnalysis ref; - if (!AnalyzeDescriptorReference(ref_inst, &ref)) return; - // Only process if image is texel buffer - Instruction* image_inst = get_def_use_mgr()->GetDef(ref.image_id); - uint32_t image_ty_id = image_inst->type_id(); - Instruction* image_ty_inst = get_def_use_mgr()->GetDef(image_ty_id); - if (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageDim) != SpvDimBuffer) - return; - if (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageDepth) != 0) return; - if (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageArrayed) != 0) return; - if (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageMS) != 0) return; - // Enable ImageQuery Capability if not yet enabled - if (!get_feature_mgr()->HasCapability(SpvCapabilityImageQuery)) { - std::unique_ptr cap_image_query_inst(new Instruction( - context(), SpvOpCapability, 0, 0, - std::initializer_list{ - {SPV_OPERAND_TYPE_CAPABILITY, {SpvCapabilityImageQuery}}})); - get_def_use_mgr()->AnalyzeInstDefUse(&*cap_image_query_inst); - context()->AddCapability(std::move(cap_image_query_inst)); - } - // Move original block's preceding instructions into first new block - std::unique_ptr new_blk_ptr; - MovePreludeCode(ref_inst_itr, ref_block_itr, &new_blk_ptr); - InstructionBuilder builder( - context(), &*new_blk_ptr, - IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - new_blocks->push_back(std::move(new_blk_ptr)); - // Get texel coordinate - uint32_t coord_id = - GenUintCastCode(ref_inst->GetSingleWordInOperand(1), &builder); - // If index id not yet set, binding is single descriptor, so set index to - // constant 0. - if (ref.desc_idx_id == 0) ref.desc_idx_id = builder.GetUintConstantId(0u); - // Get texel buffer size. - Instruction* size_inst = - builder.AddUnaryOp(GetUintId(), SpvOpImageQuerySize, ref.image_id); - uint32_t size_id = size_inst->result_id(); // Generate runtime initialization/bounds test code with true branch - // being full reference and false branch being debug output and zero + // being full reference and false branch being zero // for the referenced value. - Instruction* ult_inst = - builder.AddBinaryOp(GetBoolId(), SpvOpULessThan, coord_id, size_id); - uint32_t error = - (image_ty_inst->GetSingleWordInOperand(kSpvTypeImageSampled) == 2) - ? kInstErrorBuffOOBStorageTexel - : kInstErrorBuffOOBUniformTexel; - uint32_t error_id = builder.GetUintConstantId(error); - GenCheckCode(ult_inst->result_id(), error_id, coord_id, size_id, stage_idx, - &ref, new_blocks); + GenCheckCode(check_id, &ref, new_blocks); + // Move original block's remaining code into remainder/merge block and add // to new blocks BasicBlock* back_blk_ptr = &*new_blocks->back(); @@ -780,56 +708,48 @@ void InstBindlessCheckPass::GenTexBuffCheckCode( void InstBindlessCheckPass::InitializeInstBindlessCheck() { // Initialize base class InitializeInstrument(); - // If runtime array length support or buffer bounds checking are enabled, - // create variable mappings. Length support is always enabled if descriptor - // init check is enabled. - if (desc_idx_enabled_ || buffer_bounds_enabled_ || texel_buffer_enabled_) - for (auto& anno : get_module()->annotations()) - if (anno.opcode() == SpvOpDecorate) { - if (anno.GetSingleWordInOperand(1u) == SpvDecorationDescriptorSet) - var2desc_set_[anno.GetSingleWordInOperand(0u)] = - anno.GetSingleWordInOperand(2u); - else if (anno.GetSingleWordInOperand(1u) == SpvDecorationBinding) - var2binding_[anno.GetSingleWordInOperand(0u)] = - anno.GetSingleWordInOperand(2u); + for (auto& anno : get_module()->annotations()) { + if (anno.opcode() == spv::Op::OpDecorate) { + if (spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::DescriptorSet) { + var2desc_set_[anno.GetSingleWordInOperand(0u)] = + anno.GetSingleWordInOperand(2u); + } else if (spv::Decoration(anno.GetSingleWordInOperand(1u)) == + spv::Decoration::Binding) { + var2binding_[anno.GetSingleWordInOperand(0u)] = + anno.GetSingleWordInOperand(2u); } + } + } } Pass::Status InstBindlessCheckPass::ProcessImpl() { - // Perform bindless bounds check on each entry point function in module + // The memory model and linkage must always be updated for spirv-link to work + // correctly. + AddStorageBufferExt(); + if (!get_feature_mgr()->HasExtension(kSPV_KHR_physical_storage_buffer)) { + context()->AddExtension("SPV_KHR_physical_storage_buffer"); + } + + context()->AddCapability(spv::Capability::PhysicalStorageBufferAddresses); + Instruction* memory_model = get_module()->GetMemoryModel(); + memory_model->SetInOperand( + 0u, {uint32_t(spv::AddressingModel::PhysicalStorageBuffer64)}); + + context()->AddCapability(spv::Capability::Linkage); + InstProcessFunction pfn = [this](BasicBlock::iterator ref_inst_itr, UptrVectorIterator ref_block_itr, uint32_t stage_idx, std::vector>* new_blocks) { - return GenDescIdxCheckCode(ref_inst_itr, ref_block_itr, stage_idx, - new_blocks); + return GenDescCheckCode(ref_inst_itr, ref_block_itr, stage_idx, + new_blocks); }; - bool modified = InstProcessEntryPointCallTree(pfn); - if (desc_init_enabled_ || buffer_bounds_enabled_) { - // Perform descriptor initialization and/or buffer bounds check on each - // entry point function in module - pfn = [this](BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, - uint32_t stage_idx, - std::vector>* new_blocks) { - return GenDescInitCheckCode(ref_inst_itr, ref_block_itr, stage_idx, - new_blocks); - }; - modified |= InstProcessEntryPointCallTree(pfn); - } - if (texel_buffer_enabled_) { - // Perform texel buffer bounds check on each entry point function in - // module. Generate after descriptor bounds and initialization checks. - pfn = [this](BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, - uint32_t stage_idx, - std::vector>* new_blocks) { - return GenTexBuffCheckCode(ref_inst_itr, ref_block_itr, stage_idx, - new_blocks); - }; - modified |= InstProcessEntryPointCallTree(pfn); - } - return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; + + InstProcessEntryPointCallTree(pfn); + // This pass always changes the memory model, so that linking will work + // properly. + return Status::SuccessWithChange; } Pass::Status InstBindlessCheckPass::Process() { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.h index cd9618059..243cba767 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_bindless_check_pass.h @@ -28,16 +28,8 @@ namespace opt { // external design may change as the layer evolves. class InstBindlessCheckPass : public InstrumentPass { public: - InstBindlessCheckPass(uint32_t desc_set, uint32_t shader_id, - bool desc_idx_enable, bool desc_init_enable, - bool buffer_bounds_enable, bool texel_buffer_enable, - bool opt_direct_reads) - : InstrumentPass(desc_set, shader_id, kInstValidationIdBindless, - opt_direct_reads), - desc_idx_enabled_(desc_idx_enable), - desc_init_enabled_(desc_init_enable), - buffer_bounds_enabled_(buffer_bounds_enable), - texel_buffer_enabled_(texel_buffer_enable) {} + InstBindlessCheckPass(uint32_t shader_id) + : InstrumentPass(0, shader_id, true, true) {} ~InstBindlessCheckPass() override = default; @@ -47,91 +39,31 @@ class InstBindlessCheckPass : public InstrumentPass { const char* name() const override { return "inst-bindless-check-pass"; } private: - // These functions do bindless checking instrumentation on a single - // instruction which references through a descriptor (ie references into an - // image or buffer). Refer to Vulkan API for further information on - // descriptors. GenDescIdxCheckCode checks that an index into a descriptor - // array (array of images or buffers) is in-bounds. GenDescInitCheckCode - // checks that the referenced descriptor has been initialized, if the - // SPV_EXT_descriptor_indexing extension is enabled, and initialized large - // enough to handle the reference, if RobustBufferAccess is disabled. - // GenDescInitCheckCode checks for uniform and storage buffer overrun. - // GenTexBuffCheckCode checks for texel buffer overrun and should be - // run after GenDescInitCheckCode to first make sure that the descriptor - // is initialized because it uses OpImageQuerySize on the descriptor. - // - // The functions are designed to be passed to - // InstrumentPass::InstProcessEntryPointCallTree(), which applies the - // function to each instruction in a module and replaces the instruction - // if warranted. - // - // If |ref_inst_itr| is a bindless reference, return in |new_blocks| the - // result of instrumenting it with validation code within its block at - // |ref_block_itr|. The validation code first executes a check for the - // specific condition called for. If the check passes, it executes - // the remainder of the reference, otherwise writes a record to the debug - // output buffer stream including |function_idx, instruction_idx, stage_idx| - // and replaces the reference with the null value of the original type. The - // block at |ref_block_itr| can just be replaced with the blocks in - // |new_blocks|, which will contain at least two blocks. The last block will - // comprise all instructions following |ref_inst_itr|, - // preceded by a phi instruction. - // - // These instrumentation functions utilize GenDebugDirectRead() to read data - // from the debug input buffer, specifically the lengths of variable length - // descriptor arrays, and the initialization status of each descriptor. - // The format of the debug input buffer is documented in instrument.hpp. - // - // These instrumentation functions utilize GenDebugStreamWrite() to write its - // error records. The validation-specific part of the error record will - // have the format: - // - // Validation Error Code (=kInstErrorBindlessBounds) - // Descriptor Index - // Descriptor Array Size - // - // The Descriptor Index is the index which has been determined to be - // out-of-bounds. - // - // The Descriptor Array Size is the size of the descriptor array which was - // indexed. - void GenDescIdxCheckCode( - BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, - std::vector>* new_blocks); - - void GenDescInitCheckCode( - BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, - std::vector>* new_blocks); - - void GenTexBuffCheckCode( - BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, - std::vector>* new_blocks); - - // Generate instructions into |builder| to read length of runtime descriptor - // array |var_id| from debug input buffer and return id of value. - uint32_t GenDebugReadLength(uint32_t var_id, InstructionBuilder* builder); - - // Generate instructions into |builder| to read initialization status of - // descriptor array |image_id| at |index_id| from debug input buffer and - // return id of value. - uint32_t GenDebugReadInit(uint32_t image_id, uint32_t index_id, - InstructionBuilder* builder); + void GenDescCheckCode(BasicBlock::iterator ref_inst_itr, + UptrVectorIterator ref_block_itr, + uint32_t stage_idx, + std::vector>* new_blocks); + + uint32_t GenDescCheckFunctionId(); + + uint32_t GenDescCheckCall(uint32_t inst_idx, uint32_t stage_idx, + uint32_t var_id, uint32_t index_id, + uint32_t byte_offset, InstructionBuilder* builder); // Analysis data for descriptor reference components, generated by // AnalyzeDescriptorReference. It is necessary and sufficient for further // analysis and regeneration of the reference. typedef struct RefAnalysis { - uint32_t desc_load_id; - uint32_t image_id; - uint32_t load_id; - uint32_t ptr_id; - uint32_t var_id; - uint32_t desc_idx_id; - uint32_t strg_class; - Instruction* ref_inst; + uint32_t desc_load_id{0}; + uint32_t image_id{0}; + uint32_t load_id{0}; + uint32_t ptr_id{0}; + uint32_t var_id{0}; + uint32_t set{0}; + uint32_t binding{0}; + uint32_t desc_idx_id{0}; + uint32_t strg_class{0}; + Instruction* ref_inst{nullptr}; } RefAnalysis; // Return size of type |ty_id| in bytes. Use |matrix_stride| and |col_major| @@ -147,11 +79,11 @@ class InstBindlessCheckPass : public InstrumentPass { uint32_t GenLastByteIdx(RefAnalysis* ref, InstructionBuilder* builder); // Clone original image computation starting at |image_id| into |builder|. - // This may generate more than one instruction if neccessary. + // This may generate more than one instruction if necessary. uint32_t CloneOriginalImage(uint32_t image_id, InstructionBuilder* builder); // Clone original original reference encapsulated by |ref| into |builder|. - // This may generate more than one instruction if neccessary. + // This may generate more than one instruction if necessary. uint32_t CloneOriginalReference(RefAnalysis* ref, InstructionBuilder* builder); @@ -173,8 +105,7 @@ class InstBindlessCheckPass : public InstrumentPass { // writes debug error output utilizing |ref|, |error_id|, |length_id| and // |stage_idx|. Generate merge block for valid and invalid branches. Kill // original reference. - void GenCheckCode(uint32_t check_id, uint32_t error_id, uint32_t offset_id, - uint32_t length_id, uint32_t stage_idx, RefAnalysis* ref, + void GenCheckCode(uint32_t check_id, RefAnalysis* ref, std::vector>* new_blocks); // Initialize state for instrumenting bindless checking @@ -184,23 +115,13 @@ class InstBindlessCheckPass : public InstrumentPass { // GenDescInitCheckCode to every instruction in module. Pass::Status ProcessImpl(); - // Enable instrumentation of runtime array length checking - bool desc_idx_enabled_; - - // Enable instrumentation of descriptor initialization checking - bool desc_init_enabled_; - - // Enable instrumentation of uniform and storage buffer overrun checking - bool buffer_bounds_enabled_; - - // Enable instrumentation of texel buffer overrun checking - bool texel_buffer_enabled_; - // Mapping from variable to descriptor set std::unordered_map var2desc_set_; // Mapping from variable to binding std::unordered_map var2binding_; + + uint32_t check_desc_func_id_{0}; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.cpp index e2336d360..e6c550878 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.cpp @@ -22,9 +22,9 @@ namespace opt { uint32_t InstBuffAddrCheckPass::CloneOriginalReference( Instruction* ref_inst, InstructionBuilder* builder) { // Clone original ref with new result id (if load) - assert( - (ref_inst->opcode() == SpvOpLoad || ref_inst->opcode() == SpvOpStore) && - "unexpected ref"); + assert((ref_inst->opcode() == spv::Op::OpLoad || + ref_inst->opcode() == spv::Op::OpStore) && + "unexpected ref"); std::unique_ptr new_ref_inst(ref_inst->Clone(context())); uint32_t ref_result_id = ref_inst->result_id(); uint32_t new_ref_id = 0; @@ -41,24 +41,24 @@ uint32_t InstBuffAddrCheckPass::CloneOriginalReference( } bool InstBuffAddrCheckPass::IsPhysicalBuffAddrReference(Instruction* ref_inst) { - if (ref_inst->opcode() != SpvOpLoad && ref_inst->opcode() != SpvOpStore) + if (ref_inst->opcode() != spv::Op::OpLoad && + ref_inst->opcode() != spv::Op::OpStore) return false; uint32_t ptr_id = ref_inst->GetSingleWordInOperand(0); analysis::DefUseManager* du_mgr = get_def_use_mgr(); Instruction* ptr_inst = du_mgr->GetDef(ptr_id); - if (ptr_inst->opcode() != SpvOpAccessChain) return false; + if (ptr_inst->opcode() != spv::Op::OpAccessChain) return false; uint32_t ptr_ty_id = ptr_inst->type_id(); Instruction* ptr_ty_inst = du_mgr->GetDef(ptr_ty_id); - if (ptr_ty_inst->GetSingleWordInOperand(0) != - SpvStorageClassPhysicalStorageBufferEXT) + if (spv::StorageClass(ptr_ty_inst->GetSingleWordInOperand(0)) != + spv::StorageClass::PhysicalStorageBufferEXT) return false; return true; } // TODO(greg-lunarg): Refactor with InstBindlessCheckPass::GenCheckCode() ?? void InstBuffAddrCheckPass::GenCheckCode( - uint32_t check_id, uint32_t error_id, uint32_t ref_uptr_id, - uint32_t stage_idx, Instruction* ref_inst, + uint32_t check_id, Instruction* ref_inst, std::vector>* new_blocks) { BasicBlock* back_blk_ptr = &*new_blocks->back(); InstructionBuilder builder( @@ -72,8 +72,9 @@ void InstBuffAddrCheckPass::GenCheckCode( std::unique_ptr merge_label(NewLabel(merge_blk_id)); std::unique_ptr valid_label(NewLabel(valid_blk_id)); std::unique_ptr invalid_label(NewLabel(invalid_blk_id)); - (void)builder.AddConditionalBranch(check_id, valid_blk_id, invalid_blk_id, - merge_blk_id, SpvSelectionControlMaskNone); + (void)builder.AddConditionalBranch( + check_id, valid_blk_id, invalid_blk_id, merge_blk_id, + uint32_t(spv::SelectionControlMask::MaskNone)); // Gen valid branch std::unique_ptr new_blk_ptr( new BasicBlock(std::move(valid_label))); @@ -84,18 +85,6 @@ void InstBuffAddrCheckPass::GenCheckCode( // Gen invalid block new_blk_ptr.reset(new BasicBlock(std::move(invalid_label))); builder.SetInsertPoint(&*new_blk_ptr); - // Convert uptr from uint64 to 2 uint32 - Instruction* lo_uptr_inst = - builder.AddUnaryOp(GetUintId(), SpvOpUConvert, ref_uptr_id); - Instruction* rshift_uptr_inst = - builder.AddBinaryOp(GetUint64Id(), SpvOpShiftRightLogical, ref_uptr_id, - builder.GetUintConstantId(32)); - Instruction* hi_uptr_inst = builder.AddUnaryOp(GetUintId(), SpvOpUConvert, - rshift_uptr_inst->result_id()); - GenDebugStreamWrite( - uid2offset_[ref_inst->unique_id()], stage_idx, - {error_id, lo_uptr_inst->result_id(), hi_uptr_inst->result_id()}, - &builder); // Gen zero for invalid load. If pointer type, need to convert uint64 // zero to pointer; cannot create ConstantNull of pointer type. uint32_t null_id = 0; @@ -105,8 +94,8 @@ void InstBuffAddrCheckPass::GenCheckCode( analysis::Type* ref_type = type_mgr->GetType(ref_type_id); if (ref_type->AsPointer() != nullptr) { uint32_t null_u64_id = GetNullId(GetUint64Id()); - Instruction* null_ptr_inst = - builder.AddUnaryOp(ref_type_id, SpvOpConvertUToPtr, null_u64_id); + Instruction* null_ptr_inst = builder.AddUnaryOp( + ref_type_id, spv::Op::OpConvertUToPtr, null_u64_id); null_id = null_ptr_inst->result_id(); } else { null_id = GetNullId(ref_type_id); @@ -130,77 +119,43 @@ void InstBuffAddrCheckPass::GenCheckCode( context()->KillInst(ref_inst); } -uint32_t InstBuffAddrCheckPass::GetTypeAlignment(uint32_t type_id) { - Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); - switch (type_inst->opcode()) { - case SpvOpTypeFloat: - case SpvOpTypeInt: - case SpvOpTypeVector: - return GetTypeLength(type_id); - case SpvOpTypeMatrix: - return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - return GetTypeAlignment(type_inst->GetSingleWordInOperand(0)); - case SpvOpTypeStruct: { - uint32_t max = 0; - type_inst->ForEachInId([&max, this](const uint32_t* iid) { - uint32_t alignment = GetTypeAlignment(*iid); - max = (alignment > max) ? alignment : max; - }); - return max; - } - case SpvOpTypePointer: - assert(type_inst->GetSingleWordInOperand(0) == - SpvStorageClassPhysicalStorageBufferEXT && - "unexpected pointer type"); - return 8u; - default: - assert(false && "unexpected type"); - return 0; - } -} - uint32_t InstBuffAddrCheckPass::GetTypeLength(uint32_t type_id) { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); switch (type_inst->opcode()) { - case SpvOpTypeFloat: - case SpvOpTypeInt: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeInt: return type_inst->GetSingleWordInOperand(0) / 8u; - case SpvOpTypeVector: { - uint32_t raw_cnt = type_inst->GetSingleWordInOperand(1); - uint32_t adj_cnt = (raw_cnt == 3u) ? 4u : raw_cnt; - return adj_cnt * GetTypeLength(type_inst->GetSingleWordInOperand(0)); - } - case SpvOpTypeMatrix: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: return type_inst->GetSingleWordInOperand(1) * GetTypeLength(type_inst->GetSingleWordInOperand(0)); - case SpvOpTypePointer: - assert(type_inst->GetSingleWordInOperand(0) == - SpvStorageClassPhysicalStorageBufferEXT && + case spv::Op::OpTypePointer: + assert(spv::StorageClass(type_inst->GetSingleWordInOperand(0)) == + spv::StorageClass::PhysicalStorageBufferEXT && "unexpected pointer type"); return 8u; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { uint32_t const_id = type_inst->GetSingleWordInOperand(1); Instruction* const_inst = get_def_use_mgr()->GetDef(const_id); uint32_t cnt = const_inst->GetSingleWordInOperand(0); return cnt * GetTypeLength(type_inst->GetSingleWordInOperand(0)); } - case SpvOpTypeStruct: { - uint32_t len = 0; - type_inst->ForEachInId([&len, this](const uint32_t* iid) { - // Align struct length - uint32_t alignment = GetTypeAlignment(*iid); - uint32_t mod = len % alignment; - uint32_t diff = (mod != 0) ? alignment - mod : 0; - len += diff; - // Increment struct length by component length - uint32_t comp_len = GetTypeLength(*iid); - len += comp_len; + case spv::Op::OpTypeStruct: { + // Figure out the location of the last byte of the last member of the + // structure. + uint32_t last_offset = 0, last_len = 0; + + get_decoration_mgr()->ForEachDecoration( + type_id, uint32_t(spv::Decoration::Offset), + [&last_offset](const Instruction& deco_inst) { + last_offset = deco_inst.GetSingleWordInOperand(3); + }); + type_inst->ForEachInId([&last_len, this](const uint32_t* iid) { + last_len = GetTypeLength(*iid); }); - return len; + return last_offset + last_len; } - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: default: assert(false && "unexpected type"); return 0; @@ -213,221 +168,91 @@ void InstBuffAddrCheckPass::AddParam(uint32_t type_id, uint32_t pid = TakeNextId(); param_vec->push_back(pid); std::unique_ptr param_inst(new Instruction( - get_module()->context(), SpvOpFunctionParameter, type_id, pid, {})); + get_module()->context(), spv::Op::OpFunctionParameter, type_id, pid, {})); get_def_use_mgr()->AnalyzeInstDefUse(&*param_inst); (*input_func)->AddParameter(std::move(param_inst)); } +// This is a stub function for use with Import linkage +// clang-format off +// GLSL: +//bool inst_bindless_search_and_test(const uint shader_id, const uint inst_num, const uvec4 stage_info, +// const uint64 ref_ptr, const uint length) { +//} +// clang-format on uint32_t InstBuffAddrCheckPass::GetSearchAndTestFuncId() { - if (search_test_func_id_ == 0) { - // Generate function "bool search_and_test(uint64_t ref_ptr, uint32_t len)" - // which searches input buffer for buffer which most likely contains the - // pointer value |ref_ptr| and verifies that the entire reference of - // length |len| bytes is contained in the buffer. - search_test_func_id_ = TakeNextId(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - std::vector param_types = { - type_mgr->GetType(GetUint64Id()), type_mgr->GetType(GetUintId())}; - analysis::Function func_ty(type_mgr->GetType(GetBoolId()), param_types); - analysis::Type* reg_func_ty = type_mgr->GetRegisteredType(&func_ty); - std::unique_ptr func_inst( - new Instruction(get_module()->context(), SpvOpFunction, GetBoolId(), - search_test_func_id_, - {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvFunctionControlMaskNone}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, - {type_mgr->GetTypeInstruction(reg_func_ty)}}})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_inst); - std::unique_ptr input_func = - MakeUnique(std::move(func_inst)); - std::vector param_vec; - // Add ref_ptr and length parameters - AddParam(GetUint64Id(), ¶m_vec, &input_func); - AddParam(GetUintId(), ¶m_vec, &input_func); - // Empty first block. - uint32_t first_blk_id = TakeNextId(); - std::unique_ptr first_blk_label(NewLabel(first_blk_id)); - std::unique_ptr first_blk_ptr = - MakeUnique(std::move(first_blk_label)); - InstructionBuilder builder( - context(), &*first_blk_ptr, - IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - uint32_t hdr_blk_id = TakeNextId(); - // Branch to search loop header - std::unique_ptr hdr_blk_label(NewLabel(hdr_blk_id)); - (void)builder.AddInstruction(MakeUnique( - context(), SpvOpBranch, 0, 0, - std::initializer_list{{SPV_OPERAND_TYPE_ID, {hdr_blk_id}}})); - input_func->AddBasicBlock(std::move(first_blk_ptr)); - // Linear search loop header block - // TODO(greg-lunarg): Implement binary search - std::unique_ptr hdr_blk_ptr = - MakeUnique(std::move(hdr_blk_label)); - builder.SetInsertPoint(&*hdr_blk_ptr); - // Phi for search index. Starts with 1. - uint32_t cont_blk_id = TakeNextId(); - std::unique_ptr cont_blk_label(NewLabel(cont_blk_id)); - // Deal with def-use cycle caused by search loop index computation. - // Create Add and Phi instructions first, then do Def analysis on Add. - // Add Phi and Add instructions and do Use analysis later. - uint32_t idx_phi_id = TakeNextId(); - uint32_t idx_inc_id = TakeNextId(); - std::unique_ptr idx_inc_inst(new Instruction( - context(), SpvOpIAdd, GetUintId(), idx_inc_id, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {idx_phi_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, - {builder.GetUintConstantId(1u)}}})); - std::unique_ptr idx_phi_inst(new Instruction( - context(), SpvOpPhi, GetUintId(), idx_phi_id, - {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, - {builder.GetUintConstantId(1u)}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {first_blk_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {idx_inc_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cont_blk_id}}})); - get_def_use_mgr()->AnalyzeInstDef(&*idx_inc_inst); - // Add (previously created) search index phi - (void)builder.AddInstruction(std::move(idx_phi_inst)); - // LoopMerge - uint32_t bound_test_blk_id = TakeNextId(); - std::unique_ptr bound_test_blk_label( - NewLabel(bound_test_blk_id)); - (void)builder.AddInstruction(MakeUnique( - context(), SpvOpLoopMerge, 0, 0, - std::initializer_list{ - {SPV_OPERAND_TYPE_ID, {bound_test_blk_id}}, - {SPV_OPERAND_TYPE_ID, {cont_blk_id}}, - {SPV_OPERAND_TYPE_LITERAL_INTEGER, {SpvLoopControlMaskNone}}})); - // Branch to continue/work block - (void)builder.AddInstruction(MakeUnique( - context(), SpvOpBranch, 0, 0, - std::initializer_list{{SPV_OPERAND_TYPE_ID, {cont_blk_id}}})); - input_func->AddBasicBlock(std::move(hdr_blk_ptr)); - // Continue/Work Block. Read next buffer pointer and break if greater - // than ref_ptr arg. - std::unique_ptr cont_blk_ptr = - MakeUnique(std::move(cont_blk_label)); - builder.SetInsertPoint(&*cont_blk_ptr); - // Add (previously created) search index increment now. - (void)builder.AddInstruction(std::move(idx_inc_inst)); - // Load next buffer address from debug input buffer - uint32_t ibuf_id = GetInputBufferId(); - uint32_t ibuf_ptr_id = GetInputBufferPtrId(); - Instruction* uptr_ac_inst = builder.AddTernaryOp( - ibuf_ptr_id, SpvOpAccessChain, ibuf_id, - builder.GetUintConstantId(kDebugInputDataOffset), idx_inc_id); - uint32_t ibuf_type_id = GetInputBufferTypeId(); - Instruction* uptr_load_inst = - builder.AddUnaryOp(ibuf_type_id, SpvOpLoad, uptr_ac_inst->result_id()); - // If loaded address greater than ref_ptr arg, break, else branch back to - // loop header - Instruction* uptr_test_inst = - builder.AddBinaryOp(GetBoolId(), SpvOpUGreaterThan, - uptr_load_inst->result_id(), param_vec[0]); - (void)builder.AddConditionalBranch(uptr_test_inst->result_id(), - bound_test_blk_id, hdr_blk_id, - kInvalidId, SpvSelectionControlMaskNone); - input_func->AddBasicBlock(std::move(cont_blk_ptr)); - // Bounds test block. Read length of selected buffer and test that - // all len arg bytes are in buffer. - std::unique_ptr bound_test_blk_ptr = - MakeUnique(std::move(bound_test_blk_label)); - builder.SetInsertPoint(&*bound_test_blk_ptr); - // Decrement index to point to previous/candidate buffer address - Instruction* cand_idx_inst = builder.AddBinaryOp( - GetUintId(), SpvOpISub, idx_inc_id, builder.GetUintConstantId(1u)); - // Load candidate buffer address - Instruction* cand_ac_inst = - builder.AddTernaryOp(ibuf_ptr_id, SpvOpAccessChain, ibuf_id, - builder.GetUintConstantId(kDebugInputDataOffset), - cand_idx_inst->result_id()); - Instruction* cand_load_inst = - builder.AddUnaryOp(ibuf_type_id, SpvOpLoad, cand_ac_inst->result_id()); - // Compute offset of ref_ptr from candidate buffer address - Instruction* offset_inst = builder.AddBinaryOp( - ibuf_type_id, SpvOpISub, param_vec[0], cand_load_inst->result_id()); - // Convert ref length to uint64 - Instruction* ref_len_64_inst = - builder.AddUnaryOp(ibuf_type_id, SpvOpUConvert, param_vec[1]); - // Add ref length to ref offset to compute end of reference - Instruction* ref_end_inst = - builder.AddBinaryOp(ibuf_type_id, SpvOpIAdd, offset_inst->result_id(), - ref_len_64_inst->result_id()); - // Load starting index of lengths in input buffer and convert to uint32 - Instruction* len_start_ac_inst = - builder.AddTernaryOp(ibuf_ptr_id, SpvOpAccessChain, ibuf_id, - builder.GetUintConstantId(kDebugInputDataOffset), - builder.GetUintConstantId(0u)); - Instruction* len_start_load_inst = builder.AddUnaryOp( - ibuf_type_id, SpvOpLoad, len_start_ac_inst->result_id()); - Instruction* len_start_32_inst = builder.AddUnaryOp( - GetUintId(), SpvOpUConvert, len_start_load_inst->result_id()); - // Decrement search index to get candidate buffer length index - Instruction* cand_len_idx_inst = - builder.AddBinaryOp(GetUintId(), SpvOpISub, cand_idx_inst->result_id(), - builder.GetUintConstantId(1u)); - // Add candidate length index to start index - Instruction* len_idx_inst = builder.AddBinaryOp( - GetUintId(), SpvOpIAdd, cand_len_idx_inst->result_id(), - len_start_32_inst->result_id()); - // Load candidate buffer length - Instruction* len_ac_inst = - builder.AddTernaryOp(ibuf_ptr_id, SpvOpAccessChain, ibuf_id, - builder.GetUintConstantId(kDebugInputDataOffset), - len_idx_inst->result_id()); - Instruction* len_load_inst = - builder.AddUnaryOp(ibuf_type_id, SpvOpLoad, len_ac_inst->result_id()); - // Test if reference end within candidate buffer length - Instruction* len_test_inst = builder.AddBinaryOp( - GetBoolId(), SpvOpULessThanEqual, ref_end_inst->result_id(), - len_load_inst->result_id()); - // Return test result - (void)builder.AddInstruction(MakeUnique( - context(), SpvOpReturnValue, 0, 0, - std::initializer_list{ - {SPV_OPERAND_TYPE_ID, {len_test_inst->result_id()}}})); - // Close block - input_func->AddBasicBlock(std::move(bound_test_blk_ptr)); - // Close function and add function to module - std::unique_ptr func_end_inst( - new Instruction(get_module()->context(), SpvOpFunctionEnd, 0, 0, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_end_inst); - input_func->SetFunctionEnd(std::move(func_end_inst)); - context()->AddFunction(std::move(input_func)); + enum { + kShaderId = 0, + kInstructionIndex = 1, + kStageInfo = 2, + kRefPtr = 3, + kLength = 4, + kNumArgs + }; + if (search_test_func_id_ != 0) { + return search_test_func_id_; } + // Generate function "bool search_and_test(uint64_t ref_ptr, uint32_t len)" + // which searches input buffer for buffer which most likely contains the + // pointer value |ref_ptr| and verifies that the entire reference of + // length |len| bytes is contained in the buffer. + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + const analysis::Integer* uint_type = GetInteger(32, false); + const analysis::Vector v4uint(uint_type, 4); + const analysis::Type* v4uint_type = type_mgr->GetRegisteredType(&v4uint); + + std::vector param_types = { + uint_type, uint_type, v4uint_type, type_mgr->GetType(GetUint64Id()), + uint_type}; + + const std::string func_name{"inst_buff_addr_search_and_test"}; + const uint32_t func_id = TakeNextId(); + std::unique_ptr func = + StartFunction(func_id, type_mgr->GetBoolType(), param_types); + func->SetFunctionEnd(EndFunction()); + context()->AddFunctionDeclaration(std::move(func)); + context()->AddDebug2Inst(NewName(func_id, func_name)); + + std::vector operands{ + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {func_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + {uint32_t(spv::Decoration::LinkageAttributes)}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_STRING, + utils::MakeVector(func_name.c_str())}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LINKAGE_TYPE, + {uint32_t(spv::LinkageType::Import)}}, + }; + get_decoration_mgr()->AddDecoration(spv::Op::OpDecorate, operands); + + search_test_func_id_ = func_id; return search_test_func_id_; } uint32_t InstBuffAddrCheckPass::GenSearchAndTest(Instruction* ref_inst, InstructionBuilder* builder, - uint32_t* ref_uptr_id) { + uint32_t* ref_uptr_id, + uint32_t stage_idx) { // Enable Int64 if necessary - if (!get_feature_mgr()->HasCapability(SpvCapabilityInt64)) { - std::unique_ptr cap_int64_inst(new Instruction( - context(), SpvOpCapability, 0, 0, - std::initializer_list{ - {SPV_OPERAND_TYPE_CAPABILITY, {SpvCapabilityInt64}}})); - get_def_use_mgr()->AnalyzeInstDefUse(&*cap_int64_inst); - context()->AddCapability(std::move(cap_int64_inst)); - } // Convert reference pointer to uint64 - uint32_t ref_ptr_id = ref_inst->GetSingleWordInOperand(0); + const uint32_t ref_ptr_id = ref_inst->GetSingleWordInOperand(0); Instruction* ref_uptr_inst = - builder->AddUnaryOp(GetUint64Id(), SpvOpConvertPtrToU, ref_ptr_id); + builder->AddUnaryOp(GetUint64Id(), spv::Op::OpConvertPtrToU, ref_ptr_id); *ref_uptr_id = ref_uptr_inst->result_id(); // Compute reference length in bytes analysis::DefUseManager* du_mgr = get_def_use_mgr(); Instruction* ref_ptr_inst = du_mgr->GetDef(ref_ptr_id); - uint32_t ref_ptr_ty_id = ref_ptr_inst->type_id(); + const uint32_t ref_ptr_ty_id = ref_ptr_inst->type_id(); Instruction* ref_ptr_ty_inst = du_mgr->GetDef(ref_ptr_ty_id); - uint32_t ref_len = GetTypeLength(ref_ptr_ty_inst->GetSingleWordInOperand(1)); - uint32_t ref_len_id = builder->GetUintConstantId(ref_len); + const uint32_t ref_len = + GetTypeLength(ref_ptr_ty_inst->GetSingleWordInOperand(1)); // Gen call to search and test function - const std::vector args = {GetSearchAndTestFuncId(), *ref_uptr_id, - ref_len_id}; - Instruction* call_inst = - builder->AddNaryOp(GetBoolId(), SpvOpFunctionCall, args); - uint32_t retval = call_inst->result_id(); - return retval; + const uint32_t func_id = GetSearchAndTestFuncId(); + const std::vector args = { + builder->GetUintConstantId(shader_id_), + builder->GetUintConstantId(ref_inst->unique_id()), + GenStageInfo(stage_idx, builder), *ref_uptr_id, + builder->GetUintConstantId(ref_len)}; + return GenReadFunctionCall(GetBoolId(), func_id, args, builder); } void InstBuffAddrCheckPass::GenBuffAddrCheckCode( @@ -445,16 +270,16 @@ void InstBuffAddrCheckPass::GenBuffAddrCheckCode( context(), &*new_blk_ptr, IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); new_blocks->push_back(std::move(new_blk_ptr)); - uint32_t error_id = builder.GetUintConstantId(kInstErrorBuffAddrUnallocRef); // Generate code to do search and test if all bytes of reference // are within a listed buffer. Return reference pointer converted to uint64. uint32_t ref_uptr_id; - uint32_t valid_id = GenSearchAndTest(ref_inst, &builder, &ref_uptr_id); + uint32_t valid_id = + GenSearchAndTest(ref_inst, &builder, &ref_uptr_id, stage_idx); // Generate test of search results with true branch // being full reference and false branch being debug output and zero // for the referenced value. - GenCheckCode(valid_id, error_id, ref_uptr_id, stage_idx, ref_inst, - new_blocks); + GenCheckCode(valid_id, ref_inst, new_blocks); + // Move original block's remaining code into remainder/merge block and add // to new blocks BasicBlock* back_blk_ptr = &*new_blocks->back(); @@ -469,6 +294,20 @@ void InstBuffAddrCheckPass::InitInstBuffAddrCheck() { } Pass::Status InstBuffAddrCheckPass::ProcessImpl() { + // The memory model and linkage must always be updated for spirv-link to work + // correctly. + AddStorageBufferExt(); + if (!get_feature_mgr()->HasExtension(kSPV_KHR_physical_storage_buffer)) { + context()->AddExtension("SPV_KHR_physical_storage_buffer"); + } + + context()->AddCapability(spv::Capability::PhysicalStorageBufferAddresses); + Instruction* memory_model = get_module()->GetMemoryModel(); + memory_model->SetInOperand( + 0u, {uint32_t(spv::AddressingModel::PhysicalStorageBuffer64)}); + + context()->AddCapability(spv::Capability::Int64); + context()->AddCapability(spv::Capability::Linkage); // Perform bindless bounds check on each entry point function in module InstProcessFunction pfn = [this](BasicBlock::iterator ref_inst_itr, @@ -477,14 +316,13 @@ Pass::Status InstBuffAddrCheckPass::ProcessImpl() { return GenBuffAddrCheckCode(ref_inst_itr, ref_block_itr, stage_idx, new_blocks); }; - bool modified = InstProcessEntryPointCallTree(pfn); - return modified ? Status::SuccessWithChange : Status::SuccessWithoutChange; + InstProcessEntryPointCallTree(pfn); + // This pass always changes the memory model, so that linking will work + // properly. + return Status::SuccessWithChange; } Pass::Status InstBuffAddrCheckPass::Process() { - if (!get_feature_mgr()->HasCapability( - SpvCapabilityPhysicalStorageBufferAddressesEXT)) - return Status::SuccessWithoutChange; InitInstBuffAddrCheck(); return ProcessImpl(); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.h index a82322395..f07f98a0f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_buff_addr_check_pass.h @@ -29,23 +29,19 @@ namespace opt { class InstBuffAddrCheckPass : public InstrumentPass { public: // For test harness only - InstBuffAddrCheckPass() : InstrumentPass(7, 23, kInstValidationIdBuffAddr) {} + InstBuffAddrCheckPass() : InstrumentPass(0, 23, false, true) {} // For all other interfaces - InstBuffAddrCheckPass(uint32_t desc_set, uint32_t shader_id) - : InstrumentPass(desc_set, shader_id, kInstValidationIdBuffAddr) {} + InstBuffAddrCheckPass(uint32_t shader_id) + : InstrumentPass(0, shader_id, false, true) {} ~InstBuffAddrCheckPass() override = default; // See optimizer.hpp for pass user documentation. Status Process() override; - const char* name() const override { return "inst-bindless-check-pass"; } + const char* name() const override { return "inst-buff-addr-check-pass"; } private: - // Return byte alignment of type |type_id|. Must be int, float, vector, - // matrix, struct, array or physical pointer. Uses std430 alignment. - uint32_t GetTypeAlignment(uint32_t type_id); - // Return byte length of type |type_id|. Must be int, float, vector, matrix, // struct, array or physical pointer. Uses std430 alignment and sizes. uint32_t GetTypeLength(uint32_t type_id); @@ -62,7 +58,7 @@ class InstBuffAddrCheckPass : public InstrumentPass { // are within the buffer. Returns id of boolean value which is true if // search and test is successful, false otherwise. uint32_t GenSearchAndTest(Instruction* ref_inst, InstructionBuilder* builder, - uint32_t* ref_uptr_id); + uint32_t* ref_uptr_id, uint32_t stage_idx); // This function does checking instrumentation on a single // instruction which references through a physical storage buffer address. @@ -115,8 +111,7 @@ class InstBuffAddrCheckPass : public InstrumentPass { // writes debug error output utilizing |ref_inst|, |error_id| and // |stage_idx|. Generate merge block for valid and invalid reference blocks. // Kill original reference. - void GenCheckCode(uint32_t check_id, uint32_t error_id, uint32_t length_id, - uint32_t stage_idx, Instruction* ref_inst, + void GenCheckCode(uint32_t check_id, Instruction* ref_inst, std::vector>* new_blocks); // Initialize state for instrumenting physical buffer address checking diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.cpp index 4218138f9..abd25e939 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.cpp @@ -16,6 +16,7 @@ #include "inst_debug_printf_pass.h" +#include "source/spirv_constant.h" #include "source/util/string_utils.h" #include "spirv/unified1/NonSemanticDebugPrintf.h" @@ -34,8 +35,8 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, const analysis::Type* c_ty = v_ty->element_type(); uint32_t c_ty_id = type_mgr->GetId(c_ty); for (uint32_t c = 0; c < v_ty->element_count(); ++c) { - Instruction* c_inst = builder->AddIdLiteralOp( - c_ty_id, SpvOpCompositeExtract, val_inst->result_id(), c); + Instruction* c_inst = + builder->AddCompositeExtract(c_ty_id, val_inst->result_id(), {c}); GenOutputValues(c_inst, val_ids, builder); } return; @@ -44,8 +45,8 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, // Select between uint32 zero or one uint32_t zero_id = builder->GetUintConstantId(0); uint32_t one_id = builder->GetUintConstantId(1); - Instruction* sel_inst = builder->AddTernaryOp( - GetUintId(), SpvOpSelect, val_inst->result_id(), one_id, zero_id); + Instruction* sel_inst = builder->AddSelect( + GetUintId(), val_inst->result_id(), one_id, zero_id); val_ids->push_back(sel_inst->result_id()); return; } @@ -55,21 +56,21 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, case 16: { // Convert float16 to float32 and recurse Instruction* f32_inst = builder->AddUnaryOp( - GetFloatId(), SpvOpFConvert, val_inst->result_id()); + GetFloatId(), spv::Op::OpFConvert, val_inst->result_id()); GenOutputValues(f32_inst, val_ids, builder); return; } case 64: { // Bitcast float64 to uint64 and recurse Instruction* ui64_inst = builder->AddUnaryOp( - GetUint64Id(), SpvOpBitcast, val_inst->result_id()); + GetUint64Id(), spv::Op::OpBitcast, val_inst->result_id()); GenOutputValues(ui64_inst, val_ids, builder); return; } case 32: { // Bitcase float32 to uint32 - Instruction* bc_inst = builder->AddUnaryOp(GetUintId(), SpvOpBitcast, - val_inst->result_id()); + Instruction* bc_inst = builder->AddUnaryOp( + GetUintId(), spv::Op::OpBitcast, val_inst->result_id()); val_ids->push_back(bc_inst->result_id()); return; } @@ -85,17 +86,17 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, Instruction* ui64_inst = val_inst; if (i_ty->IsSigned()) { // Bitcast sint64 to uint64 - ui64_inst = builder->AddUnaryOp(GetUint64Id(), SpvOpBitcast, + ui64_inst = builder->AddUnaryOp(GetUint64Id(), spv::Op::OpBitcast, val_inst->result_id()); } // Break uint64 into 2x uint32 Instruction* lo_ui64_inst = builder->AddUnaryOp( - GetUintId(), SpvOpUConvert, ui64_inst->result_id()); + GetUintId(), spv::Op::OpUConvert, ui64_inst->result_id()); Instruction* rshift_ui64_inst = builder->AddBinaryOp( - GetUint64Id(), SpvOpShiftRightLogical, ui64_inst->result_id(), - builder->GetUintConstantId(32)); + GetUint64Id(), spv::Op::OpShiftRightLogical, + ui64_inst->result_id(), builder->GetUintConstantId(32)); Instruction* hi_ui64_inst = builder->AddUnaryOp( - GetUintId(), SpvOpUConvert, rshift_ui64_inst->result_id()); + GetUintId(), spv::Op::OpUConvert, rshift_ui64_inst->result_id()); val_ids->push_back(lo_ui64_inst->result_id()); val_ids->push_back(hi_ui64_inst->result_id()); return; @@ -104,12 +105,12 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, Instruction* ui8_inst = val_inst; if (i_ty->IsSigned()) { // Bitcast sint8 to uint8 - ui8_inst = builder->AddUnaryOp(GetUint8Id(), SpvOpBitcast, + ui8_inst = builder->AddUnaryOp(GetUint8Id(), spv::Op::OpBitcast, val_inst->result_id()); } // Convert uint8 to uint32 Instruction* ui32_inst = builder->AddUnaryOp( - GetUintId(), SpvOpUConvert, ui8_inst->result_id()); + GetUintId(), spv::Op::OpUConvert, ui8_inst->result_id()); val_ids->push_back(ui32_inst->result_id()); return; } @@ -117,7 +118,7 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, Instruction* ui32_inst = val_inst; if (i_ty->IsSigned()) { // Bitcast sint32 to uint32 - ui32_inst = builder->AddUnaryOp(GetUintId(), SpvOpBitcast, + ui32_inst = builder->AddUnaryOp(GetUintId(), spv::Op::OpBitcast, val_inst->result_id()); } // uint32 needs no further processing @@ -137,7 +138,7 @@ void InstDebugPrintfPass::GenOutputValues(Instruction* val_inst, } void InstDebugPrintfPass::GenOutputCode( - Instruction* printf_inst, uint32_t stage_idx, + Instruction* printf_inst, std::vector>* new_blocks) { BasicBlock* back_blk_ptr = &*new_blocks->back(); InstructionBuilder builder( @@ -158,25 +159,27 @@ void InstDebugPrintfPass::GenOutputCode( return; } Instruction* opnd_inst = get_def_use_mgr()->GetDef(*iid); - if (opnd_inst->opcode() == SpvOpString) { + if (opnd_inst->opcode() == spv::Op::OpString) { uint32_t string_id_id = builder.GetUintConstantId(*iid); val_ids.push_back(string_id_id); } else { GenOutputValues(opnd_inst, &val_ids, &builder); } }); - GenDebugStreamWrite(uid2offset_[printf_inst->unique_id()], stage_idx, val_ids, - &builder); + GenDebugStreamWrite( + builder.GetUintConstantId(shader_id_), + builder.GetUintConstantId(uid2offset_[printf_inst->unique_id()]), val_ids, + &builder); context()->KillInst(printf_inst); } void InstDebugPrintfPass::GenDebugPrintfCode( BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, + UptrVectorIterator ref_block_itr, std::vector>* new_blocks) { // If not DebugPrintf OpExtInst, return. Instruction* printf_inst = &*ref_inst_itr; - if (printf_inst->opcode() != SpvOpExtInst) return; + if (printf_inst->opcode() != spv::Op::OpExtInst) return; if (printf_inst->GetSingleWordInOperand(0) != ext_inst_printf_id_) return; if (printf_inst->GetSingleWordInOperand(1) != NonSemanticDebugPrintfDebugPrintf) @@ -188,7 +191,7 @@ void InstDebugPrintfPass::GenDebugPrintfCode( MovePreludeCode(ref_inst_itr, ref_block_itr, &new_blk_ptr); new_blocks->push_back(std::move(new_blk_ptr)); // Generate instructions to output printf args to printf buffer - GenOutputCode(printf_inst, stage_idx, new_blocks); + GenOutputCode(printf_inst, new_blocks); // Caller expects at least two blocks with last block containing remaining // code, so end block after instrumentation, create remainder block, and // branch to it @@ -208,19 +211,243 @@ void InstDebugPrintfPass::GenDebugPrintfCode( new_blocks->push_back(std::move(new_blk_ptr)); } +// Return id for output buffer +uint32_t InstDebugPrintfPass::GetOutputBufferId() { + if (output_buffer_id_ == 0) { + // If not created yet, create one + analysis::DecorationManager* deco_mgr = get_decoration_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::RuntimeArray* reg_uint_rarr_ty = GetUintRuntimeArrayType(32); + analysis::Integer* reg_uint_ty = GetInteger(32, false); + analysis::Type* reg_buf_ty = + GetStruct({reg_uint_ty, reg_uint_ty, reg_uint_rarr_ty}); + uint32_t obufTyId = type_mgr->GetTypeInstruction(reg_buf_ty); + // By the Vulkan spec, a pre-existing struct containing a RuntimeArray + // must be a block, and will therefore be decorated with Block. Therefore + // the undecorated type returned here will not be pre-existing and can + // safely be decorated. Since this type is now decorated, it is out of + // sync with the TypeManager and therefore the TypeManager must be + // invalidated after this pass. + assert(context()->get_def_use_mgr()->NumUses(obufTyId) == 0 && + "used struct type returned"); + deco_mgr->AddDecoration(obufTyId, uint32_t(spv::Decoration::Block)); + deco_mgr->AddMemberDecoration(obufTyId, kDebugOutputFlagsOffset, + uint32_t(spv::Decoration::Offset), 0); + deco_mgr->AddMemberDecoration(obufTyId, kDebugOutputSizeOffset, + uint32_t(spv::Decoration::Offset), 4); + deco_mgr->AddMemberDecoration(obufTyId, kDebugOutputDataOffset, + uint32_t(spv::Decoration::Offset), 8); + uint32_t obufTyPtrId_ = + type_mgr->FindPointerToType(obufTyId, spv::StorageClass::StorageBuffer); + output_buffer_id_ = TakeNextId(); + std::unique_ptr newVarOp(new Instruction( + context(), spv::Op::OpVariable, obufTyPtrId_, output_buffer_id_, + {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + {uint32_t(spv::StorageClass::StorageBuffer)}}})); + context()->AddGlobalValue(std::move(newVarOp)); + context()->AddDebug2Inst(NewGlobalName(obufTyId, "OutputBuffer")); + context()->AddDebug2Inst(NewMemberName(obufTyId, 0, "flags")); + context()->AddDebug2Inst(NewMemberName(obufTyId, 1, "written_count")); + context()->AddDebug2Inst(NewMemberName(obufTyId, 2, "data")); + context()->AddDebug2Inst(NewGlobalName(output_buffer_id_, "output_buffer")); + deco_mgr->AddDecorationVal( + output_buffer_id_, uint32_t(spv::Decoration::DescriptorSet), desc_set_); + deco_mgr->AddDecorationVal(output_buffer_id_, + uint32_t(spv::Decoration::Binding), + GetOutputBufferBinding()); + AddStorageBufferExt(); + if (get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { + // Add the new buffer to all entry points. + for (auto& entry : get_module()->entry_points()) { + entry.AddOperand({SPV_OPERAND_TYPE_ID, {output_buffer_id_}}); + context()->AnalyzeUses(&entry); + } + } + } + return output_buffer_id_; +} + +uint32_t InstDebugPrintfPass::GetOutputBufferPtrId() { + if (output_buffer_ptr_id_ == 0) { + output_buffer_ptr_id_ = context()->get_type_mgr()->FindPointerToType( + GetUintId(), spv::StorageClass::StorageBuffer); + } + return output_buffer_ptr_id_; +} + +uint32_t InstDebugPrintfPass::GetOutputBufferBinding() { + return kDebugOutputPrintfStream; +} + +void InstDebugPrintfPass::GenDebugOutputFieldCode(uint32_t base_offset_id, + uint32_t field_offset, + uint32_t field_value_id, + InstructionBuilder* builder) { + // Cast value to 32-bit unsigned if necessary + uint32_t val_id = GenUintCastCode(field_value_id, builder); + // Store value + Instruction* data_idx_inst = builder->AddIAdd( + GetUintId(), base_offset_id, builder->GetUintConstantId(field_offset)); + uint32_t buf_id = GetOutputBufferId(); + uint32_t buf_uint_ptr_id = GetOutputBufferPtrId(); + Instruction* achain_inst = builder->AddAccessChain( + buf_uint_ptr_id, buf_id, + {builder->GetUintConstantId(kDebugOutputDataOffset), + data_idx_inst->result_id()}); + (void)builder->AddStore(achain_inst->result_id(), val_id); +} + +uint32_t InstDebugPrintfPass::GetStreamWriteFunctionId(uint32_t param_cnt) { + enum { + kShaderId = 0, + kInstructionIndex = 1, + kFirstParam = 2, + }; + // Total param count is common params plus validation-specific + // params + if (param2output_func_id_[param_cnt] == 0) { + // Create function + param2output_func_id_[param_cnt] = TakeNextId(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + + const analysis::Type* uint_type = GetInteger(32, false); + + std::vector param_types(kFirstParam + param_cnt, + uint_type); + std::unique_ptr output_func = StartFunction( + param2output_func_id_[param_cnt], type_mgr->GetVoidType(), param_types); + + std::vector param_ids = AddParameters(*output_func, param_types); + + // Create first block + auto new_blk_ptr = MakeUnique(NewLabel(TakeNextId())); + + InstructionBuilder builder( + context(), &*new_blk_ptr, + IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); + // Gen test if debug output buffer size will not be exceeded. + const uint32_t first_param_offset = kInstCommonOutInstructionIdx + 1; + const uint32_t obuf_record_sz = first_param_offset + param_cnt; + const uint32_t buf_id = GetOutputBufferId(); + const uint32_t buf_uint_ptr_id = GetOutputBufferPtrId(); + Instruction* obuf_curr_sz_ac_inst = builder.AddAccessChain( + buf_uint_ptr_id, buf_id, + {builder.GetUintConstantId(kDebugOutputSizeOffset)}); + // Fetch the current debug buffer written size atomically, adding the + // size of the record to be written. + uint32_t obuf_record_sz_id = builder.GetUintConstantId(obuf_record_sz); + uint32_t mask_none_id = + builder.GetUintConstantId(uint32_t(spv::MemoryAccessMask::MaskNone)); + uint32_t scope_invok_id = + builder.GetUintConstantId(uint32_t(spv::Scope::Invocation)); + Instruction* obuf_curr_sz_inst = builder.AddQuadOp( + GetUintId(), spv::Op::OpAtomicIAdd, obuf_curr_sz_ac_inst->result_id(), + scope_invok_id, mask_none_id, obuf_record_sz_id); + uint32_t obuf_curr_sz_id = obuf_curr_sz_inst->result_id(); + // Compute new written size + Instruction* obuf_new_sz_inst = + builder.AddIAdd(GetUintId(), obuf_curr_sz_id, + builder.GetUintConstantId(obuf_record_sz)); + // Fetch the data bound + Instruction* obuf_bnd_inst = + builder.AddIdLiteralOp(GetUintId(), spv::Op::OpArrayLength, + GetOutputBufferId(), kDebugOutputDataOffset); + // Test that new written size is less than or equal to debug output + // data bound + Instruction* obuf_safe_inst = builder.AddBinaryOp( + GetBoolId(), spv::Op::OpULessThanEqual, obuf_new_sz_inst->result_id(), + obuf_bnd_inst->result_id()); + uint32_t merge_blk_id = TakeNextId(); + uint32_t write_blk_id = TakeNextId(); + std::unique_ptr merge_label(NewLabel(merge_blk_id)); + std::unique_ptr write_label(NewLabel(write_blk_id)); + (void)builder.AddConditionalBranch( + obuf_safe_inst->result_id(), write_blk_id, merge_blk_id, merge_blk_id, + uint32_t(spv::SelectionControlMask::MaskNone)); + // Close safety test block and gen write block + output_func->AddBasicBlock(std::move(new_blk_ptr)); + new_blk_ptr = MakeUnique(std::move(write_label)); + builder.SetInsertPoint(&*new_blk_ptr); + // Generate common and stage-specific debug record members + GenDebugOutputFieldCode(obuf_curr_sz_id, kInstCommonOutSize, + builder.GetUintConstantId(obuf_record_sz), + &builder); + // Store Shader Id + GenDebugOutputFieldCode(obuf_curr_sz_id, kInstCommonOutShaderId, + param_ids[kShaderId], &builder); + // Store Instruction Idx + GenDebugOutputFieldCode(obuf_curr_sz_id, kInstCommonOutInstructionIdx, + param_ids[kInstructionIndex], &builder); + // Gen writes of validation specific data + for (uint32_t i = 0; i < param_cnt; ++i) { + GenDebugOutputFieldCode(obuf_curr_sz_id, first_param_offset + i, + param_ids[kFirstParam + i], &builder); + } + // Close write block and gen merge block + (void)builder.AddBranch(merge_blk_id); + output_func->AddBasicBlock(std::move(new_blk_ptr)); + new_blk_ptr = MakeUnique(std::move(merge_label)); + builder.SetInsertPoint(&*new_blk_ptr); + // Close merge block and function and add function to module + (void)builder.AddNullaryOp(0, spv::Op::OpReturn); + + output_func->AddBasicBlock(std::move(new_blk_ptr)); + output_func->SetFunctionEnd(EndFunction()); + context()->AddFunction(std::move(output_func)); + + std::string name("stream_write_"); + name += std::to_string(param_cnt); + + context()->AddDebug2Inst( + NewGlobalName(param2output_func_id_[param_cnt], name)); + } + return param2output_func_id_[param_cnt]; +} + +void InstDebugPrintfPass::GenDebugStreamWrite( + uint32_t shader_id, uint32_t instruction_idx_id, + const std::vector& validation_ids, InstructionBuilder* builder) { + // Call debug output function. Pass func_idx, instruction_idx and + // validation ids as args. + uint32_t val_id_cnt = static_cast(validation_ids.size()); + std::vector args = {shader_id, instruction_idx_id}; + (void)args.insert(args.end(), validation_ids.begin(), validation_ids.end()); + (void)builder->AddFunctionCall(GetVoidId(), + GetStreamWriteFunctionId(val_id_cnt), args); +} + +std::unique_ptr InstDebugPrintfPass::NewGlobalName( + uint32_t id, const std::string& name_str) { + std::string prefixed_name{"inst_printf_"}; + prefixed_name += name_str; + return NewName(id, prefixed_name); +} + +std::unique_ptr InstDebugPrintfPass::NewMemberName( + uint32_t id, uint32_t member_index, const std::string& name_str) { + return MakeUnique( + context(), spv::Op::OpMemberName, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {id}}, + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {member_index}}, + {SPV_OPERAND_TYPE_LITERAL_STRING, utils::MakeVector(name_str)}}); +} + void InstDebugPrintfPass::InitializeInstDebugPrintf() { // Initialize base class InitializeInstrument(); + output_buffer_id_ = 0; + output_buffer_ptr_id_ = 0; } Pass::Status InstDebugPrintfPass::ProcessImpl() { // Perform printf instrumentation on each entry point function in module InstProcessFunction pfn = [this](BasicBlock::iterator ref_inst_itr, - UptrVectorIterator ref_block_itr, uint32_t stage_idx, + UptrVectorIterator ref_block_itr, + [[maybe_unused]] uint32_t stage_idx, std::vector>* new_blocks) { - return GenDebugPrintfCode(ref_inst_itr, ref_block_itr, stage_idx, - new_blocks); + return GenDebugPrintfCode(ref_inst_itr, ref_block_itr, new_blocks); }; (void)InstProcessEntryPointCallTree(pfn); // Remove DebugPrintf OpExtInstImport instruction @@ -239,15 +466,7 @@ Pass::Status InstDebugPrintfPass::ProcessImpl() { } } if (!non_sem_set_seen) { - for (auto c_itr = context()->module()->extension_begin(); - c_itr != context()->module()->extension_end(); ++c_itr) { - const std::string ext_name = c_itr->GetInOperand(0).AsString(); - if (ext_name == "SPV_KHR_non_semantic_info") { - context()->KillInst(&*c_itr); - break; - } - } - context()->get_feature_mgr()->RemoveExtension(kSPV_KHR_non_semantic_info); + context()->RemoveExtension(kSPV_KHR_non_semantic_info); } return Status::SuccessWithChange; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.h index 70b0a72bd..5688d3841 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/inst_debug_printf_pass.h @@ -28,10 +28,10 @@ namespace opt { class InstDebugPrintfPass : public InstrumentPass { public: // For test harness only - InstDebugPrintfPass() : InstrumentPass(7, 23, kInstValidationIdDebugPrintf) {} + InstDebugPrintfPass() : InstrumentPass(7, 23, false, false) {} // For all other interfaces InstDebugPrintfPass(uint32_t desc_set, uint32_t shader_id) - : InstrumentPass(desc_set, shader_id, kInstValidationIdDebugPrintf) {} + : InstrumentPass(desc_set, shader_id, false, false) {} ~InstDebugPrintfPass() override = default; @@ -41,12 +41,92 @@ class InstDebugPrintfPass : public InstrumentPass { const char* name() const override { return "inst-printf-pass"; } private: + // Gen code into |builder| to write |field_value_id| into debug output + // buffer at |base_offset_id| + |field_offset|. + void GenDebugOutputFieldCode(uint32_t base_offset_id, uint32_t field_offset, + uint32_t field_value_id, + InstructionBuilder* builder); + + // Generate instructions in |builder| which will atomically fetch and + // increment the size of the debug output buffer stream of the current + // validation and write a record to the end of the stream, if enough space + // in the buffer remains. The record will contain the index of the function + // and instruction within that function |func_idx, instruction_idx| which + // generated the record. Finally, the record will contain validation-specific + // data contained in |validation_ids| which will identify the validation + // error as well as the values involved in the error. + // + // The output buffer binding written to by the code generated by the function + // is determined by the validation id specified when each specific + // instrumentation pass is created. + // + // The output buffer is a sequence of 32-bit values with the following + // format (where all elements are unsigned 32-bit unless otherwise noted): + // + // Size + // Record0 + // Record1 + // Record2 + // ... + // + // Size is the number of 32-bit values that have been written or + // attempted to be written to the output buffer, excluding the Size. It is + // initialized to 0. If the size of attempts to write the buffer exceeds + // the actual size of the buffer, it is possible that this field can exceed + // the actual size of the buffer. + // + // Each Record* is a variable-length sequence of 32-bit values with the + // following format defined using static const offsets in the .cpp file: + // + // Record Size + // Shader ID + // Instruction Index + // ... + // Validation Error Code + // Validation-specific Word 0 + // Validation-specific Word 1 + // Validation-specific Word 2 + // ... + // + // Each record consists of two subsections: members common across all + // validation and members specific to a + // validation. + // + // The Record Size is the number of 32-bit words in the record, including + // the Record Size word. + // + // Shader ID is a value that identifies which shader has generated the + // validation error. It is passed when the instrumentation pass is created. + // + // The Instruction Index is the position of the instruction within the + // SPIR-V file which is in error. + // + // The Validation Error Code specifies the exact error which has occurred. + // These are enumerated with the kInstError* static consts. This allows + // multiple validation layers to use the same, single output buffer. + // + // The Validation-specific Words are a validation-specific number of 32-bit + // words which give further information on the validation error that + // occurred. These are documented further in each file containing the + // validation-specific class which derives from this base class. + // + // Because the code that is generated checks against the size of the buffer + // before writing, the size of the debug out buffer can be used by the + // validation layer to control the number of error records that are written. + void GenDebugStreamWrite(uint32_t shader_id, uint32_t instruction_idx_id, + const std::vector& validation_ids, + InstructionBuilder* builder); + + // Return id for output function. Define if it doesn't exist with + // |val_spec_param_cnt| validation-specific uint32 parameters. + uint32_t GetStreamWriteFunctionId(uint32_t val_spec_param_cnt); + // Generate instructions for OpDebugPrintf. // // If |ref_inst_itr| is an OpDebugPrintf, return in |new_blocks| the result // of replacing it with buffer write instructions within its block at // |ref_block_itr|. The instructions write a record to the printf - // output buffer stream including |function_idx, instruction_idx, stage_idx| + // output buffer stream including |function_idx, instruction_idx| // and removes the OpDebugPrintf. The block at |ref_block_itr| can just be // replaced with the block in |new_blocks|. Besides the buffer writes, this // block will comprise all instructions preceding and following @@ -64,7 +144,6 @@ class InstDebugPrintfPass : public InstrumentPass { // DebugPrintf. void GenDebugPrintfCode(BasicBlock::iterator ref_inst_itr, UptrVectorIterator ref_block_itr, - uint32_t stage_idx, std::vector>* new_blocks); // Generate a sequence of uint32 instructions in |builder| (if necessary) @@ -77,16 +156,40 @@ class InstDebugPrintfPass : public InstrumentPass { // Generate instructions to write a record containing the operands of // |printf_inst| arguments to printf buffer, adding new code to the end of // the last block in |new_blocks|. Kill OpDebugPrintf instruction. - void GenOutputCode(Instruction* printf_inst, uint32_t stage_idx, + void GenOutputCode(Instruction* printf_inst, std::vector>* new_blocks); + // Set the name for a function or global variable, names will be + // prefixed to identify which instrumentation pass generated them. + std::unique_ptr NewGlobalName(uint32_t id, + const std::string& name_str); + + // Set the name for a structure member + std::unique_ptr NewMemberName(uint32_t id, uint32_t member_index, + const std::string& name_str); + + // Return id for debug output buffer + uint32_t GetOutputBufferId(); + + // Return id for buffer uint type + uint32_t GetOutputBufferPtrId(); + + // Return binding for output buffer for current validation. + uint32_t GetOutputBufferBinding(); + // Initialize state for instrumenting bindless checking void InitializeInstDebugPrintf(); // Apply GenDebugPrintfCode to every instruction in module. Pass::Status ProcessImpl(); - uint32_t ext_inst_printf_id_; + uint32_t ext_inst_printf_id_{0}; + + // id for output buffer variable + uint32_t output_buffer_id_{0}; + + // ptr type id for output buffer element + uint32_t output_buffer_ptr_id_{0}; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.cpp index 2461e41e9..aa4ae26b6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.cpp @@ -24,38 +24,37 @@ namespace spvtools { namespace opt { - namespace { // Indices used to get particular operands out of instructions using InOperand. -const uint32_t kTypeImageDimIndex = 1; -const uint32_t kLoadBaseIndex = 0; -const uint32_t kPointerTypeStorageClassIndex = 0; -const uint32_t kVariableStorageClassIndex = 0; -const uint32_t kTypeImageSampledIndex = 5; +constexpr uint32_t kTypeImageDimIndex = 1; +constexpr uint32_t kLoadBaseIndex = 0; +constexpr uint32_t kPointerTypeStorageClassIndex = 0; +constexpr uint32_t kVariableStorageClassIndex = 0; +constexpr uint32_t kTypeImageSampledIndex = 5; // Constants for OpenCL.DebugInfo.100 / NonSemantic.Shader.DebugInfo.100 // extension instructions. -const uint32_t kExtInstSetIdInIdx = 0; -const uint32_t kExtInstInstructionInIdx = 1; -const uint32_t kDebugScopeNumWords = 7; -const uint32_t kDebugScopeNumWordsWithoutInlinedAt = 6; -const uint32_t kDebugNoScopeNumWords = 5; +constexpr uint32_t kExtInstSetIdInIdx = 0; +constexpr uint32_t kExtInstInstructionInIdx = 1; +constexpr uint32_t kDebugScopeNumWords = 7; +constexpr uint32_t kDebugScopeNumWordsWithoutInlinedAt = 6; +constexpr uint32_t kDebugNoScopeNumWords = 5; // Number of operands of an OpBranchConditional instruction // with weights. -const uint32_t kOpBranchConditionalWithWeightsNumOperands = 5; +constexpr uint32_t kOpBranchConditionalWithWeightsNumOperands = 5; } // namespace Instruction::Instruction(IRContext* c) : utils::IntrusiveNodeBase(), context_(c), - opcode_(SpvOpNop), + opcode_(spv::Op::OpNop), has_type_id_(false), has_result_id_(false), unique_id_(c->TakeNextUniqueId()), dbg_scope_(kNoDebugScope, kNoInlinedAt) {} -Instruction::Instruction(IRContext* c, SpvOp op) +Instruction::Instruction(IRContext* c, spv::Op op) : utils::IntrusiveNodeBase(), context_(c), opcode_(op), @@ -68,18 +67,18 @@ Instruction::Instruction(IRContext* c, const spv_parsed_instruction_t& inst, std::vector&& dbg_line) : utils::IntrusiveNodeBase(), context_(c), - opcode_(static_cast(inst.opcode)), + opcode_(static_cast(inst.opcode)), has_type_id_(inst.type_id != 0), has_result_id_(inst.result_id != 0), unique_id_(c->TakeNextUniqueId()), dbg_line_insts_(std::move(dbg_line)), dbg_scope_(kNoDebugScope, kNoInlinedAt) { + operands_.reserve(inst.num_operands); for (uint32_t i = 0; i < inst.num_operands; ++i) { const auto& current_payload = inst.operands[i]; - std::vector words( - inst.words + current_payload.offset, + operands_.emplace_back( + current_payload.type, inst.words + current_payload.offset, inst.words + current_payload.offset + current_payload.num_words); - operands_.emplace_back(current_payload.type, std::move(words)); } assert((!IsLineInst() || dbg_line.empty()) && "Op(No)Line attaching to Op(No)Line found"); @@ -89,21 +88,21 @@ Instruction::Instruction(IRContext* c, const spv_parsed_instruction_t& inst, const DebugScope& dbg_scope) : utils::IntrusiveNodeBase(), context_(c), - opcode_(static_cast(inst.opcode)), + opcode_(static_cast(inst.opcode)), has_type_id_(inst.type_id != 0), has_result_id_(inst.result_id != 0), unique_id_(c->TakeNextUniqueId()), dbg_scope_(dbg_scope) { + operands_.reserve(inst.num_operands); for (uint32_t i = 0; i < inst.num_operands; ++i) { const auto& current_payload = inst.operands[i]; - std::vector words( - inst.words + current_payload.offset, + operands_.emplace_back( + current_payload.type, inst.words + current_payload.offset, inst.words + current_payload.offset + current_payload.num_words); - operands_.emplace_back(current_payload.type, std::move(words)); } } -Instruction::Instruction(IRContext* c, SpvOp op, uint32_t ty_id, +Instruction::Instruction(IRContext* c, spv::Op op, uint32_t ty_id, uint32_t res_id, const OperandList& in_operands) : utils::IntrusiveNodeBase(), context_(c), @@ -113,6 +112,14 @@ Instruction::Instruction(IRContext* c, SpvOp op, uint32_t ty_id, unique_id_(c->TakeNextUniqueId()), operands_(), dbg_scope_(kNoDebugScope, kNoInlinedAt) { + size_t operands_size = in_operands.size(); + if (has_type_id_) { + operands_size++; + } + if (has_result_id_) { + operands_size++; + } + operands_.reserve(operands_size); if (has_type_id_) { operands_.emplace_back(spv_operand_type_t::SPV_OPERAND_TYPE_TYPE_ID, std::initializer_list{ty_id}); @@ -181,7 +188,7 @@ uint32_t Instruction::NumInOperandWords() const { } bool Instruction::HasBranchWeights() const { - if (opcode_ == SpvOpBranchConditional && + if (opcode_ == spv::Op::OpBranchConditional && NumOperands() == kOpBranchConditionalWithWeightsNumOperands) { return true; } @@ -210,13 +217,13 @@ bool Instruction::IsReadOnlyLoad() const { return false; } - if (address_def->opcode() == SpvOpVariable) { + if (address_def->opcode() == spv::Op::OpVariable) { if (address_def->IsReadOnlyPointer()) { return true; } } - if (address_def->opcode() == SpvOpLoad) { + if (address_def->opcode() == spv::Op::OpLoad) { const analysis::Type* address_type = context()->get_type_mgr()->GetType(address_def->type_id()); if (address_type->AsSampledImage() != nullptr) { @@ -237,12 +244,12 @@ Instruction* Instruction::GetBaseAddress() const { bool done = false; while (!done) { switch (base_inst->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: - case SpvOpImageTexelPointer: - case SpvOpCopyObject: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpCopyObject: // All of these instructions have the base pointer use a base pointer // in in-operand 0. base = base_inst->GetSingleWordInOperand(0); @@ -257,20 +264,20 @@ Instruction* Instruction::GetBaseAddress() const { } bool Instruction::IsReadOnlyPointer() const { - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityShader)) + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Shader)) return IsReadOnlyPointerShaders(); else return IsReadOnlyPointerKernel(); } bool Instruction::IsVulkanStorageImage() const { - if (opcode() != SpvOpTypePointer) { + if (opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - GetSingleWordInOperand(kPointerTypeStorageClassIndex); - if (storage_class != SpvStorageClassUniformConstant) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kPointerTypeStorageClassIndex)); + if (storage_class != spv::StorageClass::UniformConstant) { return false; } @@ -278,17 +285,18 @@ bool Instruction::IsVulkanStorageImage() const { context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); // Unpack the optional layer of arraying. - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = context()->get_def_use_mgr()->GetDef( base_type->GetSingleWordInOperand(0)); } - if (base_type->opcode() != SpvOpTypeImage) { + if (base_type->opcode() != spv::Op::OpTypeImage) { return false; } - if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) == SpvDimBuffer) { + if (spv::Dim(base_type->GetSingleWordInOperand(kTypeImageDimIndex)) == + spv::Dim::Buffer) { return false; } @@ -298,13 +306,13 @@ bool Instruction::IsVulkanStorageImage() const { } bool Instruction::IsVulkanSampledImage() const { - if (opcode() != SpvOpTypePointer) { + if (opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - GetSingleWordInOperand(kPointerTypeStorageClassIndex); - if (storage_class != SpvStorageClassUniformConstant) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kPointerTypeStorageClassIndex)); + if (storage_class != spv::StorageClass::UniformConstant) { return false; } @@ -312,17 +320,18 @@ bool Instruction::IsVulkanSampledImage() const { context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); // Unpack the optional layer of arraying. - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = context()->get_def_use_mgr()->GetDef( base_type->GetSingleWordInOperand(0)); } - if (base_type->opcode() != SpvOpTypeImage) { + if (base_type->opcode() != spv::Op::OpTypeImage) { return false; } - if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) == SpvDimBuffer) { + if (spv::Dim(base_type->GetSingleWordInOperand(kTypeImageDimIndex)) == + spv::Dim::Buffer) { return false; } @@ -332,13 +341,13 @@ bool Instruction::IsVulkanSampledImage() const { } bool Instruction::IsVulkanStorageTexelBuffer() const { - if (opcode() != SpvOpTypePointer) { + if (opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - GetSingleWordInOperand(kPointerTypeStorageClassIndex); - if (storage_class != SpvStorageClassUniformConstant) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kPointerTypeStorageClassIndex)); + if (storage_class != spv::StorageClass::UniformConstant) { return false; } @@ -346,17 +355,18 @@ bool Instruction::IsVulkanStorageTexelBuffer() const { context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); // Unpack the optional layer of arraying. - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = context()->get_def_use_mgr()->GetDef( base_type->GetSingleWordInOperand(0)); } - if (base_type->opcode() != SpvOpTypeImage) { + if (base_type->opcode() != spv::Op::OpTypeImage) { return false; } - if (base_type->GetSingleWordInOperand(kTypeImageDimIndex) != SpvDimBuffer) { + if (spv::Dim(base_type->GetSingleWordInOperand(kTypeImageDimIndex)) != + spv::Dim::Buffer) { return false; } @@ -368,7 +378,7 @@ bool Instruction::IsVulkanStorageTexelBuffer() const { bool Instruction::IsVulkanStorageBuffer() const { // Is there a difference between a "Storage buffer" and a "dynamic storage // buffer" in SPIR-V and do we care about the difference? - if (opcode() != SpvOpTypePointer) { + if (opcode() != spv::Op::OpTypePointer) { return false; } @@ -376,28 +386,28 @@ bool Instruction::IsVulkanStorageBuffer() const { context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); // Unpack the optional layer of arraying. - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = context()->get_def_use_mgr()->GetDef( base_type->GetSingleWordInOperand(0)); } - if (base_type->opcode() != SpvOpTypeStruct) { + if (base_type->opcode() != spv::Op::OpTypeStruct) { return false; } - uint32_t storage_class = - GetSingleWordInOperand(kPointerTypeStorageClassIndex); - if (storage_class == SpvStorageClassUniform) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kPointerTypeStorageClassIndex)); + if (storage_class == spv::StorageClass::Uniform) { bool is_buffer_block = false; context()->get_decoration_mgr()->ForEachDecoration( - base_type->result_id(), SpvDecorationBufferBlock, + base_type->result_id(), uint32_t(spv::Decoration::BufferBlock), [&is_buffer_block](const Instruction&) { is_buffer_block = true; }); return is_buffer_block; - } else if (storage_class == SpvStorageClassStorageBuffer) { + } else if (storage_class == spv::StorageClass::StorageBuffer) { bool is_block = false; context()->get_decoration_mgr()->ForEachDecoration( - base_type->result_id(), SpvDecorationBlock, + base_type->result_id(), uint32_t(spv::Decoration::Block), [&is_block](const Instruction&) { is_block = true; }); return is_block; } @@ -405,13 +415,14 @@ bool Instruction::IsVulkanStorageBuffer() const { } bool Instruction::IsVulkanStorageBufferVariable() const { - if (opcode() != SpvOpVariable) { + if (opcode() != spv::Op::OpVariable) { return false; } - uint32_t storage_class = GetSingleWordInOperand(kVariableStorageClassIndex); - if (storage_class == SpvStorageClassStorageBuffer || - storage_class == SpvStorageClassUniform) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kVariableStorageClassIndex)); + if (storage_class == spv::StorageClass::StorageBuffer || + storage_class == spv::StorageClass::Uniform) { Instruction* var_type = context()->get_def_use_mgr()->GetDef(type_id()); return var_type != nullptr && var_type->IsVulkanStorageBuffer(); } @@ -420,13 +431,13 @@ bool Instruction::IsVulkanStorageBufferVariable() const { } bool Instruction::IsVulkanUniformBuffer() const { - if (opcode() != SpvOpTypePointer) { + if (opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - GetSingleWordInOperand(kPointerTypeStorageClassIndex); - if (storage_class != SpvStorageClassUniform) { + spv::StorageClass storage_class = + spv::StorageClass(GetSingleWordInOperand(kPointerTypeStorageClassIndex)); + if (storage_class != spv::StorageClass::Uniform) { return false; } @@ -434,19 +445,19 @@ bool Instruction::IsVulkanUniformBuffer() const { context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(1)); // Unpack the optional layer of arraying. - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = context()->get_def_use_mgr()->GetDef( base_type->GetSingleWordInOperand(0)); } - if (base_type->opcode() != SpvOpTypeStruct) { + if (base_type->opcode() != spv::Op::OpTypeStruct) { return false; } bool is_block = false; context()->get_decoration_mgr()->ForEachDecoration( - base_type->result_id(), SpvDecorationBlock, + base_type->result_id(), uint32_t(spv::Decoration::Block), [&is_block](const Instruction&) { is_block = true; }); return is_block; } @@ -457,27 +468,27 @@ bool Instruction::IsReadOnlyPointerShaders() const { } Instruction* type_def = context()->get_def_use_mgr()->GetDef(type_id()); - if (type_def->opcode() != SpvOpTypePointer) { + if (type_def->opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - type_def->GetSingleWordInOperand(kPointerTypeStorageClassIndex); + spv::StorageClass storage_class = spv::StorageClass( + type_def->GetSingleWordInOperand(kPointerTypeStorageClassIndex)); switch (storage_class) { - case SpvStorageClassUniformConstant: + case spv::StorageClass::UniformConstant: if (!type_def->IsVulkanStorageImage() && !type_def->IsVulkanStorageTexelBuffer()) { return true; } break; - case SpvStorageClassUniform: + case spv::StorageClass::Uniform: if (!type_def->IsVulkanStorageBuffer()) { return true; } break; - case SpvStorageClassPushConstant: - case SpvStorageClassInput: + case spv::StorageClass::PushConstant: + case spv::StorageClass::Input: return true; default: break; @@ -485,7 +496,7 @@ bool Instruction::IsReadOnlyPointerShaders() const { bool is_nonwritable = false; context()->get_decoration_mgr()->ForEachDecoration( - result_id(), SpvDecorationNonWritable, + result_id(), uint32_t(spv::Decoration::NonWritable), [&is_nonwritable](const Instruction&) { is_nonwritable = true; }); return is_nonwritable; } @@ -496,34 +507,14 @@ bool Instruction::IsReadOnlyPointerKernel() const { } Instruction* type_def = context()->get_def_use_mgr()->GetDef(type_id()); - if (type_def->opcode() != SpvOpTypePointer) { + if (type_def->opcode() != spv::Op::OpTypePointer) { return false; } - uint32_t storage_class = - type_def->GetSingleWordInOperand(kPointerTypeStorageClassIndex); + spv::StorageClass storage_class = spv::StorageClass( + type_def->GetSingleWordInOperand(kPointerTypeStorageClassIndex)); - return storage_class == SpvStorageClassUniformConstant; -} - -uint32_t Instruction::GetTypeComponent(uint32_t element) const { - uint32_t subtype = 0; - switch (opcode()) { - case SpvOpTypeStruct: - subtype = GetSingleWordInOperand(element); - break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: - // These types all have uniform subtypes. - subtype = GetSingleWordInOperand(0u); - break; - default: - break; - } - - return subtype; + return storage_class == spv::StorageClass::UniformConstant; } void Instruction::UpdateLexicalScope(uint32_t scope) { @@ -586,13 +577,13 @@ bool Instruction::IsDebugLineInst() const { bool Instruction::IsLineInst() const { return IsLine() || IsNoLine(); } bool Instruction::IsLine() const { - if (opcode() == SpvOpLine) return true; + if (opcode() == spv::Op::OpLine) return true; NonSemanticShaderDebugInfo100Instructions ext_opt = GetShader100DebugOpcode(); return ext_opt == NonSemanticShaderDebugInfo100DebugLine; } bool Instruction::IsNoLine() const { - if (opcode() == SpvOpNoLine) return true; + if (opcode() == spv::Op::OpNoLine) return true; NonSemanticShaderDebugInfo100Instructions ext_opt = GetShader100DebugOpcode(); return ext_opt == NonSemanticShaderDebugInfo100DebugNoLine; } @@ -619,33 +610,35 @@ bool Instruction::IsValidBasePointer() const { } Instruction* type = context()->get_def_use_mgr()->GetDef(tid); - if (type->opcode() != SpvOpTypePointer) { + if (type->opcode() != spv::Op::OpTypePointer) { return false; } auto feature_mgr = context()->get_feature_mgr(); - if (feature_mgr->HasCapability(SpvCapabilityAddresses)) { + if (feature_mgr->HasCapability(spv::Capability::Addresses)) { // TODO: The rules here could be more restrictive. return true; } - if (opcode() == SpvOpVariable || opcode() == SpvOpFunctionParameter) { + if (opcode() == spv::Op::OpVariable || + opcode() == spv::Op::OpFunctionParameter) { return true; } // With variable pointers, there are more valid base pointer objects. // Variable pointers implicitly declares Variable pointers storage buffer. - SpvStorageClass storage_class = - static_cast(type->GetSingleWordInOperand(0)); - if ((feature_mgr->HasCapability(SpvCapabilityVariablePointersStorageBuffer) && - storage_class == SpvStorageClassStorageBuffer) || - (feature_mgr->HasCapability(SpvCapabilityVariablePointers) && - storage_class == SpvStorageClassWorkgroup)) { + spv::StorageClass storage_class = + static_cast(type->GetSingleWordInOperand(0)); + if ((feature_mgr->HasCapability( + spv::Capability::VariablePointersStorageBuffer) && + storage_class == spv::StorageClass::StorageBuffer) || + (feature_mgr->HasCapability(spv::Capability::VariablePointers) && + storage_class == spv::StorageClass::Workgroup)) { switch (opcode()) { - case SpvOpPhi: - case SpvOpSelect: - case SpvOpFunctionCall: - case SpvOpConstantNull: + case spv::Op::OpPhi: + case spv::Op::OpSelect: + case spv::Op::OpFunctionCall: + case spv::Op::OpConstantNull: return true; default: break; @@ -663,7 +656,7 @@ bool Instruction::IsValidBasePointer() const { } OpenCLDebugInfo100Instructions Instruction::GetOpenCL100DebugOpcode() const { - if (opcode() != SpvOpExtInst) { + if (opcode() != spv::Op::OpExtInst) { return OpenCLDebugInfo100InstructionsMax; } @@ -682,7 +675,7 @@ OpenCLDebugInfo100Instructions Instruction::GetOpenCL100DebugOpcode() const { NonSemanticShaderDebugInfo100Instructions Instruction::GetShader100DebugOpcode() const { - if (opcode() != SpvOpExtInst) { + if (opcode() != spv::Op::OpExtInst) { return NonSemanticShaderDebugInfo100InstructionsMax; } @@ -695,12 +688,16 @@ NonSemanticShaderDebugInfo100Instructions Instruction::GetShader100DebugOpcode() return NonSemanticShaderDebugInfo100InstructionsMax; } - return NonSemanticShaderDebugInfo100Instructions( - GetSingleWordInOperand(kExtInstInstructionInIdx)); + uint32_t opcode = GetSingleWordInOperand(kExtInstInstructionInIdx); + if (opcode >= NonSemanticShaderDebugInfo100InstructionsMax) { + return NonSemanticShaderDebugInfo100InstructionsMax; + } + + return NonSemanticShaderDebugInfo100Instructions(opcode); } CommonDebugInfoInstructions Instruction::GetCommonDebugOpcode() const { - if (opcode() != SpvOpExtInst) { + if (opcode() != spv::Op::OpExtInst) { return CommonDebugInfoInstructionsMax; } @@ -730,31 +727,31 @@ bool Instruction::IsValidBaseImage() const { } Instruction* type = context()->get_def_use_mgr()->GetDef(tid); - return (type->opcode() == SpvOpTypeImage || - type->opcode() == SpvOpTypeSampledImage); + return (type->opcode() == spv::Op::OpTypeImage || + type->opcode() == spv::Op::OpTypeSampledImage); } bool Instruction::IsOpaqueType() const { - if (opcode() == SpvOpTypeStruct) { + if (opcode() == spv::Op::OpTypeStruct) { bool is_opaque = false; ForEachInOperand([&is_opaque, this](const uint32_t* op_id) { Instruction* type_inst = context()->get_def_use_mgr()->GetDef(*op_id); is_opaque |= type_inst->IsOpaqueType(); }); return is_opaque; - } else if (opcode() == SpvOpTypeArray) { + } else if (opcode() == spv::Op::OpTypeArray) { uint32_t sub_type_id = GetSingleWordInOperand(0); Instruction* sub_type_inst = context()->get_def_use_mgr()->GetDef(sub_type_id); return sub_type_inst->IsOpaqueType(); } else { - return opcode() == SpvOpTypeRuntimeArray || + return opcode() == spv::Op::OpTypeRuntimeArray || spvOpcodeIsBaseOpaqueType(opcode()); } } bool Instruction::IsFoldable() const { - return IsFoldableByFoldScalar() || + return IsFoldableByFoldScalar() || IsFoldableByFoldVector() || context()->get_instruction_folder().HasConstFoldingRule(this); } @@ -765,7 +762,29 @@ bool Instruction::IsFoldableByFoldScalar() const { } Instruction* type = context()->get_def_use_mgr()->GetDef(type_id()); - if (!folder.IsFoldableType(type)) { + if (!folder.IsFoldableScalarType(type)) { + return false; + } + + // Even if the type of the instruction is foldable, its operands may not be + // foldable (e.g., comparisons of 64bit types). Check that all operand types + // are foldable before accepting the instruction. + return WhileEachInOperand([&folder, this](const uint32_t* op_id) { + Instruction* def_inst = context()->get_def_use_mgr()->GetDef(*op_id); + Instruction* def_inst_type = + context()->get_def_use_mgr()->GetDef(def_inst->type_id()); + return folder.IsFoldableScalarType(def_inst_type); + }); +} + +bool Instruction::IsFoldableByFoldVector() const { + const InstructionFolder& folder = context()->get_instruction_folder(); + if (!folder.IsFoldableOpcode(opcode())) { + return false; + } + + Instruction* type = context()->get_def_use_mgr()->GetDef(type_id()); + if (!folder.IsFoldableVectorType(type)) { return false; } @@ -776,29 +795,30 @@ bool Instruction::IsFoldableByFoldScalar() const { Instruction* def_inst = context()->get_def_use_mgr()->GetDef(*op_id); Instruction* def_inst_type = context()->get_def_use_mgr()->GetDef(def_inst->type_id()); - return folder.IsFoldableType(def_inst_type); + return folder.IsFoldableVectorType(def_inst_type); }); } bool Instruction::IsFloatingPointFoldingAllowed() const { // TODO: Add the rules for kernels. For now it will be pessimistic. // For now, do not support capabilities introduced by SPV_KHR_float_controls. - if (!context_->get_feature_mgr()->HasCapability(SpvCapabilityShader) || - context_->get_feature_mgr()->HasCapability(SpvCapabilityDenormPreserve) || + if (!context_->get_feature_mgr()->HasCapability(spv::Capability::Shader) || + context_->get_feature_mgr()->HasCapability( + spv::Capability::DenormPreserve) || context_->get_feature_mgr()->HasCapability( - SpvCapabilityDenormFlushToZero) || + spv::Capability::DenormFlushToZero) || context_->get_feature_mgr()->HasCapability( - SpvCapabilitySignedZeroInfNanPreserve) || + spv::Capability::SignedZeroInfNanPreserve) || context_->get_feature_mgr()->HasCapability( - SpvCapabilityRoundingModeRTZ) || + spv::Capability::RoundingModeRTZ) || context_->get_feature_mgr()->HasCapability( - SpvCapabilityRoundingModeRTE)) { + spv::Capability::RoundingModeRTE)) { return false; } bool is_nocontract = false; context_->get_decoration_mgr()->WhileEachDecoration( - result_id(), SpvDecorationNoContraction, + result_id(), uint32_t(spv::Decoration::NoContraction), [&is_nocontract](const Instruction&) { is_nocontract = true; return false; @@ -834,101 +854,101 @@ void Instruction::Dump() const { bool Instruction::IsOpcodeCodeMotionSafe() const { switch (opcode_) { - case SpvOpNop: - case SpvOpUndef: - case SpvOpLoad: - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpArrayLength: - case SpvOpVectorExtractDynamic: - case SpvOpVectorInsertDynamic: - case SpvOpVectorShuffle: - case SpvOpCompositeConstruct: - case SpvOpCompositeExtract: - case SpvOpCompositeInsert: - case SpvOpCopyObject: - case SpvOpTranspose: - case SpvOpConvertFToU: - case SpvOpConvertFToS: - case SpvOpConvertSToF: - case SpvOpConvertUToF: - case SpvOpUConvert: - case SpvOpSConvert: - case SpvOpFConvert: - case SpvOpQuantizeToF16: - case SpvOpBitcast: - case SpvOpSNegate: - case SpvOpFNegate: - case SpvOpIAdd: - case SpvOpFAdd: - case SpvOpISub: - case SpvOpFSub: - case SpvOpIMul: - case SpvOpFMul: - case SpvOpUDiv: - case SpvOpSDiv: - case SpvOpFDiv: - case SpvOpUMod: - case SpvOpSRem: - case SpvOpSMod: - case SpvOpFRem: - case SpvOpFMod: - case SpvOpVectorTimesScalar: - case SpvOpMatrixTimesScalar: - case SpvOpVectorTimesMatrix: - case SpvOpMatrixTimesVector: - case SpvOpMatrixTimesMatrix: - case SpvOpOuterProduct: - case SpvOpDot: - case SpvOpIAddCarry: - case SpvOpISubBorrow: - case SpvOpUMulExtended: - case SpvOpSMulExtended: - case SpvOpAny: - case SpvOpAll: - case SpvOpIsNan: - case SpvOpIsInf: - case SpvOpLogicalEqual: - case SpvOpLogicalNotEqual: - case SpvOpLogicalOr: - case SpvOpLogicalAnd: - case SpvOpLogicalNot: - case SpvOpSelect: - case SpvOpIEqual: - case SpvOpINotEqual: - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: - case SpvOpULessThan: - case SpvOpSLessThan: - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: - case SpvOpFOrdEqual: - case SpvOpFUnordEqual: - case SpvOpFOrdNotEqual: - case SpvOpFUnordNotEqual: - case SpvOpFOrdLessThan: - case SpvOpFUnordLessThan: - case SpvOpFOrdGreaterThan: - case SpvOpFUnordGreaterThan: - case SpvOpFOrdLessThanEqual: - case SpvOpFUnordLessThanEqual: - case SpvOpFOrdGreaterThanEqual: - case SpvOpFUnordGreaterThanEqual: - case SpvOpShiftRightLogical: - case SpvOpShiftRightArithmetic: - case SpvOpShiftLeftLogical: - case SpvOpBitwiseOr: - case SpvOpBitwiseXor: - case SpvOpBitwiseAnd: - case SpvOpNot: - case SpvOpBitFieldInsert: - case SpvOpBitFieldSExtract: - case SpvOpBitFieldUExtract: - case SpvOpBitReverse: - case SpvOpBitCount: - case SpvOpSizeOf: + case spv::Op::OpNop: + case spv::Op::OpUndef: + case spv::Op::OpLoad: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpArrayLength: + case spv::Op::OpVectorExtractDynamic: + case spv::Op::OpVectorInsertDynamic: + case spv::Op::OpVectorShuffle: + case spv::Op::OpCompositeConstruct: + case spv::Op::OpCompositeExtract: + case spv::Op::OpCompositeInsert: + case spv::Op::OpCopyObject: + case spv::Op::OpTranspose: + case spv::Op::OpConvertFToU: + case spv::Op::OpConvertFToS: + case spv::Op::OpConvertSToF: + case spv::Op::OpConvertUToF: + case spv::Op::OpUConvert: + case spv::Op::OpSConvert: + case spv::Op::OpFConvert: + case spv::Op::OpQuantizeToF16: + case spv::Op::OpBitcast: + case spv::Op::OpSNegate: + case spv::Op::OpFNegate: + case spv::Op::OpIAdd: + case spv::Op::OpFAdd: + case spv::Op::OpISub: + case spv::Op::OpFSub: + case spv::Op::OpIMul: + case spv::Op::OpFMul: + case spv::Op::OpUDiv: + case spv::Op::OpSDiv: + case spv::Op::OpFDiv: + case spv::Op::OpUMod: + case spv::Op::OpSRem: + case spv::Op::OpSMod: + case spv::Op::OpFRem: + case spv::Op::OpFMod: + case spv::Op::OpVectorTimesScalar: + case spv::Op::OpMatrixTimesScalar: + case spv::Op::OpVectorTimesMatrix: + case spv::Op::OpMatrixTimesVector: + case spv::Op::OpMatrixTimesMatrix: + case spv::Op::OpOuterProduct: + case spv::Op::OpDot: + case spv::Op::OpIAddCarry: + case spv::Op::OpISubBorrow: + case spv::Op::OpUMulExtended: + case spv::Op::OpSMulExtended: + case spv::Op::OpAny: + case spv::Op::OpAll: + case spv::Op::OpIsNan: + case spv::Op::OpIsInf: + case spv::Op::OpLogicalEqual: + case spv::Op::OpLogicalNotEqual: + case spv::Op::OpLogicalOr: + case spv::Op::OpLogicalAnd: + case spv::Op::OpLogicalNot: + case spv::Op::OpSelect: + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpFOrdEqual: + case spv::Op::OpFUnordEqual: + case spv::Op::OpFOrdNotEqual: + case spv::Op::OpFUnordNotEqual: + case spv::Op::OpFOrdLessThan: + case spv::Op::OpFUnordLessThan: + case spv::Op::OpFOrdGreaterThan: + case spv::Op::OpFUnordGreaterThan: + case spv::Op::OpFOrdLessThanEqual: + case spv::Op::OpFUnordLessThanEqual: + case spv::Op::OpFOrdGreaterThanEqual: + case spv::Op::OpFUnordGreaterThanEqual: + case spv::Op::OpShiftRightLogical: + case spv::Op::OpShiftRightArithmetic: + case spv::Op::OpShiftLeftLogical: + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseXor: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpNot: + case spv::Op::OpBitFieldInsert: + case spv::Op::OpBitFieldSExtract: + case spv::Op::OpBitFieldUExtract: + case spv::Op::OpBitReverse: + case spv::Op::OpBitCount: + case spv::Op::OpSizeOf: return true; default: return false; @@ -940,7 +960,7 @@ bool Instruction::IsScalarizable() const { return true; } - if (opcode() == SpvOpExtInst) { + if (opcode() == spv::Op::OpExtInst) { uint32_t instSetId = context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450(); @@ -1015,16 +1035,16 @@ bool Instruction::IsOpcodeSafeToDelete() const { } switch (opcode()) { - case SpvOpDPdx: - case SpvOpDPdy: - case SpvOpFwidth: - case SpvOpDPdxFine: - case SpvOpDPdyFine: - case SpvOpFwidthFine: - case SpvOpDPdxCoarse: - case SpvOpDPdyCoarse: - case SpvOpFwidthCoarse: - case SpvOpImageQueryLod: + case spv::Op::OpDPdx: + case spv::Op::OpDPdy: + case spv::Op::OpFwidth: + case spv::Op::OpDPdxFine: + case spv::Op::OpDPdyFine: + case spv::Op::OpFwidthFine: + case spv::Op::OpDPdxCoarse: + case spv::Op::OpDPdyCoarse: + case spv::Op::OpFwidthCoarse: + case spv::Op::OpImageQueryLod: return true; default: return false; @@ -1033,7 +1053,7 @@ bool Instruction::IsOpcodeSafeToDelete() const { bool Instruction::IsNonSemanticInstruction() const { if (!HasResultId()) return false; - if (opcode() != SpvOpExtInst) return false; + if (opcode() != spv::Op::OpExtInst) return false; auto import_inst = context()->get_def_use_mgr()->GetDef(GetSingleWordInOperand(0)); @@ -1053,7 +1073,7 @@ void DebugScope::ToBinary(uint32_t type_id, uint32_t result_id, num_words = kDebugScopeNumWordsWithoutInlinedAt; } std::vector operands = { - (num_words << 16) | static_cast(SpvOpExtInst), + (num_words << 16) | static_cast(spv::Op::OpExtInst), type_id, result_id, ext_set, diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.h index 57ee70734..c2617fba5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instruction.h @@ -36,8 +36,8 @@ #include "source/util/string_utils.h" #include "spirv-tools/libspirv.h" -const uint32_t kNoDebugScope = 0; -const uint32_t kNoInlinedAt = 0; +constexpr uint32_t kNoDebugScope = 0; +constexpr uint32_t kNoInlinedAt = 0; namespace spvtools { namespace opt { @@ -84,9 +84,20 @@ struct Operand { Operand(spv_operand_type_t t, const OperandData& w) : type(t), words(w) {} + template + Operand(spv_operand_type_t t, InputIt firstOperandData, + InputIt lastOperandData) + : type(t), words(firstOperandData, lastOperandData) {} + spv_operand_type_t type; // Type of this logical operand. OperandData words; // Binary segments of this logical operand. + uint32_t AsId() const { + assert(spvIsIdType(type)); + assert(words.size() == 1); + return words[0]; + } + // Returns a string operand as a std::string. std::string AsString() const { assert(type == SPV_OPERAND_TYPE_LITERAL_STRING); @@ -95,7 +106,10 @@ struct Operand { // Returns a literal integer operand as a uint64_t uint64_t AsLiteralUint64() const { - assert(type == SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER); + assert(type == SPV_OPERAND_TYPE_LITERAL_INTEGER || + type == SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER || + type == SPV_OPERAND_TYPE_OPTIONAL_LITERAL_INTEGER || + type == SPV_OPERAND_TYPE_OPTIONAL_TYPED_LITERAL_INTEGER); assert(1 <= words.size()); assert(words.size() <= 2); uint64_t result = 0; @@ -122,7 +136,7 @@ inline bool operator!=(const Operand& o1, const Operand& o2) { } // This structure is used to represent a DebugScope instruction from -// the OpenCL.100.DebugInfo extened instruction set. Note that we can +// the OpenCL.100.DebugInfo extended instruction set. Note that we can // ignore the result id of DebugScope instruction because it is not // used for anything. We do not keep it to reduce the size of // structure. @@ -176,7 +190,7 @@ class Instruction : public utils::IntrusiveNodeBase { Instruction() : utils::IntrusiveNodeBase(), context_(nullptr), - opcode_(SpvOpNop), + opcode_(spv::Op::OpNop), has_type_id_(false), has_result_id_(false), unique_id_(0), @@ -186,7 +200,7 @@ class Instruction : public utils::IntrusiveNodeBase { Instruction(IRContext*); // Creates an instruction with the given opcode |op| and no additional logical // operands. - Instruction(IRContext*, SpvOp); + Instruction(IRContext*, spv::Op); // Creates an instruction using the given spv_parsed_instruction_t |inst|. All // the data inside |inst| will be copied and owned in this instance. And keep // record of line-related debug instructions |dbg_line| ahead of this @@ -199,7 +213,7 @@ class Instruction : public utils::IntrusiveNodeBase { // Creates an instruction with the given opcode |op|, type id: |ty_id|, // result id: |res_id| and input operands: |in_operands|. - Instruction(IRContext* c, SpvOp op, uint32_t ty_id, uint32_t res_id, + Instruction(IRContext* c, spv::Op op, uint32_t ty_id, uint32_t res_id, const OperandList& in_operands); // TODO: I will want to remove these, but will first have to remove the use of @@ -221,12 +235,12 @@ class Instruction : public utils::IntrusiveNodeBase { IRContext* context() const { return context_; } - SpvOp opcode() const { return opcode_; } + spv::Op opcode() const { return opcode_; } // Sets the opcode of this instruction to a specific opcode. Note this may // invalidate the instruction. // TODO(qining): Remove this function when instruction building and insertion // is well implemented. - void SetOpcode(SpvOp op) { opcode_ = op; } + void SetOpcode(spv::Op op) { opcode_ = op; } uint32_t type_id() const { return has_type_id_ ? GetSingleWordOperand(0) : 0; } @@ -280,6 +294,8 @@ class Instruction : public utils::IntrusiveNodeBase { // It is the responsibility of the caller to make sure // that the instruction remains valid. inline void AddOperand(Operand&& operand); + // Adds a copy of |operand| to the list of operands of this instruction. + inline void AddOperand(const Operand& operand); // Gets the |index|-th logical operand as a single SPIR-V word. This method is // not expected to be used with logical operands consisting of multiple SPIR-V // words. @@ -294,6 +310,7 @@ class Instruction : public utils::IntrusiveNodeBase { inline void SetInOperands(OperandList&& new_operands); // Sets the result type id. inline void SetResultType(uint32_t ty_id); + inline bool HasResultType() const { return has_type_id_; } // Sets the result id inline void SetResultId(uint32_t res_id); inline bool HasResultId() const { return has_result_id_; } @@ -489,10 +506,6 @@ class Instruction : public utils::IntrusiveNodeBase { // Returns true if this instruction exits this function or aborts execution. bool IsReturnOrAbort() const { return spvOpcodeIsReturnOrAbort(opcode()); } - // Returns the id for the |element|'th subtype. If the |this| is not a - // composite type, this function returns 0. - uint32_t GetTypeComponent(uint32_t element) const; - // Returns true if this instruction is a basic block terminator. bool IsBlockTerminator() const { return spvOpcodeIsBlockTerminator(opcode()); @@ -511,6 +524,10 @@ class Instruction : public utils::IntrusiveNodeBase { // constant value by |FoldScalar|. bool IsFoldableByFoldScalar() const; + // Returns true if |this| is an instruction which could be folded into a + // constant value by |FoldVector|. + bool IsFoldableByFoldVector() const; + // Returns true if we are allowed to fold or otherwise manipulate the // instruction that defines |id| in the given context. This includes not // handling NaN values. @@ -614,7 +631,7 @@ class Instruction : public utils::IntrusiveNodeBase { bool IsValidBaseImage() const; IRContext* context_; // IR Context - SpvOp opcode_; // Opcode + spv::Op opcode_; // Opcode bool has_type_id_; // True if the instruction has a type id bool has_result_id_; // True if the instruction has a result id uint32_t unique_id_; // Unique instruction id @@ -665,6 +682,10 @@ inline void Instruction::AddOperand(Operand&& operand) { operands_.push_back(std::move(operand)); } +inline void Instruction::AddOperand(const Operand& operand) { + operands_.push_back(operand); +} + inline void Instruction::SetInOperand(uint32_t index, Operand::OperandData&& data) { SetOperand(index + TypeResultIdCount(), std::move(data)); @@ -721,12 +742,12 @@ inline void Instruction::SetResultType(uint32_t ty_id) { } inline bool Instruction::IsNop() const { - return opcode_ == SpvOpNop && !has_type_id_ && !has_result_id_ && + return opcode_ == spv::Op::OpNop && !has_type_id_ && !has_result_id_ && operands_.empty(); } inline void Instruction::ToNop() { - opcode_ = SpvOpNop; + opcode_ = spv::Op::OpNop; has_type_id_ = false; has_result_id_ = false; operands_.clear(); @@ -868,12 +889,12 @@ inline void Instruction::ForEachInOperand( inline bool Instruction::HasLabels() const { switch (opcode_) { - case SpvOpSelectionMerge: - case SpvOpBranch: - case SpvOpLoopMerge: - case SpvOpBranchConditional: - case SpvOpSwitch: - case SpvOpPhi: + case spv::Op::OpSelectionMerge: + case spv::Op::OpBranch: + case spv::Op::OpLoopMerge: + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: + case spv::Op::OpPhi: return true; break; default: @@ -895,7 +916,7 @@ bool Instruction::IsAtomicWithLoad() const { bool Instruction::IsAtomicOp() const { return spvOpcodeIsAtomicOp(opcode()); } bool Instruction::IsConstant() const { - return IsCompileTimeConstantInst(opcode()); + return IsConstantInst(opcode()) && !IsSpecConstantInst(opcode()); } } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.cpp index ed34fb025..b6845a599 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.cpp @@ -19,20 +19,12 @@ #include "source/cfa.h" #include "source/spirv_constant.h" -namespace { - -// Common Parameter Positions -static const int kInstCommonParamInstIdx = 0; -static const int kInstCommonParamCnt = 1; - -// Indices of operands in SPIR-V instructions -static const int kEntryPointExecutionModelInIdx = 0; -static const int kEntryPointFunctionIdInIdx = 1; - -} // anonymous namespace - namespace spvtools { namespace opt { +namespace { +// Indices of operands in SPIR-V instructions +constexpr int kEntryPointFunctionIdInIdx = 1; +} // namespace void InstrumentPass::MovePreludeCode( BasicBlock::iterator ref_inst_itr, @@ -59,7 +51,6 @@ void InstrumentPass::MovePreludeCode( void InstrumentPass::MovePostludeCode( UptrVectorIterator ref_block_itr, BasicBlock* new_blk_ptr) { - // new_blk_ptr->reset(new BasicBlock(NewLabel(ref_block_itr->id()))); // Move contents of original ref block. for (auto cii = ref_block_itr->begin(); cii != ref_block_itr->end(); cii = ref_block_itr->begin()) { @@ -82,10 +73,62 @@ void InstrumentPass::MovePostludeCode( } std::unique_ptr InstrumentPass::NewLabel(uint32_t label_id) { - std::unique_ptr newLabel( - new Instruction(context(), SpvOpLabel, 0, label_id, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*newLabel); - return newLabel; + auto new_label = + MakeUnique(context(), spv::Op::OpLabel, 0, label_id, + std::initializer_list{}); + get_def_use_mgr()->AnalyzeInstDefUse(&*new_label); + return new_label; +} + +std::unique_ptr InstrumentPass::StartFunction( + uint32_t func_id, const analysis::Type* return_type, + const std::vector& param_types) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::Function* func_type = GetFunction(return_type, param_types); + + const std::vector operands{ + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + {uint32_t(spv::FunctionControlMask::MaskNone)}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {type_mgr->GetId(func_type)}}, + }; + auto func_inst = + MakeUnique(context(), spv::Op::OpFunction, + type_mgr->GetId(return_type), func_id, operands); + get_def_use_mgr()->AnalyzeInstDefUse(&*func_inst); + return MakeUnique(std::move(func_inst)); +} + +std::unique_ptr InstrumentPass::EndFunction() { + auto end = MakeUnique(context(), spv::Op::OpFunctionEnd, 0, 0, + std::initializer_list{}); + get_def_use_mgr()->AnalyzeInstDefUse(end.get()); + return end; +} + +std::vector InstrumentPass::AddParameters( + Function& func, const std::vector& param_types) { + std::vector param_ids; + param_ids.reserve(param_types.size()); + for (const analysis::Type* param : param_types) { + uint32_t pid = TakeNextId(); + param_ids.push_back(pid); + auto param_inst = + MakeUnique(context(), spv::Op::OpFunctionParameter, + context()->get_type_mgr()->GetId(param), pid, + std::initializer_list{}); + get_def_use_mgr()->AnalyzeInstDefUse(param_inst.get()); + func.AddParameter(std::move(param_inst)); + } + return param_ids; +} + +std::unique_ptr InstrumentPass::NewName( + uint32_t id, const std::string& name_str) { + return MakeUnique( + context(), spv::Op::OpName, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {id}}, + {SPV_OPERAND_TYPE_LITERAL_STRING, utils::MakeVector(name_str)}}); } uint32_t InstrumentPass::Gen32BitCvtCode(uint32_t val_id, @@ -100,10 +143,10 @@ uint32_t InstrumentPass::Gen32BitCvtCode(uint32_t val_id, analysis::Type* val_32b_reg_ty = type_mgr->GetRegisteredType(&val_32b_ty); uint32_t val_32b_reg_ty_id = type_mgr->GetId(val_32b_reg_ty); if (is_signed) - return builder->AddUnaryOp(val_32b_reg_ty_id, SpvOpSConvert, val_id) + return builder->AddUnaryOp(val_32b_reg_ty_id, spv::Op::OpSConvert, val_id) ->result_id(); else - return builder->AddUnaryOp(val_32b_reg_ty_id, SpvOpUConvert, val_id) + return builder->AddUnaryOp(val_32b_reg_ty_id, spv::Op::OpUConvert, val_id) ->result_id(); } @@ -116,193 +159,124 @@ uint32_t InstrumentPass::GenUintCastCode(uint32_t val_id, uint32_t val_ty_id = get_def_use_mgr()->GetDef(val_32b_id)->type_id(); analysis::Integer* val_ty = type_mgr->GetType(val_ty_id)->AsInteger(); if (!val_ty->IsSigned()) return val_32b_id; - return builder->AddUnaryOp(GetUintId(), SpvOpBitcast, val_32b_id) + return builder->AddUnaryOp(GetUintId(), spv::Op::OpBitcast, val_32b_id) ->result_id(); } -void InstrumentPass::GenDebugOutputFieldCode(uint32_t base_offset_id, - uint32_t field_offset, - uint32_t field_value_id, - InstructionBuilder* builder) { - // Cast value to 32-bit unsigned if necessary - uint32_t val_id = GenUintCastCode(field_value_id, builder); - // Store value - Instruction* data_idx_inst = - builder->AddBinaryOp(GetUintId(), SpvOpIAdd, base_offset_id, - builder->GetUintConstantId(field_offset)); - uint32_t buf_id = GetOutputBufferId(); - uint32_t buf_uint_ptr_id = GetOutputBufferPtrId(); - Instruction* achain_inst = - builder->AddTernaryOp(buf_uint_ptr_id, SpvOpAccessChain, buf_id, - builder->GetUintConstantId(kDebugOutputDataOffset), - data_idx_inst->result_id()); - (void)builder->AddBinaryOp(0, SpvOpStore, achain_inst->result_id(), val_id); -} - -void InstrumentPass::GenCommonStreamWriteCode(uint32_t record_sz, - uint32_t inst_id, - uint32_t stage_idx, - uint32_t base_offset_id, - InstructionBuilder* builder) { - // Store record size - GenDebugOutputFieldCode(base_offset_id, kInstCommonOutSize, - builder->GetUintConstantId(record_sz), builder); - // Store Shader Id - GenDebugOutputFieldCode(base_offset_id, kInstCommonOutShaderId, - builder->GetUintConstantId(shader_id_), builder); - // Store Instruction Idx - GenDebugOutputFieldCode(base_offset_id, kInstCommonOutInstructionIdx, inst_id, - builder); - // Store Stage Idx - GenDebugOutputFieldCode(base_offset_id, kInstCommonOutStageIdx, - builder->GetUintConstantId(stage_idx), builder); -} - -void InstrumentPass::GenFragCoordEltDebugOutputCode( - uint32_t base_offset_id, uint32_t uint_frag_coord_id, uint32_t element, - InstructionBuilder* builder) { - Instruction* element_val_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, uint_frag_coord_id, element); - GenDebugOutputFieldCode(base_offset_id, kInstFragOutFragCoordX + element, - element_val_inst->result_id(), builder); -} - uint32_t InstrumentPass::GenVarLoad(uint32_t var_id, InstructionBuilder* builder) { Instruction* var_inst = get_def_use_mgr()->GetDef(var_id); uint32_t type_id = GetPointeeTypeId(var_inst); - Instruction* load_inst = builder->AddUnaryOp(type_id, SpvOpLoad, var_id); + Instruction* load_inst = builder->AddLoad(type_id, var_id); return load_inst->result_id(); } -void InstrumentPass::GenBuiltinOutputCode(uint32_t builtin_id, - uint32_t builtin_off, - uint32_t base_offset_id, - InstructionBuilder* builder) { - // Load and store builtin - uint32_t load_id = GenVarLoad(builtin_id, builder); - GenDebugOutputFieldCode(base_offset_id, builtin_off, load_id, builder); -} - -void InstrumentPass::GenStageStreamWriteCode(uint32_t stage_idx, - uint32_t base_offset_id, - InstructionBuilder* builder) { +uint32_t InstrumentPass::GenStageInfo(uint32_t stage_idx, + InstructionBuilder* builder) { + std::vector ids(4, builder->GetUintConstantId(0)); + ids[0] = builder->GetUintConstantId(stage_idx); + // %289 = OpCompositeConstruct %v4uint %uint_0 %285 %288 %uint_0 // TODO(greg-lunarg): Add support for all stages - switch (stage_idx) { - case SpvExecutionModelVertex: { + switch (spv::ExecutionModel(stage_idx)) { + case spv::ExecutionModel::Vertex: { // Load and store VertexId and InstanceId - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInVertexIndex), - kInstVertOutVertexIndex, base_offset_id, builder); - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInInstanceIndex), - kInstVertOutInstanceIndex, base_offset_id, builder); - } break; - case SpvExecutionModelGLCompute: - case SpvExecutionModelTaskNV: - case SpvExecutionModelMeshNV: { - // Load and store GlobalInvocationId. uint32_t load_id = GenVarLoad( - context()->GetBuiltinInputVarId(SpvBuiltInGlobalInvocationId), + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::VertexIndex)), builder); - Instruction* x_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, load_id, 0); - Instruction* y_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, load_id, 1); - Instruction* z_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, load_id, 2); - GenDebugOutputFieldCode(base_offset_id, kInstCompOutGlobalInvocationIdX, - x_inst->result_id(), builder); - GenDebugOutputFieldCode(base_offset_id, kInstCompOutGlobalInvocationIdY, - y_inst->result_id(), builder); - GenDebugOutputFieldCode(base_offset_id, kInstCompOutGlobalInvocationIdZ, - z_inst->result_id(), builder); + ids[1] = GenUintCastCode(load_id, builder); + + load_id = GenVarLoad(context()->GetBuiltinInputVarId( + uint32_t(spv::BuiltIn::InstanceIndex)), + builder); + ids[2] = GenUintCastCode(load_id, builder); } break; - case SpvExecutionModelGeometry: { + case spv::ExecutionModel::GLCompute: + case spv::ExecutionModel::TaskNV: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::TaskEXT: + case spv::ExecutionModel::MeshEXT: { + // Load and store GlobalInvocationId. + uint32_t load_id = GenVarLoad(context()->GetBuiltinInputVarId(uint32_t( + spv::BuiltIn::GlobalInvocationId)), + builder); + for (uint32_t u = 0; u < 3u; ++u) { + ids[u + 1] = builder->AddCompositeExtract(GetUintId(), load_id, {u}) + ->result_id(); + } + } break; + case spv::ExecutionModel::Geometry: { // Load and store PrimitiveId and InvocationId. - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInPrimitiveId), - kInstGeomOutPrimitiveId, base_offset_id, builder); - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInInvocationId), - kInstGeomOutInvocationId, base_offset_id, builder); + uint32_t load_id = GenVarLoad( + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::PrimitiveId)), + builder); + ids[1] = load_id; + load_id = GenVarLoad( + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::InvocationId)), + builder); + ids[2] = GenUintCastCode(load_id, builder); } break; - case SpvExecutionModelTessellationControl: { + case spv::ExecutionModel::TessellationControl: { // Load and store InvocationId and PrimitiveId - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInInvocationId), - kInstTessCtlOutInvocationId, base_offset_id, builder); - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInPrimitiveId), - kInstTessCtlOutPrimitiveId, base_offset_id, builder); + uint32_t load_id = GenVarLoad( + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::InvocationId)), + builder); + ids[1] = GenUintCastCode(load_id, builder); + load_id = GenVarLoad( + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::PrimitiveId)), + builder); + ids[2] = load_id; } break; - case SpvExecutionModelTessellationEvaluation: { + case spv::ExecutionModel::TessellationEvaluation: { // Load and store PrimitiveId and TessCoord.uv - GenBuiltinOutputCode( - context()->GetBuiltinInputVarId(SpvBuiltInPrimitiveId), - kInstTessEvalOutPrimitiveId, base_offset_id, builder); uint32_t load_id = GenVarLoad( - context()->GetBuiltinInputVarId(SpvBuiltInTessCoord), builder); + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::PrimitiveId)), + builder); + ids[1] = load_id; + load_id = GenVarLoad( + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::TessCoord)), + builder); Instruction* uvec3_cast_inst = - builder->AddUnaryOp(GetVec3UintId(), SpvOpBitcast, load_id); + builder->AddUnaryOp(GetVec3UintId(), spv::Op::OpBitcast, load_id); uint32_t uvec3_cast_id = uvec3_cast_inst->result_id(); - Instruction* u_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, uvec3_cast_id, 0); - Instruction* v_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, uvec3_cast_id, 1); - GenDebugOutputFieldCode(base_offset_id, kInstTessEvalOutTessCoordU, - u_inst->result_id(), builder); - GenDebugOutputFieldCode(base_offset_id, kInstTessEvalOutTessCoordV, - v_inst->result_id(), builder); + for (uint32_t u = 0; u < 2u; ++u) { + ids[u + 2] = + builder->AddCompositeExtract(GetUintId(), uvec3_cast_id, {u}) + ->result_id(); + } } break; - case SpvExecutionModelFragment: { + case spv::ExecutionModel::Fragment: { // Load FragCoord and convert to Uint - Instruction* frag_coord_inst = builder->AddUnaryOp( - GetVec4FloatId(), SpvOpLoad, - context()->GetBuiltinInputVarId(SpvBuiltInFragCoord)); + Instruction* frag_coord_inst = builder->AddLoad( + GetVec4FloatId(), + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::FragCoord))); Instruction* uint_frag_coord_inst = builder->AddUnaryOp( - GetVec4UintId(), SpvOpBitcast, frag_coord_inst->result_id()); - for (uint32_t u = 0; u < 2u; ++u) - GenFragCoordEltDebugOutputCode( - base_offset_id, uint_frag_coord_inst->result_id(), u, builder); + GetVec4UintId(), spv::Op::OpBitcast, frag_coord_inst->result_id()); + for (uint32_t u = 0; u < 2u; ++u) { + ids[u + 1] = + builder + ->AddCompositeExtract(GetUintId(), + uint_frag_coord_inst->result_id(), {u}) + ->result_id(); + } } break; - case SpvExecutionModelRayGenerationNV: - case SpvExecutionModelIntersectionNV: - case SpvExecutionModelAnyHitNV: - case SpvExecutionModelClosestHitNV: - case SpvExecutionModelMissNV: - case SpvExecutionModelCallableNV: { + case spv::ExecutionModel::RayGenerationNV: + case spv::ExecutionModel::IntersectionNV: + case spv::ExecutionModel::AnyHitNV: + case spv::ExecutionModel::ClosestHitNV: + case spv::ExecutionModel::MissNV: + case spv::ExecutionModel::CallableNV: { // Load and store LaunchIdNV. uint32_t launch_id = GenVarLoad( - context()->GetBuiltinInputVarId(SpvBuiltInLaunchIdNV), builder); - Instruction* x_launch_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, launch_id, 0); - Instruction* y_launch_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, launch_id, 1); - Instruction* z_launch_inst = builder->AddIdLiteralOp( - GetUintId(), SpvOpCompositeExtract, launch_id, 2); - GenDebugOutputFieldCode(base_offset_id, kInstRayTracingOutLaunchIdX, - x_launch_inst->result_id(), builder); - GenDebugOutputFieldCode(base_offset_id, kInstRayTracingOutLaunchIdY, - y_launch_inst->result_id(), builder); - GenDebugOutputFieldCode(base_offset_id, kInstRayTracingOutLaunchIdZ, - z_launch_inst->result_id(), builder); + context()->GetBuiltinInputVarId(uint32_t(spv::BuiltIn::LaunchIdNV)), + builder); + for (uint32_t u = 0; u < 3u; ++u) { + ids[u + 1] = builder->AddCompositeExtract(GetUintId(), launch_id, {u}) + ->result_id(); + } } break; default: { assert(false && "unsupported stage"); } break; } -} - -void InstrumentPass::GenDebugStreamWrite( - uint32_t instruction_idx, uint32_t stage_idx, - const std::vector& validation_ids, InstructionBuilder* builder) { - // Call debug output function. Pass func_idx, instruction_idx and - // validation ids as args. - uint32_t val_id_cnt = static_cast(validation_ids.size()); - uint32_t output_func_id = GetStreamWriteFunctionId(stage_idx, val_id_cnt); - std::vector args = {output_func_id, - builder->GetUintConstantId(instruction_idx)}; - (void)args.insert(args.end(), validation_ids.begin(), validation_ids.end()); - (void)builder->AddNaryOp(GetVoidId(), SpvOpFunctionCall, args); + return builder->AddCompositeConstruct(GetVec4UintId(), ids)->result_id(); } bool InstrumentPass::AllConstant(const std::vector& ids) { @@ -313,38 +287,37 @@ bool InstrumentPass::AllConstant(const std::vector& ids) { return true; } -uint32_t InstrumentPass::GenDebugDirectRead( - const std::vector& offset_ids, InstructionBuilder* ref_builder) { - // Call debug input function. Pass func_idx and offset ids as args. - uint32_t off_id_cnt = static_cast(offset_ids.size()); - uint32_t input_func_id = GetDirectReadFunctionId(off_id_cnt); - std::vector args = {input_func_id}; - (void)args.insert(args.end(), offset_ids.begin(), offset_ids.end()); +uint32_t InstrumentPass::GenReadFunctionCall( + uint32_t return_id, uint32_t func_id, + const std::vector& func_call_args, + InstructionBuilder* ref_builder) { // If optimizing direct reads and the call has already been generated, // use its result if (opt_direct_reads_) { - uint32_t res_id = call2id_[args]; + uint32_t res_id = call2id_[func_call_args]; if (res_id != 0) return res_id; } - // If the offsets are all constants, the call can be moved to the first block - // of the function where its result can be reused. One example where this is - // profitable is for uniform buffer references, of which there are often many. + // If the function arguments are all constants, the call can be moved to the + // first block of the function where its result can be reused. One example + // where this is profitable is for uniform buffer references, of which there + // are often many. InstructionBuilder builder(ref_builder->GetContext(), &*ref_builder->GetInsertPoint(), ref_builder->GetPreservedAnalysis()); - bool insert_in_first_block = opt_direct_reads_ && AllConstant(offset_ids); + bool insert_in_first_block = opt_direct_reads_ && AllConstant(func_call_args); if (insert_in_first_block) { Instruction* insert_before = &*curr_func_->begin()->tail(); builder.SetInsertPoint(insert_before); } uint32_t res_id = - builder.AddNaryOp(GetUintId(), SpvOpFunctionCall, args)->result_id(); - if (insert_in_first_block) call2id_[args] = res_id; + builder.AddFunctionCall(return_id, func_id, func_call_args)->result_id(); + if (insert_in_first_block) call2id_[func_call_args] = res_id; return res_id; } bool InstrumentPass::IsSameBlockOp(const Instruction* inst) const { - return inst->opcode() == SpvOpSampledImage || inst->opcode() == SpvOpImage; + return inst->opcode() == spv::Op::OpSampledImage || + inst->opcode() == spv::Op::OpImage; } void InstrumentPass::CloneSameBlockOps( @@ -407,79 +380,74 @@ void InstrumentPass::UpdateSucceedingPhis( }); } -uint32_t InstrumentPass::GetOutputBufferPtrId() { - if (output_buffer_ptr_id_ == 0) { - output_buffer_ptr_id_ = context()->get_type_mgr()->FindPointerToType( - GetUintId(), SpvStorageClassStorageBuffer); - } - return output_buffer_ptr_id_; +analysis::Integer* InstrumentPass::GetInteger(uint32_t width, bool is_signed) { + analysis::Integer i(width, is_signed); + analysis::Type* type = context()->get_type_mgr()->GetRegisteredType(&i); + assert(type && type->AsInteger()); + return type->AsInteger(); } -uint32_t InstrumentPass::GetInputBufferTypeId() { - return (validation_id_ == kInstValidationIdBuffAddr) ? GetUint64Id() - : GetUintId(); +analysis::Struct* InstrumentPass::GetStruct( + const std::vector& fields) { + analysis::Struct s(fields); + analysis::Type* type = context()->get_type_mgr()->GetRegisteredType(&s); + assert(type && type->AsStruct()); + return type->AsStruct(); } -uint32_t InstrumentPass::GetInputBufferPtrId() { - if (input_buffer_ptr_id_ == 0) { - input_buffer_ptr_id_ = context()->get_type_mgr()->FindPointerToType( - GetInputBufferTypeId(), SpvStorageClassStorageBuffer); - } - return input_buffer_ptr_id_; +analysis::RuntimeArray* InstrumentPass::GetRuntimeArray( + const analysis::Type* element) { + analysis::RuntimeArray r(element); + analysis::Type* type = context()->get_type_mgr()->GetRegisteredType(&r); + assert(type && type->AsRuntimeArray()); + return type->AsRuntimeArray(); } -uint32_t InstrumentPass::GetOutputBufferBinding() { - switch (validation_id_) { - case kInstValidationIdBindless: - return kDebugOutputBindingStream; - case kInstValidationIdBuffAddr: - return kDebugOutputBindingStream; - case kInstValidationIdDebugPrintf: - return kDebugOutputPrintfStream; - default: - assert(false && "unexpected validation id"); - } - return 0; +analysis::Array* InstrumentPass::GetArray(const analysis::Type* element, + uint32_t length) { + uint32_t length_id = context()->get_constant_mgr()->GetUIntConstId(length); + analysis::Array::LengthInfo length_info{ + length_id, {analysis::Array::LengthInfo::Case::kConstant, length}}; + + analysis::Array r(element, length_info); + + analysis::Type* type = context()->get_type_mgr()->GetRegisteredType(&r); + assert(type && type->AsArray()); + return type->AsArray(); } -uint32_t InstrumentPass::GetInputBufferBinding() { - switch (validation_id_) { - case kInstValidationIdBindless: - return kDebugInputBindingBindless; - case kInstValidationIdBuffAddr: - return kDebugInputBindingBuffAddr; - default: - assert(false && "unexpected validation id"); - } - return 0; +analysis::Function* InstrumentPass::GetFunction( + const analysis::Type* return_val, + const std::vector& args) { + analysis::Function func(return_val, args); + analysis::Type* type = context()->get_type_mgr()->GetRegisteredType(&func); + assert(type && type->AsFunction()); + return type->AsFunction(); } -analysis::Type* InstrumentPass::GetUintXRuntimeArrayType( - uint32_t width, analysis::Type** rarr_ty) { +analysis::RuntimeArray* InstrumentPass::GetUintXRuntimeArrayType( + uint32_t width, analysis::RuntimeArray** rarr_ty) { if (*rarr_ty == nullptr) { - analysis::DecorationManager* deco_mgr = get_decoration_mgr(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - analysis::Integer uint_ty(width, false); - analysis::Type* reg_uint_ty = type_mgr->GetRegisteredType(&uint_ty); - analysis::RuntimeArray uint_rarr_ty_tmp(reg_uint_ty); - *rarr_ty = type_mgr->GetRegisteredType(&uint_rarr_ty_tmp); - uint32_t uint_arr_ty_id = type_mgr->GetTypeInstruction(*rarr_ty); + *rarr_ty = GetRuntimeArray(GetInteger(width, false)); + uint32_t uint_arr_ty_id = + context()->get_type_mgr()->GetTypeInstruction(*rarr_ty); // By the Vulkan spec, a pre-existing RuntimeArray of uint must be part of // a block, and will therefore be decorated with an ArrayStride. Therefore // the undecorated type returned here will not be pre-existing and can // safely be decorated. Since this type is now decorated, it is out of // sync with the TypeManager and therefore the TypeManager must be // invalidated after this pass. - assert(context()->get_def_use_mgr()->NumUses(uint_arr_ty_id) == 0 && + assert(get_def_use_mgr()->NumUses(uint_arr_ty_id) == 0 && "used RuntimeArray type returned"); - deco_mgr->AddDecorationVal(uint_arr_ty_id, SpvDecorationArrayStride, - width / 8u); + get_decoration_mgr()->AddDecorationVal( + uint_arr_ty_id, uint32_t(spv::Decoration::ArrayStride), width / 8u); } return *rarr_ty; } -analysis::Type* InstrumentPass::GetUintRuntimeArrayType(uint32_t width) { - analysis::Type** rarr_ty = +analysis::RuntimeArray* InstrumentPass::GetUintRuntimeArrayType( + uint32_t width) { + analysis::RuntimeArray** rarr_ty = (width == 64) ? &uint64_rarr_ty_ : &uint32_rarr_ty_; return GetUintXRuntimeArrayType(width, rarr_ty); } @@ -492,99 +460,6 @@ void InstrumentPass::AddStorageBufferExt() { storage_buffer_ext_defined_ = true; } -// Return id for output buffer -uint32_t InstrumentPass::GetOutputBufferId() { - if (output_buffer_id_ == 0) { - // If not created yet, create one - analysis::DecorationManager* deco_mgr = get_decoration_mgr(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - analysis::Type* reg_uint_rarr_ty = GetUintRuntimeArrayType(32); - analysis::Integer uint_ty(32, false); - analysis::Type* reg_uint_ty = type_mgr->GetRegisteredType(&uint_ty); - analysis::Struct buf_ty({reg_uint_ty, reg_uint_rarr_ty}); - analysis::Type* reg_buf_ty = type_mgr->GetRegisteredType(&buf_ty); - uint32_t obufTyId = type_mgr->GetTypeInstruction(reg_buf_ty); - // By the Vulkan spec, a pre-existing struct containing a RuntimeArray - // must be a block, and will therefore be decorated with Block. Therefore - // the undecorated type returned here will not be pre-existing and can - // safely be decorated. Since this type is now decorated, it is out of - // sync with the TypeManager and therefore the TypeManager must be - // invalidated after this pass. - assert(context()->get_def_use_mgr()->NumUses(obufTyId) == 0 && - "used struct type returned"); - deco_mgr->AddDecoration(obufTyId, SpvDecorationBlock); - deco_mgr->AddMemberDecoration(obufTyId, kDebugOutputSizeOffset, - SpvDecorationOffset, 0); - deco_mgr->AddMemberDecoration(obufTyId, kDebugOutputDataOffset, - SpvDecorationOffset, 4); - uint32_t obufTyPtrId_ = - type_mgr->FindPointerToType(obufTyId, SpvStorageClassStorageBuffer); - output_buffer_id_ = TakeNextId(); - std::unique_ptr newVarOp(new Instruction( - context(), SpvOpVariable, obufTyPtrId_, output_buffer_id_, - {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvStorageClassStorageBuffer}}})); - context()->AddGlobalValue(std::move(newVarOp)); - deco_mgr->AddDecorationVal(output_buffer_id_, SpvDecorationDescriptorSet, - desc_set_); - deco_mgr->AddDecorationVal(output_buffer_id_, SpvDecorationBinding, - GetOutputBufferBinding()); - AddStorageBufferExt(); - if (get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { - // Add the new buffer to all entry points. - for (auto& entry : get_module()->entry_points()) { - entry.AddOperand({SPV_OPERAND_TYPE_ID, {output_buffer_id_}}); - context()->AnalyzeUses(&entry); - } - } - } - return output_buffer_id_; -} - -uint32_t InstrumentPass::GetInputBufferId() { - if (input_buffer_id_ == 0) { - // If not created yet, create one - analysis::DecorationManager* deco_mgr = get_decoration_mgr(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - uint32_t width = (validation_id_ == kInstValidationIdBuffAddr) ? 64u : 32u; - analysis::Type* reg_uint_rarr_ty = GetUintRuntimeArrayType(width); - analysis::Struct buf_ty({reg_uint_rarr_ty}); - analysis::Type* reg_buf_ty = type_mgr->GetRegisteredType(&buf_ty); - uint32_t ibufTyId = type_mgr->GetTypeInstruction(reg_buf_ty); - // By the Vulkan spec, a pre-existing struct containing a RuntimeArray - // must be a block, and will therefore be decorated with Block. Therefore - // the undecorated type returned here will not be pre-existing and can - // safely be decorated. Since this type is now decorated, it is out of - // sync with the TypeManager and therefore the TypeManager must be - // invalidated after this pass. - assert(context()->get_def_use_mgr()->NumUses(ibufTyId) == 0 && - "used struct type returned"); - deco_mgr->AddDecoration(ibufTyId, SpvDecorationBlock); - deco_mgr->AddMemberDecoration(ibufTyId, 0, SpvDecorationOffset, 0); - uint32_t ibufTyPtrId_ = - type_mgr->FindPointerToType(ibufTyId, SpvStorageClassStorageBuffer); - input_buffer_id_ = TakeNextId(); - std::unique_ptr newVarOp(new Instruction( - context(), SpvOpVariable, ibufTyPtrId_, input_buffer_id_, - {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvStorageClassStorageBuffer}}})); - context()->AddGlobalValue(std::move(newVarOp)); - deco_mgr->AddDecorationVal(input_buffer_id_, SpvDecorationDescriptorSet, - desc_set_); - deco_mgr->AddDecorationVal(input_buffer_id_, SpvDecorationBinding, - GetInputBufferBinding()); - AddStorageBufferExt(); - if (get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { - // Add the new buffer to all entry points. - for (auto& entry : get_module()->entry_points()) { - entry.AddOperand({SPV_OPERAND_TYPE_ID, {input_buffer_id_}}); - context()->AnalyzeUses(&entry); - } - } - } - return input_buffer_id_; -} - uint32_t InstrumentPass::GetFloatId() { if (float_id_ == 0) { analysis::TypeManager* type_mgr = context()->get_type_mgr(); @@ -677,196 +552,6 @@ uint32_t InstrumentPass::GetVoidId() { return void_id_; } -uint32_t InstrumentPass::GetStreamWriteFunctionId(uint32_t stage_idx, - uint32_t val_spec_param_cnt) { - // Total param count is common params plus validation-specific - // params - uint32_t param_cnt = kInstCommonParamCnt + val_spec_param_cnt; - if (param2output_func_id_[param_cnt] == 0) { - // Create function - param2output_func_id_[param_cnt] = TakeNextId(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - std::vector param_types; - for (uint32_t c = 0; c < param_cnt; ++c) - param_types.push_back(type_mgr->GetType(GetUintId())); - analysis::Function func_ty(type_mgr->GetType(GetVoidId()), param_types); - analysis::Type* reg_func_ty = type_mgr->GetRegisteredType(&func_ty); - std::unique_ptr func_inst( - new Instruction(get_module()->context(), SpvOpFunction, GetVoidId(), - param2output_func_id_[param_cnt], - {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvFunctionControlMaskNone}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, - {type_mgr->GetTypeInstruction(reg_func_ty)}}})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_inst); - std::unique_ptr output_func = - MakeUnique(std::move(func_inst)); - // Add parameters - std::vector param_vec; - for (uint32_t c = 0; c < param_cnt; ++c) { - uint32_t pid = TakeNextId(); - param_vec.push_back(pid); - std::unique_ptr param_inst( - new Instruction(get_module()->context(), SpvOpFunctionParameter, - GetUintId(), pid, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*param_inst); - output_func->AddParameter(std::move(param_inst)); - } - // Create first block - uint32_t test_blk_id = TakeNextId(); - std::unique_ptr test_label(NewLabel(test_blk_id)); - std::unique_ptr new_blk_ptr = - MakeUnique(std::move(test_label)); - InstructionBuilder builder( - context(), &*new_blk_ptr, - IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - // Gen test if debug output buffer size will not be exceeded. - uint32_t val_spec_offset = kInstStageOutCnt; - uint32_t obuf_record_sz = val_spec_offset + val_spec_param_cnt; - uint32_t buf_id = GetOutputBufferId(); - uint32_t buf_uint_ptr_id = GetOutputBufferPtrId(); - Instruction* obuf_curr_sz_ac_inst = - builder.AddBinaryOp(buf_uint_ptr_id, SpvOpAccessChain, buf_id, - builder.GetUintConstantId(kDebugOutputSizeOffset)); - // Fetch the current debug buffer written size atomically, adding the - // size of the record to be written. - uint32_t obuf_record_sz_id = builder.GetUintConstantId(obuf_record_sz); - uint32_t mask_none_id = builder.GetUintConstantId(SpvMemoryAccessMaskNone); - uint32_t scope_invok_id = builder.GetUintConstantId(SpvScopeInvocation); - Instruction* obuf_curr_sz_inst = builder.AddQuadOp( - GetUintId(), SpvOpAtomicIAdd, obuf_curr_sz_ac_inst->result_id(), - scope_invok_id, mask_none_id, obuf_record_sz_id); - uint32_t obuf_curr_sz_id = obuf_curr_sz_inst->result_id(); - // Compute new written size - Instruction* obuf_new_sz_inst = - builder.AddBinaryOp(GetUintId(), SpvOpIAdd, obuf_curr_sz_id, - builder.GetUintConstantId(obuf_record_sz)); - // Fetch the data bound - Instruction* obuf_bnd_inst = - builder.AddIdLiteralOp(GetUintId(), SpvOpArrayLength, - GetOutputBufferId(), kDebugOutputDataOffset); - // Test that new written size is less than or equal to debug output - // data bound - Instruction* obuf_safe_inst = builder.AddBinaryOp( - GetBoolId(), SpvOpULessThanEqual, obuf_new_sz_inst->result_id(), - obuf_bnd_inst->result_id()); - uint32_t merge_blk_id = TakeNextId(); - uint32_t write_blk_id = TakeNextId(); - std::unique_ptr merge_label(NewLabel(merge_blk_id)); - std::unique_ptr write_label(NewLabel(write_blk_id)); - (void)builder.AddConditionalBranch(obuf_safe_inst->result_id(), - write_blk_id, merge_blk_id, merge_blk_id, - SpvSelectionControlMaskNone); - // Close safety test block and gen write block - output_func->AddBasicBlock(std::move(new_blk_ptr)); - new_blk_ptr = MakeUnique(std::move(write_label)); - builder.SetInsertPoint(&*new_blk_ptr); - // Generate common and stage-specific debug record members - GenCommonStreamWriteCode(obuf_record_sz, param_vec[kInstCommonParamInstIdx], - stage_idx, obuf_curr_sz_id, &builder); - GenStageStreamWriteCode(stage_idx, obuf_curr_sz_id, &builder); - // Gen writes of validation specific data - for (uint32_t i = 0; i < val_spec_param_cnt; ++i) { - GenDebugOutputFieldCode(obuf_curr_sz_id, val_spec_offset + i, - param_vec[kInstCommonParamCnt + i], &builder); - } - // Close write block and gen merge block - (void)builder.AddBranch(merge_blk_id); - output_func->AddBasicBlock(std::move(new_blk_ptr)); - new_blk_ptr = MakeUnique(std::move(merge_label)); - builder.SetInsertPoint(&*new_blk_ptr); - // Close merge block and function and add function to module - (void)builder.AddNullaryOp(0, SpvOpReturn); - output_func->AddBasicBlock(std::move(new_blk_ptr)); - std::unique_ptr func_end_inst( - new Instruction(get_module()->context(), SpvOpFunctionEnd, 0, 0, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_end_inst); - output_func->SetFunctionEnd(std::move(func_end_inst)); - context()->AddFunction(std::move(output_func)); - } - return param2output_func_id_[param_cnt]; -} - -uint32_t InstrumentPass::GetDirectReadFunctionId(uint32_t param_cnt) { - uint32_t func_id = param2input_func_id_[param_cnt]; - if (func_id != 0) return func_id; - // Create input function for param_cnt. - func_id = TakeNextId(); - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - std::vector param_types; - for (uint32_t c = 0; c < param_cnt; ++c) - param_types.push_back(type_mgr->GetType(GetUintId())); - uint32_t ibuf_type_id = GetInputBufferTypeId(); - analysis::Function func_ty(type_mgr->GetType(ibuf_type_id), param_types); - analysis::Type* reg_func_ty = type_mgr->GetRegisteredType(&func_ty); - std::unique_ptr func_inst(new Instruction( - get_module()->context(), SpvOpFunction, ibuf_type_id, func_id, - {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvFunctionControlMaskNone}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_ID, - {type_mgr->GetTypeInstruction(reg_func_ty)}}})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_inst); - std::unique_ptr input_func = - MakeUnique(std::move(func_inst)); - // Add parameters - std::vector param_vec; - for (uint32_t c = 0; c < param_cnt; ++c) { - uint32_t pid = TakeNextId(); - param_vec.push_back(pid); - std::unique_ptr param_inst(new Instruction( - get_module()->context(), SpvOpFunctionParameter, GetUintId(), pid, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*param_inst); - input_func->AddParameter(std::move(param_inst)); - } - // Create block - uint32_t blk_id = TakeNextId(); - std::unique_ptr blk_label(NewLabel(blk_id)); - std::unique_ptr new_blk_ptr = - MakeUnique(std::move(blk_label)); - InstructionBuilder builder( - context(), &*new_blk_ptr, - IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping); - // For each offset parameter, generate new offset with parameter, adding last - // loaded value if it exists, and load value from input buffer at new offset. - // Return last loaded value. - uint32_t buf_id = GetInputBufferId(); - uint32_t buf_ptr_id = GetInputBufferPtrId(); - uint32_t last_value_id = 0; - for (uint32_t p = 0; p < param_cnt; ++p) { - uint32_t offset_id; - if (p == 0) { - offset_id = param_vec[0]; - } else { - if (ibuf_type_id != GetUintId()) { - Instruction* ucvt_inst = - builder.AddUnaryOp(GetUintId(), SpvOpUConvert, last_value_id); - last_value_id = ucvt_inst->result_id(); - } - Instruction* offset_inst = builder.AddBinaryOp( - GetUintId(), SpvOpIAdd, last_value_id, param_vec[p]); - offset_id = offset_inst->result_id(); - } - Instruction* ac_inst = builder.AddTernaryOp( - buf_ptr_id, SpvOpAccessChain, buf_id, - builder.GetUintConstantId(kDebugInputDataOffset), offset_id); - Instruction* load_inst = - builder.AddUnaryOp(ibuf_type_id, SpvOpLoad, ac_inst->result_id()); - last_value_id = load_inst->result_id(); - } - (void)builder.AddInstruction(MakeUnique( - context(), SpvOpReturnValue, 0, 0, - std::initializer_list{{SPV_OPERAND_TYPE_ID, {last_value_id}}})); - // Close block and function and add function to module - input_func->AddBasicBlock(std::move(new_blk_ptr)); - std::unique_ptr func_end_inst( - new Instruction(get_module()->context(), SpvOpFunctionEnd, 0, 0, {})); - get_def_use_mgr()->AnalyzeInstDefUse(&*func_end_inst); - input_func->SetFunctionEnd(std::move(func_end_inst)); - context()->AddFunction(std::move(input_func)); - param2input_func_id_[param_cnt] = func_id; - return func_id; -} - void InstrumentPass::SplitBlock( BasicBlock::iterator inst_itr, UptrVectorIterator block_itr, std::vector>* new_blocks) { @@ -905,7 +590,7 @@ bool InstrumentPass::InstrumentFunction(Function* func, uint32_t stage_idx, // block. This will allow function calls to be inserted into the first // block without interfering with the instrumentation algorithm. if (opt_direct_reads_ && !first_block_split) { - if (ii->opcode() != SpvOpVariable) { + if (ii->opcode() != spv::Op::OpVariable) { SplitBlock(ii, bi, &new_blks); first_block_split = true; } @@ -936,7 +621,9 @@ bool InstrumentPass::InstrumentFunction(Function* func, uint32_t stage_idx, // Restart instrumenting at beginning of last new block, // but skip over any new phi or copy instruction. ii = bi->begin(); - if (ii->opcode() == SpvOpPhi || ii->opcode() == SpvOpCopyObject) ++ii; + if (ii->opcode() == spv::Op::OpPhi || + ii->opcode() == spv::Op::OpCopyObject) + ++ii; new_blks.clear(); } } @@ -966,62 +653,54 @@ bool InstrumentPass::InstProcessCallTreeFromRoots(InstProcessFunction& pfn, } bool InstrumentPass::InstProcessEntryPointCallTree(InstProcessFunction& pfn) { - // Make sure all entry points have the same execution model. Do not - // instrument if they do not. - // TODO(greg-lunarg): Handle mixed stages. Technically, a shader module - // can contain entry points with different execution models, although - // such modules will likely be rare as GLSL and HLSL are geared toward - // one model per module. In such cases we will need - // to clone any functions which are in the call trees of entrypoints - // with differing execution models. - uint32_t ecnt = 0; - uint32_t stage = SpvExecutionModelMax; - for (auto& e : get_module()->entry_points()) { - if (ecnt == 0) - stage = e.GetSingleWordInOperand(kEntryPointExecutionModelInIdx); - else if (e.GetSingleWordInOperand(kEntryPointExecutionModelInIdx) != - stage) { + uint32_t stage_id; + if (use_stage_info_) { + // Make sure all entry points have the same execution model. Do not + // instrument if they do not. + // TODO(greg-lunarg): Handle mixed stages. Technically, a shader module + // can contain entry points with different execution models, although + // such modules will likely be rare as GLSL and HLSL are geared toward + // one model per module. In such cases we will need + // to clone any functions which are in the call trees of entrypoints + // with differing execution models. + spv::ExecutionModel stage = context()->GetStage(); + // Check for supported stages + if (stage != spv::ExecutionModel::Vertex && + stage != spv::ExecutionModel::Fragment && + stage != spv::ExecutionModel::Geometry && + stage != spv::ExecutionModel::GLCompute && + stage != spv::ExecutionModel::TessellationControl && + stage != spv::ExecutionModel::TessellationEvaluation && + stage != spv::ExecutionModel::TaskNV && + stage != spv::ExecutionModel::MeshNV && + stage != spv::ExecutionModel::RayGenerationNV && + stage != spv::ExecutionModel::IntersectionNV && + stage != spv::ExecutionModel::AnyHitNV && + stage != spv::ExecutionModel::ClosestHitNV && + stage != spv::ExecutionModel::MissNV && + stage != spv::ExecutionModel::CallableNV && + stage != spv::ExecutionModel::TaskEXT && + stage != spv::ExecutionModel::MeshEXT) { if (consumer()) { - std::string message = "Mixed stage shader module not supported"; + std::string message = "Stage not supported by instrumentation"; consumer()(SPV_MSG_ERROR, 0, {0, 0, 0}, message.c_str()); } return false; } - ++ecnt; - } - // Check for supported stages - if (stage != SpvExecutionModelVertex && stage != SpvExecutionModelFragment && - stage != SpvExecutionModelGeometry && - stage != SpvExecutionModelGLCompute && - stage != SpvExecutionModelTessellationControl && - stage != SpvExecutionModelTessellationEvaluation && - stage != SpvExecutionModelTaskNV && stage != SpvExecutionModelMeshNV && - stage != SpvExecutionModelRayGenerationNV && - stage != SpvExecutionModelIntersectionNV && - stage != SpvExecutionModelAnyHitNV && - stage != SpvExecutionModelClosestHitNV && - stage != SpvExecutionModelMissNV && - stage != SpvExecutionModelCallableNV) { - if (consumer()) { - std::string message = "Stage not supported by instrumentation"; - consumer()(SPV_MSG_ERROR, 0, {0, 0, 0}, message.c_str()); - } - return false; + stage_id = static_cast(stage); + } else { + stage_id = 0; } // Add together the roots of all entry points std::queue roots; for (auto& e : get_module()->entry_points()) { roots.push(e.GetSingleWordInOperand(kEntryPointFunctionIdInIdx)); } - bool modified = InstProcessCallTreeFromRoots(pfn, &roots, stage); + bool modified = InstProcessCallTreeFromRoots(pfn, &roots, stage_id); return modified; } void InstrumentPass::InitializeInstrument() { - output_buffer_id_ = 0; - output_buffer_ptr_id_ = 0; - input_buffer_ptr_id_ = 0; - input_buffer_id_ = 0; float_id_ = 0; v4float_id_ = 0; uint_id_ = 0; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.h index 12b939d4d..e4408c93e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/instrument_pass.h @@ -50,19 +50,12 @@ // A validation pass may read or write multiple buffers. All such buffers // are located in a single debug descriptor set whose index is passed at the // creation of the instrumentation pass. The bindings of the buffers used by -// a validation pass are permanantly assigned and fixed and documented by +// a validation pass are permanently assigned and fixed and documented by // the kDebugOutput* static consts. namespace spvtools { namespace opt { -// Validation Ids -// These are used to identify the general validation being done and map to -// its output buffers. -static const uint32_t kInstValidationIdBindless = 0; -static const uint32_t kInstValidationIdBuffAddr = 1; -static const uint32_t kInstValidationIdDebugPrintf = 2; - class InstrumentPass : public Pass { using cbb_ptr = const BasicBlock*; @@ -84,13 +77,13 @@ class InstrumentPass : public Pass { // set |desc_set| for debug input and output buffers and writes |shader_id| // into debug output records. |opt_direct_reads| indicates that the pass // will see direct input buffer reads and should prepare to optimize them. - InstrumentPass(uint32_t desc_set, uint32_t shader_id, uint32_t validation_id, - bool opt_direct_reads = false) + InstrumentPass(uint32_t desc_set, uint32_t shader_id, bool opt_direct_reads, + bool use_stage_info) : Pass(), desc_set_(desc_set), shader_id_(shader_id), - validation_id_(validation_id), - opt_direct_reads_(opt_direct_reads) {} + opt_direct_reads_(opt_direct_reads), + use_stage_info_(use_stage_info) {} // Initialize state for instrumentation of module. void InitializeInstrument(); @@ -112,106 +105,12 @@ class InstrumentPass : public Pass { void MovePostludeCode(UptrVectorIterator ref_block_itr, BasicBlock* new_blk_ptr); - // Generate instructions in |builder| which will atomically fetch and - // increment the size of the debug output buffer stream of the current - // validation and write a record to the end of the stream, if enough space - // in the buffer remains. The record will contain the index of the function - // and instruction within that function |func_idx, instruction_idx| which - // generated the record. It will also contain additional information to - // identify the instance of the shader, depending on the stage |stage_idx| - // of the shader. Finally, the record will contain validation-specific - // data contained in |validation_ids| which will identify the validation - // error as well as the values involved in the error. - // - // The output buffer binding written to by the code generated by the function - // is determined by the validation id specified when each specific - // instrumentation pass is created. - // - // The output buffer is a sequence of 32-bit values with the following - // format (where all elements are unsigned 32-bit unless otherwise noted): - // - // Size - // Record0 - // Record1 - // Record2 - // ... - // - // Size is the number of 32-bit values that have been written or - // attempted to be written to the output buffer, excluding the Size. It is - // initialized to 0. If the size of attempts to write the buffer exceeds - // the actual size of the buffer, it is possible that this field can exceed - // the actual size of the buffer. - // - // Each Record* is a variable-length sequence of 32-bit values with the - // following format defined using static const offsets in the .cpp file: - // - // Record Size - // Shader ID - // Instruction Index - // Stage - // Stage-specific Word 0 - // Stage-specific Word 1 - // ... - // Validation Error Code - // Validation-specific Word 0 - // Validation-specific Word 1 - // Validation-specific Word 2 - // ... - // - // Each record consists of three subsections: members common across all - // validation, members specific to the stage, and members specific to a - // validation. - // - // The Record Size is the number of 32-bit words in the record, including - // the Record Size word. - // - // Shader ID is a value that identifies which shader has generated the - // validation error. It is passed when the instrumentation pass is created. - // - // The Instruction Index is the position of the instruction within the - // SPIR-V file which is in error. - // - // The Stage is the pipeline stage which has generated the error as defined - // by the SpvExecutionModel_ enumeration. This is used to interpret the - // following Stage-specific words. - // - // The Stage-specific Words identify which invocation of the shader generated - // the error. Every stage will write a fixed number of words. Vertex shaders - // will write the Vertex and Instance ID. Fragment shaders will write - // FragCoord.xy. Compute shaders will write the GlobalInvocation ID. - // The tesselation eval shader will write the Primitive ID and TessCoords.uv. - // The tesselation control shader and geometry shader will write the - // Primitive ID and Invocation ID. - // - // The Validation Error Code specifies the exact error which has occurred. - // These are enumerated with the kInstError* static consts. This allows - // multiple validation layers to use the same, single output buffer. - // - // The Validation-specific Words are a validation-specific number of 32-bit - // words which give further information on the validation error that - // occurred. These are documented further in each file containing the - // validation-specific class which derives from this base class. - // - // Because the code that is generated checks against the size of the buffer - // before writing, the size of the debug out buffer can be used by the - // validation layer to control the number of error records that are written. - void GenDebugStreamWrite(uint32_t instruction_idx, uint32_t stage_idx, - const std::vector& validation_ids, - InstructionBuilder* builder); - // Return true if all instructions in |ids| are constants or spec constants. bool AllConstant(const std::vector& ids); - // Generate in |builder| instructions to read the unsigned integer from the - // input buffer specified by the offsets in |offset_ids|. Given offsets - // o0, o1, ... oN, and input buffer ibuf, return the id for the value: - // - // ibuf[...ibuf[ibuf[o0]+o1]...+oN] - // - // The binding and the format of the input buffer is determined by each - // specific validation, which is specified at the creation of the pass. - uint32_t GenDebugDirectRead(const std::vector& offset_ids, - InstructionBuilder* builder); + uint32_t GenReadFunctionCall(uint32_t return_id, uint32_t func_id, + const std::vector& args, + InstructionBuilder* builder); // Generate code to convert integer |value_id| to 32bit, if needed. Return // an id to the 32bit equivalent. @@ -221,9 +120,22 @@ class InstrumentPass : public Pass { // Return an id to the Uint equivalent. uint32_t GenUintCastCode(uint32_t value_id, InstructionBuilder* builder); + std::unique_ptr StartFunction( + uint32_t func_id, const analysis::Type* return_type, + const std::vector& param_types); + + std::vector AddParameters( + Function& func, const std::vector& param_types); + + std::unique_ptr EndFunction(); + // Return new label. std::unique_ptr NewLabel(uint32_t label_id); + // Set the name function parameter or local variable + std::unique_ptr NewName(uint32_t id, + const std::string& name_str); + // Return id for 32-bit unsigned type uint32_t GetUintId(); @@ -239,37 +151,25 @@ class InstrumentPass : public Pass { // Return id for void type uint32_t GetVoidId(); - // Return pointer to type for runtime array of uint - analysis::Type* GetUintXRuntimeArrayType(uint32_t width, - analysis::Type** rarr_ty); + // Get registered type structures + analysis::Integer* GetInteger(uint32_t width, bool is_signed); + analysis::Struct* GetStruct(const std::vector& fields); + analysis::RuntimeArray* GetRuntimeArray(const analysis::Type* element); + analysis::Array* GetArray(const analysis::Type* element, uint32_t size); + analysis::Function* GetFunction( + const analysis::Type* return_val, + const std::vector& args); // Return pointer to type for runtime array of uint - analysis::Type* GetUintRuntimeArrayType(uint32_t width); - - // Return id for buffer uint type - uint32_t GetOutputBufferPtrId(); - - // Return id for buffer uint type - uint32_t GetInputBufferTypeId(); - - // Return id for buffer uint type - uint32_t GetInputBufferPtrId(); + analysis::RuntimeArray* GetUintXRuntimeArrayType( + uint32_t width, analysis::RuntimeArray** rarr_ty); - // Return binding for output buffer for current validation. - uint32_t GetOutputBufferBinding(); - - // Return binding for input buffer for current validation. - uint32_t GetInputBufferBinding(); + // Return pointer to type for runtime array of uint + analysis::RuntimeArray* GetUintRuntimeArrayType(uint32_t width); // Add storage buffer extension if needed void AddStorageBufferExt(); - // Return id for debug output buffer - uint32_t GetOutputBufferId(); - - // Return id for debug input buffer - uint32_t GetInputBufferId(); - // Return id for 32-bit float type uint32_t GetFloatId(); @@ -285,15 +185,6 @@ class InstrumentPass : public Pass { // Return id for v3uint type uint32_t GetVec3UintId(); - // Return id for output function. Define if it doesn't exist with - // |val_spec_param_cnt| validation-specific uint32 parameters. - uint32_t GetStreamWriteFunctionId(uint32_t stage_idx, - uint32_t val_spec_param_cnt); - - // Return id for input function taking |param_cnt| uint32 parameters. Define - // if it doesn't exist. - uint32_t GetDirectReadFunctionId(uint32_t param_cnt); - // Split block |block_itr| into two new blocks where the second block // contains |inst_itr| and place in |new_blocks|. void SplitBlock(BasicBlock::iterator inst_itr, @@ -304,8 +195,8 @@ class InstrumentPass : public Pass { // If code is generated for an instruction, replace the instruction's // block with the new blocks that are generated. Continue processing at the // top of the last new block. - bool InstrumentFunction(Function* func, uint32_t stage_idx, - InstProcessFunction& pfn); + virtual bool InstrumentFunction(Function* func, uint32_t stage_idx, + InstProcessFunction& pfn); // Call |pfn| on all functions in the call tree of the function // ids in |roots|. @@ -313,40 +204,11 @@ class InstrumentPass : public Pass { std::queue* roots, uint32_t stage_idx); - // Gen code into |builder| to write |field_value_id| into debug output - // buffer at |base_offset_id| + |field_offset|. - void GenDebugOutputFieldCode(uint32_t base_offset_id, uint32_t field_offset, - uint32_t field_value_id, - InstructionBuilder* builder); - - // Generate instructions into |builder| which will write the members - // of the debug output record common for all stages and validations at - // |base_off|. - void GenCommonStreamWriteCode(uint32_t record_sz, uint32_t instruction_idx, - uint32_t stage_idx, uint32_t base_off, - InstructionBuilder* builder); - - // Generate instructions into |builder| which will write - // |uint_frag_coord_id| at |component| of the record at |base_offset_id| of - // the debug output buffer . - void GenFragCoordEltDebugOutputCode(uint32_t base_offset_id, - uint32_t uint_frag_coord_id, - uint32_t component, - InstructionBuilder* builder); - // Generate instructions into |builder| which will load |var_id| and return // its result id. uint32_t GenVarLoad(uint32_t var_id, InstructionBuilder* builder); - // Generate instructions into |builder| which will load the uint |builtin_id| - // and write it into the debug output buffer at |base_off| + |builtin_off|. - void GenBuiltinOutputCode(uint32_t builtin_id, uint32_t builtin_off, - uint32_t base_off, InstructionBuilder* builder); - - // Generate instructions into |builder| which will write the |stage_idx|- - // specific members of the debug output stream at |base_off|. - void GenStageStreamWriteCode(uint32_t stage_idx, uint32_t base_off, - InstructionBuilder* builder); + uint32_t GenStageInfo(uint32_t stage_idx, InstructionBuilder* builder); // Return true if instruction must be in the same block that its result // is used. @@ -382,62 +244,47 @@ class InstrumentPass : public Pass { // Map from instruction's unique id to offset in original file. std::unordered_map uid2offset_; - // result id for OpConstantFalse - uint32_t validation_id_; - - // id for output buffer variable - uint32_t output_buffer_id_; - - // ptr type id for output buffer element - uint32_t output_buffer_ptr_id_; - - // ptr type id for input buffer element - uint32_t input_buffer_ptr_id_; - // id for debug output function std::unordered_map param2output_func_id_; // ids for debug input functions std::unordered_map param2input_func_id_; - // id for input buffer variable - uint32_t input_buffer_id_; - // id for 32-bit float type - uint32_t float_id_; + uint32_t float_id_{0}; // id for v4float type - uint32_t v4float_id_; + uint32_t v4float_id_{0}; // id for v4uint type - uint32_t v4uint_id_; + uint32_t v4uint_id_{0}; // id for v3uint type - uint32_t v3uint_id_; + uint32_t v3uint_id_{0}; // id for 32-bit unsigned type - uint32_t uint_id_; + uint32_t uint_id_{0}; // id for 64-bit unsigned type - uint32_t uint64_id_; + uint32_t uint64_id_{0}; // id for 8-bit unsigned type - uint32_t uint8_id_; + uint32_t uint8_id_{0}; // id for bool type - uint32_t bool_id_; + uint32_t bool_id_{0}; // id for void type - uint32_t void_id_; + uint32_t void_id_{0}; // boolean to remember storage buffer extension - bool storage_buffer_ext_defined_; + bool storage_buffer_ext_defined_{false}; // runtime array of uint type - analysis::Type* uint64_rarr_ty_; + analysis::RuntimeArray* uint64_rarr_ty_{nullptr}; // runtime array of uint type - analysis::Type* uint32_rarr_ty_; + analysis::RuntimeArray* uint32_rarr_ty_{nullptr}; // Pre-instrumentation same-block insts std::unordered_map same_block_pre_; @@ -462,11 +309,15 @@ class InstrumentPass : public Pass { std::unordered_map, uint32_t, vector_hash_> call2id_; // Function currently being instrumented - Function* curr_func_; + Function* curr_func_{nullptr}; // Optimize direct debug input buffer reads. Specifically, move all such // reads with constant args to first block and reuse them. - bool opt_direct_reads_; + const bool opt_direct_reads_; + + // Set true if the instrumentation needs to know the current stage. + // Note that this does not work with multi-stage modules. + const bool use_stage_info_; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.cpp new file mode 100644 index 000000000..08477cbdd --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.cpp @@ -0,0 +1,968 @@ +// Copyright (c) 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/interface_var_sroa.h" + +#include + +#include "source/opt/decoration_manager.h" +#include "source/opt/def_use_manager.h" +#include "source/opt/function.h" +#include "source/opt/log.h" +#include "source/opt/type_manager.h" +#include "source/util/make_unique.h" + +namespace spvtools { +namespace opt { +namespace { +constexpr uint32_t kOpDecorateDecorationInOperandIndex = 1; +constexpr uint32_t kOpDecorateLiteralInOperandIndex = 2; +constexpr uint32_t kOpEntryPointInOperandInterface = 3; +constexpr uint32_t kOpVariableStorageClassInOperandIndex = 0; +constexpr uint32_t kOpTypeArrayElemTypeInOperandIndex = 0; +constexpr uint32_t kOpTypeArrayLengthInOperandIndex = 1; +constexpr uint32_t kOpTypeMatrixColCountInOperandIndex = 1; +constexpr uint32_t kOpTypeMatrixColTypeInOperandIndex = 0; +constexpr uint32_t kOpTypePtrTypeInOperandIndex = 1; +constexpr uint32_t kOpConstantValueInOperandIndex = 0; + +// Get the length of the OpTypeArray |array_type|. +uint32_t GetArrayLength(analysis::DefUseManager* def_use_mgr, + Instruction* array_type) { + assert(array_type->opcode() == spv::Op::OpTypeArray); + uint32_t const_int_id = + array_type->GetSingleWordInOperand(kOpTypeArrayLengthInOperandIndex); + Instruction* array_length_inst = def_use_mgr->GetDef(const_int_id); + assert(array_length_inst->opcode() == spv::Op::OpConstant); + return array_length_inst->GetSingleWordInOperand( + kOpConstantValueInOperandIndex); +} + +// Get the element type instruction of the OpTypeArray |array_type|. +Instruction* GetArrayElementType(analysis::DefUseManager* def_use_mgr, + Instruction* array_type) { + assert(array_type->opcode() == spv::Op::OpTypeArray); + uint32_t elem_type_id = + array_type->GetSingleWordInOperand(kOpTypeArrayElemTypeInOperandIndex); + return def_use_mgr->GetDef(elem_type_id); +} + +// Get the column type instruction of the OpTypeMatrix |matrix_type|. +Instruction* GetMatrixColumnType(analysis::DefUseManager* def_use_mgr, + Instruction* matrix_type) { + assert(matrix_type->opcode() == spv::Op::OpTypeMatrix); + uint32_t column_type_id = + matrix_type->GetSingleWordInOperand(kOpTypeMatrixColTypeInOperandIndex); + return def_use_mgr->GetDef(column_type_id); +} + +// Traverses the component type of OpTypeArray or OpTypeMatrix. Repeats it +// |depth_to_component| times recursively and returns the component type. +// |type_id| is the result id of the OpTypeArray or OpTypeMatrix instruction. +uint32_t GetComponentTypeOfArrayMatrix(analysis::DefUseManager* def_use_mgr, + uint32_t type_id, + uint32_t depth_to_component) { + if (depth_to_component == 0) return type_id; + + Instruction* type_inst = def_use_mgr->GetDef(type_id); + if (type_inst->opcode() == spv::Op::OpTypeArray) { + uint32_t elem_type_id = + type_inst->GetSingleWordInOperand(kOpTypeArrayElemTypeInOperandIndex); + return GetComponentTypeOfArrayMatrix(def_use_mgr, elem_type_id, + depth_to_component - 1); + } + + assert(type_inst->opcode() == spv::Op::OpTypeMatrix); + uint32_t column_type_id = + type_inst->GetSingleWordInOperand(kOpTypeMatrixColTypeInOperandIndex); + return GetComponentTypeOfArrayMatrix(def_use_mgr, column_type_id, + depth_to_component - 1); +} + +// Creates an OpDecorate instruction whose Target is |var_id| and Decoration is +// |decoration|. Adds |literal| as an extra operand of the instruction. +void CreateDecoration(analysis::DecorationManager* decoration_mgr, + uint32_t var_id, spv::Decoration decoration, + uint32_t literal) { + std::vector operands({ + {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {var_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_DECORATION, + {static_cast(decoration)}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {literal}}, + }); + decoration_mgr->AddDecoration(spv::Op::OpDecorate, std::move(operands)); +} + +// Replaces load instructions with composite construct instructions in all the +// users of the loads. |loads_to_composites| is the mapping from each load to +// its corresponding OpCompositeConstruct. +void ReplaceLoadWithCompositeConstruct( + IRContext* context, + const std::unordered_map& loads_to_composites) { + for (const auto& load_and_composite : loads_to_composites) { + Instruction* load = load_and_composite.first; + Instruction* composite_construct = load_and_composite.second; + + std::vector users; + context->get_def_use_mgr()->ForEachUse( + load, [&users, composite_construct](Instruction* user, uint32_t index) { + user->GetOperand(index).words[0] = composite_construct->result_id(); + users.push_back(user); + }); + + for (Instruction* user : users) + context->get_def_use_mgr()->AnalyzeInstUse(user); + } +} + +// Returns the storage class of the instruction |var|. +spv::StorageClass GetStorageClass(Instruction* var) { + return static_cast( + var->GetSingleWordInOperand(kOpVariableStorageClassInOperandIndex)); +} + +} // namespace + +bool InterfaceVariableScalarReplacement::HasExtraArrayness( + Instruction& entry_point, Instruction* var) { + spv::ExecutionModel execution_model = + static_cast(entry_point.GetSingleWordInOperand(0)); + if (execution_model != spv::ExecutionModel::TessellationEvaluation && + execution_model != spv::ExecutionModel::TessellationControl) { + return false; + } + if (!context()->get_decoration_mgr()->HasDecoration( + var->result_id(), uint32_t(spv::Decoration::Patch))) { + if (execution_model == spv::ExecutionModel::TessellationControl) + return true; + return GetStorageClass(var) != spv::StorageClass::Output; + } + return false; +} + +bool InterfaceVariableScalarReplacement:: + CheckExtraArraynessConflictBetweenEntries(Instruction* interface_var, + bool has_extra_arrayness) { + if (has_extra_arrayness) { + return !ReportErrorIfHasNoExtraArraynessForOtherEntry(interface_var); + } + return !ReportErrorIfHasExtraArraynessForOtherEntry(interface_var); +} + +bool InterfaceVariableScalarReplacement::GetVariableLocation( + Instruction* var, uint32_t* location) { + return !context()->get_decoration_mgr()->WhileEachDecoration( + var->result_id(), uint32_t(spv::Decoration::Location), + [location](const Instruction& inst) { + *location = + inst.GetSingleWordInOperand(kOpDecorateLiteralInOperandIndex); + return false; + }); +} + +bool InterfaceVariableScalarReplacement::GetVariableComponent( + Instruction* var, uint32_t* component) { + return !context()->get_decoration_mgr()->WhileEachDecoration( + var->result_id(), uint32_t(spv::Decoration::Component), + [component](const Instruction& inst) { + *component = + inst.GetSingleWordInOperand(kOpDecorateLiteralInOperandIndex); + return false; + }); +} + +std::vector +InterfaceVariableScalarReplacement::CollectInterfaceVariables( + Instruction& entry_point) { + std::vector interface_vars; + for (uint32_t i = kOpEntryPointInOperandInterface; + i < entry_point.NumInOperands(); ++i) { + Instruction* interface_var = context()->get_def_use_mgr()->GetDef( + entry_point.GetSingleWordInOperand(i)); + assert(interface_var->opcode() == spv::Op::OpVariable); + + spv::StorageClass storage_class = GetStorageClass(interface_var); + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { + continue; + } + + interface_vars.push_back(interface_var); + } + return interface_vars; +} + +void InterfaceVariableScalarReplacement::KillInstructionAndUsers( + Instruction* inst) { + if (inst->opcode() == spv::Op::OpEntryPoint) { + return; + } + if (inst->opcode() != spv::Op::OpAccessChain) { + context()->KillInst(inst); + return; + } + std::vector users; + context()->get_def_use_mgr()->ForEachUser( + inst, [&users](Instruction* user) { users.push_back(user); }); + for (auto user : users) { + context()->KillInst(user); + } + context()->KillInst(inst); +} + +void InterfaceVariableScalarReplacement::KillInstructionsAndUsers( + const std::vector& insts) { + for (Instruction* inst : insts) { + KillInstructionAndUsers(inst); + } +} + +void InterfaceVariableScalarReplacement::KillLocationAndComponentDecorations( + uint32_t var_id) { + context()->get_decoration_mgr()->RemoveDecorationsFrom( + var_id, [](const Instruction& inst) { + spv::Decoration decoration = spv::Decoration( + inst.GetSingleWordInOperand(kOpDecorateDecorationInOperandIndex)); + return decoration == spv::Decoration::Location || + decoration == spv::Decoration::Component; + }); +} + +bool InterfaceVariableScalarReplacement::ReplaceInterfaceVariableWithScalars( + Instruction* interface_var, Instruction* interface_var_type, + uint32_t location, uint32_t component, uint32_t extra_array_length) { + NestedCompositeComponents scalar_interface_vars = + CreateScalarInterfaceVarsForReplacement(interface_var_type, + GetStorageClass(interface_var), + extra_array_length); + + AddLocationAndComponentDecorations(scalar_interface_vars, &location, + component); + KillLocationAndComponentDecorations(interface_var->result_id()); + + if (!ReplaceInterfaceVarWith(interface_var, extra_array_length, + scalar_interface_vars)) { + return false; + } + + context()->KillInst(interface_var); + return true; +} + +bool InterfaceVariableScalarReplacement::ReplaceInterfaceVarWith( + Instruction* interface_var, uint32_t extra_array_length, + const NestedCompositeComponents& scalar_interface_vars) { + std::vector users; + context()->get_def_use_mgr()->ForEachUser( + interface_var, [&users](Instruction* user) { users.push_back(user); }); + + std::vector interface_var_component_indices; + std::unordered_map loads_to_composites; + std::unordered_map + loads_for_access_chain_to_composites; + if (extra_array_length != 0) { + // Note that the extra arrayness is the first dimension of the array + // interface variable. + for (uint32_t index = 0; index < extra_array_length; ++index) { + std::unordered_map loads_to_component_values; + if (!ReplaceComponentsOfInterfaceVarWith( + interface_var, users, scalar_interface_vars, + interface_var_component_indices, &index, + &loads_to_component_values, + &loads_for_access_chain_to_composites)) { + return false; + } + AddComponentsToCompositesForLoads(loads_to_component_values, + &loads_to_composites, 0); + } + } else if (!ReplaceComponentsOfInterfaceVarWith( + interface_var, users, scalar_interface_vars, + interface_var_component_indices, nullptr, &loads_to_composites, + &loads_for_access_chain_to_composites)) { + return false; + } + + ReplaceLoadWithCompositeConstruct(context(), loads_to_composites); + ReplaceLoadWithCompositeConstruct(context(), + loads_for_access_chain_to_composites); + + KillInstructionsAndUsers(users); + return true; +} + +void InterfaceVariableScalarReplacement::AddLocationAndComponentDecorations( + const NestedCompositeComponents& vars, uint32_t* location, + uint32_t component) { + if (!vars.HasMultipleComponents()) { + uint32_t var_id = vars.GetComponentVariable()->result_id(); + CreateDecoration(context()->get_decoration_mgr(), var_id, + spv::Decoration::Location, *location); + CreateDecoration(context()->get_decoration_mgr(), var_id, + spv::Decoration::Component, component); + ++(*location); + return; + } + for (const auto& var : vars.GetComponents()) { + AddLocationAndComponentDecorations(var, location, component); + } +} + +bool InterfaceVariableScalarReplacement::ReplaceComponentsOfInterfaceVarWith( + Instruction* interface_var, + const std::vector& interface_var_users, + const NestedCompositeComponents& scalar_interface_vars, + std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_composites, + std::unordered_map* + loads_for_access_chain_to_composites) { + if (!scalar_interface_vars.HasMultipleComponents()) { + for (Instruction* interface_var_user : interface_var_users) { + if (!ReplaceComponentOfInterfaceVarWith( + interface_var, interface_var_user, + scalar_interface_vars.GetComponentVariable(), + interface_var_component_indices, extra_array_index, + loads_to_composites, loads_for_access_chain_to_composites)) { + return false; + } + } + return true; + } + return ReplaceMultipleComponentsOfInterfaceVarWith( + interface_var, interface_var_users, scalar_interface_vars.GetComponents(), + interface_var_component_indices, extra_array_index, loads_to_composites, + loads_for_access_chain_to_composites); +} + +bool InterfaceVariableScalarReplacement:: + ReplaceMultipleComponentsOfInterfaceVarWith( + Instruction* interface_var, + const std::vector& interface_var_users, + const std::vector& components, + std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_composites, + std::unordered_map* + loads_for_access_chain_to_composites) { + for (uint32_t i = 0; i < components.size(); ++i) { + interface_var_component_indices.push_back(i); + std::unordered_map loads_to_component_values; + std::unordered_map + loads_for_access_chain_to_component_values; + if (!ReplaceComponentsOfInterfaceVarWith( + interface_var, interface_var_users, components[i], + interface_var_component_indices, extra_array_index, + &loads_to_component_values, + &loads_for_access_chain_to_component_values)) { + return false; + } + interface_var_component_indices.pop_back(); + + uint32_t depth_to_component = + static_cast(interface_var_component_indices.size()); + AddComponentsToCompositesForLoads( + loads_for_access_chain_to_component_values, + loads_for_access_chain_to_composites, depth_to_component); + if (extra_array_index) ++depth_to_component; + AddComponentsToCompositesForLoads(loads_to_component_values, + loads_to_composites, depth_to_component); + } + return true; +} + +bool InterfaceVariableScalarReplacement::ReplaceComponentOfInterfaceVarWith( + Instruction* interface_var, Instruction* interface_var_user, + Instruction* scalar_var, + const std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_component_values, + std::unordered_map* + loads_for_access_chain_to_component_values) { + spv::Op opcode = interface_var_user->opcode(); + if (opcode == spv::Op::OpStore) { + uint32_t value_id = interface_var_user->GetSingleWordInOperand(1); + StoreComponentOfValueToScalarVar(value_id, interface_var_component_indices, + scalar_var, extra_array_index, + interface_var_user); + return true; + } + if (opcode == spv::Op::OpLoad) { + Instruction* scalar_load = + LoadScalarVar(scalar_var, extra_array_index, interface_var_user); + loads_to_component_values->insert({interface_var_user, scalar_load}); + return true; + } + + // Copy OpName and annotation instructions only once. Therefore, we create + // them only for the first element of the extra array. + if (extra_array_index && *extra_array_index != 0) return true; + + if (opcode == spv::Op::OpDecorateId || opcode == spv::Op::OpDecorateString || + opcode == spv::Op::OpDecorate) { + CloneAnnotationForVariable(interface_var_user, scalar_var->result_id()); + return true; + } + + if (opcode == spv::Op::OpName) { + std::unique_ptr new_inst(interface_var_user->Clone(context())); + new_inst->SetInOperand(0, {scalar_var->result_id()}); + context()->AddDebug2Inst(std::move(new_inst)); + return true; + } + + if (opcode == spv::Op::OpEntryPoint) { + return ReplaceInterfaceVarInEntryPoint(interface_var, interface_var_user, + scalar_var->result_id()); + } + + if (opcode == spv::Op::OpAccessChain) { + ReplaceAccessChainWith(interface_var_user, interface_var_component_indices, + scalar_var, + loads_for_access_chain_to_component_values); + return true; + } + + std::string message("Unhandled instruction"); + message += "\n " + interface_var_user->PrettyPrint( + SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + message += + "\nfor interface variable scalar replacement\n " + + interface_var->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + context()->consumer()(SPV_MSG_ERROR, "", {0, 0, 0}, message.c_str()); + return false; +} + +void InterfaceVariableScalarReplacement::UseBaseAccessChainForAccessChain( + Instruction* access_chain, Instruction* base_access_chain) { + assert(base_access_chain->opcode() == spv::Op::OpAccessChain && + access_chain->opcode() == spv::Op::OpAccessChain && + access_chain->GetSingleWordInOperand(0) == + base_access_chain->result_id()); + Instruction::OperandList new_operands; + for (uint32_t i = 0; i < base_access_chain->NumInOperands(); ++i) { + new_operands.emplace_back(base_access_chain->GetInOperand(i)); + } + for (uint32_t i = 1; i < access_chain->NumInOperands(); ++i) { + new_operands.emplace_back(access_chain->GetInOperand(i)); + } + access_chain->SetInOperands(std::move(new_operands)); +} + +Instruction* InterfaceVariableScalarReplacement::CreateAccessChainToVar( + uint32_t var_type_id, Instruction* var, + const std::vector& index_ids, Instruction* insert_before, + uint32_t* component_type_id) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + *component_type_id = GetComponentTypeOfArrayMatrix( + def_use_mgr, var_type_id, static_cast(index_ids.size())); + + uint32_t ptr_type_id = + GetPointerType(*component_type_id, GetStorageClass(var)); + + std::unique_ptr new_access_chain(new Instruction( + context(), spv::Op::OpAccessChain, ptr_type_id, TakeNextId(), + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}})); + for (uint32_t index_id : index_ids) { + new_access_chain->AddOperand({SPV_OPERAND_TYPE_ID, {index_id}}); + } + + Instruction* inst = new_access_chain.get(); + def_use_mgr->AnalyzeInstDefUse(inst); + insert_before->InsertBefore(std::move(new_access_chain)); + return inst; +} + +Instruction* InterfaceVariableScalarReplacement::CreateAccessChainWithIndex( + uint32_t component_type_id, Instruction* var, uint32_t index, + Instruction* insert_before) { + uint32_t ptr_type_id = + GetPointerType(component_type_id, GetStorageClass(var)); + uint32_t index_id = context()->get_constant_mgr()->GetUIntConstId(index); + std::unique_ptr new_access_chain(new Instruction( + context(), spv::Op::OpAccessChain, ptr_type_id, TakeNextId(), + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}, + {SPV_OPERAND_TYPE_ID, {index_id}}, + })); + Instruction* inst = new_access_chain.get(); + context()->get_def_use_mgr()->AnalyzeInstDefUse(inst); + insert_before->InsertBefore(std::move(new_access_chain)); + return inst; +} + +void InterfaceVariableScalarReplacement::ReplaceAccessChainWith( + Instruction* access_chain, + const std::vector& interface_var_component_indices, + Instruction* scalar_var, + std::unordered_map* loads_to_component_values) { + std::vector indexes; + for (uint32_t i = 1; i < access_chain->NumInOperands(); ++i) { + indexes.push_back(access_chain->GetSingleWordInOperand(i)); + } + + // Note that we have a strong assumption that |access_chain| has only a single + // index that is for the extra arrayness. + context()->get_def_use_mgr()->ForEachUser( + access_chain, + [this, access_chain, &indexes, &interface_var_component_indices, + scalar_var, loads_to_component_values](Instruction* user) { + switch (user->opcode()) { + case spv::Op::OpAccessChain: { + UseBaseAccessChainForAccessChain(user, access_chain); + ReplaceAccessChainWith(user, interface_var_component_indices, + scalar_var, loads_to_component_values); + return; + } + case spv::Op::OpStore: { + uint32_t value_id = user->GetSingleWordInOperand(1); + StoreComponentOfValueToAccessChainToScalarVar( + value_id, interface_var_component_indices, scalar_var, indexes, + user); + return; + } + case spv::Op::OpLoad: { + Instruction* value = + LoadAccessChainToVar(scalar_var, indexes, user); + loads_to_component_values->insert({user, value}); + return; + } + default: + break; + } + }); +} + +void InterfaceVariableScalarReplacement::CloneAnnotationForVariable( + Instruction* annotation_inst, uint32_t var_id) { + assert(annotation_inst->opcode() == spv::Op::OpDecorate || + annotation_inst->opcode() == spv::Op::OpDecorateId || + annotation_inst->opcode() == spv::Op::OpDecorateString); + std::unique_ptr new_inst(annotation_inst->Clone(context())); + new_inst->SetInOperand(0, {var_id}); + context()->AddAnnotationInst(std::move(new_inst)); +} + +bool InterfaceVariableScalarReplacement::ReplaceInterfaceVarInEntryPoint( + Instruction* interface_var, Instruction* entry_point, + uint32_t scalar_var_id) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + uint32_t interface_var_id = interface_var->result_id(); + if (interface_vars_removed_from_entry_point_operands_.find( + interface_var_id) != + interface_vars_removed_from_entry_point_operands_.end()) { + entry_point->AddOperand({SPV_OPERAND_TYPE_ID, {scalar_var_id}}); + def_use_mgr->AnalyzeInstUse(entry_point); + return true; + } + + bool success = !entry_point->WhileEachInId( + [&interface_var_id, &scalar_var_id](uint32_t* id) { + if (*id == interface_var_id) { + *id = scalar_var_id; + return false; + } + return true; + }); + if (!success) { + std::string message( + "interface variable is not an operand of the entry point"); + message += "\n " + interface_var->PrettyPrint( + SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + message += "\n " + entry_point->PrettyPrint( + SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + context()->consumer()(SPV_MSG_ERROR, "", {0, 0, 0}, message.c_str()); + return false; + } + + def_use_mgr->AnalyzeInstUse(entry_point); + interface_vars_removed_from_entry_point_operands_.insert(interface_var_id); + return true; +} + +uint32_t InterfaceVariableScalarReplacement::GetPointeeTypeIdOfVar( + Instruction* var) { + assert(var->opcode() == spv::Op::OpVariable); + + uint32_t ptr_type_id = var->type_id(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + Instruction* ptr_type_inst = def_use_mgr->GetDef(ptr_type_id); + + assert(ptr_type_inst->opcode() == spv::Op::OpTypePointer && + "Variable must have a pointer type."); + return ptr_type_inst->GetSingleWordInOperand(kOpTypePtrTypeInOperandIndex); +} + +void InterfaceVariableScalarReplacement::StoreComponentOfValueToScalarVar( + uint32_t value_id, const std::vector& component_indices, + Instruction* scalar_var, const uint32_t* extra_array_index, + Instruction* insert_before) { + uint32_t component_type_id = GetPointeeTypeIdOfVar(scalar_var); + Instruction* ptr = scalar_var; + if (extra_array_index) { + auto* ty_mgr = context()->get_type_mgr(); + analysis::Array* array_type = ty_mgr->GetType(component_type_id)->AsArray(); + assert(array_type != nullptr); + component_type_id = ty_mgr->GetTypeInstruction(array_type->element_type()); + ptr = CreateAccessChainWithIndex(component_type_id, scalar_var, + *extra_array_index, insert_before); + } + + StoreComponentOfValueTo(component_type_id, value_id, component_indices, ptr, + extra_array_index, insert_before); +} + +Instruction* InterfaceVariableScalarReplacement::LoadScalarVar( + Instruction* scalar_var, const uint32_t* extra_array_index, + Instruction* insert_before) { + uint32_t component_type_id = GetPointeeTypeIdOfVar(scalar_var); + Instruction* ptr = scalar_var; + if (extra_array_index) { + auto* ty_mgr = context()->get_type_mgr(); + analysis::Array* array_type = ty_mgr->GetType(component_type_id)->AsArray(); + assert(array_type != nullptr); + component_type_id = ty_mgr->GetTypeInstruction(array_type->element_type()); + ptr = CreateAccessChainWithIndex(component_type_id, scalar_var, + *extra_array_index, insert_before); + } + + return CreateLoad(component_type_id, ptr, insert_before); +} + +Instruction* InterfaceVariableScalarReplacement::CreateLoad( + uint32_t type_id, Instruction* ptr, Instruction* insert_before) { + std::unique_ptr load( + new Instruction(context(), spv::Op::OpLoad, type_id, TakeNextId(), + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {ptr->result_id()}}})); + Instruction* load_inst = load.get(); + context()->get_def_use_mgr()->AnalyzeInstDefUse(load_inst); + insert_before->InsertBefore(std::move(load)); + return load_inst; +} + +void InterfaceVariableScalarReplacement::StoreComponentOfValueTo( + uint32_t component_type_id, uint32_t value_id, + const std::vector& component_indices, Instruction* ptr, + const uint32_t* extra_array_index, Instruction* insert_before) { + std::unique_ptr composite_extract(CreateCompositeExtract( + component_type_id, value_id, component_indices, extra_array_index)); + + std::unique_ptr new_store( + new Instruction(context(), spv::Op::OpStore)); + new_store->AddOperand({SPV_OPERAND_TYPE_ID, {ptr->result_id()}}); + new_store->AddOperand( + {SPV_OPERAND_TYPE_ID, {composite_extract->result_id()}}); + + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + def_use_mgr->AnalyzeInstDefUse(composite_extract.get()); + def_use_mgr->AnalyzeInstDefUse(new_store.get()); + + insert_before->InsertBefore(std::move(composite_extract)); + insert_before->InsertBefore(std::move(new_store)); +} + +Instruction* InterfaceVariableScalarReplacement::CreateCompositeExtract( + uint32_t type_id, uint32_t composite_id, + const std::vector& indexes, const uint32_t* extra_first_index) { + uint32_t component_id = TakeNextId(); + Instruction* composite_extract = new Instruction( + context(), spv::Op::OpCompositeExtract, type_id, component_id, + std::initializer_list{{SPV_OPERAND_TYPE_ID, {composite_id}}}); + if (extra_first_index) { + composite_extract->AddOperand( + {SPV_OPERAND_TYPE_LITERAL_INTEGER, {*extra_first_index}}); + } + for (uint32_t index : indexes) { + composite_extract->AddOperand({SPV_OPERAND_TYPE_LITERAL_INTEGER, {index}}); + } + return composite_extract; +} + +void InterfaceVariableScalarReplacement:: + StoreComponentOfValueToAccessChainToScalarVar( + uint32_t value_id, const std::vector& component_indices, + Instruction* scalar_var, + const std::vector& access_chain_indices, + Instruction* insert_before) { + uint32_t component_type_id = GetPointeeTypeIdOfVar(scalar_var); + Instruction* ptr = scalar_var; + if (!access_chain_indices.empty()) { + ptr = CreateAccessChainToVar(component_type_id, scalar_var, + access_chain_indices, insert_before, + &component_type_id); + } + + StoreComponentOfValueTo(component_type_id, value_id, component_indices, ptr, + nullptr, insert_before); +} + +Instruction* InterfaceVariableScalarReplacement::LoadAccessChainToVar( + Instruction* var, const std::vector& indexes, + Instruction* insert_before) { + uint32_t component_type_id = GetPointeeTypeIdOfVar(var); + Instruction* ptr = var; + if (!indexes.empty()) { + ptr = CreateAccessChainToVar(component_type_id, var, indexes, insert_before, + &component_type_id); + } + + return CreateLoad(component_type_id, ptr, insert_before); +} + +Instruction* +InterfaceVariableScalarReplacement::CreateCompositeConstructForComponentOfLoad( + Instruction* load, uint32_t depth_to_component) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + uint32_t type_id = load->type_id(); + if (depth_to_component != 0) { + type_id = GetComponentTypeOfArrayMatrix(def_use_mgr, load->type_id(), + depth_to_component); + } + uint32_t new_id = context()->TakeNextId(); + std::unique_ptr new_composite_construct(new Instruction( + context(), spv::Op::OpCompositeConstruct, type_id, new_id, {})); + Instruction* composite_construct = new_composite_construct.get(); + def_use_mgr->AnalyzeInstDefUse(composite_construct); + + // Insert |new_composite_construct| after |load|. When there are multiple + // recursive composite construct instructions for a load, we have to place the + // composite construct with a lower depth later because it constructs the + // composite that contains other composites with lower depths. + auto* insert_before = load->NextNode(); + while (true) { + auto itr = + composite_ids_to_component_depths.find(insert_before->result_id()); + if (itr == composite_ids_to_component_depths.end()) break; + if (itr->second <= depth_to_component) break; + insert_before = insert_before->NextNode(); + } + insert_before->InsertBefore(std::move(new_composite_construct)); + composite_ids_to_component_depths.insert({new_id, depth_to_component}); + return composite_construct; +} + +void InterfaceVariableScalarReplacement::AddComponentsToCompositesForLoads( + const std::unordered_map& + loads_to_component_values, + std::unordered_map* loads_to_composites, + uint32_t depth_to_component) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + for (auto& load_and_component_vale : loads_to_component_values) { + Instruction* load = load_and_component_vale.first; + Instruction* component_value = load_and_component_vale.second; + Instruction* composite_construct = nullptr; + auto itr = loads_to_composites->find(load); + if (itr == loads_to_composites->end()) { + composite_construct = + CreateCompositeConstructForComponentOfLoad(load, depth_to_component); + loads_to_composites->insert({load, composite_construct}); + } else { + composite_construct = itr->second; + } + composite_construct->AddOperand( + {SPV_OPERAND_TYPE_ID, {component_value->result_id()}}); + def_use_mgr->AnalyzeInstDefUse(composite_construct); + } +} + +uint32_t InterfaceVariableScalarReplacement::GetArrayType( + uint32_t elem_type_id, uint32_t array_length) { + analysis::Type* elem_type = context()->get_type_mgr()->GetType(elem_type_id); + uint32_t array_length_id = + context()->get_constant_mgr()->GetUIntConstId(array_length); + analysis::Array array_type( + elem_type, + analysis::Array::LengthInfo{array_length_id, {0, array_length}}); + return context()->get_type_mgr()->GetTypeInstruction(&array_type); +} + +uint32_t InterfaceVariableScalarReplacement::GetPointerType( + uint32_t type_id, spv::StorageClass storage_class) { + analysis::Type* type = context()->get_type_mgr()->GetType(type_id); + analysis::Pointer ptr_type(type, storage_class); + return context()->get_type_mgr()->GetTypeInstruction(&ptr_type); +} + +InterfaceVariableScalarReplacement::NestedCompositeComponents +InterfaceVariableScalarReplacement::CreateScalarInterfaceVarsForArray( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length) { + assert(interface_var_type->opcode() == spv::Op::OpTypeArray); + + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + uint32_t array_length = GetArrayLength(def_use_mgr, interface_var_type); + Instruction* elem_type = GetArrayElementType(def_use_mgr, interface_var_type); + + NestedCompositeComponents scalar_vars; + while (array_length > 0) { + NestedCompositeComponents scalar_vars_for_element = + CreateScalarInterfaceVarsForReplacement(elem_type, storage_class, + extra_array_length); + scalar_vars.AddComponent(scalar_vars_for_element); + --array_length; + } + return scalar_vars; +} + +InterfaceVariableScalarReplacement::NestedCompositeComponents +InterfaceVariableScalarReplacement::CreateScalarInterfaceVarsForMatrix( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length) { + assert(interface_var_type->opcode() == spv::Op::OpTypeMatrix); + + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + uint32_t column_count = interface_var_type->GetSingleWordInOperand( + kOpTypeMatrixColCountInOperandIndex); + Instruction* column_type = + GetMatrixColumnType(def_use_mgr, interface_var_type); + + NestedCompositeComponents scalar_vars; + while (column_count > 0) { + NestedCompositeComponents scalar_vars_for_column = + CreateScalarInterfaceVarsForReplacement(column_type, storage_class, + extra_array_length); + scalar_vars.AddComponent(scalar_vars_for_column); + --column_count; + } + return scalar_vars; +} + +InterfaceVariableScalarReplacement::NestedCompositeComponents +InterfaceVariableScalarReplacement::CreateScalarInterfaceVarsForReplacement( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length) { + // Handle array case. + if (interface_var_type->opcode() == spv::Op::OpTypeArray) { + return CreateScalarInterfaceVarsForArray(interface_var_type, storage_class, + extra_array_length); + } + + // Handle matrix case. + if (interface_var_type->opcode() == spv::Op::OpTypeMatrix) { + return CreateScalarInterfaceVarsForMatrix(interface_var_type, storage_class, + extra_array_length); + } + + // Handle scalar or vector case. + NestedCompositeComponents scalar_var; + uint32_t type_id = interface_var_type->result_id(); + if (extra_array_length != 0) { + type_id = GetArrayType(type_id, extra_array_length); + } + uint32_t ptr_type_id = + context()->get_type_mgr()->FindPointerToType(type_id, storage_class); + uint32_t id = TakeNextId(); + std::unique_ptr variable( + new Instruction(context(), spv::Op::OpVariable, ptr_type_id, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, + {static_cast(storage_class)}}})); + scalar_var.SetSingleComponentVariable(variable.get()); + context()->AddGlobalValue(std::move(variable)); + return scalar_var; +} + +Instruction* InterfaceVariableScalarReplacement::GetTypeOfVariable( + Instruction* var) { + uint32_t pointee_type_id = GetPointeeTypeIdOfVar(var); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + return def_use_mgr->GetDef(pointee_type_id); +} + +Pass::Status InterfaceVariableScalarReplacement::Process() { + Pass::Status status = Status::SuccessWithoutChange; + for (Instruction& entry_point : get_module()->entry_points()) { + status = + CombineStatus(status, ReplaceInterfaceVarsWithScalars(entry_point)); + } + return status; +} + +bool InterfaceVariableScalarReplacement:: + ReportErrorIfHasExtraArraynessForOtherEntry(Instruction* var) { + if (vars_with_extra_arrayness.find(var) == vars_with_extra_arrayness.end()) + return false; + + std::string message( + "A variable is arrayed for an entry point but it is not " + "arrayed for another entry point"); + message += + "\n " + var->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + context()->consumer()(SPV_MSG_ERROR, "", {0, 0, 0}, message.c_str()); + return true; +} + +bool InterfaceVariableScalarReplacement:: + ReportErrorIfHasNoExtraArraynessForOtherEntry(Instruction* var) { + if (vars_without_extra_arrayness.find(var) == + vars_without_extra_arrayness.end()) + return false; + + std::string message( + "A variable is not arrayed for an entry point but it is " + "arrayed for another entry point"); + message += + "\n " + var->PrettyPrint(SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); + context()->consumer()(SPV_MSG_ERROR, "", {0, 0, 0}, message.c_str()); + return true; +} + +Pass::Status +InterfaceVariableScalarReplacement::ReplaceInterfaceVarsWithScalars( + Instruction& entry_point) { + std::vector interface_vars = + CollectInterfaceVariables(entry_point); + + Pass::Status status = Status::SuccessWithoutChange; + for (Instruction* interface_var : interface_vars) { + uint32_t location, component; + if (!GetVariableLocation(interface_var, &location)) continue; + if (!GetVariableComponent(interface_var, &component)) component = 0; + + Instruction* interface_var_type = GetTypeOfVariable(interface_var); + uint32_t extra_array_length = 0; + if (HasExtraArrayness(entry_point, interface_var)) { + extra_array_length = + GetArrayLength(context()->get_def_use_mgr(), interface_var_type); + interface_var_type = + GetArrayElementType(context()->get_def_use_mgr(), interface_var_type); + vars_with_extra_arrayness.insert(interface_var); + } else { + vars_without_extra_arrayness.insert(interface_var); + } + + if (!CheckExtraArraynessConflictBetweenEntries(interface_var, + extra_array_length != 0)) { + return Pass::Status::Failure; + } + + if (interface_var_type->opcode() != spv::Op::OpTypeArray && + interface_var_type->opcode() != spv::Op::OpTypeMatrix) { + continue; + } + + if (!ReplaceInterfaceVariableWithScalars(interface_var, interface_var_type, + location, component, + extra_array_length)) { + return Pass::Status::Failure; + } + status = Pass::Status::SuccessWithChange; + } + + return status; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.h new file mode 100644 index 000000000..45ed3717a --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interface_var_sroa.h @@ -0,0 +1,397 @@ +// Copyright (c) 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_INTERFACE_VAR_SROA_H_ +#define SOURCE_OPT_INTERFACE_VAR_SROA_H_ + +#include + +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +// +// Note that the current implementation of this pass covers only store, load, +// access chain instructions for the interface variables. Supporting other types +// of instructions is a future work. +class InterfaceVariableScalarReplacement : public Pass { + public: + InterfaceVariableScalarReplacement() {} + + const char* name() const override { + return "interface-variable-scalar-replacement"; + } + Status Process() override; + + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisDecorations | IRContext::kAnalysisDefUse | + IRContext::kAnalysisConstants | IRContext::kAnalysisTypes; + } + + private: + // A struct containing components of a composite variable. If the composite + // consists of multiple or recursive components, |component_variable| is + // nullptr and |nested_composite_components| keeps the components. If it has a + // single component, |nested_composite_components| is empty and + // |component_variable| is the component. Note that each element of + // |nested_composite_components| has the NestedCompositeComponents struct as + // its type that can recursively keep the components. + struct NestedCompositeComponents { + NestedCompositeComponents() : component_variable(nullptr) {} + + bool HasMultipleComponents() const { + return !nested_composite_components.empty(); + } + + const std::vector& GetComponents() const { + return nested_composite_components; + } + + void AddComponent(const NestedCompositeComponents& component) { + nested_composite_components.push_back(component); + } + + Instruction* GetComponentVariable() const { return component_variable; } + + void SetSingleComponentVariable(Instruction* var) { + component_variable = var; + } + + private: + std::vector nested_composite_components; + Instruction* component_variable; + }; + + // Collects all interface variables used by the |entry_point|. + std::vector CollectInterfaceVariables(Instruction& entry_point); + + // Returns whether |var| has the extra arrayness for the entry point + // |entry_point| or not. + bool HasExtraArrayness(Instruction& entry_point, Instruction* var); + + // Finds a Location BuiltIn decoration of |var| and returns it via + // |location|. Returns true whether the location exists or not. + bool GetVariableLocation(Instruction* var, uint32_t* location); + + // Finds a Component BuiltIn decoration of |var| and returns it via + // |component|. Returns true whether the component exists or not. + bool GetVariableComponent(Instruction* var, uint32_t* component); + + // Returns the type of |var| as an instruction. + Instruction* GetTypeOfVariable(Instruction* var); + + // Replaces an interface variable |interface_var| whose type is + // |interface_var_type| with scalars and returns whether it succeeds or not. + // |location| is the value of Location Decoration for |interface_var|. + // |component| is the value of Component Decoration for |interface_var|. + // If |extra_array_length| is 0, it means |interface_var| has a Patch + // decoration. Otherwise, |extra_array_length| denotes the length of the extra + // array of |interface_var|. + bool ReplaceInterfaceVariableWithScalars(Instruction* interface_var, + Instruction* interface_var_type, + uint32_t location, + uint32_t component, + uint32_t extra_array_length); + + // Creates scalar variables with the storage classe |storage_class| to replace + // an interface variable whose type is |interface_var_type|. If + // |extra_array_length| is not zero, adds the extra arrayness to the created + // scalar variables. + NestedCompositeComponents CreateScalarInterfaceVarsForReplacement( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length); + + // Creates scalar variables with the storage classe |storage_class| to replace + // the interface variable whose type is OpTypeArray |interface_var_type| with. + // If |extra_array_length| is not zero, adds the extra arrayness to all the + // scalar variables. + NestedCompositeComponents CreateScalarInterfaceVarsForArray( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length); + + // Creates scalar variables with the storage classe |storage_class| to replace + // the interface variable whose type is OpTypeMatrix |interface_var_type| + // with. If |extra_array_length| is not zero, adds the extra arrayness to all + // the scalar variables. + NestedCompositeComponents CreateScalarInterfaceVarsForMatrix( + Instruction* interface_var_type, spv::StorageClass storage_class, + uint32_t extra_array_length); + + // Recursively adds Location and Component decorations to variables in + // |vars| with |location| and |component|. Increases |location| by one after + // it actually adds Location and Component decorations for a variable. + void AddLocationAndComponentDecorations(const NestedCompositeComponents& vars, + uint32_t* location, + uint32_t component); + + // Replaces the interface variable |interface_var| with + // |scalar_interface_vars| and returns whether it succeeds or not. + // |extra_arrayness| is the extra arrayness of the interface variable. + // |scalar_interface_vars| contains the nested variables to replace the + // interface variable with. + bool ReplaceInterfaceVarWith( + Instruction* interface_var, uint32_t extra_arrayness, + const NestedCompositeComponents& scalar_interface_vars); + + // Replaces |interface_var| in the operands of instructions + // |interface_var_users| with |scalar_interface_vars|. This is a recursive + // method and |interface_var_component_indices| is used to specify which + // recursive component of |interface_var| is replaced. Returns composite + // construct instructions to be replaced with load instructions of + // |interface_var_users| via |loads_to_composites|. Returns composite + // construct instructions to be replaced with load instructions of access + // chain instructions in |interface_var_users| via + // |loads_for_access_chain_to_composites|. + bool ReplaceComponentsOfInterfaceVarWith( + Instruction* interface_var, + const std::vector& interface_var_users, + const NestedCompositeComponents& scalar_interface_vars, + std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_composites, + std::unordered_map* + loads_for_access_chain_to_composites); + + // Replaces |interface_var| in the operands of instructions + // |interface_var_users| with |components| that is a vector of components for + // the interface variable |interface_var|. This is a recursive method and + // |interface_var_component_indices| is used to specify which recursive + // component of |interface_var| is replaced. Returns composite construct + // instructions to be replaced with load instructions of |interface_var_users| + // via |loads_to_composites|. Returns composite construct instructions to be + // replaced with load instructions of access chain instructions in + // |interface_var_users| via |loads_for_access_chain_to_composites|. + bool ReplaceMultipleComponentsOfInterfaceVarWith( + Instruction* interface_var, + const std::vector& interface_var_users, + const std::vector& components, + std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_composites, + std::unordered_map* + loads_for_access_chain_to_composites); + + // Replaces a component of |interface_var| that is used as an operand of + // instruction |interface_var_user| with |scalar_var|. + // |interface_var_component_indices| is a vector of recursive indices for + // which recursive component of |interface_var| is replaced. If + // |interface_var_user| is a load, returns the component value via + // |loads_to_component_values|. If |interface_var_user| is an access chain, + // returns the component value for loads of |interface_var_user| via + // |loads_for_access_chain_to_component_values|. + bool ReplaceComponentOfInterfaceVarWith( + Instruction* interface_var, Instruction* interface_var_user, + Instruction* scalar_var, + const std::vector& interface_var_component_indices, + const uint32_t* extra_array_index, + std::unordered_map* loads_to_component_values, + std::unordered_map* + loads_for_access_chain_to_component_values); + + // Creates instructions to load |scalar_var| and inserts them before + // |insert_before|. If |extra_array_index| is not null, they load + // |extra_array_index| th component of |scalar_var| instead of |scalar_var| + // itself. + Instruction* LoadScalarVar(Instruction* scalar_var, + const uint32_t* extra_array_index, + Instruction* insert_before); + + // Creates instructions to load an access chain to |var| and inserts them + // before |insert_before|. |Indexes| will be Indexes operand of the access + // chain. + Instruction* LoadAccessChainToVar(Instruction* var, + const std::vector& indexes, + Instruction* insert_before); + + // Creates instructions to store a component of an aggregate whose id is + // |value_id| to an access chain to |scalar_var| and inserts the created + // instructions before |insert_before|. To get the component, recursively + // traverses the aggregate with |component_indices| as indexes. + // Numbers in |access_chain_indices| are the Indexes operand of the access + // chain to |scalar_var| + void StoreComponentOfValueToAccessChainToScalarVar( + uint32_t value_id, const std::vector& component_indices, + Instruction* scalar_var, + const std::vector& access_chain_indices, + Instruction* insert_before); + + // Creates instructions to store a component of an aggregate whose id is + // |value_id| to |scalar_var| and inserts the created instructions before + // |insert_before|. To get the component, recursively traverses the aggregate + // using |extra_array_index| and |component_indices| as indexes. + void StoreComponentOfValueToScalarVar( + uint32_t value_id, const std::vector& component_indices, + Instruction* scalar_var, const uint32_t* extra_array_index, + Instruction* insert_before); + + // Creates instructions to store a component of an aggregate whose id is + // |value_id| to |ptr| and inserts the created instructions before + // |insert_before|. To get the component, recursively traverses the aggregate + // using |extra_array_index| and |component_indices| as indexes. + // |component_type_id| is the id of the type instruction of the component. + void StoreComponentOfValueTo(uint32_t component_type_id, uint32_t value_id, + const std::vector& component_indices, + Instruction* ptr, + const uint32_t* extra_array_index, + Instruction* insert_before); + + // Creates new OpCompositeExtract with |type_id| for Result Type, + // |composite_id| for Composite operand, and |indexes| for Indexes operands. + // If |extra_first_index| is not nullptr, uses it as the first Indexes + // operand. + Instruction* CreateCompositeExtract(uint32_t type_id, uint32_t composite_id, + const std::vector& indexes, + const uint32_t* extra_first_index); + + // Creates a new OpLoad whose Result Type is |type_id| and Pointer operand is + // |ptr|. Inserts the new instruction before |insert_before|. + Instruction* CreateLoad(uint32_t type_id, Instruction* ptr, + Instruction* insert_before); + + // Clones an annotation instruction |annotation_inst| and sets the target + // operand of the new annotation instruction as |var_id|. + void CloneAnnotationForVariable(Instruction* annotation_inst, + uint32_t var_id); + + // Replaces the interface variable |interface_var| in the operands of the + // entry point |entry_point| with |scalar_var_id|. If it cannot find + // |interface_var| from the operands of the entry point |entry_point|, adds + // |scalar_var_id| as an operand of the entry point |entry_point|. + bool ReplaceInterfaceVarInEntryPoint(Instruction* interface_var, + Instruction* entry_point, + uint32_t scalar_var_id); + + // Creates an access chain instruction whose Base operand is |var| and Indexes + // operand is |index|. |component_type_id| is the id of the type instruction + // that is the type of component. Inserts the new access chain before + // |insert_before|. + Instruction* CreateAccessChainWithIndex(uint32_t component_type_id, + Instruction* var, uint32_t index, + Instruction* insert_before); + + // Returns the pointee type of the type of variable |var|. + uint32_t GetPointeeTypeIdOfVar(Instruction* var); + + // Replaces the access chain |access_chain| and its users with a new access + // chain that points |scalar_var| as the Base operand having + // |interface_var_component_indices| as Indexes operands and users of the new + // access chain. When some of the users are load instructions, returns the + // original load instruction to the new instruction that loads a component of + // the original load value via |loads_to_component_values|. + void ReplaceAccessChainWith( + Instruction* access_chain, + const std::vector& interface_var_component_indices, + Instruction* scalar_var, + std::unordered_map* + loads_to_component_values); + + // Assuming that |access_chain| is an access chain instruction whose Base + // operand is |base_access_chain|, replaces the operands of |access_chain| + // with operands of |base_access_chain| and Indexes operands of + // |access_chain|. + void UseBaseAccessChainForAccessChain(Instruction* access_chain, + Instruction* base_access_chain); + + // Creates composite construct instructions for load instructions that are the + // keys of |loads_to_component_values| if no such composite construct + // instructions exist. Adds a component of the composite as an operand of the + // created composite construct instruction. Each value of + // |loads_to_component_values| is the component. Returns the created composite + // construct instructions using |loads_to_composites|. |depth_to_component| is + // the number of recursive access steps to get the component from the + // composite. + void AddComponentsToCompositesForLoads( + const std::unordered_map& + loads_to_component_values, + std::unordered_map* loads_to_composites, + uint32_t depth_to_component); + + // Creates a composite construct instruction for a component of the value of + // instruction |load| in |depth_to_component| th recursive depth and inserts + // it after |load|. + Instruction* CreateCompositeConstructForComponentOfLoad( + Instruction* load, uint32_t depth_to_component); + + // Creates a new access chain instruction that points to variable |var| whose + // type is the instruction with |var_type_id| and inserts it before + // |insert_before|. The new access chain will have |index_ids| for Indexes + // operands. Returns the type id of the component that is pointed by the new + // access chain via |component_type_id|. + Instruction* CreateAccessChainToVar(uint32_t var_type_id, Instruction* var, + const std::vector& index_ids, + Instruction* insert_before, + uint32_t* component_type_id); + + // Returns the result id of OpTypeArray instrunction whose Element Type + // operand is |elem_type_id| and Length operand is |array_length|. + uint32_t GetArrayType(uint32_t elem_type_id, uint32_t array_length); + + // Returns the result id of OpTypePointer instrunction whose Type + // operand is |type_id| and Storage Class operand is |storage_class|. + uint32_t GetPointerType(uint32_t type_id, spv::StorageClass storage_class); + + // Kills an instrunction |inst| and its users. + void KillInstructionAndUsers(Instruction* inst); + + // Kills a vector of instrunctions |insts| and their users. + void KillInstructionsAndUsers(const std::vector& insts); + + // Kills all OpDecorate instructions for Location and Component of the + // variable whose id is |var_id|. + void KillLocationAndComponentDecorations(uint32_t var_id); + + // If |var| has the extra arrayness for an entry point, reports an error and + // returns true. Otherwise, returns false. + bool ReportErrorIfHasExtraArraynessForOtherEntry(Instruction* var); + + // If |var| does not have the extra arrayness for an entry point, reports an + // error and returns true. Otherwise, returns false. + bool ReportErrorIfHasNoExtraArraynessForOtherEntry(Instruction* var); + + // If |interface_var| has the extra arrayness for an entry point but it does + // not have one for another entry point, reports an error and returns false. + // Otherwise, returns true. |has_extra_arrayness| denotes whether it has an + // extra arrayness for an entry point or not. + bool CheckExtraArraynessConflictBetweenEntries(Instruction* interface_var, + bool has_extra_arrayness); + + // Conducts the scalar replacement for the interface variables used by the + // |entry_point|. + Pass::Status ReplaceInterfaceVarsWithScalars(Instruction& entry_point); + + // A set of interface variable ids that were already removed from operands of + // the entry point. + std::unordered_set + interface_vars_removed_from_entry_point_operands_; + + // A mapping from ids of new composite construct instructions that load + // instructions are replaced with to the recursive depth of the component of + // load that the new component construct instruction is used for. + std::unordered_map composite_ids_to_component_depths; + + // A set of interface variables with the extra arrayness for any of the entry + // points. + std::unordered_set vars_with_extra_arrayness; + + // A set of interface variables without the extra arrayness for any of the + // entry points. + std::unordered_set vars_without_extra_arrayness; +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_INTERFACE_VAR_SROA_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interp_fixup_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interp_fixup_pass.cpp index ad29e6a72..2ec2147d6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interp_fixup_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/interp_fixup_pass.cpp @@ -19,24 +19,15 @@ #include #include -#include "ir_builder.h" #include "source/opt/ir_context.h" #include "type_manager.h" namespace spvtools { namespace opt { - namespace { // Input Operand Indices -static const int kSpvVariableStorageClassInIdx = 0; - -// Avoid unused variable warning/error on Linux -#ifndef NDEBUG -#define USE_ASSERT(x) assert(x) -#else -#define USE_ASSERT(x) ((void)(x)) -#endif +constexpr int kSpvVariableStorageClassInIdx = 0; // Folding rule function which attempts to replace |op(OpLoad(a),...)| // by |op(a,...)|, where |op| is one of the GLSLstd450 InterpolateAt* @@ -52,12 +43,12 @@ bool ReplaceInternalInterpolate(IRContext* ctx, Instruction* inst, uint32_t op1_id = inst->GetSingleWordInOperand(2); Instruction* load_inst = ctx->get_def_use_mgr()->GetDef(op1_id); - if (load_inst->opcode() != SpvOpLoad) return false; + if (load_inst->opcode() != spv::Op::OpLoad) return false; Instruction* base_inst = load_inst->GetBaseAddress(); - USE_ASSERT(base_inst->opcode() == SpvOpVariable && - base_inst->GetSingleWordInOperand(kSpvVariableStorageClassInIdx) == - SpvStorageClassInput && + USE_ASSERT(base_inst->opcode() == spv::Op::OpVariable && + spv::StorageClass(base_inst->GetSingleWordInOperand( + kSpvVariableStorageClassInIdx)) == spv::StorageClass::Input && "unexpected interpolant in InterpolateAt*"); uint32_t ptr_id = load_inst->GetSingleWordInOperand(0); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.cpp new file mode 100644 index 000000000..642e2d23a --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.cpp @@ -0,0 +1,493 @@ +// Copyright (c) 2023 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/invocation_interlock_placement_pass.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "source/enum_set.h" +#include "source/enum_string_mapping.h" +#include "source/opt/ir_context.h" +#include "source/opt/reflect.h" +#include "source/spirv_target_env.h" +#include "source/util/string_utils.h" + +namespace spvtools { +namespace opt { + +namespace { +constexpr uint32_t kEntryPointExecutionModelInIdx = 0; +constexpr uint32_t kEntryPointFunctionIdInIdx = 1; +constexpr uint32_t kFunctionCallFunctionIdInIdx = 0; +} // namespace + +bool InvocationInterlockPlacementPass::hasSingleNextBlock(uint32_t block_id, + bool reverse_cfg) { + if (reverse_cfg) { + // We are traversing forward, so check whether there is a single successor. + BasicBlock* block = cfg()->block(block_id); + + switch (block->tail()->opcode()) { + case spv::Op::OpBranchConditional: + return false; + case spv::Op::OpSwitch: + return block->tail()->NumInOperandWords() == 1; + default: + return !block->tail()->IsReturnOrAbort(); + } + } else { + // We are traversing backward, so check whether there is a single + // predecessor. + return cfg()->preds(block_id).size() == 1; + } +} + +void InvocationInterlockPlacementPass::forEachNext( + uint32_t block_id, bool reverse_cfg, std::function f) { + if (reverse_cfg) { + BasicBlock* block = cfg()->block(block_id); + + block->ForEachSuccessorLabel([f](uint32_t succ_id) { f(succ_id); }); + } else { + for (uint32_t pred_id : cfg()->preds(block_id)) { + f(pred_id); + } + } +} + +void InvocationInterlockPlacementPass::addInstructionAtBlockBoundary( + BasicBlock* block, spv::Op opcode, bool at_end) { + if (at_end) { + assert(block->begin()->opcode() != spv::Op::OpPhi && + "addInstructionAtBlockBoundary expects to be called with at_end == " + "true only if there is a single successor to block"); + // Insert a begin instruction at the end of the block. + Instruction* begin_inst = new Instruction(context(), opcode); + begin_inst->InsertAfter(&*--block->tail()); + } else { + assert(block->begin()->opcode() != spv::Op::OpPhi && + "addInstructionAtBlockBoundary expects to be called with at_end == " + "false only if there is a single predecessor to block"); + // Insert an end instruction at the beginning of the block. + Instruction* end_inst = new Instruction(context(), opcode); + end_inst->InsertBefore(&*block->begin()); + } +} + +bool InvocationInterlockPlacementPass::killDuplicateBegin(BasicBlock* block) { + bool found = false; + + return context()->KillInstructionIf( + block->begin(), block->end(), [&found](Instruction* inst) { + if (inst->opcode() == spv::Op::OpBeginInvocationInterlockEXT) { + if (found) { + return true; + } + found = true; + } + return false; + }); +} + +bool InvocationInterlockPlacementPass::killDuplicateEnd(BasicBlock* block) { + std::vector to_kill; + block->ForEachInst([&to_kill](Instruction* inst) { + if (inst->opcode() == spv::Op::OpEndInvocationInterlockEXT) { + to_kill.push_back(inst); + } + }); + + if (to_kill.size() <= 1) { + return false; + } + + to_kill.pop_back(); + + for (Instruction* inst : to_kill) { + context()->KillInst(inst); + } + + return true; +} + +void InvocationInterlockPlacementPass::recordBeginOrEndInFunction( + Function* func) { + if (extracted_functions_.count(func)) { + return; + } + + bool had_begin = false; + bool had_end = false; + + func->ForEachInst([this, &had_begin, &had_end](Instruction* inst) { + switch (inst->opcode()) { + case spv::Op::OpBeginInvocationInterlockEXT: + had_begin = true; + break; + case spv::Op::OpEndInvocationInterlockEXT: + had_end = true; + break; + case spv::Op::OpFunctionCall: { + uint32_t function_id = + inst->GetSingleWordInOperand(kFunctionCallFunctionIdInIdx); + Function* inner_func = context()->GetFunction(function_id); + recordBeginOrEndInFunction(inner_func); + ExtractionResult result = extracted_functions_[inner_func]; + had_begin = had_begin || result.had_begin; + had_end = had_end || result.had_end; + break; + } + default: + break; + } + }); + + ExtractionResult result = {had_begin, had_end}; + extracted_functions_[func] = result; +} + +bool InvocationInterlockPlacementPass:: + removeBeginAndEndInstructionsFromFunction(Function* func) { + bool modified = false; + func->ForEachInst([this, &modified](Instruction* inst) { + switch (inst->opcode()) { + case spv::Op::OpBeginInvocationInterlockEXT: + context()->KillInst(inst); + modified = true; + break; + case spv::Op::OpEndInvocationInterlockEXT: + context()->KillInst(inst); + modified = true; + break; + default: + break; + } + }); + return modified; +} + +bool InvocationInterlockPlacementPass::extractInstructionsFromCalls( + std::vector blocks) { + bool modified = false; + + for (BasicBlock* block : blocks) { + block->ForEachInst([this, &modified](Instruction* inst) { + if (inst->opcode() == spv::Op::OpFunctionCall) { + uint32_t function_id = + inst->GetSingleWordInOperand(kFunctionCallFunctionIdInIdx); + Function* func = context()->GetFunction(function_id); + ExtractionResult result = extracted_functions_[func]; + + if (result.had_begin) { + Instruction* new_inst = new Instruction( + context(), spv::Op::OpBeginInvocationInterlockEXT); + new_inst->InsertBefore(inst); + modified = true; + } + if (result.had_end) { + Instruction* new_inst = + new Instruction(context(), spv::Op::OpEndInvocationInterlockEXT); + new_inst->InsertAfter(inst); + modified = true; + } + } + }); + } + return modified; +} + +void InvocationInterlockPlacementPass::recordExistingBeginAndEndBlock( + std::vector blocks) { + for (BasicBlock* block : blocks) { + block->ForEachInst([this, block](Instruction* inst) { + switch (inst->opcode()) { + case spv::Op::OpBeginInvocationInterlockEXT: + begin_.insert(block->id()); + break; + case spv::Op::OpEndInvocationInterlockEXT: + end_.insert(block->id()); + break; + default: + break; + } + }); + } +} + +InvocationInterlockPlacementPass::BlockSet +InvocationInterlockPlacementPass::computeReachableBlocks( + BlockSet& previous_inside, const BlockSet& starting_nodes, + bool reverse_cfg) { + BlockSet inside = starting_nodes; + + std::deque worklist; + worklist.insert(worklist.begin(), starting_nodes.begin(), + starting_nodes.end()); + + while (!worklist.empty()) { + uint32_t block_id = worklist.front(); + worklist.pop_front(); + + forEachNext(block_id, reverse_cfg, + [&inside, &previous_inside, &worklist](uint32_t next_id) { + previous_inside.insert(next_id); + if (inside.insert(next_id).second) { + worklist.push_back(next_id); + } + }); + } + + return inside; +} + +bool InvocationInterlockPlacementPass::removeUnneededInstructions( + BasicBlock* block) { + bool modified = false; + if (!predecessors_after_begin_.count(block->id()) && + after_begin_.count(block->id())) { + // None of the previous blocks are in the critical section, but this block + // is. This can only happen if this block already has at least one begin + // instruction. Leave the first begin instruction, and remove any others. + modified |= killDuplicateBegin(block); + } else if (predecessors_after_begin_.count(block->id())) { + // At least one previous block is in the critical section; remove all + // begin instructions in this block. + modified |= context()->KillInstructionIf( + block->begin(), block->end(), [](Instruction* inst) { + return inst->opcode() == spv::Op::OpBeginInvocationInterlockEXT; + }); + } + + if (!successors_before_end_.count(block->id()) && + before_end_.count(block->id())) { + // Same as above + modified |= killDuplicateEnd(block); + } else if (successors_before_end_.count(block->id())) { + modified |= context()->KillInstructionIf( + block->begin(), block->end(), [](Instruction* inst) { + return inst->opcode() == spv::Op::OpEndInvocationInterlockEXT; + }); + } + return modified; +} + +BasicBlock* InvocationInterlockPlacementPass::splitEdge(BasicBlock* block, + uint32_t succ_id) { + // Create a new block to replace the critical edge. + auto new_succ_temp = MakeUnique( + MakeUnique(context(), spv::Op::OpLabel, 0, TakeNextId(), + std::initializer_list{})); + auto* new_succ = new_succ_temp.get(); + + // Insert the new block into the function. + block->GetParent()->InsertBasicBlockAfter(std::move(new_succ_temp), block); + + new_succ->AddInstruction(MakeUnique( + context(), spv::Op::OpBranch, 0, 0, + std::initializer_list{ + Operand(spv_operand_type_t::SPV_OPERAND_TYPE_ID, {succ_id})})); + + assert(block->tail()->opcode() == spv::Op::OpBranchConditional || + block->tail()->opcode() == spv::Op::OpSwitch); + + // Update the first branch to successor to instead branch to + // the new successor. If there are multiple edges, we arbitrarily choose the + // first time it appears in the list. The other edges to `succ_id` will have + // to be split by another call to `splitEdge`. + block->tail()->WhileEachInId([new_succ, succ_id](uint32_t* branch_id) { + if (*branch_id == succ_id) { + *branch_id = new_succ->id(); + return false; + } + return true; + }); + + return new_succ; +} + +bool InvocationInterlockPlacementPass::placeInstructionsForEdge( + BasicBlock* block, uint32_t next_id, BlockSet& inside, + BlockSet& previous_inside, spv::Op opcode, bool reverse_cfg) { + bool modified = false; + + if (previous_inside.count(next_id) && !inside.count(block->id())) { + // This block is not in the critical section but the next has at least one + // other previous block that is, so this block should be enter it as well. + // We need to add begin or end instructions to the edge. + + modified = true; + + if (hasSingleNextBlock(block->id(), reverse_cfg)) { + // This is the only next block. + + // Additionally, because `next_id` is in `previous_inside`, we know that + // `next_id` has at least one previous block in `inside`. And because + // 'block` is not in `inside`, that means the `next_id` has to have at + // least one other previous block in `inside`. + + // This is solely for a debug assertion. It is essentially recomputing the + // value of `previous_inside` to verify that it was computed correctly + // such that the above statement is true. + bool next_has_previous_inside = false; + // By passing !reverse_cfg to forEachNext, we are actually iterating over + // the previous blocks. + forEachNext(next_id, !reverse_cfg, + [&next_has_previous_inside, inside](uint32_t previous_id) { + if (inside.count(previous_id)) { + next_has_previous_inside = true; + } + }); + assert(next_has_previous_inside && + "`previous_inside` must be the set of blocks with at least one " + "previous block in `inside`"); + + addInstructionAtBlockBoundary(block, opcode, reverse_cfg); + } else { + // This block has multiple next blocks. Split the edge and insert the + // instruction in the new next block. + BasicBlock* new_branch; + if (reverse_cfg) { + new_branch = splitEdge(block, next_id); + } else { + new_branch = splitEdge(cfg()->block(next_id), block->id()); + } + + auto inst = new Instruction(context(), opcode); + inst->InsertBefore(&*new_branch->tail()); + } + } + + return modified; +} + +bool InvocationInterlockPlacementPass::placeInstructions(BasicBlock* block) { + bool modified = false; + + block->ForEachSuccessorLabel([this, block, &modified](uint32_t succ_id) { + modified |= placeInstructionsForEdge( + block, succ_id, after_begin_, predecessors_after_begin_, + spv::Op::OpBeginInvocationInterlockEXT, /* reverse_cfg= */ true); + modified |= placeInstructionsForEdge(cfg()->block(succ_id), block->id(), + before_end_, successors_before_end_, + spv::Op::OpEndInvocationInterlockEXT, + /* reverse_cfg= */ false); + }); + + return modified; +} + +bool InvocationInterlockPlacementPass::processFragmentShaderEntry( + Function* entry_func) { + bool modified = false; + + // Save the original order of blocks in the function, so we don't iterate over + // newly-added blocks. + std::vector original_blocks; + for (auto bi = entry_func->begin(); bi != entry_func->end(); ++bi) { + original_blocks.push_back(&*bi); + } + + modified |= extractInstructionsFromCalls(original_blocks); + recordExistingBeginAndEndBlock(original_blocks); + + after_begin_ = computeReachableBlocks(predecessors_after_begin_, begin_, + /* reverse_cfg= */ true); + before_end_ = computeReachableBlocks(successors_before_end_, end_, + /* reverse_cfg= */ false); + + for (BasicBlock* block : original_blocks) { + modified |= removeUnneededInstructions(block); + modified |= placeInstructions(block); + } + return modified; +} + +bool InvocationInterlockPlacementPass::isFragmentShaderInterlockEnabled() { + if (!context()->get_feature_mgr()->HasExtension( + kSPV_EXT_fragment_shader_interlock)) { + return false; + } + + if (context()->get_feature_mgr()->HasCapability( + spv::Capability::FragmentShaderSampleInterlockEXT)) { + return true; + } + + if (context()->get_feature_mgr()->HasCapability( + spv::Capability::FragmentShaderPixelInterlockEXT)) { + return true; + } + + if (context()->get_feature_mgr()->HasCapability( + spv::Capability::FragmentShaderShadingRateInterlockEXT)) { + return true; + } + + return false; +} + +Pass::Status InvocationInterlockPlacementPass::Process() { + // Skip this pass if the necessary extension or capability is missing + if (!isFragmentShaderInterlockEnabled()) { + return Status::SuccessWithoutChange; + } + + bool modified = false; + + std::unordered_set entry_points; + for (Instruction& entry_inst : context()->module()->entry_points()) { + uint32_t entry_id = + entry_inst.GetSingleWordInOperand(kEntryPointFunctionIdInIdx); + entry_points.insert(context()->GetFunction(entry_id)); + } + + for (auto fi = context()->module()->begin(); fi != context()->module()->end(); + ++fi) { + Function* func = &*fi; + recordBeginOrEndInFunction(func); + if (!entry_points.count(func) && extracted_functions_.count(func)) { + modified |= removeBeginAndEndInstructionsFromFunction(func); + } + } + + for (Instruction& entry_inst : context()->module()->entry_points()) { + uint32_t entry_id = + entry_inst.GetSingleWordInOperand(kEntryPointFunctionIdInIdx); + Function* entry_func = context()->GetFunction(entry_id); + + auto execution_model = spv::ExecutionModel( + entry_inst.GetSingleWordInOperand(kEntryPointExecutionModelInIdx)); + + if (execution_model != spv::ExecutionModel::Fragment) { + continue; + } + + modified |= processFragmentShaderEntry(entry_func); + } + + return modified ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.h new file mode 100644 index 000000000..4e85be858 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/invocation_interlock_placement_pass.h @@ -0,0 +1,158 @@ +// Copyright (c) 2023 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_DEDUPE_INTERLOCK_INVOCATION_PASS_H_ +#define SOURCE_OPT_DEDUPE_INTERLOCK_INVOCATION_PASS_H_ + +#include +#include +#include +#include +#include +#include + +#include "source/enum_set.h" +#include "source/extensions.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" +#include "source/spirv_target_env.h" + +namespace spvtools { +namespace opt { + +// This pass will ensure that an entry point will only have at most one +// OpBeginInterlockInvocationEXT and one OpEndInterlockInvocationEXT, in that +// order +class InvocationInterlockPlacementPass : public Pass { + public: + InvocationInterlockPlacementPass() {} + InvocationInterlockPlacementPass(const InvocationInterlockPlacementPass&) = + delete; + InvocationInterlockPlacementPass(InvocationInterlockPlacementPass&&) = delete; + + const char* name() const override { return "dedupe-interlock-invocation"; } + Status Process() override; + + private: + using BlockSet = std::unordered_set; + + // Specifies whether a function originally had a begin or end instruction. + struct ExtractionResult { + bool had_begin : 1; + bool had_end : 2; + }; + + // Check if a block has only a single next block, depending on the directing + // that we are traversing the CFG. If reverse_cfg is true, we are walking + // forward through the CFG, and will return if the block has only one + // successor. Otherwise, we are walking backward through the CFG, and will + // return if the block has only one predecessor. + bool hasSingleNextBlock(uint32_t block_id, bool reverse_cfg); + + // Iterate over each of a block's predecessors or successors, depending on + // direction. If reverse_cfg is true, we are walking forward through the CFG, + // and need to iterate over the successors. Otherwise, we are walking backward + // through the CFG, and need to iterate over the predecessors. + void forEachNext(uint32_t block_id, bool reverse_cfg, + std::function f); + + // Add either a begin or end instruction to the edge of the basic block. If + // at_end is true, add the instruction to the end of the block; otherwise add + // the instruction to the beginning of the basic block. + void addInstructionAtBlockBoundary(BasicBlock* block, spv::Op opcode, + bool at_end); + + // Remove every OpBeginInvocationInterlockEXT instruction in block after the + // first. Returns whether any instructions were removed. + bool killDuplicateBegin(BasicBlock* block); + // Remove every OpBeginInvocationInterlockEXT instruction in block before the + // last. Returns whether any instructions were removed. + bool killDuplicateEnd(BasicBlock* block); + + // Records whether a function will potentially execute a begin or end + // instruction. + void recordBeginOrEndInFunction(Function* func); + + // Recursively removes any begin or end instructions from func and any + // function func calls. Returns whether any instructions were removed. + bool removeBeginAndEndInstructionsFromFunction(Function* func); + + // For every function call in any of the passed blocks, move any begin or end + // instructions outside of the function call. Returns whether any extractions + // occurred. + bool extractInstructionsFromCalls(std::vector blocks); + + // Finds the sets of blocks that contain OpBeginInvocationInterlockEXT and + // OpEndInvocationInterlockEXT, storing them in the member variables begin_ + // and end_ respectively. + void recordExistingBeginAndEndBlock(std::vector blocks); + + // Compute the set of blocks including or after the barrier instruction, and + // the set of blocks with any previous blocks inside the barrier instruction. + // If reverse_cfg is true, move forward through the CFG, computing + // after_begin_ and predecessors_after_begin_computing after_begin_ and + // predecessors_after_begin_, otherwise, move backward through the CFG, + // computing before_end_ and successors_before_end_. + BlockSet computeReachableBlocks(BlockSet& in_set, + const BlockSet& starting_nodes, + bool reverse_cfg); + + // Remove unneeded begin and end instructions in block. + bool removeUnneededInstructions(BasicBlock* block); + + // Given a block which branches to multiple successors, and a specific + // successor, creates a new empty block, and update the branch instruction to + // branch to the new block instead. + BasicBlock* splitEdge(BasicBlock* block, uint32_t succ_id); + + // For the edge from block to next_id, places a begin or end instruction on + // the edge, based on the direction we are walking the CFG, specified in + // reverse_cfg. + bool placeInstructionsForEdge(BasicBlock* block, uint32_t next_id, + BlockSet& inside, BlockSet& previous_inside, + spv::Op opcode, bool reverse_cfg); + // Calls placeInstructionsForEdge for each edge in block. + bool placeInstructions(BasicBlock* block); + + // Processes a single fragment shader entry function. + bool processFragmentShaderEntry(Function* entry_func); + + // Returns whether the module has the SPV_EXT_fragment_shader_interlock + // extension and one of the FragmentShader*InterlockEXT capabilities. + bool isFragmentShaderInterlockEnabled(); + + // Maps a function to whether that function originally held a begin or end + // instruction. + std::unordered_map extracted_functions_; + + // The set of blocks which have an OpBeginInvocationInterlockEXT instruction. + BlockSet begin_; + // The set of blocks which have an OpEndInvocationInterlockEXT instruction. + BlockSet end_; + // The set of blocks which either have a begin instruction, or have a + // predecessor which has a begin instruction. + BlockSet after_begin_; + // The set of blocks which either have an end instruction, or have a successor + // which have an end instruction. + BlockSet before_end_; + // The set of blocks which have a predecessor in after_begin_. + BlockSet predecessors_after_begin_; + // The set of blocks which have a successor in before_end_. + BlockSet successors_before_end_; +}; + +} // namespace opt +} // namespace spvtools +#endif // SOURCE_OPT_DEDUPE_INTERLOCK_INVOCATION_PASS_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_builder.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_builder.h index 4433cf0d1..f3e0afcea 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_builder.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_builder.h @@ -30,7 +30,7 @@ namespace opt { // In SPIR-V, ids are encoded as uint16_t, this id is guaranteed to be always // invalid. -const uint32_t kInvalidId = std::numeric_limits::max(); +constexpr uint32_t kInvalidId = std::numeric_limits::max(); // Helper class to abstract instruction construction and insertion. // The instruction builder can preserve the following analyses (specified via @@ -58,7 +58,7 @@ class InstructionBuilder { : InstructionBuilder(context, parent_block, parent_block->end(), preserved_analyses) {} - Instruction* AddNullaryOp(uint32_t type_id, SpvOp opcode) { + Instruction* AddNullaryOp(uint32_t type_id, spv::Op opcode) { uint32_t result_id = 0; if (type_id != 0) { result_id = GetContext()->TakeNextId(); @@ -71,7 +71,7 @@ class InstructionBuilder { return AddInstruction(std::move(new_inst)); } - Instruction* AddUnaryOp(uint32_t type_id, SpvOp opcode, uint32_t operand1) { + Instruction* AddUnaryOp(uint32_t type_id, spv::Op opcode, uint32_t operand1) { uint32_t result_id = 0; if (type_id != 0) { result_id = GetContext()->TakeNextId(); @@ -85,7 +85,7 @@ class InstructionBuilder { return AddInstruction(std::move(newUnOp)); } - Instruction* AddBinaryOp(uint32_t type_id, SpvOp opcode, uint32_t operand1, + Instruction* AddBinaryOp(uint32_t type_id, spv::Op opcode, uint32_t operand1, uint32_t operand2) { uint32_t result_id = 0; if (type_id != 0) { @@ -95,13 +95,14 @@ class InstructionBuilder { } } std::unique_ptr newBinOp(new Instruction( - GetContext(), opcode, type_id, opcode == SpvOpStore ? 0 : result_id, + GetContext(), opcode, type_id, + opcode == spv::Op::OpStore ? 0 : result_id, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {operand1}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {operand2}}})); return AddInstruction(std::move(newBinOp)); } - Instruction* AddTernaryOp(uint32_t type_id, SpvOp opcode, uint32_t operand1, + Instruction* AddTernaryOp(uint32_t type_id, spv::Op opcode, uint32_t operand1, uint32_t operand2, uint32_t operand3) { uint32_t result_id = 0; if (type_id != 0) { @@ -118,7 +119,7 @@ class InstructionBuilder { return AddInstruction(std::move(newTernOp)); } - Instruction* AddQuadOp(uint32_t type_id, SpvOp opcode, uint32_t operand1, + Instruction* AddQuadOp(uint32_t type_id, spv::Op opcode, uint32_t operand1, uint32_t operand2, uint32_t operand3, uint32_t operand4) { uint32_t result_id = 0; @@ -137,7 +138,7 @@ class InstructionBuilder { return AddInstruction(std::move(newQuadOp)); } - Instruction* AddIdLiteralOp(uint32_t type_id, SpvOp opcode, uint32_t id, + Instruction* AddIdLiteralOp(uint32_t type_id, spv::Op opcode, uint32_t id, uint32_t uliteral) { uint32_t result_id = 0; if (type_id != 0) { @@ -157,7 +158,7 @@ class InstructionBuilder { // |typid| must be the id of the instruction's type. // |operands| must be a sequence of operand ids. // Use |result| for the result id if non-zero. - Instruction* AddNaryOp(uint32_t type_id, SpvOp opcode, + Instruction* AddNaryOp(uint32_t type_id, spv::Op opcode, const std::vector& operands, uint32_t result = 0) { std::vector ops; @@ -174,10 +175,10 @@ class InstructionBuilder { // Creates a new selection merge instruction. // The id |merge_id| is the merge basic block id. Instruction* AddSelectionMerge( - uint32_t merge_id, - uint32_t selection_control = SpvSelectionControlMaskNone) { + uint32_t merge_id, uint32_t selection_control = static_cast( + spv::SelectionControlMask::MaskNone)) { std::unique_ptr new_branch_merge(new Instruction( - GetContext(), SpvOpSelectionMerge, 0, 0, + GetContext(), spv::Op::OpSelectionMerge, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {merge_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_SELECTION_CONTROL, {selection_control}}})); @@ -189,9 +190,10 @@ class InstructionBuilder { // |continue_id| is the id of the continue block. // |loop_control| are the loop control flags to be added to the instruction. Instruction* AddLoopMerge(uint32_t merge_id, uint32_t continue_id, - uint32_t loop_control = SpvLoopControlMaskNone) { + uint32_t loop_control = static_cast( + spv::LoopControlMask::MaskNone)) { std::unique_ptr new_branch_merge(new Instruction( - GetContext(), SpvOpLoopMerge, 0, 0, + GetContext(), spv::Op::OpLoopMerge, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {merge_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {continue_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_LOOP_CONTROL, {loop_control}}})); @@ -203,7 +205,7 @@ class InstructionBuilder { // well formed. Instruction* AddBranch(uint32_t label_id) { std::unique_ptr new_branch(new Instruction( - GetContext(), SpvOpBranch, 0, 0, + GetContext(), spv::Op::OpBranch, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {label_id}}})); return AddInstruction(std::move(new_branch)); } @@ -226,12 +228,13 @@ class InstructionBuilder { Instruction* AddConditionalBranch( uint32_t cond_id, uint32_t true_id, uint32_t false_id, uint32_t merge_id = kInvalidId, - uint32_t selection_control = SpvSelectionControlMaskNone) { + uint32_t selection_control = + static_cast(spv::SelectionControlMask::MaskNone)) { if (merge_id != kInvalidId) { AddSelectionMerge(merge_id, selection_control); } std::unique_ptr new_branch(new Instruction( - GetContext(), SpvOpBranchConditional, 0, 0, + GetContext(), spv::Op::OpBranchConditional, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {cond_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {true_id}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {false_id}}})); @@ -255,7 +258,8 @@ class InstructionBuilder { uint32_t selector_id, uint32_t default_id, const std::vector>& targets, uint32_t merge_id = kInvalidId, - uint32_t selection_control = SpvSelectionControlMaskNone) { + uint32_t selection_control = + static_cast(spv::SelectionControlMask::MaskNone)) { if (merge_id != kInvalidId) { AddSelectionMerge(merge_id, selection_control); } @@ -272,7 +276,7 @@ class InstructionBuilder { Operand{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {target.second}}); } std::unique_ptr new_switch( - new Instruction(GetContext(), SpvOpSwitch, 0, 0, operands)); + new Instruction(GetContext(), spv::Op::OpSwitch, 0, 0, operands)); return AddInstruction(std::move(new_switch)); } @@ -283,7 +287,7 @@ class InstructionBuilder { Instruction* AddPhi(uint32_t type, const std::vector& incomings, uint32_t result = 0) { assert(incomings.size() % 2 == 0 && "A sequence of pairs is expected"); - return AddNaryOp(type, SpvOpPhi, incomings, result); + return AddNaryOp(type, spv::Op::OpPhi, incomings, result); } // Creates an addition instruction. @@ -294,7 +298,7 @@ class InstructionBuilder { Instruction* AddIAdd(uint32_t type, uint32_t op1, uint32_t op2) { // TODO(1841): Handle id overflow. std::unique_ptr inst(new Instruction( - GetContext(), SpvOpIAdd, type, GetContext()->TakeNextId(), + GetContext(), spv::Op::OpIAdd, type, GetContext()->TakeNextId(), {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); return AddInstruction(std::move(inst)); } @@ -308,7 +312,7 @@ class InstructionBuilder { uint32_t type = GetContext()->get_type_mgr()->GetId(&bool_type); // TODO(1841): Handle id overflow. std::unique_ptr inst(new Instruction( - GetContext(), SpvOpULessThan, type, GetContext()->TakeNextId(), + GetContext(), spv::Op::OpULessThan, type, GetContext()->TakeNextId(), {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); return AddInstruction(std::move(inst)); } @@ -322,7 +326,7 @@ class InstructionBuilder { uint32_t type = GetContext()->get_type_mgr()->GetId(&bool_type); // TODO(1841): Handle id overflow. std::unique_ptr inst(new Instruction( - GetContext(), SpvOpSLessThan, type, GetContext()->TakeNextId(), + GetContext(), spv::Op::OpSLessThan, type, GetContext()->TakeNextId(), {{SPV_OPERAND_TYPE_ID, {op1}}, {SPV_OPERAND_TYPE_ID, {op2}}})); return AddInstruction(std::move(inst)); } @@ -352,7 +356,7 @@ class InstructionBuilder { uint32_t false_value) { // TODO(1841): Handle id overflow. std::unique_ptr select(new Instruction( - GetContext(), SpvOpSelect, type, GetContext()->TakeNextId(), + GetContext(), spv::Op::OpSelect, type, GetContext()->TakeNextId(), std::initializer_list{{SPV_OPERAND_TYPE_ID, {cond}}, {SPV_OPERAND_TYPE_ID, {true_value}}, {SPV_OPERAND_TYPE_ID, {false_value}}})); @@ -378,7 +382,7 @@ class InstructionBuilder { } // TODO(1841): Handle id overflow. std::unique_ptr construct( - new Instruction(GetContext(), SpvOpCompositeConstruct, type, + new Instruction(GetContext(), spv::Op::OpCompositeConstruct, type, GetContext()->TakeNextId(), ops)); return AddInstruction(std::move(construct)); } @@ -436,6 +440,22 @@ class InstructionBuilder { return GetContext()->get_constant_mgr()->GetDefiningInstruction(constant); } + Instruction* GetBoolConstant(bool value) { + analysis::Bool type; + uint32_t type_id = GetContext()->get_type_mgr()->GetTypeInstruction(&type); + analysis::Type* rebuilt_type = + GetContext()->get_type_mgr()->GetType(type_id); + uint32_t word = value; + const analysis::Constant* constant = + GetContext()->get_constant_mgr()->GetConstant(rebuilt_type, {word}); + return GetContext()->get_constant_mgr()->GetDefiningInstruction(constant); + } + + uint32_t GetBoolConstantId(bool value) { + Instruction* inst = GetBoolConstant(value); + return (inst != nullptr ? inst->result_id() : 0); + } + Instruction* AddCompositeExtract(uint32_t type, uint32_t id_of_composite, const std::vector& index_list) { std::vector operands; @@ -447,7 +467,7 @@ class InstructionBuilder { // TODO(1841): Handle id overflow. std::unique_ptr new_inst( - new Instruction(GetContext(), SpvOpCompositeExtract, type, + new Instruction(GetContext(), spv::Op::OpCompositeExtract, type, GetContext()->TakeNextId(), operands)); return AddInstruction(std::move(new_inst)); } @@ -455,7 +475,7 @@ class InstructionBuilder { // Creates an unreachable instruction. Instruction* AddUnreachable() { std::unique_ptr select( - new Instruction(GetContext(), SpvOpUnreachable, 0, 0, + new Instruction(GetContext(), spv::Op::OpUnreachable, 0, 0, std::initializer_list{})); return AddInstruction(std::move(select)); } @@ -471,18 +491,34 @@ class InstructionBuilder { // TODO(1841): Handle id overflow. std::unique_ptr new_inst( - new Instruction(GetContext(), SpvOpAccessChain, type_id, + new Instruction(GetContext(), spv::Op::OpAccessChain, type_id, GetContext()->TakeNextId(), operands)); return AddInstruction(std::move(new_inst)); } - Instruction* AddLoad(uint32_t type_id, uint32_t base_ptr_id) { + Instruction* AddLoad(uint32_t type_id, uint32_t base_ptr_id, + uint32_t alignment = 0) { std::vector operands; operands.push_back({SPV_OPERAND_TYPE_ID, {base_ptr_id}}); + if (alignment != 0) { + operands.push_back( + {SPV_OPERAND_TYPE_MEMORY_ACCESS, + {static_cast(spv::MemoryAccessMask::Aligned)}}); + operands.push_back({SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER, {alignment}}); + } // TODO(1841): Handle id overflow. std::unique_ptr new_inst( - new Instruction(GetContext(), SpvOpLoad, type_id, + new Instruction(GetContext(), spv::Op::OpLoad, type_id, + GetContext()->TakeNextId(), operands)); + return AddInstruction(std::move(new_inst)); + } + + Instruction* AddVariable(uint32_t type_id, uint32_t storage_class) { + std::vector operands; + operands.push_back({SPV_OPERAND_TYPE_ID, {storage_class}}); + std::unique_ptr new_inst( + new Instruction(GetContext(), spv::Op::OpVariable, type_id, GetContext()->TakeNextId(), operands)); return AddInstruction(std::move(new_inst)); } @@ -493,7 +529,7 @@ class InstructionBuilder { operands.push_back({SPV_OPERAND_TYPE_ID, {obj_id}}); std::unique_ptr new_inst( - new Instruction(GetContext(), SpvOpStore, 0, 0, operands)); + new Instruction(GetContext(), spv::Op::OpStore, 0, 0, operands)); return AddInstruction(std::move(new_inst)); } @@ -509,8 +545,9 @@ class InstructionBuilder { if (result_id == 0) { return nullptr; } - std::unique_ptr new_inst(new Instruction( - GetContext(), SpvOpFunctionCall, result_type, result_id, operands)); + std::unique_ptr new_inst( + new Instruction(GetContext(), spv::Op::OpFunctionCall, result_type, + result_id, operands)); return AddInstruction(std::move(new_inst)); } @@ -529,8 +566,9 @@ class InstructionBuilder { return nullptr; } - std::unique_ptr new_inst(new Instruction( - GetContext(), SpvOpVectorShuffle, result_type, result_id, operands)); + std::unique_ptr new_inst( + new Instruction(GetContext(), spv::Op::OpVectorShuffle, result_type, + result_id, operands)); return AddInstruction(std::move(new_inst)); } @@ -551,7 +589,7 @@ class InstructionBuilder { } std::unique_ptr new_inst(new Instruction( - GetContext(), SpvOpExtInst, result_type, result_id, operands)); + GetContext(), spv::Op::OpExtInst, result_type, result_id, operands)); return AddInstruction(std::move(new_inst)); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.cpp index 789184614..d864b7c02 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.cpp @@ -19,28 +19,27 @@ #include "OpenCLDebugInfo100.h" #include "source/latest_version_glsl_std_450_header.h" #include "source/opt/log.h" -#include "source/opt/mem_pass.h" #include "source/opt/reflect.h" +namespace spvtools { +namespace opt { namespace { - -static const int kSpvDecorateTargetIdInIdx = 0; -static const int kSpvDecorateDecorationInIdx = 1; -static const int kSpvDecorateBuiltinInIdx = 2; -static const int kEntryPointInterfaceInIdx = 3; -static const int kEntryPointFunctionIdInIdx = 1; +constexpr int kSpvDecorateTargetIdInIdx = 0; +constexpr int kSpvDecorateDecorationInIdx = 1; +constexpr int kSpvDecorateBuiltinInIdx = 2; +constexpr int kEntryPointInterfaceInIdx = 3; +constexpr int kEntryPointFunctionIdInIdx = 1; +constexpr int kEntryPointExecutionModelInIdx = 0; // Constants for OpenCL.DebugInfo.100 / NonSemantic.Shader.DebugInfo.100 // extension instructions. -static const uint32_t kDebugFunctionOperandFunctionIndex = 13; -static const uint32_t kDebugGlobalVariableOperandVariableIndex = 11; - -} // anonymous namespace - -namespace spvtools { -namespace opt { +constexpr uint32_t kDebugFunctionOperandFunctionIndex = 13; +constexpr uint32_t kDebugGlobalVariableOperandVariableIndex = 11; +} // namespace void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) { + set = Analysis(set & ~valid_analyses_); + if (set & kAnalysisDefUse) { BuildDefUseManager(); } @@ -89,6 +88,9 @@ void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) { if (set & kAnalysisDebugInfo) { BuildDebugInfoManager(); } + if (set & kAnalysisLiveness) { + BuildLivenessManager(); + } } void IRContext::InvalidateAnalysesExceptFor( @@ -106,7 +108,7 @@ void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) { analyses_to_invalidate |= kAnalysisDebugInfo; } - // The dominator analysis hold the psuedo entry and exit nodes from the CFG. + // The dominator analysis hold the pseudo entry and exit nodes from the CFG. // Also if the CFG change the dominators many changed as well, so the // dominator analysis should be invalidated as well. if (analyses_to_invalidate & kAnalysisCFG) { @@ -150,6 +152,9 @@ void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) { if (analyses_to_invalidate & kAnalysisConstants) { constant_mgr_.reset(nullptr); } + if (analyses_to_invalidate & kAnalysisLiveness) { + liveness_mgr_.reset(nullptr); + } if (analyses_to_invalidate & kAnalysisTypes) { type_mgr_.reset(nullptr); } @@ -193,7 +198,8 @@ Instruction* IRContext::KillInst(Instruction* inst) { if (constant_mgr_ && IsConstantInst(inst->opcode())) { constant_mgr_->RemoveId(inst->result_id()); } - if (inst->opcode() == SpvOpCapability || inst->opcode() == SpvOpExtension) { + if (inst->opcode() == spv::Op::OpCapability || + inst->opcode() == spv::Op::OpExtension) { // We reset the feature manager, instead of updating it, because it is just // as much work. We would have to remove all capabilities implied by this // capability that are not also implied by the remaining OpCapability @@ -217,6 +223,28 @@ Instruction* IRContext::KillInst(Instruction* inst) { return next_instruction; } +bool IRContext::KillInstructionIf(Module::inst_iterator begin, + Module::inst_iterator end, + std::function condition) { + bool removed = false; + for (auto it = begin; it != end;) { + if (!condition(&*it)) { + ++it; + continue; + } + + removed = true; + // `it` is an iterator on an intrusive list. Next is invalidated on the + // current node when an instruction is killed. The iterator must be moved + // forward before deleting the node. + auto instruction = &*it; + ++it; + KillInst(instruction); + } + + return removed; +} + void IRContext::CollectNonSemanticTree( Instruction* inst, std::unordered_set* to_kill) { if (!inst->HasResultId()) return; @@ -248,6 +276,36 @@ bool IRContext::KillDef(uint32_t id) { return false; } +bool IRContext::RemoveCapability(spv::Capability capability) { + const bool removed = KillInstructionIf( + module()->capability_begin(), module()->capability_end(), + [capability](Instruction* inst) { + return static_cast(inst->GetSingleWordOperand(0)) == + capability; + }); + + if (removed && feature_mgr_ != nullptr) { + feature_mgr_->RemoveCapability(capability); + } + + return removed; +} + +bool IRContext::RemoveExtension(Extension extension) { + const std::string_view extensionName = ExtensionToString(extension); + const bool removed = KillInstructionIf( + module()->extension_begin(), module()->extension_end(), + [&extensionName](Instruction* inst) { + return inst->GetOperand(0).AsString() == extensionName; + }); + + if (removed && feature_mgr_ != nullptr) { + feature_mgr_->RemoveExtension(extension); + } + + return removed; +} + bool IRContext::ReplaceAllUsesWith(uint32_t before, uint32_t after) { return ReplaceAllUsesWithPredicate(before, after, [](Instruction*) { return true; }); @@ -396,8 +454,8 @@ void IRContext::AnalyzeUses(Instruction* inst) { if (AreAnalysesValid(kAnalysisDebugInfo)) { get_debug_info_mgr()->AnalyzeDebugInst(inst); } - if (id_to_name_ && - (inst->opcode() == SpvOpName || inst->opcode() == SpvOpMemberName)) { + if (id_to_name_ && (inst->opcode() == spv::Op::OpName || + inst->opcode() == spv::Op::OpMemberName)) { id_to_name_->insert({inst->GetSingleWordInOperand(0), inst}); } } @@ -425,7 +483,7 @@ void IRContext::KillOperandFromDebugInstructions(Instruction* inst) { const auto opcode = inst->opcode(); const uint32_t id = inst->result_id(); // Kill id of OpFunction from DebugFunction. - if (opcode == SpvOpFunction) { + if (opcode == spv::Op::OpFunction) { for (auto it = module()->ext_inst_debuginfo_begin(); it != module()->ext_inst_debuginfo_end(); ++it) { if (it->GetOpenCL100DebugOpcode() != OpenCLDebugInfo100DebugFunction) @@ -439,7 +497,7 @@ void IRContext::KillOperandFromDebugInstructions(Instruction* inst) { } } // Kill id of OpVariable for global variable from DebugGlobalVariable. - if (opcode == SpvOpVariable || IsConstantInst(opcode)) { + if (opcode == spv::Op::OpVariable || IsConstantInst(opcode)) { for (auto it = module()->ext_inst_debuginfo_begin(); it != module()->ext_inst_debuginfo_end(); ++it) { if (it->GetCommonDebugOpcode() != CommonDebugInfoDebugGlobalVariable) @@ -455,255 +513,259 @@ void IRContext::KillOperandFromDebugInstructions(Instruction* inst) { } void IRContext::AddCombinatorsForCapability(uint32_t capability) { - if (capability == SpvCapabilityShader) { - combinator_ops_[0].insert({SpvOpNop, - SpvOpUndef, - SpvOpConstant, - SpvOpConstantTrue, - SpvOpConstantFalse, - SpvOpConstantComposite, - SpvOpConstantSampler, - SpvOpConstantNull, - SpvOpTypeVoid, - SpvOpTypeBool, - SpvOpTypeInt, - SpvOpTypeFloat, - SpvOpTypeVector, - SpvOpTypeMatrix, - SpvOpTypeImage, - SpvOpTypeSampler, - SpvOpTypeSampledImage, - SpvOpTypeAccelerationStructureNV, - SpvOpTypeAccelerationStructureKHR, - SpvOpTypeRayQueryKHR, - SpvOpTypeArray, - SpvOpTypeRuntimeArray, - SpvOpTypeStruct, - SpvOpTypeOpaque, - SpvOpTypePointer, - SpvOpTypeFunction, - SpvOpTypeEvent, - SpvOpTypeDeviceEvent, - SpvOpTypeReserveId, - SpvOpTypeQueue, - SpvOpTypePipe, - SpvOpTypeForwardPointer, - SpvOpVariable, - SpvOpImageTexelPointer, - SpvOpLoad, - SpvOpAccessChain, - SpvOpInBoundsAccessChain, - SpvOpArrayLength, - SpvOpVectorExtractDynamic, - SpvOpVectorInsertDynamic, - SpvOpVectorShuffle, - SpvOpCompositeConstruct, - SpvOpCompositeExtract, - SpvOpCompositeInsert, - SpvOpCopyObject, - SpvOpTranspose, - SpvOpSampledImage, - SpvOpImageSampleImplicitLod, - SpvOpImageSampleExplicitLod, - SpvOpImageSampleDrefImplicitLod, - SpvOpImageSampleDrefExplicitLod, - SpvOpImageSampleProjImplicitLod, - SpvOpImageSampleProjExplicitLod, - SpvOpImageSampleProjDrefImplicitLod, - SpvOpImageSampleProjDrefExplicitLod, - SpvOpImageFetch, - SpvOpImageGather, - SpvOpImageDrefGather, - SpvOpImageRead, - SpvOpImage, - SpvOpImageQueryFormat, - SpvOpImageQueryOrder, - SpvOpImageQuerySizeLod, - SpvOpImageQuerySize, - SpvOpImageQueryLevels, - SpvOpImageQuerySamples, - SpvOpConvertFToU, - SpvOpConvertFToS, - SpvOpConvertSToF, - SpvOpConvertUToF, - SpvOpUConvert, - SpvOpSConvert, - SpvOpFConvert, - SpvOpQuantizeToF16, - SpvOpBitcast, - SpvOpSNegate, - SpvOpFNegate, - SpvOpIAdd, - SpvOpFAdd, - SpvOpISub, - SpvOpFSub, - SpvOpIMul, - SpvOpFMul, - SpvOpUDiv, - SpvOpSDiv, - SpvOpFDiv, - SpvOpUMod, - SpvOpSRem, - SpvOpSMod, - SpvOpFRem, - SpvOpFMod, - SpvOpVectorTimesScalar, - SpvOpMatrixTimesScalar, - SpvOpVectorTimesMatrix, - SpvOpMatrixTimesVector, - SpvOpMatrixTimesMatrix, - SpvOpOuterProduct, - SpvOpDot, - SpvOpIAddCarry, - SpvOpISubBorrow, - SpvOpUMulExtended, - SpvOpSMulExtended, - SpvOpAny, - SpvOpAll, - SpvOpIsNan, - SpvOpIsInf, - SpvOpLogicalEqual, - SpvOpLogicalNotEqual, - SpvOpLogicalOr, - SpvOpLogicalAnd, - SpvOpLogicalNot, - SpvOpSelect, - SpvOpIEqual, - SpvOpINotEqual, - SpvOpUGreaterThan, - SpvOpSGreaterThan, - SpvOpUGreaterThanEqual, - SpvOpSGreaterThanEqual, - SpvOpULessThan, - SpvOpSLessThan, - SpvOpULessThanEqual, - SpvOpSLessThanEqual, - SpvOpFOrdEqual, - SpvOpFUnordEqual, - SpvOpFOrdNotEqual, - SpvOpFUnordNotEqual, - SpvOpFOrdLessThan, - SpvOpFUnordLessThan, - SpvOpFOrdGreaterThan, - SpvOpFUnordGreaterThan, - SpvOpFOrdLessThanEqual, - SpvOpFUnordLessThanEqual, - SpvOpFOrdGreaterThanEqual, - SpvOpFUnordGreaterThanEqual, - SpvOpShiftRightLogical, - SpvOpShiftRightArithmetic, - SpvOpShiftLeftLogical, - SpvOpBitwiseOr, - SpvOpBitwiseXor, - SpvOpBitwiseAnd, - SpvOpNot, - SpvOpBitFieldInsert, - SpvOpBitFieldSExtract, - SpvOpBitFieldUExtract, - SpvOpBitReverse, - SpvOpBitCount, - SpvOpPhi, - SpvOpImageSparseSampleImplicitLod, - SpvOpImageSparseSampleExplicitLod, - SpvOpImageSparseSampleDrefImplicitLod, - SpvOpImageSparseSampleDrefExplicitLod, - SpvOpImageSparseSampleProjImplicitLod, - SpvOpImageSparseSampleProjExplicitLod, - SpvOpImageSparseSampleProjDrefImplicitLod, - SpvOpImageSparseSampleProjDrefExplicitLod, - SpvOpImageSparseFetch, - SpvOpImageSparseGather, - SpvOpImageSparseDrefGather, - SpvOpImageSparseTexelsResident, - SpvOpImageSparseRead, - SpvOpSizeOf}); + spv::Capability cap = spv::Capability(capability); + if (cap == spv::Capability::Shader) { + combinator_ops_[0].insert( + {(uint32_t)spv::Op::OpNop, + (uint32_t)spv::Op::OpUndef, + (uint32_t)spv::Op::OpConstant, + (uint32_t)spv::Op::OpConstantTrue, + (uint32_t)spv::Op::OpConstantFalse, + (uint32_t)spv::Op::OpConstantComposite, + (uint32_t)spv::Op::OpConstantSampler, + (uint32_t)spv::Op::OpConstantNull, + (uint32_t)spv::Op::OpTypeVoid, + (uint32_t)spv::Op::OpTypeBool, + (uint32_t)spv::Op::OpTypeInt, + (uint32_t)spv::Op::OpTypeFloat, + (uint32_t)spv::Op::OpTypeVector, + (uint32_t)spv::Op::OpTypeMatrix, + (uint32_t)spv::Op::OpTypeImage, + (uint32_t)spv::Op::OpTypeSampler, + (uint32_t)spv::Op::OpTypeSampledImage, + (uint32_t)spv::Op::OpTypeAccelerationStructureNV, + (uint32_t)spv::Op::OpTypeAccelerationStructureKHR, + (uint32_t)spv::Op::OpTypeRayQueryKHR, + (uint32_t)spv::Op::OpTypeHitObjectNV, + (uint32_t)spv::Op::OpTypeArray, + (uint32_t)spv::Op::OpTypeRuntimeArray, + (uint32_t)spv::Op::OpTypeStruct, + (uint32_t)spv::Op::OpTypeOpaque, + (uint32_t)spv::Op::OpTypePointer, + (uint32_t)spv::Op::OpTypeFunction, + (uint32_t)spv::Op::OpTypeEvent, + (uint32_t)spv::Op::OpTypeDeviceEvent, + (uint32_t)spv::Op::OpTypeReserveId, + (uint32_t)spv::Op::OpTypeQueue, + (uint32_t)spv::Op::OpTypePipe, + (uint32_t)spv::Op::OpTypeForwardPointer, + (uint32_t)spv::Op::OpVariable, + (uint32_t)spv::Op::OpImageTexelPointer, + (uint32_t)spv::Op::OpLoad, + (uint32_t)spv::Op::OpAccessChain, + (uint32_t)spv::Op::OpInBoundsAccessChain, + (uint32_t)spv::Op::OpArrayLength, + (uint32_t)spv::Op::OpVectorExtractDynamic, + (uint32_t)spv::Op::OpVectorInsertDynamic, + (uint32_t)spv::Op::OpVectorShuffle, + (uint32_t)spv::Op::OpCompositeConstruct, + (uint32_t)spv::Op::OpCompositeExtract, + (uint32_t)spv::Op::OpCompositeInsert, + (uint32_t)spv::Op::OpCopyObject, + (uint32_t)spv::Op::OpTranspose, + (uint32_t)spv::Op::OpSampledImage, + (uint32_t)spv::Op::OpImageSampleImplicitLod, + (uint32_t)spv::Op::OpImageSampleExplicitLod, + (uint32_t)spv::Op::OpImageSampleDrefImplicitLod, + (uint32_t)spv::Op::OpImageSampleDrefExplicitLod, + (uint32_t)spv::Op::OpImageSampleProjImplicitLod, + (uint32_t)spv::Op::OpImageSampleProjExplicitLod, + (uint32_t)spv::Op::OpImageSampleProjDrefImplicitLod, + (uint32_t)spv::Op::OpImageSampleProjDrefExplicitLod, + (uint32_t)spv::Op::OpImageFetch, + (uint32_t)spv::Op::OpImageGather, + (uint32_t)spv::Op::OpImageDrefGather, + (uint32_t)spv::Op::OpImageRead, + (uint32_t)spv::Op::OpImage, + (uint32_t)spv::Op::OpImageQueryFormat, + (uint32_t)spv::Op::OpImageQueryOrder, + (uint32_t)spv::Op::OpImageQuerySizeLod, + (uint32_t)spv::Op::OpImageQuerySize, + (uint32_t)spv::Op::OpImageQueryLevels, + (uint32_t)spv::Op::OpImageQuerySamples, + (uint32_t)spv::Op::OpConvertFToU, + (uint32_t)spv::Op::OpConvertFToS, + (uint32_t)spv::Op::OpConvertSToF, + (uint32_t)spv::Op::OpConvertUToF, + (uint32_t)spv::Op::OpUConvert, + (uint32_t)spv::Op::OpSConvert, + (uint32_t)spv::Op::OpFConvert, + (uint32_t)spv::Op::OpQuantizeToF16, + (uint32_t)spv::Op::OpBitcast, + (uint32_t)spv::Op::OpSNegate, + (uint32_t)spv::Op::OpFNegate, + (uint32_t)spv::Op::OpIAdd, + (uint32_t)spv::Op::OpFAdd, + (uint32_t)spv::Op::OpISub, + (uint32_t)spv::Op::OpFSub, + (uint32_t)spv::Op::OpIMul, + (uint32_t)spv::Op::OpFMul, + (uint32_t)spv::Op::OpUDiv, + (uint32_t)spv::Op::OpSDiv, + (uint32_t)spv::Op::OpFDiv, + (uint32_t)spv::Op::OpUMod, + (uint32_t)spv::Op::OpSRem, + (uint32_t)spv::Op::OpSMod, + (uint32_t)spv::Op::OpFRem, + (uint32_t)spv::Op::OpFMod, + (uint32_t)spv::Op::OpVectorTimesScalar, + (uint32_t)spv::Op::OpMatrixTimesScalar, + (uint32_t)spv::Op::OpVectorTimesMatrix, + (uint32_t)spv::Op::OpMatrixTimesVector, + (uint32_t)spv::Op::OpMatrixTimesMatrix, + (uint32_t)spv::Op::OpOuterProduct, + (uint32_t)spv::Op::OpDot, + (uint32_t)spv::Op::OpIAddCarry, + (uint32_t)spv::Op::OpISubBorrow, + (uint32_t)spv::Op::OpUMulExtended, + (uint32_t)spv::Op::OpSMulExtended, + (uint32_t)spv::Op::OpAny, + (uint32_t)spv::Op::OpAll, + (uint32_t)spv::Op::OpIsNan, + (uint32_t)spv::Op::OpIsInf, + (uint32_t)spv::Op::OpLogicalEqual, + (uint32_t)spv::Op::OpLogicalNotEqual, + (uint32_t)spv::Op::OpLogicalOr, + (uint32_t)spv::Op::OpLogicalAnd, + (uint32_t)spv::Op::OpLogicalNot, + (uint32_t)spv::Op::OpSelect, + (uint32_t)spv::Op::OpIEqual, + (uint32_t)spv::Op::OpINotEqual, + (uint32_t)spv::Op::OpUGreaterThan, + (uint32_t)spv::Op::OpSGreaterThan, + (uint32_t)spv::Op::OpUGreaterThanEqual, + (uint32_t)spv::Op::OpSGreaterThanEqual, + (uint32_t)spv::Op::OpULessThan, + (uint32_t)spv::Op::OpSLessThan, + (uint32_t)spv::Op::OpULessThanEqual, + (uint32_t)spv::Op::OpSLessThanEqual, + (uint32_t)spv::Op::OpFOrdEqual, + (uint32_t)spv::Op::OpFUnordEqual, + (uint32_t)spv::Op::OpFOrdNotEqual, + (uint32_t)spv::Op::OpFUnordNotEqual, + (uint32_t)spv::Op::OpFOrdLessThan, + (uint32_t)spv::Op::OpFUnordLessThan, + (uint32_t)spv::Op::OpFOrdGreaterThan, + (uint32_t)spv::Op::OpFUnordGreaterThan, + (uint32_t)spv::Op::OpFOrdLessThanEqual, + (uint32_t)spv::Op::OpFUnordLessThanEqual, + (uint32_t)spv::Op::OpFOrdGreaterThanEqual, + (uint32_t)spv::Op::OpFUnordGreaterThanEqual, + (uint32_t)spv::Op::OpShiftRightLogical, + (uint32_t)spv::Op::OpShiftRightArithmetic, + (uint32_t)spv::Op::OpShiftLeftLogical, + (uint32_t)spv::Op::OpBitwiseOr, + (uint32_t)spv::Op::OpBitwiseXor, + (uint32_t)spv::Op::OpBitwiseAnd, + (uint32_t)spv::Op::OpNot, + (uint32_t)spv::Op::OpBitFieldInsert, + (uint32_t)spv::Op::OpBitFieldSExtract, + (uint32_t)spv::Op::OpBitFieldUExtract, + (uint32_t)spv::Op::OpBitReverse, + (uint32_t)spv::Op::OpBitCount, + (uint32_t)spv::Op::OpPhi, + (uint32_t)spv::Op::OpImageSparseSampleImplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleExplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleDrefImplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleDrefExplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleProjImplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleProjExplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleProjDrefImplicitLod, + (uint32_t)spv::Op::OpImageSparseSampleProjDrefExplicitLod, + (uint32_t)spv::Op::OpImageSparseFetch, + (uint32_t)spv::Op::OpImageSparseGather, + (uint32_t)spv::Op::OpImageSparseDrefGather, + (uint32_t)spv::Op::OpImageSparseTexelsResident, + (uint32_t)spv::Op::OpImageSparseRead, + (uint32_t)spv::Op::OpSizeOf}); } } void IRContext::AddCombinatorsForExtension(Instruction* extension) { - assert(extension->opcode() == SpvOpExtInstImport && + assert(extension->opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = extension->GetInOperand(0).AsString(); if (extension_name == "GLSL.std.450") { - combinator_ops_[extension->result_id()] = {GLSLstd450Round, - GLSLstd450RoundEven, - GLSLstd450Trunc, - GLSLstd450FAbs, - GLSLstd450SAbs, - GLSLstd450FSign, - GLSLstd450SSign, - GLSLstd450Floor, - GLSLstd450Ceil, - GLSLstd450Fract, - GLSLstd450Radians, - GLSLstd450Degrees, - GLSLstd450Sin, - GLSLstd450Cos, - GLSLstd450Tan, - GLSLstd450Asin, - GLSLstd450Acos, - GLSLstd450Atan, - GLSLstd450Sinh, - GLSLstd450Cosh, - GLSLstd450Tanh, - GLSLstd450Asinh, - GLSLstd450Acosh, - GLSLstd450Atanh, - GLSLstd450Atan2, - GLSLstd450Pow, - GLSLstd450Exp, - GLSLstd450Log, - GLSLstd450Exp2, - GLSLstd450Log2, - GLSLstd450Sqrt, - GLSLstd450InverseSqrt, - GLSLstd450Determinant, - GLSLstd450MatrixInverse, - GLSLstd450ModfStruct, - GLSLstd450FMin, - GLSLstd450UMin, - GLSLstd450SMin, - GLSLstd450FMax, - GLSLstd450UMax, - GLSLstd450SMax, - GLSLstd450FClamp, - GLSLstd450UClamp, - GLSLstd450SClamp, - GLSLstd450FMix, - GLSLstd450IMix, - GLSLstd450Step, - GLSLstd450SmoothStep, - GLSLstd450Fma, - GLSLstd450FrexpStruct, - GLSLstd450Ldexp, - GLSLstd450PackSnorm4x8, - GLSLstd450PackUnorm4x8, - GLSLstd450PackSnorm2x16, - GLSLstd450PackUnorm2x16, - GLSLstd450PackHalf2x16, - GLSLstd450PackDouble2x32, - GLSLstd450UnpackSnorm2x16, - GLSLstd450UnpackUnorm2x16, - GLSLstd450UnpackHalf2x16, - GLSLstd450UnpackSnorm4x8, - GLSLstd450UnpackUnorm4x8, - GLSLstd450UnpackDouble2x32, - GLSLstd450Length, - GLSLstd450Distance, - GLSLstd450Cross, - GLSLstd450Normalize, - GLSLstd450FaceForward, - GLSLstd450Reflect, - GLSLstd450Refract, - GLSLstd450FindILsb, - GLSLstd450FindSMsb, - GLSLstd450FindUMsb, - GLSLstd450InterpolateAtCentroid, - GLSLstd450InterpolateAtSample, - GLSLstd450InterpolateAtOffset, - GLSLstd450NMin, - GLSLstd450NMax, - GLSLstd450NClamp}; + combinator_ops_[extension->result_id()] = { + (uint32_t)GLSLstd450Round, + (uint32_t)GLSLstd450RoundEven, + (uint32_t)GLSLstd450Trunc, + (uint32_t)GLSLstd450FAbs, + (uint32_t)GLSLstd450SAbs, + (uint32_t)GLSLstd450FSign, + (uint32_t)GLSLstd450SSign, + (uint32_t)GLSLstd450Floor, + (uint32_t)GLSLstd450Ceil, + (uint32_t)GLSLstd450Fract, + (uint32_t)GLSLstd450Radians, + (uint32_t)GLSLstd450Degrees, + (uint32_t)GLSLstd450Sin, + (uint32_t)GLSLstd450Cos, + (uint32_t)GLSLstd450Tan, + (uint32_t)GLSLstd450Asin, + (uint32_t)GLSLstd450Acos, + (uint32_t)GLSLstd450Atan, + (uint32_t)GLSLstd450Sinh, + (uint32_t)GLSLstd450Cosh, + (uint32_t)GLSLstd450Tanh, + (uint32_t)GLSLstd450Asinh, + (uint32_t)GLSLstd450Acosh, + (uint32_t)GLSLstd450Atanh, + (uint32_t)GLSLstd450Atan2, + (uint32_t)GLSLstd450Pow, + (uint32_t)GLSLstd450Exp, + (uint32_t)GLSLstd450Log, + (uint32_t)GLSLstd450Exp2, + (uint32_t)GLSLstd450Log2, + (uint32_t)GLSLstd450Sqrt, + (uint32_t)GLSLstd450InverseSqrt, + (uint32_t)GLSLstd450Determinant, + (uint32_t)GLSLstd450MatrixInverse, + (uint32_t)GLSLstd450ModfStruct, + (uint32_t)GLSLstd450FMin, + (uint32_t)GLSLstd450UMin, + (uint32_t)GLSLstd450SMin, + (uint32_t)GLSLstd450FMax, + (uint32_t)GLSLstd450UMax, + (uint32_t)GLSLstd450SMax, + (uint32_t)GLSLstd450FClamp, + (uint32_t)GLSLstd450UClamp, + (uint32_t)GLSLstd450SClamp, + (uint32_t)GLSLstd450FMix, + (uint32_t)GLSLstd450IMix, + (uint32_t)GLSLstd450Step, + (uint32_t)GLSLstd450SmoothStep, + (uint32_t)GLSLstd450Fma, + (uint32_t)GLSLstd450FrexpStruct, + (uint32_t)GLSLstd450Ldexp, + (uint32_t)GLSLstd450PackSnorm4x8, + (uint32_t)GLSLstd450PackUnorm4x8, + (uint32_t)GLSLstd450PackSnorm2x16, + (uint32_t)GLSLstd450PackUnorm2x16, + (uint32_t)GLSLstd450PackHalf2x16, + (uint32_t)GLSLstd450PackDouble2x32, + (uint32_t)GLSLstd450UnpackSnorm2x16, + (uint32_t)GLSLstd450UnpackUnorm2x16, + (uint32_t)GLSLstd450UnpackHalf2x16, + (uint32_t)GLSLstd450UnpackSnorm4x8, + (uint32_t)GLSLstd450UnpackUnorm4x8, + (uint32_t)GLSLstd450UnpackDouble2x32, + (uint32_t)GLSLstd450Length, + (uint32_t)GLSLstd450Distance, + (uint32_t)GLSLstd450Cross, + (uint32_t)GLSLstd450Normalize, + (uint32_t)GLSLstd450FaceForward, + (uint32_t)GLSLstd450Reflect, + (uint32_t)GLSLstd450Refract, + (uint32_t)GLSLstd450FindILsb, + (uint32_t)GLSLstd450FindSMsb, + (uint32_t)GLSLstd450FindUMsb, + (uint32_t)GLSLstd450InterpolateAtCentroid, + (uint32_t)GLSLstd450InterpolateAtSample, + (uint32_t)GLSLstd450InterpolateAtOffset, + (uint32_t)GLSLstd450NMin, + (uint32_t)GLSLstd450NMax, + (uint32_t)GLSLstd450NClamp}; } else { // Map the result id to the empty set. combinator_ops_[extension->result_id()]; @@ -711,8 +773,9 @@ void IRContext::AddCombinatorsForExtension(Instruction* extension) { } void IRContext::InitializeCombinators() { - get_feature_mgr()->GetCapabilities()->ForEach( - [this](SpvCapability cap) { AddCombinatorsForCapability(cap); }); + for (auto capability : get_feature_mgr()->GetCapabilities()) { + AddCombinatorsForCapability(uint32_t(capability)); + } for (auto& extension : module()->ext_inst_imports()) { AddCombinatorsForExtension(&extension); @@ -722,8 +785,8 @@ void IRContext::InitializeCombinators() { } void IRContext::RemoveFromIdToName(const Instruction* inst) { - if (id_to_name_ && - (inst->opcode() == SpvOpName || inst->opcode() == SpvOpMemberName)) { + if (id_to_name_ && (inst->opcode() == spv::Op::OpName || + inst->opcode() == spv::Op::OpMemberName)) { auto range = id_to_name_->equal_range(inst->GetSingleWordInOperand(0)); for (auto it = range.first; it != range.second; ++it) { if (it->second == inst) { @@ -752,15 +815,17 @@ LoopDescriptor* IRContext::GetLoopDescriptor(const Function* f) { uint32_t IRContext::FindBuiltinInputVar(uint32_t builtin) { for (auto& a : module_->annotations()) { - if (a.opcode() != SpvOpDecorate) continue; - if (a.GetSingleWordInOperand(kSpvDecorateDecorationInIdx) != - SpvDecorationBuiltIn) + if (spv::Op(a.opcode()) != spv::Op::OpDecorate) continue; + if (spv::Decoration(a.GetSingleWordInOperand( + kSpvDecorateDecorationInIdx)) != spv::Decoration::BuiltIn) continue; if (a.GetSingleWordInOperand(kSpvDecorateBuiltinInIdx) != builtin) continue; uint32_t target_id = a.GetSingleWordInOperand(kSpvDecorateTargetIdInIdx); Instruction* b_var = get_def_use_mgr()->GetDef(target_id); - if (b_var->opcode() != SpvOpVariable) continue; - if (b_var->GetSingleWordInOperand(0) != SpvStorageClassInput) continue; + if (b_var->opcode() != spv::Op::OpVariable) continue; + if (spv::StorageClass(b_var->GetSingleWordInOperand(0)) != + spv::StorageClass::Input) + continue; return target_id; } return 0; @@ -796,39 +861,39 @@ uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) { // TODO(greg-lunarg): Add support for all builtins analysis::TypeManager* type_mgr = get_type_mgr(); analysis::Type* reg_type; - switch (builtin) { - case SpvBuiltInFragCoord: { + switch (spv::BuiltIn(builtin)) { + case spv::BuiltIn::FragCoord: { analysis::Float float_ty(32); analysis::Type* reg_float_ty = type_mgr->GetRegisteredType(&float_ty); analysis::Vector v4float_ty(reg_float_ty, 4); reg_type = type_mgr->GetRegisteredType(&v4float_ty); break; } - case SpvBuiltInVertexIndex: - case SpvBuiltInInstanceIndex: - case SpvBuiltInPrimitiveId: - case SpvBuiltInInvocationId: - case SpvBuiltInSubgroupLocalInvocationId: { + case spv::BuiltIn::VertexIndex: + case spv::BuiltIn::InstanceIndex: + case spv::BuiltIn::PrimitiveId: + case spv::BuiltIn::InvocationId: + case spv::BuiltIn::SubgroupLocalInvocationId: { analysis::Integer uint_ty(32, false); reg_type = type_mgr->GetRegisteredType(&uint_ty); break; } - case SpvBuiltInGlobalInvocationId: - case SpvBuiltInLaunchIdNV: { + case spv::BuiltIn::GlobalInvocationId: + case spv::BuiltIn::LaunchIdNV: { analysis::Integer uint_ty(32, false); analysis::Type* reg_uint_ty = type_mgr->GetRegisteredType(&uint_ty); analysis::Vector v3uint_ty(reg_uint_ty, 3); reg_type = type_mgr->GetRegisteredType(&v3uint_ty); break; } - case SpvBuiltInTessCoord: { + case spv::BuiltIn::TessCoord: { analysis::Float float_ty(32); analysis::Type* reg_float_ty = type_mgr->GetRegisteredType(&float_ty); analysis::Vector v3float_ty(reg_float_ty, 3); reg_type = type_mgr->GetRegisteredType(&v3float_ty); break; } - case SpvBuiltInSubgroupLtMask: { + case spv::BuiltIn::SubgroupLtMask: { analysis::Integer uint_ty(32, false); analysis::Type* reg_uint_ty = type_mgr->GetRegisteredType(&uint_ty); analysis::Vector v4uint_ty(reg_uint_ty, 4); @@ -842,17 +907,17 @@ uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) { } uint32_t type_id = type_mgr->GetTypeInstruction(reg_type); uint32_t varTyPtrId = - type_mgr->FindPointerToType(type_id, SpvStorageClassInput); + type_mgr->FindPointerToType(type_id, spv::StorageClass::Input); // TODO(1841): Handle id overflow. var_id = TakeNextId(); std::unique_ptr newVarOp( - new Instruction(this, SpvOpVariable, varTyPtrId, var_id, + new Instruction(this, spv::Op::OpVariable, varTyPtrId, var_id, {{spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvStorageClassInput}}})); + {uint32_t(spv::StorageClass::Input)}}})); get_def_use_mgr()->AnalyzeInstDefUse(&*newVarOp); module()->AddGlobalValue(std::move(newVarOp)); - get_decoration_mgr()->AddDecorationVal(var_id, SpvDecorationBuiltIn, - builtin); + get_decoration_mgr()->AddDecorationVal( + var_id, uint32_t(spv::Decoration::BuiltIn), builtin); AddVarToEntryPoints(var_id); } builtin_var_id_map_[builtin] = var_id; @@ -862,7 +927,7 @@ uint32_t IRContext::GetBuiltinInputVarId(uint32_t builtin) { void IRContext::AddCalls(const Function* func, std::queue* todo) { for (auto bi = func->begin(); bi != func->end(); ++bi) for (auto ii = bi->begin(); ii != bi->end(); ++ii) - if (ii->opcode() == SpvOpFunctionCall) + if (ii->opcode() == spv::Op::OpFunctionCall) todo->push(ii->GetSingleWordInOperand(0)); } @@ -887,12 +952,12 @@ bool IRContext::ProcessReachableCallTree(ProcessFunction& pfn) { for (auto& a : annotations()) { // TODO: Handle group decorations as well. Currently not generate by any // front-end, but could be coming. - if (a.opcode() == SpvOp::SpvOpDecorate) { - if (a.GetSingleWordOperand(1) == - SpvDecoration::SpvDecorationLinkageAttributes) { + if (a.opcode() == spv::Op::OpDecorate) { + if (spv::Decoration(a.GetSingleWordOperand(1)) == + spv::Decoration::LinkageAttributes) { uint32_t lastOperand = a.NumOperands() - 1; - if (a.GetSingleWordOperand(lastOperand) == - SpvLinkageType::SpvLinkageTypeExport) { + if (spv::LinkageType(a.GetSingleWordOperand(lastOperand)) == + spv::LinkageType::Export) { uint32_t id = a.GetSingleWordOperand(0); if (GetFunction(id)) { roots.push(id); @@ -924,6 +989,19 @@ bool IRContext::ProcessCallTreeFromRoots(ProcessFunction& pfn, return modified; } +void IRContext::CollectCallTreeFromRoots(unsigned entryId, + std::unordered_set* funcs) { + std::queue roots; + roots.push(entryId); + while (!roots.empty()) { + const uint32_t fi = roots.front(); + roots.pop(); + funcs->insert(fi); + Function* fn = GetFunction(fi); + AddCalls(fn, &roots); + } +} + void IRContext::EmitErrorMessage(std::string message, Instruction* inst) { if (!consumer()) { return; @@ -1043,5 +1121,26 @@ bool IRContext::IsReachable(const opt::BasicBlock& bb) { return GetDominatorAnalysis(enclosing_function) ->Dominates(enclosing_function->entry().get(), &bb); } + +spv::ExecutionModel IRContext::GetStage() { + const auto& entry_points = module()->entry_points(); + if (entry_points.empty()) { + return spv::ExecutionModel::Max; + } + + uint32_t stage = entry_points.begin()->GetSingleWordInOperand( + kEntryPointExecutionModelInIdx); + auto it = std::find_if( + entry_points.begin(), entry_points.end(), [stage](const Instruction& x) { + return x.GetSingleWordInOperand(kEntryPointExecutionModelInIdx) != + stage; + }); + if (it != entry_points.end()) { + EmitErrorMessage("Mixed stage shader module not supported", &(*it)); + } + + return static_cast(stage); +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.h index 7bef3054c..ef7c45806 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_context.h @@ -27,6 +27,7 @@ #include #include "source/assembly_grammar.h" +#include "source/enum_string_mapping.h" #include "source/opt/cfg.h" #include "source/opt/constants.h" #include "source/opt/debug_info_manager.h" @@ -35,6 +36,7 @@ #include "source/opt/dominator_analysis.h" #include "source/opt/feature_manager.h" #include "source/opt/fold.h" +#include "source/opt/liveness.h" #include "source/opt/loop_descriptor.h" #include "source/opt/module.h" #include "source/opt/register_pressure.h" @@ -81,7 +83,8 @@ class IRContext { kAnalysisConstants = 1 << 14, kAnalysisTypes = 1 << 15, kAnalysisDebugInfo = 1 << 16, - kAnalysisEnd = 1 << 17 + kAnalysisLiveness = 1 << 17, + kAnalysisEnd = 1 << 18 }; using ProcessFunction = std::function; @@ -151,13 +154,19 @@ class IRContext { inline IteratorRange capabilities(); inline IteratorRange capabilities() const; + // Iterators for extensions instructions contained in this module. + inline Module::inst_iterator extension_begin(); + inline Module::inst_iterator extension_end(); + inline IteratorRange extensions(); + inline IteratorRange extensions() const; + // Iterators for types, constants and global variables instructions. inline Module::inst_iterator types_values_begin(); inline Module::inst_iterator types_values_end(); inline IteratorRange types_values(); inline IteratorRange types_values() const; - // Iterators for extension instructions contained in this module. + // Iterators for ext_inst import instructions contained in this module. inline Module::inst_iterator ext_inst_import_begin(); inline Module::inst_iterator ext_inst_import_end(); inline IteratorRange ext_inst_imports(); @@ -201,18 +210,27 @@ class IRContext { inline IteratorRange ext_inst_debuginfo() const; // Add |capability| to the module, if it is not already enabled. - inline void AddCapability(SpvCapability capability); - + inline void AddCapability(spv::Capability capability); // Appends a capability instruction to this module. inline void AddCapability(std::unique_ptr&& c); + // Removes instruction declaring `capability` from this module. + // Returns true if the capability was removed, false otherwise. + bool RemoveCapability(spv::Capability capability); + // Appends an extension instruction to this module. inline void AddExtension(const std::string& ext_name); inline void AddExtension(std::unique_ptr&& e); + // Removes instruction declaring `extension` from this module. + // Returns true if the extension was removed, false otherwise. + bool RemoveExtension(Extension extension); + // Appends an extended instruction set instruction to this module. inline void AddExtInstImport(const std::string& name); inline void AddExtInstImport(std::unique_ptr&& e); // Set the memory model for this module. inline void SetMemoryModel(std::unique_ptr&& m); + // Get the memory model for this module. + inline const Instruction* GetMemoryModel() const; // Appends an entry point instruction to this module. inline void AddEntryPoint(std::unique_ptr&& e); // Appends an execution mode instruction to this module. @@ -236,6 +254,8 @@ class IRContext { inline void AddType(std::unique_ptr&& t); // Appends a constant, global variable, or OpUndef instruction to this module. inline void AddGlobalValue(std::unique_ptr&& v); + // Prepends a function declaration to this module. + inline void AddFunctionDeclaration(std::unique_ptr&& f); // Appends a function to this module. inline void AddFunction(std::unique_ptr&& f); @@ -248,6 +268,15 @@ class IRContext { return def_use_mgr_.get(); } + // Returns a pointer to a liveness manager. If the liveness manager is + // invalid, it is rebuilt first. + analysis::LivenessManager* get_liveness_mgr() { + if (!AreAnalysesValid(kAnalysisLiveness)) { + BuildLivenessManager(); + } + return liveness_mgr_.get(); + } + // Returns a pointer to a value number table. If the liveness analysis is // invalid, it is rebuilt first. ValueNumberTable* GetValueNumberTable() { @@ -302,7 +331,7 @@ class IRContext { } } - // Returns a pointer the decoration manager. If the decoration manger is + // Returns a pointer the decoration manager. If the decoration manager is // invalid, it is rebuilt first. analysis::DecorationManager* get_decoration_mgr() { if (!AreAnalysesValid(kAnalysisDecorations)) { @@ -367,6 +396,11 @@ class IRContext { // having more than one name. This method returns the first one it finds. inline Instruction* GetMemberName(uint32_t struct_type_id, uint32_t index); + // Copy names from |old_id| to |new_id|. Only copy member name if index is + // less than |max_member_index|. + inline void CloneNames(const uint32_t old_id, const uint32_t new_id, + const uint32_t max_member_index = UINT32_MAX); + // Sets the message consumer to the given |consumer|. |consumer| which will be // invoked every time there is a message to be communicated to the outside. void SetMessageConsumer(MessageConsumer c) { consumer_ = std::move(c); } @@ -385,7 +419,7 @@ class IRContext { // Deletes the instruction defining the given |id|. Returns true on // success, false if the given |id| is not defined at all. This method also - // erases the name, decorations, and defintion of |id|. + // erases the name, decorations, and definition of |id|. // // Pointers and iterators pointing to the deleted instructions become invalid. // However other pointers and iterators are still valid. @@ -406,11 +440,24 @@ class IRContext { // instruction exists. Instruction* KillInst(Instruction* inst); + // Deletes all the instruction in the range [`begin`; `end`[, for which the + // unary predicate `condition` returned true. + // Returns true if at least one instruction was removed, false otherwise. + // + // Pointer and iterator pointing to the deleted instructions become invalid. + // However other pointers and iterators are still valid. + bool KillInstructionIf(Module::inst_iterator begin, Module::inst_iterator end, + std::function condition); + // Collects the non-semantic instruction tree that uses |inst|'s result id // to be killed later. void CollectNonSemanticTree(Instruction* inst, std::unordered_set* to_kill); + // Collect function reachable from |entryId|, returns |funcs| + void CollectCallTreeFromRoots(unsigned entryId, + std::unordered_set* funcs); + // Returns true if all of the given analyses are valid. bool AreAnalysesValid(Analysis set) { return (set & valid_analyses_) == set; } @@ -471,14 +518,14 @@ class IRContext { if (!AreAnalysesValid(kAnalysisCombinators)) { InitializeCombinators(); } - const uint32_t kExtInstSetIdInIndx = 0; - const uint32_t kExtInstInstructionInIndx = 1; + constexpr uint32_t kExtInstSetIdInIndx = 0; + constexpr uint32_t kExtInstInstructionInIndx = 1; - if (inst->opcode() != SpvOpExtInst) { - return combinator_ops_[0].count(inst->opcode()) != 0; + if (inst->opcode() != spv::Op::OpExtInst) { + return combinator_ops_[0].count(uint32_t(inst->opcode())) != 0; } else { uint32_t set = inst->GetSingleWordInOperand(kExtInstSetIdInIndx); - uint32_t op = inst->GetSingleWordInOperand(kExtInstInstructionInIndx); + auto op = inst->GetSingleWordInOperand(kExtInstInstructionInIndx); return combinator_ops_[set].count(op) != 0; } } @@ -587,7 +634,7 @@ class IRContext { } Function* GetFunction(Instruction* inst) { - if (inst->opcode() != SpvOpFunction) { + if (inst->opcode() != spv::Op::OpFunction) { return nullptr; } return GetFunction(inst->result_id()); @@ -621,6 +668,21 @@ class IRContext { // the function that contains |bb|. bool IsReachable(const opt::BasicBlock& bb); + // Return the stage of the module. Will generate error if entry points don't + // all have the same stage. + spv::ExecutionModel GetStage(); + + // Returns true of the current target environment is at least that of the + // given environment. + bool IsTargetEnvAtLeast(spv_target_env env) { + // A bit of a hack. We assume that the target environments are appended to + // the enum, so that there is an appropriate order. + return syntax_context_->target_env >= env; + } + + // Return the target environment for the current context. + spv_target_env GetTargetEnv() const { return syntax_context_->target_env; } + private: // Builds the def-use manager from scratch, even if it was already valid. void BuildDefUseManager() { @@ -628,6 +690,12 @@ class IRContext { valid_analyses_ = valid_analyses_ | kAnalysisDefUse; } + // Builds the liveness manager from scratch, even if it was already valid. + void BuildLivenessManager() { + liveness_mgr_ = MakeUnique(this); + valid_analyses_ = valid_analyses_ | kAnalysisLiveness; + } + // Builds the instruction-block map for the whole module. void BuildInstrToBlockMapping() { instr_to_block_.clear(); @@ -731,7 +799,8 @@ class IRContext { // Analyzes the features in the owned module. Builds the manager if required. void AnalyzeFeatures() { - feature_mgr_ = MakeUnique(grammar_); + feature_mgr_ = + std::unique_ptr(new FeatureManager(grammar_)); feature_mgr_->Analyze(module()); } @@ -802,7 +871,7 @@ class IRContext { // iterators to traverse instructions. std::unordered_map id_to_func_; - // A bitset indicating which analyes are currently valid. + // A bitset indicating which analyzes are currently valid. Analysis valid_analyses_; // Opcodes of shader capability core executable instructions @@ -848,6 +917,9 @@ class IRContext { std::unique_ptr struct_cfg_analysis_; + // The liveness manager for |module_|. + std::unique_ptr liveness_mgr_; + // The maximum legal value for the id bound. uint32_t max_id_bound_; @@ -867,8 +939,7 @@ inline IRContext::Analysis operator|(IRContext::Analysis lhs, inline IRContext::Analysis& operator|=(IRContext::Analysis& lhs, IRContext::Analysis rhs) { - lhs = static_cast(static_cast(lhs) | - static_cast(rhs)); + lhs = lhs | rhs; return lhs; } @@ -921,6 +992,22 @@ IteratorRange IRContext::capabilities() const { return ((const Module*)module())->capabilities(); } +Module::inst_iterator IRContext::extension_begin() { + return module()->extension_begin(); +} + +Module::inst_iterator IRContext::extension_end() { + return module()->extension_end(); +} + +IteratorRange IRContext::extensions() { + return module()->extensions(); +} + +IteratorRange IRContext::extensions() const { + return ((const Module*)module())->extensions(); +} + Module::inst_iterator IRContext::types_values_begin() { return module()->types_values_begin(); } @@ -1011,10 +1098,10 @@ IteratorRange IRContext::ext_inst_debuginfo() return ((const Module*)module_.get())->ext_inst_debuginfo(); } -void IRContext::AddCapability(SpvCapability capability) { +void IRContext::AddCapability(spv::Capability capability) { if (!get_feature_mgr()->HasCapability(capability)) { std::unique_ptr capability_inst(new Instruction( - this, SpvOpCapability, 0, 0, + this, spv::Op::OpCapability, 0, 0, {{SPV_OPERAND_TYPE_CAPABILITY, {static_cast(capability)}}})); AddCapability(std::move(capability_inst)); } @@ -1024,7 +1111,7 @@ void IRContext::AddCapability(std::unique_ptr&& c) { AddCombinatorsForCapability(c->GetSingleWordInOperand(0)); if (feature_mgr_ != nullptr) { feature_mgr_->AddCapability( - static_cast(c->GetSingleWordInOperand(0))); + static_cast(c->GetSingleWordInOperand(0))); } if (AreAnalysesValid(kAnalysisDefUse)) { get_def_use_mgr()->AnalyzeInstDefUse(c.get()); @@ -1035,7 +1122,7 @@ void IRContext::AddCapability(std::unique_ptr&& c) { void IRContext::AddExtension(const std::string& ext_name) { std::vector ext_words = spvtools::utils::MakeVector(ext_name); AddExtension(std::unique_ptr( - new Instruction(this, SpvOpExtension, 0u, 0u, + new Instruction(this, spv::Op::OpExtension, 0u, 0u, {{SPV_OPERAND_TYPE_LITERAL_STRING, ext_words}}))); } @@ -1052,7 +1139,7 @@ void IRContext::AddExtension(std::unique_ptr&& e) { void IRContext::AddExtInstImport(const std::string& name) { std::vector ext_words = spvtools::utils::MakeVector(name); AddExtInstImport(std::unique_ptr( - new Instruction(this, SpvOpExtInstImport, 0u, TakeNextId(), + new Instruction(this, spv::Op::OpExtInstImport, 0u, TakeNextId(), {{SPV_OPERAND_TYPE_LITERAL_STRING, ext_words}}))); } @@ -1071,6 +1158,10 @@ void IRContext::SetMemoryModel(std::unique_ptr&& m) { module()->SetMemoryModel(std::move(m)); } +const Instruction* IRContext::GetMemoryModel() const { + return module()->GetMemoryModel(); +} + void IRContext::AddEntryPoint(std::unique_ptr&& e) { module()->AddEntryPoint(std::move(e)); } @@ -1085,12 +1176,16 @@ void IRContext::AddDebug1Inst(std::unique_ptr&& d) { void IRContext::AddDebug2Inst(std::unique_ptr&& d) { if (AreAnalysesValid(kAnalysisNameMap)) { - if (d->opcode() == SpvOpName || d->opcode() == SpvOpMemberName) { + if (d->opcode() == spv::Op::OpName || + d->opcode() == spv::Op::OpMemberName) { // OpName and OpMemberName do not have result-ids. The target of the // instruction is at InOperand index 0. id_to_name_->insert({d->GetSingleWordInOperand(0), d.get()}); } } + if (AreAnalysesValid(kAnalysisDefUse)) { + get_def_use_mgr()->AnalyzeInstDefUse(d.get()); + } module()->AddDebug2Inst(std::move(d)); } @@ -1126,6 +1221,10 @@ void IRContext::AddGlobalValue(std::unique_ptr&& v) { module()->AddGlobalValue(std::move(v)); } +void IRContext::AddFunctionDeclaration(std::unique_ptr&& f) { + module()->AddFunctionDeclaration(std::move(f)); +} + void IRContext::AddFunction(std::unique_ptr&& f) { module()->AddFunction(std::move(f)); } @@ -1145,8 +1244,8 @@ void IRContext::UpdateDefUse(Instruction* inst) { void IRContext::BuildIdToNameMap() { id_to_name_ = MakeUnique>(); for (Instruction& debug_inst : debugs2()) { - if (debug_inst.opcode() == SpvOpMemberName || - debug_inst.opcode() == SpvOpName) { + if (debug_inst.opcode() == spv::Op::OpMemberName || + debug_inst.opcode() == spv::Op::OpName) { id_to_name_->insert({debug_inst.GetSingleWordInOperand(0), &debug_inst}); } } @@ -1169,7 +1268,7 @@ Instruction* IRContext::GetMemberName(uint32_t struct_type_id, uint32_t index) { auto result = id_to_name_->equal_range(struct_type_id); for (auto i = result.first; i != result.second; ++i) { auto* name_instr = i->second; - if (name_instr->opcode() == SpvOpMemberName && + if (name_instr->opcode() == spv::Op::OpMemberName && name_instr->GetSingleWordInOperand(1) == index) { return name_instr; } @@ -1177,6 +1276,25 @@ Instruction* IRContext::GetMemberName(uint32_t struct_type_id, uint32_t index) { return nullptr; } +void IRContext::CloneNames(const uint32_t old_id, const uint32_t new_id, + const uint32_t max_member_index) { + std::vector> names_to_add; + auto names = GetNames(old_id); + for (auto n : names) { + Instruction* old_name_inst = n.second; + if (old_name_inst->opcode() == spv::Op::OpMemberName) { + auto midx = old_name_inst->GetSingleWordInOperand(1); + if (midx >= max_member_index) continue; + } + std::unique_ptr new_name_inst(old_name_inst->Clone(this)); + new_name_inst->SetInOperand(0, {new_id}); + names_to_add.push_back(std::move(new_name_inst)); + } + // We can't add the new names when we are iterating over name range above. + // We can add all the new names now. + for (auto& new_name : names_to_add) AddDebug2Inst(std::move(new_name)); +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_loader.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_loader.cpp index a82b530e6..e9b7bbfc2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_loader.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ir_loader.cpp @@ -24,12 +24,13 @@ #include "source/opt/reflect.h" #include "source/util/make_unique.h" -static const uint32_t kExtInstSetIndex = 4; -static const uint32_t kLexicalScopeIndex = 5; -static const uint32_t kInlinedAtIndex = 6; - namespace spvtools { namespace opt { +namespace { +constexpr uint32_t kExtInstSetIndex = 4; +constexpr uint32_t kLexicalScopeIndex = 5; +constexpr uint32_t kInlinedAtIndex = 6; +} // namespace IrLoader::IrLoader(const MessageConsumer& consumer, Module* m) : consumer_(consumer), @@ -39,9 +40,9 @@ IrLoader::IrLoader(const MessageConsumer& consumer, Module* m) last_dbg_scope_(kNoDebugScope, kNoInlinedAt) {} bool IsLineInst(const spv_parsed_instruction_t* inst) { - const auto opcode = static_cast(inst->opcode); + const auto opcode = static_cast(inst->opcode); if (IsOpLineInst(opcode)) return true; - if (opcode != SpvOpExtInst) return false; + if (opcode != spv::Op::OpExtInst) return false; if (inst->ext_inst_type != SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) return false; const uint32_t ext_inst_index = inst->words[kExtInstSetIndex]; @@ -63,8 +64,9 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { // If it is a DebugScope or DebugNoScope of debug extension, we do not // create a new instruction, but simply keep the information in // struct DebugScope. - const auto opcode = static_cast(inst->opcode); - if (opcode == SpvOpExtInst && spvExtInstIsDebugInfo(inst->ext_inst_type)) { + const auto opcode = static_cast(inst->opcode); + if (opcode == spv::Op::OpExtInst && + spvExtInstIsDebugInfo(inst->ext_inst_type)) { const uint32_t ext_inst_index = inst->words[kExtInstSetIndex]; if (inst->ext_inst_type == SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 || inst->ext_inst_type == @@ -130,13 +132,13 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { // Handle function and basic block boundaries first, then normal // instructions. - if (opcode == SpvOpFunction) { + if (opcode == spv::Op::OpFunction) { if (function_ != nullptr) { Error(consumer_, src, loc, "function inside function"); return false; } function_ = MakeUnique(std::move(spv_inst)); - } else if (opcode == SpvOpFunctionEnd) { + } else if (opcode == spv::Op::OpFunctionEnd) { if (function_ == nullptr) { Error(consumer_, src, loc, "OpFunctionEnd without corresponding OpFunction"); @@ -149,7 +151,7 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { function_->SetFunctionEnd(std::move(spv_inst)); module_->AddFunction(std::move(function_)); function_ = nullptr; - } else if (opcode == SpvOpLabel) { + } else if (opcode == spv::Op::OpLabel) { if (function_ == nullptr) { Error(consumer_, src, loc, "OpLabel outside function"); return false; @@ -179,17 +181,20 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { } else { if (function_ == nullptr) { // Outside function definition SPIRV_ASSERT(consumer_, block_ == nullptr); - if (opcode == SpvOpCapability) { + if (opcode == spv::Op::OpCapability) { module_->AddCapability(std::move(spv_inst)); - } else if (opcode == SpvOpExtension) { + } else if (opcode == spv::Op::OpExtension) { module_->AddExtension(std::move(spv_inst)); - } else if (opcode == SpvOpExtInstImport) { + } else if (opcode == spv::Op::OpExtInstImport) { module_->AddExtInstImport(std::move(spv_inst)); - } else if (opcode == SpvOpMemoryModel) { + } else if (opcode == spv::Op::OpMemoryModel) { module_->SetMemoryModel(std::move(spv_inst)); - } else if (opcode == SpvOpEntryPoint) { + } else if (opcode == spv::Op::OpSamplerImageAddressingModeNV) { + module_->SetSampledImageAddressMode(std::move(spv_inst)); + } else if (opcode == spv::Op::OpEntryPoint) { module_->AddEntryPoint(std::move(spv_inst)); - } else if (opcode == SpvOpExecutionMode) { + } else if (opcode == spv::Op::OpExecutionMode || + opcode == spv::Op::OpExecutionModeId) { module_->AddExecutionMode(std::move(spv_inst)); } else if (IsDebug1Inst(opcode)) { module_->AddDebug1Inst(std::move(spv_inst)); @@ -201,13 +206,13 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { module_->AddAnnotationInst(std::move(spv_inst)); } else if (IsTypeInst(opcode)) { module_->AddType(std::move(spv_inst)); - } else if (IsConstantInst(opcode) || opcode == SpvOpVariable || - opcode == SpvOpUndef) { + } else if (IsConstantInst(opcode) || opcode == spv::Op::OpVariable || + opcode == spv::Op::OpUndef) { module_->AddGlobalValue(std::move(spv_inst)); - } else if (opcode == SpvOpExtInst && + } else if (opcode == spv::Op::OpExtInst && spvExtInstIsDebugInfo(inst->ext_inst_type)) { module_->AddExtInstDebugInfo(std::move(spv_inst)); - } else if (opcode == SpvOpExtInst && + } else if (opcode == spv::Op::OpExtInst && spvExtInstIsNonSemantic(inst->ext_inst_type)) { // If there are no functions, add the non-semantic instructions to the // global values. Otherwise append it to the list of the last function. @@ -226,11 +231,11 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { return false; } } else { - if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) + if (opcode == spv::Op::OpLoopMerge || opcode == spv::Op::OpSelectionMerge) last_dbg_scope_ = DebugScope(kNoDebugScope, kNoInlinedAt); if (last_dbg_scope_.GetLexicalScope() != kNoDebugScope) spv_inst->SetDebugScope(last_dbg_scope_); - if (opcode == SpvOpExtInst && + if (opcode == spv::Op::OpExtInst && spvExtInstIsDebugInfo(inst->ext_inst_type)) { const uint32_t ext_inst_index = inst->words[kExtInstSetIndex]; if (inst->ext_inst_type == SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100) { @@ -319,7 +324,7 @@ bool IrLoader::AddInstruction(const spv_parsed_instruction_t* inst) { } } else { if (block_ == nullptr) { // Inside function but outside blocks - if (opcode != SpvOpFunctionParameter) { + if (opcode != spv::Op::OpFunctionParameter) { Errorf(consumer_, src, loc, "Non-OpFunctionParameter (opcode: %d) found inside " "function but outside basic block", diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/licm_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/licm_pass.cpp index 82851fd27..f2a6e4df5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/licm_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/licm_pass.cpp @@ -15,7 +15,6 @@ #include "source/opt/licm_pass.h" #include -#include #include "source/opt/module.h" #include "source/opt/pass.h" @@ -85,7 +84,7 @@ Pass::Status LICMPass::AnalyseAndHoistFromBB( bool modified = false; std::function hoist_inst = [this, &loop, &modified](Instruction* inst) { - if (loop->ShouldHoistInstruction(this->context(), inst)) { + if (loop->ShouldHoistInstruction(*inst)) { if (!HoistInstruction(loop, inst)) { return false; } @@ -126,8 +125,8 @@ bool LICMPass::HoistInstruction(Loop* loop, Instruction* inst) { } Instruction* insertion_point = &*pre_header_bb->tail(); Instruction* previous_node = insertion_point->PreviousNode(); - if (previous_node && (previous_node->opcode() == SpvOpLoopMerge || - previous_node->opcode() == SpvOpSelectionMerge)) { + if (previous_node && (previous_node->opcode() == spv::Op::OpLoopMerge || + previous_node->opcode() == spv::Op::OpSelectionMerge)) { insertion_point = previous_node; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.cpp new file mode 100644 index 000000000..336f3ae52 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.cpp @@ -0,0 +1,332 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/liveness.h" + +#include "source/opt/ir_context.h" + +namespace spvtools { +namespace opt { +namespace analysis { +namespace { +constexpr uint32_t kDecorationLocationInIdx = 2; +constexpr uint32_t kOpDecorateMemberMemberInIdx = 1; +constexpr uint32_t kOpDecorateMemberLocationInIdx = 3; +constexpr uint32_t kOpDecorateBuiltInLiteralInIdx = 2; +constexpr uint32_t kOpDecorateMemberBuiltInLiteralInIdx = 3; +} // namespace + +LivenessManager::LivenessManager(IRContext* ctx) : ctx_(ctx), computed_(false) { + // Liveness sets computed when queried +} + +void LivenessManager::InitializeAnalysis() { + live_locs_.clear(); + live_builtins_.clear(); + // Mark all builtins live for frag shader. + if (context()->GetStage() == spv::ExecutionModel::Fragment) { + live_builtins_.insert(uint32_t(spv::BuiltIn::PointSize)); + live_builtins_.insert(uint32_t(spv::BuiltIn::ClipDistance)); + live_builtins_.insert(uint32_t(spv::BuiltIn::CullDistance)); + } +} + +bool LivenessManager::IsAnalyzedBuiltin(uint32_t bi) { + // There are only three builtins that can be analyzed and removed between + // two stages: PointSize, ClipDistance and CullDistance. All others are + // always consumed implicitly by the downstream stage. + const auto builtin = spv::BuiltIn(bi); + return builtin == spv::BuiltIn::PointSize || + builtin == spv::BuiltIn::ClipDistance || + builtin == spv::BuiltIn::CullDistance; +} + +bool LivenessManager::AnalyzeBuiltIn(uint32_t id) { + auto deco_mgr = context()->get_decoration_mgr(); + bool saw_builtin = false; + // Analyze all builtin decorations of |id|. + (void)deco_mgr->ForEachDecoration( + id, uint32_t(spv::Decoration::BuiltIn), + [this, &saw_builtin](const Instruction& deco_inst) { + saw_builtin = true; + // No need to process builtins in frag shader. All assumed used. + if (context()->GetStage() == spv::ExecutionModel::Fragment) return; + uint32_t builtin = uint32_t(spv::BuiltIn::Max); + if (deco_inst.opcode() == spv::Op::OpDecorate) + builtin = + deco_inst.GetSingleWordInOperand(kOpDecorateBuiltInLiteralInIdx); + else if (deco_inst.opcode() == spv::Op::OpMemberDecorate) + builtin = deco_inst.GetSingleWordInOperand( + kOpDecorateMemberBuiltInLiteralInIdx); + else + assert(false && "unexpected decoration"); + if (IsAnalyzedBuiltin(builtin)) live_builtins_.insert(builtin); + }); + return saw_builtin; +} + +void LivenessManager::MarkLocsLive(uint32_t start, uint32_t count) { + auto finish = start + count; + for (uint32_t u = start; u < finish; ++u) { + live_locs_.insert(u); + } +} + +uint32_t LivenessManager::GetLocSize(const analysis::Type* type) const { + auto arr_type = type->AsArray(); + if (arr_type) { + auto comp_type = arr_type->element_type(); + auto len_info = arr_type->length_info(); + assert(len_info.words[0] == analysis::Array::LengthInfo::kConstant && + "unexpected array length"); + auto comp_len = len_info.words[1]; + return comp_len * GetLocSize(comp_type); + } + auto struct_type = type->AsStruct(); + if (struct_type) { + uint32_t size = 0u; + for (auto& el_type : struct_type->element_types()) + size += GetLocSize(el_type); + return size; + } + auto mat_type = type->AsMatrix(); + if (mat_type) { + auto cnt = mat_type->element_count(); + auto comp_type = mat_type->element_type(); + return cnt * GetLocSize(comp_type); + } + auto vec_type = type->AsVector(); + if (vec_type) { + auto comp_type = vec_type->element_type(); + if (comp_type->AsInteger()) return 1; + auto float_type = comp_type->AsFloat(); + assert(float_type && "unexpected vector component type"); + auto width = float_type->width(); + if (width == 32 || width == 16) return 1; + assert(width == 64 && "unexpected float type width"); + auto comp_cnt = vec_type->element_count(); + return (comp_cnt > 2) ? 2 : 1; + } + assert((type->AsInteger() || type->AsFloat()) && "unexpected input type"); + return 1; +} + +const analysis::Type* LivenessManager::GetComponentType( + uint32_t index, const analysis::Type* agg_type) const { + auto arr_type = agg_type->AsArray(); + if (arr_type) return arr_type->element_type(); + auto struct_type = agg_type->AsStruct(); + if (struct_type) return struct_type->element_types()[index]; + auto mat_type = agg_type->AsMatrix(); + if (mat_type) return mat_type->element_type(); + auto vec_type = agg_type->AsVector(); + assert(vec_type && "unexpected non-aggregate type"); + return vec_type->element_type(); +} + +uint32_t LivenessManager::GetLocOffset(uint32_t index, + const analysis::Type* agg_type) const { + auto arr_type = agg_type->AsArray(); + if (arr_type) return index * GetLocSize(arr_type->element_type()); + auto struct_type = agg_type->AsStruct(); + if (struct_type) { + uint32_t offset = 0u; + uint32_t cnt = 0u; + for (auto& el_type : struct_type->element_types()) { + if (cnt == index) break; + offset += GetLocSize(el_type); + ++cnt; + } + return offset; + } + auto mat_type = agg_type->AsMatrix(); + if (mat_type) return index * GetLocSize(mat_type->element_type()); + auto vec_type = agg_type->AsVector(); + assert(vec_type && "unexpected non-aggregate type"); + auto comp_type = vec_type->element_type(); + auto flt_type = comp_type->AsFloat(); + if (flt_type && flt_type->width() == 64u && index >= 2u) return 1; + return 0; +} + +void LivenessManager::AnalyzeAccessChainLoc(const Instruction* ac, + const analysis::Type** curr_type, + uint32_t* offset, bool* no_loc, + bool is_patch, bool input) { + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::DecorationManager* deco_mgr = context()->get_decoration_mgr(); + // For tesc, tese and geom input variables, and tesc output variables, + // first array index does not contribute to offset. + auto stage = context()->GetStage(); + bool skip_first_index = false; + if ((input && (stage == spv::ExecutionModel::TessellationControl || + stage == spv::ExecutionModel::TessellationEvaluation || + stage == spv::ExecutionModel::Geometry)) || + (!input && stage == spv::ExecutionModel::TessellationControl)) + skip_first_index = !is_patch; + uint32_t ocnt = 0; + ac->WhileEachInOperand([this, &ocnt, def_use_mgr, type_mgr, deco_mgr, + curr_type, offset, no_loc, + skip_first_index](const uint32_t* opnd) { + if (ocnt >= 1) { + // Skip first index's contribution to offset if indicated + if (ocnt == 1 && skip_first_index) { + auto arr_type = (*curr_type)->AsArray(); + assert(arr_type && "unexpected wrapper type"); + *curr_type = arr_type->element_type(); + ocnt++; + return true; + } + // If any non-constant index, mark the entire current object and return. + auto idx_inst = def_use_mgr->GetDef(*opnd); + if (idx_inst->opcode() != spv::Op::OpConstant) return false; + // If current type is struct, look for location decoration on member and + // reset offset if found. + auto index = idx_inst->GetSingleWordInOperand(0); + auto str_type = (*curr_type)->AsStruct(); + if (str_type) { + uint32_t loc = 0; + auto str_type_id = type_mgr->GetId(str_type); + bool no_mem_loc = deco_mgr->WhileEachDecoration( + str_type_id, uint32_t(spv::Decoration::Location), + [&loc, index, no_loc](const Instruction& deco) { + assert(deco.opcode() == spv::Op::OpMemberDecorate && + "unexpected decoration"); + if (deco.GetSingleWordInOperand(kOpDecorateMemberMemberInIdx) == + index) { + loc = + deco.GetSingleWordInOperand(kOpDecorateMemberLocationInIdx); + *no_loc = false; + return false; + } + return true; + }); + if (!no_mem_loc) { + *offset = loc; + *curr_type = GetComponentType(index, *curr_type); + ocnt++; + return true; + } + } + + // Update offset and current type based on constant index. + *offset += GetLocOffset(index, *curr_type); + *curr_type = GetComponentType(index, *curr_type); + } + ocnt++; + return true; + }); +} + +void LivenessManager::MarkRefLive(const Instruction* ref, Instruction* var) { + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::DecorationManager* deco_mgr = context()->get_decoration_mgr(); + // Find variable location if present. + uint32_t loc = 0; + auto var_id = var->result_id(); + bool no_loc = deco_mgr->WhileEachDecoration( + var_id, uint32_t(spv::Decoration::Location), + [&loc](const Instruction& deco) { + assert(deco.opcode() == spv::Op::OpDecorate && "unexpected decoration"); + loc = deco.GetSingleWordInOperand(kDecorationLocationInIdx); + return false; + }); + // Find patch decoration if present + bool is_patch = !deco_mgr->WhileEachDecoration( + var_id, uint32_t(spv::Decoration::Patch), [](const Instruction& deco) { + if (deco.opcode() != spv::Op::OpDecorate) + assert(false && "unexpected decoration"); + return false; + }); + // If use is a load, mark all locations of var + auto ptr_type = type_mgr->GetType(var->type_id())->AsPointer(); + assert(ptr_type && "unexpected var type"); + auto var_type = ptr_type->pointee_type(); + if (ref->opcode() == spv::Op::OpLoad) { + assert(!no_loc && "missing input variable location"); + MarkLocsLive(loc, GetLocSize(var_type)); + return; + } + // Mark just those locations indicated by access chain + assert((ref->opcode() == spv::Op::OpAccessChain || + ref->opcode() == spv::Op::OpInBoundsAccessChain) && + "unexpected use of input variable"); + // Traverse access chain, compute location offset and type of reference + // through constant indices and mark those locs live. Assert if no location + // found. + uint32_t offset = loc; + auto curr_type = var_type; + AnalyzeAccessChainLoc(ref, &curr_type, &offset, &no_loc, is_patch); + assert(!no_loc && "missing input variable location"); + MarkLocsLive(offset, GetLocSize(curr_type)); +} + +void LivenessManager::ComputeLiveness() { + InitializeAnalysis(); + analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + // Process all input variables + for (auto& var : context()->types_values()) { + if (var.opcode() != spv::Op::OpVariable) { + continue; + } + analysis::Type* var_type = type_mgr->GetType(var.type_id()); + analysis::Pointer* ptr_type = var_type->AsPointer(); + if (ptr_type->storage_class() != spv::StorageClass::Input) { + continue; + } + // If var is builtin, mark live if analyzed and continue to next variable + auto var_id = var.result_id(); + if (AnalyzeBuiltIn(var_id)) continue; + // If interface block with builtin members, mark live if analyzed and + // continue to next variable. Input interface blocks will only appear + // in tesc, tese and geom shaders. Will need to strip off one level of + // arrayness to get to block type. + auto pte_type = ptr_type->pointee_type(); + auto arr_type = pte_type->AsArray(); + if (arr_type) { + auto elt_type = arr_type->element_type(); + auto str_type = elt_type->AsStruct(); + if (str_type) { + auto str_type_id = type_mgr->GetId(str_type); + if (AnalyzeBuiltIn(str_type_id)) continue; + } + } + // Mark all used locations of var live + def_use_mgr->ForEachUser(var_id, [this, &var](Instruction* user) { + auto op = user->opcode(); + if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName || + op == spv::Op::OpDecorate || user->IsNonSemanticInstruction()) { + return; + } + MarkRefLive(user, &var); + }); + } +} + +void LivenessManager::GetLiveness(std::unordered_set* live_locs, + std::unordered_set* live_builtins) { + if (!computed_) { + ComputeLiveness(); + computed_ = true; + } + *live_locs = live_locs_; + *live_builtins = live_builtins_; +} + +} // namespace analysis +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.h new file mode 100644 index 000000000..7d8a9fb40 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/liveness.h @@ -0,0 +1,99 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_LIVENESS_H_ +#define SOURCE_OPT_LIVENESS_H_ + +#include +#include + +namespace spvtools { +namespace opt { + +class IRContext; +class Instruction; + +namespace analysis { + +class Type; + +// This class represents the liveness of the input variables of a module +class LivenessManager { + public: + LivenessManager(IRContext* ctx); + + // Copy liveness info into |live_locs| and |builtin_locs|. + void GetLiveness(std::unordered_set* live_locs, + std::unordered_set* live_builtins); + + // Return true if builtin |bi| is being analyzed. + bool IsAnalyzedBuiltin(uint32_t bi); + + // Determine starting loc |offset| and the type |cur_type| of + // access chain |ac|. Set |no_loc| to true if no loc found. + // |is_patch| indicates if patch variable. |input| is true + // if input variable, otherwise output variable. + void AnalyzeAccessChainLoc(const Instruction* ac, + const analysis::Type** curr_type, uint32_t* offset, + bool* no_loc, bool is_patch, bool input = true); + + // Return size of |type_id| in units of locations + uint32_t GetLocSize(const analysis::Type* type) const; + + private: + IRContext* context() const { return ctx_; } + + // Initialize analysis + void InitializeAnalysis(); + + // Analyze |id| for builtin var and struct members. Return true if builtins + // found. + bool AnalyzeBuiltIn(uint32_t id); + + // Mark all live locations resulting from |user| of |var| at |loc|. + void MarkRefLive(const Instruction* user, Instruction* var); + + // Mark |count| locations starting at location |start|. + void MarkLocsLive(uint32_t start, uint32_t count); + + // Return type of component of aggregate type |agg_type| at |index| + const analysis::Type* GetComponentType(uint32_t index, + const analysis::Type* agg_type) const; + + // Return offset of |index| into aggregate type |agg_type| in units of + // input locations + uint32_t GetLocOffset(uint32_t index, const analysis::Type* agg_type) const; + + // Populate live_locs_ and live_builtins_ + void ComputeLiveness(); + + // IR context that owns this liveness manager. + IRContext* ctx_; + + // True if live_locs_ and live_builtins_ are computed + bool computed_; + + // Live locations + std::unordered_set live_locs_; + + // Live builtins + std::unordered_set live_builtins_; +}; + +} // namespace analysis +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_LIVENESS_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.cpp index d2059f5c2..7ba75cb7a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.cpp @@ -16,25 +16,19 @@ #include "source/opt/local_access_chain_convert_pass.h" -#include "ir_builder.h" #include "ir_context.h" #include "iterator.h" #include "source/util/string_utils.h" namespace spvtools { namespace opt { - namespace { - -const uint32_t kStoreValIdInIdx = 1; -const uint32_t kAccessChainPtrIdInIdx = 0; -const uint32_t kConstantValueInIdx = 0; -const uint32_t kTypeIntWidthInIdx = 0; - -} // anonymous namespace +constexpr uint32_t kStoreValIdInIdx = 1; +constexpr uint32_t kAccessChainPtrIdInIdx = 0; +} // namespace void LocalAccessChainConvertPass::BuildAndAppendInst( - SpvOp opcode, uint32_t typeId, uint32_t resultId, + spv::Op opcode, uint32_t typeId, uint32_t resultId, const std::vector& in_opnds, std::vector>* newInsts) { std::unique_ptr newInst( @@ -53,9 +47,9 @@ uint32_t LocalAccessChainConvertPass::BuildAndAppendVarLoad( *varId = ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx); const Instruction* varInst = get_def_use_mgr()->GetDef(*varId); - assert(varInst->opcode() == SpvOpVariable); + assert(varInst->opcode() == spv::Op::OpVariable); *varPteTypeId = GetPointeeTypeId(varInst); - BuildAndAppendInst(SpvOpLoad, *varPteTypeId, ldResultId, + BuildAndAppendInst(spv::Op::OpLoad, *varPteTypeId, ldResultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {*varId}}}, newInsts); return ldResultId; @@ -67,7 +61,19 @@ void LocalAccessChainConvertPass::AppendConstantOperands( ptrInst->ForEachInId([&iidIdx, &in_opnds, this](const uint32_t* iid) { if (iidIdx > 0) { const Instruction* cInst = get_def_use_mgr()->GetDef(*iid); - uint32_t val = cInst->GetSingleWordInOperand(kConstantValueInIdx); + const auto* constant_value = + context()->get_constant_mgr()->GetConstantFromInst(cInst); + assert(constant_value != nullptr && + "Expecting the index to be a constant."); + + // We take the sign extended value because OpAccessChain interprets the + // index as signed. + int64_t long_value = constant_value->GetSignExtendedValue(); + assert(long_value <= UINT32_MAX && long_value >= 0 && + "The index value is too large for a composite insert or extract " + "instruction."); + + uint32_t val = static_cast(long_value); in_opnds->push_back( {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {val}}); } @@ -98,7 +104,8 @@ bool LocalAccessChainConvertPass::ReplaceAccessChainLoad( new_inst[0]->UpdateDebugInfoFrom(original_load); context()->get_decoration_mgr()->CloneDecorations( - original_load->result_id(), ldResultId, {SpvDecorationRelaxedPrecision}); + original_load->result_id(), ldResultId, + {spv::Decoration::RelaxedPrecision}); original_load->InsertBefore(std::move(new_inst)); context()->get_debug_info_mgr()->AnalyzeDebugInst( original_load->PreviousNode()); @@ -113,7 +120,7 @@ bool LocalAccessChainConvertPass::ReplaceAccessChainLoad( new_operands.emplace_back( Operand({spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}})); AppendConstantOperands(address_inst, &new_operands); - original_load->SetOpcode(SpvOpCompositeExtract); + original_load->SetOpcode(spv::Op::OpCompositeExtract); original_load->ReplaceOperands(new_operands); context()->UpdateDefUse(original_load); return true; @@ -126,7 +133,7 @@ bool LocalAccessChainConvertPass::GenAccessChainStoreReplacement( // An access chain with no indices is essentially a copy. However, we still // have to create a new store because the old ones will be deleted. BuildAndAppendInst( - SpvOpStore, 0, 0, + spv::Op::OpStore, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ptrInst->GetSingleWordInOperand(kAccessChainPtrIdInIdx)}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}}, @@ -144,7 +151,7 @@ bool LocalAccessChainConvertPass::GenAccessChainStoreReplacement( } context()->get_decoration_mgr()->CloneDecorations( - varId, ldResultId, {SpvDecorationRelaxedPrecision}); + varId, ldResultId, {spv::Decoration::RelaxedPrecision}); // Build and append Insert const uint32_t insResultId = TakeNextId(); @@ -155,27 +162,32 @@ bool LocalAccessChainConvertPass::GenAccessChainStoreReplacement( {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {valId}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {ldResultId}}}; AppendConstantOperands(ptrInst, &ins_in_opnds); - BuildAndAppendInst(SpvOpCompositeInsert, varPteTypeId, insResultId, + BuildAndAppendInst(spv::Op::OpCompositeInsert, varPteTypeId, insResultId, ins_in_opnds, newInsts); context()->get_decoration_mgr()->CloneDecorations( - varId, insResultId, {SpvDecorationRelaxedPrecision}); + varId, insResultId, {spv::Decoration::RelaxedPrecision}); // Build and append Store - BuildAndAppendInst(SpvOpStore, 0, 0, + BuildAndAppendInst(spv::Op::OpStore, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {varId}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {insResultId}}}, newInsts); return true; } -bool LocalAccessChainConvertPass::IsConstantIndexAccessChain( +bool LocalAccessChainConvertPass::Is32BitConstantIndexAccessChain( const Instruction* acp) const { uint32_t inIdx = 0; return acp->WhileEachInId([&inIdx, this](const uint32_t* tid) { if (inIdx > 0) { Instruction* opInst = get_def_use_mgr()->GetDef(*tid); - if (opInst->opcode() != SpvOpConstant) return false; + if (opInst->opcode() != spv::Op::OpConstant) return false; + const auto* index = + context()->get_constant_mgr()->GetConstantFromInst(opInst); + int64_t index_value = index->GetSignExtendedValue(); + if (index_value > UINT32_MAX) return false; + if (index_value < 0) return false; } ++inIdx; return true; @@ -189,13 +201,13 @@ bool LocalAccessChainConvertPass::HasOnlySupportedRefs(uint32_t ptrId) { user->GetCommonDebugOpcode() == CommonDebugInfoDebugDeclare) { return true; } - SpvOp op = user->opcode(); - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { + spv::Op op = user->opcode(); + if (IsNonPtrAccessChain(op) || op == spv::Op::OpCopyObject) { if (!HasOnlySupportedRefs(user->result_id())) { return false; } - } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) { + } else if (op != spv::Op::OpStore && op != spv::Op::OpLoad && + op != spv::Op::OpName && !IsNonTypeDecorate(op)) { return false; } return true; @@ -210,12 +222,12 @@ void LocalAccessChainConvertPass::FindTargetVars(Function* func) { for (auto bi = func->begin(); bi != func->end(); ++bi) { for (auto ii = bi->begin(); ii != bi->end(); ++ii) { switch (ii->opcode()) { - case SpvOpStore: - case SpvOpLoad: { + case spv::Op::OpStore: + case spv::Op::OpLoad: { uint32_t varId; Instruction* ptrInst = GetPtr(&*ii, &varId); if (!IsTargetVar(varId)) break; - const SpvOp op = ptrInst->opcode(); + const spv::Op op = ptrInst->opcode(); // Rule out variables with non-supported refs eg function calls if (!HasOnlySupportedRefs(varId)) { seen_non_target_vars_.insert(varId); @@ -224,14 +236,21 @@ void LocalAccessChainConvertPass::FindTargetVars(Function* func) { } // Rule out variables with nested access chains // TODO(): Convert nested access chains - if (IsNonPtrAccessChain(op) && ptrInst->GetSingleWordInOperand( + bool is_non_ptr_access_chain = IsNonPtrAccessChain(op); + if (is_non_ptr_access_chain && ptrInst->GetSingleWordInOperand( kAccessChainPtrIdInIdx) != varId) { seen_non_target_vars_.insert(varId); seen_target_vars_.erase(varId); break; } // Rule out variables accessed with non-constant indices - if (!IsConstantIndexAccessChain(ptrInst)) { + if (!Is32BitConstantIndexAccessChain(ptrInst)) { + seen_non_target_vars_.insert(varId); + seen_target_vars_.erase(varId); + break; + } + + if (is_non_ptr_access_chain && AnyIndexIsOutOfBounds(ptrInst)) { seen_non_target_vars_.insert(varId); seen_target_vars_.erase(varId); break; @@ -254,7 +273,7 @@ Pass::Status LocalAccessChainConvertPass::ConvertLocalAccessChains( std::vector dead_instructions; for (auto ii = bi->begin(); ii != bi->end(); ++ii) { switch (ii->opcode()) { - case SpvOpLoad: { + case spv::Op::OpLoad: { uint32_t varId; Instruction* ptrInst = GetPtr(&*ii, &varId); if (!IsNonPtrAccessChain(ptrInst->opcode())) break; @@ -264,7 +283,7 @@ Pass::Status LocalAccessChainConvertPass::ConvertLocalAccessChains( } modified = true; } break; - case SpvOpStore: { + case spv::Op::OpStore: { uint32_t varId; Instruction* store = &*ii; Instruction* ptrInst = GetPtr(store, &varId); @@ -325,7 +344,7 @@ bool LocalAccessChainConvertPass::AllExtensionsSupported() const { // for the capability. This pass is only looking at function scope symbols, // so we do not care if there are variable pointers on storage buffers. if (context()->get_feature_mgr()->HasCapability( - SpvCapabilityVariablePointers)) + spv::Capability::VariablePointers)) return false; // If any extension not in allowlist, return false for (auto& ei : get_module()->extensions()) { @@ -337,7 +356,7 @@ bool LocalAccessChainConvertPass::AllExtensionsSupported() const { // around unknown extended // instruction sets even if they are non-semantic for (auto& inst : context()->module()->ext_inst_imports()) { - assert(inst.opcode() == SpvOpExtInstImport && + assert(inst.opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = inst.GetInOperand(0).AsString(); if (spvtools::utils::starts_with(extension_name, "NonSemantic.") && @@ -349,17 +368,12 @@ bool LocalAccessChainConvertPass::AllExtensionsSupported() const { } Pass::Status LocalAccessChainConvertPass::ProcessImpl() { - // If non-32-bit integer type in module, terminate processing - // TODO(): Handle non-32-bit integer constants in access chains - for (const Instruction& inst : get_module()->types_values()) - if (inst.opcode() == SpvOpTypeInt && - inst.GetSingleWordInOperand(kTypeIntWidthInIdx) != 32) - return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate for (auto& ai : get_module()->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; + if (ai.opcode() == spv::Op::OpGroupDecorate) + return Status::SuccessWithoutChange; // Do not process if any disallowed extensions are enabled if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; @@ -383,58 +397,76 @@ Pass::Status LocalAccessChainConvertPass::Process() { void LocalAccessChainConvertPass::InitExtensions() { extensions_allowlist_.clear(); - extensions_allowlist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_8bit_storage", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - // SPV_KHR_variable_pointers - // Currently do not support extended pointer expressions - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - "SPV_EXT_shader_stencil_export", - "SPV_EXT_shader_viewport_index_layer", - "SPV_AMD_shader_image_load_store_lod", - "SPV_AMD_shader_fragment_mask", - "SPV_EXT_fragment_fully_covered", - "SPV_AMD_gpu_shader_half_float_fetch", - "SPV_GOOGLE_decorate_string", - "SPV_GOOGLE_hlsl_functionality1", - "SPV_GOOGLE_user_type", - "SPV_NV_shader_subgroup_partitioned", - "SPV_EXT_demote_to_helper_invocation", - "SPV_EXT_descriptor_indexing", - "SPV_NV_fragment_shader_barycentric", - "SPV_NV_compute_shader_derivatives", - "SPV_NV_shader_image_footprint", - "SPV_NV_shading_rate", - "SPV_NV_mesh_shader", - "SPV_NV_ray_tracing", - "SPV_KHR_ray_tracing", - "SPV_KHR_ray_query", - "SPV_EXT_fragment_invocation_density", - "SPV_KHR_terminate_invocation", - "SPV_KHR_subgroup_uniform_control_flow", - "SPV_KHR_integer_dot_product", - "SPV_EXT_shader_image_int64", - "SPV_KHR_non_semantic_info", - }); + extensions_allowlist_.insert( + {"SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", "SPV_KHR_8bit_storage", "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + // SPV_KHR_variable_pointers + // Currently do not support extended pointer expressions + "SPV_AMD_gpu_shader_int16", "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1", + "SPV_GOOGLE_user_type", "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_demote_to_helper_invocation", "SPV_EXT_descriptor_indexing", + "SPV_NV_fragment_shader_barycentric", + "SPV_NV_compute_shader_derivatives", "SPV_NV_shader_image_footprint", + "SPV_NV_shading_rate", "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader", + "SPV_NV_ray_tracing", "SPV_KHR_ray_tracing", "SPV_KHR_ray_query", + "SPV_EXT_fragment_invocation_density", "SPV_KHR_terminate_invocation", + "SPV_KHR_subgroup_uniform_control_flow", "SPV_KHR_integer_dot_product", + "SPV_EXT_shader_image_int64", "SPV_KHR_non_semantic_info", + "SPV_KHR_uniform_group_instructions", + "SPV_KHR_fragment_shader_barycentric", "SPV_KHR_vulkan_memory_model", + "SPV_NV_bindless_texture", "SPV_EXT_shader_atomic_float_add", + "SPV_EXT_fragment_shader_interlock", + "SPV_NV_compute_shader_derivatives"}); +} + +bool LocalAccessChainConvertPass::AnyIndexIsOutOfBounds( + const Instruction* access_chain_inst) { + assert(IsNonPtrAccessChain(access_chain_inst->opcode())); + + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); + auto constants = const_mgr->GetOperandConstants(access_chain_inst); + uint32_t base_pointer_id = access_chain_inst->GetSingleWordInOperand(0); + Instruction* base_pointer = get_def_use_mgr()->GetDef(base_pointer_id); + const analysis::Pointer* base_pointer_type = + type_mgr->GetType(base_pointer->type_id())->AsPointer(); + assert(base_pointer_type != nullptr && + "The base of the access chain is not a pointer."); + const analysis::Type* current_type = base_pointer_type->pointee_type(); + for (uint32_t i = 1; i < access_chain_inst->NumInOperands(); ++i) { + if (IsIndexOutOfBounds(constants[i], current_type)) { + return true; + } + + uint32_t index = + (constants[i] + ? static_cast(constants[i]->GetZeroExtendedValue()) + : 0); + current_type = type_mgr->GetMemberType(current_type, {index}); + } + + return false; +} + +bool LocalAccessChainConvertPass::IsIndexOutOfBounds( + const analysis::Constant* index, const analysis::Type* type) const { + if (index == nullptr) { + return false; + } + return index->GetZeroExtendedValue() >= type->NumberOfComponents(); } } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.h index 552062e52..0cda196f6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_access_chain_convert_pass.h @@ -64,7 +64,7 @@ class LocalAccessChainConvertPass : public MemPass { // Build instruction from |opcode|, |typeId|, |resultId|, and |in_opnds|. // Append to |newInsts|. - void BuildAndAppendInst(SpvOp opcode, uint32_t typeId, uint32_t resultId, + void BuildAndAppendInst(spv::Op opcode, uint32_t typeId, uint32_t resultId, const std::vector& in_opnds, std::vector>* newInsts); @@ -81,7 +81,7 @@ class LocalAccessChainConvertPass : public MemPass { std::vector* in_opnds); // Create a load/insert/store equivalent to a store of - // |valId| through (constant index) access chaing |ptrInst|. + // |valId| through (constant index) access chain |ptrInst|. // Append to |newInsts|. Returns true if successful. bool GenAccessChainStoreReplacement( const Instruction* ptrInst, uint32_t valId, @@ -94,8 +94,9 @@ class LocalAccessChainConvertPass : public MemPass { bool ReplaceAccessChainLoad(const Instruction* address_inst, Instruction* original_load); - // Return true if all indices of access chain |acp| are OpConstant integers - bool IsConstantIndexAccessChain(const Instruction* acp) const; + // Return true if all indices of the access chain |acp| are OpConstant + // integers whose signed values can be represented as unsigned 32-bit values. + bool Is32BitConstantIndexAccessChain(const Instruction* acp) const; // Identify all function scope variables of target type which are // accessed only with loads, stores and access chains with constant @@ -110,6 +111,17 @@ class LocalAccessChainConvertPass : public MemPass { // Returns a status to indicate success or failure, and change or no change. Status ConvertLocalAccessChains(Function* func); + // Returns true one of the indexes in the |access_chain_inst| is definitly out + // of bounds. If the size of the type or the value of the index is unknown, + // then it will be considered in-bounds. + bool AnyIndexIsOutOfBounds(const Instruction* access_chain_inst); + + // Returns true if getting element |index| from |type| would be out-of-bounds. + // If |index| is nullptr or the size of the type are unknown, then it will be + // considered in-bounds. + bool IsIndexOutOfBounds(const analysis::Constant* index, + const analysis::Type* type) const; + // Initialize extensions allowlist void InitExtensions(); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_block_elim_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_block_elim_pass.cpp index f48c56aab..d7a9295e8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_block_elim_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_block_elim_pass.cpp @@ -18,16 +18,13 @@ #include -#include "source/opt/iterator.h" #include "source/util/string_utils.h" namespace spvtools { namespace opt { namespace { - -const uint32_t kStoreValIdInIdx = 1; - -} // anonymous namespace +constexpr uint32_t kStoreValIdInIdx = 1; +} // namespace bool LocalSingleBlockLoadStoreElimPass::HasOnlySupportedRefs(uint32_t ptrId) { if (supported_ref_ptrs_.find(ptrId) != supported_ref_ptrs_.end()) return true; @@ -37,13 +34,13 @@ bool LocalSingleBlockLoadStoreElimPass::HasOnlySupportedRefs(uint32_t ptrId) { dbg_op == CommonDebugInfoDebugValue) { return true; } - SpvOp op = user->opcode(); - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { + spv::Op op = user->opcode(); + if (IsNonPtrAccessChain(op) || op == spv::Op::OpCopyObject) { if (!HasOnlySupportedRefs(user->result_id())) { return false; } - } else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) { + } else if (op != spv::Op::OpStore && op != spv::Op::OpLoad && + op != spv::Op::OpName && !IsNonTypeDecorate(op)) { return false; } return true; @@ -68,7 +65,7 @@ bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( for (auto ii = next; ii != bi->end(); ii = next) { ++next; switch (ii->opcode()) { - case SpvOpStore: { + case spv::Op::OpStore: { // Verify store variable is target type uint32_t varId; Instruction* ptrInst = GetPtr(&*ii, &varId); @@ -77,7 +74,7 @@ bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( // If a store to the whole variable, remember it for succeeding // loads and stores. Otherwise forget any previous store to that // variable. - if (ptrInst->opcode() == SpvOpVariable) { + if (ptrInst->opcode() == spv::Op::OpVariable) { // If a previous store to same variable, mark the store // for deletion if not still used. Don't delete store // if debugging; let ssa-rewrite and DCE handle it @@ -114,14 +111,14 @@ bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( var2load_.erase(varId); } } break; - case SpvOpLoad: { + case spv::Op::OpLoad: { // Verify store variable is target type uint32_t varId; Instruction* ptrInst = GetPtr(&*ii, &varId); if (!IsTargetVar(varId)) continue; if (!HasOnlySupportedRefs(varId)) continue; uint32_t replId = 0; - if (ptrInst->opcode() == SpvOpVariable) { + if (ptrInst->opcode() == spv::Op::OpVariable) { // If a load from a variable, look for a previous store or // load from that variable and use its value. auto si = var2store_.find(varId); @@ -146,11 +143,11 @@ bool LocalSingleBlockLoadStoreElimPass::LocalSingleBlockLoadStoreElim( instructions_to_kill.push_back(&*ii); modified = true; } else { - if (ptrInst->opcode() == SpvOpVariable) + if (ptrInst->opcode() == spv::Op::OpVariable) var2load_[varId] = &*ii; // register load } } break; - case SpvOpFunctionCall: { + case spv::Op::OpFunctionCall: { // Conservatively assume all locals are redefined for now. // TODO(): Handle more optimally var2store_.clear(); @@ -192,7 +189,7 @@ bool LocalSingleBlockLoadStoreElimPass::AllExtensionsSupported() const { // around unknown extended // instruction sets even if they are non-semantic for (auto& inst : context()->module()->ext_inst_imports()) { - assert(inst.opcode() == SpvOpExtInstImport && + assert(inst.opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = inst.GetInOperand(0).AsString(); if (spvtools::utils::starts_with(extension_name, "NonSemantic.") && @@ -205,14 +202,15 @@ bool LocalSingleBlockLoadStoreElimPass::AllExtensionsSupported() const { Pass::Status LocalSingleBlockLoadStoreElimPass::ProcessImpl() { // Assumes relaxed logical addressing only (see instruction.h). - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Addresses)) return Status::SuccessWithoutChange; // Do not process if module contains OpGroupDecorate. Additional // support required in KillNamesAndDecorates(). // TODO(greg-lunarg): Add support for OpGroupDecorate for (auto& ai : get_module()->annotations()) - if (ai.opcode() == SpvOpGroupDecorate) return Status::SuccessWithoutChange; + if (ai.opcode() == spv::Op::OpGroupDecorate) + return Status::SuccessWithoutChange; // If any extensions in the module are not explicitly supported, // return unmodified. if (!AllExtensionsSupported()) return Status::SuccessWithoutChange; @@ -235,58 +233,65 @@ Pass::Status LocalSingleBlockLoadStoreElimPass::Process() { void LocalSingleBlockLoadStoreElimPass::InitExtensions() { extensions_allowlist_.clear(); - extensions_allowlist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_8bit_storage", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - "SPV_KHR_variable_pointers", - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - "SPV_EXT_shader_stencil_export", - "SPV_EXT_shader_viewport_index_layer", - "SPV_AMD_shader_image_load_store_lod", - "SPV_AMD_shader_fragment_mask", - "SPV_EXT_fragment_fully_covered", - "SPV_AMD_gpu_shader_half_float_fetch", - "SPV_GOOGLE_decorate_string", - "SPV_GOOGLE_hlsl_functionality1", - "SPV_GOOGLE_user_type", - "SPV_NV_shader_subgroup_partitioned", - "SPV_EXT_demote_to_helper_invocation", - "SPV_EXT_descriptor_indexing", - "SPV_NV_fragment_shader_barycentric", - "SPV_NV_compute_shader_derivatives", - "SPV_NV_shader_image_footprint", - "SPV_NV_shading_rate", - "SPV_NV_mesh_shader", - "SPV_NV_ray_tracing", - "SPV_KHR_ray_tracing", - "SPV_KHR_ray_query", - "SPV_EXT_fragment_invocation_density", - "SPV_EXT_physical_storage_buffer", - "SPV_KHR_terminate_invocation", - "SPV_KHR_subgroup_uniform_control_flow", - "SPV_KHR_integer_dot_product", - "SPV_EXT_shader_image_int64", - "SPV_KHR_non_semantic_info", - }); + extensions_allowlist_.insert({"SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_8bit_storage", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + "SPV_KHR_variable_pointers", + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_GOOGLE_user_type", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_demote_to_helper_invocation", + "SPV_EXT_descriptor_indexing", + "SPV_NV_fragment_shader_barycentric", + "SPV_NV_compute_shader_derivatives", + "SPV_NV_shader_image_footprint", + "SPV_NV_shading_rate", + "SPV_NV_mesh_shader", + "SPV_EXT_mesh_shader", + "SPV_NV_ray_tracing", + "SPV_KHR_ray_tracing", + "SPV_KHR_ray_query", + "SPV_EXT_fragment_invocation_density", + "SPV_EXT_physical_storage_buffer", + "SPV_KHR_physical_storage_buffer", + "SPV_KHR_terminate_invocation", + "SPV_KHR_subgroup_uniform_control_flow", + "SPV_KHR_integer_dot_product", + "SPV_EXT_shader_image_int64", + "SPV_KHR_non_semantic_info", + "SPV_KHR_uniform_group_instructions", + "SPV_KHR_fragment_shader_barycentric", + "SPV_KHR_vulkan_memory_model", + "SPV_NV_bindless_texture", + "SPV_EXT_shader_atomic_float_add", + "SPV_EXT_fragment_shader_interlock", + "SPV_NV_compute_shader_derivatives"}); } } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_store_elim_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_store_elim_pass.cpp index 123d03bf5..7cd6b0eb4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_store_elim_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/local_single_store_elim_pass.cpp @@ -17,19 +17,14 @@ #include "source/opt/local_single_store_elim_pass.h" #include "source/cfa.h" -#include "source/latest_version_glsl_std_450_header.h" -#include "source/opt/iterator.h" #include "source/util/string_utils.h" namespace spvtools { namespace opt { - namespace { - -const uint32_t kStoreValIdInIdx = 1; -const uint32_t kVariableInitIdInIdx = 1; - -} // anonymous namespace +constexpr uint32_t kStoreValIdInIdx = 1; +constexpr uint32_t kVariableInitIdInIdx = 1; +} // namespace bool LocalSingleStoreElimPass::LocalSingleStoreElim(Function* func) { bool modified = false; @@ -37,7 +32,7 @@ bool LocalSingleStoreElimPass::LocalSingleStoreElim(Function* func) { // Check all function scope variables in |func|. BasicBlock* entry_block = &*func->begin(); for (Instruction& inst : *entry_block) { - if (inst.opcode() != SpvOpVariable) { + if (inst.opcode() != spv::Op::OpVariable) { break; } @@ -57,7 +52,7 @@ bool LocalSingleStoreElimPass::AllExtensionsSupported() const { // around unknown extended // instruction sets even if they are non-semantic for (auto& inst : context()->module()->ext_inst_imports()) { - assert(inst.opcode() == SpvOpExtInstImport && + assert(inst.opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = inst.GetInOperand(0).AsString(); if (spvtools::utils::starts_with(extension_name, "NonSemantic.") && @@ -70,7 +65,7 @@ bool LocalSingleStoreElimPass::AllExtensionsSupported() const { Pass::Status LocalSingleStoreElimPass::ProcessImpl() { // Assumes relaxed logical addressing only (see instruction.h) - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Addresses)) return Status::SuccessWithoutChange; // Do not process if any disallowed extensions are enabled @@ -91,55 +86,62 @@ Pass::Status LocalSingleStoreElimPass::Process() { } void LocalSingleStoreElimPass::InitExtensionAllowList() { - extensions_allowlist_.insert({ - "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_AMD_shader_trinary_minmax", - "SPV_AMD_gcn_shader", - "SPV_KHR_shader_ballot", - "SPV_AMD_shader_ballot", - "SPV_AMD_gpu_shader_half_float", - "SPV_KHR_shader_draw_parameters", - "SPV_KHR_subgroup_vote", - "SPV_KHR_8bit_storage", - "SPV_KHR_16bit_storage", - "SPV_KHR_device_group", - "SPV_KHR_multiview", - "SPV_NVX_multiview_per_view_attributes", - "SPV_NV_viewport_array2", - "SPV_NV_stereo_view_rendering", - "SPV_NV_sample_mask_override_coverage", - "SPV_NV_geometry_shader_passthrough", - "SPV_AMD_texture_gather_bias_lod", - "SPV_KHR_storage_buffer_storage_class", - "SPV_KHR_variable_pointers", - "SPV_AMD_gpu_shader_int16", - "SPV_KHR_post_depth_coverage", - "SPV_KHR_shader_atomic_counter_ops", - "SPV_EXT_shader_stencil_export", - "SPV_EXT_shader_viewport_index_layer", - "SPV_AMD_shader_image_load_store_lod", - "SPV_AMD_shader_fragment_mask", - "SPV_EXT_fragment_fully_covered", - "SPV_AMD_gpu_shader_half_float_fetch", - "SPV_GOOGLE_decorate_string", - "SPV_GOOGLE_hlsl_functionality1", - "SPV_NV_shader_subgroup_partitioned", - "SPV_EXT_descriptor_indexing", - "SPV_NV_fragment_shader_barycentric", - "SPV_NV_compute_shader_derivatives", - "SPV_NV_shader_image_footprint", - "SPV_NV_shading_rate", - "SPV_NV_mesh_shader", - "SPV_NV_ray_tracing", - "SPV_KHR_ray_query", - "SPV_EXT_fragment_invocation_density", - "SPV_EXT_physical_storage_buffer", - "SPV_KHR_terminate_invocation", - "SPV_KHR_subgroup_uniform_control_flow", - "SPV_KHR_integer_dot_product", - "SPV_EXT_shader_image_int64", - "SPV_KHR_non_semantic_info", - }); + extensions_allowlist_.insert({"SPV_AMD_shader_explicit_vertex_parameter", + "SPV_AMD_shader_trinary_minmax", + "SPV_AMD_gcn_shader", + "SPV_KHR_shader_ballot", + "SPV_AMD_shader_ballot", + "SPV_AMD_gpu_shader_half_float", + "SPV_KHR_shader_draw_parameters", + "SPV_KHR_subgroup_vote", + "SPV_KHR_8bit_storage", + "SPV_KHR_16bit_storage", + "SPV_KHR_device_group", + "SPV_KHR_multiview", + "SPV_NVX_multiview_per_view_attributes", + "SPV_NV_viewport_array2", + "SPV_NV_stereo_view_rendering", + "SPV_NV_sample_mask_override_coverage", + "SPV_NV_geometry_shader_passthrough", + "SPV_AMD_texture_gather_bias_lod", + "SPV_KHR_storage_buffer_storage_class", + "SPV_KHR_variable_pointers", + "SPV_AMD_gpu_shader_int16", + "SPV_KHR_post_depth_coverage", + "SPV_KHR_shader_atomic_counter_ops", + "SPV_EXT_shader_stencil_export", + "SPV_EXT_shader_viewport_index_layer", + "SPV_AMD_shader_image_load_store_lod", + "SPV_AMD_shader_fragment_mask", + "SPV_EXT_fragment_fully_covered", + "SPV_AMD_gpu_shader_half_float_fetch", + "SPV_GOOGLE_decorate_string", + "SPV_GOOGLE_hlsl_functionality1", + "SPV_NV_shader_subgroup_partitioned", + "SPV_EXT_descriptor_indexing", + "SPV_NV_fragment_shader_barycentric", + "SPV_NV_compute_shader_derivatives", + "SPV_NV_shader_image_footprint", + "SPV_NV_shading_rate", + "SPV_NV_mesh_shader", + "SPV_EXT_mesh_shader", + "SPV_NV_ray_tracing", + "SPV_KHR_ray_query", + "SPV_EXT_fragment_invocation_density", + "SPV_EXT_physical_storage_buffer", + "SPV_KHR_physical_storage_buffer", + "SPV_KHR_terminate_invocation", + "SPV_KHR_subgroup_uniform_control_flow", + "SPV_KHR_integer_dot_product", + "SPV_EXT_shader_image_int64", + "SPV_KHR_non_semantic_info", + "SPV_KHR_uniform_group_instructions", + "SPV_KHR_fragment_shader_barycentric", + "SPV_KHR_vulkan_memory_model", + "SPV_NV_bindless_texture", + "SPV_EXT_shader_atomic_float_add", + "SPV_EXT_fragment_shader_interlock", + "SPV_NV_compute_shader_derivatives"}); } bool LocalSingleStoreElimPass::ProcessVariable(Instruction* var_inst) { std::vector users; @@ -173,29 +175,9 @@ bool LocalSingleStoreElimPass::ProcessVariable(Instruction* var_inst) { bool LocalSingleStoreElimPass::RewriteDebugDeclares(Instruction* store_inst, uint32_t var_id) { - std::unordered_set invisible_decls; uint32_t value_id = store_inst->GetSingleWordInOperand(1); - bool modified = - context()->get_debug_info_mgr()->AddDebugValueIfVarDeclIsVisible( - store_inst, var_id, value_id, store_inst, &invisible_decls); - - // For cases like the argument passing for an inlined function, the value - // assignment is out of DebugDeclare's scope, but we have to preserve the - // value assignment information using DebugValue. Generally, we need - // ssa-rewrite analysis to decide a proper value assignment but at this point - // we confirm that |var_id| has a single store. We can safely add DebugValue. - if (!invisible_decls.empty()) { - BasicBlock* store_block = context()->get_instr_block(store_inst); - DominatorAnalysis* dominator_analysis = - context()->GetDominatorAnalysis(store_block->GetParent()); - for (auto* decl : invisible_decls) { - if (dominator_analysis->Dominates(store_inst, decl)) { - context()->get_debug_info_mgr()->AddDebugValueForDecl(decl, value_id, - decl, store_inst); - modified = true; - } - } - } + bool modified = context()->get_debug_info_mgr()->AddDebugValueForVariable( + store_inst, var_id, value_id, store_inst); modified |= context()->get_debug_info_mgr()->KillDebugDeclares(var_id); return modified; } @@ -212,7 +194,7 @@ Instruction* LocalSingleStoreElimPass::FindSingleStoreAndCheckUses( for (Instruction* user : users) { switch (user->opcode()) { - case SpvOpStore: + case spv::Op::OpStore: // Since we are in the relaxed addressing mode, the use has to be the // base address of the store, and not the value being store. Otherwise, // we would have a pointer to a pointer to function scope memory, which @@ -224,19 +206,19 @@ Instruction* LocalSingleStoreElimPass::FindSingleStoreAndCheckUses( return nullptr; } break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: if (FeedsAStore(user)) { // Has a partial store. Cannot propagate that. return nullptr; } break; - case SpvOpLoad: - case SpvOpImageTexelPointer: - case SpvOpName: - case SpvOpCopyObject: + case spv::Op::OpLoad: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpName: + case spv::Op::OpCopyObject: break; - case SpvOpExtInst: { + case spv::Op::OpExtInst: { auto dbg_op = user->GetCommonDebugOpcode(); if (dbg_op == CommonDebugInfoDebugDeclare || dbg_op == CommonDebugInfoDebugValue) { @@ -261,7 +243,7 @@ void LocalSingleStoreElimPass::FindUses( analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); def_use_mgr->ForEachUser(var_inst, [users, this](Instruction* user) { users->push_back(user); - if (user->opcode() == SpvOpCopyObject) { + if (user->opcode() == spv::Op::OpCopyObject) { FindUses(user, users); } }); @@ -271,15 +253,15 @@ bool LocalSingleStoreElimPass::FeedsAStore(Instruction* inst) const { analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); return !def_use_mgr->WhileEachUser(inst, [this](Instruction* user) { switch (user->opcode()) { - case SpvOpStore: + case spv::Op::OpStore: return false; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpCopyObject: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpCopyObject: return !FeedsAStore(user); - case SpvOpLoad: - case SpvOpImageTexelPointer: - case SpvOpName: + case spv::Op::OpLoad: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpName: return true; default: // Don't know if this instruction modifies the variable. @@ -297,7 +279,7 @@ bool LocalSingleStoreElimPass::RewriteLoads( context()->GetDominatorAnalysis(store_block->GetParent()); uint32_t stored_id; - if (store_inst->opcode() == SpvOpStore) + if (store_inst->opcode() == spv::Op::OpStore) stored_id = store_inst->GetSingleWordInOperand(kStoreValIdInIdx); else stored_id = store_inst->GetSingleWordInOperand(kVariableInitIdInIdx); @@ -305,12 +287,12 @@ bool LocalSingleStoreElimPass::RewriteLoads( *all_rewritten = true; bool modified = false; for (Instruction* use : uses) { - if (use->opcode() == SpvOpStore) continue; + if (use->opcode() == spv::Op::OpStore) continue; auto dbg_op = use->GetCommonDebugOpcode(); if (dbg_op == CommonDebugInfoDebugDeclare || dbg_op == CommonDebugInfoDebugValue) continue; - if (use->opcode() == SpvOpLoad && + if (use->opcode() == spv::Op::OpLoad && dominator_analysis->Dominates(store_inst, use)) { modified = true; context()->KillNamesAndDecorates(use->result_id()); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/log.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/log.h index 68051002e..4fb66fd45 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/log.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/log.h @@ -23,7 +23,7 @@ #include "spirv-tools/libspirv.hpp" // Asserts the given condition is true. Otherwise, sends a message to the -// consumer and exits the problem with failure code. Accepts the following +// consumer and exits the program with failure code. Accepts the following // formats: // // SPIRV_ASSERT(, ); @@ -36,7 +36,9 @@ #if !defined(NDEBUG) #define SPIRV_ASSERT(consumer, ...) SPIRV_ASSERT_IMPL(consumer, __VA_ARGS__) #else -#define SPIRV_ASSERT(consumer, ...) +// Adding a use to avoid errors in the release build related to unused +// consumers. +#define SPIRV_ASSERT(consumer, ...) (void)(consumer) #endif // Logs a debug message to the consumer. Accepts the following formats: @@ -49,26 +51,11 @@ #if !defined(NDEBUG) && defined(SPIRV_LOG_DEBUG) #define SPIRV_DEBUG(consumer, ...) SPIRV_DEBUG_IMPL(consumer, __VA_ARGS__) #else -#define SPIRV_DEBUG(consumer, ...) +// Adding a use to avoid errors in the release build related to unused +// consumers. +#define SPIRV_DEBUG(consumer, ...) (void)(consumer) #endif -// Logs an error message to the consumer saying the given feature is -// unimplemented. -#define SPIRV_UNIMPLEMENTED(consumer, feature) \ - do { \ - spvtools::Log(consumer, SPV_MSG_INTERNAL_ERROR, __FILE__, \ - {static_cast(__LINE__), 0, 0}, \ - "unimplemented: " feature); \ - } while (0) - -// Logs an error message to the consumer saying the code location -// should be unreachable. -#define SPIRV_UNREACHABLE(consumer) \ - do { \ - spvtools::Log(consumer, SPV_MSG_INTERNAL_ERROR, __FILE__, \ - {static_cast(__LINE__), 0, 0}, "unreachable"); \ - } while (0) - // Helper macros for concatenating arguments. #define SPIRV_CONCATENATE(a, b) SPIRV_CONCATENATE_(a, b) #define SPIRV_CONCATENATE_(a, b) a##b diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence.cpp index d8de699bf..e41c044af 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence.cpp @@ -15,14 +15,12 @@ #include "source/opt/loop_dependence.h" #include -#include #include #include #include #include #include "source/opt/instruction.h" -#include "source/opt/scalar_analysis.h" #include "source/opt/scalar_analysis_nodes.h" namespace spvtools { @@ -192,8 +190,8 @@ bool LoopDependenceAnalysis::GetDependence(const Instruction* source, Instruction* destination_access_chain = GetOperandDefinition(destination, 0); auto num_access_chains = - (source_access_chain->opcode() == SpvOpAccessChain) + - (destination_access_chain->opcode() == SpvOpAccessChain); + (source_access_chain->opcode() == spv::Op::OpAccessChain) + + (destination_access_chain->opcode() == spv::Op::OpAccessChain); // If neither is an access chain, then they are load/store to a variable. if (num_access_chains == 0) { @@ -211,7 +209,8 @@ bool LoopDependenceAnalysis::GetDependence(const Instruction* source, // If only one is an access chain, it could be accessing a part of a struct if (num_access_chains == 1) { - auto source_is_chain = source_access_chain->opcode() == SpvOpAccessChain; + auto source_is_chain = + source_access_chain->opcode() == spv::Op::OpAccessChain; auto access_chain = source_is_chain ? source_access_chain : destination_access_chain; auto variable = @@ -238,8 +237,8 @@ bool LoopDependenceAnalysis::GetDependence(const Instruction* source, GetOperandDefinition(destination_access_chain, 0); // Nested access chains are not supported yet, bail out. - if (source_array->opcode() == SpvOpAccessChain || - destination_array->opcode() == SpvOpAccessChain) { + if (source_array->opcode() == spv::Op::OpAccessChain || + destination_array->opcode() == spv::Op::OpAccessChain) { for (auto& entry : distance_vector->GetEntries()) { entry = DistanceEntry(); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence_helpers.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence_helpers.cpp index de27a0a72..5d7d99403 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence_helpers.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_dependence_helpers.cpp @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "source/opt/loop_dependence.h" - #include #include #include @@ -23,7 +21,7 @@ #include "source/opt/basic_block.h" #include "source/opt/instruction.h" -#include "source/opt/scalar_analysis.h" +#include "source/opt/loop_dependence.h" #include "source/opt/scalar_analysis_nodes.h" namespace spvtools { @@ -54,20 +52,20 @@ SENode* LoopDependenceAnalysis::GetLowerBound(const Loop* loop) { } Instruction* lower_inst = GetOperandDefinition(cond_inst, 0); switch (cond_inst->opcode()) { - case SpvOpULessThan: - case SpvOpSLessThan: - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: { + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: { // If we have a phi we are looking at the induction variable. We look // through the phi to the initial value of the phi upon entering the loop. - if (lower_inst->opcode() == SpvOpPhi) { + if (lower_inst->opcode() == spv::Op::OpPhi) { lower_inst = GetOperandDefinition(lower_inst, 0); // We don't handle looking through multiple phis. - if (lower_inst->opcode() == SpvOpPhi) { + if (lower_inst->opcode() == spv::Op::OpPhi) { return nullptr; } } @@ -86,8 +84,8 @@ SENode* LoopDependenceAnalysis::GetUpperBound(const Loop* loop) { } Instruction* upper_inst = GetOperandDefinition(cond_inst, 1); switch (cond_inst->opcode()) { - case SpvOpULessThan: - case SpvOpSLessThan: { + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: { // When we have a < condition we must subtract 1 from the analyzed upper // instruction. SENode* upper_bound = scalar_evolution_.SimplifyExpression( @@ -96,8 +94,8 @@ SENode* LoopDependenceAnalysis::GetUpperBound(const Loop* loop) { scalar_evolution_.CreateConstant(1))); return upper_bound; } - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: { + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: { // When we have a > condition we must add 1 to the analyzed upper // instruction. SENode* upper_bound = @@ -106,10 +104,10 @@ SENode* LoopDependenceAnalysis::GetUpperBound(const Loop* loop) { scalar_evolution_.CreateConstant(1))); return upper_bound; } - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: { + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: { // We don't need to modify the results of analyzing when we have <= or >=. SENode* upper_bound = scalar_evolution_.SimplifyExpression( scalar_evolution_.AnalyzeInstruction(upper_inst)); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.cpp index b5b563098..cbfc2e759 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.cpp @@ -15,17 +15,14 @@ #include "source/opt/loop_descriptor.h" #include -#include #include #include -#include #include #include #include "source/opt/cfg.h" #include "source/opt/constants.h" #include "source/opt/dominator_tree.h" -#include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/opt/iterator.h" #include "source/opt/tree_iterator.h" @@ -39,7 +36,7 @@ namespace opt { Instruction* Loop::GetInductionStepOperation( const Instruction* induction) const { // Induction must be a phi instruction. - assert(induction->opcode() == SpvOpPhi); + assert(induction->opcode() == spv::Op::OpPhi); Instruction* step = nullptr; @@ -75,8 +72,8 @@ Instruction* Loop::GetInductionStepOperation( return nullptr; } - if (def_use_manager->GetDef(lhs)->opcode() != SpvOp::SpvOpConstant && - def_use_manager->GetDef(rhs)->opcode() != SpvOp::SpvOpConstant) { + if (def_use_manager->GetDef(lhs)->opcode() != spv::Op::OpConstant && + def_use_manager->GetDef(rhs)->opcode() != spv::Op::OpConstant) { return nullptr; } @@ -85,31 +82,31 @@ Instruction* Loop::GetInductionStepOperation( // Returns true if the |step| operation is an induction variable step operation // which is currently handled. -bool Loop::IsSupportedStepOp(SpvOp step) const { +bool Loop::IsSupportedStepOp(spv::Op step) const { switch (step) { - case SpvOp::SpvOpISub: - case SpvOp::SpvOpIAdd: + case spv::Op::OpISub: + case spv::Op::OpIAdd: return true; default: return false; } } -bool Loop::IsSupportedCondition(SpvOp condition) const { +bool Loop::IsSupportedCondition(spv::Op condition) const { switch (condition) { // < - case SpvOp::SpvOpULessThan: - case SpvOp::SpvOpSLessThan: + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: // > - case SpvOp::SpvOpUGreaterThan: - case SpvOp::SpvOpSGreaterThan: + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: // >= - case SpvOp::SpvOpSGreaterThanEqual: - case SpvOp::SpvOpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpUGreaterThanEqual: // <= - case SpvOp::SpvOpSLessThanEqual: - case SpvOp::SpvOpULessThanEqual: + case spv::Op::OpSLessThanEqual: + case spv::Op::OpULessThanEqual: return true; default: @@ -117,7 +114,8 @@ bool Loop::IsSupportedCondition(SpvOp condition) const { } } -int64_t Loop::GetResidualConditionValue(SpvOp condition, int64_t initial_value, +int64_t Loop::GetResidualConditionValue(spv::Op condition, + int64_t initial_value, int64_t step_value, size_t number_of_iterations, size_t factor) { @@ -128,13 +126,13 @@ int64_t Loop::GetResidualConditionValue(SpvOp condition, int64_t initial_value, // loop where just less than or greater than. Adding or subtracting one should // give a functionally equivalent value. switch (condition) { - case SpvOp::SpvOpSGreaterThanEqual: - case SpvOp::SpvOpUGreaterThanEqual: { + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpUGreaterThanEqual: { remainder -= 1; break; } - case SpvOp::SpvOpSLessThanEqual: - case SpvOp::SpvOpULessThanEqual: { + case spv::Op::OpSLessThanEqual: + case spv::Op::OpULessThanEqual: { remainder += 1; break; } @@ -152,7 +150,7 @@ Instruction* Loop::GetConditionInst() const { } Instruction* branch_conditional = &*condition_block->tail(); if (!branch_conditional || - branch_conditional->opcode() != SpvOpBranchConditional) { + branch_conditional->opcode() != spv::Op::OpBranchConditional) { return nullptr; } Instruction* condition_inst = context_->get_def_use_mgr()->GetDef( @@ -318,7 +316,7 @@ void Loop::SetMergeBlock(BasicBlock* merge) { void Loop::SetPreHeaderBlock(BasicBlock* preheader) { if (preheader) { assert(!IsInsideLoop(preheader) && "The preheader block is in the loop"); - assert(preheader->tail()->opcode() == SpvOpBranch && + assert(preheader->tail()->opcode() == spv::Op::OpBranch && "The preheader block does not unconditionally branch to the header " "block"); assert(preheader->tail()->GetSingleWordOperand(0) == @@ -387,7 +385,7 @@ void Loop::GetMergingBlocks( namespace { -static inline bool IsBasicBlockSafeToClone(IRContext* context, BasicBlock* bb) { +inline bool IsBasicBlockSafeToClone(IRContext* context, BasicBlock* bb) { for (Instruction& inst : *bb) { if (!inst.IsBranch() && !context->IsCombinatorInstruction(&inst)) return false; @@ -443,7 +441,7 @@ bool Loop::IsLCSSA() const { BasicBlock* parent = ir_context->get_instr_block(use); assert(parent && "Invalid analysis"); if (IsInsideLoop(parent)) return true; - if (use->opcode() != SpvOpPhi) return false; + if (use->opcode() != spv::Op::OpPhi) return false; return exit_blocks.count(parent->id()); })) return false; @@ -452,25 +450,20 @@ bool Loop::IsLCSSA() const { return true; } -bool Loop::ShouldHoistInstruction(IRContext* context, Instruction* inst) { - return AreAllOperandsOutsideLoop(context, inst) && - inst->IsOpcodeCodeMotionSafe(); +bool Loop::ShouldHoistInstruction(const Instruction& inst) const { + return inst.IsOpcodeCodeMotionSafe() && AreAllOperandsOutsideLoop(inst) && + (!inst.IsLoad() || inst.IsReadOnlyLoad()); } -bool Loop::AreAllOperandsOutsideLoop(IRContext* context, Instruction* inst) { - analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); - bool all_outside_loop = true; +bool Loop::AreAllOperandsOutsideLoop(const Instruction& inst) const { + analysis::DefUseManager* def_use_mgr = GetContext()->get_def_use_mgr(); - const std::function operand_outside_loop = - [this, &def_use_mgr, &all_outside_loop](uint32_t* id) { - if (this->IsInsideLoop(def_use_mgr->GetDef(*id))) { - all_outside_loop = false; - return; - } + const std::function operand_outside_loop = + [this, &def_use_mgr](const uint32_t* id) { + return !this->IsInsideLoop(def_use_mgr->GetDef(*id)); }; - inst->ForEachInId(operand_outside_loop); - return all_outside_loop; + return inst.WhileEachInId(operand_outside_loop); } void Loop::ComputeLoopStructuredOrder( @@ -486,7 +479,7 @@ void Loop::ComputeLoopStructuredOrder( ordered_loop_blocks->push_back(loop_preheader_); bool is_shader = - context_->get_feature_mgr()->HasCapability(SpvCapabilityShader); + context_->get_feature_mgr()->HasCapability(spv::Capability::Shader); if (!is_shader) { cfg.ForEachBlockInReversePostOrder( loop_header_, [ordered_loop_blocks, this](BasicBlock* bb) { @@ -497,7 +490,8 @@ void Loop::ComputeLoopStructuredOrder( // continue blocks that must be copied to retain the structured order. // The structured order will include these. std::list order; - cfg.ComputeStructuredOrder(loop_header_->GetParent(), loop_header_, &order); + cfg.ComputeStructuredOrder(loop_header_->GetParent(), loop_header_, + loop_merge_, &order); for (BasicBlock* bb : order) { if (bb == GetMergeBlock()) { break; @@ -646,7 +640,7 @@ BasicBlock* Loop::FindConditionBlock() const { const Instruction& branch = *bb->ctail(); // Make sure the branch is a conditional branch. - if (branch.opcode() != SpvOpBranchConditional) return nullptr; + if (branch.opcode() != spv::Op::OpBranchConditional) return nullptr; // Make sure one of the two possible branches is to the merge block. if (branch.GetSingleWordInOperand(1) == loop_merge_->id() || @@ -715,11 +709,11 @@ bool Loop::FindNumberOfIterations(const Instruction* induction, } // If this is a subtraction step we should negate the step value. - if (step_inst->opcode() == SpvOp::SpvOpISub) { + if (step_inst->opcode() == spv::Op::OpISub) { step_value = -step_value; } - // Find the inital value of the loop and make sure it is a constant integer. + // Find the initial value of the loop and make sure it is a constant integer. int64_t init_value = 0; if (!GetInductionInitValue(induction, &init_value)) return false; @@ -751,14 +745,18 @@ bool Loop::FindNumberOfIterations(const Instruction* induction, // We retrieve the number of iterations using the following formula, diff / // |step_value| where diff is calculated differently according to the // |condition| and uses the |condition_value| and |init_value|. If diff / -// |step_value| is NOT cleanly divisable then we add one to the sum. -int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, +// |step_value| is NOT cleanly divisible then we add one to the sum. +int64_t Loop::GetIterations(spv::Op condition, int64_t condition_value, int64_t init_value, int64_t step_value) const { + if (step_value == 0) { + return 0; + } + int64_t diff = 0; switch (condition) { - case SpvOp::SpvOpSLessThan: - case SpvOp::SpvOpULessThan: { + case spv::Op::OpSLessThan: + case spv::Op::OpULessThan: { // If the condition is not met to begin with the loop will never iterate. if (!(init_value < condition_value)) return 0; @@ -773,8 +771,8 @@ int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, break; } - case SpvOp::SpvOpSGreaterThan: - case SpvOp::SpvOpUGreaterThan: { + case spv::Op::OpSGreaterThan: + case spv::Op::OpUGreaterThan: { // If the condition is not met to begin with the loop will never iterate. if (!(init_value > condition_value)) return 0; @@ -790,12 +788,12 @@ int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, break; } - case SpvOp::SpvOpSGreaterThanEqual: - case SpvOp::SpvOpUGreaterThanEqual: { + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpUGreaterThanEqual: { // If the condition is not met to begin with the loop will never iterate. if (!(init_value >= condition_value)) return 0; - // We subract one to make it the same as SpvOpGreaterThan as it is + // We subtract one to make it the same as spv::Op::OpGreaterThan as it is // functionally equivalent. diff = init_value - (condition_value - 1); @@ -809,13 +807,13 @@ int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, break; } - case SpvOp::SpvOpSLessThanEqual: - case SpvOp::SpvOpULessThanEqual: { + case spv::Op::OpSLessThanEqual: + case spv::Op::OpULessThanEqual: { // If the condition is not met to begin with the loop will never iterate. if (!(init_value <= condition_value)) return 0; - // We add one to make it the same as SpvOpLessThan as it is functionally - // equivalent. + // We add one to make it the same as spv::Op::OpLessThan as it is + // functionally equivalent. diff = (condition_value + 1) - init_value; // If the operation is a less than operation then the diff and step must @@ -849,7 +847,7 @@ int64_t Loop::GetIterations(SpvOp condition, int64_t condition_value, void Loop::GetInductionVariables( std::vector& induction_variables) const { for (Instruction& inst : *loop_header_) { - if (inst.opcode() == SpvOp::SpvOpPhi) { + if (inst.opcode() == spv::Op::OpPhi) { induction_variables.push_back(&inst); } } @@ -862,7 +860,7 @@ Instruction* Loop::FindConditionVariable( Instruction* induction = nullptr; // Verify that the branch instruction is a conditional branch. - if (branch_inst.opcode() == SpvOp::SpvOpBranchConditional) { + if (branch_inst.opcode() == spv::Op::OpBranchConditional) { // From the branch instruction find the branch condition. analysis::DefUseManager* def_use_manager = context_->get_def_use_mgr(); @@ -878,7 +876,8 @@ Instruction* Loop::FindConditionVariable( def_use_manager->GetDef(condition->GetSingleWordOperand(2)); // Make sure the variable instruction used is a phi. - if (!variable_inst || variable_inst->opcode() != SpvOpPhi) return nullptr; + if (!variable_inst || variable_inst->opcode() != spv::Op::OpPhi) + return nullptr; // Make sure the phi instruction only has two incoming blocks. Each // incoming block will be represented by two in operands in the phi diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.h index 4b4f8bc75..d451496e7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_descriptor.h @@ -296,12 +296,12 @@ class Loop { // as a nested child loop. inline void SetParent(Loop* parent) { parent_ = parent; } - // Returns true is the instruction is invariant and safe to move wrt loop - bool ShouldHoistInstruction(IRContext* context, Instruction* inst); + // Returns true is the instruction is invariant and safe to move wrt loop. + bool ShouldHoistInstruction(const Instruction& inst) const; // Returns true if all operands of inst are in basic blocks not contained in - // loop - bool AreAllOperandsOutsideLoop(IRContext* context, Instruction* inst); + // loop. + bool AreAllOperandsOutsideLoop(const Instruction& inst) const; // Extract the initial value from the |induction| variable and store it in // |value|. If the function couldn't find the initial value of |induction| @@ -316,12 +316,12 @@ class Loop { // Returns true if we can deduce the number of loop iterations in the step // operation |step|. IsSupportedCondition must also be true for the condition // instruction. - bool IsSupportedStepOp(SpvOp step) const; + bool IsSupportedStepOp(spv::Op step) const; // Returns true if we can deduce the number of loop iterations in the // condition operation |condition|. IsSupportedStepOp must also be true for // the step instruction. - bool IsSupportedCondition(SpvOp condition) const; + bool IsSupportedCondition(spv::Op condition) const; // Creates the list of the loop's basic block in structured order and store // the result in |ordered_loop_blocks|. If |include_pre_header| is true, the @@ -335,7 +335,7 @@ class Loop { // Given the loop |condition|, |initial_value|, |step_value|, the trip count // |number_of_iterations|, and the |unroll_factor| requested, get the new // condition value for the residual loop. - static int64_t GetResidualConditionValue(SpvOp condition, + static int64_t GetResidualConditionValue(spv::Op condition, int64_t initial_value, int64_t step_value, size_t number_of_iterations, @@ -395,11 +395,12 @@ class Loop { // Sets |merge| as the loop merge block. No checks are performed here. inline void SetMergeBlockImpl(BasicBlock* merge) { loop_merge_ = merge; } - // Each differnt loop |condition| affects how we calculate the number of + // Each different loop |condition| affects how we calculate the number of // iterations using the |condition_value|, |init_value|, and |step_values| of // the induction variable. This method will return the number of iterations in - // a loop with those values for a given |condition|. - int64_t GetIterations(SpvOp condition, int64_t condition_value, + // a loop with those values for a given |condition|. Returns 0 if the number + // of iterations could not be computed. + int64_t GetIterations(spv::Op condition, int64_t condition_value, int64_t init_value, int64_t step_value) const; // This is to allow for loops to be removed mid iteration without invalidating diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.cpp index 0a4125dff..2ae05c3c3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.cpp @@ -29,7 +29,7 @@ // 2 - For each loop in the list, group each instruction into a set of related // instructions by traversing each instructions users and operands recursively. // We stop if we encounter an instruction we have seen before or an instruction -// which we don't consider relevent (i.e OpLoopMerge). We then group these +// which we don't consider relevant (i.e OpLoopMerge). We then group these // groups into two different sets, one for the first loop and one for the // second. // @@ -110,10 +110,10 @@ class LoopFissionImpl { }; bool LoopFissionImpl::MovableInstruction(const Instruction& inst) const { - return inst.opcode() == SpvOp::SpvOpLoad || - inst.opcode() == SpvOp::SpvOpStore || - inst.opcode() == SpvOp::SpvOpSelectionMerge || - inst.opcode() == SpvOp::SpvOpPhi || inst.IsOpcodeCodeMotionSafe(); + return inst.opcode() == spv::Op::OpLoad || + inst.opcode() == spv::Op::OpStore || + inst.opcode() == spv::Op::OpSelectionMerge || + inst.opcode() == spv::Op::OpPhi || inst.IsOpcodeCodeMotionSafe(); } void LoopFissionImpl::TraverseUseDef(Instruction* inst, @@ -143,14 +143,14 @@ void LoopFissionImpl::TraverseUseDef(Instruction* inst, // same labels (i.e phis). We already preempt the inclusion of // OpSelectionMerge by adding related instructions to the seen_instructions_ // set. - if (user->opcode() == SpvOp::SpvOpLoopMerge || - user->opcode() == SpvOp::SpvOpLabel) + if (user->opcode() == spv::Op::OpLoopMerge || + user->opcode() == spv::Op::OpLabel) return; // If the |report_loads| flag is set, set the class field // load_used_in_condition_ to false. This is used to check that none of the // condition checks in the loop rely on loads. - if (user->opcode() == SpvOp::SpvOpLoad && report_loads) { + if (user->opcode() == spv::Op::OpLoad && report_loads) { load_used_in_condition_ = true; } @@ -167,7 +167,7 @@ void LoopFissionImpl::TraverseUseDef(Instruction* inst, user->ForEachInOperand(traverse_operand); // For the first traversal we want to ignore the users of the phi. - if (ignore_phi_users && user->opcode() == SpvOp::SpvOpPhi) return; + if (ignore_phi_users && user->opcode() == spv::Op::OpPhi) return; // Traverse each user with this lambda. def_use->ForEachUser(user, traverser_functor); @@ -214,7 +214,7 @@ bool LoopFissionImpl::GroupInstructionsByUseDef() { for (Instruction& inst : block) { // Ignore all instructions related to control flow. - if (inst.opcode() == SpvOp::SpvOpSelectionMerge || inst.IsBranch()) { + if (inst.opcode() == spv::Op::OpSelectionMerge || inst.IsBranch()) { TraverseUseDef(&inst, &instructions_to_ignore, true, true); } } @@ -229,8 +229,8 @@ bool LoopFissionImpl::GroupInstructionsByUseDef() { for (Instruction& inst : block) { // Record the order that each load/store is seen. - if (inst.opcode() == SpvOp::SpvOpLoad || - inst.opcode() == SpvOp::SpvOpStore) { + if (inst.opcode() == spv::Op::OpLoad || + inst.opcode() == spv::Op::OpStore) { instruction_order_[&inst] = instruction_order_.size(); } @@ -292,9 +292,9 @@ bool LoopFissionImpl::CanPerformSplit() { // Populate the above lists. for (Instruction* inst : cloned_loop_instructions_) { - if (inst->opcode() == SpvOp::SpvOpStore) { + if (inst->opcode() == spv::Op::OpStore) { set_one_stores.push_back(inst); - } else if (inst->opcode() == SpvOp::SpvOpLoad) { + } else if (inst->opcode() == spv::Op::OpLoad) { set_one_loads.push_back(inst); } @@ -316,7 +316,7 @@ bool LoopFissionImpl::CanPerformSplit() { // Look at the dependency between the loads in the original and stores in // the cloned loops. - if (inst->opcode() == SpvOp::SpvOpLoad) { + if (inst->opcode() == spv::Op::OpLoad) { for (Instruction* store : set_one_stores) { DistanceVector vec{loop_depth}; @@ -334,7 +334,7 @@ bool LoopFissionImpl::CanPerformSplit() { } } } - } else if (inst->opcode() == SpvOp::SpvOpStore) { + } else if (inst->opcode() == spv::Op::OpStore) { for (Instruction* load : set_one_loads) { DistanceVector vec{loop_depth}; @@ -387,7 +387,7 @@ Loop* LoopFissionImpl::SplitLoop() { if (cloned_loop_instructions_.count(&inst) == 1 && original_loop_instructions_.count(&inst) == 0) { instructions_to_kill.push_back(&inst); - if (inst.opcode() == SpvOp::SpvOpPhi) { + if (inst.opcode() == spv::Op::OpPhi) { context_->ReplaceAllUsesWith( inst.result_id(), clone_results.value_map_[inst.result_id()]); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.h index e7a59c185..9bc12c0fd 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fission.h @@ -33,7 +33,7 @@ namespace opt { class LoopFissionPass : public Pass { public: - // Fuction used to determine if a given loop should be split. Takes register + // Function used to determine if a given loop should be split. Takes register // pressure region for that loop as a parameter and returns true if the loop // should be split. using FissionCriteriaFunction = diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.cpp index 07d171a0a..dc6355306 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.cpp @@ -23,7 +23,6 @@ namespace spvtools { namespace opt { - namespace { // Append all the loops nested in |loop| to |loops|. @@ -165,7 +164,7 @@ bool LoopFusion::AreCompatible() { // Check adjacency, |loop_0_| should come just before |loop_1_|. // There is always at least one block between loops, even if it's empty. - // We'll check at most 2 preceeding blocks. + // We'll check at most 2 preceding blocks. auto pre_header_1 = loop_1_->GetPreHeaderBlock(); @@ -193,14 +192,15 @@ bool LoopFusion::AreCompatible() { // in LCSSA form. for (auto block : block_to_check) { for (auto& inst : *block) { - if (inst.opcode() == SpvOpStore) { + if (inst.opcode() == spv::Op::OpStore) { // Get the definition of the target to check it's function scope so // there are no observable side effects. auto variable = context_->get_def_use_mgr()->GetDef(inst.GetSingleWordInOperand(0)); - if (variable->opcode() != SpvOpVariable || - variable->GetSingleWordInOperand(0) != SpvStorageClassFunction) { + if (variable->opcode() != spv::Op::OpVariable || + spv::StorageClass(variable->GetSingleWordInOperand(0)) != + spv::StorageClass::Function) { return false; } @@ -209,7 +209,7 @@ bool LoopFusion::AreCompatible() { context_->get_def_use_mgr()->ForEachUse( inst.GetSingleWordInOperand(0), [&is_used](Instruction* use_inst, uint32_t) { - if (use_inst->opcode() == SpvOpLoad) { + if (use_inst->opcode() == spv::Op::OpLoad) { is_used = true; } }); @@ -217,11 +217,11 @@ bool LoopFusion::AreCompatible() { if (is_used) { return false; } - } else if (inst.opcode() == SpvOpPhi) { + } else if (inst.opcode() == spv::Op::OpPhi) { if (inst.NumInOperands() != 2) { return false; } - } else if (inst.opcode() != SpvOpBranch) { + } else if (inst.opcode() != spv::Op::OpBranch) { return false; } } @@ -234,10 +234,12 @@ bool LoopFusion::ContainsBarriersOrFunctionCalls(Loop* loop) { for (const auto& block : loop->GetBlocks()) { for (const auto& inst : *containing_function_->FindBlock(block)) { auto opcode = inst.opcode(); - if (opcode == SpvOpFunctionCall || opcode == SpvOpControlBarrier || - opcode == SpvOpMemoryBarrier || opcode == SpvOpTypeNamedBarrier || - opcode == SpvOpNamedBarrierInitialize || - opcode == SpvOpMemoryNamedBarrier) { + if (opcode == spv::Op::OpFunctionCall || + opcode == spv::Op::OpControlBarrier || + opcode == spv::Op::OpMemoryBarrier || + opcode == spv::Op::OpTypeNamedBarrier || + opcode == spv::Op::OpNamedBarrierInitialize || + opcode == spv::Op::OpMemoryNamedBarrier) { return true; } } @@ -344,7 +346,7 @@ std::map> LoopFusion::LocationToMemOps( auto access_location = context_->get_def_use_mgr()->GetDef( instruction->GetSingleWordInOperand(0)); - while (access_location->opcode() == SpvOpAccessChain) { + while (access_location->opcode() == spv::Op::OpAccessChain) { access_location = context_->get_def_use_mgr()->GetDef( access_location->GetSingleWordInOperand(0)); } @@ -366,9 +368,9 @@ LoopFusion::GetLoadsAndStoresInLoop(Loop* loop) { } for (auto& instruction : *containing_function_->FindBlock(block_id)) { - if (instruction.opcode() == SpvOpLoad) { + if (instruction.opcode() == spv::Op::OpLoad) { loads.push_back(&instruction); - } else if (instruction.opcode() == SpvOpStore) { + } else if (instruction.opcode() == spv::Op::OpStore) { stores.push_back(&instruction); } } @@ -556,7 +558,7 @@ void LoopFusion::Fuse() { // Update merge block id in the header of |loop_0_| to the merge block of // |loop_1_|. loop_0_->GetHeaderBlock()->ForEachInst([this](Instruction* inst) { - if (inst->opcode() == SpvOpLoopMerge) { + if (inst->opcode() == spv::Op::OpLoopMerge) { inst->SetInOperand(0, {loop_1_->GetMergeBlock()->id()}); } }); @@ -564,7 +566,7 @@ void LoopFusion::Fuse() { // Update condition branch target in |loop_0_| to the merge block of // |loop_1_|. condition_block_of_0->ForEachInst([this](Instruction* inst) { - if (inst->opcode() == SpvOpBranchConditional) { + if (inst->opcode() == spv::Op::OpBranchConditional) { auto loop_0_merge_block_id = loop_0_->GetMergeBlock()->id(); if (inst->GetSingleWordInOperand(1) == loop_0_merge_block_id) { @@ -579,7 +581,8 @@ void LoopFusion::Fuse() { // the header of |loop_1_| to the header of |loop_0_|. std::vector instructions_to_move{}; for (auto& instruction : *loop_1_->GetHeaderBlock()) { - if (instruction.opcode() == SpvOpPhi && &instruction != induction_1_) { + if (instruction.opcode() == spv::Op::OpPhi && + &instruction != induction_1_) { instructions_to_move.push_back(&instruction); } } @@ -712,7 +715,7 @@ void LoopFusion::Fuse() { ld->RemoveLoop(loop_1_); - // Kill unnessecary instructions and remove all empty blocks. + // Kill unnecessary instructions and remove all empty blocks. for (auto inst : instr_to_delete) { context_->KillInst(inst); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.h index d61d6783c..769da5f1a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion.h @@ -40,7 +40,7 @@ class LoopFusion { // That means: // * they both have one induction variable // * they have the same upper and lower bounds - // - same inital value + // - same initial value // - same condition // * they have the same update step // * they are adjacent, with |loop_0| appearing before |loop_1| diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.cpp index bd8444ae5..097430fcf 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.cpp @@ -14,7 +14,6 @@ #include "source/opt/loop_fusion_pass.h" -#include "source/opt/ir_context.h" #include "source/opt/loop_descriptor.h" #include "source/opt/loop_fusion.h" #include "source/opt/register_pressure.h" diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.h index 3a0be6000..9d5b7ccda 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_fusion_pass.h @@ -33,7 +33,7 @@ class LoopFusionPass : public Pass { // Processes the given |module|. Returns Status::Failure if errors occur when // processing. Returns the corresponding Status::Success if processing is - // succesful to indicate whether changes have been made to the modue. + // successful to indicate whether changes have been made to the module. Status Process() override; private: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.cpp index 34f0a8d26..25c6db120 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.cpp @@ -12,23 +12,37 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include "source/opt/loop_peeling.h" + #include #include -#include #include #include #include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/opt/loop_descriptor.h" -#include "source/opt/loop_peeling.h" #include "source/opt/loop_utils.h" #include "source/opt/scalar_analysis.h" #include "source/opt/scalar_analysis_nodes.h" namespace spvtools { namespace opt { +namespace { +// Gather the set of blocks for all the path from |entry| to |root|. +void GetBlocksInPath(uint32_t block, uint32_t entry, + std::unordered_set* blocks_in_path, + const CFG& cfg) { + for (uint32_t pid : cfg.preds(block)) { + if (blocks_in_path->insert(pid).second) { + if (pid != entry) { + GetBlocksInPath(pid, entry, blocks_in_path, cfg); + } + } + } +} +} // namespace + size_t LoopPeelingPass::code_grow_threshold_ = 1000; void LoopPeeling::DuplicateAndConnectLoop( @@ -186,7 +200,7 @@ void LoopPeeling::GetIteratorUpdateOperations( operations->insert(iterator); iterator->ForEachInId([def_use_mgr, loop, operations, this](uint32_t* id) { Instruction* insn = def_use_mgr->GetDef(*id); - if (insn->opcode() == SpvOpLabel) { + if (insn->opcode() == spv::Op::OpLabel) { return; } if (operations->count(insn)) { @@ -199,19 +213,6 @@ void LoopPeeling::GetIteratorUpdateOperations( }); } -// Gather the set of blocks for all the path from |entry| to |root|. -static void GetBlocksInPath(uint32_t block, uint32_t entry, - std::unordered_set* blocks_in_path, - const CFG& cfg) { - for (uint32_t pid : cfg.preds(block)) { - if (blocks_in_path->insert(pid).second) { - if (pid != entry) { - GetBlocksInPath(pid, entry, blocks_in_path, cfg); - } - } - } -} - bool LoopPeeling::IsConditionCheckSideEffectFree() const { CFG& cfg = *context_->cfg(); @@ -231,9 +232,9 @@ bool LoopPeeling::IsConditionCheckSideEffectFree() const { if (!bb->WhileEachInst([this](Instruction* insn) { if (insn->IsBranch()) return true; switch (insn->opcode()) { - case SpvOpLabel: - case SpvOpSelectionMerge: - case SpvOpLoopMerge: + case spv::Op::OpLabel: + case spv::Op::OpSelectionMerge: + case spv::Op::OpLoopMerge: return true; default: break; @@ -322,7 +323,7 @@ void LoopPeeling::FixExitCondition( BasicBlock* condition_block = cfg.block(condition_block_id); Instruction* exit_condition = condition_block->terminator(); - assert(exit_condition->opcode() == SpvOpBranchConditional); + assert(exit_condition->opcode() == spv::Op::OpBranchConditional); BasicBlock::iterator insert_point = condition_block->tail(); if (condition_block->GetMergeInst()) { --insert_point; @@ -350,7 +351,7 @@ BasicBlock* LoopPeeling::CreateBlockBefore(BasicBlock* bb) { // TODO(1841): Handle id overflow. std::unique_ptr new_bb = MakeUnique(std::unique_ptr(new Instruction( - context_, SpvOpLabel, 0, context_->TakeNextId(), {}))); + context_, spv::Op::OpLabel, 0, context_->TakeNextId(), {}))); // Update the loop descriptor. Loop* in_loop = (*loop_utils_.GetLoopDescriptor())[bb]; if (in_loop) { @@ -791,18 +792,18 @@ uint32_t LoopPeelingPass::LoopPeelingInfo::GetFirstNonLoopInvariantOperand( return 0; } -static bool IsHandledCondition(SpvOp opcode) { +static bool IsHandledCondition(spv::Op opcode) { switch (opcode) { - case SpvOpIEqual: - case SpvOpINotEqual: - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: - case SpvOpULessThan: - case SpvOpSLessThan: - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: return true; default: return false; @@ -811,7 +812,7 @@ static bool IsHandledCondition(SpvOp opcode) { LoopPeelingPass::LoopPeelingInfo::Direction LoopPeelingPass::LoopPeelingInfo::GetPeelingInfo(BasicBlock* bb) const { - if (bb->terminator()->opcode() != SpvOpBranchConditional) { + if (bb->terminator()->opcode() != spv::Op::OpBranchConditional) { return GetNoneDirection(); } @@ -886,27 +887,27 @@ LoopPeelingPass::LoopPeelingInfo::GetPeelingInfo(BasicBlock* bb) const { switch (condition->opcode()) { default: return GetNoneDirection(); - case SpvOpIEqual: - case SpvOpINotEqual: + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: return HandleEquality(lhs, rhs); - case SpvOpUGreaterThan: - case SpvOpSGreaterThan: { + case spv::Op::OpUGreaterThan: + case spv::Op::OpSGreaterThan: { cmp_operator = CmpOperator::kGT; break; } - case SpvOpULessThan: - case SpvOpSLessThan: { + case spv::Op::OpULessThan: + case spv::Op::OpSLessThan: { cmp_operator = CmpOperator::kLT; break; } // We add one to transform >= into > and <= into <. - case SpvOpUGreaterThanEqual: - case SpvOpSGreaterThanEqual: { + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpSGreaterThanEqual: { cmp_operator = CmpOperator::kGE; break; } - case SpvOpULessThanEqual: - case SpvOpSLessThanEqual: { + case spv::Op::OpULessThanEqual: + case spv::Op::OpSLessThanEqual: { cmp_operator = CmpOperator::kLE; break; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.h index 413f896f2..2a55fe44d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_peeling.h @@ -261,7 +261,7 @@ class LoopPeelingPass : public Pass { // Processes the given |module|. Returns Status::Failure if errors occur when // processing. Returns the corresponding Status::Success if processing is - // succesful to indicate whether changes have been made to the modue. + // successful to indicate whether changes have been made to the module. Pass::Status Process() override; private: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unroller.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unroller.cpp index aff191feb..d9e34f242 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unroller.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unroller.cpp @@ -15,7 +15,6 @@ #include "source/opt/loop_unroller.h" #include -#include #include #include #include @@ -68,10 +67,10 @@ namespace opt { namespace { // Loop control constant value for DontUnroll flag. -static const uint32_t kLoopControlDontUnrollIndex = 2; +constexpr uint32_t kLoopControlDontUnrollIndex = 2; // Operand index of the loop control parameter of the OpLoopMerge. -static const uint32_t kLoopControlIndex = 2; +constexpr uint32_t kLoopControlIndex = 2; // This utility class encapsulates some of the state we need to maintain between // loop unrolls. Specifically it maintains key blocks and the induction variable @@ -163,7 +162,7 @@ struct LoopUnrollState { }; // This class implements the actual unrolling. It uses a LoopUnrollState to -// maintain the state of the unrolling inbetween steps. +// maintain the state of the unrolling in between steps. class LoopUnrollerUtilsImpl { public: using BasicBlockListTy = std::vector>; @@ -209,7 +208,7 @@ class LoopUnrollerUtilsImpl { // Add all blocks_to_add_ to function_ at the |insert_point|. void AddBlocksToFunction(const BasicBlock* insert_point); - // Duplicates the |old_loop|, cloning each body and remaping the ids without + // Duplicates the |old_loop|, cloning each body and remapping the ids without // removing instructions or changing relative structure. Result will be stored // in |new_loop|. void DuplicateLoop(Loop* old_loop, Loop* new_loop); @@ -241,7 +240,7 @@ class LoopUnrollerUtilsImpl { // Remap all the in |basic_block| to new IDs and keep the mapping of new ids // to old // ids. |loop| is used to identify special loop blocks (header, continue, - // ect). + // etc). void AssignNewResultIds(BasicBlock* basic_block); // Using the map built by AssignNewResultIds, replace the uses in |inst| @@ -320,7 +319,7 @@ class LoopUnrollerUtilsImpl { // and then be remapped at the end. std::vector loop_phi_instructions_; - // The number of loop iterations that the loop would preform pre-unroll. + // The number of loop iterations that the loop would perform pre-unroll. size_t number_of_loop_iterations_; // The amount that the loop steps each iteration. @@ -336,8 +335,7 @@ class LoopUnrollerUtilsImpl { // Retrieve the index of the OpPhi instruction |phi| which corresponds to the // incoming |block| id. -static uint32_t GetPhiIndexFromLabel(const BasicBlock* block, - const Instruction* phi) { +uint32_t GetPhiIndexFromLabel(const BasicBlock* block, const Instruction* phi) { for (uint32_t i = 1; i < phi->NumInOperands(); i += 2) { if (block->id() == phi->GetSingleWordInOperand(i)) { return i; @@ -382,8 +380,9 @@ void LoopUnrollerUtilsImpl::PartiallyUnrollResidualFactor(Loop* loop, size_t factor) { // TODO(1841): Handle id overflow. std::unique_ptr new_label{new Instruction( - context_, SpvOp::SpvOpLabel, 0, context_->TakeNextId(), {})}; + context_, spv::Op::OpLabel, 0, context_->TakeNextId(), {})}; std::unique_ptr new_exit_bb{new BasicBlock(std::move(new_label))}; + new_exit_bb->SetParent(&function_); // Save the id of the block before we move it. uint32_t new_merge_id = new_exit_bb->id(); @@ -839,7 +838,7 @@ void LoopUnrollerUtilsImpl::DuplicateLoop(Loop* old_loop, Loop* new_loop) { new_loop->SetMergeBlock(new_merge); } -// Whenever the utility copies a block it stores it in a tempory buffer, this +// Whenever the utility copies a block it stores it in a temporary buffer, this // function adds the buffer into the Function. The blocks will be inserted // after the block |insert_point|. void LoopUnrollerUtilsImpl::AddBlocksToFunction( @@ -990,17 +989,31 @@ bool LoopUtils::CanPerformUnroll() { // Check that we can find and process the induction variable. const Instruction* induction = loop_->FindConditionVariable(condition); - if (!induction || induction->opcode() != SpvOpPhi) return false; + if (!induction || induction->opcode() != spv::Op::OpPhi) return false; // Check that we can find the number of loop iterations. if (!loop_->FindNumberOfIterations(induction, &*condition->ctail(), nullptr)) return false; +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + // ClusterFuzz/OSS-Fuzz is likely to yield examples with very high loop + // iteration counts. This can cause timeouts and memouts during fuzzing that + // are not classed as bugs. To avoid this noise, loop unrolling is not applied + // to loops with large iteration counts when fuzzing. + constexpr size_t kFuzzerIterationLimit = 100; + size_t num_iterations; + loop_->FindNumberOfIterations(induction, &*condition->ctail(), + &num_iterations); + if (num_iterations > kFuzzerIterationLimit) { + return false; + } +#endif + // Make sure the latch block is a unconditional branch to the header // block. const Instruction& branch = *loop_->GetLatchBlock()->ctail(); bool branching_assumption = - branch.opcode() == SpvOpBranch && + branch.opcode() == spv::Op::OpBranch && branch.GetSingleWordInOperand(0) == loop_->GetHeaderBlock()->id(); if (!branching_assumption) { return false; @@ -1028,10 +1041,10 @@ bool LoopUtils::CanPerformUnroll() { // exit the loop. for (uint32_t label_id : loop_->GetBlocks()) { const BasicBlock* block = context_->cfg()->block(label_id); - if (block->ctail()->opcode() == SpvOp::SpvOpKill || - block->ctail()->opcode() == SpvOp::SpvOpReturn || - block->ctail()->opcode() == SpvOp::SpvOpReturnValue || - block->ctail()->opcode() == SpvOp::SpvOpTerminateInvocation) { + if (block->ctail()->opcode() == spv::Op::OpKill || + block->ctail()->opcode() == spv::Op::OpReturn || + block->ctail()->opcode() == spv::Op::OpReturnValue || + block->ctail()->opcode() == spv::Op::OpTerminateInvocation) { return false; } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.cpp index d805ecf3c..41f1a804b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -31,18 +30,12 @@ #include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/opt/loop_descriptor.h" - #include "source/opt/loop_utils.h" namespace spvtools { namespace opt { namespace { - -static const uint32_t kTypePointerStorageClassInIdx = 0; - -} // anonymous namespace - -namespace { +constexpr uint32_t kTypePointerStorageClassInIdx = 0; // This class handle the unswitch procedure for a given loop. // The unswitch will not happen if: @@ -77,7 +70,7 @@ class LoopUnswitch { } if (bb->terminator()->IsBranch() && - bb->terminator()->opcode() != SpvOpBranch) { + bb->terminator()->opcode() != spv::Op::OpBranch) { if (IsConditionNonConstantLoopInvariant(bb->terminator())) { switch_block_ = bb; break; @@ -104,7 +97,7 @@ class LoopUnswitch { // TODO(1841): Handle id overflow. BasicBlock* bb = &*ip.InsertBefore(std::unique_ptr( new BasicBlock(std::unique_ptr(new Instruction( - context_, SpvOpLabel, 0, context_->TakeNextId(), {}))))); + context_, spv::Op::OpLabel, 0, context_->TakeNextId(), {}))))); bb->SetParent(function_); def_use_mgr->AnalyzeInstDef(bb->GetLabelInst()); context_->set_instr_block(bb->GetLabelInst(), bb); @@ -113,12 +106,12 @@ class LoopUnswitch { } Instruction* GetValueForDefaultPathForSwitch(Instruction* switch_inst) { - assert(switch_inst->opcode() == SpvOpSwitch && + assert(switch_inst->opcode() == spv::Op::OpSwitch && "The given instructoin must be an OpSwitch."); // Find a value that can be used to select the default path. // If none are possible, then it will just use 0. The value does not matter - // because this path will never be taken becaues the new switch outside of + // because this path will never be taken because the new switch outside of // the loop cannot select this path either. std::vector existing_values; for (uint32_t i = 2; i < switch_inst->NumInOperands(); i += 2) { @@ -291,7 +284,7 @@ class LoopUnswitch { ///////////////////////////// Instruction* iv_condition = &*switch_block_->tail(); - SpvOp iv_opcode = iv_condition->opcode(); + spv::Op iv_opcode = iv_condition->opcode(); Instruction* condition = def_use_mgr->GetDef(iv_condition->GetOperand(0).words[0]); @@ -304,7 +297,7 @@ class LoopUnswitch { std::vector> constant_branch; // Special case for the original loop Instruction* original_loop_constant_value; - if (iv_opcode == SpvOpBranchConditional) { + if (iv_opcode == spv::Op::OpBranchConditional) { constant_branch.emplace_back( cst_mgr->GetDefiningInstruction(cst_mgr->GetConstant(cond_type, {0})), nullptr); @@ -401,7 +394,7 @@ class LoopUnswitch { // Delete the old jump context_->KillInst(&*if_block->tail()); InstructionBuilder builder(context_, if_block); - if (iv_opcode == SpvOpBranchConditional) { + if (iv_opcode == spv::Op::OpBranchConditional) { assert(constant_branch.size() == 1); builder.AddConditionalBranch( condition->result_id(), original_loop_target->id(), @@ -509,7 +502,8 @@ class LoopUnswitch { bool& is_uniform = dynamically_uniform_[var->result_id()]; is_uniform = false; - dec_mgr->WhileEachDecoration(var->result_id(), SpvDecorationUniform, + dec_mgr->WhileEachDecoration(var->result_id(), + uint32_t(spv::Decoration::Uniform), [&is_uniform](const Instruction&) { is_uniform = true; return false; @@ -526,14 +520,14 @@ class LoopUnswitch { if (!post_dom_tree.Dominates(parent->id(), entry->id())) { return is_uniform = false; } - if (var->opcode() == SpvOpLoad) { + if (var->opcode() == spv::Op::OpLoad) { const uint32_t PtrTypeId = def_use_mgr->GetDef(var->GetSingleWordInOperand(0))->type_id(); const Instruction* PtrTypeInst = def_use_mgr->GetDef(PtrTypeId); - uint32_t storage_class = - PtrTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx); - if (storage_class != SpvStorageClassUniform && - storage_class != SpvStorageClassUniformConstant) { + auto storage_class = spv::StorageClass( + PtrTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx)); + if (storage_class != spv::StorageClass::Uniform && + storage_class != spv::StorageClass::UniformConstant) { return is_uniform = false; } } else { @@ -553,7 +547,7 @@ class LoopUnswitch { // dynamically uniform. bool IsConditionNonConstantLoopInvariant(Instruction* insn) { assert(insn->IsBranch()); - assert(insn->opcode() != SpvOpBranch); + assert(insn->opcode() != spv::Op::OpBranch); analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr(); Instruction* condition = def_use_mgr->GetDef(insn->GetOperand(0).words[0]); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.h index 3ecdd6116..4f7295d43 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_unswitch_pass.h @@ -30,7 +30,7 @@ class LoopUnswitchPass : public Pass { // Processes the given |module|. Returns Status::Failure if errors occur when // processing. Returns the corresponding Status::Success if processing is - // succesful to indicate whether changes have been made to the modue. + // successful to indicate whether changes have been made to the module. Pass::Status Process() override; private: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.cpp index 8c6d355d6..20494e12b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.cpp @@ -28,12 +28,11 @@ namespace spvtools { namespace opt { - namespace { // Return true if |bb| is dominated by at least one block in |exits| -static inline bool DominatesAnExit(BasicBlock* bb, - const std::unordered_set& exits, - const DominatorTree& dom_tree) { +inline bool DominatesAnExit(BasicBlock* bb, + const std::unordered_set& exits, + const DominatorTree& dom_tree) { for (BasicBlock* e_bb : exits) if (dom_tree.Dominates(bb, e_bb)) return true; return false; @@ -71,10 +70,10 @@ class LCSSARewriter { // UpdateManagers. void RewriteUse(BasicBlock* bb, Instruction* user, uint32_t operand_index) { assert( - (user->opcode() != SpvOpPhi || bb != GetParent(user)) && + (user->opcode() != spv::Op::OpPhi || bb != GetParent(user)) && "The root basic block must be the incoming edge if |user| is a phi " "instruction"); - assert((user->opcode() == SpvOpPhi || bb == GetParent(user)) && + assert((user->opcode() == spv::Op::OpPhi || bb == GetParent(user)) && "The root basic block must be the instruction parent if |user| is " "not " "phi instruction"); @@ -293,7 +292,7 @@ inline void MakeSetClosedSSA(IRContext* context, Function* function, assert(use_parent); if (blocks.count(use_parent->id())) return; - if (use->opcode() == SpvOpPhi) { + if (use->opcode() == spv::Op::OpPhi) { // If the use is a Phi instruction and the incoming block is // coming from the loop, then that's consistent with LCSSA form. if (exit_bb.count(use_parent)) { @@ -355,7 +354,7 @@ void LoopUtils::CreateLoopDedicatedExits() { // TODO(1841): Handle id overflow. BasicBlock& exit = *insert_pt.InsertBefore(std::unique_ptr( new BasicBlock(std::unique_ptr(new Instruction( - context_, SpvOpLabel, 0, context_->TakeNextId(), {}))))); + context_, spv::Op::OpLabel, 0, context_->TakeNextId(), {}))))); exit.SetParent(function); // Redirect in loop predecessors to |exit| block. @@ -494,7 +493,7 @@ Loop* LoopUtils::CloneAndAttachLoopToHeader(LoopCloningResult* cloning_result) { // Create a new exit block/label for the new loop. // TODO(1841): Handle id overflow. std::unique_ptr new_label{new Instruction( - context_, SpvOp::SpvOpLabel, 0, context_->TakeNextId(), {})}; + context_, spv::Op::OpLabel, 0, context_->TakeNextId(), {})}; std::unique_ptr new_exit_bb{new BasicBlock(std::move(new_label))}; new_exit_bb->SetParent(loop_->GetMergeBlock()->GetParent()); @@ -680,9 +679,9 @@ void CodeMetrics::Analyze(const Loop& loop) { const BasicBlock* bb = cfg.block(id); size_t bb_size = 0; bb->ForEachInst([&bb_size](const Instruction* insn) { - if (insn->opcode() == SpvOpLabel) return; + if (insn->opcode() == spv::Op::OpLabel) return; if (insn->IsNop()) return; - if (insn->opcode() == SpvOpPhi) return; + if (insn->opcode() == spv::Op::OpPhi) return; bb_size++; }); block_sizes_[bb->id()] = bb_size; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.h index a4e61900b..70060fc4f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/loop_utils.h @@ -123,7 +123,7 @@ class LoopUtils { // Clone the |loop_| and make the new loop branch to the second loop on exit. Loop* CloneAndAttachLoopToHeader(LoopCloningResult* cloning_result); - // Perfom a partial unroll of |loop| by given |factor|. This will copy the + // Perform a partial unroll of |loop| by given |factor|. This will copy the // body of the loop |factor| times. So a |factor| of one would give a new loop // with the original body plus one unrolled copy body. bool PartiallyUnroll(size_t factor); @@ -139,7 +139,7 @@ class LoopUtils { // 1. That the loop is in structured order. // 2. That the continue block is a branch to the header. // 3. That the only phi used in the loop is the induction variable. - // TODO(stephen@codeplay.com): This is a temporary mesure, after the loop is + // TODO(stephen@codeplay.com): This is a temporary measure, after the loop is // converted into LCSAA form and has a single entry and exit we can rewrite // the other phis. // 4. That this is an inner most loop, or that loops contained within this diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.cpp index ca4889b7c..9972c4f75 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.cpp @@ -22,32 +22,27 @@ #include "source/cfa.h" #include "source/opt/basic_block.h" -#include "source/opt/dominator_analysis.h" #include "source/opt/ir_context.h" -#include "source/opt/iterator.h" namespace spvtools { namespace opt { - namespace { - -const uint32_t kCopyObjectOperandInIdx = 0; -const uint32_t kTypePointerStorageClassInIdx = 0; -const uint32_t kTypePointerTypeIdInIdx = 1; - +constexpr uint32_t kCopyObjectOperandInIdx = 0; +constexpr uint32_t kTypePointerStorageClassInIdx = 0; +constexpr uint32_t kTypePointerTypeIdInIdx = 1; } // namespace bool MemPass::IsBaseTargetType(const Instruction* typeInst) const { switch (typeInst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: - case SpvOpTypeBool: - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeImage: - case SpvOpTypeSampler: - case SpvOpTypeSampledImage: - case SpvOpTypePointer: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeBool: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypePointer: return true; default: break; @@ -57,14 +52,14 @@ bool MemPass::IsBaseTargetType(const Instruction* typeInst) const { bool MemPass::IsTargetType(const Instruction* typeInst) const { if (IsBaseTargetType(typeInst)) return true; - if (typeInst->opcode() == SpvOpTypeArray) { + if (typeInst->opcode() == spv::Op::OpTypeArray) { if (!IsTargetType( get_def_use_mgr()->GetDef(typeInst->GetSingleWordOperand(1)))) { return false; } return true; } - if (typeInst->opcode() != SpvOpTypeStruct) return false; + if (typeInst->opcode() != spv::Op::OpTypeStruct) return false; // All struct members must be math type return typeInst->WhileEachInId([this](const uint32_t* tid) { Instruction* compTypeInst = get_def_use_mgr()->GetDef(*tid); @@ -73,23 +68,29 @@ bool MemPass::IsTargetType(const Instruction* typeInst) const { }); } -bool MemPass::IsNonPtrAccessChain(const SpvOp opcode) const { - return opcode == SpvOpAccessChain || opcode == SpvOpInBoundsAccessChain; +bool MemPass::IsNonPtrAccessChain(const spv::Op opcode) const { + return opcode == spv::Op::OpAccessChain || + opcode == spv::Op::OpInBoundsAccessChain; } bool MemPass::IsPtr(uint32_t ptrId) { uint32_t varId = ptrId; Instruction* ptrInst = get_def_use_mgr()->GetDef(varId); - while (ptrInst->opcode() == SpvOpCopyObject) { + if (ptrInst->opcode() == spv::Op::OpFunction) { + // A function is not a pointer, but it's return type could be, which will + // erroneously lead to this function returning true later on + return false; + } + while (ptrInst->opcode() == spv::Op::OpCopyObject) { varId = ptrInst->GetSingleWordInOperand(kCopyObjectOperandInIdx); ptrInst = get_def_use_mgr()->GetDef(varId); } - const SpvOp op = ptrInst->opcode(); - if (op == SpvOpVariable || IsNonPtrAccessChain(op)) return true; + const spv::Op op = ptrInst->opcode(); + if (op == spv::Op::OpVariable || IsNonPtrAccessChain(op)) return true; const uint32_t varTypeId = ptrInst->type_id(); if (varTypeId == 0) return false; const Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); - return varTypeInst->opcode() == SpvOpTypePointer; + return varTypeInst->opcode() == spv::Op::OpTypePointer; } Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { @@ -97,24 +98,24 @@ Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { Instruction* ptrInst = get_def_use_mgr()->GetDef(*varId); Instruction* varInst; - if (ptrInst->opcode() == SpvOpConstantNull) { + if (ptrInst->opcode() == spv::Op::OpConstantNull) { *varId = 0; return ptrInst; } - if (ptrInst->opcode() != SpvOpVariable && - ptrInst->opcode() != SpvOpFunctionParameter) { + if (ptrInst->opcode() != spv::Op::OpVariable && + ptrInst->opcode() != spv::Op::OpFunctionParameter) { varInst = ptrInst->GetBaseAddress(); } else { varInst = ptrInst; } - if (varInst->opcode() == SpvOpVariable) { + if (varInst->opcode() == spv::Op::OpVariable) { *varId = varInst->result_id(); } else { *varId = 0; } - while (ptrInst->opcode() == SpvOpCopyObject) { + while (ptrInst->opcode() == spv::Op::OpCopyObject) { uint32_t temp = ptrInst->GetSingleWordInOperand(0); ptrInst = get_def_use_mgr()->GetDef(temp); } @@ -123,8 +124,9 @@ Instruction* MemPass::GetPtr(uint32_t ptrId, uint32_t* varId) { } Instruction* MemPass::GetPtr(Instruction* ip, uint32_t* varId) { - assert(ip->opcode() == SpvOpStore || ip->opcode() == SpvOpLoad || - ip->opcode() == SpvOpImageTexelPointer || ip->IsAtomicWithLoad()); + assert(ip->opcode() == spv::Op::OpStore || ip->opcode() == spv::Op::OpLoad || + ip->opcode() == spv::Op::OpImageTexelPointer || + ip->IsAtomicWithLoad()); // All of these opcode place the pointer in position 0. const uint32_t ptrId = ip->GetSingleWordInOperand(0); @@ -133,8 +135,8 @@ Instruction* MemPass::GetPtr(Instruction* ip, uint32_t* varId) { bool MemPass::HasOnlyNamesAndDecorates(uint32_t id) const { return get_def_use_mgr()->WhileEachUser(id, [this](Instruction* user) { - SpvOp op = user->opcode(); - if (op != SpvOpName && !IsNonTypeDecorate(op)) { + spv::Op op = user->opcode(); + if (op != spv::Op::OpName && !IsNonTypeDecorate(op)) { return false; } return true; @@ -147,14 +149,15 @@ void MemPass::KillAllInsts(BasicBlock* bp, bool killLabel) { bool MemPass::HasLoads(uint32_t varId) const { return !get_def_use_mgr()->WhileEachUser(varId, [this](Instruction* user) { - SpvOp op = user->opcode(); + spv::Op op = user->opcode(); // TODO(): The following is slightly conservative. Could be // better handling of non-store/name. - if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { + if (IsNonPtrAccessChain(op) || op == spv::Op::OpCopyObject) { if (HasLoads(user->result_id())) { return false; } - } else if (op != SpvOpStore && op != SpvOpName && !IsNonTypeDecorate(op)) { + } else if (op != spv::Op::OpStore && op != spv::Op::OpName && + !IsNonTypeDecorate(op)) { return false; } return true; @@ -164,12 +167,12 @@ bool MemPass::HasLoads(uint32_t varId) const { bool MemPass::IsLiveVar(uint32_t varId) const { const Instruction* varInst = get_def_use_mgr()->GetDef(varId); // assume live if not a variable eg. function parameter - if (varInst->opcode() != SpvOpVariable) return true; + if (varInst->opcode() != spv::Op::OpVariable) return true; // non-function scope vars are live const uint32_t varTypeId = varInst->type_id(); const Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); - if (varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) != - SpvStorageClassFunction) + if (spv::StorageClass(varTypeInst->GetSingleWordInOperand( + kTypePointerStorageClassInIdx)) != spv::StorageClass::Function) return true; // test if variable is loaded from return HasLoads(varId); @@ -177,10 +180,10 @@ bool MemPass::IsLiveVar(uint32_t varId) const { void MemPass::AddStores(uint32_t ptr_id, std::queue* insts) { get_def_use_mgr()->ForEachUser(ptr_id, [this, insts](Instruction* user) { - SpvOp op = user->opcode(); + spv::Op op = user->opcode(); if (IsNonPtrAccessChain(op)) { AddStores(user->result_id(), insts); - } else if (op == SpvOpStore) { + } else if (op == spv::Op::OpStore) { insts->push(user); } }); @@ -193,7 +196,7 @@ void MemPass::DCEInst(Instruction* inst, while (!deadInsts.empty()) { Instruction* di = deadInsts.front(); // Don't delete labels - if (di->opcode() == SpvOpLabel) { + if (di->opcode() == spv::Op::OpLabel) { deadInsts.pop(); continue; } @@ -202,7 +205,7 @@ void MemPass::DCEInst(Instruction* inst, di->ForEachInId([&ids](uint32_t* iid) { ids.insert(*iid); }); uint32_t varId = 0; // Remember variable if dead load - if (di->opcode() == SpvOpLoad) (void)GetPtr(di, &varId); + if (di->opcode() == spv::Op::OpLoad) (void)GetPtr(di, &varId); if (call_back) { call_back(di); } @@ -230,9 +233,9 @@ bool MemPass::HasOnlySupportedRefs(uint32_t varId) { dbg_op == CommonDebugInfoDebugValue) { return true; } - SpvOp op = user->opcode(); - if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName && - !IsNonTypeDecorate(op)) { + spv::Op op = user->opcode(); + if (op != spv::Op::OpStore && op != spv::Op::OpLoad && + op != spv::Op::OpName && !IsNonTypeDecorate(op)) { return false; } return true; @@ -248,7 +251,7 @@ uint32_t MemPass::Type2Undef(uint32_t type_id) { } std::unique_ptr undef_inst( - new Instruction(context(), SpvOpUndef, type_id, undefId, {})); + new Instruction(context(), spv::Op::OpUndef, type_id, undefId, {})); get_def_use_mgr()->AnalyzeInstDefUse(&*undef_inst); get_module()->AddGlobalValue(std::move(undef_inst)); type2undefs_[type_id] = undefId; @@ -264,11 +267,11 @@ bool MemPass::IsTargetVar(uint32_t varId) { return false; if (seen_target_vars_.find(varId) != seen_target_vars_.end()) return true; const Instruction* varInst = get_def_use_mgr()->GetDef(varId); - if (varInst->opcode() != SpvOpVariable) return false; + if (varInst->opcode() != spv::Op::OpVariable) return false; const uint32_t varTypeId = varInst->type_id(); const Instruction* varTypeInst = get_def_use_mgr()->GetDef(varTypeId); - if (varTypeInst->GetSingleWordInOperand(kTypePointerStorageClassInIdx) != - SpvStorageClassFunction) { + if (spv::StorageClass(varTypeInst->GetSingleWordInOperand( + kTypePointerStorageClassInIdx)) != spv::StorageClass::Function) { seen_non_target_vars_.insert(varId); return false; } @@ -489,8 +492,8 @@ void MemPass::CollectTargetVars(Function* func) { for (auto& blk : *func) { for (auto& inst : blk) { switch (inst.opcode()) { - case SpvOpStore: - case SpvOpLoad: { + case spv::Op::OpStore: + case spv::Op::OpLoad: { uint32_t varId; (void)GetPtr(&inst, &varId); if (!IsTargetVar(varId)) break; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.h index 5a77670dd..aef9e5ffa 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/mem_pass.h @@ -80,7 +80,7 @@ class MemPass : public Pass { bool IsTargetType(const Instruction* typeInst) const; // Returns true if |opcode| is a non-ptr access chain op - bool IsNonPtrAccessChain(const SpvOp opcode) const; + bool IsNonPtrAccessChain(const spv::Op opcode) const; // Given the id |ptrId|, return true if the top-most non-CopyObj is // a variable, a non-ptr access chain or a parameter of pointer type. @@ -117,8 +117,8 @@ class MemPass : public Pass { bool CFGCleanup(Function* func); // Return true if |op| is supported decorate. - inline bool IsNonTypeDecorate(uint32_t op) const { - return (op == SpvOpDecorate || op == SpvOpDecorateId); + inline bool IsNonTypeDecorate(spv::Op op) const { + return (op == spv::Op::OpDecorate || op == spv::Op::OpDecorateId); } // Return the id of an undef value with type |type_id|. Create and insert an diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.cpp index a962a7ccb..c262ea073 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.cpp @@ -30,7 +30,7 @@ namespace opt { Pass::Status MergeReturnPass::Process() { bool is_shader = - context()->get_feature_mgr()->HasCapability(SpvCapabilityShader); + context()->get_feature_mgr()->HasCapability(spv::Capability::Shader); bool failed = false; ProcessFunction pfn = [&failed, is_shader, this](Function* function) { @@ -74,16 +74,16 @@ Pass::Status MergeReturnPass::Process() { void MergeReturnPass::GenerateState(BasicBlock* block) { if (Instruction* mergeInst = block->GetMergeInst()) { - if (mergeInst->opcode() == SpvOpLoopMerge) { + if (mergeInst->opcode() == spv::Op::OpLoopMerge) { // If new loop, break to this loop merge block state_.emplace_back(mergeInst, mergeInst); } else { auto branchInst = mergeInst->NextNode(); - if (branchInst->opcode() == SpvOpSwitch) { + if (branchInst->opcode() == spv::Op::OpSwitch) { // If switch inside of loop, break to innermost loop merge block. // Otherwise need to break to this switch merge block. auto lastMergeInst = state_.back().BreakMergeInst(); - if (lastMergeInst && lastMergeInst->opcode() == SpvOpLoopMerge) + if (lastMergeInst && lastMergeInst->opcode() == spv::Op::OpLoopMerge) state_.emplace_back(lastMergeInst, mergeInst); else state_.emplace_back(mergeInst, mergeInst); @@ -174,7 +174,7 @@ bool MergeReturnPass::ProcessStructured( void MergeReturnPass::CreateReturnBlock() { // Create a label for the new return block std::unique_ptr return_label( - new Instruction(context(), SpvOpLabel, 0u, TakeNextId(), {})); + new Instruction(context(), spv::Op::OpLabel, 0u, TakeNextId(), {})); // Create the new basic block std::unique_ptr return_block( @@ -195,37 +195,41 @@ void MergeReturnPass::CreateReturn(BasicBlock* block) { // Load and return the final return value uint32_t loadId = TakeNextId(); block->AddInstruction(MakeUnique( - context(), SpvOpLoad, function_->type_id(), loadId, + context(), spv::Op::OpLoad, function_->type_id(), loadId, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {return_value_->result_id()}}})); Instruction* var_inst = block->terminator(); context()->AnalyzeDefUse(var_inst); context()->set_instr_block(var_inst, block); context()->get_decoration_mgr()->CloneDecorations( - return_value_->result_id(), loadId, {SpvDecorationRelaxedPrecision}); + return_value_->result_id(), loadId, + {spv::Decoration::RelaxedPrecision}); block->AddInstruction(MakeUnique( - context(), SpvOpReturnValue, 0, 0, + context(), spv::Op::OpReturnValue, 0, 0, std::initializer_list{{SPV_OPERAND_TYPE_ID, {loadId}}})); context()->AnalyzeDefUse(block->terminator()); context()->set_instr_block(block->terminator(), block); } else { - block->AddInstruction(MakeUnique(context(), SpvOpReturn)); + block->AddInstruction( + MakeUnique(context(), spv::Op::OpReturn)); context()->AnalyzeDefUse(block->terminator()); context()->set_instr_block(block->terminator(), block); } } void MergeReturnPass::ProcessStructuredBlock(BasicBlock* block) { - SpvOp tail_opcode = block->tail()->opcode(); - if (tail_opcode == SpvOpReturn || tail_opcode == SpvOpReturnValue) { + spv::Op tail_opcode = block->tail()->opcode(); + if (tail_opcode == spv::Op::OpReturn || + tail_opcode == spv::Op::OpReturnValue) { if (!return_flag_) { AddReturnFlag(); } } - if (tail_opcode == SpvOpReturn || tail_opcode == SpvOpReturnValue || - tail_opcode == SpvOpUnreachable) { + if (tail_opcode == spv::Op::OpReturn || + tail_opcode == spv::Op::OpReturnValue || + tail_opcode == spv::Op::OpUnreachable) { assert(CurrentState().InBreakable() && "Should be in the placeholder construct."); BranchToBlock(block, CurrentState().BreakMergeId()); @@ -234,8 +238,8 @@ void MergeReturnPass::ProcessStructuredBlock(BasicBlock* block) { } void MergeReturnPass::BranchToBlock(BasicBlock* block, uint32_t target) { - if (block->tail()->opcode() == SpvOpReturn || - block->tail()->opcode() == SpvOpReturnValue) { + if (block->tail()->opcode() == spv::Op::OpReturn || + block->tail()->opcode() == spv::Op::OpReturnValue) { RecordReturned(block); RecordReturnValue(block); } @@ -247,7 +251,7 @@ void MergeReturnPass::BranchToBlock(BasicBlock* block, uint32_t target) { UpdatePhiNodes(block, target_block); Instruction* return_inst = block->terminator(); - return_inst->SetOpcode(SpvOpBranch); + return_inst->SetOpcode(spv::Op::OpBranch); return_inst->ReplaceOperands({{SPV_OPERAND_TYPE_ID, {target}}}); context()->get_def_use_mgr()->AnalyzeInstDefUse(return_inst); new_edges_[target_block].insert(block->id()); @@ -276,7 +280,7 @@ void MergeReturnPass::CreatePhiNodesForInst(BasicBlock* merge_block, &inst, [&users_to_update, &dom_tree, &inst, inst_bb, this](Instruction* user) { BasicBlock* user_bb = nullptr; - if (user->opcode() != SpvOpPhi) { + if (user->opcode() != spv::Op::OpPhi) { user_bb = context()->get_instr_block(user); } else { // For OpPhi, the use should be considered to be in the predecessor. @@ -325,15 +329,16 @@ void MergeReturnPass::CreatePhiNodesForInst(BasicBlock* merge_block, // instruction. If not, the Spir-V will be invalid. Instruction* inst_type = get_def_use_mgr()->GetDef(inst.type_id()); bool regenerateInstruction = false; - if (inst_type->opcode() == SpvOpTypePointer) { + if (inst_type->opcode() == spv::Op::OpTypePointer) { if (!context()->get_feature_mgr()->HasCapability( - SpvCapabilityVariablePointers)) { + spv::Capability::VariablePointers)) { regenerateInstruction = true; } - uint32_t storage_class = inst_type->GetSingleWordInOperand(0); - if (storage_class != SpvStorageClassWorkgroup && - storage_class != SpvStorageClassStorageBuffer) { + auto storage_class = + spv::StorageClass(inst_type->GetSingleWordInOperand(0)); + if (storage_class != spv::StorageClass::Workgroup && + storage_class != spv::StorageClass::StorageBuffer) { regenerateInstruction = true; } } @@ -343,7 +348,7 @@ void MergeReturnPass::CreatePhiNodesForInst(BasicBlock* merge_block, uint32_t new_id = TakeNextId(); regen_inst->SetResultId(new_id); Instruction* insert_pos = &*merge_block->begin(); - while (insert_pos->opcode() == SpvOpPhi) { + while (insert_pos->opcode() == spv::Op::OpPhi) { insert_pos = insert_pos->NextNode(); } new_phi = insert_pos->InsertBefore(std::move(regen_inst)); @@ -431,6 +436,7 @@ bool MergeReturnPass::BreakFromConstruct( std::list* order, Instruction* break_merge_inst) { // Make sure the CFG is build here. If we don't then it becomes very hard // to know which new blocks need to be updated. + context()->InvalidateAnalyses(IRContext::kAnalysisCFG); context()->BuildInvalidAnalyses(IRContext::kAnalysisCFG); // When predicating, be aware of whether this block is a header block, a @@ -458,7 +464,7 @@ bool MergeReturnPass::BreakFromConstruct( // Leave the phi instructions behind. auto iter = block->begin(); - while (iter->opcode() == SpvOpPhi) { + while (iter->opcode() == spv::Op::OpPhi) { ++iter; } @@ -477,7 +483,7 @@ bool MergeReturnPass::BreakFromConstruct( // If |block| was a continue target for a loop |old_body| is now the correct // continue target. - if (break_merge_inst->opcode() == SpvOpLoopMerge && + if (break_merge_inst->opcode() == spv::Op::OpLoopMerge && break_merge_inst->GetSingleWordInOperand(1) == block->id()) { break_merge_inst->SetInOperand(1, {old_body->id()}); context()->UpdateDefUse(break_merge_inst); @@ -530,8 +536,8 @@ bool MergeReturnPass::BreakFromConstruct( } void MergeReturnPass::RecordReturned(BasicBlock* block) { - if (block->tail()->opcode() != SpvOpReturn && - block->tail()->opcode() != SpvOpReturnValue) + if (block->tail()->opcode() != spv::Op::OpReturn && + block->tail()->opcode() != spv::Op::OpReturnValue) return; assert(return_flag_ && "Did not generate the return flag variable."); @@ -549,7 +555,7 @@ void MergeReturnPass::RecordReturned(BasicBlock* block) { } std::unique_ptr return_store(new Instruction( - context(), SpvOpStore, 0, 0, + context(), spv::Op::OpStore, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {return_flag_->result_id()}}, {SPV_OPERAND_TYPE_ID, {constant_true_->result_id()}}})); @@ -562,7 +568,7 @@ void MergeReturnPass::RecordReturned(BasicBlock* block) { void MergeReturnPass::RecordReturnValue(BasicBlock* block) { auto terminator = *block->tail(); - if (terminator.opcode() != SpvOpReturnValue) { + if (terminator.opcode() != spv::Op::OpReturnValue) { return; } @@ -570,7 +576,7 @@ void MergeReturnPass::RecordReturnValue(BasicBlock* block) { "Did not generate the variable to hold the return value."); std::unique_ptr value_store(new Instruction( - context(), SpvOpStore, 0, 0, + context(), spv::Op::OpStore, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {return_value_->result_id()}}, {SPV_OPERAND_TYPE_ID, {terminator.GetSingleWordInOperand(0u)}}})); @@ -585,17 +591,19 @@ void MergeReturnPass::AddReturnValue() { if (return_value_) return; uint32_t return_type_id = function_->type_id(); - if (get_def_use_mgr()->GetDef(return_type_id)->opcode() == SpvOpTypeVoid) + if (get_def_use_mgr()->GetDef(return_type_id)->opcode() == + spv::Op::OpTypeVoid) return; uint32_t return_ptr_type = context()->get_type_mgr()->FindPointerToType( - return_type_id, SpvStorageClassFunction); + return_type_id, spv::StorageClass::Function); uint32_t var_id = TakeNextId(); - std::unique_ptr returnValue(new Instruction( - context(), SpvOpVariable, return_ptr_type, var_id, - std::initializer_list{ - {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); + std::unique_ptr returnValue( + new Instruction(context(), spv::Op::OpVariable, return_ptr_type, var_id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, + {uint32_t(spv::StorageClass::Function)}}})); auto insert_iter = function_->begin()->begin(); insert_iter.InsertBefore(std::move(returnValue)); @@ -605,7 +613,7 @@ void MergeReturnPass::AddReturnValue() { context()->set_instr_block(return_value_, entry_block); context()->get_decoration_mgr()->CloneDecorations( - function_->result_id(), var_id, {SpvDecorationRelaxedPrecision}); + function_->result_id(), var_id, {spv::Decoration::RelaxedPrecision}); } void MergeReturnPass::AddReturnFlag() { @@ -624,14 +632,14 @@ void MergeReturnPass::AddReturnFlag() { const_mgr->GetDefiningInstruction(false_const)->result_id(); uint32_t bool_ptr_id = - type_mgr->FindPointerToType(bool_id, SpvStorageClassFunction); + type_mgr->FindPointerToType(bool_id, spv::StorageClass::Function); uint32_t var_id = TakeNextId(); std::unique_ptr returnFlag(new Instruction( - context(), SpvOpVariable, bool_ptr_id, var_id, - std::initializer_list{ - {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}, - {SPV_OPERAND_TYPE_ID, {const_false_id}}})); + context(), spv::Op::OpVariable, bool_ptr_id, var_id, + std::initializer_list{{SPV_OPERAND_TYPE_STORAGE_CLASS, + {uint32_t(spv::StorageClass::Function)}}, + {SPV_OPERAND_TYPE_ID, {const_false_id}}})); auto insert_iter = function_->begin()->begin(); @@ -647,8 +655,8 @@ std::vector MergeReturnPass::CollectReturnBlocks( std::vector return_blocks; for (auto& block : *function) { Instruction& terminator = *block.tail(); - if (terminator.opcode() == SpvOpReturn || - terminator.opcode() == SpvOpReturnValue) { + if (terminator.opcode() == spv::Op::OpReturn || + terminator.opcode() == spv::Op::OpReturnValue) { return_blocks.push_back(&block); } } @@ -669,7 +677,7 @@ void MergeReturnPass::MergeReturnBlocks( // Create new return. std::vector phi_ops; for (auto block : return_blocks) { - if (block->tail()->opcode() == SpvOpReturnValue) { + if (block->tail()->opcode() == spv::Op::OpReturnValue) { phi_ops.push_back( {SPV_OPERAND_TYPE_ID, {block->tail()->GetSingleWordInOperand(0u)}}); phi_ops.push_back({SPV_OPERAND_TYPE_ID, {block->id()}}); @@ -681,12 +689,12 @@ void MergeReturnPass::MergeReturnBlocks( uint32_t phi_result_id = TakeNextId(); uint32_t phi_type_id = function->type_id(); std::unique_ptr phi_inst(new Instruction( - context(), SpvOpPhi, phi_type_id, phi_result_id, phi_ops)); + context(), spv::Op::OpPhi, phi_type_id, phi_result_id, phi_ops)); ret_block_iter->AddInstruction(std::move(phi_inst)); BasicBlock::iterator phiIter = ret_block_iter->tail(); std::unique_ptr return_inst( - new Instruction(context(), SpvOpReturnValue, 0u, 0u, + new Instruction(context(), spv::Op::OpReturnValue, 0u, 0u, {{SPV_OPERAND_TYPE_ID, {phi_result_id}}})); ret_block_iter->AddInstruction(std::move(return_inst)); BasicBlock::iterator ret = ret_block_iter->tail(); @@ -696,14 +704,14 @@ void MergeReturnPass::MergeReturnBlocks( get_def_use_mgr()->AnalyzeInstDef(&*ret); } else { std::unique_ptr return_inst( - new Instruction(context(), SpvOpReturn)); + new Instruction(context(), spv::Op::OpReturn)); ret_block_iter->AddInstruction(std::move(return_inst)); } // Replace returns with branches for (auto block : return_blocks) { context()->ForgetUses(block->terminator()); - block->tail()->SetOpcode(SpvOpBranch); + block->tail()->SetOpcode(spv::Op::OpBranch); block->tail()->ReplaceOperands({{SPV_OPERAND_TYPE_ID, {return_id}}}); get_def_use_mgr()->AnalyzeInstUse(block->terminator()); get_def_use_mgr()->AnalyzeInstUse(block->GetLabelInst()); @@ -788,7 +796,7 @@ bool MergeReturnPass::AddSingleCaseSwitchAroundFunction() { BasicBlock* MergeReturnPass::CreateContinueTarget(uint32_t header_label_id) { std::unique_ptr label( - new Instruction(context(), SpvOpLabel, 0u, TakeNextId(), {})); + new Instruction(context(), spv::Op::OpLabel, 0u, TakeNextId(), {})); // Create the new basic block std::unique_ptr block(new BasicBlock(std::move(label))); @@ -823,7 +831,7 @@ bool MergeReturnPass::CreateSingleCaseSwitch(BasicBlock* merge_target) { // block to make sure the OpVariable instructions remain in the entry block. BasicBlock* start_block = &*function_->begin(); auto split_pos = start_block->begin(); - while (split_pos->opcode() == SpvOpVariable) { + while (split_pos->opcode() == spv::Op::OpVariable) { ++split_pos; } @@ -864,7 +872,7 @@ bool MergeReturnPass::HasNontrivialUnreachableBlocks(Function* function) { if (struct_cfg_analysis->IsContinueBlock(bb.id())) { // |bb| must be an empty block ending with a branch to the header. Instruction* inst = &*bb.begin(); - if (inst->opcode() != SpvOpBranch) { + if (inst->opcode() != spv::Op::OpBranch) { return true; } @@ -874,7 +882,7 @@ bool MergeReturnPass::HasNontrivialUnreachableBlocks(Function* function) { } } else if (struct_cfg_analysis->IsMergeBlock(bb.id())) { // |bb| must be an empty block ending with OpUnreachable. - if (bb.begin()->opcode() != SpvOpUnreachable) { + if (bb.begin()->opcode() != spv::Op::OpUnreachable) { return true; } } else { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.h index 4096ce7dd..d15db2f67 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/merge_return_pass.h @@ -118,8 +118,6 @@ class MergeReturnPass : public MemPass { StructuredControlState(Instruction* break_merge, Instruction* merge) : break_merge_(break_merge), current_merge_(merge) {} - StructuredControlState(const StructuredControlState&) = default; - bool InBreakable() const { return break_merge_; } bool InStructuredFlow() const { return CurrentMergeId() != 0; } @@ -247,7 +245,7 @@ class MergeReturnPass : public MemPass { // Add new phi nodes for any id that no longer dominate all of it uses. A phi // node is added to a block |bb| for an id if the id is defined between the - // original immediate dominator of |bb| and its new immidiate dominator. It + // original immediate dominator of |bb| and its new immediate dominator. It // is assumed that at this point there are no unreachable blocks in the // control flow graph. void AddNewPhiNodes(); @@ -273,7 +271,7 @@ class MergeReturnPass : public MemPass { void InsertAfterElement(BasicBlock* element, BasicBlock* new_element, std::list* list); - // Creates a single case switch around all of the exectuable code of the + // Creates a single case switch around all of the executable code of the // current function where the switch and case value are both zero and the // default is the merge block. Returns after the switch is executed. Sets // |final_return_block_|. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.cpp new file mode 100644 index 000000000..dd79b6283 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.cpp @@ -0,0 +1,103 @@ +// Copyright (c) 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "modify_maximal_reconvergence.h" + +#include "source/opt/ir_context.h" +#include "source/util/make_unique.h" + +namespace spvtools { +namespace opt { + +Pass::Status ModifyMaximalReconvergence::Process() { + bool changed = false; + if (add_) { + changed = AddMaximalReconvergence(); + } else { + changed = RemoveMaximalReconvergence(); + } + return changed ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +bool ModifyMaximalReconvergence::AddMaximalReconvergence() { + bool changed = false; + bool has_extension = false; + bool has_shader = + context()->get_feature_mgr()->HasCapability(spv::Capability::Shader); + for (auto extension : context()->extensions()) { + if (extension.GetOperand(0).AsString() == "SPV_KHR_maximal_reconvergence") { + has_extension = true; + break; + } + } + + std::unordered_set entry_points_with_mode; + for (auto mode : get_module()->execution_modes()) { + if (spv::ExecutionMode(mode.GetSingleWordInOperand(1)) == + spv::ExecutionMode::MaximallyReconvergesKHR) { + entry_points_with_mode.insert(mode.GetSingleWordInOperand(0)); + } + } + + for (auto entry_point : get_module()->entry_points()) { + const uint32_t id = entry_point.GetSingleWordInOperand(1); + if (!entry_points_with_mode.count(id)) { + changed = true; + if (!has_extension) { + context()->AddExtension("SPV_KHR_maximal_reconvergence"); + has_extension = true; + } + if (!has_shader) { + context()->AddCapability(spv::Capability::Shader); + has_shader = true; + } + context()->AddExecutionMode(MakeUnique( + context(), spv::Op::OpExecutionMode, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {id}}, + {SPV_OPERAND_TYPE_EXECUTION_MODE, + {static_cast( + spv::ExecutionMode::MaximallyReconvergesKHR)}}})); + entry_points_with_mode.insert(id); + } + } + + return changed; +} + +bool ModifyMaximalReconvergence::RemoveMaximalReconvergence() { + bool changed = false; + std::vector to_remove; + Instruction* mode = &*get_module()->execution_mode_begin(); + while (mode) { + if (mode->opcode() != spv::Op::OpExecutionMode && + mode->opcode() != spv::Op::OpExecutionModeId) { + break; + } + if (spv::ExecutionMode(mode->GetSingleWordInOperand(1)) == + spv::ExecutionMode::MaximallyReconvergesKHR) { + mode = context()->KillInst(mode); + changed = true; + } else { + mode = mode->NextNode(); + } + } + + changed |= + context()->RemoveExtension(Extension::kSPV_KHR_maximal_reconvergence); + return changed; +} +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.h new file mode 100644 index 000000000..8d9a698e9 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/modify_maximal_reconvergence.h @@ -0,0 +1,53 @@ +// Copyright (c) 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LIBSPIRV_OPT_MODIFY_MAXIMAL_RECONVERGENCE_H_ +#define LIBSPIRV_OPT_MODIFY_MAXIMAL_RECONVERGENCE_H_ + +#include "pass.h" + +namespace spvtools { +namespace opt { + +// Modifies entry points to either add or remove MaximallyReconvergesKHR +// +// This pass will either add or remove MaximallyReconvergesKHR to all entry +// points in the module. When adding the execution mode, it does not attempt to +// determine whether any ray tracing invocation repack instructions might be +// executed because it is a runtime restriction. That is left to the user. +class ModifyMaximalReconvergence : public Pass { + public: + const char* name() const override { return "modify-maximal-reconvergence"; } + Status Process() override; + + explicit ModifyMaximalReconvergence(bool add = true) : Pass(), add_(add) {} + + IRContext::Analysis GetPreservedAnalyses() override { + return IRContext::kAnalysisDefUse | + IRContext::kAnalysisInstrToBlockMapping | + IRContext::kAnalysisDecorations | IRContext::kAnalysisCombinators | + IRContext::kAnalysisCFG | IRContext::kAnalysisNameMap | + IRContext::kAnalysisConstants | IRContext::kAnalysisTypes; + } + + private: + bool AddMaximalReconvergence(); + bool RemoveMaximalReconvergence(); + + bool add_; +}; +} // namespace opt +} // namespace spvtools + +#endif // LIBSPIRV_OPT_MODIFY_MAXIMAL_RECONVERGENCE_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.cpp index 5983abb12..a9710c6a3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.cpp @@ -69,14 +69,14 @@ std::vector Module::GetConstants() const { return const_insts; } -uint32_t Module::GetGlobalValue(SpvOp opcode) const { +uint32_t Module::GetGlobalValue(spv::Op opcode) const { for (auto& inst : types_values_) { if (inst.opcode() == opcode) return inst.result_id(); } return 0; } -void Module::AddGlobalValue(SpvOp opcode, uint32_t result_id, +void Module::AddGlobalValue(spv::Op opcode, uint32_t result_id, uint32_t type_id) { std::unique_ptr newGlobal( new Instruction(context(), opcode, type_id, result_id, {})); @@ -90,6 +90,8 @@ void Module::ForEachInst(const std::function& f, DELEGATE(extensions_); DELEGATE(ext_inst_imports_); if (memory_model_) memory_model_->ForEachInst(f, run_on_debug_line_insts); + if (sampled_image_address_mode_) + sampled_image_address_mode_->ForEachInst(f, run_on_debug_line_insts); DELEGATE(entry_points_); DELEGATE(execution_modes_); DELEGATE(debugs1_); @@ -114,6 +116,9 @@ void Module::ForEachInst(const std::function& f, if (memory_model_) static_cast(memory_model_.get()) ->ForEachInst(f, run_on_debug_line_insts); + if (sampled_image_address_mode_) + static_cast(sampled_image_address_mode_.get()) + ->ForEachInst(f, run_on_debug_line_insts); for (auto& i : entry_points_) DELEGATE(i); for (auto& i : execution_modes_) DELEGATE(i); for (auto& i : debugs1_) DELEGATE(i); @@ -154,7 +159,6 @@ void Module::ToBinary(std::vector* binary, bool skip_nop) const { if (between_merge_and_branch && i->IsLineInst()) { return; } - between_merge_and_branch = false; if (last_line_inst != nullptr) { // If the current instruction is OpLine or DebugLine and it is the same // as the last line instruction that is still effective (can be applied @@ -176,28 +180,30 @@ void Module::ToBinary(std::vector* binary, bool skip_nop) const { ->get_feature_mgr() ->GetExtInstImportId_Shader100DebugInfo(); if (shader_set_id != 0) { - binary->push_back((5 << 16) | static_cast(SpvOpExtInst)); + binary->push_back((5 << 16) | + static_cast(spv::Op::OpExtInst)); binary->push_back(context()->get_type_mgr()->GetVoidTypeId()); binary->push_back(context()->TakeNextId()); binary->push_back(shader_set_id); binary->push_back(NonSemanticShaderDebugInfo100DebugNoLine); } else { - binary->push_back((1 << 16) | static_cast(SpvOpNoLine)); + binary->push_back((1 << 16) | + static_cast(spv::Op::OpNoLine)); } last_line_inst = nullptr; } } - if (opcode == SpvOpLabel) { + if (opcode == spv::Op::OpLabel) { between_label_and_phi_var = true; - } else if (opcode != SpvOpVariable && opcode != SpvOpPhi && + } else if (opcode != spv::Op::OpVariable && opcode != spv::Op::OpPhi && !spvtools::opt::IsOpLineInst(opcode)) { between_label_and_phi_var = false; } if (!(skip_nop && i->IsNop())) { const auto& scope = i->GetDebugScope(); - if (scope != last_scope) { + if (scope != last_scope && !between_merge_and_branch) { // Can only emit nonsemantic instructions after all phi instructions // in a block so don't emit scope instructions before phi instructions // for NonSemantic.Shader.DebugInfo.100. @@ -216,9 +222,11 @@ void Module::ToBinary(std::vector* binary, bool skip_nop) const { i->ToBinaryWithoutAttachedDebugInsts(binary); } // Update the last line instruction. + between_merge_and_branch = false; if (spvOpcodeIsBlockTerminator(opcode) || i->IsNoLine()) { last_line_inst = nullptr; - } else if (opcode == SpvOpLoopMerge || opcode == SpvOpSelectionMerge) { + } else if (opcode == spv::Op::OpLoopMerge || + opcode == spv::Op::OpSelectionMerge) { between_merge_and_branch = true; last_line_inst = nullptr; } else if (i->IsLine()) { @@ -267,7 +275,7 @@ uint32_t Module::GetExtInstImportId(const char* extstr) { std::ostream& operator<<(std::ostream& str, const Module& module) { module.ForEachInst([&str](const Instruction* inst) { str << *inst; - if (inst->opcode() != SpvOpFunctionEnd) { + if (inst->opcode() != spv::Op::OpFunctionEnd) { str << std::endl; } }); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.h index 230be7095..98c16dc4c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/module.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -83,6 +84,9 @@ class Module { // Set the memory model for this module. inline void SetMemoryModel(std::unique_ptr m); + // Set the sampled image addressing mode for this module. + inline void SetSampledImageAddressMode(std::unique_ptr m); + // Appends an entry point instruction to this module. inline void AddEntryPoint(std::unique_ptr e); @@ -116,6 +120,9 @@ class Module { // Appends a constant, global variable, or OpUndef instruction to this module. inline void AddGlobalValue(std::unique_ptr v); + // Prepends a function declaration to this module. + inline void AddFunctionDeclaration(std::unique_ptr f); + // Appends a function to this module. inline void AddFunction(std::unique_ptr f); @@ -133,10 +140,10 @@ class Module { std::vector GetConstants() const; // Return result id of global value with |opcode|, 0 if not present. - uint32_t GetGlobalValue(SpvOp opcode) const; + uint32_t GetGlobalValue(spv::Op opcode) const; // Add global value with |opcode|, |result_id| and |type_id| - void AddGlobalValue(SpvOp opcode, uint32_t result_id, uint32_t type_id); + void AddGlobalValue(spv::Op opcode, uint32_t result_id, uint32_t type_id); inline uint32_t id_bound() const { return header_.bound; } @@ -158,12 +165,20 @@ class Module { inline IteratorRange ext_inst_imports(); inline IteratorRange ext_inst_imports() const; - // Return the memory model instruction contained inthis module. + // Return the memory model instruction contained in this module. inline Instruction* GetMemoryModel() { return memory_model_.get(); } inline const Instruction* GetMemoryModel() const { return memory_model_.get(); } + // Return the sampled image address mode instruction contained in this module. + inline Instruction* GetSampledImageAddressMode() { + return sampled_image_address_mode_.get(); + } + inline const Instruction* GetSampledImageAddressMode() const { + return sampled_image_address_mode_.get(); + } + // There are several kinds of debug instructions, according to where they can // appear in the logical layout of a module: // - Section 7a: OpString, OpSourceExtension, OpSource, OpSourceContinued @@ -288,6 +303,8 @@ class Module { InstructionList ext_inst_imports_; // A module only has one memory model instruction. std::unique_ptr memory_model_; + // A module can only have one optional sampled image addressing mode + std::unique_ptr sampled_image_address_mode_; InstructionList entry_points_; InstructionList execution_modes_; InstructionList debugs1_; @@ -326,6 +343,10 @@ inline void Module::SetMemoryModel(std::unique_ptr m) { memory_model_ = std::move(m); } +inline void Module::SetSampledImageAddressMode(std::unique_ptr m) { + sampled_image_address_mode_ = std::move(m); +} + inline void Module::AddEntryPoint(std::unique_ptr e) { entry_points_.push_back(std::move(e)); } @@ -362,6 +383,11 @@ inline void Module::AddGlobalValue(std::unique_ptr v) { types_values_.push_back(std::move(v)); } +inline void Module::AddFunctionDeclaration(std::unique_ptr f) { + // function declarations must come before function definitions. + functions_.emplace(functions_.begin(), std::move(f)); +} + inline void Module::AddFunction(std::unique_ptr f) { functions_.emplace_back(std::move(f)); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/optimizer.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/optimizer.cpp index 330093e45..c4c2b0f55 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/optimizer.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/optimizer.cpp @@ -15,6 +15,7 @@ #include "spirv-tools/optimizer.hpp" #include +#include #include #include #include @@ -32,6 +33,15 @@ namespace spvtools { +std::vector GetVectorOfStrings(const char** strings, + const size_t string_count) { + std::vector result; + for (uint32_t i = 0; i < string_count; i++) { + result.emplace_back(strings[i]); + } + return result; +} + struct Optimizer::PassToken::Impl { Impl(std::unique_ptr p) : pass(std::move(p)) {} @@ -60,6 +70,7 @@ struct Optimizer::Impl { spv_target_env target_env; // Target environment. opt::PassManager pass_manager; // Internal implementation pass manager. + std::unordered_set live_locs; // Arg to debug dead output passes }; Optimizer::Optimizer(spv_target_env env) : impl_(new Impl(env)) { @@ -108,7 +119,7 @@ Optimizer& Optimizer::RegisterPass(PassToken&& p) { // The legalization problem is essentially a very general copy propagation // problem. The optimization we use are all used to either do copy propagation // or enable more copy propagation. -Optimizer& Optimizer::RegisterLegalizationPasses() { +Optimizer& Optimizer::RegisterLegalizationPasses(bool preserve_interface) { return // Wrap OpKill instructions so all other code can be inlined. RegisterPass(CreateWrapOpKillPass()) @@ -128,16 +139,16 @@ Optimizer& Optimizer::RegisterLegalizationPasses() { // Propagate the value stored to the loads in very simple cases. .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) // Split up aggregates so they are easier to deal with. .RegisterPass(CreateScalarReplacementPass(0)) // Remove loads and stores so everything is in intermediate values. // Takes care of copy propagation of non-members. .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateLocalMultiStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) // Propagate constants to get as many constant conditions on branches // as possible. .RegisterPass(CreateCCPPass()) @@ -146,7 +157,7 @@ Optimizer& Optimizer::RegisterLegalizationPasses() { // Copy propagate members. Cleans up code sequences generated by // scalar replacement. Also important for removing OpPhi nodes. .RegisterPass(CreateSimplificationPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateCopyPropagateArraysPass()) // May need loop unrolling here see // https://github.com/Microsoft/DirectXShaderCompiler/pull/930 @@ -155,30 +166,36 @@ Optimizer& Optimizer::RegisterLegalizationPasses() { .RegisterPass(CreateVectorDCEPass()) .RegisterPass(CreateDeadInsertElimPass()) .RegisterPass(CreateReduceLoadSizePass()) - .RegisterPass(CreateAggressiveDCEPass()) - .RegisterPass(CreateInterpolateFixupPass()); + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) + .RegisterPass(CreateRemoveUnusedInterfaceVariablesPass()) + .RegisterPass(CreateInterpolateFixupPass()) + .RegisterPass(CreateInvocationInterlockPlacementPass()); } -Optimizer& Optimizer::RegisterPerformancePasses() { +Optimizer& Optimizer::RegisterLegalizationPasses() { + return RegisterLegalizationPasses(false); +} + +Optimizer& Optimizer::RegisterPerformancePasses(bool preserve_interface) { return RegisterPass(CreateWrapOpKillPass()) .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateMergeReturnPass()) .RegisterPass(CreateInlineExhaustivePass()) .RegisterPass(CreateEliminateDeadFunctionsPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreatePrivateToLocalPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateScalarReplacementPass()) .RegisterPass(CreateLocalAccessChainConvertPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateLocalMultiStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateCCPPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateLoopUnrollPass(true)) .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateRedundancyEliminationPass()) @@ -188,9 +205,9 @@ Optimizer& Optimizer::RegisterPerformancePasses() { .RegisterPass(CreateLocalAccessChainConvertPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) .RegisterPass(CreateLocalSingleStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateSSARewritePass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateVectorDCEPass()) .RegisterPass(CreateDeadInsertElimPass()) .RegisterPass(CreateDeadBranchElimPass()) @@ -198,7 +215,7 @@ Optimizer& Optimizer::RegisterPerformancePasses() { .RegisterPass(CreateIfConversionPass()) .RegisterPass(CreateCopyPropagateArraysPass()) .RegisterPass(CreateReduceLoadSizePass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateBlockMergePass()) .RegisterPass(CreateRedundancyEliminationPass()) .RegisterPass(CreateDeadBranchElimPass()) @@ -206,7 +223,11 @@ Optimizer& Optimizer::RegisterPerformancePasses() { .RegisterPass(CreateSimplificationPass()); } -Optimizer& Optimizer::RegisterSizePasses() { +Optimizer& Optimizer::RegisterPerformancePasses() { + return RegisterPerformancePasses(false); +} + +Optimizer& Optimizer::RegisterSizePasses(bool preserve_interface) { return RegisterPass(CreateWrapOpKillPass()) .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateMergeReturnPass()) @@ -223,12 +244,12 @@ Optimizer& Optimizer::RegisterSizePasses() { .RegisterPass(CreateLocalSingleStoreElimPass()) .RegisterPass(CreateIfConversionPass()) .RegisterPass(CreateSimplificationPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateDeadBranchElimPass()) .RegisterPass(CreateBlockMergePass()) .RegisterPass(CreateLocalAccessChainConvertPass()) .RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateCopyPropagateArraysPass()) .RegisterPass(CreateVectorDCEPass()) .RegisterPass(CreateDeadInsertElimPass()) @@ -238,13 +259,20 @@ Optimizer& Optimizer::RegisterSizePasses() { .RegisterPass(CreateLocalMultiStoreElimPass()) .RegisterPass(CreateRedundancyEliminationPass()) .RegisterPass(CreateSimplificationPass()) - .RegisterPass(CreateAggressiveDCEPass()) + .RegisterPass(CreateAggressiveDCEPass(preserve_interface)) .RegisterPass(CreateCFGCleanupPass()); } +Optimizer& Optimizer::RegisterSizePasses() { return RegisterSizePasses(false); } + bool Optimizer::RegisterPassesFromFlags(const std::vector& flags) { + return RegisterPassesFromFlags(flags, false); +} + +bool Optimizer::RegisterPassesFromFlags(const std::vector& flags, + bool preserve_interface) { for (const auto& flag : flags) { - if (!RegisterPassFromFlag(flag)) { + if (!RegisterPassFromFlag(flag, preserve_interface)) { return false; } } @@ -268,6 +296,11 @@ bool Optimizer::FlagHasValidForm(const std::string& flag) const { } bool Optimizer::RegisterPassFromFlag(const std::string& flag) { + return RegisterPassFromFlag(flag, false); +} + +bool Optimizer::RegisterPassFromFlag(const std::string& flag, + bool preserve_interface) { if (!FlagHasValidForm(flag)) { return false; } @@ -329,7 +362,7 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) { } else if (pass_name == "descriptor-scalar-replacement") { RegisterPass(CreateDescriptorScalarReplacementPass()); } else if (pass_name == "eliminate-dead-code-aggressive") { - RegisterPass(CreateAggressiveDCEPass()); + RegisterPass(CreateAggressiveDCEPass(preserve_interface)); } else if (pass_name == "eliminate-insert-extract") { RegisterPass(CreateInsertExtractElimPass()); } else if (pass_name == "eliminate-local-single-block") { @@ -418,32 +451,26 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) { RegisterPass(CreateWorkaround1209Pass()); } else if (pass_name == "replace-invalid-opcode") { RegisterPass(CreateReplaceInvalidOpcodePass()); - } else if (pass_name == "inst-bindless-check") { - RegisterPass(CreateInstBindlessCheckPass(7, 23, false, false)); - RegisterPass(CreateSimplificationPass()); - RegisterPass(CreateDeadBranchElimPass()); - RegisterPass(CreateBlockMergePass()); - RegisterPass(CreateAggressiveDCEPass(true)); - } else if (pass_name == "inst-desc-idx-check") { - RegisterPass(CreateInstBindlessCheckPass(7, 23, true, true)); + } else if (pass_name == "inst-bindless-check" || + pass_name == "inst-desc-idx-check" || + pass_name == "inst-buff-oob-check") { + // preserve legacy names + RegisterPass(CreateInstBindlessCheckPass(23)); RegisterPass(CreateSimplificationPass()); RegisterPass(CreateDeadBranchElimPass()); RegisterPass(CreateBlockMergePass()); - RegisterPass(CreateAggressiveDCEPass(true)); - } else if (pass_name == "inst-buff-oob-check") { - RegisterPass(CreateInstBindlessCheckPass(7, 23, false, false, true, true)); - RegisterPass(CreateSimplificationPass()); - RegisterPass(CreateDeadBranchElimPass()); - RegisterPass(CreateBlockMergePass()); - RegisterPass(CreateAggressiveDCEPass(true)); } else if (pass_name == "inst-buff-addr-check") { - RegisterPass(CreateInstBuffAddrCheckPass(7, 23)); - RegisterPass(CreateAggressiveDCEPass(true)); + RegisterPass(CreateInstBuffAddrCheckPass(23)); } else if (pass_name == "convert-relaxed-to-half") { RegisterPass(CreateConvertRelaxedToHalfPass()); } else if (pass_name == "relax-float-ops") { RegisterPass(CreateRelaxFloatOpsPass()); } else if (pass_name == "inst-debug-printf") { + // This private option is not for user consumption. + // It is here to assist in debugging and fixing the debug printf + // instrumentation pass. + // For users who wish to utilize debug printf, see the white paper at + // https://www.lunarg.com/wp-content/uploads/2021/08/Using-Debug-Printf-02August2021.pdf RegisterPass(CreateInstDebugPrintfPass(7, 23)); } else if (pass_name == "simplify-instructions") { RegisterPass(CreateSimplificationPass()); @@ -506,11 +533,11 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) { } else if (pass_name == "fix-storage-class") { RegisterPass(CreateFixStorageClassPass()); } else if (pass_name == "O") { - RegisterPerformancePasses(); + RegisterPerformancePasses(preserve_interface); } else if (pass_name == "Os") { - RegisterSizePasses(); + RegisterSizePasses(preserve_interface); } else if (pass_name == "legalize-hlsl") { - RegisterLegalizationPasses(); + RegisterLegalizationPasses(preserve_interface); } else if (pass_name == "remove-unused-interface-variables") { RegisterPass(CreateRemoveUnusedInterfaceVariablesPass()); } else if (pass_name == "graphics-robust-access") { @@ -521,6 +548,12 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) { RegisterPass(CreateAmdExtToKhrPass()); } else if (pass_name == "interpolate-fixup") { RegisterPass(CreateInterpolateFixupPass()); + } else if (pass_name == "remove-dont-inline") { + RegisterPass(CreateRemoveDontInlinePass()); + } else if (pass_name == "eliminate-dead-input-components") { + RegisterPass(CreateEliminateDeadInputComponentsSafePass()); + } else if (pass_name == "fix-func-call-param") { + RegisterPass(CreateFixFuncCallArgumentsPass()); } else if (pass_name == "convert-to-sampled-image") { if (pass_args.size() > 0) { auto descriptor_set_binding_pairs = @@ -541,6 +574,58 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) { pass_args.c_str()); return false; } + } else if (pass_name == "switch-descriptorset") { + if (pass_args.size() == 0) { + Error(consumer(), nullptr, {}, + "--switch-descriptorset requires a from:to argument."); + return false; + } + uint32_t from_set = 0, to_set = 0; + const char* start = pass_args.data(); + const char* end = pass_args.data() + pass_args.size(); + + auto result = std::from_chars(start, end, from_set); + if (result.ec != std::errc()) { + Errorf(consumer(), nullptr, {}, + "Invalid argument for --switch-descriptorset: %s", + pass_args.c_str()); + return false; + } + start = result.ptr; + if (start[0] != ':') { + Errorf(consumer(), nullptr, {}, + "Invalid argument for --switch-descriptorset: %s", + pass_args.c_str()); + return false; + } + start++; + result = std::from_chars(start, end, to_set); + if (result.ec != std::errc() || result.ptr != end) { + Errorf(consumer(), nullptr, {}, + "Invalid argument for --switch-descriptorset: %s", + pass_args.c_str()); + return false; + } + RegisterPass(CreateSwitchDescriptorSetPass(from_set, to_set)); + } else if (pass_name == "modify-maximal-reconvergence") { + if (pass_args.size() == 0) { + Error(consumer(), nullptr, {}, + "--modify-maximal-reconvergence requires an argument"); + return false; + } + if (pass_args == "add") { + RegisterPass(CreateModifyMaximalReconvergencePass(true)); + } else if (pass_args == "remove") { + RegisterPass(CreateModifyMaximalReconvergencePass(false)); + } else { + Errorf(consumer(), nullptr, {}, + "Invalid argument for --modify-maximal-reconvergence: %s (must be " + "'add' or 'remove')", + pass_args.c_str()); + return false; + } + } else if (pass_name == "trim-capabilities") { + RegisterPass(CreateTrimCapabilitiesPass()); } else { Errorf(consumer(), nullptr, {}, "Unknown flag '--%s'. Use --help for a list of valid flags", @@ -617,10 +702,16 @@ bool Optimizer::Run(const uint32_t* original_binary, assert(optimized_binary_with_nop.size() == original_binary_size && "Binary size unexpectedly changed despite the optimizer saying " "there was no change"); - assert(memcmp(optimized_binary_with_nop.data(), original_binary, - original_binary_size) == 0 && - "Binary content unexpectedly changed despite the optimizer saying " - "there was no change"); + + // Compare the magic number to make sure the binaries were encoded in the + // endianness. If not, the contents of the binaries will be different, so + // do not check the contents. + if (optimized_binary_with_nop[0] == original_binary[0]) { + assert(memcmp(optimized_binary_with_nop.data(), original_binary, + original_binary_size) == 0 && + "Binary content unexpectedly changed despite the optimizer saying " + "there was no change"); + } } #endif // !NDEBUG @@ -774,12 +865,18 @@ Optimizer::PassToken CreateLocalMultiStoreElimPass() { Optimizer::PassToken CreateAggressiveDCEPass() { return MakeUnique( - MakeUnique(false)); + MakeUnique(false, false)); } Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface) { return MakeUnique( - MakeUnique(preserve_interface)); + MakeUnique(preserve_interface, false)); +} + +Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface, + bool remove_outputs) { + return MakeUnique( + MakeUnique(preserve_interface, remove_outputs)); } Optimizer::PassToken CreateRemoveUnusedInterfaceVariablesPass() { @@ -926,14 +1023,9 @@ Optimizer::PassToken CreateUpgradeMemoryModelPass() { MakeUnique()); } -Optimizer::PassToken CreateInstBindlessCheckPass( - uint32_t desc_set, uint32_t shader_id, bool desc_length_enable, - bool desc_init_enable, bool buff_oob_enable, bool texbuff_oob_enable) { +Optimizer::PassToken CreateInstBindlessCheckPass(uint32_t shader_id) { return MakeUnique( - MakeUnique( - desc_set, shader_id, desc_length_enable, desc_init_enable, - buff_oob_enable, texbuff_oob_enable, - desc_length_enable || desc_init_enable || buff_oob_enable)); + MakeUnique(shader_id)); } Optimizer::PassToken CreateInstDebugPrintfPass(uint32_t desc_set, @@ -942,10 +1034,9 @@ Optimizer::PassToken CreateInstDebugPrintfPass(uint32_t desc_set, MakeUnique(desc_set, shader_id)); } -Optimizer::PassToken CreateInstBuffAddrCheckPass(uint32_t desc_set, - uint32_t shader_id) { +Optimizer::PassToken CreateInstBuffAddrCheckPass(uint32_t shader_id) { return MakeUnique( - MakeUnique(desc_set, shader_id)); + MakeUnique(shader_id)); } Optimizer::PassToken CreateConvertRelaxedToHalfPass() { @@ -1002,6 +1093,38 @@ Optimizer::PassToken CreateInterpolateFixupPass() { MakeUnique()); } +Optimizer::PassToken CreateEliminateDeadInputComponentsPass() { + return MakeUnique( + MakeUnique(spv::StorageClass::Input, + /* safe_mode */ false)); +} + +Optimizer::PassToken CreateEliminateDeadOutputComponentsPass() { + return MakeUnique( + MakeUnique(spv::StorageClass::Output, + /* safe_mode */ false)); +} + +Optimizer::PassToken CreateEliminateDeadInputComponentsSafePass() { + return MakeUnique( + MakeUnique(spv::StorageClass::Input, + /* safe_mode */ true)); +} + +Optimizer::PassToken CreateAnalyzeLiveInputPass( + std::unordered_set* live_locs, + std::unordered_set* live_builtins) { + return MakeUnique( + MakeUnique(live_locs, live_builtins)); +} + +Optimizer::PassToken CreateEliminateDeadOutputStoresPass( + std::unordered_set* live_locs, + std::unordered_set* live_builtins) { + return MakeUnique( + MakeUnique(live_locs, live_builtins)); +} + Optimizer::PassToken CreateConvertToSampledImagePass( const std::vector& descriptor_set_binding_pairs) { @@ -1009,4 +1132,136 @@ Optimizer::PassToken CreateConvertToSampledImagePass( MakeUnique(descriptor_set_binding_pairs)); } +Optimizer::PassToken CreateInterfaceVariableScalarReplacementPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateRemoveDontInlinePass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateFixFuncCallArgumentsPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateTrimCapabilitiesPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateSwitchDescriptorSetPass(uint32_t from, uint32_t to) { + return MakeUnique( + MakeUnique(from, to)); +} + +Optimizer::PassToken CreateInvocationInterlockPlacementPass() { + return MakeUnique( + MakeUnique()); +} + +Optimizer::PassToken CreateModifyMaximalReconvergencePass(bool add) { + return MakeUnique( + MakeUnique(add)); +} } // namespace spvtools + +extern "C" { + +SPIRV_TOOLS_EXPORT spv_optimizer_t* spvOptimizerCreate(spv_target_env env) { + return reinterpret_cast(new spvtools::Optimizer(env)); +} + +SPIRV_TOOLS_EXPORT void spvOptimizerDestroy(spv_optimizer_t* optimizer) { + delete reinterpret_cast(optimizer); +} + +SPIRV_TOOLS_EXPORT void spvOptimizerSetMessageConsumer( + spv_optimizer_t* optimizer, spv_message_consumer consumer) { + reinterpret_cast(optimizer)-> + SetMessageConsumer( + [consumer](spv_message_level_t level, const char* source, + const spv_position_t& position, const char* message) { + return consumer(level, source, &position, message); + }); +} + +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterLegalizationPasses( + spv_optimizer_t* optimizer) { + reinterpret_cast(optimizer)-> + RegisterLegalizationPasses(); +} + +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterPerformancePasses( + spv_optimizer_t* optimizer) { + reinterpret_cast(optimizer)-> + RegisterPerformancePasses(); +} + +SPIRV_TOOLS_EXPORT void spvOptimizerRegisterSizePasses( + spv_optimizer_t* optimizer) { + reinterpret_cast(optimizer)->RegisterSizePasses(); +} + +SPIRV_TOOLS_EXPORT bool spvOptimizerRegisterPassFromFlag( + spv_optimizer_t* optimizer, const char* flag) +{ + return reinterpret_cast(optimizer)-> + RegisterPassFromFlag(flag); +} + +SPIRV_TOOLS_EXPORT bool spvOptimizerRegisterPassesFromFlags( + spv_optimizer_t* optimizer, const char** flags, const size_t flag_count) { + std::vector opt_flags = + spvtools::GetVectorOfStrings(flags, flag_count); + return reinterpret_cast(optimizer) + ->RegisterPassesFromFlags(opt_flags, false); +} + +SPIRV_TOOLS_EXPORT bool +spvOptimizerRegisterPassesFromFlagsWhilePreservingTheInterface( + spv_optimizer_t* optimizer, const char** flags, const size_t flag_count) { + std::vector opt_flags = + spvtools::GetVectorOfStrings(flags, flag_count); + return reinterpret_cast(optimizer) + ->RegisterPassesFromFlags(opt_flags, true); +} + +SPIRV_TOOLS_EXPORT +spv_result_t spvOptimizerRun(spv_optimizer_t* optimizer, + const uint32_t* binary, + const size_t word_count, + spv_binary* optimized_binary, + const spv_optimizer_options options) { + std::vector optimized; + + if (!reinterpret_cast(optimizer)-> + Run(binary, word_count, &optimized, options)) { + return SPV_ERROR_INTERNAL; + } + + auto result_binary = new spv_binary_t(); + if (!result_binary) { + *optimized_binary = nullptr; + return SPV_ERROR_OUT_OF_MEMORY; + } + + result_binary->code = new uint32_t[optimized.size()]; + if (!result_binary->code) { + delete result_binary; + *optimized_binary = nullptr; + return SPV_ERROR_OUT_OF_MEMORY; + } + result_binary->wordCount = optimized.size(); + + memcpy(result_binary->code, optimized.data(), + optimized.size() * sizeof(uint32_t)); + + *optimized_binary = result_binary; + + return SPV_SUCCESS; +} + +} // extern "C" diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.cpp index 017aad10f..75c37407f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.cpp @@ -21,11 +21,8 @@ namespace spvtools { namespace opt { - namespace { - -const uint32_t kTypePointerTypeIdInIdx = 1; - +constexpr uint32_t kTypePointerTypeIdInIdx = 1; } // namespace Pass::Pass() : consumer_(nullptr), context_(nullptr), already_run_(false) {} @@ -56,11 +53,11 @@ uint32_t Pass::GetPointeeTypeId(const Instruction* ptrInst) const { Instruction* Pass::GetBaseType(uint32_t ty_id) { Instruction* ty_inst = get_def_use_mgr()->GetDef(ty_id); - if (ty_inst->opcode() == SpvOpTypeMatrix) { + if (ty_inst->opcode() == spv::Op::OpTypeMatrix) { uint32_t vty_id = ty_inst->GetSingleWordInOperand(0); ty_inst = get_def_use_mgr()->GetDef(vty_id); } - if (ty_inst->opcode() == SpvOpTypeVector) { + if (ty_inst->opcode() == spv::Op::OpTypeVector) { uint32_t cty_id = ty_inst->GetSingleWordInOperand(0); ty_inst = get_def_use_mgr()->GetDef(cty_id); } @@ -69,12 +66,12 @@ Instruction* Pass::GetBaseType(uint32_t ty_id) { bool Pass::IsFloat(uint32_t ty_id, uint32_t width) { Instruction* ty_inst = GetBaseType(ty_id); - if (ty_inst->opcode() != SpvOpTypeFloat) return false; + if (ty_inst->opcode() != spv::Op::OpTypeFloat) return false; return ty_inst->GetSingleWordInOperand(0) == width; } uint32_t Pass::GetNullId(uint32_t type_id) { - if (IsFloat(type_id, 16)) context()->AddCapability(SpvCapabilityFloat16); + if (IsFloat(type_id, 16)) context()->AddCapability(spv::Capability::Float16); analysis::TypeManager* type_mgr = context()->get_type_mgr(); analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); const analysis::Type* type = type_mgr->GetType(type_id); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.h index a8c9c4b43..b2303e231 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass.h @@ -28,6 +28,13 @@ #include "spirv-tools/libspirv.hpp" #include "types.h" +// Avoid unused variable warning/error on Linux +#ifndef NDEBUG +#define USE_ASSERT(x) assert(x) +#else +#define USE_ASSERT(x) ((void)(x)) +#endif + namespace spvtools { namespace opt { @@ -129,7 +136,7 @@ class Pass { // Processes the given |module|. Returns Status::Failure if errors occur when // processing. Returns the corresponding Status::Success if processing is - // succesful to indicate whether changes are made to the module. + // successful to indicate whether changes are made to the module. virtual Status Process() = 0; // Return the next available SSA id and increment it. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.cpp index a73ff7cf4..d3c47e7f3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.cpp @@ -39,7 +39,7 @@ Pass::Status PassManager::Run(IRContext* context) { t.SetMessageConsumer(consumer()); std::string disassembly; std::string pass_name = (pass ? pass->name() : ""); - if (!t.Disassemble(binary, &disassembly, 0)) { + if (!t.Disassemble(binary, &disassembly)) { std::string msg = "Disassembly failed before pass "; msg += pass_name + "\n"; spv_position_t null_pos{0, 0, 0}; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.h index 9686dddc2..11961a330 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/pass_manager.h @@ -54,7 +54,7 @@ class PassManager { // Adds an externally constructed pass. void AddPass(std::unique_ptr pass); // Uses the argument |args| to construct a pass instance of type |T|, and adds - // the pass instance to this pass manger. The pass added will use this pass + // the pass instance to this pass manager. The pass added will use this pass // manager's message consumer. template void AddPass(Args&&... args); @@ -70,7 +70,7 @@ class PassManager { // Runs all passes on the given |module|. Returns Status::Failure if errors // occur when processing using one of the registered passes. All passes // registered after the error-reporting pass will be skipped. Returns the - // corresponding Status::Success if processing is succesful to indicate + // corresponding Status::Success if processing is successful to indicate // whether changes are made to the module. // // After running all the passes, they are removed from the list. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/passes.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/passes.h index d51c306e7..9d027fbf4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/passes.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/passes.h @@ -19,6 +19,7 @@ #include "source/opt/aggressive_dead_code_elim_pass.h" #include "source/opt/amd_ext_to_khr.h" +#include "source/opt/analyze_live_input_pass.h" #include "source/opt/block_merge_pass.h" #include "source/opt/ccp_pass.h" #include "source/opt/cfg_cleanup_pass.h" @@ -34,8 +35,11 @@ #include "source/opt/desc_sroa.h" #include "source/opt/eliminate_dead_constant_pass.h" #include "source/opt/eliminate_dead_functions_pass.h" +#include "source/opt/eliminate_dead_io_components_pass.h" #include "source/opt/eliminate_dead_members_pass.h" +#include "source/opt/eliminate_dead_output_stores_pass.h" #include "source/opt/empty_pass.h" +#include "source/opt/fix_func_call_arguments.h" #include "source/opt/fix_storage_class.h" #include "source/opt/flatten_decoration_pass.h" #include "source/opt/fold_spec_constant_op_and_composite_pass.h" @@ -47,7 +51,9 @@ #include "source/opt/inst_bindless_check_pass.h" #include "source/opt/inst_buff_addr_check_pass.h" #include "source/opt/inst_debug_printf_pass.h" +#include "source/opt/interface_var_sroa.h" #include "source/opt/interp_fixup_pass.h" +#include "source/opt/invocation_interlock_placement_pass.h" #include "source/opt/licm_pass.h" #include "source/opt/local_access_chain_convert_pass.h" #include "source/opt/local_redundancy_elimination.h" @@ -59,11 +65,13 @@ #include "source/opt/loop_unroller.h" #include "source/opt/loop_unswitch_pass.h" #include "source/opt/merge_return_pass.h" +#include "source/opt/modify_maximal_reconvergence.h" #include "source/opt/null_pass.h" #include "source/opt/private_to_local_pass.h" #include "source/opt/reduce_load_size.h" #include "source/opt/redundancy_elimination.h" #include "source/opt/relax_float_ops_pass.h" +#include "source/opt/remove_dontinline_pass.h" #include "source/opt/remove_duplicates_pass.h" #include "source/opt/remove_unused_interface_variables_pass.h" #include "source/opt/replace_desc_array_access_using_var_index.h" @@ -76,6 +84,8 @@ #include "source/opt/strength_reduction_pass.h" #include "source/opt/strip_debug_info_pass.h" #include "source/opt/strip_nonsemantic_info_pass.h" +#include "source/opt/switch_descriptorset_pass.h" +#include "source/opt/trim_capabilities_pass.h" #include "source/opt/unify_const_pass.h" #include "source/opt/upgrade_memory_model.h" #include "source/opt/vector_dce.h" diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.cpp index 80fb4c535..4904e058b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.cpp @@ -24,10 +24,8 @@ namespace spvtools { namespace opt { namespace { - -const uint32_t kVariableStorageClassInIdx = 0; -const uint32_t kSpvTypePointerTypeIdInIdx = 1; - +constexpr uint32_t kVariableStorageClassInIdx = 0; +constexpr uint32_t kSpvTypePointerTypeIdInIdx = 1; } // namespace Pass::Status PrivateToLocalPass::Process() { @@ -35,18 +33,18 @@ Pass::Status PrivateToLocalPass::Process() { // Private variables require the shader capability. If this is not a shader, // there is no work to do. - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityAddresses)) + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Addresses)) return Status::SuccessWithoutChange; std::vector> variables_to_move; std::unordered_set localized_variables; for (auto& inst : context()->types_values()) { - if (inst.opcode() != SpvOpVariable) { + if (inst.opcode() != spv::Op::OpVariable) { continue; } - if (inst.GetSingleWordInOperand(kVariableStorageClassInIdx) != - SpvStorageClassPrivate) { + if (spv::StorageClass(inst.GetSingleWordInOperand( + kVariableStorageClassInIdx)) != spv::StorageClass::Private) { continue; } @@ -123,7 +121,8 @@ bool PrivateToLocalPass::MoveVariable(Instruction* variable, context()->ForgetUses(variable); // Update the storage class of the variable. - variable->SetInOperand(kVariableStorageClassInIdx, {SpvStorageClassFunction}); + variable->SetInOperand(kVariableStorageClassInIdx, + {uint32_t(spv::StorageClass::Function)}); // Update the type as well. uint32_t new_type_id = GetNewType(variable->type_id()); @@ -147,7 +146,7 @@ uint32_t PrivateToLocalPass::GetNewType(uint32_t old_type_id) { uint32_t pointee_type_id = old_type_inst->GetSingleWordInOperand(kSpvTypePointerTypeIdInIdx); uint32_t new_type_id = - type_mgr->FindPointerToType(pointee_type_id, SpvStorageClassFunction); + type_mgr->FindPointerToType(pointee_type_id, spv::StorageClass::Function); if (new_type_id != 0) { context()->UpdateDefUse(context()->get_def_use_mgr()->GetDef(new_type_id)); } @@ -161,17 +160,17 @@ bool PrivateToLocalPass::IsValidUse(const Instruction* inst) const { return true; } switch (inst->opcode()) { - case SpvOpLoad: - case SpvOpStore: - case SpvOpImageTexelPointer: // Treat like a load + case spv::Op::OpLoad: + case spv::Op::OpStore: + case spv::Op::OpImageTexelPointer: // Treat like a load return true; - case SpvOpAccessChain: + case spv::Op::OpAccessChain: return context()->get_def_use_mgr()->WhileEachUser( inst, [this](const Instruction* user) { if (!IsValidUse(user)) return false; return true; }); - case SpvOpName: + case spv::Op::OpName: return true; default: return spvOpcodeIsDecoration(inst->opcode()); @@ -188,13 +187,13 @@ bool PrivateToLocalPass::UpdateUse(Instruction* inst, Instruction* user) { return true; } switch (inst->opcode()) { - case SpvOpLoad: - case SpvOpStore: - case SpvOpImageTexelPointer: // Treat like a load + case spv::Op::OpLoad: + case spv::Op::OpStore: + case spv::Op::OpImageTexelPointer: // Treat like a load // The type is fine because it is the type pointed to, and that does not // change. break; - case SpvOpAccessChain: { + case spv::Op::OpAccessChain: { context()->ForgetUses(inst); uint32_t new_type_id = GetNewType(inst->type_id()); if (new_type_id == 0) { @@ -208,8 +207,8 @@ bool PrivateToLocalPass::UpdateUse(Instruction* inst, Instruction* user) { return false; } } break; - case SpvOpName: - case SpvOpEntryPoint: // entry points will be updated separately. + case spv::Op::OpName: + case spv::Op::OpEntryPoint: // entry points will be updated separately. break; default: assert(spvOpcodeIsDecoration(inst->opcode()) && diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.h index c6127d67f..e96a965e9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/private_to_local_pass.h @@ -44,7 +44,7 @@ class PrivateToLocalPass : public Pass { // class of |function|. Returns false if the variable could not be moved. bool MoveVariable(Instruction* variable, Function* function); - // |inst| is an instruction declaring a varible. If that variable is + // |inst| is an instruction declaring a variable. If that variable is // referenced in a single function and all of uses are valid as defined by // |IsValidUse|, then that function is returned. Otherwise, the return // value is |nullptr|. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.cpp index 6a1f1aafb..9cd6174cf 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.cpp @@ -134,7 +134,7 @@ bool SSAPropagator::Simulate(Instruction* instr) { // defined at an instruction D that should be simulated again, then the output // of D might affect |instr|, so we should simulate |instr| again. bool has_operands_to_simulate = false; - if (instr->opcode() == SpvOpPhi) { + if (instr->opcode() == spv::Op::OpPhi) { // For Phi instructions, an operand causes the Phi to be simulated again if // the operand comes from an edge that has not yet been traversed or if its // definition should be simulated again. @@ -189,7 +189,7 @@ bool SSAPropagator::Simulate(BasicBlock* block) { // statement in it. if (!BlockHasBeenSimulated(block)) { block->ForEachInst([this, &changed](Instruction* instr) { - if (instr->opcode() != SpvOpPhi) { + if (instr->opcode() != spv::Op::OpPhi) { changed |= Simulate(instr); } }); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.h index ac7c0e7ea..71212c969 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/propagator.h @@ -153,10 +153,10 @@ struct Edge { // std::map values; // const auto visit_fn = [&ctx, &values](Instruction* instr, // BasicBlock** dest_bb) { -// if (instr->opcode() == SpvOpStore) { +// if (instr->opcode() == spv::Op::OpStore) { // uint32_t rhs_id = instr->GetSingleWordOperand(1); // Instruction* rhs_def = ctx->get_def_use_mgr()->GetDef(rhs_id); -// if (rhs_def->opcode() == SpvOpConstant) { +// if (rhs_def->opcode() == spv::Op::OpConstant) { // uint32_t val = rhs_def->GetSingleWordOperand(2); // values[rhs_id] = val; // return SSAPropagator::kInteresting; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reduce_load_size.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reduce_load_size.cpp index e9b808748..73a90f066 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reduce_load_size.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reduce_load_size.cpp @@ -22,23 +22,20 @@ #include "source/opt/ir_context.h" #include "source/util/bit_vector.h" -namespace { - -const uint32_t kExtractCompositeIdInIdx = 0; -const uint32_t kVariableStorageClassInIdx = 0; -const uint32_t kLoadPointerInIdx = 0; - -} // namespace - namespace spvtools { namespace opt { +namespace { +constexpr uint32_t kExtractCompositeIdInIdx = 0; +constexpr uint32_t kVariableStorageClassInIdx = 0; +constexpr uint32_t kLoadPointerInIdx = 0; +} // namespace Pass::Status ReduceLoadSize::Process() { bool modified = false; for (auto& func : *get_module()) { func.ForEachInst([&modified, this](Instruction* inst) { - if (inst->opcode() == SpvOpCompositeExtract) { + if (inst->opcode() == spv::Op::OpCompositeExtract) { if (ShouldReplaceExtract(inst)) { modified |= ReplaceExtract(inst); } @@ -50,7 +47,7 @@ Pass::Status ReduceLoadSize::Process() { } bool ReduceLoadSize::ReplaceExtract(Instruction* inst) { - assert(inst->opcode() == SpvOpCompositeExtract && + assert(inst->opcode() == spv::Op::OpCompositeExtract && "Wrong opcode. Should be OpCompositeExtract."); analysis::DefUseManager* def_use_mgr = context()->get_def_use_mgr(); analysis::TypeManager* type_mgr = context()->get_type_mgr(); @@ -60,7 +57,7 @@ bool ReduceLoadSize::ReplaceExtract(Instruction* inst) { inst->GetSingleWordInOperand(kExtractCompositeIdInIdx); Instruction* composite_inst = def_use_mgr->GetDef(composite_id); - if (composite_inst->opcode() != SpvOpLoad) { + if (composite_inst->opcode() != spv::Op::OpLoad) { return false; } @@ -71,16 +68,16 @@ bool ReduceLoadSize::ReplaceExtract(Instruction* inst) { } Instruction* var = composite_inst->GetBaseAddress(); - if (var == nullptr || var->opcode() != SpvOpVariable) { + if (var == nullptr || var->opcode() != spv::Op::OpVariable) { return false; } - SpvStorageClass storage_class = static_cast( + spv::StorageClass storage_class = static_cast( var->GetSingleWordInOperand(kVariableStorageClassInIdx)); switch (storage_class) { - case SpvStorageClassUniform: - case SpvStorageClassUniformConstant: - case SpvStorageClassInput: + case spv::StorageClass::Uniform: + case spv::StorageClass::UniformConstant: + case spv::StorageClass::Input: break; default: return false; @@ -124,7 +121,7 @@ bool ReduceLoadSize::ShouldReplaceExtract(Instruction* inst) { Instruction* op_inst = def_use_mgr->GetDef( inst->GetSingleWordInOperand(kExtractCompositeIdInIdx)); - if (op_inst->opcode() != SpvOpLoad) { + if (op_inst->opcode() != spv::Op::OpLoad) { return false; } @@ -139,7 +136,7 @@ bool ReduceLoadSize::ShouldReplaceExtract(Instruction* inst) { all_elements_used = !def_use_mgr->WhileEachUser(op_inst, [&elements_used](Instruction* use) { if (use->IsCommonDebugInstr()) return true; - if (use->opcode() != SpvOpCompositeExtract || + if (use->opcode() != spv::Op::OpCompositeExtract || use->NumInOperands() == 1) { return false; } @@ -161,8 +158,15 @@ bool ReduceLoadSize::ShouldReplaceExtract(Instruction* inst) { case analysis::Type::kArray: { const analysis::Constant* size_const = const_mgr->FindDeclaredConstant(load_type->AsArray()->LengthId()); - assert(size_const->AsIntConstant()); - total_size = size_const->GetU32(); + + if (size_const) { + assert(size_const->AsIntConstant()); + total_size = size_const->GetU32(); + } else { + // The size is spec constant, so it is unknown at this time. Assume + // it is very large. + total_size = UINT32_MAX; + } } break; case analysis::Type::kStruct: total_size = static_cast( diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/redundancy_elimination.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/redundancy_elimination.h index 91809b5d5..40451f40e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/redundancy_elimination.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/redundancy_elimination.h @@ -41,7 +41,7 @@ class RedundancyEliminationPass : public LocalRedundancyEliminationPass { // in the function containing |bb|. // // |value_to_ids| is a map from value number to ids. If {vn, id} is in - // |value_to_ids| then vn is the value number of id, and the defintion of id + // |value_to_ids| then vn is the value number of id, and the definition of id // dominates |bb|. // // Returns true if at least one instruction is deleted. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reflect.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reflect.h index c2ffb0beb..ec7c2dd07 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reflect.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/reflect.h @@ -16,6 +16,7 @@ #define SOURCE_OPT_REFLECT_H_ #include "source/latest_version_spirv_header.h" +#include "source/opcode.h" namespace spvtools { namespace opt { @@ -24,41 +25,36 @@ namespace opt { // following functions tend to be outdated and should be updated when SPIR-V // version bumps. -inline bool IsDebug1Inst(SpvOp opcode) { - return (opcode >= SpvOpSourceContinued && opcode <= SpvOpSourceExtension) || - opcode == SpvOpString; +inline bool IsDebug1Inst(spv::Op opcode) { + return (opcode >= spv::Op::OpSourceContinued && + opcode <= spv::Op::OpSourceExtension) || + opcode == spv::Op::OpString; } -inline bool IsDebug2Inst(SpvOp opcode) { - return opcode == SpvOpName || opcode == SpvOpMemberName; +inline bool IsDebug2Inst(spv::Op opcode) { + return opcode == spv::Op::OpName || opcode == spv::Op::OpMemberName; } -inline bool IsDebug3Inst(SpvOp opcode) { - return opcode == SpvOpModuleProcessed; +inline bool IsDebug3Inst(spv::Op opcode) { + return opcode == spv::Op::OpModuleProcessed; } -inline bool IsOpLineInst(SpvOp opcode) { - return opcode == SpvOpLine || opcode == SpvOpNoLine; +inline bool IsOpLineInst(spv::Op opcode) { + return opcode == spv::Op::OpLine || opcode == spv::Op::OpNoLine; } -inline bool IsAnnotationInst(SpvOp opcode) { - return (opcode >= SpvOpDecorate && opcode <= SpvOpGroupMemberDecorate) || - opcode == SpvOpDecorateId || opcode == SpvOpDecorateStringGOOGLE || - opcode == SpvOpMemberDecorateStringGOOGLE; +inline bool IsAnnotationInst(spv::Op opcode) { + return (opcode >= spv::Op::OpDecorate && + opcode <= spv::Op::OpGroupMemberDecorate) || + opcode == spv::Op::OpDecorateId || + opcode == spv::Op::OpDecorateStringGOOGLE || + opcode == spv::Op::OpMemberDecorateStringGOOGLE; } -inline bool IsTypeInst(SpvOp opcode) { - return (opcode >= SpvOpTypeVoid && opcode <= SpvOpTypeForwardPointer) || - opcode == SpvOpTypePipeStorage || opcode == SpvOpTypeNamedBarrier || - opcode == SpvOpTypeAccelerationStructureNV || - opcode == SpvOpTypeAccelerationStructureKHR || - opcode == SpvOpTypeRayQueryKHR || - opcode == SpvOpTypeCooperativeMatrixNV; +inline bool IsTypeInst(spv::Op opcode) { + return spvOpcodeGeneratesType(opcode) || + opcode == spv::Op::OpTypeForwardPointer; } -inline bool IsConstantInst(SpvOp opcode) { - return (opcode >= SpvOpConstantTrue && opcode <= SpvOpSpecConstantOp) || - opcode == SpvOpConstantFunctionPointerINTEL; +inline bool IsConstantInst(spv::Op opcode) { + return spvOpcodeIsConstant(opcode); } -inline bool IsCompileTimeConstantInst(SpvOp opcode) { - return opcode >= SpvOpConstantTrue && opcode <= SpvOpConstantNull; -} -inline bool IsSpecConstantInst(SpvOp opcode) { - return opcode >= SpvOpSpecConstantTrue && opcode <= SpvOpSpecConstantOp; +inline bool IsSpecConstantInst(spv::Op opcode) { + return spvOpcodeIsSpecConstant(opcode); } } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/register_pressure.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/register_pressure.cpp index 1ad337387..34a8ba3e3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/register_pressure.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/register_pressure.cpp @@ -26,7 +26,6 @@ namespace spvtools { namespace opt { - namespace { // Predicate for the FilterIterator to only consider instructions that are not // phi instructions defined in the basic block |bb|. @@ -36,7 +35,7 @@ class ExcludePhiDefinedInBlock { : context_(context), bb_(bb) {} bool operator()(Instruction* insn) const { - return !(insn->opcode() == SpvOpPhi && + return !(insn->opcode() == spv::Op::OpPhi && context_->get_instr_block(insn) == bb_); } @@ -49,9 +48,9 @@ class ExcludePhiDefinedInBlock { // physical register. bool CreatesRegisterUsage(Instruction* insn) { if (!insn->HasResultId()) return false; - if (insn->opcode() == SpvOpUndef) return false; + if (insn->opcode() == spv::Op::OpUndef) return false; if (IsConstantInst(insn->opcode())) return false; - if (insn->opcode() == SpvOpLabel) return false; + if (insn->opcode() == spv::Op::OpLabel) return false; return true; } @@ -147,7 +146,7 @@ class ComputeRegisterLiveness { live_inout->live_in_ = live_inout->live_out_; for (Instruction& insn : make_range(bb->rbegin(), bb->rend())) { - if (insn.opcode() == SpvOpPhi) { + if (insn.opcode() == spv::Op::OpPhi) { live_inout->live_in_.insert(&insn); break; } @@ -224,7 +223,7 @@ class ComputeRegisterLiveness { for (Instruction& insn : make_range(bb.rbegin(), bb.rend())) { // If it is a phi instruction, the register pressure will not change // anymore. - if (insn.opcode() == SpvOpPhi) { + if (insn.opcode() == spv::Op::OpPhi) { break; } @@ -271,7 +270,7 @@ void RegisterLiveness::RegionRegisterLiveness::AddRegisterClass( RegisterLiveness::RegisterClass reg_class{type, false}; insn->context()->get_decoration_mgr()->WhileEachDecoration( - insn->result_id(), SpvDecorationUniform, + insn->result_id(), uint32_t(spv::Decoration::Uniform), [®_class](const Instruction&) { reg_class.is_uniform_ = true; return false; @@ -325,7 +324,7 @@ void RegisterLiveness::ComputeLoopRegisterPressure( loop_reg_pressure->used_registers_, live_inout->used_registers_); for (Instruction& insn : *bb) { - if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + if (insn.opcode() == spv::Op::OpPhi || !CreatesRegisterUsage(&insn) || seen_insn.count(insn.result_id())) { continue; } @@ -386,7 +385,7 @@ void RegisterLiveness::SimulateFusion( [&l1, &l2](Instruction* insn) { BasicBlock* bb = insn->context()->get_instr_block(insn); return insn->HasResultId() && - !(insn->opcode() == SpvOpPhi && + !(insn->opcode() == spv::Op::OpPhi && (bb == l1.GetHeaderBlock() || bb == l2.GetHeaderBlock())); }); @@ -403,7 +402,7 @@ void RegisterLiveness::SimulateFusion( live_inout_info->live_out_.size()); for (Instruction& insn : *bb) { - if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + if (insn.opcode() == spv::Op::OpPhi || !CreatesRegisterUsage(&insn) || seen_insn.count(insn.result_id())) { continue; } @@ -434,7 +433,7 @@ void RegisterLiveness::SimulateFusion( live_inout_info->live_out_.size()); for (Instruction& insn : *bb) { - if (insn.opcode() == SpvOpPhi || !CreatesRegisterUsage(&insn) || + if (insn.opcode() == spv::Op::OpPhi || !CreatesRegisterUsage(&insn) || seen_insn.count(insn.result_id())) { continue; } @@ -532,7 +531,7 @@ void RegisterLiveness::SimulateFission( std::unordered_set die_in_block; for (Instruction& insn : make_range(bb->rbegin(), bb->rend())) { - if (insn.opcode() == SpvOpPhi) { + if (insn.opcode() == spv::Op::OpPhi) { break; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.cpp index 3fcf87955..df925a251 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.cpp @@ -25,7 +25,7 @@ bool RelaxFloatOpsPass::IsRelaxable(Instruction* inst) { return target_ops_core_f_rslt_.count(inst->opcode()) != 0 || target_ops_core_f_opnd_.count(inst->opcode()) != 0 || sample_ops_.count(inst->opcode()) != 0 || - (inst->opcode() == SpvOpExtInst && + (inst->opcode() == spv::Op::OpExtInst && inst->GetSingleWordInOperand(0) == context()->get_feature_mgr()->GetExtInstImportId_GLSLstd450() && target_ops_450_.count(inst->GetSingleWordInOperand(1)) != 0); @@ -46,8 +46,9 @@ bool RelaxFloatOpsPass::IsFloat32(Instruction* inst) { bool RelaxFloatOpsPass::IsRelaxed(uint32_t r_id) { for (auto r_inst : get_decoration_mgr()->GetDecorationsFor(r_id, false)) - if (r_inst->opcode() == SpvOpDecorate && - r_inst->GetSingleWordInOperand(1) == SpvDecorationRelaxedPrecision) + if (r_inst->opcode() == spv::Op::OpDecorate && + spv::Decoration(r_inst->GetSingleWordInOperand(1)) == + spv::Decoration::RelaxedPrecision) return true; return false; } @@ -58,7 +59,8 @@ bool RelaxFloatOpsPass::ProcessInst(Instruction* r_inst) { if (!IsFloat32(r_inst)) return false; if (IsRelaxed(r_id)) return false; if (!IsRelaxable(r_inst)) return false; - get_decoration_mgr()->AddDecoration(r_id, SpvDecorationRelaxedPrecision); + get_decoration_mgr()->AddDecoration( + r_id, uint32_t(spv::Decoration::RelaxedPrecision)); return true; } @@ -87,48 +89,48 @@ Pass::Status RelaxFloatOpsPass::Process() { void RelaxFloatOpsPass::Initialize() { target_ops_core_f_rslt_ = { - SpvOpLoad, - SpvOpPhi, - SpvOpVectorExtractDynamic, - SpvOpVectorInsertDynamic, - SpvOpVectorShuffle, - SpvOpCompositeExtract, - SpvOpCompositeConstruct, - SpvOpCompositeInsert, - SpvOpCopyObject, - SpvOpTranspose, - SpvOpConvertSToF, - SpvOpConvertUToF, - SpvOpFConvert, - // SpvOpQuantizeToF16, - SpvOpFNegate, - SpvOpFAdd, - SpvOpFSub, - SpvOpFMul, - SpvOpFDiv, - SpvOpFMod, - SpvOpVectorTimesScalar, - SpvOpMatrixTimesScalar, - SpvOpVectorTimesMatrix, - SpvOpMatrixTimesVector, - SpvOpMatrixTimesMatrix, - SpvOpOuterProduct, - SpvOpDot, - SpvOpSelect, + spv::Op::OpLoad, + spv::Op::OpPhi, + spv::Op::OpVectorExtractDynamic, + spv::Op::OpVectorInsertDynamic, + spv::Op::OpVectorShuffle, + spv::Op::OpCompositeExtract, + spv::Op::OpCompositeConstruct, + spv::Op::OpCompositeInsert, + spv::Op::OpCopyObject, + spv::Op::OpTranspose, + spv::Op::OpConvertSToF, + spv::Op::OpConvertUToF, + spv::Op::OpFConvert, + // spv::Op::OpQuantizeToF16, + spv::Op::OpFNegate, + spv::Op::OpFAdd, + spv::Op::OpFSub, + spv::Op::OpFMul, + spv::Op::OpFDiv, + spv::Op::OpFMod, + spv::Op::OpVectorTimesScalar, + spv::Op::OpMatrixTimesScalar, + spv::Op::OpVectorTimesMatrix, + spv::Op::OpMatrixTimesVector, + spv::Op::OpMatrixTimesMatrix, + spv::Op::OpOuterProduct, + spv::Op::OpDot, + spv::Op::OpSelect, }; target_ops_core_f_opnd_ = { - SpvOpFOrdEqual, - SpvOpFUnordEqual, - SpvOpFOrdNotEqual, - SpvOpFUnordNotEqual, - SpvOpFOrdLessThan, - SpvOpFUnordLessThan, - SpvOpFOrdGreaterThan, - SpvOpFUnordGreaterThan, - SpvOpFOrdLessThanEqual, - SpvOpFUnordLessThanEqual, - SpvOpFOrdGreaterThanEqual, - SpvOpFUnordGreaterThanEqual, + spv::Op::OpFOrdEqual, + spv::Op::OpFUnordEqual, + spv::Op::OpFOrdNotEqual, + spv::Op::OpFUnordNotEqual, + spv::Op::OpFOrdLessThan, + spv::Op::OpFUnordLessThan, + spv::Op::OpFOrdGreaterThan, + spv::Op::OpFUnordGreaterThan, + spv::Op::OpFOrdLessThanEqual, + spv::Op::OpFUnordLessThanEqual, + spv::Op::OpFOrdGreaterThanEqual, + spv::Op::OpFUnordGreaterThanEqual, }; target_ops_450_ = { GLSLstd450Round, GLSLstd450RoundEven, GLSLstd450Trunc, GLSLstd450FAbs, @@ -147,31 +149,31 @@ void RelaxFloatOpsPass::Initialize() { GLSLstd450Ldexp, GLSLstd450Length, GLSLstd450Distance, GLSLstd450Cross, GLSLstd450Normalize, GLSLstd450FaceForward, GLSLstd450Reflect, GLSLstd450Refract, GLSLstd450NMin, GLSLstd450NMax, GLSLstd450NClamp}; - sample_ops_ = {SpvOpImageSampleImplicitLod, - SpvOpImageSampleExplicitLod, - SpvOpImageSampleDrefImplicitLod, - SpvOpImageSampleDrefExplicitLod, - SpvOpImageSampleProjImplicitLod, - SpvOpImageSampleProjExplicitLod, - SpvOpImageSampleProjDrefImplicitLod, - SpvOpImageSampleProjDrefExplicitLod, - SpvOpImageFetch, - SpvOpImageGather, - SpvOpImageDrefGather, - SpvOpImageRead, - SpvOpImageSparseSampleImplicitLod, - SpvOpImageSparseSampleExplicitLod, - SpvOpImageSparseSampleDrefImplicitLod, - SpvOpImageSparseSampleDrefExplicitLod, - SpvOpImageSparseSampleProjImplicitLod, - SpvOpImageSparseSampleProjExplicitLod, - SpvOpImageSparseSampleProjDrefImplicitLod, - SpvOpImageSparseSampleProjDrefExplicitLod, - SpvOpImageSparseFetch, - SpvOpImageSparseGather, - SpvOpImageSparseDrefGather, - SpvOpImageSparseTexelsResident, - SpvOpImageSparseRead}; + sample_ops_ = {spv::Op::OpImageSampleImplicitLod, + spv::Op::OpImageSampleExplicitLod, + spv::Op::OpImageSampleDrefImplicitLod, + spv::Op::OpImageSampleDrefExplicitLod, + spv::Op::OpImageSampleProjImplicitLod, + spv::Op::OpImageSampleProjExplicitLod, + spv::Op::OpImageSampleProjDrefImplicitLod, + spv::Op::OpImageSampleProjDrefExplicitLod, + spv::Op::OpImageFetch, + spv::Op::OpImageGather, + spv::Op::OpImageDrefGather, + spv::Op::OpImageRead, + spv::Op::OpImageSparseSampleImplicitLod, + spv::Op::OpImageSparseSampleExplicitLod, + spv::Op::OpImageSparseSampleDrefImplicitLod, + spv::Op::OpImageSparseSampleDrefExplicitLod, + spv::Op::OpImageSparseSampleProjImplicitLod, + spv::Op::OpImageSparseSampleProjExplicitLod, + spv::Op::OpImageSparseSampleProjDrefImplicitLod, + spv::Op::OpImageSparseSampleProjDrefExplicitLod, + spv::Op::OpImageSparseFetch, + spv::Op::OpImageSparseGather, + spv::Op::OpImageSparseDrefGather, + spv::Op::OpImageSparseTexelsResident, + spv::Op::OpImageSparseRead}; } } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.h index 5ee3d73c8..9e4606f8d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/relax_float_ops_pass.h @@ -61,17 +61,23 @@ class RelaxFloatOpsPass : public Pass { // Initialize state for converting to half void Initialize(); + struct hasher { + size_t operator()(const spv::Op& op) const noexcept { + return std::hash()(uint32_t(op)); + } + }; + // Set of float result core operations to be processed - std::unordered_set target_ops_core_f_rslt_; + std::unordered_set target_ops_core_f_rslt_; // Set of float operand core operations to be processed - std::unordered_set target_ops_core_f_opnd_; + std::unordered_set target_ops_core_f_opnd_; // Set of 450 extension operations to be processed std::unordered_set target_ops_450_; // Set of sample operations - std::unordered_set sample_ops_; + std::unordered_set sample_ops_; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.cpp new file mode 100644 index 000000000..3750bc1fe --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.cpp @@ -0,0 +1,50 @@ +// Copyright (c) 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/remove_dontinline_pass.h" + +namespace spvtools { +namespace opt { + +Pass::Status RemoveDontInline::Process() { + bool modified = false; + modified = ClearDontInlineFunctionControl(); + return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); +} + +bool RemoveDontInline::ClearDontInlineFunctionControl() { + bool modified = false; + for (auto& func : *get_module()) { + ClearDontInlineFunctionControl(&func); + } + return modified; +} + +bool RemoveDontInline::ClearDontInlineFunctionControl(Function* function) { + constexpr uint32_t kFunctionControlInOperandIdx = 0; + Instruction* function_inst = &function->DefInst(); + uint32_t function_control = + function_inst->GetSingleWordInOperand(kFunctionControlInOperandIdx); + + if ((function_control & uint32_t(spv::FunctionControlMask::DontInline)) == + 0) { + return false; + } + function_control &= ~uint32_t(spv::FunctionControlMask::DontInline); + function_inst->SetInOperand(kFunctionControlInOperandIdx, {function_control}); + return true; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.h new file mode 100644 index 000000000..162431991 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_dontinline_pass.h @@ -0,0 +1,42 @@ +// Copyright (c) 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_REMOVE_DONTINLINE_PASS_H_ +#define SOURCE_OPT_REMOVE_DONTINLINE_PASS_H_ + +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class RemoveDontInline : public Pass { + public: + const char* name() const override { return "remove-dont-inline"; } + Status Process() override; + + private: + // Clears the DontInline function control from every function in the module. + // Returns true of a change was made. + bool ClearDontInlineFunctionControl(); + + // Clears the DontInline function control from |function|. + // Returns true of a change was made. + bool ClearDontInlineFunctionControl(Function* function); +}; + +} // namespace opt +} // namespace spvtools + +#endif // SOURCE_OPT_REMOVE_DONTINLINE_PASS_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_duplicates_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_duplicates_pass.cpp index 1ed8e2a04..0df559b34 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_duplicates_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_duplicates_pass.cpp @@ -15,8 +15,6 @@ #include "source/opt/remove_duplicates_pass.h" #include -#include -#include #include #include #include @@ -25,7 +23,6 @@ #include "source/opcode.h" #include "source/opt/decoration_manager.h" #include "source/opt/ir_context.h" -#include "source/opt/reflect.h" namespace spvtools { namespace opt { @@ -70,7 +67,7 @@ bool RemoveDuplicatesPass::RemoveDuplicatesExtInstImports() const { return modified; } - std::unordered_map ext_inst_imports; + std::unordered_map ext_inst_imports; for (auto* i = &*context()->ext_inst_import_begin(); i;) { auto res = ext_inst_imports.emplace(i->GetInOperand(0u).AsString(), i->result_id()); @@ -101,7 +98,8 @@ bool RemoveDuplicatesPass::RemoveDuplicateTypes() const { std::vector visited_forward_pointers; std::vector to_delete; for (auto* i = &*context()->types_values_begin(); i; i = i->NextNode()) { - const bool is_i_forward_pointer = i->opcode() == SpvOpTypeForwardPointer; + const bool is_i_forward_pointer = + i->opcode() == spv::Op::OpTypeForwardPointer; // We only care about types. if (!spvOpcodeGeneratesType(i->opcode()) && !is_i_forward_pointer) { @@ -110,7 +108,7 @@ bool RemoveDuplicatesPass::RemoveDuplicateTypes() const { if (!is_i_forward_pointer) { // Is the current type equal to one of the types we have already visited? - SpvId id_to_keep = 0u; + spv::Id id_to_keep = 0u; analysis::Type* i_type = type_manager.GetType(i->result_id()); assert(i_type); // TODO(dneto0): Use a trie to avoid quadratic behaviour? Extract the @@ -137,7 +135,7 @@ bool RemoveDuplicatesPass::RemoveDuplicateTypes() const { } else { analysis::ForwardPointer i_type( i->GetSingleWordInOperand(0u), - (SpvStorageClass)i->GetSingleWordInOperand(1u)); + (spv::StorageClass)i->GetSingleWordInOperand(1u)); i_type.SetTargetPointer( type_manager.GetType(i_type.target_id())->AsPointer()); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.cpp index 70d94b181..d4df1b2ef 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.cpp @@ -28,16 +28,17 @@ class RemoveUnusedInterfaceVariablesContext { bool processFunction(Function* func) { for (const auto& basic_block : *func) for (const auto& instruction : basic_block) - instruction.ForEachInId([&,this](const uint32_t* id) { + instruction.ForEachInId([&](const uint32_t* id) { if (used_variables_.count(*id)) return; auto* var = parent_.get_def_use_mgr()->GetDef(*id); - if (!var || var->opcode() != SpvOpVariable) return; - auto storage_class = var->GetSingleWordInOperand(0); - if (storage_class != SpvStorageClassFunction && + if (!var || var->opcode() != spv::Op::OpVariable) return; + auto storage_class = + spv::StorageClass(var->GetSingleWordInOperand(0)); + if (storage_class != spv::StorageClass::Function && (parent_.get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4) || - storage_class == SpvStorageClassInput || - storage_class == SpvStorageClassOutput)) + storage_class == spv::StorageClass::Input || + storage_class == spv::StorageClass::Output)) used_variables_.insert(*id); }); return false; @@ -90,4 +91,4 @@ RemoveUnusedInterfaceVariablesPass::Process() { return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); } } // namespace opt -} // namespace spvtools \ No newline at end of file +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.h index 7f11187ca..a4cb1085a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/remove_unused_interface_variables_pass.h @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifndef SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_ +#define SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_ + #include "source/opt/pass.h" namespace spvtools { namespace opt { @@ -23,4 +26,6 @@ class RemoveUnusedInterfaceVariablesPass : public Pass { Status Process() override; }; } // namespace opt -} // namespace spvtools \ No newline at end of file +} // namespace spvtools + +#endif // SOURCE_OPT_REMOVE_UNUSED_INTERFACE_VARIABLES_PASS_H_ \ No newline at end of file diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.cpp index 1082e679b..59745e12d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.cpp @@ -21,11 +21,10 @@ namespace spvtools { namespace opt { namespace { - -const uint32_t kOpAccessChainInOperandIndexes = 1; -const uint32_t kOpTypePointerInOperandType = 1; -const uint32_t kOpTypeArrayInOperandType = 0; -const uint32_t kOpTypeStructInOperandMember = 0; +constexpr uint32_t kOpAccessChainInOperandIndexes = 1; +constexpr uint32_t kOpTypePointerInOperandType = 1; +constexpr uint32_t kOpTypeArrayInOperandType = 0; +constexpr uint32_t kOpTypeStructInOperandMember = 0; IRContext::Analysis kAnalysisDefUseAndInstrToBlockMapping = IRContext::kAnalysisDefUse | IRContext::kAnalysisInstrToBlockMapping; @@ -54,8 +53,8 @@ bool ReplaceDescArrayAccessUsingVarIndex:: std::vector work_list; get_def_use_mgr()->ForEachUser(var, [&work_list](Instruction* use) { switch (use->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: work_list.push_back(use); break; default: @@ -95,7 +94,7 @@ void ReplaceDescArrayAccessUsingVarIndex::ReplaceUsersOfAccessChain( CollectRecursiveUsersWithConcreteType(access_chain, &final_users); for (auto* inst : final_users) { std::deque insts_to_be_cloned = - CollectRequiredImageInsts(inst); + CollectRequiredImageAndAccessInsts(inst); ReplaceNonUniformAccessWithSwitchCase( inst, access_chain, number_of_elements, insts_to_be_cloned); } @@ -121,8 +120,8 @@ void ReplaceDescArrayAccessUsingVarIndex::CollectRecursiveUsersWithConcreteType( } std::deque -ReplaceDescArrayAccessUsingVarIndex::CollectRequiredImageInsts( - Instruction* user_of_image_insts) const { +ReplaceDescArrayAccessUsingVarIndex::CollectRequiredImageAndAccessInsts( + Instruction* user) const { std::unordered_set seen_inst_ids; std::queue work_list; @@ -131,21 +130,23 @@ ReplaceDescArrayAccessUsingVarIndex::CollectRequiredImageInsts( if (!seen_inst_ids.insert(*idp).second) return; Instruction* operand = get_def_use_mgr()->GetDef(*idp); if (context()->get_instr_block(operand) != nullptr && - HasImageOrImagePtrType(operand)) { + (HasImageOrImagePtrType(operand) || + operand->opcode() == spv::Op::OpAccessChain || + operand->opcode() == spv::Op::OpInBoundsAccessChain)) { work_list.push(operand); } }; - std::deque required_image_insts; - required_image_insts.push_front(user_of_image_insts); - user_of_image_insts->ForEachInId(decision_to_include_operand); + std::deque required_insts; + required_insts.push_front(user); + user->ForEachInId(decision_to_include_operand); while (!work_list.empty()) { auto* inst_from_work_list = work_list.front(); work_list.pop(); - required_image_insts.push_front(inst_from_work_list); + required_insts.push_front(inst_from_work_list); inst_from_work_list->ForEachInId(decision_to_include_operand); } - return required_image_insts; + return required_insts; } bool ReplaceDescArrayAccessUsingVarIndex::HasImageOrImagePtrType( @@ -156,22 +157,22 @@ bool ReplaceDescArrayAccessUsingVarIndex::HasImageOrImagePtrType( bool ReplaceDescArrayAccessUsingVarIndex::IsImageOrImagePtrType( const Instruction* type_inst) const { - if (type_inst->opcode() == SpvOpTypeImage || - type_inst->opcode() == SpvOpTypeSampler || - type_inst->opcode() == SpvOpTypeSampledImage) { + if (type_inst->opcode() == spv::Op::OpTypeImage || + type_inst->opcode() == spv::Op::OpTypeSampler || + type_inst->opcode() == spv::Op::OpTypeSampledImage) { return true; } - if (type_inst->opcode() == SpvOpTypePointer) { + if (type_inst->opcode() == spv::Op::OpTypePointer) { Instruction* pointee_type_inst = get_def_use_mgr()->GetDef( type_inst->GetSingleWordInOperand(kOpTypePointerInOperandType)); return IsImageOrImagePtrType(pointee_type_inst); } - if (type_inst->opcode() == SpvOpTypeArray) { + if (type_inst->opcode() == spv::Op::OpTypeArray) { Instruction* element_type_inst = get_def_use_mgr()->GetDef( type_inst->GetSingleWordInOperand(kOpTypeArrayInOperandType)); return IsImageOrImagePtrType(element_type_inst); } - if (type_inst->opcode() != SpvOpTypeStruct) return false; + if (type_inst->opcode() != spv::Op::OpTypeStruct) return false; for (uint32_t in_operand_idx = kOpTypeStructInOperandMember; in_operand_idx < type_inst->NumInOperands(); ++in_operand_idx) { Instruction* member_type_inst = get_def_use_mgr()->GetDef( @@ -184,16 +185,16 @@ bool ReplaceDescArrayAccessUsingVarIndex::IsImageOrImagePtrType( bool ReplaceDescArrayAccessUsingVarIndex::IsConcreteType( uint32_t type_id) const { Instruction* type_inst = get_def_use_mgr()->GetDef(type_id); - if (type_inst->opcode() == SpvOpTypeInt || - type_inst->opcode() == SpvOpTypeFloat) { + if (type_inst->opcode() == spv::Op::OpTypeInt || + type_inst->opcode() == spv::Op::OpTypeFloat) { return true; } - if (type_inst->opcode() == SpvOpTypeVector || - type_inst->opcode() == SpvOpTypeMatrix || - type_inst->opcode() == SpvOpTypeArray) { + if (type_inst->opcode() == spv::Op::OpTypeVector || + type_inst->opcode() == spv::Op::OpTypeMatrix || + type_inst->opcode() == spv::Op::OpTypeArray) { return IsConcreteType(type_inst->GetSingleWordInOperand(0)); } - if (type_inst->opcode() == SpvOpTypeStruct) { + if (type_inst->opcode() == spv::Op::OpTypeStruct) { for (uint32_t i = 0; i < type_inst->NumInOperands(); ++i) { if (!IsConcreteType(type_inst->GetSingleWordInOperand(i))) return false; } @@ -253,8 +254,12 @@ void ReplaceDescArrayAccessUsingVarIndex::ReplaceNonUniformAccessWithSwitchCase( Instruction* access_chain_final_user, Instruction* access_chain, uint32_t number_of_elements, const std::deque& insts_to_be_cloned) const { - // Create merge block and add terminator auto* block = context()->get_instr_block(access_chain_final_user); + // If the instruction does not belong to a block (i.e. in the case of + // OpDecorate), no replacement is needed. + if (!block) return; + + // Create merge block and add terminator auto* merge_block = SeparateInstructionsIntoNewBlock( block, access_chain_final_user->NextNode()); @@ -316,8 +321,8 @@ ReplaceDescArrayAccessUsingVarIndex::SeparateInstructionsIntoNewBlock( } BasicBlock* ReplaceDescArrayAccessUsingVarIndex::CreateNewBlock() const { - auto* new_block = new BasicBlock(std::unique_ptr( - new Instruction(context(), SpvOpLabel, 0, context()->TakeNextId(), {}))); + auto* new_block = new BasicBlock(std::unique_ptr(new Instruction( + context(), spv::Op::OpLabel, 0, context()->TakeNextId(), {}))); get_def_use_mgr()->AnalyzeInstDefUse(new_block->GetLabelInst()); context()->set_instr_block(new_block->GetLabelInst(), new_block); return new_block; @@ -326,7 +331,7 @@ BasicBlock* ReplaceDescArrayAccessUsingVarIndex::CreateNewBlock() const { void ReplaceDescArrayAccessUsingVarIndex::UseConstIndexForAccessChain( Instruction* access_chain, uint32_t const_element_idx) const { uint32_t const_element_idx_id = - context()->get_constant_mgr()->GetUIntConst(const_element_idx); + context()->get_constant_mgr()->GetUIntConstId(const_element_idx); access_chain->SetInOperand(kOpAccessChainInOperandIndexes, {const_element_idx_id}); } @@ -416,7 +421,7 @@ void ReplaceDescArrayAccessUsingVarIndex::ReplacePhiIncomingBlock( uint32_t old_incoming_block_id, uint32_t new_incoming_block_id) const { context()->ReplaceAllUsesWithPredicate( old_incoming_block_id, new_incoming_block_id, - [](Instruction* use) { return use->opcode() == SpvOpPhi; }); + [](Instruction* use) { return use->opcode() == spv::Op::OpPhi; }); } } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.h index e18222c85..51817c15f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_desc_array_access_using_var_index.h @@ -47,7 +47,7 @@ class ReplaceDescArrayAccessUsingVarIndex : public Pass { } private: - // Replaces all acceses to |var| using variable indices with constant + // Replaces all accesses to |var| using variable indices with constant // elements of the array |var|. Creates switch-case statements to determine // the value of the variable index for all the possible cases. Returns // whether replacement is done or not. @@ -76,11 +76,12 @@ class ReplaceDescArrayAccessUsingVarIndex : public Pass { void CollectRecursiveUsersWithConcreteType( Instruction* access_chain, std::vector* final_users) const; - // Recursively collects the operands of |user_of_image_insts| (and operands - // of the operands) whose result types are images/samplers or pointers/array/ - // struct of them and returns them. - std::deque CollectRequiredImageInsts( - Instruction* user_of_image_insts) const; + // Recursively collects the operands of |user| (and operands of the operands) + // whose result types are images/samplers (or pointers/arrays/ structs of + // them) and access chains instructions and returns them. The returned + // collection includes |user|. + std::deque CollectRequiredImageAndAccessInsts( + Instruction* user) const; // Returns whether result type of |inst| is an image/sampler/pointer of image // or sampler or not. @@ -170,7 +171,7 @@ class ReplaceDescArrayAccessUsingVarIndex : public Pass { // Creates and adds an OpSwitch used for the selection of OpAccessChain whose // first Indexes operand is |access_chain_index_var_id|. The OpSwitch will be // added at the end of |parent_block|. It will jump to |default_id| for the - // default case and jumps to one of case blocks whoes ids are |case_block_ids| + // default case and jumps to one of case blocks whose ids are |case_block_ids| // if |access_chain_index_var_id| matches the case number. |merge_id| is the // merge block id. void AddSwitchForAccessChain( diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.cpp index 1dcd06f59..1b97c0e84 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.cpp @@ -23,16 +23,16 @@ namespace opt { Pass::Status ReplaceInvalidOpcodePass::Process() { bool modified = false; - if (context()->get_feature_mgr()->HasCapability(SpvCapabilityLinkage)) { + if (context()->get_feature_mgr()->HasCapability(spv::Capability::Linkage)) { return Status::SuccessWithoutChange; } - SpvExecutionModel execution_model = GetExecutionModel(); - if (execution_model == SpvExecutionModelKernel) { + spv::ExecutionModel execution_model = GetExecutionModel(); + if (execution_model == spv::ExecutionModel::Kernel) { // We do not handle kernels. return Status::SuccessWithoutChange; } - if (execution_model == SpvExecutionModelMax) { + if (execution_model == spv::ExecutionModel::Max) { // Mixed execution models for the entry points. This case is not currently // handled. return Status::SuccessWithoutChange; @@ -44,19 +44,19 @@ Pass::Status ReplaceInvalidOpcodePass::Process() { return (modified ? Status::SuccessWithChange : Status::SuccessWithoutChange); } -SpvExecutionModel ReplaceInvalidOpcodePass::GetExecutionModel() { - SpvExecutionModel result = SpvExecutionModelMax; +spv::ExecutionModel ReplaceInvalidOpcodePass::GetExecutionModel() { + spv::ExecutionModel result = spv::ExecutionModel::Max; bool first = true; for (Instruction& entry_point : get_module()->entry_points()) { if (first) { - result = - static_cast(entry_point.GetSingleWordInOperand(0)); + result = static_cast( + entry_point.GetSingleWordInOperand(0)); first = false; } else { - SpvExecutionModel current_model = - static_cast(entry_point.GetSingleWordInOperand(0)); + spv::ExecutionModel current_model = static_cast( + entry_point.GetSingleWordInOperand(0)); if (current_model != result) { - result = SpvExecutionModelMax; + result = spv::ExecutionModel::Max; break; } } @@ -65,13 +65,13 @@ SpvExecutionModel ReplaceInvalidOpcodePass::GetExecutionModel() { } bool ReplaceInvalidOpcodePass::RewriteFunction(Function* function, - SpvExecutionModel model) { + spv::ExecutionModel model) { bool modified = false; Instruction* last_line_dbg_inst = nullptr; function->ForEachInst( [model, &modified, &last_line_dbg_inst, this](Instruction* inst) { // Track the debug information so we can have a meaningful message. - if (inst->opcode() == SpvOpLabel || inst->IsNoLine()) { + if (inst->opcode() == spv::Op::OpLabel || inst->IsNoLine()) { last_line_dbg_inst = nullptr; return; } else if (inst->IsLine()) { @@ -80,15 +80,16 @@ bool ReplaceInvalidOpcodePass::RewriteFunction(Function* function, } bool replace = false; - if (model != SpvExecutionModelFragment && + if (model != spv::ExecutionModel::Fragment && IsFragmentShaderOnlyInstruction(inst)) { replace = true; } - if (model != SpvExecutionModelTessellationControl && - model != SpvExecutionModelGLCompute) { - if (inst->opcode() == SpvOpControlBarrier) { - assert(model != SpvExecutionModelKernel && + if (model != spv::ExecutionModel::TessellationControl && + model != spv::ExecutionModel::GLCompute && + !context()->IsTargetEnvAtLeast(SPV_ENV_UNIVERSAL_1_3)) { + if (inst->opcode() == spv::Op::OpControlBarrier) { + assert(model != spv::ExecutionModel::Kernel && "Expecting to be working on a shader module."); replace = true; } @@ -101,7 +102,7 @@ bool ReplaceInvalidOpcodePass::RewriteFunction(Function* function, } else { // Get the name of the source file. uint32_t file_name_id = 0; - if (last_line_dbg_inst->opcode() == SpvOpLine) { + if (last_line_dbg_inst->opcode() == spv::Op::OpLine) { file_name_id = last_line_dbg_inst->GetSingleWordInOperand(0); } else { // Shader100::DebugLine uint32_t debug_source_id = @@ -131,26 +132,26 @@ bool ReplaceInvalidOpcodePass::RewriteFunction(Function* function, bool ReplaceInvalidOpcodePass::IsFragmentShaderOnlyInstruction( Instruction* inst) { switch (inst->opcode()) { - case SpvOpDPdx: - case SpvOpDPdy: - case SpvOpFwidth: - case SpvOpDPdxFine: - case SpvOpDPdyFine: - case SpvOpFwidthFine: - case SpvOpDPdxCoarse: - case SpvOpDPdyCoarse: - case SpvOpFwidthCoarse: - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageQueryLod: + case spv::Op::OpDPdx: + case spv::Op::OpDPdy: + case spv::Op::OpFwidth: + case spv::Op::OpDPdxFine: + case spv::Op::OpDPdyFine: + case spv::Op::OpFwidthFine: + case spv::Op::OpDPdxCoarse: + case spv::Op::OpDPdyCoarse: + case spv::Op::OpFwidthCoarse: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageQueryLod: // TODO: Teach |ReplaceInstruction| to handle block terminators. Then // uncomment the OpKill case. - // case SpvOpKill: - // case SpvOpTerminateInstruction: + // case spv::Op::OpKill: + // case spv::Op::OpTerminateInstruction: return true; default: return false; @@ -183,7 +184,7 @@ uint32_t ReplaceInvalidOpcodePass::GetSpecialConstant(uint32_t type_id) { analysis::TypeManager* type_mgr = context()->get_type_mgr(); Instruction* type = context()->get_def_use_mgr()->GetDef(type_id); - if (type->opcode() == SpvOpTypeVector) { + if (type->opcode() == spv::Op::OpTypeVector) { uint32_t component_const = GetSpecialConstant(type->GetSingleWordInOperand(0)); std::vector ids; @@ -192,7 +193,8 @@ uint32_t ReplaceInvalidOpcodePass::GetSpecialConstant(uint32_t type_id) { } special_const = const_mgr->GetConstant(type_mgr->GetType(type_id), ids); } else { - assert(type->opcode() == SpvOpTypeInt || type->opcode() == SpvOpTypeFloat); + assert(type->opcode() == spv::Op::OpTypeInt || + type->opcode() == spv::Op::OpTypeFloat); std::vector literal_words; for (uint32_t i = 0; i < type->GetSingleWordInOperand(0); i += 32) { literal_words.push_back(0xDEADBEEF); @@ -204,7 +206,7 @@ uint32_t ReplaceInvalidOpcodePass::GetSpecialConstant(uint32_t type_id) { return const_mgr->GetDefiningInstruction(special_const)->result_id(); } -std::string ReplaceInvalidOpcodePass::BuildWarningMessage(SpvOp opcode) { +std::string ReplaceInvalidOpcodePass::BuildWarningMessage(spv::Op opcode) { spv_opcode_desc opcode_info; context()->grammar().lookupOpcode(opcode, &opcode_info); std::string message = "Removing "; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.h index 426bcac5e..3f0d16bba 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/replace_invalid_opc.h @@ -34,13 +34,13 @@ class ReplaceInvalidOpcodePass : public Pass { private: // Returns the execution model that is used by every entry point in the // module. If more than one execution model is used in the module, then the - // return value is SpvExecutionModelMax. - SpvExecutionModel GetExecutionModel(); + // return value is spv::ExecutionModel::Max. + spv::ExecutionModel GetExecutionModel(); // Replaces all instructions in |function| that are invalid with execution // model |mode|, but valid for another shader model, with a special constant // value. See |GetSpecialConstant|. - bool RewriteFunction(Function* function, SpvExecutionModel mode); + bool RewriteFunction(Function* function, spv::ExecutionModel mode); // Returns true if |inst| is valid for fragment shaders only. bool IsFragmentShaderOnlyInstruction(Instruction* inst); @@ -58,7 +58,7 @@ class ReplaceInvalidOpcodePass : public Pass { // width of the type has been reached. For a vector, each element of the // constant will be constructed the same way. uint32_t GetSpecialConstant(uint32_t type_id); - std::string BuildWarningMessage(SpvOp opcode); + std::string BuildWarningMessage(spv::Op opcode); }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis.cpp index 38555e649..26cc8b303 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis.cpp @@ -14,7 +14,6 @@ #include "source/opt/scalar_analysis.h" -#include #include #include #include @@ -97,7 +96,7 @@ SENode* ScalarEvolutionAnalysis::CreateRecurrentExpression( SENode* ScalarEvolutionAnalysis::AnalyzeMultiplyOp( const Instruction* multiply) { - assert(multiply->opcode() == SpvOp::SpvOpIMul && + assert(multiply->opcode() == spv::Op::OpIMul && "Multiply node did not come from a multiply instruction"); analysis::DefUseManager* def_use = context_->get_def_use_mgr(); @@ -168,21 +167,21 @@ SENode* ScalarEvolutionAnalysis::AnalyzeInstruction(const Instruction* inst) { SENode* output = nullptr; switch (inst->opcode()) { - case SpvOp::SpvOpPhi: { + case spv::Op::OpPhi: { output = AnalyzePhiInstruction(inst); break; } - case SpvOp::SpvOpConstant: - case SpvOp::SpvOpConstantNull: { + case spv::Op::OpConstant: + case spv::Op::OpConstantNull: { output = AnalyzeConstant(inst); break; } - case SpvOp::SpvOpISub: - case SpvOp::SpvOpIAdd: { + case spv::Op::OpISub: + case spv::Op::OpIAdd: { output = AnalyzeAddOp(inst); break; } - case SpvOp::SpvOpIMul: { + case spv::Op::OpIMul: { output = AnalyzeMultiplyOp(inst); break; } @@ -196,9 +195,9 @@ SENode* ScalarEvolutionAnalysis::AnalyzeInstruction(const Instruction* inst) { } SENode* ScalarEvolutionAnalysis::AnalyzeConstant(const Instruction* inst) { - if (inst->opcode() == SpvOp::SpvOpConstantNull) return CreateConstant(0); + if (inst->opcode() == spv::Op::OpConstantNull) return CreateConstant(0); - assert(inst->opcode() == SpvOp::SpvOpConstant); + assert(inst->opcode() == spv::Op::OpConstant); assert(inst->NumInOperands() == 1); int64_t value = 0; @@ -226,8 +225,8 @@ SENode* ScalarEvolutionAnalysis::AnalyzeConstant(const Instruction* inst) { // Handles both addition and subtraction. If the |sub| flag is set then the // addition will be op1+(-op2) otherwise op1+op2. SENode* ScalarEvolutionAnalysis::AnalyzeAddOp(const Instruction* inst) { - assert((inst->opcode() == SpvOp::SpvOpIAdd || - inst->opcode() == SpvOp::SpvOpISub) && + assert((inst->opcode() == spv::Op::OpIAdd || + inst->opcode() == spv::Op::OpISub) && "Add node must be created from a OpIAdd or OpISub instruction"); analysis::DefUseManager* def_use = context_->get_def_use_mgr(); @@ -239,7 +238,7 @@ SENode* ScalarEvolutionAnalysis::AnalyzeAddOp(const Instruction* inst) { AnalyzeInstruction(def_use->GetDef(inst->GetSingleWordInOperand(1))); // To handle subtraction we wrap the second operand in a unary negation node. - if (inst->opcode() == SpvOp::SpvOpISub) { + if (inst->opcode() == spv::Op::OpISub) { op2 = CreateNegation(op2); } @@ -573,7 +572,7 @@ struct PushToStringImpl { }; template -static void PushToString(T id, std::u32string* str) { +void PushToString(T id, std::u32string* str) { PushToStringImpl{}(id, str); } @@ -581,7 +580,7 @@ static void PushToString(T id, std::u32string* str) { // Implements the hashing of SENodes. size_t SENodeHash::operator()(const SENode* node) const { - // Concatinate the terms into a string which we can hash. + // Concatenate the terms into a string which we can hash. std::u32string hash_string{}; // Hashing the type as a string is safer than hashing the enum as the enum is @@ -928,8 +927,8 @@ namespace { // Remove |node| from the |mul| chain (of the form A * ... * |node| * ... * Z), // if |node| is not in the chain, returns the original chain. -static SENode* RemoveOneNodeFromMultiplyChain(SEMultiplyNode* mul, - const SENode* node) { +SENode* RemoveOneNodeFromMultiplyChain(SEMultiplyNode* mul, + const SENode* node) { SENode* lhs = mul->GetChildren()[0]; SENode* rhs = mul->GetChildren()[1]; if (lhs == node) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_nodes.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_nodes.h index b0e3fefd6..91ce446f3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_nodes.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_nodes.h @@ -167,7 +167,7 @@ class SENode { const ChildContainerType& GetChildren() const { return children_; } ChildContainerType& GetChildren() { return children_; } - // Return true if this node is a cant compute node. + // Return true if this node is a can't compute node. bool IsCantCompute() const { return GetType() == CanNotCompute; } // Implements a casting method for each type. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_simplification.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_simplification.cpp index 9c81dbe98..3c0947cda 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_simplification.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_analysis_simplification.cpp @@ -12,16 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "source/opt/scalar_analysis.h" - #include #include #include #include -#include #include #include +#include "source/opt/scalar_analysis.h" + // Simplifies scalar analysis DAGs. // // 1. Given a node passed to SimplifyExpression we first simplify the graph by @@ -88,7 +87,7 @@ class SENodeSimplifyImpl { private: // Recursively descend through the graph to build up the accumulator objects - // which are used to flatten the graph. |child| is the node currenty being + // which are used to flatten the graph. |child| is the node currently being // traversed and the |negation| flag is used to signify that this operation // was preceded by a unary negative operation and as such the result should be // negated. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.cpp index 4d6a7aadd..38c8aeccc 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.cpp @@ -19,18 +19,18 @@ #include #include -#include "source/enum_string_mapping.h" #include "source/extensions.h" #include "source/opt/reflect.h" #include "source/opt/types.h" #include "source/util/make_unique.h" -static const uint32_t kDebugValueOperandValueIndex = 5; -static const uint32_t kDebugValueOperandExpressionIndex = 6; -static const uint32_t kDebugDeclareOperandVariableIndex = 5; - namespace spvtools { namespace opt { +namespace { +constexpr uint32_t kDebugValueOperandValueIndex = 5; +constexpr uint32_t kDebugValueOperandExpressionIndex = 6; +constexpr uint32_t kDebugDeclareOperandVariableIndex = 5; +} // namespace Pass::Status ScalarReplacementPass::Process() { Status status = Status::SuccessWithoutChange; @@ -55,7 +55,7 @@ Pass::Status ScalarReplacementPass::ProcessFunction(Function* function) { for (auto iter = entry.begin(); iter != entry.end(); ++iter) { // Function storage class OpVariables must appear as the first instructions // of the entry block. - if (iter->opcode() != SpvOpVariable) break; + if (iter->opcode() != spv::Op::OpVariable) break; Instruction* varInst = &*iter; if (CanReplaceVariable(varInst)) { @@ -104,29 +104,29 @@ Pass::Status ScalarReplacementPass::ReplaceVariable( } if (!IsAnnotationInst(user->opcode())) { switch (user->opcode()) { - case SpvOpLoad: + case spv::Op::OpLoad: if (ReplaceWholeLoad(user, replacements)) { dead.push_back(user); } else { return false; } break; - case SpvOpStore: + case spv::Op::OpStore: if (ReplaceWholeStore(user, replacements)) { dead.push_back(user); } else { return false; } break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: if (ReplaceAccessChain(user, replacements)) dead.push_back(user); else return false; break; - case SpvOpName: - case SpvOpMemberName: + case spv::Op::OpName: + case spv::Op::OpMemberName: break; default: assert(false && "Unexpected opcode"); @@ -154,7 +154,7 @@ Pass::Status ScalarReplacementPass::ReplaceVariable( // Attempt to further scalarize. for (auto var : replacements) { - if (var->opcode() == SpvOpVariable) { + if (var->opcode() == spv::Op::OpVariable) { if (get_def_use_mgr()->NumUsers(var) == 0) { context()->KillInst(var); } else if (CanReplaceVariable(var)) { @@ -178,7 +178,7 @@ bool ScalarReplacementPass::ReplaceWholeDebugDeclare( int32_t idx = 0; for (const auto* var : replacements) { Instruction* insert_before = var->NextNode(); - while (insert_before->opcode() == SpvOpVariable) + while (insert_before->opcode() == spv::Op::OpVariable) insert_before = insert_before->NextNode(); assert(insert_before != nullptr && "unexpected end of list"); Instruction* added_dbg_value = @@ -189,7 +189,7 @@ bool ScalarReplacementPass::ReplaceWholeDebugDeclare( if (added_dbg_value == nullptr) return false; added_dbg_value->AddOperand( {SPV_OPERAND_TYPE_ID, - {context()->get_constant_mgr()->GetSIntConst(idx)}}); + {context()->get_constant_mgr()->GetSIntConstId(idx)}}); added_dbg_value->SetOperand(kDebugValueOperandExpressionIndex, {deref_expr->result_id()}); if (context()->AreAnalysesValid(IRContext::Analysis::kAnalysisDefUse)) { @@ -215,7 +215,7 @@ bool ScalarReplacementPass::ReplaceWholeDebugValue( // Append 'Indexes' operand. new_dbg_value->AddOperand( {SPV_OPERAND_TYPE_ID, - {context()->get_constant_mgr()->GetSIntConst(idx)}}); + {context()->get_constant_mgr()->GetSIntConstId(idx)}}); // Insert the new DebugValue to the basic block. auto* added_instr = dbg_value->InsertBefore(std::move(new_dbg_value)); get_def_use_mgr()->AnalyzeInstDefUse(added_instr); @@ -235,7 +235,7 @@ bool ScalarReplacementPass::ReplaceWholeLoad( BasicBlock::iterator where(load); for (auto var : replacements) { // Create a load of each replacement variable. - if (var->opcode() != SpvOpVariable) { + if (var->opcode() != spv::Op::OpVariable) { loads.push_back(var); continue; } @@ -246,7 +246,7 @@ bool ScalarReplacementPass::ReplaceWholeLoad( return false; } std::unique_ptr newLoad( - new Instruction(context(), SpvOpLoad, type->result_id(), loadId, + new Instruction(context(), spv::Op::OpLoad, type->result_id(), loadId, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {var->result_id()}}})); // Copy memory access attributes which start at index 1. Index 0 is the @@ -268,8 +268,9 @@ bool ScalarReplacementPass::ReplaceWholeLoad( return false; } where = load; - std::unique_ptr compositeConstruct(new Instruction( - context(), SpvOpCompositeConstruct, load->type_id(), compositeId, {})); + std::unique_ptr compositeConstruct( + new Instruction(context(), spv::Op::OpCompositeConstruct, load->type_id(), + compositeId, {})); for (auto l : loads) { Operand op(SPV_OPERAND_TYPE_ID, std::initializer_list{l->result_id()}); @@ -293,7 +294,7 @@ bool ScalarReplacementPass::ReplaceWholeStore( uint32_t elementIndex = 0; for (auto var : replacements) { // Create the extract. - if (var->opcode() != SpvOpVariable) { + if (var->opcode() != spv::Op::OpVariable) { elementIndex++; continue; } @@ -304,7 +305,7 @@ bool ScalarReplacementPass::ReplaceWholeStore( return false; } std::unique_ptr extract(new Instruction( - context(), SpvOpCompositeExtract, type->result_id(), extractId, + context(), spv::Op::OpCompositeExtract, type->result_id(), extractId, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {storeInput}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, {elementIndex++}}})); @@ -315,7 +316,7 @@ bool ScalarReplacementPass::ReplaceWholeStore( // Create the store. std::unique_ptr newStore( - new Instruction(context(), SpvOpStore, 0, 0, + new Instruction(context(), spv::Op::OpStore, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {var->result_id()}}, {SPV_OPERAND_TYPE_ID, {extractId}}})); @@ -389,31 +390,31 @@ bool ScalarReplacementPass::CreateReplacementVariables( uint32_t elem = 0; switch (type->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: type->ForEachInOperand( [this, inst, &elem, replacements, &components_used](uint32_t* id) { if (!components_used || components_used->count(elem)) { CreateVariable(*id, inst, elem, replacements); } else { - replacements->push_back(CreateNullConstant(*id)); + replacements->push_back(GetUndef(*id)); } elem++; }); break; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: for (uint32_t i = 0; i != GetArrayLength(type); ++i) { if (!components_used || components_used->count(i)) { CreateVariable(type->GetSingleWordInOperand(0u), inst, i, replacements); } else { - replacements->push_back( - CreateNullConstant(type->GetSingleWordInOperand(0u))); + uint32_t element_type_id = type->GetSingleWordInOperand(0); + replacements->push_back(GetUndef(element_type_id)); } } break; - case SpvOpTypeMatrix: - case SpvOpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeVector: for (uint32_t i = 0; i != GetNumElements(type); ++i) { CreateVariable(type->GetSingleWordInOperand(0u), inst, i, replacements); } @@ -429,26 +430,30 @@ bool ScalarReplacementPass::CreateReplacementVariables( replacements->end(); } +Instruction* ScalarReplacementPass::GetUndef(uint32_t type_id) { + return get_def_use_mgr()->GetDef(Type2Undef(type_id)); +} + void ScalarReplacementPass::TransferAnnotations( const Instruction* source, std::vector* replacements) { // Only transfer invariant and restrict decorations on the variable. There are // no type or member decorations that are necessary to transfer. for (auto inst : get_decoration_mgr()->GetDecorationsFor(source->result_id(), false)) { - assert(inst->opcode() == SpvOpDecorate); - uint32_t decoration = inst->GetSingleWordInOperand(1u); - if (decoration == SpvDecorationInvariant || - decoration == SpvDecorationRestrict) { + assert(inst->opcode() == spv::Op::OpDecorate); + auto decoration = spv::Decoration(inst->GetSingleWordInOperand(1u)); + if (decoration == spv::Decoration::Invariant || + decoration == spv::Decoration::Restrict) { for (auto var : *replacements) { if (var == nullptr) { continue; } - std::unique_ptr annotation( - new Instruction(context(), SpvOpDecorate, 0, 0, - std::initializer_list{ - {SPV_OPERAND_TYPE_ID, {var->result_id()}}, - {SPV_OPERAND_TYPE_DECORATION, {decoration}}})); + std::unique_ptr annotation(new Instruction( + context(), spv::Op::OpDecorate, 0, 0, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {var->result_id()}}, + {SPV_OPERAND_TYPE_DECORATION, {uint32_t(decoration)}}})); for (uint32_t i = 2; i < inst->NumInOperands(); ++i) { Operand copy(inst->GetInOperand(i)); annotation->AddOperand(std::move(copy)); @@ -461,60 +466,32 @@ void ScalarReplacementPass::TransferAnnotations( } void ScalarReplacementPass::CreateVariable( - uint32_t typeId, Instruction* varInst, uint32_t index, + uint32_t type_id, Instruction* var_inst, uint32_t index, std::vector* replacements) { - uint32_t ptrId = GetOrCreatePointerType(typeId); + uint32_t ptr_id = GetOrCreatePointerType(type_id); uint32_t id = TakeNextId(); if (id == 0) { replacements->push_back(nullptr); } - std::unique_ptr variable(new Instruction( - context(), SpvOpVariable, ptrId, id, - std::initializer_list{ - {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); + std::unique_ptr variable( + new Instruction(context(), spv::Op::OpVariable, ptr_id, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_STORAGE_CLASS, + {uint32_t(spv::StorageClass::Function)}}})); - BasicBlock* block = context()->get_instr_block(varInst); + BasicBlock* block = context()->get_instr_block(var_inst); block->begin().InsertBefore(std::move(variable)); Instruction* inst = &*block->begin(); // If varInst was initialized, make sure to initialize its replacement. - GetOrCreateInitialValue(varInst, index, inst); + GetOrCreateInitialValue(var_inst, index, inst); get_def_use_mgr()->AnalyzeInstDefUse(inst); context()->set_instr_block(inst, block); - // Copy decorations from the member to the new variable. - Instruction* typeInst = GetStorageType(varInst); - for (auto dec_inst : - get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { - uint32_t decoration; - if (dec_inst->opcode() != SpvOpMemberDecorate) { - continue; - } - - if (dec_inst->GetSingleWordInOperand(1) != index) { - continue; - } - - decoration = dec_inst->GetSingleWordInOperand(2u); - switch (decoration) { - case SpvDecorationRelaxedPrecision: { - std::unique_ptr new_dec_inst( - new Instruction(context(), SpvOpDecorate, 0, 0, {})); - new_dec_inst->AddOperand(Operand(SPV_OPERAND_TYPE_ID, {id})); - for (uint32_t i = 2; i < dec_inst->NumInOperandWords(); ++i) { - new_dec_inst->AddOperand(Operand(dec_inst->GetInOperand(i))); - } - context()->AddAnnotationInst(std::move(new_dec_inst)); - } break; - default: - break; - } - } - - // Update the DebugInfo debug information. - inst->UpdateDebugInfoFrom(varInst); + CopyDecorationsToVariable(var_inst, inst, index); + inst->UpdateDebugInfoFrom(var_inst); replacements->push_back(inst); } @@ -523,57 +500,17 @@ uint32_t ScalarReplacementPass::GetOrCreatePointerType(uint32_t id) { auto iter = pointee_to_pointer_.find(id); if (iter != pointee_to_pointer_.end()) return iter->second; - analysis::Type* pointeeTy; - std::unique_ptr pointerTy; - std::tie(pointeeTy, pointerTy) = - context()->get_type_mgr()->GetTypeAndPointerType(id, - SpvStorageClassFunction); - uint32_t ptrId = 0; - if (pointeeTy->IsUniqueType()) { - // Non-ambiguous type, just ask the type manager for an id. - ptrId = context()->get_type_mgr()->GetTypeInstruction(pointerTy.get()); - pointee_to_pointer_[id] = ptrId; - return ptrId; - } - - // Ambiguous type. We must perform a linear search to try and find the right - // type. - for (auto global : context()->types_values()) { - if (global.opcode() == SpvOpTypePointer && - global.GetSingleWordInOperand(0u) == SpvStorageClassFunction && - global.GetSingleWordInOperand(1u) == id) { - if (get_decoration_mgr()->GetDecorationsFor(id, false).empty()) { - // Only reuse a decoration-less pointer of the correct type. - ptrId = global.result_id(); - break; - } - } - } - - if (ptrId != 0) { - pointee_to_pointer_[id] = ptrId; - return ptrId; - } - - ptrId = TakeNextId(); - context()->AddType(MakeUnique( - context(), SpvOpTypePointer, 0, ptrId, - std::initializer_list{ - {SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}, - {SPV_OPERAND_TYPE_ID, {id}}})); - Instruction* ptr = &*--context()->types_values_end(); - get_def_use_mgr()->AnalyzeInstDefUse(ptr); - pointee_to_pointer_[id] = ptrId; - // Register with the type manager if necessary. - context()->get_type_mgr()->RegisterType(ptrId, *pointerTy); - - return ptrId; + analysis::TypeManager* type_mgr = context()->get_type_mgr(); + uint32_t ptr_type_id = + type_mgr->FindPointerToType(id, spv::StorageClass::Function); + pointee_to_pointer_[id] = ptr_type_id; + return ptr_type_id; } void ScalarReplacementPass::GetOrCreateInitialValue(Instruction* source, uint32_t index, Instruction* newVar) { - assert(source->opcode() == SpvOpVariable); + assert(source->opcode() == spv::Op::OpVariable); if (source->NumInOperands() < 2) return; uint32_t initId = source->GetSingleWordInOperand(1u); @@ -581,14 +518,14 @@ void ScalarReplacementPass::GetOrCreateInitialValue(Instruction* source, Instruction* init = get_def_use_mgr()->GetDef(initId); uint32_t newInitId = 0; // TODO(dnovillo): Refactor this with constant propagation. - if (init->opcode() == SpvOpConstantNull) { + if (init->opcode() == spv::Op::OpConstantNull) { // Initialize to appropriate NULL. auto iter = type_to_null_.find(storageId); if (iter == type_to_null_.end()) { newInitId = TakeNextId(); type_to_null_[storageId] = newInitId; context()->AddGlobalValue( - MakeUnique(context(), SpvOpConstantNull, storageId, + MakeUnique(context(), spv::Op::OpConstantNull, storageId, newInitId, std::initializer_list{})); Instruction* newNull = &*--context()->types_values_end(); get_def_use_mgr()->AnalyzeInstDefUse(newNull); @@ -599,18 +536,19 @@ void ScalarReplacementPass::GetOrCreateInitialValue(Instruction* source, // Create a new constant extract. newInitId = TakeNextId(); context()->AddGlobalValue(MakeUnique( - context(), SpvOpSpecConstantOp, storageId, newInitId, + context(), spv::Op::OpSpecConstantOp, storageId, newInitId, std::initializer_list{ - {SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER, {SpvOpCompositeExtract}}, + {SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER, + {uint32_t(spv::Op::OpCompositeExtract)}}, {SPV_OPERAND_TYPE_ID, {init->result_id()}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, {index}}})); Instruction* newSpecConst = &*--context()->types_values_end(); get_def_use_mgr()->AnalyzeInstDefUse(newSpecConst); - } else if (init->opcode() == SpvOpConstantComposite) { + } else if (init->opcode() == spv::Op::OpConstantComposite) { // Get the appropriate index constant. newInitId = init->GetSingleWordInOperand(index); Instruction* element = get_def_use_mgr()->GetDef(newInitId); - if (element->opcode() == SpvOpUndef) { + if (element->opcode() == spv::Op::OpUndef) { // Undef is not a valid initializer for a variable. newInitId = 0; } @@ -625,7 +563,7 @@ void ScalarReplacementPass::GetOrCreateInitialValue(Instruction* source, uint64_t ScalarReplacementPass::GetArrayLength( const Instruction* arrayType) const { - assert(arrayType->opcode() == SpvOpTypeArray); + assert(arrayType->opcode() == spv::Op::OpTypeArray); const Instruction* length = get_def_use_mgr()->GetDef(arrayType->GetSingleWordInOperand(1u)); return context() @@ -635,8 +573,8 @@ uint64_t ScalarReplacementPass::GetArrayLength( } uint64_t ScalarReplacementPass::GetNumElements(const Instruction* type) const { - assert(type->opcode() == SpvOpTypeVector || - type->opcode() == SpvOpTypeMatrix); + assert(type->opcode() == spv::Op::OpTypeVector || + type->opcode() == spv::Op::OpTypeMatrix); const Operand& op = type->GetInOperand(1u); assert(op.words.size() <= 2); uint64_t len = 0; @@ -654,7 +592,7 @@ bool ScalarReplacementPass::IsSpecConstant(uint32_t id) const { Instruction* ScalarReplacementPass::GetStorageType( const Instruction* inst) const { - assert(inst->opcode() == SpvOpVariable); + assert(inst->opcode() == spv::Op::OpVariable); uint32_t ptrTypeId = inst->type_id(); uint32_t typeId = @@ -664,10 +602,11 @@ Instruction* ScalarReplacementPass::GetStorageType( bool ScalarReplacementPass::CanReplaceVariable( const Instruction* varInst) const { - assert(varInst->opcode() == SpvOpVariable); + assert(varInst->opcode() == spv::Op::OpVariable); // Can only replace function scope variables. - if (varInst->GetSingleWordInOperand(0u) != SpvStorageClassFunction) { + if (spv::StorageClass(varInst->GetSingleWordInOperand(0u)) != + spv::StorageClass::Function) { return false; } @@ -697,14 +636,14 @@ bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { } switch (typeInst->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: // Don't bother with empty structs or very large structs. if (typeInst->NumInOperands() == 0 || IsLargerThanSizeLimit(typeInst->NumInOperands())) { return false; } return true; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: if (IsSpecConstant(typeInst->GetSingleWordInOperand(1u))) { return false; } @@ -716,12 +655,12 @@ bool ScalarReplacementPass::CheckType(const Instruction* typeInst) const { // re-enabled. //// Specifically including matrix and vector in an attempt to reduce the //// number of vector registers required. - // case SpvOpTypeMatrix: - // case SpvOpTypeVector: + // case spv::Op::OpTypeMatrix: + // case spv::Op::OpTypeVector: // if (IsLargerThanSizeLimit(GetNumElements(typeInst))) return false; // return true; - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: default: return false; } @@ -732,26 +671,28 @@ bool ScalarReplacementPass::CheckTypeAnnotations( for (auto inst : get_decoration_mgr()->GetDecorationsFor(typeInst->result_id(), false)) { uint32_t decoration; - if (inst->opcode() == SpvOpDecorate) { + if (inst->opcode() == spv::Op::OpDecorate) { decoration = inst->GetSingleWordInOperand(1u); } else { - assert(inst->opcode() == SpvOpMemberDecorate); + assert(inst->opcode() == spv::Op::OpMemberDecorate); decoration = inst->GetSingleWordInOperand(2u); } - switch (decoration) { - case SpvDecorationRowMajor: - case SpvDecorationColMajor: - case SpvDecorationArrayStride: - case SpvDecorationMatrixStride: - case SpvDecorationCPacked: - case SpvDecorationInvariant: - case SpvDecorationRestrict: - case SpvDecorationOffset: - case SpvDecorationAlignment: - case SpvDecorationAlignmentId: - case SpvDecorationMaxByteOffset: - case SpvDecorationRelaxedPrecision: + switch (spv::Decoration(decoration)) { + case spv::Decoration::RowMajor: + case spv::Decoration::ColMajor: + case spv::Decoration::ArrayStride: + case spv::Decoration::MatrixStride: + case spv::Decoration::CPacked: + case spv::Decoration::Invariant: + case spv::Decoration::Restrict: + case spv::Decoration::Offset: + case spv::Decoration::Alignment: + case spv::Decoration::AlignmentId: + case spv::Decoration::MaxByteOffset: + case spv::Decoration::RelaxedPrecision: + case spv::Decoration::AliasedPointer: + case spv::Decoration::RestrictPointer: break; default: return false; @@ -764,14 +705,16 @@ bool ScalarReplacementPass::CheckTypeAnnotations( bool ScalarReplacementPass::CheckAnnotations(const Instruction* varInst) const { for (auto inst : get_decoration_mgr()->GetDecorationsFor(varInst->result_id(), false)) { - assert(inst->opcode() == SpvOpDecorate); - uint32_t decoration = inst->GetSingleWordInOperand(1u); + assert(inst->opcode() == spv::Op::OpDecorate); + auto decoration = spv::Decoration(inst->GetSingleWordInOperand(1u)); switch (decoration) { - case SpvDecorationInvariant: - case SpvDecorationRestrict: - case SpvDecorationAlignment: - case SpvDecorationAlignmentId: - case SpvDecorationMaxByteOffset: + case spv::Decoration::Invariant: + case spv::Decoration::Restrict: + case spv::Decoration::Alignment: + case spv::Decoration::AlignmentId: + case spv::Decoration::MaxByteOffset: + case spv::Decoration::AliasedPointer: + case spv::Decoration::RestrictPointer: break; default: return false; @@ -811,8 +754,8 @@ bool ScalarReplacementPass::CheckUses(const Instruction* inst, // Annotations are check as a group separately. if (!IsAnnotationInst(user->opcode())) { switch (user->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: if (index == 2u && user->NumInOperands() > 1) { uint32_t id = user->GetSingleWordInOperand(1u); const Instruction* opInst = get_def_use_mgr()->GetDef(id); @@ -830,16 +773,16 @@ bool ScalarReplacementPass::CheckUses(const Instruction* inst, ok = false; } break; - case SpvOpLoad: + case spv::Op::OpLoad: if (!CheckLoad(user, index)) ok = false; stats->num_full_accesses++; break; - case SpvOpStore: + case spv::Op::OpStore: if (!CheckStore(user, index)) ok = false; stats->num_full_accesses++; break; - case SpvOpName: - case SpvOpMemberName: + case spv::Op::OpName: + case spv::Op::OpMemberName: break; default: ok = false; @@ -856,24 +799,24 @@ bool ScalarReplacementPass::CheckUsesRelaxed(const Instruction* inst) const { get_def_use_mgr()->ForEachUse( inst, [this, &ok](const Instruction* user, uint32_t index) { switch (user->opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: if (index != 2u) { ok = false; } else { if (!CheckUsesRelaxed(user)) ok = false; } break; - case SpvOpLoad: + case spv::Op::OpLoad: if (!CheckLoad(user, index)) ok = false; break; - case SpvOpStore: + case spv::Op::OpStore: if (!CheckStore(user, index)) ok = false; break; - case SpvOpImageTexelPointer: + case spv::Op::OpImageTexelPointer: if (!CheckImageTexelPointer(index)) ok = false; break; - case SpvOpExtInst: + case spv::Op::OpExtInst: if (user->GetCommonDebugOpcode() != CommonDebugInfoDebugDeclare || !CheckDebugDeclare(index)) ok = false; @@ -895,7 +838,8 @@ bool ScalarReplacementPass::CheckLoad(const Instruction* inst, uint32_t index) const { if (index != 2u) return false; if (inst->NumInOperands() >= 2 && - inst->GetSingleWordInOperand(1u) & SpvMemoryAccessVolatileMask) + inst->GetSingleWordInOperand(1u) & + uint32_t(spv::MemoryAccessMask::Volatile)) return false; return true; } @@ -904,7 +848,8 @@ bool ScalarReplacementPass::CheckStore(const Instruction* inst, uint32_t index) const { if (index != 0u) return false; if (inst->NumInOperands() >= 3 && - inst->GetSingleWordInOperand(2u) & SpvMemoryAccessVolatileMask) + inst->GetSingleWordInOperand(2u) & + uint32_t(spv::MemoryAccessMask::Volatile)) return false; return true; } @@ -931,11 +876,11 @@ ScalarReplacementPass::GetUsedComponents(Instruction* inst) { def_use_mgr->WhileEachUser(inst, [&result, def_use_mgr, this](Instruction* use) { switch (use->opcode()) { - case SpvOpLoad: { + case spv::Op::OpLoad: { // Look for extract from the load. std::vector t; if (def_use_mgr->WhileEachUser(use, [&t](Instruction* use2) { - if (use2->opcode() != SpvOpCompositeExtract || + if (use2->opcode() != spv::Op::OpCompositeExtract || use2->NumInOperands() <= 1) { return false; } @@ -949,13 +894,13 @@ ScalarReplacementPass::GetUsedComponents(Instruction* inst) { return false; } } - case SpvOpName: - case SpvOpMemberName: - case SpvOpStore: + case spv::Op::OpName: + case spv::Op::OpMemberName: + case spv::Op::OpStore: // No components are used. return true; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: { + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: { // Add the first index it if is a constant. // TODO: Could be improved by checking if the address is used in a load. analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); @@ -981,32 +926,18 @@ ScalarReplacementPass::GetUsedComponents(Instruction* inst) { return result; } -Instruction* ScalarReplacementPass::CreateNullConstant(uint32_t type_id) { - analysis::TypeManager* type_mgr = context()->get_type_mgr(); - analysis::ConstantManager* const_mgr = context()->get_constant_mgr(); - - const analysis::Type* type = type_mgr->GetType(type_id); - const analysis::Constant* null_const = const_mgr->GetConstant(type, {}); - Instruction* null_inst = - const_mgr->GetDefiningInstruction(null_const, type_id); - if (null_inst != nullptr) { - context()->UpdateDefUse(null_inst); - } - return null_inst; -} - uint64_t ScalarReplacementPass::GetMaxLegalIndex( const Instruction* var_inst) const { - assert(var_inst->opcode() == SpvOpVariable && + assert(var_inst->opcode() == spv::Op::OpVariable && "|var_inst| must be a variable instruction."); Instruction* type = GetStorageType(var_inst); switch (type->opcode()) { - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: return type->NumInOperands(); - case SpvOpTypeArray: + case spv::Op::OpTypeArray: return GetArrayLength(type); - case SpvOpTypeMatrix: - case SpvOpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeVector: return GetNumElements(type); default: return 0; @@ -1014,5 +945,69 @@ uint64_t ScalarReplacementPass::GetMaxLegalIndex( return 0; } +void ScalarReplacementPass::CopyDecorationsToVariable(Instruction* from, + Instruction* to, + uint32_t member_index) { + CopyPointerDecorationsToVariable(from, to); + CopyNecessaryMemberDecorationsToVariable(from, to, member_index); +} + +void ScalarReplacementPass::CopyPointerDecorationsToVariable(Instruction* from, + Instruction* to) { + // The RestrictPointer and AliasedPointer decorations are copied to all + // members even if the new variable does not contain a pointer. It does + // not hurt to do so. + for (auto dec_inst : + get_decoration_mgr()->GetDecorationsFor(from->result_id(), false)) { + uint32_t decoration; + decoration = dec_inst->GetSingleWordInOperand(1u); + switch (spv::Decoration(decoration)) { + case spv::Decoration::AliasedPointer: + case spv::Decoration::RestrictPointer: { + std::unique_ptr new_dec_inst(dec_inst->Clone(context())); + new_dec_inst->SetInOperand(0, {to->result_id()}); + context()->AddAnnotationInst(std::move(new_dec_inst)); + } break; + default: + break; + } + } +} + +void ScalarReplacementPass::CopyNecessaryMemberDecorationsToVariable( + Instruction* from, Instruction* to, uint32_t member_index) { + Instruction* type_inst = GetStorageType(from); + for (auto dec_inst : + get_decoration_mgr()->GetDecorationsFor(type_inst->result_id(), false)) { + uint32_t decoration; + if (dec_inst->opcode() == spv::Op::OpMemberDecorate) { + if (dec_inst->GetSingleWordInOperand(1) != member_index) { + continue; + } + + decoration = dec_inst->GetSingleWordInOperand(2u); + switch (spv::Decoration(decoration)) { + case spv::Decoration::ArrayStride: + case spv::Decoration::Alignment: + case spv::Decoration::AlignmentId: + case spv::Decoration::MaxByteOffset: + case spv::Decoration::MaxByteOffsetId: + case spv::Decoration::RelaxedPrecision: { + std::unique_ptr new_dec_inst( + new Instruction(context(), spv::Op::OpDecorate, 0, 0, {})); + new_dec_inst->AddOperand( + Operand(SPV_OPERAND_TYPE_ID, {to->result_id()})); + for (uint32_t i = 2; i < dec_inst->NumInOperandWords(); ++i) { + new_dec_inst->AddOperand(Operand(dec_inst->GetInOperand(i))); + } + context()->AddAnnotationInst(std::move(new_dec_inst)); + } break; + default: + break; + } + } + } +} + } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.h index 0928830c0..c73ecfd98 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/scalar_replacement_pass.h @@ -15,6 +15,7 @@ #ifndef SOURCE_OPT_SCALAR_REPLACEMENT_PASS_H_ #define SOURCE_OPT_SCALAR_REPLACEMENT_PASS_H_ +#include #include #include #include @@ -23,23 +24,34 @@ #include #include "source/opt/function.h" -#include "source/opt/pass.h" +#include "source/opt/mem_pass.h" #include "source/opt/type_manager.h" namespace spvtools { namespace opt { // Documented in optimizer.hpp -class ScalarReplacementPass : public Pass { +class ScalarReplacementPass : public MemPass { private: - static const uint32_t kDefaultLimit = 100; + static constexpr uint32_t kDefaultLimit = 100; public: ScalarReplacementPass(uint32_t limit = kDefaultLimit) : max_num_elements_(limit) { - name_[0] = '\0'; - strcat(name_, "scalar-replacement="); - sprintf(&name_[strlen(name_)], "%d", max_num_elements_); + const auto num_to_write = snprintf( + name_, sizeof(name_), "scalar-replacement=%u", max_num_elements_); + assert(size_t(num_to_write) < sizeof(name_)); + (void)num_to_write; // Mark as unused + +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + // ClusterFuzz/OSS-Fuzz is likely to yield examples with very large arrays. + // This can cause timeouts and memouts during fuzzing that + // are not classed as bugs. To avoid this noise, we set the + // max_num_elements_ to a smaller value for fuzzing. + max_num_elements_ = + (max_num_elements_ > 0 && max_num_elements_ < 100 ? max_num_elements_ + : 100); +#endif } const char* name() const override { return name_; } @@ -92,10 +104,10 @@ class ScalarReplacementPass : public Pass { // Returns true if the uses of |inst| are acceptable for scalarization. // // Recursively checks all the uses of |inst|. For |inst| specifically, only - // allows SpvOpAccessChain, SpvOpInBoundsAccessChain, SpvOpLoad and - // SpvOpStore. Access chains must have the first index be a compile-time - // constant. Subsequent uses of access chains (including other access chains) - // are checked in a more relaxed manner. + // allows spv::Op::OpAccessChain, spv::Op::OpInBoundsAccessChain, + // spv::Op::OpLoad and spv::Op::OpStore. Access chains must have the first + // index be a compile-time constant. Subsequent uses of access chains + // (including other access chains) are checked in a more relaxed manner. bool CheckUses(const Instruction* inst) const; // Helper function for the above |CheckUses|. @@ -234,10 +246,8 @@ class ScalarReplacementPass : public Pass { std::unique_ptr> GetUsedComponents( Instruction* inst); - // Returns an instruction defining a null constant with type |type_id|. If - // one already exists, it is returned. Otherwise a new one is created. - // Returns |nullptr| if the new constant could not be created. - Instruction* CreateNullConstant(uint32_t type_id); + // Returns an instruction defining an undefined value type |type_id|. + Instruction* GetUndef(uint32_t type_id); // Maps storage type to a pointer type enclosing that type. std::unordered_map pointee_to_pointer_; @@ -252,10 +262,30 @@ class ScalarReplacementPass : public Pass { // that we will be willing to split. bool IsLargerThanSizeLimit(uint64_t length) const; + // Copies all relevant decorations from `from` to `to`. This includes + // decorations applied to the variable, and to the members of the type. + // It is assumed that `to` is a variable that is intended to replace the + // `member_index`th member of `from`. + void CopyDecorationsToVariable(Instruction* from, Instruction* to, + uint32_t member_index); + + // Copies pointer related decoration from `from` to `to` if they exist. + void CopyPointerDecorationsToVariable(Instruction* from, Instruction* to); + + // Copies decorations that are needed from the `member_index` of `from` to + // `to, if there was one. + void CopyNecessaryMemberDecorationsToVariable(Instruction* from, + Instruction* to, + uint32_t member_index); + // Limit on the number of members in an object that will be replaced. // 0 means there is no limit. uint32_t max_num_elements_; - char name_[55]; + + // This has to be big enough to fit "scalar-replacement=" followed by a + // uint32_t number written in decimal (so 10 digits), and then a + // terminating nul. + char name_[30]; }; } // namespace opt diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp index 4def2b09a..d2aa9b1da 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/set_spec_constant_default_value_pass.cpp @@ -21,8 +21,6 @@ #include #include "source/opt/def_use_manager.h" -#include "source/opt/ir_context.h" -#include "source/opt/type_manager.h" #include "source/opt/types.h" #include "source/util/make_unique.h" #include "source/util/parse_number.h" @@ -30,7 +28,6 @@ namespace spvtools { namespace opt { - namespace { using utils::EncodeNumberStatus; using utils::NumberType; @@ -139,9 +136,9 @@ std::vector ParseDefaultValueBitPattern( // decoration. bool CanHaveSpecIdDecoration(const Instruction& inst) { switch (inst.opcode()) { - case SpvOp::SpvOpSpecConstant: - case SpvOp::SpvOpSpecConstantFalse: - case SpvOp::SpvOpSpecConstantTrue: + case spv::Op::OpSpecConstant: + case spv::Op::OpSpecConstantFalse: + case spv::Op::OpSpecConstantTrue: return true; default: return false; @@ -165,7 +162,7 @@ Instruction* GetSpecIdTargetFromDecorationGroup( if (def_use_mgr->WhileEachUser(&decoration_group_defining_inst, [&group_decorate_inst](Instruction* user) { if (user->opcode() == - SpvOp::SpvOpGroupDecorate) { + spv::Op::OpGroupDecorate) { group_decorate_inst = user; return false; } @@ -217,16 +214,16 @@ Instruction* GetSpecIdTargetFromDecorationGroup( Pass::Status SetSpecConstantDefaultValuePass::Process() { // The operand index of decoration target in an OpDecorate instruction. - const uint32_t kTargetIdOperandIndex = 0; + constexpr uint32_t kTargetIdOperandIndex = 0; // The operand index of the decoration literal in an OpDecorate instruction. - const uint32_t kDecorationOperandIndex = 1; + constexpr uint32_t kDecorationOperandIndex = 1; // The operand index of Spec id literal value in an OpDecorate SpecId // instruction. - const uint32_t kSpecIdLiteralOperandIndex = 2; + constexpr uint32_t kSpecIdLiteralOperandIndex = 2; // The number of operands in an OpDecorate SpecId instruction. - const uint32_t kOpDecorateSpecIdNumOperands = 3; + constexpr uint32_t kOpDecorateSpecIdNumOperands = 3; // The in-operand index of the default value in a OpSpecConstant instruction. - const uint32_t kOpSpecConstantLiteralInOperandIndex = 0; + constexpr uint32_t kOpSpecConstantLiteralInOperandIndex = 0; bool modified = false; // Scan through all the annotation instructions to find 'OpDecorate SpecId' @@ -240,10 +237,10 @@ Pass::Status SetSpecConstantDefaultValuePass::Process() { // default value of the target spec constant. for (Instruction& inst : context()->annotations()) { // Only process 'OpDecorate SpecId' instructions - if (inst.opcode() != SpvOp::SpvOpDecorate) continue; + if (inst.opcode() != spv::Op::OpDecorate) continue; if (inst.NumOperands() != kOpDecorateSpecIdNumOperands) continue; if (inst.GetSingleWordInOperand(kDecorationOperandIndex) != - uint32_t(SpvDecoration::SpvDecorationSpecId)) { + uint32_t(spv::Decoration::SpecId)) { continue; } @@ -255,7 +252,7 @@ Pass::Status SetSpecConstantDefaultValuePass::Process() { // target_id might be a decoration group id. Instruction* spec_inst = nullptr; if (Instruction* target_inst = get_def_use_mgr()->GetDef(target_id)) { - if (target_inst->opcode() == SpvOp::SpvOpDecorationGroup) { + if (target_inst->opcode() == spv::Op::OpDecorationGroup) { spec_inst = GetSpecIdTargetFromDecorationGroup(*target_inst, get_def_use_mgr()); } else { @@ -301,7 +298,7 @@ Pass::Status SetSpecConstantDefaultValuePass::Process() { // Update the operand bit patterns of the spec constant defining // instruction. switch (spec_inst->opcode()) { - case SpvOp::SpvOpSpecConstant: + case spv::Op::OpSpecConstant: // If the new value is the same with the original value, no // need to do anything. Otherwise update the operand words. if (spec_inst->GetInOperand(kOpSpecConstantLiteralInOperandIndex) @@ -311,19 +308,19 @@ Pass::Status SetSpecConstantDefaultValuePass::Process() { modified = true; } break; - case SpvOp::SpvOpSpecConstantTrue: + case spv::Op::OpSpecConstantTrue: // If the new value is also 'true', no need to change anything. // Otherwise, set the opcode to OpSpecConstantFalse; if (!static_cast(bit_pattern.front())) { - spec_inst->SetOpcode(SpvOp::SpvOpSpecConstantFalse); + spec_inst->SetOpcode(spv::Op::OpSpecConstantFalse); modified = true; } break; - case SpvOp::SpvOpSpecConstantFalse: + case spv::Op::OpSpecConstantFalse: // If the new value is also 'false', no need to change anything. // Otherwise, set the opcode to OpSpecConstantTrue; if (static_cast(bit_pattern.front())) { - spec_inst->SetOpcode(SpvOp::SpvOpSpecConstantTrue); + spec_inst->SetOpcode(spv::Op::OpSpecConstantTrue); modified = true; } break; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/simplification_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/simplification_pass.cpp index 43ec15f80..f8ffc03c2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/simplification_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/simplification_pass.cpp @@ -14,7 +14,6 @@ #include "source/opt/simplification_pass.h" -#include #include #include @@ -69,12 +68,12 @@ bool SimplificationPass::SimplifyFunction(Function* function) { &folder, &inst_seen, this](BasicBlock* bb) { for (Instruction* inst = &*bb->begin(); inst; inst = inst->NextNode()) { inst_seen.insert(inst); - if (inst->opcode() == SpvOpPhi) { + if (inst->opcode() == spv::Op::OpPhi) { process_phis.insert(inst); } bool is_foldable_copy = - inst->opcode() == SpvOpCopyObject && + inst->opcode() == spv::Op::OpCopyObject && context()->get_decoration_mgr()->HaveSubsetOfDecorations( inst->result_id(), inst->GetSingleWordInOperand(0)); @@ -91,7 +90,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { AddNewOperands(inst, &inst_seen, &work_list); - if (inst->opcode() == SpvOpCopyObject) { + if (inst->opcode() == spv::Op::OpCopyObject) { context()->ReplaceAllUsesWithPredicate( inst->result_id(), inst->GetSingleWordInOperand(0), [](Instruction* user) { @@ -104,7 +103,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { }); inst_to_kill.insert(inst); in_work_list.insert(inst); - } else if (inst->opcode() == SpvOpNop) { + } else if (inst->opcode() == spv::Op::OpNop) { inst_to_kill.insert(inst); in_work_list.insert(inst); } @@ -121,7 +120,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { inst_seen.insert(inst); bool is_foldable_copy = - inst->opcode() == SpvOpCopyObject && + inst->opcode() == spv::Op::OpCopyObject && context()->get_decoration_mgr()->HaveSubsetOfDecorations( inst->result_id(), inst->GetSingleWordInOperand(0)); @@ -130,7 +129,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { context()->AnalyzeUses(inst); get_def_use_mgr()->ForEachUser( inst, [&work_list, &in_work_list](Instruction* use) { - if (!use->IsDecoration() && use->opcode() != SpvOpName && + if (!use->IsDecoration() && use->opcode() != spv::Op::OpName && in_work_list.insert(use).second) { work_list.push_back(use); } @@ -138,7 +137,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { AddNewOperands(inst, &inst_seen, &work_list); - if (inst->opcode() == SpvOpCopyObject) { + if (inst->opcode() == spv::Op::OpCopyObject) { context()->ReplaceAllUsesWithPredicate( inst->result_id(), inst->GetSingleWordInOperand(0), [](Instruction* user) { @@ -150,7 +149,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) { }); inst_to_kill.insert(inst); in_work_list.insert(inst); - } else if (inst->opcode() == SpvOpNop) { + } else if (inst->opcode() == spv::Op::OpNop) { inst_to_kill.insert(inst); in_work_list.insert(inst); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.cpp index 17a4c725b..e552ba5e7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.cpp @@ -15,38 +15,37 @@ #include "source/opt/spread_volatile_semantics.h" #include "source/opt/decoration_manager.h" -#include "source/opt/ir_builder.h" #include "source/spirv_constant.h" namespace spvtools { namespace opt { namespace { - -const uint32_t kOpDecorateInOperandBuiltinDecoration = 2u; -const uint32_t kOpLoadInOperandMemoryOperands = 1u; -const uint32_t kOpEntryPointInOperandEntryPoint = 1u; -const uint32_t kOpEntryPointInOperandInterface = 3u; +constexpr uint32_t kOpDecorateInOperandBuiltinDecoration = 2u; +constexpr uint32_t kOpLoadInOperandMemoryOperands = 1u; +constexpr uint32_t kOpEntryPointInOperandEntryPoint = 1u; +constexpr uint32_t kOpEntryPointInOperandInterface = 3u; bool HasBuiltinDecoration(analysis::DecorationManager* decoration_manager, uint32_t var_id, uint32_t built_in) { return decoration_manager->FindDecoration( - var_id, SpvDecorationBuiltIn, [built_in](const Instruction& inst) { + var_id, uint32_t(spv::Decoration::BuiltIn), + [built_in](const Instruction& inst) { return built_in == inst.GetSingleWordInOperand( kOpDecorateInOperandBuiltinDecoration); }); } -bool IsBuiltInForRayTracingVolatileSemantics(uint32_t built_in) { +bool IsBuiltInForRayTracingVolatileSemantics(spv::BuiltIn built_in) { switch (built_in) { - case SpvBuiltInSMIDNV: - case SpvBuiltInWarpIDNV: - case SpvBuiltInSubgroupSize: - case SpvBuiltInSubgroupLocalInvocationId: - case SpvBuiltInSubgroupEqMask: - case SpvBuiltInSubgroupGeMask: - case SpvBuiltInSubgroupGtMask: - case SpvBuiltInSubgroupLeMask: - case SpvBuiltInSubgroupLtMask: + case spv::BuiltIn::SMIDNV: + case spv::BuiltIn::WarpIDNV: + case spv::BuiltIn::SubgroupSize: + case spv::BuiltIn::SubgroupLocalInvocationId: + case spv::BuiltIn::SubgroupEqMask: + case spv::BuiltIn::SubgroupGeMask: + case spv::BuiltIn::SubgroupGtMask: + case spv::BuiltIn::SubgroupLeMask: + case spv::BuiltIn::SubgroupLtMask: return true; default: return false; @@ -56,49 +55,28 @@ bool IsBuiltInForRayTracingVolatileSemantics(uint32_t built_in) { bool HasBuiltinForRayTracingVolatileSemantics( analysis::DecorationManager* decoration_manager, uint32_t var_id) { return decoration_manager->FindDecoration( - var_id, SpvDecorationBuiltIn, [](const Instruction& inst) { - uint32_t built_in = - inst.GetSingleWordInOperand(kOpDecorateInOperandBuiltinDecoration); + var_id, uint32_t(spv::Decoration::BuiltIn), [](const Instruction& inst) { + spv::BuiltIn built_in = spv::BuiltIn( + inst.GetSingleWordInOperand(kOpDecorateInOperandBuiltinDecoration)); return IsBuiltInForRayTracingVolatileSemantics(built_in); }); } bool HasVolatileDecoration(analysis::DecorationManager* decoration_manager, uint32_t var_id) { - return decoration_manager->HasDecoration(var_id, SpvDecorationVolatile); -} - -bool HasOnlyEntryPointsAsFunctions(IRContext* context, Module* module) { - std::unordered_set entry_function_ids; - for (Instruction& entry_point : module->entry_points()) { - entry_function_ids.insert( - entry_point.GetSingleWordInOperand(kOpEntryPointInOperandEntryPoint)); - } - for (auto& function : *module) { - if (entry_function_ids.find(function.result_id()) == - entry_function_ids.end()) { - std::string message( - "Functions of SPIR-V for spread-volatile-semantics pass input must " - "be inlined except entry points"); - message += "\n " + function.DefInst().PrettyPrint( - SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES); - context->consumer()(SPV_MSG_ERROR, "", {0, 0, 0}, message.c_str()); - return false; - } - } - return true; + return decoration_manager->HasDecoration(var_id, + uint32_t(spv::Decoration::Volatile)); } } // namespace Pass::Status SpreadVolatileSemantics::Process() { - if (!HasOnlyEntryPointsAsFunctions(context(), get_module())) { - return Status::Failure; + if (HasNoExecutionModel()) { + return Status::SuccessWithoutChange; } - const bool is_vk_memory_model_enabled = context()->get_feature_mgr()->HasCapability( - SpvCapabilityVulkanMemoryModel); + spv::Capability::VulkanMemoryModel); CollectTargetsForVolatileSemantics(is_vk_memory_model_enabled); // If VulkanMemoryModel capability is not enabled, we have to set Volatile @@ -138,6 +116,8 @@ bool SpreadVolatileSemantics::IsTargetUsedByNonVolatileLoadInEntryPoint( uint32_t var_id, Instruction* entry_point) { uint32_t entry_function_id = entry_point->GetSingleWordInOperand(kOpEntryPointInOperandEntryPoint); + std::unordered_set funcs; + context()->CollectCallTreeFromRoots(entry_function_id, &funcs); return !VisitLoadsOfPointersToVariableInEntries( var_id, [](Instruction* load) { @@ -148,15 +128,16 @@ bool SpreadVolatileSemantics::IsTargetUsedByNonVolatileLoadInEntryPoint( } uint32_t memory_operands = load->GetSingleWordInOperand(kOpLoadInOperandMemoryOperands); - return (memory_operands & SpvMemoryAccessVolatileMask) != 0; + return (memory_operands & uint32_t(spv::MemoryAccessMask::Volatile)) != + 0; }, - {entry_function_id}); + funcs); } bool SpreadVolatileSemantics::HasInterfaceInConflictOfVolatileSemantics() { for (Instruction& entry_point : get_module()->entry_points()) { - SpvExecutionModel execution_model = - static_cast(entry_point.GetSingleWordInOperand(0)); + spv::ExecutionModel execution_model = + static_cast(entry_point.GetSingleWordInOperand(0)); for (uint32_t operand_index = kOpEntryPointInOperandInterface; operand_index < entry_point.NumInOperands(); ++operand_index) { uint32_t var_id = entry_point.GetSingleWordInOperand(operand_index); @@ -190,8 +171,8 @@ void SpreadVolatileSemantics::MarkVolatileSemanticsForVariable( void SpreadVolatileSemantics::CollectTargetsForVolatileSemantics( const bool is_vk_memory_model_enabled) { for (Instruction& entry_point : get_module()->entry_points()) { - SpvExecutionModel execution_model = - static_cast(entry_point.GetSingleWordInOperand(0)); + spv::ExecutionModel execution_model = + static_cast(entry_point.GetSingleWordInOperand(0)); for (uint32_t operand_index = kOpEntryPointInOperandInterface; operand_index < entry_point.NumInOperands(); ++operand_index) { uint32_t var_id = entry_point.GetSingleWordInOperand(operand_index); @@ -214,14 +195,15 @@ void SpreadVolatileSemantics::DecorateVarWithVolatile(Instruction* var) { return; } get_decoration_mgr()->AddDecoration( - SpvOpDecorate, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {var_id}}, - {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, - {SpvDecorationVolatile}}}); + spv::Op::OpDecorate, + {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {var_id}}, + {spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, + {uint32_t(spv::Decoration::Volatile)}}}); } bool SpreadVolatileSemantics::VisitLoadsOfPointersToVariableInEntries( uint32_t var_id, const std::function& handle_load, - const std::unordered_set& entry_function_ids) { + const std::unordered_set& function_ids) { std::vector worklist({var_id}); auto* def_use_mgr = context()->get_def_use_mgr(); while (!worklist.empty()) { @@ -229,25 +211,25 @@ bool SpreadVolatileSemantics::VisitLoadsOfPointersToVariableInEntries( worklist.pop_back(); bool finish_traversal = !def_use_mgr->WhileEachUser( ptr_id, [this, &worklist, &ptr_id, handle_load, - &entry_function_ids](Instruction* user) { + &function_ids](Instruction* user) { BasicBlock* block = context()->get_instr_block(user); if (block == nullptr || - entry_function_ids.find(block->GetParent()->result_id()) == - entry_function_ids.end()) { + function_ids.find(block->GetParent()->result_id()) == + function_ids.end()) { return true; } - if (user->opcode() == SpvOpAccessChain || - user->opcode() == SpvOpInBoundsAccessChain || - user->opcode() == SpvOpPtrAccessChain || - user->opcode() == SpvOpInBoundsPtrAccessChain || - user->opcode() == SpvOpCopyObject) { + if (user->opcode() == spv::Op::OpAccessChain || + user->opcode() == spv::Op::OpInBoundsAccessChain || + user->opcode() == spv::Op::OpPtrAccessChain || + user->opcode() == spv::Op::OpInBoundsPtrAccessChain || + user->opcode() == spv::Op::OpCopyObject) { if (ptr_id == user->GetSingleWordInOperand(0)) worklist.push_back(user->result_id()); return true; } - if (user->opcode() != SpvOpLoad) { + if (user->opcode() != spv::Op::OpLoad) { return true; } @@ -262,47 +244,51 @@ void SpreadVolatileSemantics::SetVolatileForLoadsInEntries( Instruction* var, const std::unordered_set& entry_function_ids) { // Set Volatile memory operand for all load instructions if they do not have // it. - VisitLoadsOfPointersToVariableInEntries( - var->result_id(), - [](Instruction* load) { - if (load->NumInOperands() <= kOpLoadInOperandMemoryOperands) { - load->AddOperand( - {SPV_OPERAND_TYPE_MEMORY_ACCESS, {SpvMemoryAccessVolatileMask}}); + for (auto entry_id : entry_function_ids) { + std::unordered_set funcs; + context()->CollectCallTreeFromRoots(entry_id, &funcs); + VisitLoadsOfPointersToVariableInEntries( + var->result_id(), + [](Instruction* load) { + if (load->NumInOperands() <= kOpLoadInOperandMemoryOperands) { + load->AddOperand({SPV_OPERAND_TYPE_MEMORY_ACCESS, + {uint32_t(spv::MemoryAccessMask::Volatile)}}); + return true; + } + uint32_t memory_operands = + load->GetSingleWordInOperand(kOpLoadInOperandMemoryOperands); + memory_operands |= uint32_t(spv::MemoryAccessMask::Volatile); + load->SetInOperand(kOpLoadInOperandMemoryOperands, {memory_operands}); return true; - } - uint32_t memory_operands = - load->GetSingleWordInOperand(kOpLoadInOperandMemoryOperands); - memory_operands |= SpvMemoryAccessVolatileMask; - load->SetInOperand(kOpLoadInOperandMemoryOperands, {memory_operands}); - return true; - }, - entry_function_ids); + }, + funcs); + } } bool SpreadVolatileSemantics::IsTargetForVolatileSemantics( - uint32_t var_id, SpvExecutionModel execution_model) { + uint32_t var_id, spv::ExecutionModel execution_model) { analysis::DecorationManager* decoration_manager = context()->get_decoration_mgr(); - if (execution_model == SpvExecutionModelFragment) { + if (execution_model == spv::ExecutionModel::Fragment) { return get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 6) && HasBuiltinDecoration(decoration_manager, var_id, - SpvBuiltInHelperInvocation); + uint32_t(spv::BuiltIn::HelperInvocation)); } - if (execution_model == SpvExecutionModelIntersectionKHR || - execution_model == SpvExecutionModelIntersectionNV) { + if (execution_model == spv::ExecutionModel::IntersectionKHR || + execution_model == spv::ExecutionModel::IntersectionNV) { if (HasBuiltinDecoration(decoration_manager, var_id, - SpvBuiltInRayTmaxKHR)) { + uint32_t(spv::BuiltIn::RayTmaxKHR))) { return true; } } switch (execution_model) { - case SpvExecutionModelRayGenerationKHR: - case SpvExecutionModelClosestHitKHR: - case SpvExecutionModelMissKHR: - case SpvExecutionModelCallableKHR: - case SpvExecutionModelIntersectionKHR: + case spv::ExecutionModel::RayGenerationKHR: + case spv::ExecutionModel::ClosestHitKHR: + case spv::ExecutionModel::MissKHR: + case spv::ExecutionModel::CallableKHR: + case spv::ExecutionModel::IntersectionKHR: return HasBuiltinForRayTracingVolatileSemantics(decoration_manager, var_id); default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.h index 3d0a18394..4cbb526fe 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/spread_volatile_semantics.h @@ -35,6 +35,14 @@ class SpreadVolatileSemantics : public Pass { } private: + // Returns true if it does not have an execution model. Linkage shaders do not + // have an execution model. + bool HasNoExecutionModel() { + return get_module()->entry_points().empty() && + context()->get_feature_mgr()->HasCapability( + spv::Capability::Linkage); + } + // Iterates interface variables and spreads the Volatile semantics if it has // load instructions for the Volatile semantics. Pass::Status SpreadVolatileSemanticsToVariables( @@ -45,7 +53,7 @@ class SpreadVolatileSemantics : public Pass { // VUID-StandaloneSpirv-VulkanMemoryModel-04678 or // VUID-StandaloneSpirv-VulkanMemoryModel-04679. bool IsTargetForVolatileSemantics(uint32_t var_id, - SpvExecutionModel execution_model); + spv::ExecutionModel execution_model); // Collects interface variables that need the volatile semantics. // |is_vk_memory_model_enabled| is true if VulkanMemoryModel capability is @@ -65,15 +73,14 @@ class SpreadVolatileSemantics : public Pass { Instruction* entry_point); // Visits load instructions of pointers to variable whose result id is - // |var_id| if the load instructions are in entry points whose - // function id is one of |entry_function_ids|. |handle_load| is a function to - // do some actions for the load instructions. Finishes the traversal and - // returns false if |handle_load| returns false for a load instruction. - // Otherwise, returns true after running |handle_load| for all the load - // instructions. + // |var_id| if the load instructions are in reachable functions from entry + // points. |handle_load| is a function to do some actions for the load + // instructions. Finishes the traversal and returns false if |handle_load| + // returns false for a load instruction. Otherwise, returns true after running + // |handle_load| for all the load instructions. bool VisitLoadsOfPointersToVariableInEntries( uint32_t var_id, const std::function& handle_load, - const std::unordered_set& entry_function_ids); + const std::unordered_set& function_ids); // Sets Memory Operands of OpLoad instructions that load |var| or pointers // of |var| as Volatile if the function id of the OpLoad instruction is diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.cpp index 29ab6123f..3eb4ec3f8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.cpp @@ -48,7 +48,6 @@ #include "source/opt/cfg.h" #include "source/opt/mem_pass.h" #include "source/opt/types.h" -#include "source/util/make_unique.h" // Debug logging (0: Off, 1-N: Verbosity level). Replace this with the // implementation done for @@ -63,11 +62,9 @@ namespace spvtools { namespace opt { - namespace { -const uint32_t kStoreValIdInIdx = 1; -const uint32_t kVariableInitIdInIdx = 1; -const uint32_t kDebugDeclareOperandVariableIdx = 5; +constexpr uint32_t kStoreValIdInIdx = 1; +constexpr uint32_t kVariableInitIdInIdx = 1; } // namespace std::string SSARewriter::PhiCandidate::PrettyPrint(const CFG* cfg) const { @@ -301,12 +298,12 @@ void SSARewriter::SealBlock(BasicBlock* bb) { void SSARewriter::ProcessStore(Instruction* inst, BasicBlock* bb) { auto opcode = inst->opcode(); - assert((opcode == SpvOpStore || opcode == SpvOpVariable) && + assert((opcode == spv::Op::OpStore || opcode == spv::Op::OpVariable) && "Expecting a store or a variable definition instruction."); uint32_t var_id = 0; uint32_t val_id = 0; - if (opcode == SpvOpStore) { + if (opcode == spv::Op::OpStore) { (void)pass_->GetPtr(inst, &var_id); val_id = inst->GetSingleWordInOperand(kStoreValIdInIdx); } else if (inst->NumInOperands() >= 2) { @@ -315,8 +312,8 @@ void SSARewriter::ProcessStore(Instruction* inst, BasicBlock* bb) { } if (pass_->IsTargetVar(var_id)) { WriteVariable(var_id, bb, val_id); - pass_->context()->get_debug_info_mgr()->AddDebugValueIfVarDeclIsVisible( - inst, var_id, val_id, inst, &decls_invisible_to_value_assignment_); + pass_->context()->get_debug_info_mgr()->AddDebugValueForVariable( + inst, var_id, val_id, inst); #if SSA_REWRITE_DEBUGGING_LEVEL > 1 std::cerr << "\tFound store '%" << var_id << " = %" << val_id << "': " @@ -444,9 +441,9 @@ bool SSARewriter::GenerateSSAReplacements(BasicBlock* bb) { for (auto& inst : *bb) { auto opcode = inst.opcode(); - if (opcode == SpvOpStore || opcode == SpvOpVariable) { + if (opcode == spv::Op::OpStore || opcode == spv::Op::OpVariable) { ProcessStore(&inst, bb); - } else if (inst.opcode() == SpvOpLoad) { + } else if (inst.opcode() == spv::Op::OpLoad) { if (!ProcessLoad(&inst, bb)) { return false; } @@ -546,7 +543,7 @@ bool SSARewriter::ApplyReplacements() { // Generate a new OpPhi instruction and insert it in its basic // block. std::unique_ptr phi_inst( - new Instruction(pass_->context(), SpvOpPhi, type_id, + new Instruction(pass_->context(), spv::Op::OpPhi, type_id, phi_candidate->result_id(), phi_operands)); generated_phis.push_back(phi_inst.get()); pass_->get_def_use_mgr()->AnalyzeInstDef(&*phi_inst); @@ -555,13 +552,13 @@ bool SSARewriter::ApplyReplacements() { insert_it = insert_it.InsertBefore(std::move(phi_inst)); pass_->context()->get_decoration_mgr()->CloneDecorations( phi_candidate->var_id(), phi_candidate->result_id(), - {SpvDecorationRelaxedPrecision}); + {spv::Decoration::RelaxedPrecision}); // Add DebugValue for the new OpPhi instruction. insert_it->SetDebugScope(local_var->GetDebugScope()); - pass_->context()->get_debug_info_mgr()->AddDebugValueIfVarDeclIsVisible( + pass_->context()->get_debug_info_mgr()->AddDebugValueForVariable( &*insert_it, phi_candidate->var_id(), phi_candidate->result_id(), - &*insert_it, &decls_invisible_to_value_assignment_); + &*insert_it); modified = true; } @@ -650,62 +647,6 @@ void SSARewriter::FinalizePhiCandidates() { } } -Pass::Status SSARewriter::AddDebugValuesForInvisibleDebugDecls(Function* fp) { - // For the cases the value assignment is invisible to DebugDeclare e.g., - // the argument passing for an inlined function. - // - // Before inlining foo(int x): - // a = 3; - // foo(3); - // After inlining: - // a = 3; - // foo and x disappeared but we want to specify "DebugValue: %x = %int_3". - // - // We want to specify the value for the variable using |defs_at_block_[bb]|, - // where |bb| is the basic block contains the decl. - DominatorAnalysis* dom_tree = pass_->context()->GetDominatorAnalysis(fp); - Pass::Status status = Pass::Status::SuccessWithoutChange; - for (auto* decl : decls_invisible_to_value_assignment_) { - uint32_t var_id = - decl->GetSingleWordOperand(kDebugDeclareOperandVariableIdx); - auto* var = pass_->get_def_use_mgr()->GetDef(var_id); - if (var->opcode() == SpvOpFunctionParameter) continue; - - auto* bb = pass_->context()->get_instr_block(decl); - uint32_t value_id = GetValueAtBlock(var_id, bb); - Instruction* value = nullptr; - if (value_id) value = pass_->get_def_use_mgr()->GetDef(value_id); - - // If |value| is defined before the function body, it dominates |decl|. - // If |value| dominates |decl|, we can set it as DebugValue. - if (value && (pass_->context()->get_instr_block(value) == nullptr || - dom_tree->Dominates(value, decl))) { - if (pass_->context()->get_debug_info_mgr()->AddDebugValueForDecl( - decl, value->result_id(), decl, value) == nullptr) { - return Pass::Status::Failure; - } - } else { - // If |value| in the same basic block does not dominate |decl|, we can - // assign the value in the immediate dominator. - value_id = GetValueAtBlock(var_id, dom_tree->ImmediateDominator(bb)); - if (value_id) value = pass_->get_def_use_mgr()->GetDef(value_id); - if (value_id && - pass_->context()->get_debug_info_mgr()->AddDebugValueForDecl( - decl, value_id, decl, value) == nullptr) { - return Pass::Status::Failure; - } - } - - // DebugDeclares of target variables will be removed by - // SSARewritePass::Process(). - if (!pass_->IsTargetVar(var_id)) { - pass_->context()->get_debug_info_mgr()->KillDebugDeclares(var_id); - } - status = Pass::Status::SuccessWithChange; - } - return status; -} - Pass::Status SSARewriter::RewriteFunctionIntoSSA(Function* fp) { #if SSA_REWRITE_DEBUGGING_LEVEL > 0 std::cerr << "Function before SSA rewrite:\n" @@ -735,12 +676,6 @@ Pass::Status SSARewriter::RewriteFunctionIntoSSA(Function* fp) { // Finally, apply all the replacements in the IR. bool modified = ApplyReplacements(); - auto status = AddDebugValuesForInvisibleDebugDecls(fp); - if (status == Pass::Status::SuccessWithChange || - status == Pass::Status::Failure) { - return status; - } - #if SSA_REWRITE_DEBUGGING_LEVEL > 0 std::cerr << "\n\n\nFunction after SSA rewrite:\n" << fp->PrettyPrint(0) << "\n"; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.h index 1f4cd24ca..2470f85f6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/ssa_rewrite_pass.h @@ -253,11 +253,6 @@ class SSARewriter { // candidates. void FinalizePhiCandidates(); - // Adds DebugValues for DebugDeclares in - // |decls_invisible_to_value_assignment_|. Returns whether the function was - // modified or not, and whether or not the conversion was successful. - Pass::Status AddDebugValuesForInvisibleDebugDecls(Function* fp); - // Prints the table of Phi candidates to std::cerr. void PrintPhiCandidates() const; @@ -295,10 +290,6 @@ class SSARewriter { // Memory pass requesting the SSA rewriter. MemPass* pass_; - - // Set of DebugDeclare instructions that are not added as DebugValue because - // they are invisible to the store or phi instructions. - std::unordered_set decls_invisible_to_value_assignment_; }; class SSARewritePass : public MemPass { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strength_reduction_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strength_reduction_pass.cpp index ab7c4eb8d..16a7869ec 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strength_reduction_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strength_reduction_pass.cpp @@ -14,12 +14,8 @@ #include "source/opt/strength_reduction_pass.h" -#include -#include #include #include -#include -#include #include #include @@ -28,6 +24,8 @@ #include "source/opt/log.h" #include "source/opt/reflect.h" +namespace spvtools { +namespace opt { namespace { // Count the number of trailing zeros in the binary representation of // |constVal|. @@ -53,9 +51,6 @@ bool IsPowerOf2(uint32_t val) { } // namespace -namespace spvtools { -namespace opt { - Pass::Status StrengthReductionPass::Process() { // Initialize the member variables on a per module basis. bool modified = false; @@ -70,7 +65,7 @@ Pass::Status StrengthReductionPass::Process() { bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( BasicBlock::iterator* inst) { - assert((*inst)->opcode() == SpvOp::SpvOpIMul && + assert((*inst)->opcode() == spv::Op::OpIMul && "Only works for multiplication of integers."); bool modified = false; @@ -84,7 +79,7 @@ bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( for (int i = 0; i < 2; i++) { uint32_t opId = (*inst)->GetSingleWordInOperand(i); Instruction* opInst = get_def_use_mgr()->GetDef(opId); - if (opInst->opcode() == SpvOp::SpvOpConstant) { + if (opInst->opcode() == spv::Op::OpConstant) { // We found a constant operand. uint32_t constVal = opInst->GetSingleWordOperand(2); @@ -101,7 +96,7 @@ bool StrengthReductionPass::ReplaceMultiplyByPowerOf2( {shiftConstResultId}); newOperands.push_back(shiftOperand); std::unique_ptr newInstruction( - new Instruction(context(), SpvOp::SpvOpShiftLeftLogical, + new Instruction(context(), spv::Op::OpShiftLeftLogical, (*inst)->type_id(), newResultId, newOperands)); // Insert the new instruction and update the data structures. @@ -133,7 +128,7 @@ void StrengthReductionPass::FindIntTypesAndConstants() { for (auto iter = get_module()->types_values_begin(); iter != get_module()->types_values_end(); ++iter) { switch (iter->opcode()) { - case SpvOp::SpvOpConstant: + case spv::Op::OpConstant: if (iter->type_id() == uint32_type_id_) { uint32_t value = iter->GetSingleWordOperand(2); if (value <= 32) constant_ids_[value] = iter->result_id(); @@ -159,9 +154,8 @@ uint32_t StrengthReductionPass::GetConstantId(uint32_t val) { uint32_t resultId = TakeNextId(); Operand constant(spv_operand_type_t::SPV_OPERAND_TYPE_LITERAL_INTEGER, {val}); - std::unique_ptr newConstant( - new Instruction(context(), SpvOp::SpvOpConstant, uint32_type_id_, - resultId, {constant})); + std::unique_ptr newConstant(new Instruction( + context(), spv::Op::OpConstant, uint32_type_id_, resultId, {constant})); get_module()->AddGlobalValue(std::move(newConstant)); // Notify the DefUseManager about this constant. @@ -184,7 +178,7 @@ bool StrengthReductionPass::ScanFunctions() { for (auto& bb : func) { for (auto inst = bb.begin(); inst != bb.end(); ++inst) { switch (inst->opcode()) { - case SpvOp::SpvOpIMul: + case spv::Op::OpIMul: if (ReplaceMultiplyByPowerOf2(&inst)) modified = true; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_debug_info_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_debug_info_pass.cpp index 6a0ebf248..f81bced52 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_debug_info_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_debug_info_pass.cpp @@ -37,13 +37,13 @@ Pass::Status StripDebugInfoPass::Process() { if (uses_non_semantic_info) { for (auto& inst : context()->module()->debugs1()) { switch (inst.opcode()) { - case SpvOpString: { + case spv::Op::OpString: { analysis::DefUseManager* def_use = context()->get_def_use_mgr(); // see if this string is used anywhere by a non-semantic instruction bool no_nonsemantic_use = def_use->WhileEachUser(&inst, [def_use](Instruction* use) { - if (use->opcode() == SpvOpExtInst) { + if (use->opcode() == spv::Op::OpExtInst) { auto ext_inst_set = def_use->GetDef(use->GetSingleWordInOperand(0u)); const std::string extension_name = @@ -83,7 +83,8 @@ Pass::Status StripDebugInfoPass::Process() { // when that instruction is killed, which will lead to a double kill. std::sort(to_kill.begin(), to_kill.end(), [](Instruction* lhs, Instruction* rhs) -> bool { - if (lhs->opcode() == SpvOpName && rhs->opcode() != SpvOpName) + if (lhs->opcode() == spv::Op::OpName && + rhs->opcode() != spv::Op::OpName) return true; return false; }); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_nonsemantic_info_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_nonsemantic_info_pass.cpp index cd1fbb632..3886835ad 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_nonsemantic_info_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/strip_nonsemantic_info_pass.cpp @@ -14,7 +14,6 @@ #include "source/opt/strip_nonsemantic_info_pass.h" -#include #include #include "source/opt/instruction.h" @@ -32,27 +31,31 @@ Pass::Status StripNonSemanticInfoPass::Process() { bool other_uses_for_decorate_string = false; for (auto& inst : context()->module()->annotations()) { switch (inst.opcode()) { - case SpvOpDecorateStringGOOGLE: - if (inst.GetSingleWordInOperand(1) == SpvDecorationHlslSemanticGOOGLE || - inst.GetSingleWordInOperand(1) == SpvDecorationUserTypeGOOGLE) { + case spv::Op::OpDecorateStringGOOGLE: + if (spv::Decoration(inst.GetSingleWordInOperand(1)) == + spv::Decoration::HlslSemanticGOOGLE || + spv::Decoration(inst.GetSingleWordInOperand(1)) == + spv::Decoration::UserTypeGOOGLE) { to_remove.push_back(&inst); } else { other_uses_for_decorate_string = true; } break; - case SpvOpMemberDecorateStringGOOGLE: - if (inst.GetSingleWordInOperand(2) == SpvDecorationHlslSemanticGOOGLE || - inst.GetSingleWordInOperand(2) == SpvDecorationUserTypeGOOGLE) { + case spv::Op::OpMemberDecorateStringGOOGLE: + if (spv::Decoration(inst.GetSingleWordInOperand(2)) == + spv::Decoration::HlslSemanticGOOGLE || + spv::Decoration(inst.GetSingleWordInOperand(2)) == + spv::Decoration::UserTypeGOOGLE) { to_remove.push_back(&inst); } else { other_uses_for_decorate_string = true; } break; - case SpvOpDecorateId: - if (inst.GetSingleWordInOperand(1) == - SpvDecorationHlslCounterBufferGOOGLE) { + case spv::Op::OpDecorateId: + if (spv::Decoration(inst.GetSingleWordInOperand(1)) == + spv::Decoration::HlslCounterBufferGOOGLE) { to_remove.push_back(&inst); } break; @@ -79,7 +82,7 @@ Pass::Status StripNonSemanticInfoPass::Process() { // remove any extended inst imports that are non semantic std::unordered_set non_semantic_sets; for (auto& inst : context()->module()->ext_inst_imports()) { - assert(inst.opcode() == SpvOpExtInstImport && + assert(inst.opcode() == spv::Op::OpExtInstImport && "Expecting an import of an extension's instruction set."); const std::string extension_name = inst.GetInOperand(0).AsString(); if (spvtools::utils::starts_with(extension_name, "NonSemantic.")) { @@ -93,7 +96,7 @@ Pass::Status StripNonSemanticInfoPass::Process() { if (!non_semantic_sets.empty()) { context()->module()->ForEachInst( [&non_semantic_sets, &to_remove](Instruction* inst) { - if (inst->opcode() == SpvOpExtInst) { + if (inst->opcode() == spv::Op::OpExtInst) { if (non_semantic_sets.find(inst->GetSingleWordInOperand(0)) != non_semantic_sets.end()) { to_remove.push_back(inst); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/struct_cfg_analysis.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/struct_cfg_analysis.cpp index 203db87db..290b4bf45 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/struct_cfg_analysis.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/struct_cfg_analysis.cpp @@ -16,18 +16,17 @@ #include "source/opt/ir_context.h" -namespace { -const uint32_t kMergeNodeIndex = 0; -const uint32_t kContinueNodeIndex = 1; -} // namespace - namespace spvtools { namespace opt { +namespace { +constexpr uint32_t kMergeNodeIndex = 0; +constexpr uint32_t kContinueNodeIndex = 1; +} // namespace StructuredCFGAnalysis::StructuredCFGAnalysis(IRContext* ctx) : context_(ctx) { // If this is not a shader, there are no merge instructions, and not // structured CFG to analyze. - if (!context_->get_feature_mgr()->HasCapability(SpvCapabilityShader)) { + if (!context_->get_feature_mgr()->HasCapability(spv::Capability::Shader)) { return; } @@ -82,7 +81,7 @@ void StructuredCFGAnalysis::AddBlocksInFunction(Function* func) { merge_inst->GetSingleWordInOperand(kMergeNodeIndex); new_state.cinfo.containing_construct = block->id(); - if (merge_inst->opcode() == SpvOpLoopMerge) { + if (merge_inst->opcode() == spv::Op::OpLoopMerge) { new_state.cinfo.containing_loop = block->id(); new_state.cinfo.containing_switch = 0; new_state.continue_node = @@ -98,7 +97,7 @@ void StructuredCFGAnalysis::AddBlocksInFunction(Function* func) { new_state.cinfo.in_continue = state.back().cinfo.in_continue; new_state.continue_node = state.back().continue_node; - if (merge_inst->NextNode()->opcode() == SpvOpSwitch) { + if (merge_inst->NextNode()->opcode() == spv::Op::OpSwitch) { new_state.cinfo.containing_switch = block->id(); } else { new_state.cinfo.containing_switch = @@ -226,7 +225,7 @@ StructuredCFGAnalysis::FindFuncsCalledFromContinue() { for (auto& bb : func) { if (IsInContainingLoopsContinueConstruct(bb.id())) { for (const Instruction& inst : bb) { - if (inst.opcode() == SpvOpFunctionCall) { + if (inst.opcode() == spv::Op::OpFunctionCall) { funcs_to_process.push(inst.GetSingleWordInOperand(0)); } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.cpp new file mode 100644 index 000000000..f07c91757 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.cpp @@ -0,0 +1,46 @@ +// Copyright (c) 2023 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/switch_descriptorset_pass.h" + +#include "source/opt/ir_builder.h" +#include "source/util/string_utils.h" + +namespace spvtools { +namespace opt { + +Pass::Status SwitchDescriptorSetPass::Process() { + Status status = Status::SuccessWithoutChange; + auto* deco_mgr = context()->get_decoration_mgr(); + + for (Instruction& var : context()->types_values()) { + if (var.opcode() != spv::Op::OpVariable) { + continue; + } + auto decos = deco_mgr->GetDecorationsFor(var.result_id(), false); + for (const auto& deco : decos) { + spv::Decoration d = spv::Decoration(deco->GetSingleWordInOperand(1u)); + if (d == spv::Decoration::DescriptorSet && + deco->GetSingleWordInOperand(2u) == ds_from_) { + deco->SetInOperand(2u, {ds_to_}); + status = Status::SuccessWithChange; + break; + } + } + } + return status; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.h new file mode 100644 index 000000000..2084e9cda --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/switch_descriptorset_pass.h @@ -0,0 +1,52 @@ +// Copyright (c) 2023 LunarG Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include +#include +#include +#include +#include +#include + +#include "source/opt/pass.h" + +namespace spvtools { +namespace opt { + +// See optimizer.hpp for documentation. +class SwitchDescriptorSetPass : public Pass { + public: + SwitchDescriptorSetPass(uint32_t ds_from, uint32_t ds_to) + : ds_from_(ds_from), ds_to_(ds_to) {} + + const char* name() const override { return "switch-descriptorset"; } + + Status Process() override; + + IRContext::Analysis GetPreservedAnalyses() override { + // this pass preserves everything except decorations + uint32_t mask = ((IRContext::kAnalysisEnd << 1) - 1); + mask &= ~static_cast(IRContext::kAnalysisDecorations); + return static_cast(mask); + } + + private: + uint32_t ds_from_; + uint32_t ds_to_; +}; + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.cpp new file mode 100644 index 000000000..24f9e4670 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.cpp @@ -0,0 +1,649 @@ +// Copyright (c) 2023 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "source/opt/trim_capabilities_pass.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "source/enum_set.h" +#include "source/enum_string_mapping.h" +#include "source/opt/ir_context.h" +#include "source/opt/reflect.h" +#include "source/spirv_target_env.h" +#include "source/util/string_utils.h" + +namespace spvtools { +namespace opt { + +namespace { +constexpr uint32_t kOpTypeFloatSizeIndex = 0; +constexpr uint32_t kOpTypePointerStorageClassIndex = 0; +constexpr uint32_t kTypeArrayTypeIndex = 0; +constexpr uint32_t kOpTypeScalarBitWidthIndex = 0; +constexpr uint32_t kTypePointerTypeIdInIndex = 1; +constexpr uint32_t kOpTypeIntSizeIndex = 0; +constexpr uint32_t kOpTypeImageDimIndex = 1; +constexpr uint32_t kOpTypeImageArrayedIndex = kOpTypeImageDimIndex + 2; +constexpr uint32_t kOpTypeImageMSIndex = kOpTypeImageArrayedIndex + 1; +constexpr uint32_t kOpTypeImageSampledIndex = kOpTypeImageMSIndex + 1; +constexpr uint32_t kOpTypeImageFormatIndex = kOpTypeImageSampledIndex + 1; +constexpr uint32_t kOpImageReadImageIndex = 0; +constexpr uint32_t kOpImageSparseReadImageIndex = 0; + +// DFS visit of the type defined by `instruction`. +// If `condition` is true, children of the current node are visited. +// If `condition` is false, the children of the current node are ignored. +template +static void DFSWhile(const Instruction* instruction, UnaryPredicate condition) { + std::stack instructions_to_visit; + instructions_to_visit.push(instruction->result_id()); + const auto* def_use_mgr = instruction->context()->get_def_use_mgr(); + + while (!instructions_to_visit.empty()) { + const Instruction* item = def_use_mgr->GetDef(instructions_to_visit.top()); + instructions_to_visit.pop(); + + if (!condition(item)) { + continue; + } + + if (item->opcode() == spv::Op::OpTypePointer) { + instructions_to_visit.push( + item->GetSingleWordInOperand(kTypePointerTypeIdInIndex)); + continue; + } + + if (item->opcode() == spv::Op::OpTypeMatrix || + item->opcode() == spv::Op::OpTypeVector || + item->opcode() == spv::Op::OpTypeArray || + item->opcode() == spv::Op::OpTypeRuntimeArray) { + instructions_to_visit.push( + item->GetSingleWordInOperand(kTypeArrayTypeIndex)); + continue; + } + + if (item->opcode() == spv::Op::OpTypeStruct) { + item->ForEachInOperand([&instructions_to_visit](const uint32_t* op_id) { + instructions_to_visit.push(*op_id); + }); + continue; + } + } +} + +// Walks the type defined by `instruction` (OpType* only). +// Returns `true` if any call to `predicate` with the type/subtype returns true. +template +static bool AnyTypeOf(const Instruction* instruction, + UnaryPredicate predicate) { + assert(IsTypeInst(instruction->opcode()) && + "AnyTypeOf called with a non-type instruction."); + + bool found_one = false; + DFSWhile(instruction, [&found_one, predicate](const Instruction* node) { + if (found_one || predicate(node)) { + found_one = true; + return false; + } + + return true; + }); + return found_one; +} + +static bool is16bitType(const Instruction* instruction) { + if (instruction->opcode() != spv::Op::OpTypeInt && + instruction->opcode() != spv::Op::OpTypeFloat) { + return false; + } + + return instruction->GetSingleWordInOperand(kOpTypeScalarBitWidthIndex) == 16; +} + +static bool Has16BitCapability(const FeatureManager* feature_manager) { + const CapabilitySet& capabilities = feature_manager->GetCapabilities(); + return capabilities.contains(spv::Capability::Float16) || + capabilities.contains(spv::Capability::Int16); +} + +} // namespace + +// ============== Begin opcode handler implementations. ======================= +// +// Adding support for a new capability should only require adding a new handler, +// and updating the +// kSupportedCapabilities/kUntouchableCapabilities/kFordiddenCapabilities lists. +// +// Handler names follow the following convention: +// Handler__() + +static std::optional Handler_OpTypeFloat_Float16( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypeFloat && + "This handler only support OpTypeFloat opcodes."); + + const uint32_t size = + instruction->GetSingleWordInOperand(kOpTypeFloatSizeIndex); + return size == 16 ? std::optional(spv::Capability::Float16) : std::nullopt; +} + +static std::optional Handler_OpTypeFloat_Float64( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypeFloat && + "This handler only support OpTypeFloat opcodes."); + + const uint32_t size = + instruction->GetSingleWordInOperand(kOpTypeFloatSizeIndex); + return size == 64 ? std::optional(spv::Capability::Float64) : std::nullopt; +} + +static std::optional +Handler_OpTypePointer_StorageInputOutput16(const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypePointer && + "This handler only support OpTypePointer opcodes."); + + // This capability is only required if the variable has an Input/Output + // storage class. + spv::StorageClass storage_class = spv::StorageClass( + instruction->GetSingleWordInOperand(kOpTypePointerStorageClassIndex)); + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { + return std::nullopt; + } + + if (!Has16BitCapability(instruction->context()->get_feature_mgr())) { + return std::nullopt; + } + + return AnyTypeOf(instruction, is16bitType) + ? std::optional(spv::Capability::StorageInputOutput16) + : std::nullopt; +} + +static std::optional +Handler_OpTypePointer_StoragePushConstant16(const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypePointer && + "This handler only support OpTypePointer opcodes."); + + // This capability is only required if the variable has a PushConstant storage + // class. + spv::StorageClass storage_class = spv::StorageClass( + instruction->GetSingleWordInOperand(kOpTypePointerStorageClassIndex)); + if (storage_class != spv::StorageClass::PushConstant) { + return std::nullopt; + } + + if (!Has16BitCapability(instruction->context()->get_feature_mgr())) { + return std::nullopt; + } + + return AnyTypeOf(instruction, is16bitType) + ? std::optional(spv::Capability::StoragePushConstant16) + : std::nullopt; +} + +static std::optional +Handler_OpTypePointer_StorageUniformBufferBlock16( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypePointer && + "This handler only support OpTypePointer opcodes."); + + // This capability is only required if the variable has a Uniform storage + // class. + spv::StorageClass storage_class = spv::StorageClass( + instruction->GetSingleWordInOperand(kOpTypePointerStorageClassIndex)); + if (storage_class != spv::StorageClass::Uniform) { + return std::nullopt; + } + + if (!Has16BitCapability(instruction->context()->get_feature_mgr())) { + return std::nullopt; + } + + const auto* decoration_mgr = instruction->context()->get_decoration_mgr(); + const bool matchesCondition = + AnyTypeOf(instruction, [decoration_mgr](const Instruction* item) { + if (!decoration_mgr->HasDecoration(item->result_id(), + spv::Decoration::BufferBlock)) { + return false; + } + + return AnyTypeOf(item, is16bitType); + }); + + return matchesCondition + ? std::optional(spv::Capability::StorageUniformBufferBlock16) + : std::nullopt; +} + +static std::optional Handler_OpTypePointer_StorageUniform16( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypePointer && + "This handler only support OpTypePointer opcodes."); + + // This capability is only required if the variable has a Uniform storage + // class. + spv::StorageClass storage_class = spv::StorageClass( + instruction->GetSingleWordInOperand(kOpTypePointerStorageClassIndex)); + if (storage_class != spv::StorageClass::Uniform) { + return std::nullopt; + } + + const auto* feature_manager = instruction->context()->get_feature_mgr(); + if (!Has16BitCapability(feature_manager)) { + return std::nullopt; + } + + const bool hasBufferBlockCapability = + feature_manager->GetCapabilities().contains( + spv::Capability::StorageUniformBufferBlock16); + const auto* decoration_mgr = instruction->context()->get_decoration_mgr(); + bool found16bitType = false; + + DFSWhile(instruction, [decoration_mgr, hasBufferBlockCapability, + &found16bitType](const Instruction* item) { + if (found16bitType) { + return false; + } + + if (hasBufferBlockCapability && + decoration_mgr->HasDecoration(item->result_id(), + spv::Decoration::BufferBlock)) { + return false; + } + + if (is16bitType(item)) { + found16bitType = true; + return false; + } + + return true; + }); + + return found16bitType ? std::optional(spv::Capability::StorageUniform16) + : std::nullopt; +} + +static std::optional Handler_OpTypeInt_Int16( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypeInt && + "This handler only support OpTypeInt opcodes."); + + const uint32_t size = + instruction->GetSingleWordInOperand(kOpTypeIntSizeIndex); + return size == 16 ? std::optional(spv::Capability::Int16) : std::nullopt; +} + +static std::optional Handler_OpTypeInt_Int64( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypeInt && + "This handler only support OpTypeInt opcodes."); + + const uint32_t size = + instruction->GetSingleWordInOperand(kOpTypeIntSizeIndex); + return size == 64 ? std::optional(spv::Capability::Int64) : std::nullopt; +} + +static std::optional Handler_OpTypeImage_ImageMSArray( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpTypeImage && + "This handler only support OpTypeImage opcodes."); + + const uint32_t arrayed = + instruction->GetSingleWordInOperand(kOpTypeImageArrayedIndex); + const uint32_t ms = instruction->GetSingleWordInOperand(kOpTypeImageMSIndex); + const uint32_t sampled = + instruction->GetSingleWordInOperand(kOpTypeImageSampledIndex); + + return arrayed == 1 && sampled == 2 && ms == 1 + ? std::optional(spv::Capability::ImageMSArray) + : std::nullopt; +} + +static std::optional +Handler_OpImageRead_StorageImageReadWithoutFormat( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpImageRead && + "This handler only support OpImageRead opcodes."); + const auto* def_use_mgr = instruction->context()->get_def_use_mgr(); + + const uint32_t image_index = + instruction->GetSingleWordInOperand(kOpImageReadImageIndex); + const uint32_t type_index = def_use_mgr->GetDef(image_index)->type_id(); + const Instruction* type = def_use_mgr->GetDef(type_index); + const uint32_t dim = type->GetSingleWordInOperand(kOpTypeImageDimIndex); + const uint32_t format = type->GetSingleWordInOperand(kOpTypeImageFormatIndex); + + const bool is_unknown = spv::ImageFormat(format) == spv::ImageFormat::Unknown; + const bool requires_capability_for_unknown = + spv::Dim(dim) != spv::Dim::SubpassData; + return is_unknown && requires_capability_for_unknown + ? std::optional(spv::Capability::StorageImageReadWithoutFormat) + : std::nullopt; +} + +static std::optional +Handler_OpImageSparseRead_StorageImageReadWithoutFormat( + const Instruction* instruction) { + assert(instruction->opcode() == spv::Op::OpImageSparseRead && + "This handler only support OpImageSparseRead opcodes."); + const auto* def_use_mgr = instruction->context()->get_def_use_mgr(); + + const uint32_t image_index = + instruction->GetSingleWordInOperand(kOpImageSparseReadImageIndex); + const uint32_t type_index = def_use_mgr->GetDef(image_index)->type_id(); + const Instruction* type = def_use_mgr->GetDef(type_index); + const uint32_t format = type->GetSingleWordInOperand(kOpTypeImageFormatIndex); + + return spv::ImageFormat(format) == spv::ImageFormat::Unknown + ? std::optional(spv::Capability::StorageImageReadWithoutFormat) + : std::nullopt; +} + +// Opcode of interest to determine capabilities requirements. +constexpr std::array, 12> kOpcodeHandlers{{ + // clang-format off + {spv::Op::OpImageRead, Handler_OpImageRead_StorageImageReadWithoutFormat}, + {spv::Op::OpImageSparseRead, Handler_OpImageSparseRead_StorageImageReadWithoutFormat}, + {spv::Op::OpTypeFloat, Handler_OpTypeFloat_Float16 }, + {spv::Op::OpTypeFloat, Handler_OpTypeFloat_Float64 }, + {spv::Op::OpTypeImage, Handler_OpTypeImage_ImageMSArray}, + {spv::Op::OpTypeInt, Handler_OpTypeInt_Int16 }, + {spv::Op::OpTypeInt, Handler_OpTypeInt_Int64 }, + {spv::Op::OpTypePointer, Handler_OpTypePointer_StorageInputOutput16}, + {spv::Op::OpTypePointer, Handler_OpTypePointer_StoragePushConstant16}, + {spv::Op::OpTypePointer, Handler_OpTypePointer_StorageUniform16}, + {spv::Op::OpTypePointer, Handler_OpTypePointer_StorageUniform16}, + {spv::Op::OpTypePointer, Handler_OpTypePointer_StorageUniformBufferBlock16}, + // clang-format on +}}; + +// ============== End opcode handler implementations. ======================= + +namespace { +ExtensionSet getExtensionsRelatedTo(const CapabilitySet& capabilities, + const AssemblyGrammar& grammar) { + ExtensionSet output; + const spv_operand_desc_t* desc = nullptr; + for (auto capability : capabilities) { + if (SPV_SUCCESS != grammar.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, + static_cast(capability), + &desc)) { + continue; + } + + for (uint32_t i = 0; i < desc->numExtensions; ++i) { + output.insert(desc->extensions[i]); + } + } + + return output; +} +} // namespace + +TrimCapabilitiesPass::TrimCapabilitiesPass() + : supportedCapabilities_( + TrimCapabilitiesPass::kSupportedCapabilities.cbegin(), + TrimCapabilitiesPass::kSupportedCapabilities.cend()), + forbiddenCapabilities_( + TrimCapabilitiesPass::kForbiddenCapabilities.cbegin(), + TrimCapabilitiesPass::kForbiddenCapabilities.cend()), + untouchableCapabilities_( + TrimCapabilitiesPass::kUntouchableCapabilities.cbegin(), + TrimCapabilitiesPass::kUntouchableCapabilities.cend()), + opcodeHandlers_(kOpcodeHandlers.cbegin(), kOpcodeHandlers.cend()) {} + +void TrimCapabilitiesPass::addInstructionRequirementsForOpcode( + spv::Op opcode, CapabilitySet* capabilities, + ExtensionSet* extensions) const { + // Ignoring OpBeginInvocationInterlockEXT and OpEndInvocationInterlockEXT + // because they have three possible capabilities, only one of which is needed + if (opcode == spv::Op::OpBeginInvocationInterlockEXT || + opcode == spv::Op::OpEndInvocationInterlockEXT) { + return; + } + + const spv_opcode_desc_t* desc = {}; + auto result = context()->grammar().lookupOpcode(opcode, &desc); + if (result != SPV_SUCCESS) { + return; + } + + addSupportedCapabilitiesToSet(desc, capabilities); + addSupportedExtensionsToSet(desc, extensions); +} + +void TrimCapabilitiesPass::addInstructionRequirementsForOperand( + const Operand& operand, CapabilitySet* capabilities, + ExtensionSet* extensions) const { + // No supported capability relies on a 2+-word operand. + if (operand.words.size() != 1) { + return; + } + + // No supported capability relies on a literal string operand or an ID. + if (operand.type == SPV_OPERAND_TYPE_LITERAL_STRING || + operand.type == SPV_OPERAND_TYPE_ID || + operand.type == SPV_OPERAND_TYPE_RESULT_ID) { + return; + } + + // If the Vulkan memory model is declared and any instruction uses Device + // scope, the VulkanMemoryModelDeviceScope capability must be declared. This + // rule cannot be covered by the grammar, so must be checked explicitly. + if (operand.type == SPV_OPERAND_TYPE_SCOPE_ID) { + const Instruction* memory_model = context()->GetMemoryModel(); + if (memory_model && memory_model->GetSingleWordInOperand(1u) == + uint32_t(spv::MemoryModel::Vulkan)) { + capabilities->insert(spv::Capability::VulkanMemoryModelDeviceScope); + } + } + + // case 1: Operand is a single value, can directly lookup. + if (!spvOperandIsConcreteMask(operand.type)) { + const spv_operand_desc_t* desc = {}; + auto result = context()->grammar().lookupOperand(operand.type, + operand.words[0], &desc); + if (result != SPV_SUCCESS) { + return; + } + addSupportedCapabilitiesToSet(desc, capabilities); + addSupportedExtensionsToSet(desc, extensions); + return; + } + + // case 2: operand can be a bitmask, we need to decompose the lookup. + for (uint32_t i = 0; i < 32; i++) { + const uint32_t mask = (1 << i) & operand.words[0]; + if (!mask) { + continue; + } + + const spv_operand_desc_t* desc = {}; + auto result = context()->grammar().lookupOperand(operand.type, mask, &desc); + if (result != SPV_SUCCESS) { + continue; + } + + addSupportedCapabilitiesToSet(desc, capabilities); + addSupportedExtensionsToSet(desc, extensions); + } +} + +void TrimCapabilitiesPass::addInstructionRequirements( + Instruction* instruction, CapabilitySet* capabilities, + ExtensionSet* extensions) const { + // Ignoring OpCapability and OpExtension instructions. + if (instruction->opcode() == spv::Op::OpCapability || + instruction->opcode() == spv::Op::OpExtension) { + return; + } + + addInstructionRequirementsForOpcode(instruction->opcode(), capabilities, + extensions); + + // Second case: one of the opcode operand is gated by a capability. + const uint32_t operandCount = instruction->NumOperands(); + for (uint32_t i = 0; i < operandCount; i++) { + addInstructionRequirementsForOperand(instruction->GetOperand(i), + capabilities, extensions); + } + + // Last case: some complex logic needs to be run to determine capabilities. + auto[begin, end] = opcodeHandlers_.equal_range(instruction->opcode()); + for (auto it = begin; it != end; it++) { + const OpcodeHandler handler = it->second; + auto result = handler(instruction); + if (!result.has_value()) { + continue; + } + + capabilities->insert(*result); + } +} + +void TrimCapabilitiesPass::AddExtensionsForOperand( + const spv_operand_type_t type, const uint32_t value, + ExtensionSet* extensions) const { + const spv_operand_desc_t* desc = nullptr; + spv_result_t result = context()->grammar().lookupOperand(type, value, &desc); + if (result != SPV_SUCCESS) { + return; + } + addSupportedExtensionsToSet(desc, extensions); +} + +std::pair +TrimCapabilitiesPass::DetermineRequiredCapabilitiesAndExtensions() const { + CapabilitySet required_capabilities; + ExtensionSet required_extensions; + + get_module()->ForEachInst([&](Instruction* instruction) { + addInstructionRequirements(instruction, &required_capabilities, + &required_extensions); + }); + + for (auto capability : required_capabilities) { + AddExtensionsForOperand(SPV_OPERAND_TYPE_CAPABILITY, + static_cast(capability), + &required_extensions); + } + +#if !defined(NDEBUG) + // Debug only. We check the outputted required capabilities against the + // supported capabilities list. The supported capabilities list is useful for + // API users to quickly determine if they can use the pass or not. But this + // list has to remain up-to-date with the pass code. If we can detect a + // capability as required, but it's not listed, it means the list is + // out-of-sync. This method is not ideal, but should cover most cases. + { + for (auto capability : required_capabilities) { + assert(supportedCapabilities_.contains(capability) && + "Module is using a capability that is not listed as supported."); + } + } +#endif + + return std::make_pair(std::move(required_capabilities), + std::move(required_extensions)); +} + +Pass::Status TrimCapabilitiesPass::TrimUnrequiredCapabilities( + const CapabilitySet& required_capabilities) const { + const FeatureManager* feature_manager = context()->get_feature_mgr(); + CapabilitySet capabilities_to_trim; + for (auto capability : feature_manager->GetCapabilities()) { + // Some capabilities cannot be safely removed. Leaving them untouched. + if (untouchableCapabilities_.contains(capability)) { + continue; + } + + // If the capability is unsupported, don't trim it. + if (!supportedCapabilities_.contains(capability)) { + continue; + } + + if (required_capabilities.contains(capability)) { + continue; + } + + capabilities_to_trim.insert(capability); + } + + for (auto capability : capabilities_to_trim) { + context()->RemoveCapability(capability); + } + + return capabilities_to_trim.size() == 0 ? Pass::Status::SuccessWithoutChange + : Pass::Status::SuccessWithChange; +} + +Pass::Status TrimCapabilitiesPass::TrimUnrequiredExtensions( + const ExtensionSet& required_extensions) const { + const auto supported_extensions = + getExtensionsRelatedTo(supportedCapabilities_, context()->grammar()); + + bool modified_module = false; + for (auto extension : supported_extensions) { + if (required_extensions.contains(extension)) { + continue; + } + + if (context()->RemoveExtension(extension)) { + modified_module = true; + } + } + + return modified_module ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +bool TrimCapabilitiesPass::HasForbiddenCapabilities() const { + // EnumSet.HasAnyOf returns `true` if the given set is empty. + if (forbiddenCapabilities_.size() == 0) { + return false; + } + + const auto& capabilities = context()->get_feature_mgr()->GetCapabilities(); + return capabilities.HasAnyOf(forbiddenCapabilities_); +} + +Pass::Status TrimCapabilitiesPass::Process() { + if (HasForbiddenCapabilities()) { + return Status::SuccessWithoutChange; + } + + auto[required_capabilities, required_extensions] = + DetermineRequiredCapabilitiesAndExtensions(); + + Pass::Status capStatus = TrimUnrequiredCapabilities(required_capabilities); + Pass::Status extStatus = TrimUnrequiredExtensions(required_extensions); + + return capStatus == Pass::Status::SuccessWithChange || + extStatus == Pass::Status::SuccessWithChange + ? Pass::Status::SuccessWithChange + : Pass::Status::SuccessWithoutChange; +} + +} // namespace opt +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.h new file mode 100644 index 000000000..81c07b822 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/trim_capabilities_pass.h @@ -0,0 +1,205 @@ +// Copyright (c) 2023 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_OPT_TRIM_CAPABILITIES_PASS_H_ +#define SOURCE_OPT_TRIM_CAPABILITIES_PASS_H_ + +#include +#include +#include +#include +#include +#include + +#include "source/enum_set.h" +#include "source/extensions.h" +#include "source/opt/ir_context.h" +#include "source/opt/module.h" +#include "source/opt/pass.h" +#include "source/spirv_target_env.h" + +namespace spvtools { +namespace opt { + +// This is required for NDK build. The unordered_set/unordered_map +// implementation don't work with class enums. +struct ClassEnumHash { + std::size_t operator()(spv::Capability value) const { + using StoringType = typename std::underlying_type_t; + return std::hash{}(static_cast(value)); + } + + std::size_t operator()(spv::Op value) const { + using StoringType = typename std::underlying_type_t; + return std::hash{}(static_cast(value)); + } +}; + +// An opcode handler is a function which, given an instruction, returns either +// the required capability, or nothing. +// Each handler checks one case for a capability requirement. +// +// Example: +// - `OpTypeImage` can have operand `A` operand which requires capability 1 +// - `OpTypeImage` can also have operand `B` which requires capability 2. +// -> We have 2 handlers: `Handler_OpTypeImage_1` and +// `Handler_OpTypeImage_2`. +using OpcodeHandler = + std::optional (*)(const Instruction* instruction); + +// This pass tried to remove superfluous capabilities declared in the module. +// - If all the capabilities listed by an extension are removed, the extension +// is also trimmed. +// - If the module countains any capability listed in `kForbiddenCapabilities`, +// the module is left untouched. +// - No capabilities listed in `kUntouchableCapabilities` are trimmed, even when +// not used. +// - Only capabilitied listed in `kSupportedCapabilities` are supported. +// - If the module contains unsupported capabilities, results might be +// incorrect. +class TrimCapabilitiesPass : public Pass { + private: + // All the capabilities supported by this optimization pass. If your module + // contains unsupported instruction, the pass could yield bad results. + static constexpr std::array kSupportedCapabilities{ + // clang-format off + spv::Capability::ComputeDerivativeGroupLinearNV, + spv::Capability::ComputeDerivativeGroupQuadsNV, + spv::Capability::Float16, + spv::Capability::Float64, + spv::Capability::FragmentShaderPixelInterlockEXT, + spv::Capability::FragmentShaderSampleInterlockEXT, + spv::Capability::FragmentShaderShadingRateInterlockEXT, + spv::Capability::Groups, + spv::Capability::ImageMSArray, + spv::Capability::Int16, + spv::Capability::Int64, + spv::Capability::Linkage, + spv::Capability::MinLod, + spv::Capability::PhysicalStorageBufferAddresses, + spv::Capability::RayQueryKHR, + spv::Capability::RayTracingKHR, + spv::Capability::RayTraversalPrimitiveCullingKHR, + spv::Capability::Shader, + spv::Capability::ShaderClockKHR, + spv::Capability::StorageImageReadWithoutFormat, + spv::Capability::StorageInputOutput16, + spv::Capability::StoragePushConstant16, + spv::Capability::StorageUniform16, + spv::Capability::StorageUniformBufferBlock16, + spv::Capability::VulkanMemoryModelDeviceScope, + spv::Capability::GroupNonUniformPartitionedNV + // clang-format on + }; + + // Those capabilities disable all transformation of the module. + static constexpr std::array kForbiddenCapabilities{ + spv::Capability::Linkage, + }; + + // Those capabilities are never removed from a module because we cannot + // guess from the SPIR-V only if they are required or not. + static constexpr std::array kUntouchableCapabilities{ + spv::Capability::Shader, + }; + + public: + TrimCapabilitiesPass(); + TrimCapabilitiesPass(const TrimCapabilitiesPass&) = delete; + TrimCapabilitiesPass(TrimCapabilitiesPass&&) = delete; + + private: + // Inserts every capability listed by `descriptor` this pass supports into + // `output`. Expects a Descriptor like `spv_opcode_desc_t` or + // `spv_operand_desc_t`. + template + inline void addSupportedCapabilitiesToSet(const Descriptor* const descriptor, + CapabilitySet* output) const { + const uint32_t capabilityCount = descriptor->numCapabilities; + for (uint32_t i = 0; i < capabilityCount; ++i) { + const auto capability = descriptor->capabilities[i]; + if (supportedCapabilities_.contains(capability)) { + output->insert(capability); + } + } + } + + // Inserts every extension listed by `descriptor` required by the module into + // `output`. Expects a Descriptor like `spv_opcode_desc_t` or + // `spv_operand_desc_t`. + template + inline void addSupportedExtensionsToSet(const Descriptor* const descriptor, + ExtensionSet* output) const { + if (descriptor->minVersion <= + spvVersionForTargetEnv(context()->GetTargetEnv())) { + return; + } + output->insert(descriptor->extensions, + descriptor->extensions + descriptor->numExtensions); + } + + void addInstructionRequirementsForOpcode(spv::Op opcode, + CapabilitySet* capabilities, + ExtensionSet* extensions) const; + void addInstructionRequirementsForOperand(const Operand& operand, + CapabilitySet* capabilities, + ExtensionSet* extensions) const; + + // Given an `instruction`, determines the capabilities it requires, and output + // them in `capabilities`. The returned capabilities form a subset of + // kSupportedCapabilities. + void addInstructionRequirements(Instruction* instruction, + CapabilitySet* capabilities, + ExtensionSet* extensions) const; + + // Given an operand `type` and `value`, adds the extensions it would require + // to `extensions`. + void AddExtensionsForOperand(const spv_operand_type_t type, + const uint32_t value, + ExtensionSet* extensions) const; + + // Returns the list of required capabilities and extensions for the module. + // The returned capabilities form a subset of kSupportedCapabilities. + std::pair + DetermineRequiredCapabilitiesAndExtensions() const; + + // Trims capabilities not listed in `required_capabilities` if possible. + // Returns whether or not the module was modified. + Pass::Status TrimUnrequiredCapabilities( + const CapabilitySet& required_capabilities) const; + + // Trims extensions not listed in `required_extensions` if supported by this + // pass. An extensions is considered supported as soon as one capability this + // pass support requires it. + Pass::Status TrimUnrequiredExtensions( + const ExtensionSet& required_extensions) const; + + // Returns if the analyzed module contains any forbidden capability. + bool HasForbiddenCapabilities() const; + + public: + const char* name() const override { return "trim-capabilities"; } + Status Process() override; + + private: + const CapabilitySet supportedCapabilities_; + const CapabilitySet forbiddenCapabilities_; + const CapabilitySet untouchableCapabilities_; + const std::unordered_multimap + opcodeHandlers_; +}; + +} // namespace opt +} // namespace spvtools +#endif // SOURCE_OPT_TRIM_CAPABILITIES_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.cpp index 6da4b57b4..7b609bc77 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.cpp @@ -29,10 +29,8 @@ namespace spvtools { namespace opt { namespace analysis { namespace { - -const int kSpvTypePointerStorageClass = 1; -const int kSpvTypePointerTypeIdInIdx = 2; - +constexpr int kSpvTypePointerStorageClass = 1; +constexpr int kSpvTypePointerTypeIdInIdx = 2; } // namespace TypeManager::TypeManager(const MessageConsumer& consumer, IRContext* c) @@ -49,7 +47,7 @@ Type* TypeManager::GetType(uint32_t id) const { } std::pair> TypeManager::GetTypeAndPointerType( - uint32_t id, SpvStorageClass sc) const { + uint32_t id, spv::StorageClass sc) const { Type* type = GetType(id); if (type) { return std::make_pair(type, MakeUnique(type, sc)); @@ -180,7 +178,7 @@ void TypeManager::RemoveId(uint32_t id) { if (iter == id_to_type_.end()) return; auto& type = iter->second; - if (!type->IsUniqueType(true)) { + if (!type->IsUniqueType()) { auto tIter = type_to_id_.find(type); if (tIter != type_to_id_.end() && tIter->second == id) { // |type| currently maps to |id|. @@ -220,10 +218,10 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { RegisterType(id, *type); switch (type->kind()) { -#define DefineParameterlessCase(kind) \ - case Type::k##kind: \ - typeInst = MakeUnique(context(), SpvOpType##kind, 0, id, \ - std::initializer_list{}); \ +#define DefineParameterlessCase(kind) \ + case Type::k##kind: \ + typeInst = MakeUnique(context(), spv::Op::OpType##kind, 0, \ + id, std::initializer_list{}); \ break DefineParameterlessCase(Void); DefineParameterlessCase(Bool); @@ -235,10 +233,12 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { DefineParameterlessCase(PipeStorage); DefineParameterlessCase(NamedBarrier); DefineParameterlessCase(AccelerationStructureNV); + DefineParameterlessCase(RayQueryKHR); + DefineParameterlessCase(HitObjectNV); #undef DefineParameterlessCase case Type::kInteger: typeInst = MakeUnique( - context(), SpvOpTypeInt, 0, id, + context(), spv::Op::OpTypeInt, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_LITERAL_INTEGER, {type->AsInteger()->width()}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, @@ -246,7 +246,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { break; case Type::kFloat: typeInst = MakeUnique( - context(), SpvOpTypeFloat, 0, id, + context(), spv::Op::OpTypeFloat, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_LITERAL_INTEGER, {type->AsFloat()->width()}}}); break; @@ -256,7 +256,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = - MakeUnique(context(), SpvOpTypeVector, 0, id, + MakeUnique(context(), spv::Op::OpTypeVector, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {subtype}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, @@ -269,7 +269,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = - MakeUnique(context(), SpvOpTypeMatrix, 0, id, + MakeUnique(context(), spv::Op::OpTypeMatrix, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {subtype}}, {SPV_OPERAND_TYPE_LITERAL_INTEGER, @@ -283,7 +283,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypeImage, 0, id, + context(), spv::Op::OpTypeImage, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {subtype}}, {SPV_OPERAND_TYPE_DIMENSIONALITY, @@ -307,7 +307,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypeSampledImage, 0, id, + context(), spv::Op::OpTypeSampledImage, 0, id, std::initializer_list{{SPV_OPERAND_TYPE_ID, {subtype}}}); break; } @@ -317,7 +317,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypeArray, 0, id, + context(), spv::Op::OpTypeArray, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {subtype}}, {SPV_OPERAND_TYPE_ID, {type->AsArray()->LengthId()}}}); @@ -330,7 +330,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypeRuntimeArray, 0, id, + context(), spv::Op::OpTypeRuntimeArray, 0, id, std::initializer_list{{SPV_OPERAND_TYPE_ID, {subtype}}}); break; } @@ -345,7 +345,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { ops.push_back(Operand(SPV_OPERAND_TYPE_ID, {member_type_id})); } typeInst = - MakeUnique(context(), SpvOpTypeStruct, 0, id, ops); + MakeUnique(context(), spv::Op::OpTypeStruct, 0, id, ops); break; } case Type::kOpaque: { @@ -353,7 +353,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { // Convert to null-terminated packed UTF-8 string. std::vector words = spvtools::utils::MakeVector(opaque->name()); typeInst = MakeUnique( - context(), SpvOpTypeOpaque, 0, id, + context(), spv::Op::OpTypeOpaque, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_LITERAL_STRING, words}}); break; @@ -365,7 +365,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypePointer, 0, id, + context(), spv::Op::OpTypePointer, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_STORAGE_CLASS, {static_cast(pointer->storage_class())}}, @@ -387,20 +387,20 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { } ops.push_back(Operand(SPV_OPERAND_TYPE_ID, {paramater_type_id})); } - typeInst = - MakeUnique(context(), SpvOpTypeFunction, 0, id, ops); + typeInst = MakeUnique(context(), spv::Op::OpTypeFunction, 0, + id, ops); break; } case Type::kPipe: typeInst = MakeUnique( - context(), SpvOpTypePipe, 0, id, + context(), spv::Op::OpTypePipe, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, {static_cast(type->AsPipe()->access_qualifier())}}}); break; case Type::kForwardPointer: typeInst = MakeUnique( - context(), SpvOpTypeForwardPointer, 0, 0, + context(), spv::Op::OpTypeForwardPointer, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {type->AsForwardPointer()->target_id()}}, {SPV_OPERAND_TYPE_STORAGE_CLASS, @@ -415,7 +415,7 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { return 0; } typeInst = MakeUnique( - context(), SpvOpTypeCooperativeMatrixNV, 0, id, + context(), spv::Op::OpTypeCooperativeMatrixNV, 0, id, std::initializer_list{ {SPV_OPERAND_TYPE_ID, {component_type}}, {SPV_OPERAND_TYPE_SCOPE_ID, {coop_mat->scope_id()}}, @@ -423,6 +423,23 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { {SPV_OPERAND_TYPE_ID, {coop_mat->columns_id()}}}); break; } + case Type::kCooperativeMatrixKHR: { + auto coop_mat = type->AsCooperativeMatrixKHR(); + uint32_t const component_type = + GetTypeInstruction(coop_mat->component_type()); + if (component_type == 0) { + return 0; + } + typeInst = MakeUnique( + context(), spv::Op::OpTypeCooperativeMatrixKHR, 0, id, + std::initializer_list{ + {SPV_OPERAND_TYPE_ID, {component_type}}, + {SPV_OPERAND_TYPE_SCOPE_ID, {coop_mat->scope_id()}}, + {SPV_OPERAND_TYPE_ID, {coop_mat->rows_id()}}, + {SPV_OPERAND_TYPE_ID, {coop_mat->columns_id()}}, + {SPV_OPERAND_TYPE_ID, {coop_mat->use_id()}}}); + break; + } default: assert(false && "Unexpected type"); break; @@ -434,10 +451,10 @@ uint32_t TypeManager::GetTypeInstruction(const Type* type) { } uint32_t TypeManager::FindPointerToType(uint32_t type_id, - SpvStorageClass storage_class) { + spv::StorageClass storage_class) { Type* pointeeTy = GetType(type_id); Pointer pointerTy(pointeeTy, storage_class); - if (pointeeTy->IsUniqueType(true)) { + if (pointeeTy->IsUniqueType()) { // Non-ambiguous type. Get the pointer type through the type manager. return GetTypeInstruction(&pointerTy); } @@ -446,11 +463,11 @@ uint32_t TypeManager::FindPointerToType(uint32_t type_id, Module::inst_iterator type_itr = context()->module()->types_values_begin(); for (; type_itr != context()->module()->types_values_end(); ++type_itr) { const Instruction* type_inst = &*type_itr; - if (type_inst->opcode() == SpvOpTypePointer && + if (type_inst->opcode() == spv::Op::OpTypePointer && type_inst->GetSingleWordOperand(kSpvTypePointerTypeIdInIdx) == type_id && - type_inst->GetSingleWordOperand(kSpvTypePointerStorageClass) == - storage_class) + spv::StorageClass(type_inst->GetSingleWordOperand( + kSpvTypePointerStorageClass)) == storage_class) return type_inst->result_id(); } @@ -458,7 +475,7 @@ uint32_t TypeManager::FindPointerToType(uint32_t type_id, // TODO(1841): Handle id overflow. uint32_t resultId = context()->TakeNextId(); std::unique_ptr type_inst( - new Instruction(context(), SpvOpTypePointer, 0, resultId, + new Instruction(context(), spv::Op::OpTypePointer, 0, resultId, {{spv_operand_type_t::SPV_OPERAND_TYPE_STORAGE_CLASS, {uint32_t(storage_class)}}, {spv_operand_type_t::SPV_OPERAND_TYPE_ID, {type_id}}})); @@ -475,7 +492,7 @@ void TypeManager::AttachDecorations(uint32_t id, const Type* type) { for (auto pair : structTy->element_decorations()) { uint32_t element = pair.first; for (auto vec : pair.second) { - CreateDecoration(id, vec, element); + CreateDecoration(id, vec, /* is_member */ true, element); } } } @@ -483,10 +500,10 @@ void TypeManager::AttachDecorations(uint32_t id, const Type* type) { void TypeManager::CreateDecoration(uint32_t target, const std::vector& decoration, - uint32_t element) { + bool is_member, uint32_t element) { std::vector ops; ops.push_back(Operand(SPV_OPERAND_TYPE_ID, {target})); - if (element != 0) { + if (is_member) { ops.push_back(Operand(SPV_OPERAND_TYPE_LITERAL_INTEGER, {element})); } ops.push_back(Operand(SPV_OPERAND_TYPE_DECORATION, {decoration[0]})); @@ -494,19 +511,30 @@ void TypeManager::CreateDecoration(uint32_t target, ops.push_back(Operand(SPV_OPERAND_TYPE_LITERAL_INTEGER, {decoration[i]})); } context()->AddAnnotationInst(MakeUnique( - context(), (element == 0 ? SpvOpDecorate : SpvOpMemberDecorate), 0, 0, - ops)); + context(), (is_member ? spv::Op::OpMemberDecorate : spv::Op::OpDecorate), + 0, 0, ops)); Instruction* inst = &*--context()->annotation_end(); context()->get_def_use_mgr()->AnalyzeInstUse(inst); } -Type* TypeManager::RebuildType(const Type& type) { +Type* TypeManager::RebuildType(uint32_t type_id, const Type& type) { + assert(type_id != 0); + // The comparison and hash on the type pool will avoid inserting the rebuilt // type if an equivalent type already exists. The rebuilt type will be deleted // when it goes out of scope at the end of the function in that case. Repeated // insertions of the same Type will, at most, keep one corresponding object in // the type pool. std::unique_ptr rebuilt_ty; + + // If |type_id| is already present in the type pool, return the existing type. + // This saves extra work in the type builder and prevents running into + // circular issues (https://github.com/KhronosGroup/SPIRV-Tools/issues/5623). + Type* pool_ty = GetType(type_id); + if (pool_ty != nullptr) { + return pool_ty; + } + switch (type.kind()) { #define DefineNoSubtypeCase(kind) \ case Type::k##kind: \ @@ -527,47 +555,52 @@ Type* TypeManager::RebuildType(const Type& type) { DefineNoSubtypeCase(PipeStorage); DefineNoSubtypeCase(NamedBarrier); DefineNoSubtypeCase(AccelerationStructureNV); + DefineNoSubtypeCase(RayQueryKHR); + DefineNoSubtypeCase(HitObjectNV); #undef DefineNoSubtypeCase case Type::kVector: { const Vector* vec_ty = type.AsVector(); const Type* ele_ty = vec_ty->element_type(); - rebuilt_ty = - MakeUnique(RebuildType(*ele_ty), vec_ty->element_count()); + rebuilt_ty = MakeUnique(RebuildType(GetId(ele_ty), *ele_ty), + vec_ty->element_count()); break; } case Type::kMatrix: { const Matrix* mat_ty = type.AsMatrix(); const Type* ele_ty = mat_ty->element_type(); - rebuilt_ty = - MakeUnique(RebuildType(*ele_ty), mat_ty->element_count()); + rebuilt_ty = MakeUnique(RebuildType(GetId(ele_ty), *ele_ty), + mat_ty->element_count()); break; } case Type::kImage: { const Image* image_ty = type.AsImage(); const Type* ele_ty = image_ty->sampled_type(); - rebuilt_ty = - MakeUnique(RebuildType(*ele_ty), image_ty->dim(), - image_ty->depth(), image_ty->is_arrayed(), - image_ty->is_multisampled(), image_ty->sampled(), - image_ty->format(), image_ty->access_qualifier()); + rebuilt_ty = MakeUnique( + RebuildType(GetId(ele_ty), *ele_ty), image_ty->dim(), + image_ty->depth(), image_ty->is_arrayed(), + image_ty->is_multisampled(), image_ty->sampled(), image_ty->format(), + image_ty->access_qualifier()); break; } case Type::kSampledImage: { const SampledImage* image_ty = type.AsSampledImage(); const Type* ele_ty = image_ty->image_type(); - rebuilt_ty = MakeUnique(RebuildType(*ele_ty)); + rebuilt_ty = + MakeUnique(RebuildType(GetId(ele_ty), *ele_ty)); break; } case Type::kArray: { const Array* array_ty = type.AsArray(); - rebuilt_ty = - MakeUnique(array_ty->element_type(), array_ty->length_info()); + const Type* ele_ty = array_ty->element_type(); + rebuilt_ty = MakeUnique(RebuildType(GetId(ele_ty), *ele_ty), + array_ty->length_info()); break; } case Type::kRuntimeArray: { const RuntimeArray* array_ty = type.AsRuntimeArray(); const Type* ele_ty = array_ty->element_type(); - rebuilt_ty = MakeUnique(RebuildType(*ele_ty)); + rebuilt_ty = + MakeUnique(RebuildType(GetId(ele_ty), *ele_ty)); break; } case Type::kStruct: { @@ -575,7 +608,7 @@ Type* TypeManager::RebuildType(const Type& type) { std::vector subtypes; subtypes.reserve(struct_ty->element_types().size()); for (const auto* ele_ty : struct_ty->element_types()) { - subtypes.push_back(RebuildType(*ele_ty)); + subtypes.push_back(RebuildType(GetId(ele_ty), *ele_ty)); } rebuilt_ty = MakeUnique(subtypes); Struct* rebuilt_struct = rebuilt_ty->AsStruct(); @@ -592,7 +625,7 @@ Type* TypeManager::RebuildType(const Type& type) { case Type::kPointer: { const Pointer* pointer_ty = type.AsPointer(); const Type* ele_ty = pointer_ty->pointee_type(); - rebuilt_ty = MakeUnique(RebuildType(*ele_ty), + rebuilt_ty = MakeUnique(RebuildType(GetId(ele_ty), *ele_ty), pointer_ty->storage_class()); break; } @@ -602,9 +635,10 @@ Type* TypeManager::RebuildType(const Type& type) { std::vector param_types; param_types.reserve(function_ty->param_types().size()); for (const auto* param_ty : function_ty->param_types()) { - param_types.push_back(RebuildType(*param_ty)); + param_types.push_back(RebuildType(GetId(param_ty), *param_ty)); } - rebuilt_ty = MakeUnique(RebuildType(*ret_ty), param_types); + rebuilt_ty = MakeUnique(RebuildType(GetId(ret_ty), *ret_ty), + param_types); break; } case Type::kForwardPointer: { @@ -614,7 +648,7 @@ Type* TypeManager::RebuildType(const Type& type) { const Pointer* target_ptr = forward_ptr_ty->target_pointer(); if (target_ptr) { rebuilt_ty->AsForwardPointer()->SetTargetPointer( - RebuildType(*target_ptr)->AsPointer()); + RebuildType(GetId(target_ptr), *target_ptr)->AsPointer()); } break; } @@ -622,8 +656,17 @@ Type* TypeManager::RebuildType(const Type& type) { const CooperativeMatrixNV* cm_type = type.AsCooperativeMatrixNV(); const Type* component_type = cm_type->component_type(); rebuilt_ty = MakeUnique( - RebuildType(*component_type), cm_type->scope_id(), cm_type->rows_id(), - cm_type->columns_id()); + RebuildType(GetId(component_type), *component_type), + cm_type->scope_id(), cm_type->rows_id(), cm_type->columns_id()); + break; + } + case Type::kCooperativeMatrixKHR: { + const CooperativeMatrixKHR* cm_type = type.AsCooperativeMatrixKHR(); + const Type* component_type = cm_type->component_type(); + rebuilt_ty = MakeUnique( + RebuildType(GetId(component_type), *component_type), + cm_type->scope_id(), cm_type->rows_id(), cm_type->columns_id(), + cm_type->use_id()); break; } default: @@ -642,7 +685,7 @@ Type* TypeManager::RebuildType(const Type& type) { void TypeManager::RegisterType(uint32_t id, const Type& type) { // Rebuild |type| so it and all its constituent types are owned by the type // pool. - Type* rebuilt = RebuildType(type); + Type* rebuilt = RebuildType(id, type); assert(rebuilt->IsSame(&type)); id_to_type_[id] = rebuilt; if (GetId(rebuilt) == 0) { @@ -663,46 +706,47 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { Type* type = nullptr; switch (inst.opcode()) { - case SpvOpTypeVoid: + case spv::Op::OpTypeVoid: type = new Void(); break; - case SpvOpTypeBool: + case spv::Op::OpTypeBool: type = new Bool(); break; - case SpvOpTypeInt: + case spv::Op::OpTypeInt: type = new Integer(inst.GetSingleWordInOperand(0), inst.GetSingleWordInOperand(1)); break; - case SpvOpTypeFloat: + case spv::Op::OpTypeFloat: type = new Float(inst.GetSingleWordInOperand(0)); break; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: type = new Vector(GetType(inst.GetSingleWordInOperand(0)), inst.GetSingleWordInOperand(1)); break; - case SpvOpTypeMatrix: + case spv::Op::OpTypeMatrix: type = new Matrix(GetType(inst.GetSingleWordInOperand(0)), inst.GetSingleWordInOperand(1)); break; - case SpvOpTypeImage: { - const SpvAccessQualifier access = - inst.NumInOperands() < 8 - ? SpvAccessQualifierReadOnly - : static_cast(inst.GetSingleWordInOperand(7)); + case spv::Op::OpTypeImage: { + const spv::AccessQualifier access = + inst.NumInOperands() < 8 ? spv::AccessQualifier::ReadOnly + : static_cast( + inst.GetSingleWordInOperand(7)); type = new Image( GetType(inst.GetSingleWordInOperand(0)), - static_cast(inst.GetSingleWordInOperand(1)), + static_cast(inst.GetSingleWordInOperand(1)), inst.GetSingleWordInOperand(2), inst.GetSingleWordInOperand(3) == 1, inst.GetSingleWordInOperand(4) == 1, inst.GetSingleWordInOperand(5), - static_cast(inst.GetSingleWordInOperand(6)), access); + static_cast(inst.GetSingleWordInOperand(6)), + access); } break; - case SpvOpTypeSampler: + case spv::Op::OpTypeSampler: type = new Sampler(); break; - case SpvOpTypeSampledImage: + case spv::Op::OpTypeSampledImage: type = new SampledImage(GetType(inst.GetSingleWordInOperand(0))); break; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { const uint32_t length_id = inst.GetSingleWordInOperand(1); const Instruction* length_constant_inst = id_to_constant_inst_[length_id]; assert(length_constant_inst); @@ -715,11 +759,11 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { // Only OpSpecConstant has a SpecId. uint32_t spec_id = 0u; bool has_spec_id = false; - if (length_constant_inst->opcode() == SpvOpSpecConstant) { + if (length_constant_inst->opcode() == spv::Op::OpSpecConstant) { context()->get_decoration_mgr()->ForEachDecoration( - length_id, SpvDecorationSpecId, + length_id, uint32_t(spv::Decoration::SpecId), [&spec_id, &has_spec_id](const Instruction& decoration) { - assert(decoration.opcode() == SpvOpDecorate); + assert(decoration.opcode() == spv::Op::OpDecorate); spec_id = decoration.GetSingleWordOperand(2u); has_spec_id = true; }); @@ -728,7 +772,8 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { if (has_spec_id) { extra_words.push_back(spec_id); } - if ((opcode == SpvOpConstant) || (opcode == SpvOpSpecConstant)) { + if ((opcode == spv::Op::OpConstant) || + (opcode == spv::Op::OpSpecConstant)) { // Always include the literal constant words. In the spec constant // case, the constant might not be overridden, so it's still // significant. @@ -752,7 +797,7 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { return type; } } break; - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: type = new RuntimeArray(GetType(inst.GetSingleWordInOperand(0))); if (id_to_incomplete_type_.count(inst.GetSingleWordInOperand(0))) { incomplete_types_.emplace_back(inst.result_id(), type); @@ -760,7 +805,7 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { return type; } break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { std::vector element_types; bool incomplete_type = false; for (uint32_t i = 0; i < inst.NumInOperands(); ++i) { @@ -778,14 +823,14 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { return type; } } break; - case SpvOpTypeOpaque: { + case spv::Op::OpTypeOpaque: { type = new Opaque(inst.GetInOperand(0).AsString()); } break; - case SpvOpTypePointer: { + case spv::Op::OpTypePointer: { uint32_t pointee_type_id = inst.GetSingleWordInOperand(1); type = new Pointer( GetType(pointee_type_id), - static_cast(inst.GetSingleWordInOperand(0))); + static_cast(inst.GetSingleWordInOperand(0))); if (id_to_incomplete_type_.count(pointee_type_id)) { incomplete_types_.emplace_back(inst.result_id(), type); @@ -795,7 +840,7 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { id_to_incomplete_type_.erase(inst.result_id()); } break; - case SpvOpTypeFunction: { + case spv::Op::OpTypeFunction: { bool incomplete_type = false; uint32_t return_type_id = inst.GetSingleWordInOperand(0); if (id_to_incomplete_type_.count(return_type_id)) { @@ -819,51 +864,60 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { return type; } } break; - case SpvOpTypeEvent: + case spv::Op::OpTypeEvent: type = new Event(); break; - case SpvOpTypeDeviceEvent: + case spv::Op::OpTypeDeviceEvent: type = new DeviceEvent(); break; - case SpvOpTypeReserveId: + case spv::Op::OpTypeReserveId: type = new ReserveId(); break; - case SpvOpTypeQueue: + case spv::Op::OpTypeQueue: type = new Queue(); break; - case SpvOpTypePipe: + case spv::Op::OpTypePipe: type = new Pipe( - static_cast(inst.GetSingleWordInOperand(0))); + static_cast(inst.GetSingleWordInOperand(0))); break; - case SpvOpTypeForwardPointer: { + case spv::Op::OpTypeForwardPointer: { // Handling of forward pointers is different from the other types. uint32_t target_id = inst.GetSingleWordInOperand(0); - type = new ForwardPointer(target_id, static_cast( + type = new ForwardPointer(target_id, static_cast( inst.GetSingleWordInOperand(1))); incomplete_types_.emplace_back(target_id, type); id_to_incomplete_type_[target_id] = type; return type; } - case SpvOpTypePipeStorage: + case spv::Op::OpTypePipeStorage: type = new PipeStorage(); break; - case SpvOpTypeNamedBarrier: + case spv::Op::OpTypeNamedBarrier: type = new NamedBarrier(); break; - case SpvOpTypeAccelerationStructureNV: + case spv::Op::OpTypeAccelerationStructureNV: type = new AccelerationStructureNV(); break; - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixNV: type = new CooperativeMatrixNV(GetType(inst.GetSingleWordInOperand(0)), inst.GetSingleWordInOperand(1), inst.GetSingleWordInOperand(2), inst.GetSingleWordInOperand(3)); break; - case SpvOpTypeRayQueryKHR: + case spv::Op::OpTypeCooperativeMatrixKHR: + type = new CooperativeMatrixKHR( + GetType(inst.GetSingleWordInOperand(0)), + inst.GetSingleWordInOperand(1), inst.GetSingleWordInOperand(2), + inst.GetSingleWordInOperand(3), inst.GetSingleWordInOperand(4)); + break; + case spv::Op::OpTypeRayQueryKHR: type = new RayQueryKHR(); break; + case spv::Op::OpTypeHitObjectNV: + type = new HitObjectNV(); + break; default: - SPIRV_UNIMPLEMENTED(consumer_, "unhandled type"); + assert(false && "Type not handled by the type manager."); break; } @@ -884,11 +938,11 @@ Type* TypeManager::RecordIfTypeDefinition(const Instruction& inst) { } void TypeManager::AttachDecoration(const Instruction& inst, Type* type) { - const SpvOp opcode = inst.opcode(); + const spv::Op opcode = inst.opcode(); if (!IsAnnotationInst(opcode)) return; switch (opcode) { - case SpvOpDecorate: { + case spv::Op::OpDecorate: { const auto count = inst.NumOperands(); std::vector data; for (uint32_t i = 1; i < count; ++i) { @@ -896,7 +950,7 @@ void TypeManager::AttachDecoration(const Instruction& inst, Type* type) { } type->AddDecoration(std::move(data)); } break; - case SpvOpMemberDecorate: { + case spv::Op::OpMemberDecorate: { const auto count = inst.NumOperands(); const uint32_t index = inst.GetSingleWordOperand(1); std::vector data; @@ -905,12 +959,10 @@ void TypeManager::AttachDecoration(const Instruction& inst, Type* type) { } if (Struct* st = type->AsStruct()) { st->AddMemberDecoration(index, std::move(data)); - } else { - SPIRV_UNIMPLEMENTED(consumer_, "OpMemberDecorate non-struct type"); } } break; default: - SPIRV_UNREACHABLE(consumer_); + assert(false && "Unexpected opcode for a decoration instruction."); break; } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.h index 72e37f487..948b691ba 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/type_manager.h @@ -99,7 +99,7 @@ class TypeManager { // // |id| must be a registered type. std::pair> GetTypeAndPointerType( - uint32_t id, SpvStorageClass sc) const; + uint32_t id, spv::StorageClass sc) const; // Returns an id for a declaration representing |type|. Returns 0 if the type // does not exists, and could not be generated. @@ -112,7 +112,7 @@ class TypeManager { // Find pointer to type and storage in module, return its resultId. If it is // not found, a new type is created, and its id is returned. Returns 0 if the // type could not be created. - uint32_t FindPointerToType(uint32_t type_id, SpvStorageClass storage_class); + uint32_t FindPointerToType(uint32_t type_id, spv::StorageClass storage_class); // Registers |id| to |type|. // @@ -139,18 +139,22 @@ class TypeManager { const Type* GetMemberType(const Type* parent_type, const std::vector& access_chain); - Type* GetUIntType() { - Integer int_type(32, false); - return GetRegisteredType(&int_type); - } + // Attaches the decoration encoded in |inst| to |type|. Does nothing if the + // given instruction is not a decoration instruction. Assumes the target is + // |type| (e.g. should be called in loop of |type|'s decorations). + void AttachDecoration(const Instruction& inst, Type* type); + + Type* GetUIntType() { return GetIntType(32, false); } uint32_t GetUIntTypeId() { return GetTypeInstruction(GetUIntType()); } - Type* GetSIntType() { - Integer int_type(32, true); + Type* GetIntType(int32_t bitWidth, bool isSigned) { + Integer int_type(bitWidth, isSigned); return GetRegisteredType(&int_type); } + Type* GetSIntType() { return GetIntType(32, true); } + uint32_t GetSIntTypeId() { return GetTypeInstruction(GetSIntType()); } Type* GetFloatType() { @@ -243,24 +247,22 @@ class TypeManager { // Create the annotation instruction. // - // If |element| is zero, an OpDecorate is created, other an OpMemberDecorate - // is created. The annotation is registered with the DefUseManager and the - // DecorationManager. + // If |is_member| is false, an OpDecorate of |decoration| on |id| is created, + // otherwise an OpMemberDecorate is created at |element|. The annotation is + // registered with the DefUseManager and the DecorationManager. void CreateDecoration(uint32_t id, const std::vector& decoration, - uint32_t element = 0); + bool is_member = false, uint32_t element = 0); // Creates and returns a type from the given SPIR-V |inst|. Returns nullptr if // the given instruction is not for defining a type. Type* RecordIfTypeDefinition(const Instruction& inst); - // Attaches the decoration encoded in |inst| to |type|. Does nothing if the - // given instruction is not a decoration instruction. Assumes the target is - // |type| (e.g. should be called in loop of |type|'s decorations). - void AttachDecoration(const Instruction& inst, Type* type); // Returns an equivalent pointer to |type| built in terms of pointers owned by // |type_pool_|. For example, if |type| is a vec3 of bool, it will be rebuilt // replacing the bool subtype with one owned by |type_pool_|. - Type* RebuildType(const Type& type); + // + // The re-built type will have ID |type_id|. + Type* RebuildType(uint32_t type_id, const Type& type); // Completes the incomplete type |type|, by replaces all references to // ForwardPointer by the defining Pointer. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.cpp index ea4baadbd..b18b8cb1a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.cpp @@ -21,13 +21,14 @@ #include #include +#include "source/util/hash_combine.h" #include "source/util/make_unique.h" -#include "spirv/unified1/spirv.h" namespace spvtools { namespace opt { namespace analysis { +using spvtools::utils::hash_combine; using U32VecVec = std::vector>; namespace { @@ -62,7 +63,7 @@ bool CompareTwoVectors(const U32VecVec a, const U32VecVec b) { return true; } -} // anonymous namespace +} // namespace std::string Type::GetDecorationStr() const { std::ostringstream oss; @@ -83,10 +84,9 @@ bool Type::HasSameDecorations(const Type* that) const { return CompareTwoVectors(decorations_, that->decorations_); } -bool Type::IsUniqueType(bool allowVariablePointers) const { +bool Type::IsUniqueType() const { switch (kind_) { case kPointer: - return !allowVariablePointers; case kStruct: case kArray: case kRuntimeArray: @@ -128,7 +128,9 @@ std::unique_ptr Type::Clone() const { DeclareKindCase(NamedBarrier); DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); + DeclareKindCase(CooperativeMatrixKHR); DeclareKindCase(RayQueryKHR); + DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); @@ -174,7 +176,9 @@ bool Type::operator==(const Type& other) const { DeclareKindCase(NamedBarrier); DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); + DeclareKindCase(CooperativeMatrixKHR); DeclareKindCase(RayQueryKHR); + DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); @@ -182,23 +186,26 @@ bool Type::operator==(const Type& other) const { } } -void Type::GetHashWords(std::vector* words, - std::unordered_set* seen) const { - if (!seen->insert(this).second) { - return; +size_t Type::ComputeHashValue(size_t hash, SeenTypes* seen) const { + // Linear search through a dense, cache coherent vector is faster than O(log + // n) search in a complex data structure (eg std::set) for the generally small + // number of nodes. It also skips the overhead of an new/delete per Type + // (when inserting/removing from a set). + if (std::find(seen->begin(), seen->end(), this) != seen->end()) { + return hash; } - words->push_back(kind_); + seen->push_back(this); + + hash = hash_combine(hash, uint32_t(kind_)); for (const auto& d : decorations_) { - for (auto w : d) { - words->push_back(w); - } + hash = hash_combine(hash, d); } switch (kind_) { -#define DeclareKindCase(type) \ - case k##type: \ - As##type()->GetExtraHashWords(words, seen); \ +#define DeclareKindCase(type) \ + case k##type: \ + hash = As##type()->ComputeExtraStateHash(hash, seen); \ break DeclareKindCase(Void); DeclareKindCase(Bool); @@ -225,25 +232,51 @@ void Type::GetHashWords(std::vector* words, DeclareKindCase(NamedBarrier); DeclareKindCase(AccelerationStructureNV); DeclareKindCase(CooperativeMatrixNV); + DeclareKindCase(CooperativeMatrixKHR); DeclareKindCase(RayQueryKHR); + DeclareKindCase(HitObjectNV); #undef DeclareKindCase default: assert(false && "Unhandled type"); break; } - seen->erase(this); + seen->pop_back(); + return hash; } size_t Type::HashValue() const { - std::u32string h; - std::vector words; - GetHashWords(&words); - for (auto w : words) { - h.push_back(w); + SeenTypes seen; + return ComputeHashValue(0, &seen); +} + +uint64_t Type::NumberOfComponents() const { + switch (kind()) { + case kVector: + return AsVector()->element_count(); + case kMatrix: + return AsMatrix()->element_count(); + case kArray: { + Array::LengthInfo length_info = AsArray()->length_info(); + if (length_info.words[0] != Array::LengthInfo::kConstant) { + return UINT64_MAX; + } + assert(length_info.words.size() <= 3 && + "The size of the array could not fit size_t."); + uint64_t length = 0; + length |= length_info.words[1]; + if (length_info.words.size() > 2) { + length |= static_cast(length_info.words[2]) << 32; + } + return length; + } + case kRuntimeArray: + return UINT64_MAX; + case kStruct: + return AsStruct()->element_types().size(); + default: + return 0; } - - return std::hash()(h); } bool Integer::IsSameImpl(const Type* that, IsSameCache*) const { @@ -258,10 +291,8 @@ std::string Integer::str() const { return oss.str(); } -void Integer::GetExtraHashWords(std::vector* words, - std::unordered_set*) const { - words->push_back(width_); - words->push_back(signed_); +size_t Integer::ComputeExtraStateHash(size_t hash, SeenTypes*) const { + return hash_combine(hash, width_, signed_); } bool Float::IsSameImpl(const Type* that, IsSameCache*) const { @@ -275,9 +306,8 @@ std::string Float::str() const { return oss.str(); } -void Float::GetExtraHashWords(std::vector* words, - std::unordered_set*) const { - words->push_back(width_); +size_t Float::ComputeExtraStateHash(size_t hash, SeenTypes*) const { + return hash_combine(hash, width_); } Vector::Vector(const Type* type, uint32_t count) @@ -299,10 +329,11 @@ std::string Vector::str() const { return oss.str(); } -void Vector::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - element_type_->GetHashWords(words, seen); - words->push_back(count_); +size_t Vector::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + // prefer form that doesn't require push/pop from stack: add state and + // make tail call. + hash = hash_combine(hash, count_); + return element_type_->ComputeHashValue(hash, seen); } Matrix::Matrix(const Type* type, uint32_t count) @@ -324,14 +355,14 @@ std::string Matrix::str() const { return oss.str(); } -void Matrix::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - element_type_->GetHashWords(words, seen); - words->push_back(count_); +size_t Matrix::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + hash = hash_combine(hash, count_); + return element_type_->ComputeHashValue(hash, seen); } -Image::Image(Type* type, SpvDim dimen, uint32_t d, bool array, bool multisample, - uint32_t sampling, SpvImageFormat f, SpvAccessQualifier qualifier) +Image::Image(Type* type, spv::Dim dimen, uint32_t d, bool array, + bool multisample, uint32_t sampling, spv::ImageFormat f, + spv::AccessQualifier qualifier) : Type(kImage), sampled_type_(type), dim_(dimen), @@ -356,22 +387,16 @@ bool Image::IsSameImpl(const Type* that, IsSameCache* seen) const { std::string Image::str() const { std::ostringstream oss; - oss << "image(" << sampled_type_->str() << ", " << dim_ << ", " << depth_ - << ", " << arrayed_ << ", " << ms_ << ", " << sampled_ << ", " << format_ - << ", " << access_qualifier_ << ")"; + oss << "image(" << sampled_type_->str() << ", " << uint32_t(dim_) << ", " + << depth_ << ", " << arrayed_ << ", " << ms_ << ", " << sampled_ << ", " + << uint32_t(format_) << ", " << uint32_t(access_qualifier_) << ")"; return oss.str(); } -void Image::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - sampled_type_->GetHashWords(words, seen); - words->push_back(dim_); - words->push_back(depth_); - words->push_back(arrayed_); - words->push_back(ms_); - words->push_back(sampled_); - words->push_back(format_); - words->push_back(access_qualifier_); +size_t Image::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + hash = hash_combine(hash, uint32_t(dim_), depth_, arrayed_, ms_, sampled_, + uint32_t(format_), uint32_t(access_qualifier_)); + return sampled_type_->ComputeHashValue(hash, seen); } bool SampledImage::IsSameImpl(const Type* that, IsSameCache* seen) const { @@ -387,9 +412,8 @@ std::string SampledImage::str() const { return oss.str(); } -void SampledImage::GetExtraHashWords( - std::vector* words, std::unordered_set* seen) const { - image_type_->GetHashWords(words, seen); +size_t SampledImage::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + return image_type_->ComputeHashValue(hash, seen); } Array::Array(const Type* type, const Array::LengthInfo& length_info_arg) @@ -422,15 +446,19 @@ std::string Array::str() const { return oss.str(); } -void Array::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - element_type_->GetHashWords(words, seen); - words->insert(words->end(), length_info_.words.begin(), - length_info_.words.end()); +size_t Array::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + hash = hash_combine(hash, length_info_.words); + return element_type_->ComputeHashValue(hash, seen); } void Array::ReplaceElementType(const Type* type) { element_type_ = type; } +Array::LengthInfo Array::GetConstantLengthInfo(uint32_t const_id, + uint32_t length) const { + std::vector extra_words{LengthInfo::Case::kConstant, length}; + return {const_id, extra_words}; +} + RuntimeArray::RuntimeArray(const Type* type) : Type(kRuntimeArray), element_type_(type) { assert(!type->AsVoid()); @@ -449,9 +477,8 @@ std::string RuntimeArray::str() const { return oss.str(); } -void RuntimeArray::GetExtraHashWords( - std::vector* words, std::unordered_set* seen) const { - element_type_->GetHashWords(words, seen); +size_t RuntimeArray::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + return element_type_->ComputeHashValue(hash, seen); } void RuntimeArray::ReplaceElementType(const Type* type) { @@ -508,19 +535,14 @@ std::string Struct::str() const { return oss.str(); } -void Struct::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { +size_t Struct::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { for (auto* t : element_types_) { - t->GetHashWords(words, seen); + hash = t->ComputeHashValue(hash, seen); } for (const auto& pair : element_decorations_) { - words->push_back(pair.first); - for (const auto& d : pair.second) { - for (auto w : d) { - words->push_back(w); - } - } + hash = hash_combine(hash, pair.first, pair.second); } + return hash; } bool Opaque::IsSameImpl(const Type* that, IsSameCache*) const { @@ -535,14 +557,11 @@ std::string Opaque::str() const { return oss.str(); } -void Opaque::GetExtraHashWords(std::vector* words, - std::unordered_set*) const { - for (auto c : name_) { - words->push_back(static_cast(c)); - } +size_t Opaque::ComputeExtraStateHash(size_t hash, SeenTypes*) const { + return hash_combine(hash, name_); } -Pointer::Pointer(const Type* type, SpvStorageClass sc) +Pointer::Pointer(const Type* type, spv::StorageClass sc) : Type(kPointer), pointee_type_(type), storage_class_(sc) {} bool Pointer::IsSameImpl(const Type* that, IsSameCache* seen) const { @@ -568,10 +587,9 @@ std::string Pointer::str() const { return os.str(); } -void Pointer::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - pointee_type_->GetHashWords(words, seen); - words->push_back(storage_class_); +size_t Pointer::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { + hash = hash_combine(hash, uint32_t(storage_class_)); + return pointee_type_->ComputeHashValue(hash, seen); } void Pointer::SetPointeeType(const Type* type) { pointee_type_ = type; } @@ -605,12 +623,11 @@ std::string Function::str() const { return oss.str(); } -void Function::GetExtraHashWords(std::vector* words, - std::unordered_set* seen) const { - return_type_->GetHashWords(words, seen); +size_t Function::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const { for (const auto* t : param_types_) { - t->GetHashWords(words, seen); + hash = t->ComputeHashValue(hash, seen); } + return return_type_->ComputeHashValue(hash, seen); } void Function::SetReturnType(const Type* type) { return_type_ = type; } @@ -623,13 +640,12 @@ bool Pipe::IsSameImpl(const Type* that, IsSameCache*) const { std::string Pipe::str() const { std::ostringstream oss; - oss << "pipe(" << access_qualifier_ << ")"; + oss << "pipe(" << uint32_t(access_qualifier_) << ")"; return oss.str(); } -void Pipe::GetExtraHashWords(std::vector* words, - std::unordered_set*) const { - words->push_back(access_qualifier_); +size_t Pipe::ComputeExtraStateHash(size_t hash, SeenTypes*) const { + return hash_combine(hash, uint32_t(access_qualifier_)); } bool ForwardPointer::IsSameImpl(const Type* that, IsSameCache*) const { @@ -652,11 +668,11 @@ std::string ForwardPointer::str() const { return oss.str(); } -void ForwardPointer::GetExtraHashWords( - std::vector* words, std::unordered_set* seen) const { - words->push_back(target_id_); - words->push_back(storage_class_); - if (pointer_) pointer_->GetHashWords(words, seen); +size_t ForwardPointer::ComputeExtraStateHash(size_t hash, + SeenTypes* seen) const { + hash = hash_combine(hash, target_id_, uint32_t(storage_class_)); + if (pointer_) hash = pointer_->ComputeHashValue(hash, seen); + return hash; } CooperativeMatrixNV::CooperativeMatrixNV(const Type* type, const uint32_t scope, @@ -680,12 +696,10 @@ std::string CooperativeMatrixNV::str() const { return oss.str(); } -void CooperativeMatrixNV::GetExtraHashWords( - std::vector* words, std::unordered_set* pSet) const { - component_type_->GetHashWords(words, pSet); - words->push_back(scope_id_); - words->push_back(rows_id_); - words->push_back(columns_id_); +size_t CooperativeMatrixNV::ComputeExtraStateHash(size_t hash, + SeenTypes* seen) const { + hash = hash_combine(hash, scope_id_, rows_id_, columns_id_); + return component_type_->ComputeHashValue(hash, seen); } bool CooperativeMatrixNV::IsSameImpl(const Type* that, @@ -697,6 +711,45 @@ bool CooperativeMatrixNV::IsSameImpl(const Type* that, columns_id_ == mt->columns_id_ && HasSameDecorations(that); } +CooperativeMatrixKHR::CooperativeMatrixKHR(const Type* type, + const uint32_t scope, + const uint32_t rows, + const uint32_t columns, + const uint32_t use) + : Type(kCooperativeMatrixKHR), + component_type_(type), + scope_id_(scope), + rows_id_(rows), + columns_id_(columns), + use_id_(use) { + assert(type != nullptr); + assert(scope != 0); + assert(rows != 0); + assert(columns != 0); +} + +std::string CooperativeMatrixKHR::str() const { + std::ostringstream oss; + oss << "<" << component_type_->str() << ", " << scope_id_ << ", " << rows_id_ + << ", " << columns_id_ << ", " << use_id_ << ">"; + return oss.str(); +} + +size_t CooperativeMatrixKHR::ComputeExtraStateHash(size_t hash, + SeenTypes* seen) const { + hash = hash_combine(hash, scope_id_, rows_id_, columns_id_, use_id_); + return component_type_->ComputeHashValue(hash, seen); +} + +bool CooperativeMatrixKHR::IsSameImpl(const Type* that, + IsSameCache* seen) const { + const CooperativeMatrixKHR* mt = that->AsCooperativeMatrixKHR(); + if (!mt) return false; + return component_type_->IsSameImpl(mt->component_type_, seen) && + scope_id_ == mt->scope_id_ && rows_id_ == mt->rows_id_ && + columns_id_ == mt->columns_id_ && HasSameDecorations(that); +} + } // namespace analysis } // namespace opt } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.h index 9ecd41a6b..16a948cec 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/types.h @@ -28,6 +28,7 @@ #include "source/latest_version_spirv_header.h" #include "source/opt/instruction.h" +#include "source/util/small_vector.h" #include "spirv-tools/libspirv.h" namespace spvtools { @@ -59,7 +60,9 @@ class PipeStorage; class NamedBarrier; class AccelerationStructureNV; class CooperativeMatrixNV; +class CooperativeMatrixKHR; class RayQueryKHR; +class HitObjectNV; // Abstract class for a SPIR-V type. It has a bunch of As() methods, // which is used as a way to probe the actual . @@ -67,6 +70,8 @@ class Type { public: typedef std::set> IsSameCache; + using SeenTypes = spvtools::utils::SmallVector; + // Available subtypes. // // When adding a new derived class of Type, please add an entry to the enum. @@ -96,7 +101,10 @@ class Type { kNamedBarrier, kAccelerationStructureNV, kCooperativeMatrixNV, - kRayQueryKHR + kCooperativeMatrixKHR, + kRayQueryKHR, + kHitObjectNV, + kLast }; Type(Kind k) : kind_(k) {} @@ -142,33 +150,27 @@ class Type { // Returns a clone of |this| minus any decorations. std::unique_ptr RemoveDecorations() const; - // Returns true if this type must be unique. + // Returns true if this cannot hash to the same value as another type in the + // module. For example, structs are not unique types because the module could + // have two types + // + // %1 = OpTypeStruct %int + // %2 = OpTypeStruct %int // - // If variable pointers are allowed, then pointers are not required to be - // unique. - // TODO(alanbaker): Update this if variable pointers become a core feature. - bool IsUniqueType(bool allowVariablePointers = false) const; + // The only way to distinguish these types is the result id. The type manager + // will hash them to the same value. + bool IsUniqueType() const; bool operator==(const Type& other) const; // Returns the hash value of this type. size_t HashValue() const; - // Adds the necessary words to compute a hash value of this type to |words|. - void GetHashWords(std::vector* words) const { - std::unordered_set seen; - GetHashWords(words, &seen); - } - - // Adds the necessary words to compute a hash value of this type to |words|. - void GetHashWords(std::vector* words, - std::unordered_set* seen) const; + size_t ComputeHashValue(size_t hash, SeenTypes* seen) const; - // Adds necessary extra words for a subtype to calculate a hash value into - // |words|. - virtual void GetExtraHashWords( - std::vector* words, - std::unordered_set* pSet) const = 0; + // Returns the number of components in a composite type. Returns 0 for a + // non-composite type. + uint64_t NumberOfComponents() const; // A bunch of methods for casting this type to a given type. Returns this if the // cast can be done, nullptr otherwise. @@ -201,9 +203,15 @@ class Type { DeclareCastMethod(NamedBarrier) DeclareCastMethod(AccelerationStructureNV) DeclareCastMethod(CooperativeMatrixNV) + DeclareCastMethod(CooperativeMatrixKHR) DeclareCastMethod(RayQueryKHR) + DeclareCastMethod(HitObjectNV) #undef DeclareCastMethod +protected: + // Add any type-specific state to |hash| and returns new hash. + virtual size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const = 0; + protected: // Decorations attached to this type. Each decoration is encoded as a vector // of uint32_t numbers. The first uint32_t number is the decoration value, @@ -232,8 +240,7 @@ class Integer : public Type { uint32_t width() const { return width_; } bool IsSigned() const { return signed_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -253,8 +260,7 @@ class Float : public Type { const Float* AsFloat() const override { return this; } uint32_t width() const { return width_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -274,8 +280,7 @@ class Vector : public Type { Vector* AsVector() override { return this; } const Vector* AsVector() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -296,8 +301,7 @@ class Matrix : public Type { Matrix* AsMatrix() override { return this; } const Matrix* AsMatrix() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -308,9 +312,9 @@ class Matrix : public Type { class Image : public Type { public: - Image(Type* type, SpvDim dimen, uint32_t d, bool array, bool multisample, - uint32_t sampling, SpvImageFormat f, - SpvAccessQualifier qualifier = SpvAccessQualifierReadOnly); + Image(Type* type, spv::Dim dimen, uint32_t d, bool array, bool multisample, + uint32_t sampling, spv::ImageFormat f, + spv::AccessQualifier qualifier = spv::AccessQualifier::ReadOnly); Image(const Image&) = default; std::string str() const override; @@ -319,28 +323,27 @@ class Image : public Type { const Image* AsImage() const override { return this; } const Type* sampled_type() const { return sampled_type_; } - SpvDim dim() const { return dim_; } + spv::Dim dim() const { return dim_; } uint32_t depth() const { return depth_; } bool is_arrayed() const { return arrayed_; } bool is_multisampled() const { return ms_; } uint32_t sampled() const { return sampled_; } - SpvImageFormat format() const { return format_; } - SpvAccessQualifier access_qualifier() const { return access_qualifier_; } + spv::ImageFormat format() const { return format_; } + spv::AccessQualifier access_qualifier() const { return access_qualifier_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; Type* sampled_type_; - SpvDim dim_; + spv::Dim dim_; uint32_t depth_; bool arrayed_; bool ms_; uint32_t sampled_; - SpvImageFormat format_; - SpvAccessQualifier access_qualifier_; + spv::ImageFormat format_; + spv::AccessQualifier access_qualifier_; }; class SampledImage : public Type { @@ -355,8 +358,7 @@ class SampledImage : public Type { const Type* image_type() const { return image_type_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -399,10 +401,10 @@ class Array : public Type { Array* AsArray() override { return this; } const Array* AsArray() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; void ReplaceElementType(const Type* element_type); + LengthInfo GetConstantLengthInfo(uint32_t const_id, uint32_t length) const; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -422,8 +424,7 @@ class RuntimeArray : public Type { RuntimeArray* AsRuntimeArray() override { return this; } const RuntimeArray* AsRuntimeArray() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; void ReplaceElementType(const Type* element_type); @@ -459,8 +460,7 @@ class Struct : public Type { Struct* AsStruct() override { return this; } const Struct* AsStruct() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -491,8 +491,7 @@ class Opaque : public Type { const std::string& name() const { return name_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -502,18 +501,17 @@ class Opaque : public Type { class Pointer : public Type { public: - Pointer(const Type* pointee, SpvStorageClass sc); + Pointer(const Type* pointee, spv::StorageClass sc); Pointer(const Pointer&) = default; std::string str() const override; const Type* pointee_type() const { return pointee_type_; } - SpvStorageClass storage_class() const { return storage_class_; } + spv::StorageClass storage_class() const { return storage_class_; } Pointer* AsPointer() override { return this; } const Pointer* AsPointer() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; void SetPointeeType(const Type* type); @@ -521,7 +519,7 @@ class Pointer : public Type { bool IsSameImpl(const Type* that, IsSameCache*) const override; const Type* pointee_type_; - SpvStorageClass storage_class_; + spv::StorageClass storage_class_; }; class Function : public Type { @@ -539,8 +537,7 @@ class Function : public Type { const std::vector& param_types() const { return param_types_; } std::vector& param_types() { return param_types_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set*) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; void SetReturnType(const Type* type); @@ -553,7 +550,7 @@ class Function : public Type { class Pipe : public Type { public: - Pipe(SpvAccessQualifier qualifier) + Pipe(spv::AccessQualifier qualifier) : Type(kPipe), access_qualifier_(qualifier) {} Pipe(const Pipe&) = default; @@ -562,20 +559,19 @@ class Pipe : public Type { Pipe* AsPipe() override { return this; } const Pipe* AsPipe() const override { return this; } - SpvAccessQualifier access_qualifier() const { return access_qualifier_; } + spv::AccessQualifier access_qualifier() const { return access_qualifier_; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; - SpvAccessQualifier access_qualifier_; + spv::AccessQualifier access_qualifier_; }; class ForwardPointer : public Type { public: - ForwardPointer(uint32_t id, SpvStorageClass sc) + ForwardPointer(uint32_t id, spv::StorageClass sc) : Type(kForwardPointer), target_id_(id), storage_class_(sc), @@ -584,7 +580,7 @@ class ForwardPointer : public Type { uint32_t target_id() const { return target_id_; } void SetTargetPointer(const Pointer* pointer) { pointer_ = pointer; } - SpvStorageClass storage_class() const { return storage_class_; } + spv::StorageClass storage_class() const { return storage_class_; } const Pointer* target_pointer() const { return pointer_; } std::string str() const override; @@ -592,14 +588,13 @@ class ForwardPointer : public Type { ForwardPointer* AsForwardPointer() override { return this; } const ForwardPointer* AsForwardPointer() const override { return this; } - void GetExtraHashWords(std::vector* words, - std::unordered_set* pSet) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; private: bool IsSameImpl(const Type* that, IsSameCache*) const override; uint32_t target_id_; - SpvStorageClass storage_class_; + spv::StorageClass storage_class_; const Pointer* pointer_; }; @@ -616,13 +611,43 @@ class CooperativeMatrixNV : public Type { return this; } - void GetExtraHashWords(std::vector*, - std::unordered_set*) const override; + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; + + const Type* component_type() const { return component_type_; } + uint32_t scope_id() const { return scope_id_; } + uint32_t rows_id() const { return rows_id_; } + uint32_t columns_id() const { return columns_id_; } + + private: + bool IsSameImpl(const Type* that, IsSameCache*) const override; + + const Type* component_type_; + const uint32_t scope_id_; + const uint32_t rows_id_; + const uint32_t columns_id_; +}; + +class CooperativeMatrixKHR : public Type { + public: + CooperativeMatrixKHR(const Type* type, const uint32_t scope, + const uint32_t rows, const uint32_t columns, + const uint32_t use); + CooperativeMatrixKHR(const CooperativeMatrixKHR&) = default; + + std::string str() const override; + + CooperativeMatrixKHR* AsCooperativeMatrixKHR() override { return this; } + const CooperativeMatrixKHR* AsCooperativeMatrixKHR() const override { + return this; + } + + size_t ComputeExtraStateHash(size_t hash, SeenTypes* seen) const override; const Type* component_type() const { return component_type_; } uint32_t scope_id() const { return scope_id_; } uint32_t rows_id() const { return rows_id_; } uint32_t columns_id() const { return columns_id_; } + uint32_t use_id() const { return use_id_; } private: bool IsSameImpl(const Type* that, IsSameCache*) const override; @@ -631,26 +656,28 @@ class CooperativeMatrixNV : public Type { const uint32_t scope_id_; const uint32_t rows_id_; const uint32_t columns_id_; + const uint32_t use_id_; }; -#define DefineParameterlessType(type, name) \ - class type : public Type { \ - public: \ - type() : Type(k##type) {} \ - type(const type&) = default; \ - \ - std::string str() const override { return #name; } \ - \ - type* As##type() override { return this; } \ - const type* As##type() const override { return this; } \ - \ - void GetExtraHashWords(std::vector*, \ - std::unordered_set*) const override {} \ - \ - private: \ - bool IsSameImpl(const Type* that, IsSameCache*) const override { \ - return that->As##type() && HasSameDecorations(that); \ - } \ +#define DefineParameterlessType(type, name) \ + class type : public Type { \ + public: \ + type() : Type(k##type) {} \ + type(const type&) = default; \ + \ + std::string str() const override { return #name; } \ + \ + type* As##type() override { return this; } \ + const type* As##type() const override { return this; } \ + \ + size_t ComputeExtraStateHash(size_t hash, SeenTypes*) const override { \ + return hash; \ + } \ + \ + private: \ + bool IsSameImpl(const Type* that, IsSameCache*) const override { \ + return that->As##type() && HasSameDecorations(that); \ + } \ } DefineParameterlessType(Void, void); DefineParameterlessType(Bool, bool); @@ -663,6 +690,7 @@ DefineParameterlessType(PipeStorage, pipe_storage); DefineParameterlessType(NamedBarrier, named_barrier); DefineParameterlessType(AccelerationStructureNV, accelerationStructureNV); DefineParameterlessType(RayQueryKHR, rayQueryKHR); +DefineParameterlessType(HitObjectNV, hitObjectNV); #undef DefineParameterlessType } // namespace analysis diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/unify_const_pass.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/unify_const_pass.cpp index 227fd61da..83dd438b6 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/unify_const_pass.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/unify_const_pass.cpp @@ -20,12 +20,10 @@ #include #include "source/opt/def_use_manager.h" -#include "source/opt/ir_context.h" #include "source/util/make_unique.h" namespace spvtools { namespace opt { - namespace { // The trie that stores a bunch of result ids and, for a given instruction, @@ -103,7 +101,7 @@ class ResultIdTrie { std::unique_ptr root_; // The root node of the trie. }; -} // anonymous namespace +} // namespace Pass::Status UnifyConstantPass::Process() { bool modified = false; @@ -139,23 +137,23 @@ Pass::Status UnifyConstantPass::Process() { // processing is up to a descendant. This makes comparing the key array // always valid for judging duplication. switch (inst->opcode()) { - case SpvOp::SpvOpConstantTrue: - case SpvOp::SpvOpConstantFalse: - case SpvOp::SpvOpConstant: - case SpvOp::SpvOpConstantNull: - case SpvOp::SpvOpConstantSampler: - case SpvOp::SpvOpConstantComposite: + case spv::Op::OpConstantTrue: + case spv::Op::OpConstantFalse: + case spv::Op::OpConstant: + case spv::Op::OpConstantNull: + case spv::Op::OpConstantSampler: + case spv::Op::OpConstantComposite: // Only spec constants defined with OpSpecConstantOp and // OpSpecConstantComposite should be processed in this pass. Spec // constants defined with OpSpecConstant{|True|False} are decorated with // 'SpecId' decoration and all of them should be treated as unique. // 'SpecId' is not applicable to SpecConstants defined with // OpSpecConstant{Op|Composite}, their values are not necessary to be - // unique. When all the operands/compoents are the same between two + // unique. When all the operands/components are the same between two // OpSpecConstant{Op|Composite} results, their result values must be the // same so are unifiable. - case SpvOp::SpvOpSpecConstantOp: - case SpvOp::SpvOpSpecConstantComposite: { + case spv::Op::OpSpecConstantOp: + case spv::Op::OpSpecConstantComposite: { uint32_t id = defined_constants.LookupEquivalentResultFor(*inst); if (id != inst->result_id()) { // The constant is a duplicated one, use the cached constant to diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.cpp index 9d6a5bceb..1b439a6ef 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.cpp @@ -28,14 +28,16 @@ namespace opt { Pass::Status UpgradeMemoryModel::Process() { // TODO: This pass needs changes to support cooperative matrices. if (context()->get_feature_mgr()->HasCapability( - SpvCapabilityCooperativeMatrixNV)) { + spv::Capability::CooperativeMatrixNV)) { return Pass::Status::SuccessWithoutChange; } // Only update Logical GLSL450 to Logical VulkanKHR. Instruction* memory_model = get_module()->GetMemoryModel(); - if (memory_model->GetSingleWordInOperand(0u) != SpvAddressingModelLogical || - memory_model->GetSingleWordInOperand(1u) != SpvMemoryModelGLSL450) { + if (memory_model->GetSingleWordInOperand(0u) != + uint32_t(spv::AddressingModel::Logical) || + memory_model->GetSingleWordInOperand(1u) != + uint32_t(spv::MemoryModel::GLSL450)) { return Pass::Status::SuccessWithoutChange; } @@ -55,16 +57,17 @@ void UpgradeMemoryModel::UpgradeMemoryModelInstruction() { // 3. Modify the memory model. Instruction* memory_model = get_module()->GetMemoryModel(); context()->AddCapability(MakeUnique( - context(), SpvOpCapability, 0, 0, + context(), spv::Op::OpCapability, 0, 0, std::initializer_list{ - {SPV_OPERAND_TYPE_CAPABILITY, {SpvCapabilityVulkanMemoryModelKHR}}})); + {SPV_OPERAND_TYPE_CAPABILITY, + {uint32_t(spv::Capability::VulkanMemoryModelKHR)}}})); const std::string extension = "SPV_KHR_vulkan_memory_model"; std::vector words = spvtools::utils::MakeVector(extension); context()->AddExtension( - MakeUnique(context(), SpvOpExtension, 0, 0, + MakeUnique(context(), spv::Op::OpExtension, 0, 0, std::initializer_list{ {SPV_OPERAND_TYPE_LITERAL_STRING, words}})); - memory_model->SetInOperand(1u, {SpvMemoryModelVulkanKHR}); + memory_model->SetInOperand(1u, {uint32_t(spv::MemoryModel::VulkanKHR)}); } void UpgradeMemoryModel::UpgradeInstructions() { @@ -79,7 +82,7 @@ void UpgradeMemoryModel::UpgradeInstructions() { // In SPIR-V 1.4 or later, normalize OpCopyMemory* access operands. for (auto& func : *get_module()) { func.ForEachInst([this](Instruction* inst) { - if (inst->opcode() == SpvOpExtInst) { + if (inst->opcode() == spv::Op::OpExtInst) { auto ext_inst = inst->GetSingleWordInOperand(1u); if (ext_inst == GLSLstd450Modf || ext_inst == GLSLstd450Frexp) { auto import = @@ -89,9 +92,10 @@ void UpgradeMemoryModel::UpgradeInstructions() { } } } else if (get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { - if (inst->opcode() == SpvOpCopyMemory || - inst->opcode() == SpvOpCopyMemorySized) { - uint32_t start_operand = inst->opcode() == SpvOpCopyMemory ? 2u : 3u; + if (inst->opcode() == spv::Op::OpCopyMemory || + inst->opcode() == spv::Op::OpCopyMemorySized) { + uint32_t start_operand = + inst->opcode() == spv::Op::OpCopyMemory ? 2u : 3u; if (inst->NumInOperands() > start_operand) { auto num_access_words = MemoryAccessNumWords( inst->GetSingleWordInOperand(start_operand)); @@ -105,10 +109,10 @@ void UpgradeMemoryModel::UpgradeInstructions() { } } else { // Add two memory access operands. - inst->AddOperand( - {SPV_OPERAND_TYPE_MEMORY_ACCESS, {SpvMemoryAccessMaskNone}}); - inst->AddOperand( - {SPV_OPERAND_TYPE_MEMORY_ACCESS, {SpvMemoryAccessMaskNone}}); + inst->AddOperand({SPV_OPERAND_TYPE_MEMORY_ACCESS, + {uint32_t(spv::MemoryAccessMask::MaskNone)}}); + inst->AddOperand({SPV_OPERAND_TYPE_MEMORY_ACCESS, + {uint32_t(spv::MemoryAccessMask::MaskNone)}}); } } } @@ -129,23 +133,23 @@ void UpgradeMemoryModel::UpgradeMemoryAndImages() { bool dst_coherent = false; bool dst_volatile = false; uint32_t start_operand = 0u; - SpvScope scope = SpvScopeQueueFamilyKHR; - SpvScope src_scope = SpvScopeQueueFamilyKHR; - SpvScope dst_scope = SpvScopeQueueFamilyKHR; + spv::Scope scope = spv::Scope::QueueFamilyKHR; + spv::Scope src_scope = spv::Scope::QueueFamilyKHR; + spv::Scope dst_scope = spv::Scope::QueueFamilyKHR; switch (inst->opcode()) { - case SpvOpLoad: - case SpvOpStore: + case spv::Op::OpLoad: + case spv::Op::OpStore: std::tie(is_coherent, is_volatile, scope) = GetInstructionAttributes(inst->GetSingleWordInOperand(0u)); break; - case SpvOpImageRead: - case SpvOpImageSparseRead: - case SpvOpImageWrite: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseRead: + case spv::Op::OpImageWrite: std::tie(is_coherent, is_volatile, scope) = GetInstructionAttributes(inst->GetSingleWordInOperand(0u)); break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: std::tie(dst_coherent, dst_volatile, dst_scope) = GetInstructionAttributes(inst->GetSingleWordInOperand(0u)); std::tie(src_coherent, src_volatile, src_scope) = @@ -156,17 +160,17 @@ void UpgradeMemoryModel::UpgradeMemoryAndImages() { } switch (inst->opcode()) { - case SpvOpLoad: + case spv::Op::OpLoad: UpgradeFlags(inst, 1u, is_coherent, is_volatile, kVisibility, kMemory); break; - case SpvOpStore: + case spv::Op::OpStore: UpgradeFlags(inst, 2u, is_coherent, is_volatile, kAvailability, kMemory); break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: - start_operand = inst->opcode() == SpvOpCopyMemory ? 2u : 3u; + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: + start_operand = inst->opcode() == spv::Op::OpCopyMemory ? 2u : 3u; if (get_module()->version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { // There are guaranteed to be two memory access operands at this // point so treat source and target separately. @@ -183,11 +187,11 @@ void UpgradeMemoryModel::UpgradeMemoryAndImages() { kVisibility, kMemory); } break; - case SpvOpImageRead: - case SpvOpImageSparseRead: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseRead: UpgradeFlags(inst, 2u, is_coherent, is_volatile, kVisibility, kImage); break; - case SpvOpImageWrite: + case spv::Op::OpImageWrite: UpgradeFlags(inst, 3u, is_coherent, is_volatile, kAvailability, kImage); break; @@ -205,7 +209,7 @@ void UpgradeMemoryModel::UpgradeMemoryAndImages() { // There are two memory access operands. The first is for the target and // the second is for the source. if (dst_coherent || src_coherent) { - start_operand = inst->opcode() == SpvOpCopyMemory ? 2u : 3u; + start_operand = inst->opcode() == spv::Op::OpCopyMemory ? 2u : 3u; std::vector new_operands; uint32_t num_access_words = MemoryAccessNumWords(inst->GetSingleWordInOperand(start_operand)); @@ -255,13 +259,13 @@ void UpgradeMemoryModel::UpgradeAtomics() { if (spvOpcodeIsAtomicOp(inst->opcode())) { bool unused_coherent = false; bool is_volatile = false; - SpvScope unused_scope = SpvScopeQueueFamilyKHR; + spv::Scope unused_scope = spv::Scope::QueueFamilyKHR; std::tie(unused_coherent, is_volatile, unused_scope) = GetInstructionAttributes(inst->GetSingleWordInOperand(0)); UpgradeSemantics(inst, 2u, is_volatile); - if (inst->opcode() == SpvOpAtomicCompareExchange || - inst->opcode() == SpvOpAtomicCompareExchangeWeak) { + if (inst->opcode() == spv::Op::OpAtomicCompareExchange || + inst->opcode() == spv::Op::OpAtomicCompareExchangeWeak) { UpgradeSemantics(inst, 3u, is_volatile); } } @@ -286,14 +290,14 @@ void UpgradeMemoryModel::UpgradeSemantics(Instruction* inst, value = constant->GetU32(); } - value |= SpvMemorySemanticsVolatileMask; + value |= uint32_t(spv::MemorySemanticsMask::Volatile); auto new_constant = context()->get_constant_mgr()->GetConstant(type, {value}); auto new_semantics = context()->get_constant_mgr()->GetDefiningInstruction(new_constant); inst->SetInOperand(in_operand, {new_semantics->result_id()}); } -std::tuple UpgradeMemoryModel::GetInstructionAttributes( +std::tuple UpgradeMemoryModel::GetInstructionAttributes( uint32_t id) { // |id| is a pointer used in a memory/image instruction. Need to determine if // that pointer points to volatile or coherent memory. Workgroup storage @@ -302,8 +306,8 @@ std::tuple UpgradeMemoryModel::GetInstructionAttributes( Instruction* inst = context()->get_def_use_mgr()->GetDef(id); analysis::Type* type = context()->get_type_mgr()->GetType(inst->type_id()); if (type->AsPointer() && - type->AsPointer()->storage_class() == SpvStorageClassWorkgroup) { - return std::make_tuple(true, false, SpvScopeWorkgroup); + type->AsPointer()->storage_class() == spv::StorageClass::Workgroup) { + return std::make_tuple(true, false, spv::Scope::Workgroup); } bool is_coherent = false; @@ -313,7 +317,7 @@ std::tuple UpgradeMemoryModel::GetInstructionAttributes( TraceInstruction(context()->get_def_use_mgr()->GetDef(id), std::vector(), &visited); - return std::make_tuple(is_coherent, is_volatile, SpvScopeQueueFamilyKHR); + return std::make_tuple(is_coherent, is_volatile, spv::Scope::QueueFamilyKHR); } std::pair UpgradeMemoryModel::TraceInstruction( @@ -336,10 +340,10 @@ std::pair UpgradeMemoryModel::TraceInstruction( bool is_coherent = false; bool is_volatile = false; switch (inst->opcode()) { - case SpvOpVariable: - case SpvOpFunctionParameter: - is_coherent |= HasDecoration(inst, 0, SpvDecorationCoherent); - is_volatile |= HasDecoration(inst, 0, SpvDecorationVolatile); + case spv::Op::OpVariable: + case spv::Op::OpFunctionParameter: + is_coherent |= HasDecoration(inst, 0, spv::Decoration::Coherent); + is_volatile |= HasDecoration(inst, 0, spv::Decoration::Volatile); if (!is_coherent || !is_volatile) { bool type_coherent = false; bool type_volatile = false; @@ -349,14 +353,14 @@ std::pair UpgradeMemoryModel::TraceInstruction( is_volatile |= type_volatile; } break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: // Store indices in reverse order. for (uint32_t i = inst->NumInOperands() - 1; i > 0; --i) { indices.push_back(inst->GetSingleWordInOperand(i)); } break; - case SpvOpPtrAccessChain: + case spv::Op::OpPtrAccessChain: // Store indices in reverse order. Skip the |Element| operand. for (uint32_t i = inst->NumInOperands() - 1; i > 1; --i) { indices.push_back(inst->GetSingleWordInOperand(i)); @@ -375,8 +379,8 @@ std::pair UpgradeMemoryModel::TraceInstruction( // Variables and function parameters are sources. Continue searching until we // reach them. - if (inst->opcode() != SpvOpVariable && - inst->opcode() != SpvOpFunctionParameter) { + if (inst->opcode() != spv::Op::OpVariable && + inst->opcode() != spv::Op::OpFunctionParameter) { inst->ForEachInId([this, &is_coherent, &is_volatile, &indices, &visited](const uint32_t* id_ptr) { Instruction* op_inst = context()->get_def_use_mgr()->GetDef(*id_ptr); @@ -404,24 +408,24 @@ std::pair UpgradeMemoryModel::CheckType( bool is_coherent = false; bool is_volatile = false; Instruction* type_inst = context()->get_def_use_mgr()->GetDef(type_id); - assert(type_inst->opcode() == SpvOpTypePointer); + assert(type_inst->opcode() == spv::Op::OpTypePointer); Instruction* element_inst = context()->get_def_use_mgr()->GetDef( type_inst->GetSingleWordInOperand(1u)); for (int i = (int)indices.size() - 1; i >= 0; --i) { if (is_coherent && is_volatile) break; - if (element_inst->opcode() == SpvOpTypePointer) { + if (element_inst->opcode() == spv::Op::OpTypePointer) { element_inst = context()->get_def_use_mgr()->GetDef( element_inst->GetSingleWordInOperand(1u)); - } else if (element_inst->opcode() == SpvOpTypeStruct) { + } else if (element_inst->opcode() == spv::Op::OpTypeStruct) { uint32_t index = indices.at(i); Instruction* index_inst = context()->get_def_use_mgr()->GetDef(index); - assert(index_inst->opcode() == SpvOpConstant); + assert(index_inst->opcode() == spv::Op::OpConstant); uint64_t value = GetIndexValue(index_inst); is_coherent |= HasDecoration(element_inst, static_cast(value), - SpvDecorationCoherent); + spv::Decoration::Coherent); is_volatile |= HasDecoration(element_inst, static_cast(value), - SpvDecorationVolatile); + spv::Decoration::Volatile); element_inst = context()->get_def_use_mgr()->GetDef( element_inst->GetSingleWordInOperand(static_cast(value))); } else { @@ -457,13 +461,13 @@ std::pair UpgradeMemoryModel::CheckAllTypes( if (!visited.insert(def).second) continue; - if (def->opcode() == SpvOpTypeStruct) { + if (def->opcode() == spv::Op::OpTypeStruct) { // Any member decorated with coherent and/or volatile is enough to have // the related operation be flagged as coherent and/or volatile. is_coherent |= HasDecoration(def, std::numeric_limits::max(), - SpvDecorationCoherent); + spv::Decoration::Coherent); is_volatile |= HasDecoration(def, std::numeric_limits::max(), - SpvDecorationVolatile); + spv::Decoration::Volatile); if (is_coherent && is_volatile) return std::make_pair(is_coherent, is_volatile); @@ -475,7 +479,7 @@ std::pair UpgradeMemoryModel::CheckAllTypes( } else if (spvOpcodeIsComposite(def->opcode())) { stack.push_back(context()->get_def_use_mgr()->GetDef( def->GetSingleWordInOperand(0u))); - } else if (def->opcode() == SpvOpTypePointer) { + } else if (def->opcode() == spv::Op::OpTypePointer) { stack.push_back(context()->get_def_use_mgr()->GetDef( def->GetSingleWordInOperand(1u))); } @@ -504,14 +508,15 @@ uint64_t UpgradeMemoryModel::GetIndexValue(Instruction* index_inst) { } bool UpgradeMemoryModel::HasDecoration(const Instruction* inst, uint32_t value, - SpvDecoration decoration) { + spv::Decoration decoration) { // If the iteration was terminated early then an appropriate decoration was // found. return !context()->get_decoration_mgr()->WhileEachDecoration( - inst->result_id(), decoration, [value](const Instruction& i) { - if (i.opcode() == SpvOpDecorate || i.opcode() == SpvOpDecorateId) { + inst->result_id(), (uint32_t)decoration, [value](const Instruction& i) { + if (i.opcode() == spv::Op::OpDecorate || + i.opcode() == spv::Op::OpDecorateId) { return false; - } else if (i.opcode() == SpvOpMemberDecorate) { + } else if (i.opcode() == spv::Op::OpMemberDecorate) { if (value == i.GetSingleWordInOperand(1u) || value == std::numeric_limits::max()) return false; @@ -533,27 +538,27 @@ void UpgradeMemoryModel::UpgradeFlags(Instruction* inst, uint32_t in_operand, } if (is_coherent) { if (inst_type == kMemory) { - flags |= SpvMemoryAccessNonPrivatePointerKHRMask; + flags |= uint32_t(spv::MemoryAccessMask::NonPrivatePointerKHR); if (operation_type == kVisibility) { - flags |= SpvMemoryAccessMakePointerVisibleKHRMask; + flags |= uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR); } else { - flags |= SpvMemoryAccessMakePointerAvailableKHRMask; + flags |= uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR); } } else { - flags |= SpvImageOperandsNonPrivateTexelKHRMask; + flags |= uint32_t(spv::ImageOperandsMask::NonPrivateTexelKHR); if (operation_type == kVisibility) { - flags |= SpvImageOperandsMakeTexelVisibleKHRMask; + flags |= uint32_t(spv::ImageOperandsMask::MakeTexelVisibleKHR); } else { - flags |= SpvImageOperandsMakeTexelAvailableKHRMask; + flags |= uint32_t(spv::ImageOperandsMask::MakeTexelAvailableKHR); } } } if (is_volatile) { if (inst_type == kMemory) { - flags |= SpvMemoryAccessVolatileMask; + flags |= uint32_t(spv::MemoryAccessMask::Volatile); } else { - flags |= SpvImageOperandsVolatileTexelKHRMask; + flags |= uint32_t(spv::ImageOperandsMask::VolatileTexelKHR); } } @@ -566,7 +571,7 @@ void UpgradeMemoryModel::UpgradeFlags(Instruction* inst, uint32_t in_operand, } } -uint32_t UpgradeMemoryModel::GetScopeConstant(SpvScope scope) { +uint32_t UpgradeMemoryModel::GetScopeConstant(spv::Scope scope) { analysis::Integer int_ty(32, false); uint32_t int_id = context()->get_type_mgr()->GetTypeInstruction(&int_ty); const analysis::Constant* constant = @@ -587,15 +592,19 @@ void UpgradeMemoryModel::CleanupDecorations() { context()->get_decoration_mgr()->RemoveDecorationsFrom( inst->result_id(), [](const Instruction& dec) { switch (dec.opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - if (dec.GetSingleWordInOperand(1u) == SpvDecorationCoherent || - dec.GetSingleWordInOperand(1u) == SpvDecorationVolatile) + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + if (spv::Decoration(dec.GetSingleWordInOperand(1u)) == + spv::Decoration::Coherent || + spv::Decoration(dec.GetSingleWordInOperand(1u)) == + spv::Decoration::Volatile) return true; break; - case SpvOpMemberDecorate: - if (dec.GetSingleWordInOperand(2u) == SpvDecorationCoherent || - dec.GetSingleWordInOperand(2u) == SpvDecorationVolatile) + case spv::Op::OpMemberDecorate: + if (spv::Decoration(dec.GetSingleWordInOperand(2u)) == + spv::Decoration::Coherent || + spv::Decoration(dec.GetSingleWordInOperand(2u)) == + spv::Decoration::Volatile) return true; break; default: @@ -616,7 +625,7 @@ void UpgradeMemoryModel::UpgradeBarriers() { for (auto& block : *function) { block.ForEachInst([this, &barriers, &operates_on_output](Instruction* inst) { - if (inst->opcode() == SpvOpControlBarrier) { + if (inst->opcode() == spv::Op::OpControlBarrier) { barriers.push_back(inst); } else if (!operates_on_output) { // This instruction operates on output storage class if it is a @@ -625,7 +634,7 @@ void UpgradeMemoryModel::UpgradeBarriers() { analysis::Type* type = context()->get_type_mgr()->GetType(inst->type_id()); if (type && type->AsPointer() && - type->AsPointer()->storage_class() == SpvStorageClassOutput) { + type->AsPointer()->storage_class() == spv::StorageClass::Output) { operates_on_output = true; return; } @@ -635,7 +644,8 @@ void UpgradeMemoryModel::UpgradeBarriers() { analysis::Type* op_type = context()->get_type_mgr()->GetType(op_inst->type_id()); if (op_type && op_type->AsPointer() && - op_type->AsPointer()->storage_class() == SpvStorageClassOutput) + op_type->AsPointer()->storage_class() == + spv::StorageClass::Output) operates_on_output = true; }); } @@ -646,7 +656,8 @@ void UpgradeMemoryModel::UpgradeBarriers() { std::queue roots; for (auto& e : get_module()->entry_points()) - if (e.GetSingleWordInOperand(0u) == SpvExecutionModelTessellationControl) { + if (spv::ExecutionModel(e.GetSingleWordInOperand(0u)) == + spv::ExecutionModel::TessellationControl) { roots.push(e.GetSingleWordInOperand(1u)); if (context()->ProcessCallTreeFromRoots(CollectBarriers, &roots)) { for (auto barrier : barriers) { @@ -659,8 +670,9 @@ void UpgradeMemoryModel::UpgradeBarriers() { uint64_t semantics_value = GetIndexValue(semantics_inst); const analysis::Constant* constant = context()->get_constant_mgr()->GetConstant( - semantics_type, {static_cast(semantics_value) | - SpvMemorySemanticsOutputMemoryKHRMask}); + semantics_type, + {static_cast(semantics_value) | + uint32_t(spv::MemorySemanticsMask::OutputMemoryKHR)}); barrier->SetInOperand(2u, {context() ->get_constant_mgr() ->GetDefiningInstruction(constant) @@ -680,15 +692,15 @@ void UpgradeMemoryModel::UpgradeMemoryScope() { // * Workgroup ops (e.g. async_copy) have at most workgroup scope. if (spvOpcodeIsAtomicOp(inst->opcode())) { if (IsDeviceScope(inst->GetSingleWordInOperand(1))) { - inst->SetInOperand(1, {GetScopeConstant(SpvScopeQueueFamilyKHR)}); + inst->SetInOperand(1, {GetScopeConstant(spv::Scope::QueueFamilyKHR)}); } - } else if (inst->opcode() == SpvOpControlBarrier) { + } else if (inst->opcode() == spv::Op::OpControlBarrier) { if (IsDeviceScope(inst->GetSingleWordInOperand(1))) { - inst->SetInOperand(1, {GetScopeConstant(SpvScopeQueueFamilyKHR)}); + inst->SetInOperand(1, {GetScopeConstant(spv::Scope::QueueFamilyKHR)}); } - } else if (inst->opcode() == SpvOpMemoryBarrier) { + } else if (inst->opcode() == spv::Op::OpMemoryBarrier) { if (IsDeviceScope(inst->GetSingleWordInOperand(0))) { - inst->SetInOperand(0, {GetScopeConstant(SpvScopeQueueFamilyKHR)}); + inst->SetInOperand(0, {GetScopeConstant(spv::Scope::QueueFamilyKHR)}); } } }); @@ -704,14 +716,14 @@ bool UpgradeMemoryModel::IsDeviceScope(uint32_t scope_id) { assert(type->width() == 32 || type->width() == 64); if (type->width() == 32) { if (type->IsSigned()) - return static_cast(constant->GetS32()) == SpvScopeDevice; + return static_cast(constant->GetS32()) == spv::Scope::Device; else - return static_cast(constant->GetU32()) == SpvScopeDevice; + return static_cast(constant->GetU32()) == spv::Scope::Device; } else { if (type->IsSigned()) - return static_cast(constant->GetS64()) == SpvScopeDevice; + return static_cast(constant->GetS64()) == spv::Scope::Device; else - return static_cast(constant->GetU64()) == SpvScopeDevice; + return static_cast(constant->GetU64()) == spv::Scope::Device; } assert(false); @@ -758,9 +770,9 @@ void UpgradeMemoryModel::UpgradeExtInst(Instruction* ext_inst) { uint32_t UpgradeMemoryModel::MemoryAccessNumWords(uint32_t mask) { uint32_t result = 1; - if (mask & SpvMemoryAccessAlignedMask) ++result; - if (mask & SpvMemoryAccessMakePointerAvailableKHRMask) ++result; - if (mask & SpvMemoryAccessMakePointerVisibleKHRMask) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::Aligned)) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)) ++result; return result; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.h index f75304ed0..489436b6d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/upgrade_memory_model.h @@ -71,7 +71,7 @@ class UpgradeMemoryModel : public Pass { void UpgradeAtomics(); // Returns whether |id| is coherent and/or volatile. - std::tuple GetInstructionAttributes(uint32_t id); + std::tuple GetInstructionAttributes(uint32_t id); // Traces |inst| to determine if it is coherent and/or volatile. // |indices| tracks the access chain indices seen so far. @@ -84,7 +84,7 @@ class UpgradeMemoryModel : public Pass { // match the index or |value| must be a maximum allowable value. The max // value allows any element to match. bool HasDecoration(const Instruction* inst, uint32_t value, - SpvDecoration decoration); + spv::Decoration decoration); // Returns whether |type_id| indexed via |indices| is coherent and/or // volatile. @@ -108,7 +108,7 @@ class UpgradeMemoryModel : public Pass { bool is_volatile); // Returns the result id for a constant for |scope|. - uint32_t GetScopeConstant(SpvScope scope); + uint32_t GetScopeConstant(spv::Scope scope); // Returns the value of |index_inst|. |index_inst| must be an OpConstant of // integer type.g @@ -127,7 +127,7 @@ class UpgradeMemoryModel : public Pass { // scope. void UpgradeMemoryScope(); - // Returns true if |scope_id| is SpvScopeDevice. + // Returns true if |scope_id| is spv::Scope::Device. bool IsDeviceScope(uint32_t scope_id); // Upgrades GLSL.std.450 modf and frexp. Both instructions are replaced with diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/value_number_table.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/value_number_table.cpp index 5271e3fe9..743dc52bb 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/value_number_table.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/value_number_table.cpp @@ -57,9 +57,9 @@ uint32_t ValueNumberTable::AssignValueNumber(Instruction* inst) { } switch (inst->opcode()) { - case SpvOpSampledImage: - case SpvOpImage: - case SpvOpVariable: + case spv::Op::OpSampledImage: + case spv::Op::OpImage: + case spv::Op::OpVariable: value = TakeNextValueNumber(); id_to_value_[inst->result_id()] = value; return value; @@ -82,7 +82,7 @@ uint32_t ValueNumberTable::AssignValueNumber(Instruction* inst) { analysis::DecorationManager* dec_mgr = context()->get_decoration_mgr(); // When we copy an object, the value numbers should be the same. - if (inst->opcode() == SpvOpCopyObject && + if (inst->opcode() == spv::Op::OpCopyObject && dec_mgr->HaveTheSameDecorations(inst->result_id(), inst->GetSingleWordInOperand(0))) { value = GetValueNumber(inst->GetSingleWordInOperand(0)); @@ -94,7 +94,7 @@ uint32_t ValueNumberTable::AssignValueNumber(Instruction* inst) { // Phi nodes are a type of copy. If all of the inputs have the same value // number, then we can assign the result of the phi the same value number. - if (inst->opcode() == SpvOpPhi && inst->NumInOperands() > 0 && + if (inst->opcode() == spv::Op::OpPhi && inst->NumInOperands() > 0 && dec_mgr->HaveTheSameDecorations(inst->result_id(), inst->GetSingleWordInOperand(0))) { value = GetValueNumber(inst->GetSingleWordInOperand(0)); @@ -226,7 +226,7 @@ std::size_t ValueTableHash::operator()(const Instruction& inst) const { // instructions that are the same except for the result to hash to the // same value. std::u32string h; - h.push_back(inst.opcode()); + h.push_back(uint32_t(inst.opcode())); h.push_back(inst.type_id()); for (uint32_t i = 0; i < inst.NumInOperands(); ++i) { const auto& opnd = inst.GetInOperand(i); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.cpp index 28d94a076..1e8d255dd 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.cpp @@ -19,11 +19,9 @@ namespace spvtools { namespace opt { namespace { - -const uint32_t kExtractCompositeIdInIdx = 0; -const uint32_t kInsertObjectIdInIdx = 0; -const uint32_t kInsertCompositeIdInIdx = 1; - +constexpr uint32_t kExtractCompositeIdInIdx = 0; +constexpr uint32_t kInsertObjectIdInIdx = 0; +constexpr uint32_t kInsertCompositeIdInIdx = 1; } // namespace Pass::Status VectorDCE::Process() { @@ -68,17 +66,17 @@ void VectorDCE::FindLiveComponents(Function* function, Instruction* current_inst = current_item.instruction; switch (current_inst->opcode()) { - case SpvOpCompositeExtract: + case spv::Op::OpCompositeExtract: MarkExtractUseAsLive(current_inst, current_item.components, live_components, &work_list); break; - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: MarkInsertUsesAsLive(current_item, live_components, &work_list); break; - case SpvOpVectorShuffle: + case spv::Op::OpVectorShuffle: MarkVectorShuffleUsesAsLive(current_item, live_components, &work_list); break; - case SpvOpCompositeConstruct: + case spv::Op::OpCompositeConstruct: MarkCompositeContructUsesAsLive(current_item, live_components, &work_list); break; @@ -347,11 +345,11 @@ bool VectorDCE::RewriteInstructions( } switch (current_inst->opcode()) { - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: modified |= RewriteInsertInstruction( current_inst, live_component->second, &dead_dbg_value); break; - case SpvOpCompositeConstruct: + case spv::Op::OpCompositeConstruct: // TODO: The members that are not live can be replaced by an undef // or constant. This will remove uses of those values, and possibly // create opportunities for ADCE. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.h index 4d30b926b..a55bda692 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/vector_dce.h @@ -73,7 +73,7 @@ class VectorDCE : public MemPass { bool RewriteInstructions(Function* function, const LiveComponentMap& live_components); - // Makrs all DebugValue instructions that use |composite| for their values as + // Makes all DebugValue instructions that use |composite| for their values as // dead instructions by putting them into |dead_dbg_value|. void MarkDebugValueUsesAsDead(Instruction* composite, std::vector* dead_dbg_value); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/workaround1209.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/workaround1209.cpp index d6e9d2cf7..0cf954afd 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/workaround1209.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/workaround1209.cpp @@ -43,13 +43,13 @@ bool Workaround1209::RemoveOpUnreachableInLoops() { loop_merges.pop(); } - if (bb->tail()->opcode() == SpvOpUnreachable) { + if (bb->tail()->opcode() == spv::Op::OpUnreachable) { if (!loop_merges.empty()) { // We found an OpUnreachable inside a loop. // Replace it with an unconditional branch to the loop merge. context()->KillInst(&*bb->tail()); std::unique_ptr new_branch( - new Instruction(context(), SpvOpBranch, 0, 0, + new Instruction(context(), spv::Op::OpBranch, 0, 0, {{spv_operand_type_t::SPV_OPERAND_TYPE_ID, {loop_merges.top()}}})); context()->AnalyzeDefUse(&*new_branch); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.cpp index 51432a73b..c0c6d6221 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.cpp @@ -28,7 +28,8 @@ Pass::Status WrapOpKill::Process() { Function* func = context()->GetFunction(func_id); bool successful = func->WhileEachInst([this, &modified](Instruction* inst) { const auto opcode = inst->opcode(); - if ((opcode == SpvOpKill) || (opcode == SpvOpTerminateInvocation)) { + if ((opcode == spv::Op::OpKill) || + (opcode == spv::Op::OpTerminateInvocation)) { modified = true; if (!ReplaceWithFunctionCall(inst)) { return false; @@ -56,8 +57,8 @@ Pass::Status WrapOpKill::Process() { } bool WrapOpKill::ReplaceWithFunctionCall(Instruction* inst) { - assert((inst->opcode() == SpvOpKill || - inst->opcode() == SpvOpTerminateInvocation) && + assert((inst->opcode() == spv::Op::OpKill || + inst->opcode() == spv::Op::OpTerminateInvocation) && "|inst| must be an OpKill or OpTerminateInvocation instruction."); InstructionBuilder ir_builder( context(), inst, @@ -76,14 +77,15 @@ bool WrapOpKill::ReplaceWithFunctionCall(Instruction* inst) { Instruction* return_inst = nullptr; uint32_t return_type_id = GetOwningFunctionsReturnType(inst); if (return_type_id != GetVoidTypeId()) { - Instruction* undef = ir_builder.AddNullaryOp(return_type_id, SpvOpUndef); + Instruction* undef = + ir_builder.AddNullaryOp(return_type_id, spv::Op::OpUndef); if (undef == nullptr) { return false; } return_inst = - ir_builder.AddUnaryOp(0, SpvOpReturnValue, undef->result_id()); + ir_builder.AddUnaryOp(0, spv::Op::OpReturnValue, undef->result_id()); } else { - return_inst = ir_builder.AddNullaryOp(0, SpvOpReturn); + return_inst = ir_builder.AddNullaryOp(0, spv::Op::OpReturn); } if (return_inst == nullptr) { @@ -115,13 +117,13 @@ uint32_t WrapOpKill::GetVoidFunctionTypeId() { return type_mgr->GetTypeInstruction(&func_type); } -uint32_t WrapOpKill::GetKillingFuncId(SpvOp opcode) { +uint32_t WrapOpKill::GetKillingFuncId(spv::Op opcode) { // Parameterize by opcode - assert(opcode == SpvOpKill || opcode == SpvOpTerminateInvocation); + assert(opcode == spv::Op::OpKill || opcode == spv::Op::OpTerminateInvocation); std::unique_ptr* const killing_func = - (opcode == SpvOpKill) ? &opkill_function_ - : &opterminateinvocation_function_; + (opcode == spv::Op::OpKill) ? &opkill_function_ + : &opterminateinvocation_function_; if (*killing_func != nullptr) { return (*killing_func)->result_id(); @@ -139,14 +141,14 @@ uint32_t WrapOpKill::GetKillingFuncId(SpvOp opcode) { // Generate the function start instruction std::unique_ptr func_start(new Instruction( - context(), SpvOpFunction, void_type_id, killing_func_id, {})); + context(), spv::Op::OpFunction, void_type_id, killing_func_id, {})); func_start->AddOperand({SPV_OPERAND_TYPE_FUNCTION_CONTROL, {0}}); func_start->AddOperand({SPV_OPERAND_TYPE_ID, {GetVoidFunctionTypeId()}}); (*killing_func).reset(new Function(std::move(func_start))); // Generate the function end instruction std::unique_ptr func_end( - new Instruction(context(), SpvOpFunctionEnd, 0, 0, {})); + new Instruction(context(), spv::Op::OpFunctionEnd, 0, 0, {})); (*killing_func)->SetFunctionEnd(std::move(func_end)); // Create the one basic block for the function. @@ -155,7 +157,7 @@ uint32_t WrapOpKill::GetKillingFuncId(SpvOp opcode) { return 0; } std::unique_ptr label_inst( - new Instruction(context(), SpvOpLabel, 0, lab_id, {})); + new Instruction(context(), spv::Op::OpLabel, 0, lab_id, {})); std::unique_ptr bb(new BasicBlock(std::move(label_inst))); // Add the OpKill to the basic block diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.h index 7e43ca6cd..c9eb88877 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/opt/wrap_opkill.h @@ -53,7 +53,7 @@ class WrapOpKill : public Pass { // Return the id of a function that has return type void, has no parameters, // and contains a single instruction, which is |opcode|, either OpKill or // OpTerminateInvocation. Returns 0 if the function could not be generated. - uint32_t GetKillingFuncId(SpvOp opcode); + uint32_t GetKillingFuncId(spv::Op opcode); // Returns the id of the return type for the function that contains |inst|. // Returns 0 if |inst| is not in a function. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/parsed_operand.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/parsed_operand.cpp index 7ad369cdb..cc33f8ba2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/parsed_operand.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/parsed_operand.cpp @@ -24,7 +24,10 @@ namespace spvtools { void EmitNumericLiteral(std::ostream* out, const spv_parsed_instruction_t& inst, const spv_parsed_operand_t& operand) { if (operand.type != SPV_OPERAND_TYPE_LITERAL_INTEGER && - operand.type != SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER) + operand.type != SPV_OPERAND_TYPE_LITERAL_FLOAT && + operand.type != SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER && + operand.type != SPV_OPERAND_TYPE_OPTIONAL_LITERAL_INTEGER && + operand.type != SPV_OPERAND_TYPE_OPTIONAL_TYPED_LITERAL_INTEGER) return; if (operand.num_words < 1) return; // TODO(dneto): Support more than 64-bits at a time. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/print.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/print.cpp index 2418c5bc9..f36812ef5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/print.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/print.cpp @@ -16,7 +16,8 @@ #if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \ defined(SPIRV_IOS) || defined(SPIRV_TVOS) || defined(SPIRV_FREEBSD) || \ - defined(SPIRV_EMSCRIPTEN) || defined(SPIRV_FUCHSIA) + defined(SPIRV_OPENBSD) || defined(SPIRV_EMSCRIPTEN) || \ + defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU) || defined(SPIRV_QNX) namespace spvtools { clr::reset::operator const char*() { return "\x1b[0m"; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/CMakeLists.txt b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/CMakeLists.txt index 6fd8409f6..9ebe4183e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/CMakeLists.txt +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/CMakeLists.txt @@ -101,10 +101,7 @@ set_property(TARGET SPIRV-Tools-reduce PROPERTY FOLDER "SPIRV-Tools libraries") spvtools_check_symbol_exports(SPIRV-Tools-reduce) if(ENABLE_SPIRV_TOOLS_INSTALL) - install(TARGETS SPIRV-Tools-reduce EXPORT SPIRV-Tools-reduceTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS SPIRV-Tools-reduce EXPORT SPIRV-Tools-reduceTargets) export(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTarget.cmake) spvtools_config_package_dir(SPIRV-Tools-reduce PACKAGE_DIR) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp index 2cd779a26..93b51a11f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/conditional_branch_to_simple_conditional_branch_opportunity_finder.cpp @@ -36,9 +36,9 @@ ConditionalBranchToSimpleConditionalBranchOpportunityFinder:: for (auto* function : GetTargetFunctions(context, target_function)) { // Consider every block in the function. for (auto& block : *function) { - // The terminator must be SpvOpBranchConditional. + // The terminator must be spv::Op::OpBranchConditional. opt::Instruction* terminator = block.terminator(); - if (terminator->opcode() != SpvOpBranchConditional) { + if (terminator->opcode() != spv::Op::OpBranchConditional) { continue; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/merge_blocks_reduction_opportunity.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/merge_blocks_reduction_opportunity.cpp index a2c3b40a0..e626d60ba 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/merge_blocks_reduction_opportunity.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/merge_blocks_reduction_opportunity.cpp @@ -23,7 +23,7 @@ namespace reduce { MergeBlocksReductionOpportunity::MergeBlocksReductionOpportunity( opt::IRContext* context, opt::Function* function, opt::BasicBlock* block) { // Precondition: the terminator has to be OpBranch. - assert(block->terminator()->opcode() == SpvOpBranch); + assert(block->terminator()->opcode() == spv::Op::OpBranch); context_ = context; function_ = function; // Get the successor block associated with the OpBranch. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_const_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_const_reduction_opportunity_finder.cpp index eb7498ad1..c6196f367 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_const_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_const_reduction_opportunity_finder.cpp @@ -50,7 +50,7 @@ OperandToConstReductionOpportunityFinder::GetAvailableOpportunities( // The argument is already a constant. continue; } - if (def->opcode() == SpvOpFunction) { + if (def->opcode() == spv::Op::OpFunction) { // The argument refers to a function, e.g. the function called // by OpFunctionCall; avoid replacing this with a constant of // the function's return type. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_undef_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_undef_reduction_opportunity_finder.cpp index 06bf9550a..c7bc12135 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_undef_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/operand_to_undef_reduction_opportunity_finder.cpp @@ -32,7 +32,7 @@ OperandToUndefReductionOpportunityFinder::GetAvailableOpportunities( auto type_id = inst.type_id(); if (type_id) { auto type_id_def = context->get_def_use_mgr()->GetDef(type_id); - if (type_id_def->opcode() == SpvOpTypePointer) { + if (type_id_def->opcode() == spv::Op::OpTypePointer) { continue; } } @@ -57,7 +57,7 @@ OperandToUndefReductionOpportunityFinder::GetAvailableOpportunities( } // Don't replace function operands with undef. - if (operand_id_def->opcode() == SpvOpFunction) { + if (operand_id_def->opcode() == spv::Op::OpFunction) { continue; } @@ -68,7 +68,7 @@ OperandToUndefReductionOpportunityFinder::GetAvailableOpportunities( context->get_def_use_mgr()->GetDef(operand_type_id); // Skip pointer operands. - if (operand_type_id_def->opcode() == SpvOpTypePointer) { + if (operand_type_id_def->opcode() == spv::Op::OpTypePointer) { continue; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/reduction_util.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/reduction_util.cpp index 511f43236..c9882d5e9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/reduction_util.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/reduction_util.cpp @@ -26,7 +26,7 @@ const uint32_t kFalseBranchOperandIndex = 2; uint32_t FindOrCreateGlobalVariable(opt::IRContext* context, uint32_t pointer_type_id) { for (auto& inst : context->module()->types_values()) { - if (inst.opcode() != SpvOpVariable) { + if (inst.opcode() != spv::Op::OpVariable) { continue; } if (inst.type_id() == pointer_type_id) { @@ -35,7 +35,7 @@ uint32_t FindOrCreateGlobalVariable(opt::IRContext* context, } const uint32_t variable_id = context->TakeNextId(); auto variable_inst = MakeUnique( - context, SpvOpVariable, pointer_type_id, variable_id, + context, spv::Op::OpVariable, pointer_type_id, variable_id, opt::Instruction::OperandList( {{SPV_OPERAND_TYPE_STORAGE_CLASS, {static_cast(context->get_type_mgr() @@ -53,7 +53,7 @@ uint32_t FindOrCreateFunctionVariable(opt::IRContext* context, assert(context->get_type_mgr() ->GetType(pointer_type_id) ->AsPointer() - ->storage_class() == SpvStorageClassFunction); + ->storage_class() == spv::StorageClass::Function); // Go through the instructions in the function's first block until we find a // suitable variable, or go past all the variables. @@ -62,7 +62,7 @@ uint32_t FindOrCreateFunctionVariable(opt::IRContext* context, // We will either find a suitable variable, or find a non-variable // instruction; we won't exhaust all instructions. assert(iter != function->begin()->end()); - if (iter->opcode() != SpvOpVariable) { + if (iter->opcode() != spv::Op::OpVariable) { // If we see a non-variable, we have gone through all the variables. break; } @@ -74,16 +74,17 @@ uint32_t FindOrCreateFunctionVariable(opt::IRContext* context, // function's entry block. const uint32_t variable_id = context->TakeNextId(); auto variable_inst = MakeUnique( - context, SpvOpVariable, pointer_type_id, variable_id, + context, spv::Op::OpVariable, pointer_type_id, variable_id, opt::Instruction::OperandList( - {{SPV_OPERAND_TYPE_STORAGE_CLASS, {SpvStorageClassFunction}}})); + {{SPV_OPERAND_TYPE_STORAGE_CLASS, + {uint32_t(spv::StorageClass::Function)}}})); iter->InsertBefore(std::move(variable_inst)); return variable_id; } uint32_t FindOrCreateGlobalUndef(opt::IRContext* context, uint32_t type_id) { for (auto& inst : context->module()->types_values()) { - if (inst.opcode() != SpvOpUndef) { + if (inst.opcode() != spv::Op::OpUndef) { continue; } if (inst.type_id() == type_id) { @@ -91,8 +92,9 @@ uint32_t FindOrCreateGlobalUndef(opt::IRContext* context, uint32_t type_id) { } } const uint32_t undef_id = context->TakeNextId(); - auto undef_inst = MakeUnique( - context, SpvOpUndef, type_id, undef_id, opt::Instruction::OperandList()); + auto undef_inst = + MakeUnique(context, spv::Op::OpUndef, type_id, undef_id, + opt::Instruction::OperandList()); assert(undef_id == undef_inst->result_id()); context->module()->AddGlobalValue(std::move(undef_inst)); return undef_id; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_selection_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_selection_reduction_opportunity_finder.cpp index 74df1b8db..6abadf2a8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_selection_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_selection_reduction_opportunity_finder.cpp @@ -36,7 +36,7 @@ RemoveSelectionReductionOpportunityFinder::GetAvailableOpportunities( for (auto* function : GetTargetFunctions(context, target_function)) { for (auto& block : *function) { if (auto merge_instruction = block.GetMergeInst()) { - if (merge_instruction->opcode() == SpvOpLoopMerge) { + if (merge_instruction->opcode() == spv::Op::OpLoopMerge) { uint32_t merge_block_id = merge_instruction->GetSingleWordOperand(kMergeNodeIndex); uint32_t continue_block_id = @@ -54,7 +54,7 @@ RemoveSelectionReductionOpportunityFinder::GetAvailableOpportunities( for (auto& function : *context->module()) { for (auto& block : function) { if (auto merge_instruction = block.GetMergeInst()) { - if (merge_instruction->opcode() == SpvOpSelectionMerge) { + if (merge_instruction->opcode() == spv::Op::OpSelectionMerge) { if (CanOpSelectionMergeBeRemoved( context, block, merge_instruction, merge_and_continue_blocks_from_loops)) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_struct_member_reduction_opportunity.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_struct_member_reduction_opportunity.cpp index da096e1eb..3309fd099 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_struct_member_reduction_opportunity.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_struct_member_reduction_opportunity.cpp @@ -36,14 +36,14 @@ void RemoveStructMemberReductionOpportunity::Apply() { struct_type_, [this, &decorations_to_kill](opt::Instruction* user, uint32_t /*operand_index*/) { switch (user->opcode()) { - case SpvOpCompositeConstruct: - case SpvOpConstantComposite: + case spv::Op::OpCompositeConstruct: + case spv::Op::OpConstantComposite: // This use is constructing a composite of the struct type, so we // must remove the id that was provided for the member we are // removing. user->RemoveInOperand(member_index_); break; - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: // This use is decorating a member of the struct. if (user->GetSingleWordInOperand(1) == member_index_) { // The member we are removing is being decorated, so we record @@ -78,8 +78,8 @@ void RemoveStructMemberReductionOpportunity::Apply() { for (auto& block : function) { for (auto& inst : block) { switch (inst.opcode()) { - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: { + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: { // These access chain instructions take sequences of ids for // indexing, starting from input operand 1. auto composite_type_id = @@ -90,8 +90,8 @@ void RemoveStructMemberReductionOpportunity::Apply() { ->GetSingleWordInOperand(1); AdjustAccessedIndices(composite_type_id, 1, false, context, &inst); } break; - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: { + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: { // These access chain instructions take sequences of ids for // indexing, starting from input operand 2. auto composite_type_id = @@ -102,7 +102,7 @@ void RemoveStructMemberReductionOpportunity::Apply() { ->GetSingleWordInOperand(1); AdjustAccessedIndices(composite_type_id, 2, false, context, &inst); } break; - case SpvOpCompositeExtract: { + case spv::Op::OpCompositeExtract: { // OpCompositeExtract uses literals for indexing, starting at input // operand 1. auto composite_type_id = @@ -111,7 +111,7 @@ void RemoveStructMemberReductionOpportunity::Apply() { ->type_id(); AdjustAccessedIndices(composite_type_id, 1, true, context, &inst); } break; - case SpvOpCompositeInsert: { + case spv::Op::OpCompositeInsert: { // OpCompositeInsert uses literals for indexing, starting at input // operand 2. auto composite_type_id = @@ -146,14 +146,14 @@ void RemoveStructMemberReductionOpportunity::AdjustAccessedIndices( i < composite_access_instruction->NumInOperands(); i++) { auto type_inst = context->get_def_use_mgr()->GetDef(next_type); switch (type_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeMatrix: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: next_type = type_inst->GetSingleWordInOperand(0); break; - case SpvOpTypeStruct: { - // Struct types are special becuase (a) we may need to adjust the index + case spv::Op::OpTypeStruct: { + // Struct types are special because (a) we may need to adjust the index // being used, if the struct type is the one from which we are removing // a member, and (b) the type encountered by following the current index // is dependent on the value of the index. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp index d7bb3a82e..fbbeb3462 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_instruction_reduction_opportunity_finder.cpp @@ -103,8 +103,8 @@ RemoveUnusedInstructionReductionOpportunityFinder::GetAvailableOpportunities( continue; } if (spvOpcodeIsBlockTerminator(inst.opcode()) || - inst.opcode() == SpvOpSelectionMerge || - inst.opcode() == SpvOpLoopMerge) { + inst.opcode() == spv::Op::OpSelectionMerge || + inst.opcode() == spv::Op::OpLoopMerge) { // In this reduction pass we do not want to affect static // control flow. continue; @@ -133,7 +133,7 @@ bool RemoveUnusedInstructionReductionOpportunityFinder:: &inst, [this](opt::Instruction* user, uint32_t use_index) -> bool { return (user->IsDecoration() && !IsIndependentlyRemovableDecoration(*user)) || - (user->opcode() == SpvOpEntryPoint && use_index > 2); + (user->opcode() == spv::Op::OpEntryPoint && use_index > 2); }); } @@ -141,13 +141,13 @@ bool RemoveUnusedInstructionReductionOpportunityFinder:: IsIndependentlyRemovableDecoration(const opt::Instruction& inst) const { uint32_t decoration; switch (inst.opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpDecorateString: + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateString: decoration = inst.GetSingleWordInOperand(1u); break; - case SpvOpMemberDecorate: - case SpvOpMemberDecorateString: + case spv::Op::OpMemberDecorate: + case spv::Op::OpMemberDecorateString: decoration = inst.GetSingleWordInOperand(2u); break; default: @@ -160,12 +160,12 @@ bool RemoveUnusedInstructionReductionOpportunityFinder:: // not change the shader interface, will not make the shader invalid, will // actually be found in practice, etc. - switch (decoration) { - case SpvDecorationRelaxedPrecision: - case SpvDecorationNoSignedWrap: - case SpvDecorationNoContraction: - case SpvDecorationNoUnsignedWrap: - case SpvDecorationUserSemantic: + switch (spv::Decoration(decoration)) { + case spv::Decoration::RelaxedPrecision: + case spv::Decoration::NoSignedWrap: + case spv::Decoration::NoContraction: + case spv::Decoration::NoUnsignedWrap: + case spv::Decoration::UserSemantic: return true; default: return false; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp index e72be625e..db381e0f0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/remove_unused_struct_member_reduction_opportunity_finder.cpp @@ -43,7 +43,7 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( // Consider every struct type in the module. for (auto& type_or_value : context->types_values()) { - if (type_or_value.opcode() != SpvOpTypeStruct) { + if (type_or_value.opcode() != spv::Op::OpTypeStruct) { continue; } @@ -60,7 +60,7 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( &type_or_value, [&unused_members](opt::Instruction* user, uint32_t /*operand_index*/) { switch (user->opcode()) { - case SpvOpMemberName: + case spv::Op::OpMemberName: unused_members.erase(user->GetSingleWordInOperand(1)); break; default: @@ -91,8 +91,8 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( // The way the helper is invoked depends on whether the instruction // uses literal or id indices, and the offset into the instruction's // input operands from which index operands are provided. - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: { + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: { auto composite_type_id = context->get_def_use_mgr() ->GetDef(context->get_def_use_mgr() @@ -102,8 +102,8 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( MarkAccessedMembersAsUsed(context, composite_type_id, 1, false, inst, &unused_member_to_structs); } break; - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: { + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: { auto composite_type_id = context->get_def_use_mgr() ->GetDef(context->get_def_use_mgr() @@ -113,7 +113,7 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( MarkAccessedMembersAsUsed(context, composite_type_id, 2, false, inst, &unused_member_to_structs); } break; - case SpvOpCompositeExtract: { + case spv::Op::OpCompositeExtract: { auto composite_type_id = context->get_def_use_mgr() ->GetDef(inst.GetSingleWordInOperand(0)) @@ -121,7 +121,7 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( MarkAccessedMembersAsUsed(context, composite_type_id, 1, true, inst, &unused_member_to_structs); } break; - case SpvOpCompositeInsert: { + case spv::Op::OpCompositeInsert: { auto composite_type_id = context->get_def_use_mgr() ->GetDef(inst.GetSingleWordInOperand(1)) @@ -136,9 +136,9 @@ RemoveUnusedStructMemberReductionOpportunityFinder::GetAvailableOpportunities( } } - // We now know those struct indices that are unsed, and we make a reduction + // We now know those struct indices that are unused, and we make a reduction // opportunity for each of them. By mapping each relevant member index to the - // structs in which it is unsed, we will group all opportunities to remove + // structs in which it is unused, we will group all opportunities to remove // member k of a struct (for some k) together. This reduces the likelihood // that opportunities to remove members from the same struct will be adjacent, // which is good because such opportunities mutually disable one another. @@ -163,13 +163,13 @@ void RemoveUnusedStructMemberReductionOpportunityFinder:: i < composite_access_instruction.NumInOperands(); i++) { auto type_inst = context->get_def_use_mgr()->GetDef(next_type); switch (type_inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeMatrix: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: next_type = type_inst->GetSingleWordInOperand(0); break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { uint32_t index_operand = composite_access_instruction.GetSingleWordInOperand(i); uint32_t member = literal_indices ? index_operand diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp index d867c3ad9..9637f0f16 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_opportunity_finder.cpp @@ -29,15 +29,15 @@ SimpleConditionalBranchToBranchOpportunityFinder::GetAvailableOpportunities( for (auto* function : GetTargetFunctions(context, target_function)) { // Consider every block in the function. for (auto& block : *function) { - // The terminator must be SpvOpBranchConditional. + // The terminator must be spv::Op::OpBranchConditional. opt::Instruction* terminator = block.terminator(); - if (terminator->opcode() != SpvOpBranchConditional) { + if (terminator->opcode() != spv::Op::OpBranchConditional) { continue; } // It must not be a selection header, as these cannot be followed by // OpBranch. if (block.GetMergeInst() && - block.GetMergeInst()->opcode() == SpvOpSelectionMerge) { + block.GetMergeInst()->opcode() == spv::Op::OpSelectionMerge) { continue; } // The conditional branch must be simplified. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp index a2be0c4d9..6d772b594 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/simple_conditional_branch_to_branch_reduction_opportunity.cpp @@ -31,7 +31,8 @@ bool SimpleConditionalBranchToBranchReductionOpportunity::PreconditionHolds() { } void SimpleConditionalBranchToBranchReductionOpportunity::Apply() { - assert(conditional_branch_instruction_->opcode() == SpvOpBranchConditional && + assert(conditional_branch_instruction_->opcode() == + spv::Op::OpBranchConditional && "SimpleConditionalBranchToBranchReductionOpportunity: branch was not " "a conditional branch"); @@ -46,7 +47,7 @@ void SimpleConditionalBranchToBranchReductionOpportunity::Apply() { // -> // OpBranch %block_id - conditional_branch_instruction_->SetOpcode(SpvOpBranch); + conditional_branch_instruction_->SetOpcode(spv::Op::OpBranch); conditional_branch_instruction_->ReplaceOperands( {{SPV_OPERAND_TYPE_ID, {conditional_branch_instruction_->GetSingleWordInOperand( diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity.cpp index ed738411a..cc5ffe3ca 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity.cpp @@ -55,7 +55,7 @@ void StructuredConstructToBlockReductionOpportunity::Apply() { // The terminator for the header block is changed to be an unconditional // branch to the merge block. - header_block->terminator()->SetOpcode(SpvOpBranch); + header_block->terminator()->SetOpcode(spv::Op::OpBranch); header_block->terminator()->SetInOperands( {{SPV_OPERAND_TYPE_ID, {merge_block->id()}}}); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp index dc20f689b..29fbe551a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_construct_to_block_reduction_opportunity_finder.cpp @@ -96,7 +96,7 @@ StructuredConstructToBlockReductionOpportunityFinder::GetAvailableOpportunities( // This also means that we don't add a region. continue; } - // We have a reachable header block with a rechable merge that + // We have a reachable header block with a reachable merge that // postdominates the header: this means we have a new region. regions.emplace(&block, std::unordered_set()); } @@ -128,7 +128,7 @@ bool StructuredConstructToBlockReductionOpportunityFinder:: if (!block->WhileEachInst( [context, &header, ®ion](opt::Instruction* inst) -> bool { if (inst->result_id() == 0) { - // The instruction does not genreate a result id, thus it cannot + // The instruction does not generate a result id, thus it cannot // be referred to outside the region - this is fine. return true; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity.cpp index 850af4566..45b95285e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/reduce/structured_loop_to_selection_reduction_opportunity.cpp @@ -129,12 +129,12 @@ void StructuredLoopToSelectionReductionOpportunity::RedirectEdge( // Figure out which operands of the terminator need to be considered for // redirection. std::vector operand_indices; - if (terminator->opcode() == SpvOpBranch) { + if (terminator->opcode() == spv::Op::OpBranch) { operand_indices = {0}; - } else if (terminator->opcode() == SpvOpBranchConditional) { + } else if (terminator->opcode() == spv::Op::OpBranchConditional) { operand_indices = {1, 2}; } else { - assert(terminator->opcode() == SpvOpSwitch); + assert(terminator->opcode() == spv::Op::OpSwitch); for (uint32_t label_index = 1; label_index < terminator->NumOperands(); label_index += 2) { operand_indices.push_back(label_index); @@ -179,18 +179,19 @@ void StructuredLoopToSelectionReductionOpportunity::ChangeLoopToSelection() { auto loop_merge_inst = loop_construct_header_->GetLoopMergeInst(); auto const loop_merge_block_id = loop_merge_inst->GetSingleWordOperand(kMergeNodeIndex); - loop_merge_inst->SetOpcode(SpvOpSelectionMerge); + loop_merge_inst->SetOpcode(spv::Op::OpSelectionMerge); loop_merge_inst->ReplaceOperands( {{loop_merge_inst->GetOperand(kMergeNodeIndex).type, {loop_merge_block_id}}, - {SPV_OPERAND_TYPE_SELECTION_CONTROL, {SpvSelectionControlMaskNone}}}); + {SPV_OPERAND_TYPE_SELECTION_CONTROL, + {uint32_t(spv::SelectionControlMask::MaskNone)}}}); // The loop header either finishes with OpBranch or OpBranchConditional. // The latter is fine for a selection. In the former case we need to turn // it into OpBranchConditional. We use "true" as the condition, and make // the "else" branch be the merge block. auto terminator = loop_construct_header_->terminator(); - if (terminator->opcode() == SpvOpBranch) { + if (terminator->opcode() == spv::Op::OpBranch) { opt::analysis::Bool temp; const opt::analysis::Bool* bool_type = context_->get_type_mgr()->GetRegisteredType(&temp)->AsBool(); @@ -199,7 +200,7 @@ void StructuredLoopToSelectionReductionOpportunity::ChangeLoopToSelection() { auto true_const_result_id = const_mgr->GetDefiningInstruction(true_const)->result_id(); auto original_branch_id = terminator->GetSingleWordOperand(0); - terminator->SetOpcode(SpvOpBranchConditional); + terminator->SetOpcode(spv::Op::OpBranchConditional); terminator->ReplaceOperands({{SPV_OPERAND_TYPE_ID, {true_const_result_id}}, {SPV_OPERAND_TYPE_ID, {original_branch_id}}, {SPV_OPERAND_TYPE_ID, {loop_merge_block_id}}}); @@ -215,7 +216,7 @@ void StructuredLoopToSelectionReductionOpportunity::FixNonDominatedIdUses() { // Consider each instruction in the function. for (auto& block : *loop_construct_header_->GetParent()) { for (auto& def : block) { - if (def.opcode() == SpvOpVariable) { + if (def.opcode() == spv::Op::OpVariable) { // Variables are defined at the start of the function, and can be // accessed by all blocks, even by unreachable blocks that have no // dominators, so we do not need to worry about them. @@ -233,11 +234,11 @@ void StructuredLoopToSelectionReductionOpportunity::FixNonDominatedIdUses() { // access chain, in which case replace it with some (possibly fresh) // variable (as we cannot load from / store to OpUndef). if (!DefinitionSufficientlyDominatesUse(&def, use, index, block)) { - if (def.opcode() == SpvOpAccessChain) { + if (def.opcode() == spv::Op::OpAccessChain) { auto pointer_type = context_->get_type_mgr()->GetType(def.type_id())->AsPointer(); switch (pointer_type->storage_class()) { - case SpvStorageClassFunction: + case spv::StorageClass::Function: use->SetOperand( index, {FindOrCreateFunctionVariable( context_, loop_construct_header_->GetParent(), @@ -270,7 +271,7 @@ bool StructuredLoopToSelectionReductionOpportunity:: opt::Instruction* use, uint32_t use_index, opt::BasicBlock& def_block) { - if (use->opcode() == SpvOpPhi) { + if (use->opcode() == spv::Op::OpPhi) { // A use in a phi doesn't need to be dominated by its definition, but the // associated parent block does need to be dominated by the definition. return context_->GetDominatorAnalysis(loop_construct_header_->GetParent()) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_definition.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_definition.h index 63a4ef0db..5dbd6ab20 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_definition.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_definition.h @@ -27,7 +27,7 @@ typedef struct spv_header_t { uint32_t generator; uint32_t bound; uint32_t schema; // NOTE: Reserved - const uint32_t* instructions; // NOTE: Unfixed pointer to instruciton stream + const uint32_t* instructions; // NOTE: Unfixed pointer to instruction stream } spv_header_t; #endif // SOURCE_SPIRV_DEFINITION_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_endian.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_endian.h index c2540bec9..b4927f318 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_endian.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_endian.h @@ -31,7 +31,7 @@ uint64_t spvFixDoubleWord(const uint32_t low, const uint32_t high, spv_result_t spvBinaryEndianness(const spv_const_binary binary, spv_endianness_t* endian); -// Returns true if the given endianness matches the host's native endiannes. +// Returns true if the given endianness matches the host's native endianness. bool spvIsHostEndian(spv_endianness_t endian); #endif // SOURCE_SPIRV_ENDIAN_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.cpp index 9a0381742..585f8b65a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include "source/spirv_constant.h" #include "spirv-tools/libspirv.h" diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.h index cc06deca7..f3b0c2f6f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_target_env.h @@ -40,7 +40,7 @@ std::string spvLogStringForEnv(spv_target_env env); // Returns a formatted list of all SPIR-V target environment names that // can be parsed by spvParseTargetEnv. -// |pad| is the number of space characters that the begining of each line +// |pad| is the number of space characters that the beginning of each line // except the first one will be padded with. // |wrap| is the max length of lines the user desires. Word-wrapping will // occur to satisfy this limit. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.cpp index e5b1eece0..b72a64460 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.cpp @@ -125,3 +125,8 @@ void spvValidatorOptionsSetAllowLocalSizeId(spv_validator_options options, bool val) { options->allow_localsizeid = val; } + +void spvValidatorOptionsSetFriendlyNames(spv_validator_options options, + bool val) { + options->use_friendly_names = val; +} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.h index a357c031b..01450480c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/spirv_validator_options.h @@ -48,7 +48,8 @@ struct spv_validator_options_t { workgroup_scalar_block_layout(false), skip_block_layout(false), allow_localsizeid(false), - before_hlsl_legalization(false) {} + before_hlsl_legalization(false), + use_friendly_names(true) {} validator_universal_limits_t universal_limits_; bool relax_struct_store; @@ -60,6 +61,7 @@ struct spv_validator_options_t { bool skip_block_layout; bool allow_localsizeid; bool before_hlsl_legalization; + bool use_friendly_names; }; #endif // SOURCE_SPIRV_VALIDATOR_OPTIONS_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/table.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/table.h index 5adf04a4c..4f1dc1f84 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/table.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/table.h @@ -21,9 +21,9 @@ typedef struct spv_opcode_desc_t { const char* name; - const SpvOp opcode; + const spv::Op opcode; const uint32_t numCapabilities; - const SpvCapability* capabilities; + const spv::Capability* capabilities; // operandTypes[0..numTypes-1] describe logical operands for the instruction. // The operand types include result id and result-type id, followed by // the types of arguments. @@ -48,7 +48,7 @@ typedef struct spv_operand_desc_t { const char* name; const uint32_t value; const uint32_t numCapabilities; - const SpvCapability* capabilities; + const spv::Capability* capabilities; // A set of extensions that enable this feature. If empty then this operand // value is in core and its availability is subject to minVersion. The // assembler, binary parser, and disassembler ignore this rule, so you can @@ -73,8 +73,8 @@ typedef struct spv_ext_inst_desc_t { const char* name; const uint32_t ext_inst; const uint32_t numCapabilities; - const SpvCapability* capabilities; - const spv_operand_type_t operandTypes[16]; // TODO: Smaller/larger? + const spv::Capability* capabilities; + const spv_operand_type_t operandTypes[40]; // vksp needs at least 40 } spv_ext_inst_desc_t; typedef struct spv_ext_inst_group_t { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/text.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/text.cpp index 415c059d4..263bacd7b 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/text.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/text.cpp @@ -227,7 +227,8 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, // Set the extended instruction type. // The import set id is the 3rd operand of OpExtInst. - if (pInst->opcode == SpvOpExtInst && pInst->words.size() == 4) { + if (spv::Op(pInst->opcode) == spv::Op::OpExtInst && + pInst->words.size() == 4) { auto ext_inst_type = context->getExtInstTypeForId(pInst->words[3]); if (ext_inst_type == SPV_EXT_INST_TYPE_NONE) { return context->diagnostic() @@ -279,7 +280,7 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, // The assembler accepts the symbolic name for the opcode, but without // the "Op" prefix. For example, "IAdd" is accepted. The number // of the opcode is emitted. - SpvOp opcode; + spv::Op opcode; if (grammar.lookupSpecConstantOpcode(textValue, &opcode)) { return context->diagnostic() << "Invalid " << spvOperandTypeStr(type) << " '" << textValue << "'."; @@ -311,6 +312,17 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, } } break; + case SPV_OPERAND_TYPE_LITERAL_FLOAT: { + // The current operand is a 32-bit float. + // That's just how the grammar works. + spvtools::IdType expected_type = { + 32, false, spvtools::IdTypeClass::kScalarFloatType}; + if (auto error = context->binaryEncodeNumericLiteral( + textValue, error_code_for_literals, expected_type, pInst)) { + return error; + } + } break; + case SPV_OPERAND_TYPE_OPTIONAL_LITERAL_NUMBER: // This is a context-independent literal number which can be a 32-bit // number of floating point value. @@ -327,8 +339,8 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, // The encoding for OpConstant, OpSpecConstant and OpSwitch all // depend on either their own result-id or the result-id of // one of their parameters. - if (SpvOpConstant == pInst->opcode || - SpvOpSpecConstant == pInst->opcode) { + if (spv::Op::OpConstant == pInst->opcode || + spv::Op::OpSpecConstant == pInst->opcode) { // The type of the literal is determined by the type Id of the // instruction. expected_type = @@ -344,7 +356,7 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, << "Type for " << opcode_name << " must be a scalar floating point or integer type"; } - } else if (pInst->opcode == SpvOpSwitch) { + } else if (pInst->opcode == spv::Op::OpSwitch) { // The type of the literal is the same as the type of the selector. expected_type = context->getTypeOfValueInstruction(pInst->words[1]); if (!spvtools::isScalarIntegral(expected_type)) { @@ -375,7 +387,7 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, } // NOTE: Special case for extended instruction library import - if (SpvOpExtInstImport == pInst->opcode) { + if (spv::Op::OpExtInstImport == pInst->opcode) { const spv_ext_inst_type_t ext_inst_type = spvExtInstImportTypeGet(literal.str.c_str()); if (SPV_EXT_INST_TYPE_NONE == ext_inst_type) { @@ -399,13 +411,16 @@ spv_result_t spvTextEncodeOperand(const spvtools::AssemblyGrammar& grammar, case SPV_OPERAND_TYPE_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_IMAGE: case SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS: + case SPV_OPERAND_TYPE_OPTIONAL_RAW_ACCESS_CHAIN_OPERANDS: case SPV_OPERAND_TYPE_SELECTION_CONTROL: case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS: - case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: { + case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS: + case SPV_OPERAND_TYPE_OPTIONAL_COOPERATIVE_MATRIX_OPERANDS: { uint32_t value; - if (grammar.parseMaskOperand(type, textValue, &value)) { - return context->diagnostic() << "Invalid " << spvOperandTypeStr(type) - << " operand '" << textValue << "'."; + if (auto error = grammar.parseMaskOperand(type, textValue, &value)) { + return context->diagnostic(error) + << "Invalid " << spvOperandTypeStr(type) << " operand '" + << textValue << "'."; } if (auto error = context->binaryEncodeU32(value, pInst)) return error; // Prepare to parse the operands for this logical operand. @@ -542,7 +557,8 @@ spv_result_t spvTextEncodeOpcode(const spvtools::AssemblyGrammar& grammar, std::string equal_sign; error = context->getWord(&equal_sign, &nextPosition); if ("=" != equal_sign) - return context->diagnostic() << "'=' expected after result id."; + return context->diagnostic() << "'=' expected after result id but found '" + << equal_sign << "'."; // The after the '=' sign. context->setPosition(nextPosition); @@ -622,7 +638,8 @@ spv_result_t spvTextEncodeOpcode(const spvtools::AssemblyGrammar& grammar, break; } else { return context->diagnostic() - << "Expected operand, found end of stream."; + << "Expected operand for " << opcodeName + << " instruction, but found the end of the stream."; } } assert(error == SPV_SUCCESS && "Somebody added another way to fail"); @@ -632,7 +649,8 @@ spv_result_t spvTextEncodeOpcode(const spvtools::AssemblyGrammar& grammar, break; } else { return context->diagnostic() - << "Expected operand, found next instruction instead."; + << "Expected operand for " << opcodeName + << " instruction, but found the next instruction instead."; } } @@ -666,7 +684,7 @@ spv_result_t spvTextEncodeOpcode(const spvtools::AssemblyGrammar& grammar, if (pInst->words.size() > SPV_LIMIT_INSTRUCTION_WORD_COUNT_MAX) { return context->diagnostic() - << "Instruction too long: " << pInst->words.size() + << opcodeName << " Instruction too long: " << pInst->words.size() << " words, but the limit is " << SPV_LIMIT_INSTRUCTION_WORD_COUNT_MAX; } @@ -685,7 +703,7 @@ spv_result_t SetHeader(spv_target_env env, const uint32_t bound, uint32_t* header) { if (!header) return SPV_ERROR_INVALID_BINARY; - header[SPV_INDEX_MAGIC_NUMBER] = SpvMagicNumber; + header[SPV_INDEX_MAGIC_NUMBER] = spv::MagicNumber; header[SPV_INDEX_VERSION_NUMBER] = spvVersionForTargetEnv(env); header[SPV_INDEX_GENERATOR_NUMBER] = SPV_GENERATOR_WORD(SPV_GENERATOR_KHRONOS_ASSEMBLER, kAssemblerVersion); @@ -719,7 +737,7 @@ spv_result_t GetNumericIds(const spvtools::AssemblyGrammar& grammar, // being parsed. A malformed input might feature such an operand *before* // the opcode is known. To guard against accessing an uninitialized opcode, // the instruction's opcode is initialized to a default value. - inst.opcode = SpvOpMax; + inst.opcode = spv::Op::Max; if (spvTextEncodeOpcode(grammar, &context, &inst)) { return SPV_ERROR_INVALID_TEXT; @@ -769,8 +787,8 @@ spv_result_t spvTextToBinaryInternal(const spvtools::AssemblyGrammar& grammar, instructions.push_back({}); spv_instruction_t& inst = instructions.back(); - if (spvTextEncodeOpcode(grammar, &context, &inst)) { - return SPV_ERROR_INVALID_TEXT; + if (auto error = spvTextEncodeOpcode(grammar, &context, &inst)) { + return error; } if (context.advance()) break; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/text_handler.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/text_handler.cpp index fe12a26e3..35c4b83c1 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/text_handler.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/text_handler.cpp @@ -62,28 +62,29 @@ spv_result_t advanceLine(spv_text text, spv_position position) { // parameters, its the users responsibility to ensure these are non null. spv_result_t advance(spv_text text, spv_position position) { // NOTE: Consume white space, otherwise don't advance. - if (position->index >= text->length) return SPV_END_OF_STREAM; - switch (text->str[position->index]) { - case '\0': - return SPV_END_OF_STREAM; - case ';': - if (spv_result_t error = advanceLine(text, position)) return error; - return advance(text, position); - case ' ': - case '\t': - case '\r': - position->column++; - position->index++; - return advance(text, position); - case '\n': - position->column = 0; - position->line++; - position->index++; - return advance(text, position); - default: - break; + while (true) { + if (position->index >= text->length) return SPV_END_OF_STREAM; + switch (text->str[position->index]) { + case '\0': + return SPV_END_OF_STREAM; + case ';': + if (spv_result_t error = advanceLine(text, position)) return error; + continue; + case ' ': + case '\t': + case '\r': + position->column++; + position->index++; + continue; + case '\n': + position->column = 0; + position->line++; + position->index++; + continue; + default: + return SPV_SUCCESS; + } } - return SPV_SUCCESS; } // Fetches the next word from the given text stream starting from the given @@ -322,12 +323,12 @@ spv_result_t AssemblyContext::recordTypeDefinition( << " has already been used to generate a type"; } - if (pInst->opcode == SpvOpTypeInt) { + if (pInst->opcode == spv::Op::OpTypeInt) { if (pInst->words.size() != 4) return diagnostic() << "Invalid OpTypeInt instruction"; types_[value] = {pInst->words[2], pInst->words[3] != 0, IdTypeClass::kScalarIntegerType}; - } else if (pInst->opcode == SpvOpTypeFloat) { + } else if (pInst->opcode == spv::Op::OpTypeFloat) { if (pInst->words.size() != 3) return diagnostic() << "Invalid OpTypeFloat instruction"; types_[value] = {pInst->words[2], false, IdTypeClass::kScalarFloatType}; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/bit_vector.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/bit_vector.h index 3e189cb10..826d62f02 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/bit_vector.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/bit_vector.h @@ -32,7 +32,7 @@ class BitVector { enum { kInitialNumBits = 1024 }; public: - // Creates a bit vector contianing 0s. + // Creates a bit vector containing 0s. BitVector(uint32_t reserved_size = kInitialNumBits) : bits_((reserved_size - 1) / kBitContainerSize + 1, 0) {} diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hash_combine.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hash_combine.h new file mode 100644 index 000000000..1a2dbc332 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hash_combine.h @@ -0,0 +1,53 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SOURCE_UTIL_HASH_COMBINE_H_ +#define SOURCE_UTIL_HASH_COMBINE_H_ + +#include +#include +#include + +namespace spvtools { +namespace utils { + +// Helpers for incrementally computing hashes. +// For reference, see +// http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3876.pdf + +template +inline size_t hash_combine(std::size_t seed, const T& val) { + return seed ^ (std::hash()(val) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); +} + +template +inline size_t hash_combine(std::size_t hash, const std::vector& vals) { + for (const T& val : vals) { + hash = hash_combine(hash, val); + } + return hash; +} + +inline size_t hash_combine(std::size_t hash) { return hash; } + +template +inline size_t hash_combine(std::size_t hash, const T& val, + const Types&... args) { + return hash_combine(hash_combine(hash, val), args...); +} + +} // namespace utils +} // namespace spvtools + +#endif // SOURCE_UTIL_HASH_COMBINE_H_ diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hex_float.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hex_float.h index 903b62880..98353a4ad 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hex_float.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/hex_float.h @@ -209,9 +209,10 @@ std::istream& operator>>(std::istream& is, FloatProxy& value) { // be the default for any non-specialized type. template struct HexFloatTraits { - // Integer type that can store this hex-float. + // Integer type that can store the bit representation of this hex-float. using uint_type = void; - // Signed integer type that can store this hex-float. + // Signed integer type that can store the bit representation of this + // hex-float. using int_type = void; // The numerical type that this HexFloat represents. using underlying_type = void; @@ -895,6 +896,47 @@ ParseNormalFloat, HexFloatTraits>>( return is; } +namespace detail { + +// Returns a new value formed from 'value' by setting 'bit' that is the +// 'n'th most significant bit (where 0 is the most significant bit). +// If 'bit' is zero or 'n' is more than the number of bits in the integer +// type, then return the original value. +template +UINT_TYPE set_nth_most_significant_bit(UINT_TYPE value, UINT_TYPE bit, + UINT_TYPE n) { + constexpr UINT_TYPE max_position = std::numeric_limits::digits - 1; + if ((bit != 0) && (n <= max_position)) { + return static_cast(value | (bit << (max_position - n))); + } + return value; +} + +// Attempts to increment the argument. +// If it does not overflow, then increments the argument and returns true. +// If it would overflow, returns false. +template +bool saturated_inc(INT_TYPE& value) { + if (value == std::numeric_limits::max()) { + return false; + } + value++; + return true; +} + +// Attempts to decrement the argument. +// If it does not underflow, then decrements the argument and returns true. +// If it would overflow, returns false. +template +bool saturated_dec(INT_TYPE& value) { + if (value == std::numeric_limits::min()) { + return false; + } + value--; + return true; +} +} // namespace detail + // Reads a HexFloat from the given stream. // If the float is not encoded as a hex-float then it will be parsed // as a regular float. @@ -958,9 +1000,15 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { // This "looks" like a hex-float so treat it as one. bool seen_p = false; bool seen_dot = false; - uint_type fraction_index = 0; + // The mantissa bits, without the most significant 1 bit, and with the + // the most recently read bits in the least significant positions. uint_type fraction = 0; + // The number of mantissa bits that have been read, including the leading 1 + // bit that is not written into 'fraction'. + uint_type fraction_index = 0; + + // TODO(dneto): handle overflow and underflow int_type exponent = HF::exponent_bias; // Strip off leading zeros so we don't have to special-case them later. @@ -968,11 +1016,13 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { is.get(); } - bool is_denorm = - true; // Assume denorm "representation" until we hear otherwise. - // NB: This does not mean the value is actually denorm, - // it just means that it was written 0. + // Does the mantissa, as written, have non-zero digits to the left of + // the decimal point. Assume no until proven otherwise. + bool has_integer_part = false; bool bits_written = false; // Stays false until we write a bit. + + // Scan the mantissa hex digits until we see a '.' or the 'p' that + // starts the exponent. while (!seen_p && !seen_dot) { // Handle characters that are left of the fractional part. if (next_char == '.') { @@ -980,21 +1030,27 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { } else if (next_char == 'p') { seen_p = true; } else if (::isxdigit(next_char)) { - // We know this is not denormalized since we have stripped all leading - // zeroes and we are not a ".". - is_denorm = false; + // We have stripped all leading zeroes and we have not yet seen a ".". + has_integer_part = true; int number = get_nibble_from_character(next_char); for (int i = 0; i < 4; ++i, number <<= 1) { uint_type write_bit = (number & 0x8) ? 0x1 : 0x0; if (bits_written) { // If we are here the bits represented belong in the fractional // part of the float, and we have to adjust the exponent accordingly. - fraction = static_cast( - fraction | - static_cast( - write_bit << (HF::top_bit_left_shift - fraction_index++))); - exponent = static_cast(exponent + 1); + fraction = detail::set_nth_most_significant_bit(fraction, write_bit, + fraction_index); + // Increment the fraction index. If the input has bizarrely many + // significant digits, then silently drop them. + detail::saturated_inc(fraction_index); + if (!detail::saturated_inc(exponent)) { + // Overflow failure + is.setstate(std::ios::failbit); + return is; + } } + // Since this updated after setting fraction bits, this effectively + // drops the leading 1 bit. bits_written |= write_bit != 0; } } else { @@ -1018,16 +1074,21 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { for (int i = 0; i < 4; ++i, number <<= 1) { uint_type write_bit = (number & 0x8) ? 0x01 : 0x00; bits_written |= write_bit != 0; - if (is_denorm && !bits_written) { + if ((!has_integer_part) && !bits_written) { // Handle modifying the exponent here this way we can handle // an arbitrary number of hex values without overflowing our // integer. - exponent = static_cast(exponent - 1); + if (!detail::saturated_dec(exponent)) { + // Overflow failure + is.setstate(std::ios::failbit); + return is; + } } else { - fraction = static_cast( - fraction | - static_cast( - write_bit << (HF::top_bit_left_shift - fraction_index++))); + fraction = detail::set_nth_most_significant_bit(fraction, write_bit, + fraction_index); + // Increment the fraction index. If the input has bizarrely many + // significant digits, then silently drop them. + detail::saturated_inc(fraction_index); } } } else { @@ -1043,25 +1104,40 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { // Finished reading the part preceding 'p'. // In hex floats syntax, the binary exponent is required. - bool seen_sign = false; + bool seen_exponent_sign = false; int8_t exponent_sign = 1; bool seen_written_exponent_digits = false; + // The magnitude of the exponent, as written, or the sentinel value to signal + // overflow. int_type written_exponent = 0; + // A sentinel value signalling overflow of the magnitude of the written + // exponent. We'll assume that -written_exponent_overflow is valid for the + // type. Later we may add 1 or subtract 1 from the adjusted exponent, so leave + // room for an extra 1. + const int_type written_exponent_overflow = + std::numeric_limits::max() - 1; while (true) { if (!seen_written_exponent_digits && (next_char == '-' || next_char == '+')) { - if (seen_sign) { + if (seen_exponent_sign) { is.setstate(std::ios::failbit); return is; } - seen_sign = true; + seen_exponent_sign = true; exponent_sign = (next_char == '-') ? -1 : 1; } else if (::isdigit(next_char)) { seen_written_exponent_digits = true; // Hex-floats express their exponent as decimal. - written_exponent = static_cast(written_exponent * 10); - written_exponent = - static_cast(written_exponent + (next_char - '0')); + int_type digit = + static_cast(static_cast(next_char) - '0'); + if (written_exponent >= (written_exponent_overflow - digit) / 10) { + // The exponent is very big. Saturate rather than overflow the exponent. + // signed integer, which would be undefined behaviour. + written_exponent = written_exponent_overflow; + } else { + written_exponent = static_cast( + static_cast(written_exponent * 10) + digit); + } } else { break; } @@ -1075,10 +1151,29 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { } written_exponent = static_cast(written_exponent * exponent_sign); - exponent = static_cast(exponent + written_exponent); + // Now fold in the exponent bias into the written exponent, updating exponent. + // But avoid undefined behaviour that would result from overflowing int_type. + if (written_exponent >= 0 && exponent >= 0) { + // Saturate up to written_exponent_overflow. + if (written_exponent_overflow - exponent > written_exponent) { + exponent = static_cast(written_exponent + exponent); + } else { + exponent = written_exponent_overflow; + } + } else if (written_exponent < 0 && exponent < 0) { + // Saturate down to -written_exponent_overflow. + if (written_exponent_overflow + exponent > -written_exponent) { + exponent = static_cast(written_exponent + exponent); + } else { + exponent = static_cast(-written_exponent_overflow); + } + } else { + // They're of opposing sign, so it's safe to add. + exponent = static_cast(written_exponent + exponent); + } - bool is_zero = is_denorm && (fraction == 0); - if (is_denorm && !is_zero) { + bool is_zero = (!has_integer_part) && (fraction == 0); + if ((!has_integer_part) && !is_zero) { fraction = static_cast(fraction << 1); exponent = static_cast(exponent - 1); } else if (is_zero) { @@ -1095,7 +1190,7 @@ std::istream& operator>>(std::istream& is, HexFloat& value) { const int_type max_exponent = SetBits::get; - // Handle actual denorm numbers + // Handle denorm numbers while (exponent < 0 && !is_zero) { fraction = static_cast(fraction >> 1); exponent = static_cast(exponent + 1); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/ilist.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/ilist.h index 9837b09b3..42d5e62b9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/ilist.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/ilist.h @@ -59,7 +59,7 @@ class IntrusiveList { // Moves the contents of the given list to the list being constructed. IntrusiveList(IntrusiveList&&); - // Destorys the list. Note that the elements of the list will not be deleted, + // Destroys the list. Note that the elements of the list will not be deleted, // but they will be removed from the list. virtual ~IntrusiveList(); @@ -348,6 +348,7 @@ void IntrusiveList::Check(NodeType* start) { p = p->next_node_; } while (p != start); assert(sentinel_count == 1 && "List should have exactly 1 sentinel node."); + (void)sentinel_count; p = start; do { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/parse_number.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/parse_number.h index 729aac54b..d0f2a09a3 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/parse_number.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/parse_number.h @@ -220,7 +220,7 @@ EncodeNumberStatus ParseAndEncodeIntegerNumber( std::function emit, std::string* error_msg); // Parses a floating point value of a given |type| from the given |text| and -// encodes the number by the given |emit| funciton. On success, returns +// encodes the number by the given |emit| function. On success, returns // EncodeNumberStatus::kSuccess and the parsed number will be consumed by the // given |emit| function word by word (least significant word first). On // failure, this function returns the error code of the encoding status and diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/small_vector.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/small_vector.h index 8f56268a5..1351475bd 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/small_vector.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/small_vector.h @@ -15,7 +15,9 @@ #ifndef SOURCE_UTIL_SMALL_VECTOR_H_ #define SOURCE_UTIL_SMALL_VECTOR_H_ +#include #include +#include #include #include #include @@ -64,6 +66,11 @@ class SmallVector { } } + template + SmallVector(InputIt first, InputIt last) : SmallVector() { + insert(end(), first, last); + } + SmallVector(std::vector&& vec) : SmallVector() { if (vec.size() > small_size) { large_data_ = MakeUnique>(std::move(vec)); @@ -328,6 +335,15 @@ class SmallVector { ++size_; } + void pop_back() { + if (large_data_) { + large_data_->pop_back(); + } else { + --size_; + small_data_[size_].~T(); + } + } + template iterator insert(iterator pos, InputIt first, InputIt last) { size_t element_idx = (pos - begin()); @@ -366,7 +382,7 @@ class SmallVector { } } - // Upate the size. + // Update the size. size_ += num_of_new_elements; return pos; } @@ -447,15 +463,19 @@ class SmallVector { // The number of elements in |small_data_| that have been constructed. size_t size_; + // A type with the same alignment and size as T, but will is POD. + struct alignas(T) PodType { + std::array data; + }; + + // The actual data used to store the array elements. It must never be used + // directly, but must only be accessed through |small_data_|. + PodType buffer[small_size]; + // The pointed used to access the array of elements when the number of // elements is small. T* small_data_; - // The actual data used to store the array elements. It must never be used - // directly, but must only be accesed through |small_data_|. - typename std::aligned_storage::value>::type - buffer[small_size]; - // A pointer to a vector that is used to store the elements of the vector when // this size exceeds |small_size|. If |large_data_| is nullptr, then the data // is stored in |small_data_|. Otherwise, the data is stored in diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/timer.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/timer.h index fc4b747b9..080831196 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/timer.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/util/timer.h @@ -206,16 +206,16 @@ class Timer { // Variable to save the result of clock_gettime(CLOCK_PROCESS_CPUTIME_ID) when // Timer::Stop() is called. It is used as the last status of CPU time. The - // resouce usage is measured by subtracting |cpu_before_| from it. + // resource usage is measured by subtracting |cpu_before_| from it. timespec cpu_after_; // Variable to save the result of clock_gettime(CLOCK_MONOTONIC) when // Timer::Stop() is called. It is used as the last status of WALL time. The - // resouce usage is measured by subtracting |wall_before_| from it. + // resource usage is measured by subtracting |wall_before_| from it. timespec wall_after_; // Variable to save the result of getrusage() when Timer::Stop() is called. It - // is used as the last status of USR time, SYS time, and RSS. Those resouce + // is used as the last status of USR time, SYS time, and RSS. Those resource // usages are measured by subtracting |usage_before_| from it. rusage usage_after_; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.cpp index b2a8793d2..9a358fcb9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.cpp @@ -15,7 +15,6 @@ #include "source/val/basic_block.h" #include -#include #include namespace spvtools { @@ -24,11 +23,13 @@ namespace val { BasicBlock::BasicBlock(uint32_t label_id) : id_(label_id), immediate_dominator_(nullptr), - immediate_post_dominator_(nullptr), + immediate_structural_dominator_(nullptr), + immediate_structural_post_dominator_(nullptr), predecessors_(), successors_(), type_(0), reachable_(false), + structurally_reachable_(false), label_(nullptr), terminator_(nullptr) {} @@ -36,21 +37,32 @@ void BasicBlock::SetImmediateDominator(BasicBlock* dom_block) { immediate_dominator_ = dom_block; } -void BasicBlock::SetImmediatePostDominator(BasicBlock* pdom_block) { - immediate_post_dominator_ = pdom_block; +void BasicBlock::SetImmediateStructuralDominator(BasicBlock* dom_block) { + immediate_structural_dominator_ = dom_block; +} + +void BasicBlock::SetImmediateStructuralPostDominator(BasicBlock* pdom_block) { + immediate_structural_post_dominator_ = pdom_block; } const BasicBlock* BasicBlock::immediate_dominator() const { return immediate_dominator_; } -const BasicBlock* BasicBlock::immediate_post_dominator() const { - return immediate_post_dominator_; +const BasicBlock* BasicBlock::immediate_structural_dominator() const { + return immediate_structural_dominator_; +} + +const BasicBlock* BasicBlock::immediate_structural_post_dominator() const { + return immediate_structural_post_dominator_; } BasicBlock* BasicBlock::immediate_dominator() { return immediate_dominator_; } -BasicBlock* BasicBlock::immediate_post_dominator() { - return immediate_post_dominator_; +BasicBlock* BasicBlock::immediate_structural_dominator() { + return immediate_structural_dominator_; +} +BasicBlock* BasicBlock::immediate_structural_post_dominator() { + return immediate_structural_post_dominator_; } void BasicBlock::RegisterSuccessors( @@ -58,6 +70,10 @@ void BasicBlock::RegisterSuccessors( for (auto& block : next_blocks) { block->predecessors_.push_back(this); successors_.push_back(block); + + // Register structural successors/predecessors too. + block->structural_predecessors_.push_back(this); + structural_successors_.push_back(block); } } @@ -67,10 +83,16 @@ bool BasicBlock::dominates(const BasicBlock& other) const { std::find(other.dom_begin(), other.dom_end(), this)); } -bool BasicBlock::postdominates(const BasicBlock& other) const { - return (this == &other) || - !(other.pdom_end() == - std::find(other.pdom_begin(), other.pdom_end(), this)); +bool BasicBlock::structurally_dominates(const BasicBlock& other) const { + return (this == &other) || !(other.structural_dom_end() == + std::find(other.structural_dom_begin(), + other.structural_dom_end(), this)); +} + +bool BasicBlock::structurally_postdominates(const BasicBlock& other) const { + return (this == &other) || !(other.structural_pdom_end() == + std::find(other.structural_pdom_begin(), + other.structural_pdom_end(), this)); } BasicBlock::DominatorIterator::DominatorIterator() : current_(nullptr) {} @@ -107,21 +129,43 @@ BasicBlock::DominatorIterator BasicBlock::dom_end() { return DominatorIterator(); } -const BasicBlock::DominatorIterator BasicBlock::pdom_begin() const { - return DominatorIterator( - this, [](const BasicBlock* b) { return b->immediate_post_dominator(); }); +const BasicBlock::DominatorIterator BasicBlock::structural_dom_begin() const { + return DominatorIterator(this, [](const BasicBlock* b) { + return b->immediate_structural_dominator(); + }); } -BasicBlock::DominatorIterator BasicBlock::pdom_begin() { - return DominatorIterator( - this, [](const BasicBlock* b) { return b->immediate_post_dominator(); }); +BasicBlock::DominatorIterator BasicBlock::structural_dom_begin() { + return DominatorIterator(this, [](const BasicBlock* b) { + return b->immediate_structural_dominator(); + }); +} + +const BasicBlock::DominatorIterator BasicBlock::structural_dom_end() const { + return DominatorIterator(); +} + +BasicBlock::DominatorIterator BasicBlock::structural_dom_end() { + return DominatorIterator(); +} + +const BasicBlock::DominatorIterator BasicBlock::structural_pdom_begin() const { + return DominatorIterator(this, [](const BasicBlock* b) { + return b->immediate_structural_post_dominator(); + }); +} + +BasicBlock::DominatorIterator BasicBlock::structural_pdom_begin() { + return DominatorIterator(this, [](const BasicBlock* b) { + return b->immediate_structural_post_dominator(); + }); } -const BasicBlock::DominatorIterator BasicBlock::pdom_end() const { +const BasicBlock::DominatorIterator BasicBlock::structural_pdom_end() const { return DominatorIterator(); } -BasicBlock::DominatorIterator BasicBlock::pdom_end() { +BasicBlock::DominatorIterator BasicBlock::structural_pdom_end() { return DominatorIterator(); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.h index 5af4b9e4d..be5657ea5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/basic_block.h @@ -64,9 +64,32 @@ class BasicBlock { /// Returns the successors of the BasicBlock std::vector* successors() { return &successors_; } - /// Returns true if the block is reachable in the CFG + /// Returns the structural successors of the BasicBlock + std::vector* structural_predecessors() { + return &structural_predecessors_; + } + + /// Returns the structural predecessors of the BasicBlock + const std::vector* structural_predecessors() const { + return &structural_predecessors_; + } + + /// Returns the structural successors of the BasicBlock + std::vector* structural_successors() { + return &structural_successors_; + } + + /// Returns the structural predecessors of the BasicBlock + const std::vector* structural_successors() const { + return &structural_successors_; + } + + /// Returns true if the block is reachable in the CFG. bool reachable() const { return reachable_; } + /// Returns true if the block is structurally reachable in the CFG. + bool structurally_reachable() const { return structurally_reachable_; } + /// Returns true if BasicBlock is of the given type bool is_type(BlockType type) const { if (type == kBlockTypeUndefined) return type_.none(); @@ -76,6 +99,11 @@ class BasicBlock { /// Sets the reachability of the basic block in the CFG void set_reachable(bool reachability) { reachable_ = reachability; } + /// Sets the structural reachability of the basic block in the CFG + void set_structurally_reachable(bool reachability) { + structurally_reachable_ = reachability; + } + /// Sets the type of the BasicBlock void set_type(BlockType type) { if (type == kBlockTypeUndefined) @@ -84,27 +112,38 @@ class BasicBlock { type_.set(type); } - /// Sets the immedate dominator of this basic block + /// Sets the immediate dominator of this basic block /// /// @param[in] dom_block The dominator block void SetImmediateDominator(BasicBlock* dom_block); - /// Sets the immedate post dominator of this basic block + /// Sets the immediate dominator of this basic block + /// + /// @param[in] dom_block The dominator block + void SetImmediateStructuralDominator(BasicBlock* dom_block); + + /// Sets the immediate post dominator of this basic block /// /// @param[in] pdom_block The post dominator block - void SetImmediatePostDominator(BasicBlock* pdom_block); + void SetImmediateStructuralPostDominator(BasicBlock* pdom_block); - /// Returns the immedate dominator of this basic block + /// Returns the immediate dominator of this basic block BasicBlock* immediate_dominator(); - /// Returns the immedate dominator of this basic block + /// Returns the immediate dominator of this basic block const BasicBlock* immediate_dominator() const; - /// Returns the immedate post dominator of this basic block - BasicBlock* immediate_post_dominator(); + /// Returns the immediate dominator of this basic block + BasicBlock* immediate_structural_dominator(); + + /// Returns the immediate dominator of this basic block + const BasicBlock* immediate_structural_dominator() const; - /// Returns the immedate post dominator of this basic block - const BasicBlock* immediate_post_dominator() const; + /// Returns the immediate post dominator of this basic block + BasicBlock* immediate_structural_post_dominator(); + + /// Returns the immediate post dominator of this basic block + const BasicBlock* immediate_structural_post_dominator() const; /// Returns the label instruction for the block, or nullptr if not set. const Instruction* label() const { return label_; } @@ -132,9 +171,18 @@ class BasicBlock { /// Assumes dominators have been computed. bool dominates(const BasicBlock& other) const; - /// Returns true if this block postdominates the other block. - /// Assumes dominators have been computed. - bool postdominates(const BasicBlock& other) const; + /// Returns true if this block structurally dominates the other block. + /// Assumes structural dominators have been computed. + bool structurally_dominates(const BasicBlock& other) const; + + /// Returns true if this block structurally postdominates the other block. + /// Assumes structural dominators have been computed. + bool structurally_postdominates(const BasicBlock& other) const; + + void RegisterStructuralSuccessor(BasicBlock* block) { + block->structural_predecessors_.push_back(this); + structural_successors_.push_back(block); + } /// @brief A BasicBlock dominator iterator class /// @@ -191,18 +239,32 @@ class BasicBlock { /// block DominatorIterator dom_end(); + /// Returns a dominator iterator which points to the current block + const DominatorIterator structural_dom_begin() const; + + /// Returns a dominator iterator which points to the current block + DominatorIterator structural_dom_begin(); + + /// Returns a dominator iterator which points to one element past the first + /// block + const DominatorIterator structural_dom_end() const; + + /// Returns a dominator iterator which points to one element past the first + /// block + DominatorIterator structural_dom_end(); + /// Returns a post dominator iterator which points to the current block - const DominatorIterator pdom_begin() const; + const DominatorIterator structural_pdom_begin() const; /// Returns a post dominator iterator which points to the current block - DominatorIterator pdom_begin(); + DominatorIterator structural_pdom_begin(); /// Returns a post dominator iterator which points to one element past the /// last block - const DominatorIterator pdom_end() const; + const DominatorIterator structural_pdom_end() const; /// Returns a post dominator iterator which points to one element past the /// last block - DominatorIterator pdom_end(); + DominatorIterator structural_pdom_end(); private: /// Id of the BasicBlock @@ -211,8 +273,11 @@ class BasicBlock { /// Pointer to the immediate dominator of the BasicBlock BasicBlock* immediate_dominator_; - /// Pointer to the immediate dominator of the BasicBlock - BasicBlock* immediate_post_dominator_; + /// Pointer to the immediate structural dominator of the BasicBlock + BasicBlock* immediate_structural_dominator_; + + /// Pointer to the immediate structural post dominator of the BasicBlock + BasicBlock* immediate_structural_post_dominator_; /// The set of predecessors of the BasicBlock std::vector predecessors_; @@ -226,11 +291,17 @@ class BasicBlock { /// True if the block is reachable in the CFG bool reachable_; + /// True if the block is structurally reachable in the CFG + bool structurally_reachable_; + /// label of this block, if any. const Instruction* label_; /// Terminator of this block. const Instruction* terminator_; + + std::vector structural_predecessors_; + std::vector structural_successors_; }; /// @brief Returns true if the iterators point to the same element or if both diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/construct.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/construct.cpp index 251e2bbae..10af155da 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/construct.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/construct.cpp @@ -16,7 +16,6 @@ #include #include -#include #include "source/val/function.h" #include "source/val/validation_state.h" @@ -70,60 +69,45 @@ BasicBlock* Construct::exit_block() { return exit_block_; } void Construct::set_exit(BasicBlock* block) { exit_block_ = block; } -Construct::ConstructBlockSet Construct::blocks(Function* function) const { - auto header = entry_block(); - auto merge = exit_block(); - assert(header); - int header_depth = function->GetBlockDepth(const_cast(header)); - ConstructBlockSet construct_blocks; - std::unordered_set corresponding_headers; - for (auto& other : corresponding_constructs()) { - // The corresponding header can be the same block as this construct's - // header for loops with no loop construct. In those cases, don't add the - // loop header as it prevents finding any blocks in the construct. - if (type() != ConstructType::kContinue || other->entry_block() != header) { - corresponding_headers.insert(other->entry_block()); - } +Construct::ConstructBlockSet Construct::blocks(Function* /*function*/) const { + const auto header = entry_block(); + const auto exit = exit_block(); + const bool is_continue = type() == ConstructType::kContinue; + const bool is_loop = type() == ConstructType::kLoop; + const BasicBlock* continue_header = nullptr; + if (is_loop) { + // The only corresponding construct for a loop is the continue. + continue_header = (*corresponding_constructs().begin())->entry_block(); } std::vector stack; stack.push_back(const_cast(header)); + ConstructBlockSet construct_blocks; while (!stack.empty()) { - BasicBlock* block = stack.back(); + auto* block = stack.back(); stack.pop_back(); - if (merge == block && ExitBlockIsMergeBlock()) { - // Merge block is not part of the construct. - continue; - } - - if (corresponding_headers.count(block)) { - // Entered a corresponding construct. - continue; - } - - int block_depth = function->GetBlockDepth(block); - if (block_depth < header_depth) { - // Broke to outer construct. - continue; - } - - // In a loop, the continue target is at a depth of the loop construct + 1. - // A selection construct nested directly within the loop construct is also - // at the same depth. It is valid, however, to branch directly to the - // continue target from within the selection construct. - if (block != header && block_depth == header_depth && - type() == ConstructType::kSelection && - block->is_type(kBlockTypeContinue)) { - // Continued to outer construct. - continue; - } - - if (!construct_blocks.insert(block).second) continue; + if (header->structurally_dominates(*block)) { + bool include = false; + if (is_continue && exit->structurally_postdominates(*block)) { + // Continue construct include blocks dominated by the continue target + // and post-dominated by the back-edge block. + include = true; + } else if (!exit->structurally_dominates(*block)) { + // Selection and loop constructs include blocks dominated by the header + // and not dominated by the merge. + include = true; + if (is_loop && continue_header->structurally_dominates(*block)) { + // Loop constructs have an additional constraint that they do not + // include blocks dominated by the continue construct. Since all + // blocks in the continue construct are dominated by the continue + // target, we just test for dominance by continue target. + include = false; + } + } + if (include) { + if (!construct_blocks.insert(block).second) continue; - if (merge != block) { - for (auto succ : *block->successors()) { - // All blocks in the construct must be dominated by the header. - if (header->dominates(*succ)) { + for (auto succ : *block->structural_successors()) { stack.push_back(succ); } } @@ -179,13 +163,16 @@ bool Construct::IsStructuredExit(ValidationState_t& _, BasicBlock* dest) const { // ii. The immediate dominator of |block|. auto NextBlock = [](const BasicBlock* block) -> const BasicBlock* { for (auto& use : block->label()->uses()) { - if ((use.first->opcode() == SpvOpLoopMerge || - use.first->opcode() == SpvOpSelectionMerge) && - use.second == 1 && use.first->block()->dominates(*block)) { + if ((use.first->opcode() == spv::Op::OpLoopMerge || + use.first->opcode() == spv::Op::OpSelectionMerge) && + use.second == 1 && + use.first->block()->structurally_dominates(*block) && + // A header likely declared itself as its merge. + use.first->block() != block) { return use.first->block(); } } - return block->immediate_dominator(); + return block->immediate_structural_dominator(); }; bool seen_switch = false; @@ -195,33 +182,33 @@ bool Construct::IsStructuredExit(ValidationState_t& _, BasicBlock* dest) const { auto terminator = block->terminator(); auto index = terminator - &_.ordered_instructions()[0]; auto merge_inst = &_.ordered_instructions()[index - 1]; - if (merge_inst->opcode() == SpvOpLoopMerge || - (header->terminator()->opcode() != SpvOpSwitch && - merge_inst->opcode() == SpvOpSelectionMerge && - terminator->opcode() == SpvOpSwitch)) { + if (merge_inst->opcode() == spv::Op::OpLoopMerge || + (header->terminator()->opcode() != spv::Op::OpSwitch && + merge_inst->opcode() == spv::Op::OpSelectionMerge && + terminator->opcode() == spv::Op::OpSwitch)) { auto merge_target = merge_inst->GetOperandAs(0u); auto merge_block = merge_inst->function()->GetBlock(merge_target).first; - if (merge_block->dominates(*header)) { + if (merge_block->structurally_dominates(*header)) { block = NextBlock(block); continue; } - if ((!seen_switch || merge_inst->opcode() == SpvOpLoopMerge) && + if ((!seen_switch || merge_inst->opcode() == spv::Op::OpLoopMerge) && dest->id() == merge_target) { return true; - } else if (merge_inst->opcode() == SpvOpLoopMerge) { + } else if (merge_inst->opcode() == spv::Op::OpLoopMerge) { auto continue_target = merge_inst->GetOperandAs(1u); if (dest->id() == continue_target) { return true; } } - if (terminator->opcode() == SpvOpSwitch) { + if (terminator->opcode() == spv::Op::OpSwitch) { seen_switch = true; } // Hit an enclosing loop and didn't break or continue. - if (merge_inst->opcode() == SpvOpLoopMerge) return false; + if (merge_inst->opcode() == spv::Op::OpLoopMerge) return false; } block = NextBlock(block); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/decoration.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/decoration.h index ed3320f87..384cc5755 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/decoration.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/decoration.h @@ -39,43 +39,52 @@ namespace val { // // Example 1: Decoration for an object with no parameters: // OpDecorate %obj Flat -// dec_type_ = SpvDecorationFlat +// dec_type_ = spv::Decoration::Flat // params_ = empty vector // struct_member_index_ = kInvalidMember // // Example 2: Decoration for an object with two parameters: // OpDecorate %obj LinkageAttributes "link" Import -// dec_type_ = SpvDecorationLinkageAttributes +// dec_type_ = spv::Decoration::LinkageAttributes // params_ = vector { link, Import } // struct_member_index_ = kInvalidMember // // Example 3: Decoration for a member of a structure with one parameter: // OpMemberDecorate %struct 2 Offset 2 -// dec_type_ = SpvDecorationOffset +// dec_type_ = spv::Decoration::Offset // params_ = vector { 2 } // struct_member_index_ = 2 // class Decoration { public: enum { kInvalidMember = -1 }; - Decoration(SpvDecoration t, + Decoration(spv::Decoration t, const std::vector& parameters = std::vector(), uint32_t member_index = kInvalidMember) : dec_type_(t), params_(parameters), struct_member_index_(member_index) {} void set_struct_member_index(uint32_t index) { struct_member_index_ = index; } int struct_member_index() const { return struct_member_index_; } - SpvDecoration dec_type() const { return dec_type_; } + spv::Decoration dec_type() const { return dec_type_; } std::vector& params() { return params_; } const std::vector& params() const { return params_; } + inline bool operator<(const Decoration& rhs) const { + // Note: Sort by struct_member_index_ first, then type, so look up can be + // efficient using lower_bound() and upper_bound(). + if (struct_member_index_ < rhs.struct_member_index_) return true; + if (rhs.struct_member_index_ < struct_member_index_) return false; + if (dec_type_ < rhs.dec_type_) return true; + if (rhs.dec_type_ < dec_type_) return false; + return params_ < rhs.params_; + } inline bool operator==(const Decoration& rhs) const { return (dec_type_ == rhs.dec_type_ && params_ == rhs.params_ && struct_member_index_ == rhs.struct_member_index_); } private: - SpvDecoration dec_type_; + spv::Decoration dec_type_; std::vector params_; // If the decoration applies to a member of a structure type, then the index diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.cpp index 9ad68e867..290574b85 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "source/cfa.h" @@ -33,7 +32,7 @@ namespace val { static const uint32_t kInvalidId = 0x400000; Function::Function(uint32_t function_id, uint32_t result_type_id, - SpvFunctionControlMask function_control, + spv::FunctionControlMask function_control, uint32_t function_type_id) : id_(function_id), function_type_id_(function_type_id), @@ -57,7 +56,7 @@ spv_result_t Function::RegisterFunctionParameter(uint32_t parameter_id, uint32_t type_id) { assert(current_block_ == nullptr && "RegisterFunctionParameter can only be called when parsing the binary " - "ouside of a block"); + "outside of a block"); // TODO(umar): Validate function parameter type order and count // TODO(umar): Use these variables to validate parameter type (void)parameter_id; @@ -73,6 +72,8 @@ spv_result_t Function::RegisterLoopMerge(uint32_t merge_id, BasicBlock& continue_target_block = blocks_.at(continue_id); assert(current_block_ && "RegisterLoopMerge must be called when called within a block"); + current_block_->RegisterStructuralSuccessor(&merge_block); + current_block_->RegisterStructuralSuccessor(&continue_target_block); current_block_->set_type(kBlockTypeLoop); merge_block.set_type(kBlockTypeMerge); @@ -101,6 +102,7 @@ spv_result_t Function::RegisterSelectionMerge(uint32_t merge_id) { current_block_->set_type(kBlockTypeSelection); merge_block.set_type(kBlockTypeMerge); merge_block_header_[&merge_block] = current_block_; + current_block_->RegisterStructuralSuccessor(&merge_block); AddConstruct({ConstructType::kSelection, current_block(), &merge_block}); @@ -130,7 +132,7 @@ spv_result_t Function::RegisterBlock(uint32_t block_id, bool is_definition) { undefined_blocks_.erase(block_id); current_block_ = &inserted_block->second; ordered_blocks_.push_back(current_block_); - } else if (success) { // Block doesn't exsist but this is not a definition + } else if (success) { // Block doesn't exist but this is not a definition undefined_blocks_.insert(block_id); } @@ -251,29 +253,43 @@ Function::GetBlocksFunction Function::AugmentedCFGSuccessorsFunction() const { }; } -Function::GetBlocksFunction -Function::AugmentedCFGSuccessorsFunctionIncludingHeaderToContinueEdge() const { +Function::GetBlocksFunction Function::AugmentedCFGPredecessorsFunction() const { + return [this](const BasicBlock* block) { + auto where = augmented_predecessors_map_.find(block); + return where == augmented_predecessors_map_.end() ? block->predecessors() + : &(*where).second; + }; +} + +Function::GetBlocksFunction Function::AugmentedStructuralCFGSuccessorsFunction() + const { return [this](const BasicBlock* block) { - auto where = loop_header_successors_plus_continue_target_map_.find(block); - return where == loop_header_successors_plus_continue_target_map_.end() - ? AugmentedCFGSuccessorsFunction()(block) + auto where = augmented_successors_map_.find(block); + return where == augmented_successors_map_.end() + ? block->structural_successors() : &(*where).second; }; } -Function::GetBlocksFunction Function::AugmentedCFGPredecessorsFunction() const { +Function::GetBlocksFunction +Function::AugmentedStructuralCFGPredecessorsFunction() const { return [this](const BasicBlock* block) { auto where = augmented_predecessors_map_.find(block); - return where == augmented_predecessors_map_.end() ? block->predecessors() - : &(*where).second; + return where == augmented_predecessors_map_.end() + ? block->structural_predecessors() + : &(*where).second; }; } void Function::ComputeAugmentedCFG() { // Compute the successors of the pseudo-entry block, and // the predecessors of the pseudo exit block. - auto succ_func = [](const BasicBlock* b) { return b->successors(); }; - auto pred_func = [](const BasicBlock* b) { return b->predecessors(); }; + auto succ_func = [](const BasicBlock* b) { + return b->structural_successors(); + }; + auto pred_func = [](const BasicBlock* b) { + return b->structural_predecessors(); + }; CFA::ComputeAugmentedCFG( ordered_blocks_, &pseudo_entry_block_, &pseudo_exit_block_, &augmented_successors_map_, &augmented_predecessors_map_, succ_func, @@ -354,10 +370,10 @@ int Function::GetBlockDepth(BasicBlock* bb) { return block_depth_[bb]; } -void Function::RegisterExecutionModelLimitation(SpvExecutionModel model, +void Function::RegisterExecutionModelLimitation(spv::ExecutionModel model, const std::string& message) { execution_model_limitations_.push_back( - [model, message](SpvExecutionModel in_model, std::string* out_message) { + [model, message](spv::ExecutionModel in_model, std::string* out_message) { if (model != in_model) { if (out_message) { *out_message = message; @@ -368,7 +384,7 @@ void Function::RegisterExecutionModelLimitation(SpvExecutionModel model, }); } -bool Function::IsCompatibleWithExecutionModel(SpvExecutionModel model, +bool Function::IsCompatibleWithExecutionModel(spv::ExecutionModel model, std::string* reason) const { bool return_value = true; std::stringstream ss_reason; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.h index 400bb6348..481179442 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/function.h @@ -55,7 +55,8 @@ enum class FunctionDecl { class Function { public: Function(uint32_t id, uint32_t result_type_id, - SpvFunctionControlMask function_control, uint32_t function_type_id); + spv::FunctionControlMask function_control, + uint32_t function_type_id); /// Registers a function parameter in the current function /// @return Returns SPV_SUCCESS if the call was successful @@ -73,14 +74,15 @@ class Function { /// Registers a variable in the current block /// - /// @param[in] type_id The type ID of the varaible - /// @param[in] id The ID of the varaible + /// @param[in] type_id The type ID of the variable + /// @param[in] id The ID of the variable /// @param[in] storage The storage of the variable /// @param[in] init_id The initializer ID of the variable /// /// @return Returns SPV_SUCCESS if the call was successful spv_result_t RegisterBlockVariable(uint32_t type_id, uint32_t id, - SpvStorageClass storage, uint32_t init_id); + spv::StorageClass storage, + uint32_t init_id); /// Registers a loop merge construct in the function /// @@ -184,12 +186,12 @@ class Function { std::function*(const BasicBlock*)>; /// Returns the block successors function for the augmented CFG. GetBlocksFunction AugmentedCFGSuccessorsFunction() const; - /// Like AugmentedCFGSuccessorsFunction, but also includes a forward edge from - /// a loop header block to its continue target, if they are different blocks. - GetBlocksFunction - AugmentedCFGSuccessorsFunctionIncludingHeaderToContinueEdge() const; /// Returns the block predecessors function for the augmented CFG. GetBlocksFunction AugmentedCFGPredecessorsFunction() const; + /// Returns the block structural successors function for the augmented CFG. + GetBlocksFunction AugmentedStructuralCFGSuccessorsFunction() const; + /// Returns the block structural predecessors function for the augmented CFG. + GetBlocksFunction AugmentedStructuralCFGPredecessorsFunction() const; /// Returns the control flow nesting depth of the given basic block. /// This function only works when you have structured control flow. @@ -197,20 +199,20 @@ class Function { /// been identified and dominators have been computed. int GetBlockDepth(BasicBlock* bb); - /// Prints a GraphViz digraph of the CFG of the current funciton + /// Prints a GraphViz digraph of the CFG of the current function void PrintDotGraph() const; - /// Prints a directed graph of the CFG of the current funciton + /// Prints a directed graph of the CFG of the current function void PrintBlocks() const; /// Registers execution model limitation such as "Feature X is only available /// with Execution Model Y". - void RegisterExecutionModelLimitation(SpvExecutionModel model, + void RegisterExecutionModelLimitation(spv::ExecutionModel model, const std::string& message); /// Registers execution model limitation with an |is_compatible| functor. void RegisterExecutionModelLimitation( - std::function is_compatible) { + std::function is_compatible) { execution_model_limitations_.push_back(is_compatible); } @@ -227,7 +229,7 @@ class Function { /// Returns true if the given execution model passes the limitations stored in /// execution_model_limitations_. Returns false otherwise and fills optional /// |reason| parameter. - bool IsCompatibleWithExecutionModel(SpvExecutionModel model, + bool IsCompatibleWithExecutionModel(spv::ExecutionModel model, std::string* reason = nullptr) const; // Inserts id to the set of functions called from this function. @@ -285,8 +287,8 @@ class Function { /// The type of the return value uint32_t result_type_id_; - /// The control fo the funciton - SpvFunctionControlMask function_control_; + /// The control fo the function + spv::FunctionControlMask function_control_; /// The type of declaration of each function FunctionDecl declaration_type_; @@ -381,7 +383,7 @@ class Function { /// function. The functor stored in the list return true if execution model /// is compatible, false otherwise. If the functor returns false, it can also /// optionally fill the string parameter with the reason for incompatibility. - std::list> + std::list> execution_model_limitations_; /// Stores limitations imposed by instructions used within the function. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/instruction.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/instruction.h index 6d1f9f4f1..c524bd375 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/instruction.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/instruction.h @@ -42,7 +42,7 @@ class Instruction { uint32_t id() const { return inst_.result_id; } uint32_t type_id() const { return inst_.type_id; } - SpvOp opcode() const { return static_cast(inst_.opcode); } + spv::Op opcode() const { return static_cast(inst_.opcode); } /// Returns the Function where the instruction was defined. nullptr if it was /// defined outside of a Function @@ -87,13 +87,13 @@ class Instruction { } bool IsNonSemantic() const { - return opcode() == SpvOp::SpvOpExtInst && + return opcode() == spv::Op::OpExtInst && spvExtInstIsNonSemantic(inst_.ext_inst_type); } /// True if this is an OpExtInst for debug info extension. bool IsDebugInfo() const { - return opcode() == SpvOp::SpvOpExtInst && + return opcode() == spv::Op::OpExtInst && spvExtInstIsDebugInfo(inst_.ext_inst_type); } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.cpp index 64df67ca2..32368075c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.cpp @@ -14,13 +14,9 @@ #include "source/val/validate.h" -#include -#include -#include #include #include #include -#include #include #include @@ -28,15 +24,11 @@ #include "source/diagnostic.h" #include "source/enum_string_mapping.h" #include "source/extensions.h" -#include "source/instruction.h" #include "source/opcode.h" -#include "source/operand.h" #include "source/spirv_constant.h" #include "source/spirv_endian.h" #include "source/spirv_target_env.h" -#include "source/spirv_validator_options.h" #include "source/val/construct.h" -#include "source/val/function.h" #include "source/val/instruction.h" #include "source/val/validation_state.h" #include "spirv-tools/libspirv.h" @@ -66,15 +58,15 @@ void RegisterExtension(ValidationState_t& _, // Parses the beginning of the module searching for OpExtension instructions. // Registers extensions if recognized. Returns SPV_REQUESTED_TERMINATION -// once an instruction which is not SpvOpCapability and SpvOpExtension is -// encountered. According to the SPIR-V spec extensions are declared after -// capabilities and before everything else. +// once an instruction which is not spv::Op::OpCapability and +// spv::Op::OpExtension is encountered. According to the SPIR-V spec extensions +// are declared after capabilities and before everything else. spv_result_t ProcessExtensions(void* user_data, const spv_parsed_instruction_t* inst) { - const SpvOp opcode = static_cast(inst->opcode); - if (opcode == SpvOpCapability) return SPV_SUCCESS; + const spv::Op opcode = static_cast(inst->opcode); + if (opcode == spv::Op::OpCapability) return SPV_SUCCESS; - if (opcode == SpvOpExtension) { + if (opcode == spv::Op::OpExtension) { ValidationState_t& _ = *(reinterpret_cast(user_data)); RegisterExtension(_, inst); return SPV_SUCCESS; @@ -123,7 +115,7 @@ spv_result_t ValidateEntryPoints(ValidationState_t& _) { _.ComputeFunctionToEntryPointMapping(); _.ComputeRecursiveEntryPoints(); - if (_.entry_points().empty() && !_.HasCapability(SpvCapabilityLinkage)) { + if (_.entry_points().empty() && !_.HasCapability(spv::Capability::Linkage)) { return _.diag(SPV_ERROR_INVALID_BINARY, nullptr) << "No OpEntryPoint instruction was found. This is only allowed if " "the Linkage capability is being used."; @@ -149,6 +141,13 @@ spv_result_t ValidateEntryPoints(ValidationState_t& _) { } } + if (auto error = ValidateFloatControls2(_)) { + return error; + } + if (auto error = ValidateDuplicateExecutionModes(_)) { + return error; + } + return SPV_SUCCESS; } @@ -209,6 +208,8 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( return error; } + bool has_mask_task_nv = false; + bool has_mask_task_ext = false; std::vector visited_entry_points; for (auto& instruction : vstate->ordered_instructions()) { { @@ -216,9 +217,9 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( // able to, briefly, de-const the instruction. Instruction* inst = const_cast(&instruction); - if (inst->opcode() == SpvOpEntryPoint) { + if (inst->opcode() == spv::Op::OpEntryPoint) { const auto entry_point = inst->GetOperandAs(1); - const auto execution_model = inst->GetOperandAs(0); + const auto execution_model = inst->GetOperandAs(0); const std::string desc_name = inst->GetOperandAs(2); ValidationState_t::EntryPointDescription desc; @@ -234,7 +235,7 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( if (visited_entry_points.size() > 0) { for (const Instruction* check_inst : visited_entry_points) { const auto check_execution_model = - check_inst->GetOperandAs(0); + check_inst->GetOperandAs(0); const std::string check_name = check_inst->GetOperandAs(2); @@ -247,8 +248,13 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( } } visited_entry_points.push_back(inst); + + has_mask_task_nv |= (execution_model == spv::ExecutionModel::TaskNV || + execution_model == spv::ExecutionModel::MeshNV); + has_mask_task_ext |= (execution_model == spv::ExecutionModel::TaskEXT || + execution_model == spv::ExecutionModel::MeshEXT); } - if (inst->opcode() == SpvOpFunctionCall) { + if (inst->opcode() == spv::Op::OpFunctionCall) { if (!vstate->in_function_body()) { return vstate->diag(SPV_ERROR_INVALID_LAYOUT, &instruction) << "A FunctionCall must happen within a function body."; @@ -279,7 +285,7 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( { Instruction* inst = const_cast(&instruction); vstate->RegisterInstruction(inst); - if (inst->opcode() == SpvOpTypeForwardPointer) { + if (inst->opcode() == spv::Op::OpTypeForwardPointer) { vstate->RegisterForwardPointer(inst->GetOperandAs(0)); } } @@ -293,6 +299,17 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( return vstate->diag(SPV_ERROR_INVALID_LAYOUT, nullptr) << "Missing OpFunctionEnd at end of module."; + if (vstate->HasCapability(spv::Capability::BindlessTextureNV) && + !vstate->has_samplerimage_variable_address_mode_specified()) + return vstate->diag(SPV_ERROR_INVALID_LAYOUT, nullptr) + << "Missing required OpSamplerImageAddressingModeNV instruction."; + + if (has_mask_task_ext && has_mask_task_nv) + return vstate->diag(SPV_ERROR_INVALID_LAYOUT, nullptr) + << vstate->VkErrorID(7102) + << "Module can't mix MeshEXT/TaskEXT with MeshNV/TaskNV Execution " + "Model."; + // Catch undefined forward references before performing further checks. if (auto error = ValidateForwardDecls(*vstate)) return error; @@ -345,10 +362,15 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( if (auto error = NonUniformPass(*vstate, &instruction)) return error; if (auto error = LiteralsPass(*vstate, &instruction)) return error; + if (auto error = RayQueryPass(*vstate, &instruction)) return error; + if (auto error = RayTracingPass(*vstate, &instruction)) return error; + if (auto error = RayReorderNVPass(*vstate, &instruction)) return error; + if (auto error = MeshShadingPass(*vstate, &instruction)) return error; } - // Validate the preconditions involving adjacent instructions. e.g. SpvOpPhi - // must only be preceeded by SpvOpLabel, SpvOpPhi, or SpvOpLine. + // Validate the preconditions involving adjacent instructions. e.g. + // spv::Op::OpPhi must only be preceded by spv::Op::OpLabel, spv::Op::OpPhi, + // or spv::Op::OpLine. if (auto error = ValidateAdjacency(*vstate)) return error; if (auto error = ValidateEntryPoints(*vstate)) return error; @@ -366,6 +388,8 @@ spv_result_t ValidateBinaryUsingContextAndValidationState( for (const auto& inst : vstate->ordered_instructions()) { if (auto error = ValidateExecutionLimitations(*vstate, &inst)) return error; if (auto error = ValidateSmallTypeUses(*vstate, &inst)) return error; + if (auto error = ValidateQCOMImageProcessingTextureUsages(*vstate, &inst)) + return error; } return SPV_SUCCESS; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.h index 3fc183de8..78093ce5f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate.h @@ -31,11 +31,6 @@ class ValidationState_t; class BasicBlock; class Instruction; -/// A function that returns a vector of BasicBlocks given a BasicBlock. Used to -/// get the successor and predecessor nodes of a CFG block -using get_blocks_func = - std::function*(const BasicBlock*)>; - /// @brief Performs the Control Flow Graph checks /// /// @param[in] _ the validation state of the module @@ -69,8 +64,8 @@ spv_result_t CheckIdDefinitionDominateUse(ValidationState_t& _); /// instructions. /// /// This function will iterate over all instructions and check for any required -/// predecessor and/or successor instructions. e.g. SpvOpPhi must only be -/// preceeded by SpvOpLabel, SpvOpPhi, or SpvOpLine. +/// predecessor and/or successor instructions. e.g. spv::Op::OpPhi must only be +/// preceded by spv::Op::OpLabel, spv::Op::OpPhi, or spv::Op::OpLine. /// /// @param[in] _ the validation state of the module /// @@ -87,6 +82,25 @@ spv_result_t ValidateAdjacency(ValidationState_t& _); /// @return SPV_SUCCESS if no errors are found. spv_result_t ValidateInterfaces(ValidationState_t& _); +/// @brief Validates entry point call tree requirements of +/// SPV_KHR_float_controls2 +/// +/// Checks that no entry point using FPFastMathDefault uses: +/// * FPFastMathMode Fast +/// * NoContraction +/// +/// @param[in] _ the validation state of the module +/// +/// @return SPV_SUCCESS if no errors are found. +spv_result_t ValidateFloatControls2(ValidationState_t& _); + +/// @brief Validates duplicated execution modes for each entry point. +/// +/// @param[in] _ the validation state of the module +/// +/// @return SPV_SUCCESS if no errors are found. +spv_result_t ValidateDuplicateExecutionModes(ValidationState_t& _); + /// @brief Validates memory instructions /// /// @param[in] _ the validation state of the module @@ -197,6 +211,18 @@ spv_result_t FunctionPass(ValidationState_t& _, const Instruction* inst); /// Validates correctness of miscellaneous instructions. spv_result_t MiscPass(ValidationState_t& _, const Instruction* inst); +/// Validates correctness of ray query instructions. +spv_result_t RayQueryPass(ValidationState_t& _, const Instruction* inst); + +/// Validates correctness of ray tracing instructions. +spv_result_t RayTracingPass(ValidationState_t& _, const Instruction* inst); + +/// Validates correctness of shader execution reorder instructions. +spv_result_t RayReorderNVPass(ValidationState_t& _, const Instruction* inst); + +/// Validates correctness of mesh shading instructions. +spv_result_t MeshShadingPass(ValidationState_t& _, const Instruction* inst); + /// Calculates the reachability of basic blocks. void ReachabilityPass(ValidationState_t& _); @@ -213,6 +239,14 @@ spv_result_t ValidateExecutionLimitations(ValidationState_t& _, spv_result_t ValidateSmallTypeUses(ValidationState_t& _, const Instruction* inst); +/// Validates restricted uses of QCOM decorated textures +/// +/// The textures that are decorated with some of QCOM image processing +/// decorations must be used in the specified QCOM image processing built-in +/// functions and not used in any other image functions. +spv_result_t ValidateQCOMImageProcessingTextureUsages(ValidationState_t& _, + const Instruction* inst); + /// @brief Validate the ID's within a SPIR-V binary /// /// @param[in] pInstructions array of instructions diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_adjacency.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_adjacency.cpp index 8e6c373ea..7e371c2f9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_adjacency.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_adjacency.cpp @@ -15,13 +15,10 @@ // Validates correctness of the intra-block preconditions of SPIR-V // instructions. -#include "source/val/validate.h" - #include -#include "source/diagnostic.h" -#include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -46,15 +43,15 @@ spv_result_t ValidateAdjacency(ValidationState_t& _) { for (size_t i = 0; i < instructions.size(); ++i) { const auto& inst = instructions[i]; switch (inst.opcode()) { - case SpvOpFunction: - case SpvOpFunctionParameter: + case spv::Op::OpFunction: + case spv::Op::OpFunctionParameter: adjacency_status = IN_NEW_FUNCTION; break; - case SpvOpLabel: + case spv::Op::OpLabel: adjacency_status = adjacency_status == IN_NEW_FUNCTION ? IN_ENTRY_BLOCK : PHI_VALID; break; - case SpvOpExtInst: + case spv::Op::OpExtInst: // If it is a debug info instruction, we do not change the status to // allow debug info instructions before OpVariable in a function. // TODO(https://gitlab.khronos.org/spirv/SPIR-V/issues/533): We need @@ -67,7 +64,7 @@ spv_result_t ValidateAdjacency(ValidationState_t& _) { adjacency_status = PHI_AND_VAR_INVALID; } break; - case SpvOpPhi: + case spv::Op::OpPhi: if (adjacency_status != PHI_VALID) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << "OpPhi must appear within a non-entry block before all " @@ -75,15 +72,15 @@ spv_result_t ValidateAdjacency(ValidationState_t& _) { << "(except for OpLine, which can be mixed with OpPhi)."; } break; - case SpvOpLine: - case SpvOpNoLine: + case spv::Op::OpLine: + case spv::Op::OpNoLine: break; - case SpvOpLoopMerge: + case spv::Op::OpLoopMerge: adjacency_status = PHI_AND_VAR_INVALID; if (i != (instructions.size() - 1)) { switch (instructions[i + 1].opcode()) { - case SpvOpBranch: - case SpvOpBranchConditional: + case spv::Op::OpBranch: + case spv::Op::OpBranchConditional: break; default: return _.diag(SPV_ERROR_INVALID_DATA, &inst) @@ -94,12 +91,12 @@ spv_result_t ValidateAdjacency(ValidationState_t& _) { } } break; - case SpvOpSelectionMerge: + case spv::Op::OpSelectionMerge: adjacency_status = PHI_AND_VAR_INVALID; if (i != (instructions.size() - 1)) { switch (instructions[i + 1].opcode()) { - case SpvOpBranchConditional: - case SpvOpSwitch: + case spv::Op::OpBranchConditional: + case spv::Op::OpSwitch: break; default: return _.diag(SPV_ERROR_INVALID_DATA, &inst) @@ -110,8 +107,9 @@ spv_result_t ValidateAdjacency(ValidationState_t& _) { } } break; - case SpvOpVariable: - if (inst.GetOperandAs(2) == SpvStorageClassFunction && + case spv::Op::OpVariable: + if (inst.GetOperandAs(2) == + spv::StorageClass::Function && adjacency_status != IN_ENTRY_BLOCK) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << "All OpVariable instructions in a function must be the " diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_annotation.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_annotation.cpp index 0614e1620..dac358578 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_annotation.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_annotation.cpp @@ -22,146 +22,14 @@ namespace spvtools { namespace val { namespace { -std::string LogStringForDecoration(uint32_t decoration) { - switch (decoration) { - case SpvDecorationRelaxedPrecision: - return "RelaxedPrecision"; - case SpvDecorationSpecId: - return "SpecId"; - case SpvDecorationBlock: - return "Block"; - case SpvDecorationBufferBlock: - return "BufferBlock"; - case SpvDecorationRowMajor: - return "RowMajor"; - case SpvDecorationColMajor: - return "ColMajor"; - case SpvDecorationArrayStride: - return "ArrayStride"; - case SpvDecorationMatrixStride: - return "MatrixStride"; - case SpvDecorationGLSLShared: - return "GLSLShared"; - case SpvDecorationGLSLPacked: - return "GLSLPacked"; - case SpvDecorationCPacked: - return "CPacked"; - case SpvDecorationBuiltIn: - return "BuiltIn"; - case SpvDecorationNoPerspective: - return "NoPerspective"; - case SpvDecorationFlat: - return "Flat"; - case SpvDecorationPatch: - return "Patch"; - case SpvDecorationCentroid: - return "Centroid"; - case SpvDecorationSample: - return "Sample"; - case SpvDecorationInvariant: - return "Invariant"; - case SpvDecorationRestrict: - return "Restrict"; - case SpvDecorationAliased: - return "Aliased"; - case SpvDecorationVolatile: - return "Volatile"; - case SpvDecorationConstant: - return "Constant"; - case SpvDecorationCoherent: - return "Coherent"; - case SpvDecorationNonWritable: - return "NonWritable"; - case SpvDecorationNonReadable: - return "NonReadable"; - case SpvDecorationUniform: - return "Uniform"; - case SpvDecorationSaturatedConversion: - return "SaturatedConversion"; - case SpvDecorationStream: - return "Stream"; - case SpvDecorationLocation: - return "Location"; - case SpvDecorationComponent: - return "Component"; - case SpvDecorationIndex: - return "Index"; - case SpvDecorationBinding: - return "Binding"; - case SpvDecorationDescriptorSet: - return "DescriptorSet"; - case SpvDecorationOffset: - return "Offset"; - case SpvDecorationXfbBuffer: - return "XfbBuffer"; - case SpvDecorationXfbStride: - return "XfbStride"; - case SpvDecorationFuncParamAttr: - return "FuncParamAttr"; - case SpvDecorationFPRoundingMode: - return "FPRoundingMode"; - case SpvDecorationFPFastMathMode: - return "FPFastMathMode"; - case SpvDecorationLinkageAttributes: - return "LinkageAttributes"; - case SpvDecorationNoContraction: - return "NoContraction"; - case SpvDecorationInputAttachmentIndex: - return "InputAttachmentIndex"; - case SpvDecorationAlignment: - return "Alignment"; - case SpvDecorationMaxByteOffset: - return "MaxByteOffset"; - case SpvDecorationAlignmentId: - return "AlignmentId"; - case SpvDecorationMaxByteOffsetId: - return "MaxByteOffsetId"; - case SpvDecorationNoSignedWrap: - return "NoSignedWrap"; - case SpvDecorationNoUnsignedWrap: - return "NoUnsignedWrap"; - case SpvDecorationExplicitInterpAMD: - return "ExplicitInterpAMD"; - case SpvDecorationOverrideCoverageNV: - return "OverrideCoverageNV"; - case SpvDecorationPassthroughNV: - return "PassthroughNV"; - case SpvDecorationViewportRelativeNV: - return "ViewportRelativeNV"; - case SpvDecorationSecondaryViewportRelativeNV: - return "SecondaryViewportRelativeNV"; - case SpvDecorationPerPrimitiveNV: - return "PerPrimitiveNV"; - case SpvDecorationPerViewNV: - return "PerViewNV"; - case SpvDecorationPerTaskNV: - return "PerTaskNV"; - case SpvDecorationPerVertexNV: - return "PerVertexNV"; - case SpvDecorationNonUniform: - return "NonUniform"; - case SpvDecorationRestrictPointer: - return "RestrictPointer"; - case SpvDecorationAliasedPointer: - return "AliasedPointer"; - case SpvDecorationCounterBuffer: - return "CounterBuffer"; - case SpvDecorationHlslSemanticGOOGLE: - return "HlslSemanticGOOGLE"; - default: - break; - } - return "Unknown"; -} - // Returns true if the decoration takes ID parameters. // TODO(dneto): This can be generated from the grammar. -bool DecorationTakesIdParameters(SpvDecoration type) { +bool DecorationTakesIdParameters(spv::Decoration type) { switch (type) { - case SpvDecorationUniformId: - case SpvDecorationAlignmentId: - case SpvDecorationMaxByteOffsetId: - case SpvDecorationHlslCounterBufferGOOGLE: + case spv::Decoration::UniformId: + case spv::Decoration::AlignmentId: + case spv::Decoration::MaxByteOffsetId: + case spv::Decoration::HlslCounterBufferGOOGLE: return true; default: break; @@ -169,14 +37,14 @@ bool DecorationTakesIdParameters(SpvDecoration type) { return false; } -bool IsMemberDecorationOnly(SpvDecoration dec) { +bool IsMemberDecorationOnly(spv::Decoration dec) { switch (dec) { - case SpvDecorationRowMajor: - case SpvDecorationColMajor: - case SpvDecorationMatrixStride: + case spv::Decoration::RowMajor: + case spv::Decoration::ColMajor: + case spv::Decoration::MatrixStride: // SPIR-V spec bug? Offset is generated on variables when dealing with // transform feedback. - // case SpvDecorationOffset: + // case spv::Decoration::Offset: return true; default: break; @@ -184,42 +52,42 @@ bool IsMemberDecorationOnly(SpvDecoration dec) { return false; } -bool IsNotMemberDecoration(SpvDecoration dec) { +bool IsNotMemberDecoration(spv::Decoration dec) { switch (dec) { - case SpvDecorationSpecId: - case SpvDecorationBlock: - case SpvDecorationBufferBlock: - case SpvDecorationArrayStride: - case SpvDecorationGLSLShared: - case SpvDecorationGLSLPacked: - case SpvDecorationCPacked: + case spv::Decoration::SpecId: + case spv::Decoration::Block: + case spv::Decoration::BufferBlock: + case spv::Decoration::ArrayStride: + case spv::Decoration::GLSLShared: + case spv::Decoration::GLSLPacked: + case spv::Decoration::CPacked: // TODO: https://github.com/KhronosGroup/glslang/issues/703: // glslang applies Restrict to structure members. - // case SpvDecorationRestrict: - case SpvDecorationAliased: - case SpvDecorationConstant: - case SpvDecorationUniform: - case SpvDecorationUniformId: - case SpvDecorationSaturatedConversion: - case SpvDecorationIndex: - case SpvDecorationBinding: - case SpvDecorationDescriptorSet: - case SpvDecorationFuncParamAttr: - case SpvDecorationFPRoundingMode: - case SpvDecorationFPFastMathMode: - case SpvDecorationLinkageAttributes: - case SpvDecorationNoContraction: - case SpvDecorationInputAttachmentIndex: - case SpvDecorationAlignment: - case SpvDecorationMaxByteOffset: - case SpvDecorationAlignmentId: - case SpvDecorationMaxByteOffsetId: - case SpvDecorationNoSignedWrap: - case SpvDecorationNoUnsignedWrap: - case SpvDecorationNonUniform: - case SpvDecorationRestrictPointer: - case SpvDecorationAliasedPointer: - case SpvDecorationCounterBuffer: + // case spv::Decoration::Restrict: + case spv::Decoration::Aliased: + case spv::Decoration::Constant: + case spv::Decoration::Uniform: + case spv::Decoration::UniformId: + case spv::Decoration::SaturatedConversion: + case spv::Decoration::Index: + case spv::Decoration::Binding: + case spv::Decoration::DescriptorSet: + case spv::Decoration::FuncParamAttr: + case spv::Decoration::FPRoundingMode: + case spv::Decoration::FPFastMathMode: + case spv::Decoration::LinkageAttributes: + case spv::Decoration::NoContraction: + case spv::Decoration::InputAttachmentIndex: + case spv::Decoration::Alignment: + case spv::Decoration::MaxByteOffset: + case spv::Decoration::AlignmentId: + case spv::Decoration::MaxByteOffsetId: + case spv::Decoration::NoSignedWrap: + case spv::Decoration::NoUnsignedWrap: + case spv::Decoration::NonUniform: + case spv::Decoration::RestrictPointer: + case spv::Decoration::AliasedPointer: + case spv::Decoration::CounterBuffer: return true; default: break; @@ -227,87 +95,88 @@ bool IsNotMemberDecoration(SpvDecoration dec) { return false; } -spv_result_t ValidateDecorationTarget(ValidationState_t& _, SpvDecoration dec, +spv_result_t ValidateDecorationTarget(ValidationState_t& _, spv::Decoration dec, const Instruction* inst, const Instruction* target) { auto fail = [&_, dec, inst, target](uint32_t vuid) -> DiagnosticStream { DiagnosticStream ds = std::move( _.diag(SPV_ERROR_INVALID_ID, inst) - << _.VkErrorID(vuid) << LogStringForDecoration(dec) - << " decoration on target '" << _.getIdName(target->id()) << "' "); + << _.VkErrorID(vuid) << _.SpvDecorationString(dec) + << " decoration on target " << _.getIdName(target->id()) << " "); return ds; }; switch (dec) { - case SpvDecorationSpecId: + case spv::Decoration::SpecId: if (!spvOpcodeIsScalarSpecConstant(target->opcode())) { return fail(0) << "must be a scalar specialization constant"; } break; - case SpvDecorationBlock: - case SpvDecorationBufferBlock: - case SpvDecorationGLSLShared: - case SpvDecorationGLSLPacked: - case SpvDecorationCPacked: - if (target->opcode() != SpvOpTypeStruct) { + case spv::Decoration::Block: + case spv::Decoration::BufferBlock: + case spv::Decoration::GLSLShared: + case spv::Decoration::GLSLPacked: + case spv::Decoration::CPacked: + if (target->opcode() != spv::Op::OpTypeStruct) { return fail(0) << "must be a structure type"; } break; - case SpvDecorationArrayStride: - if (target->opcode() != SpvOpTypeArray && - target->opcode() != SpvOpTypeRuntimeArray && - target->opcode() != SpvOpTypePointer) { + case spv::Decoration::ArrayStride: + if (target->opcode() != spv::Op::OpTypeArray && + target->opcode() != spv::Op::OpTypeRuntimeArray && + target->opcode() != spv::Op::OpTypePointer) { return fail(0) << "must be an array or pointer type"; } break; - case SpvDecorationBuiltIn: - if (target->opcode() != SpvOpVariable && + case spv::Decoration::BuiltIn: + if (target->opcode() != spv::Op::OpVariable && !spvOpcodeIsConstant(target->opcode())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "BuiltIns can only target variables, structure members or " "constants"; } - if (_.HasCapability(SpvCapabilityShader) && - inst->GetOperandAs(2) == SpvBuiltInWorkgroupSize) { + if (_.HasCapability(spv::Capability::Shader) && + inst->GetOperandAs(2) == spv::BuiltIn::WorkgroupSize) { if (!spvOpcodeIsConstant(target->opcode())) { return fail(0) << "must be a constant for WorkgroupSize"; } - } else if (target->opcode() != SpvOpVariable) { + } else if (target->opcode() != spv::Op::OpVariable) { return fail(0) << "must be a variable"; } break; - case SpvDecorationNoPerspective: - case SpvDecorationFlat: - case SpvDecorationPatch: - case SpvDecorationCentroid: - case SpvDecorationSample: - case SpvDecorationRestrict: - case SpvDecorationAliased: - case SpvDecorationVolatile: - case SpvDecorationCoherent: - case SpvDecorationNonWritable: - case SpvDecorationNonReadable: - case SpvDecorationXfbBuffer: - case SpvDecorationXfbStride: - case SpvDecorationComponent: - case SpvDecorationStream: - case SpvDecorationRestrictPointer: - case SpvDecorationAliasedPointer: - if (target->opcode() != SpvOpVariable && - target->opcode() != SpvOpFunctionParameter) { + case spv::Decoration::NoPerspective: + case spv::Decoration::Flat: + case spv::Decoration::Patch: + case spv::Decoration::Centroid: + case spv::Decoration::Sample: + case spv::Decoration::Restrict: + case spv::Decoration::Aliased: + case spv::Decoration::Volatile: + case spv::Decoration::Coherent: + case spv::Decoration::NonWritable: + case spv::Decoration::NonReadable: + case spv::Decoration::XfbBuffer: + case spv::Decoration::XfbStride: + case spv::Decoration::Component: + case spv::Decoration::Stream: + case spv::Decoration::RestrictPointer: + case spv::Decoration::AliasedPointer: + if (target->opcode() != spv::Op::OpVariable && + target->opcode() != spv::Op::OpFunctionParameter && + target->opcode() != spv::Op::OpRawAccessChainNV) { return fail(0) << "must be a memory object declaration"; } - if (_.GetIdOpcode(target->type_id()) != SpvOpTypePointer) { + if (_.GetIdOpcode(target->type_id()) != spv::Op::OpTypePointer) { return fail(0) << "must be a pointer type"; } break; - case SpvDecorationInvariant: - case SpvDecorationConstant: - case SpvDecorationLocation: - case SpvDecorationIndex: - case SpvDecorationBinding: - case SpvDecorationDescriptorSet: - case SpvDecorationInputAttachmentIndex: - if (target->opcode() != SpvOpVariable) { + case spv::Decoration::Invariant: + case spv::Decoration::Constant: + case spv::Decoration::Location: + case spv::Decoration::Index: + case spv::Decoration::Binding: + case spv::Decoration::DescriptorSet: + case spv::Decoration::InputAttachmentIndex: + if (target->opcode() != spv::Op::OpVariable) { return fail(0) << "must be a variable"; } break; @@ -317,52 +186,63 @@ spv_result_t ValidateDecorationTarget(ValidationState_t& _, SpvDecoration dec, if (spvIsVulkanEnv(_.context()->target_env)) { // The following were all checked as pointer types above. - SpvStorageClass sc = SpvStorageClassUniform; + spv::StorageClass sc = spv::StorageClass::Uniform; const auto type = _.FindDef(target->type_id()); if (type && type->operands().size() > 2) { - sc = type->GetOperandAs(1); + sc = type->GetOperandAs(1); } switch (dec) { - case SpvDecorationLocation: - case SpvDecorationComponent: - // Location is used for input, output and ray tracing stages. - if (sc == SpvStorageClassStorageBuffer || - sc == SpvStorageClassUniform || - sc == SpvStorageClassUniformConstant || - sc == SpvStorageClassWorkgroup || sc == SpvStorageClassPrivate || - sc == SpvStorageClassFunction) { + case spv::Decoration::Location: + case spv::Decoration::Component: + // Location is used for input, output, tile image, and ray tracing + // stages. + if (sc != spv::StorageClass::Input && sc != spv::StorageClass::Output && + sc != spv::StorageClass::RayPayloadKHR && + sc != spv::StorageClass::IncomingRayPayloadKHR && + sc != spv::StorageClass::HitAttributeKHR && + sc != spv::StorageClass::CallableDataKHR && + sc != spv::StorageClass::IncomingCallableDataKHR && + sc != spv::StorageClass::ShaderRecordBufferKHR && + sc != spv::StorageClass::HitObjectAttributeNV && + sc != spv::StorageClass::TileImageEXT) { return _.diag(SPV_ERROR_INVALID_ID, target) - << LogStringForDecoration(dec) + << _.VkErrorID(6672) << _.SpvDecorationString(dec) << " decoration must not be applied to this storage class"; } break; - case SpvDecorationIndex: - if (sc != SpvStorageClassOutput) { + case spv::Decoration::Index: + // Langauge from SPIR-V definition of Index + if (sc != spv::StorageClass::Output) { return fail(0) << "must be in the Output storage class"; } break; - case SpvDecorationBinding: - case SpvDecorationDescriptorSet: - if (sc != SpvStorageClassStorageBuffer && - sc != SpvStorageClassUniform && - sc != SpvStorageClassUniformConstant) { - return fail(0) << "must be in the StorageBuffer, Uniform, or " - "UniformConstant storage class"; + case spv::Decoration::Binding: + case spv::Decoration::DescriptorSet: + if (sc != spv::StorageClass::StorageBuffer && + sc != spv::StorageClass::Uniform && + sc != spv::StorageClass::UniformConstant) { + return fail(6491) << "must be in the StorageBuffer, Uniform, or " + "UniformConstant storage class"; } break; - case SpvDecorationInputAttachmentIndex: - if (sc != SpvStorageClassUniformConstant) { - return fail(0) << "must be in the UniformConstant storage class"; + case spv::Decoration::InputAttachmentIndex: + if (sc != spv::StorageClass::UniformConstant) { + return fail(6678) << "must be in the UniformConstant storage class"; } break; - case SpvDecorationFlat: - case SpvDecorationNoPerspective: - case SpvDecorationCentroid: - case SpvDecorationSample: - if (sc != SpvStorageClassInput && sc != SpvStorageClassOutput) { + case spv::Decoration::Flat: + case spv::Decoration::NoPerspective: + case spv::Decoration::Centroid: + case spv::Decoration::Sample: + if (sc != spv::StorageClass::Input && sc != spv::StorageClass::Output) { return fail(4670) << "storage class must be Input or Output"; } break; + case spv::Decoration::PerVertexKHR: + if (sc != spv::StorageClass::Input) { + return fail(6777) << "storage class must be Input"; + } + break; default: break; } @@ -371,7 +251,7 @@ spv_result_t ValidateDecorationTarget(ValidationState_t& _, SpvDecoration dec, } spv_result_t ValidateDecorate(ValidationState_t& _, const Instruction* inst) { - const auto decoration = inst->GetOperandAs(1); + const auto decoration = inst->GetOperandAs(1); const auto target_id = inst->GetOperandAs(0); const auto target = _.FindDef(target_id); if (!target) { @@ -379,25 +259,53 @@ spv_result_t ValidateDecorate(ValidationState_t& _, const Instruction* inst) { } if (spvIsVulkanEnv(_.context()->target_env)) { - if ((decoration == SpvDecorationGLSLShared) || - (decoration == SpvDecorationGLSLPacked)) { + if ((decoration == spv::Decoration::GLSLShared) || + (decoration == spv::Decoration::GLSLPacked)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << _.VkErrorID(4669) << "OpDecorate decoration '" - << LogStringForDecoration(decoration) + << _.SpvDecorationString(decoration) << "' is not valid for the Vulkan execution environment."; } } + if (decoration == spv::Decoration::FPFastMathMode) { + if (_.HasDecoration(target_id, spv::Decoration::NoContraction)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "FPFastMathMode and NoContraction cannot decorate the same " + "target"; + } + auto mask = inst->GetOperandAs(2); + if ((mask & spv::FPFastMathModeMask::AllowTransform) != + spv::FPFastMathModeMask::MaskNone && + ((mask & (spv::FPFastMathModeMask::AllowContract | + spv::FPFastMathModeMask::AllowReassoc)) != + (spv::FPFastMathModeMask::AllowContract | + spv::FPFastMathModeMask::AllowReassoc))) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "AllowReassoc and AllowContract must be specified when " + "AllowTransform is specified"; + } + } + + // This is checked from both sides since we register decorations as we go. + if (decoration == spv::Decoration::NoContraction) { + if (_.HasDecoration(target_id, spv::Decoration::FPFastMathMode)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "FPFastMathMode and NoContraction cannot decorate the same " + "target"; + } + } + if (DecorationTakesIdParameters(decoration)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Decorations taking ID parameters may not be used with " "OpDecorateId"; } - if (target->opcode() != SpvOpDecorationGroup) { + if (target->opcode() != spv::Op::OpDecorationGroup) { if (IsMemberDecorationOnly(decoration)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << LogStringForDecoration(decoration) + << _.SpvDecorationString(decoration) << " can only be applied to structure members"; } @@ -411,7 +319,7 @@ spv_result_t ValidateDecorate(ValidationState_t& _, const Instruction* inst) { } spv_result_t ValidateDecorateId(ValidationState_t& _, const Instruction* inst) { - const auto decoration = inst->GetOperandAs(1); + const auto decoration = inst->GetOperandAs(1); if (!DecorationTakesIdParameters(decoration)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Decorations that don't take ID parameters may not be used with " @@ -430,10 +338,10 @@ spv_result_t ValidateMemberDecorate(ValidationState_t& _, const Instruction* inst) { const auto struct_type_id = inst->GetOperandAs(0); const auto struct_type = _.FindDef(struct_type_id); - if (!struct_type || SpvOpTypeStruct != struct_type->opcode()) { + if (!struct_type || spv::Op::OpTypeStruct != struct_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpMemberDecorate Structure type '" - << _.getIdName(struct_type_id) << "' is not a struct type."; + << "OpMemberDecorate Structure type " + << _.getIdName(struct_type_id) << " is not a struct type."; } const auto member = inst->GetOperandAs(1); const auto member_count = @@ -447,10 +355,10 @@ spv_result_t ValidateMemberDecorate(ValidationState_t& _, << " members. Largest valid index is " << member_count - 1 << "."; } - const auto decoration = inst->GetOperandAs(2); + const auto decoration = inst->GetOperandAs(2); if (IsNotMemberDecoration(decoration)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << LogStringForDecoration(decoration) + << _.SpvDecorationString(decoration) << " cannot be applied to structure members"; } @@ -463,10 +371,11 @@ spv_result_t ValidateDecorationGroup(ValidationState_t& _, const auto decoration_group = _.FindDef(decoration_group_id); for (auto pair : decoration_group->uses()) { auto use = pair.first; - if (use->opcode() != SpvOpDecorate && use->opcode() != SpvOpGroupDecorate && - use->opcode() != SpvOpGroupMemberDecorate && - use->opcode() != SpvOpName && use->opcode() != SpvOpDecorateId && - !use->IsNonSemantic()) { + if (use->opcode() != spv::Op::OpDecorate && + use->opcode() != spv::Op::OpGroupDecorate && + use->opcode() != spv::Op::OpGroupMemberDecorate && + use->opcode() != spv::Op::OpName && + use->opcode() != spv::Op::OpDecorateId && !use->IsNonSemantic()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result id of OpDecorationGroup can only " << "be targeted by OpName, OpGroupDecorate, " @@ -480,19 +389,19 @@ spv_result_t ValidateGroupDecorate(ValidationState_t& _, const Instruction* inst) { const auto decoration_group_id = inst->GetOperandAs(0); auto decoration_group = _.FindDef(decoration_group_id); - if (!decoration_group || SpvOpDecorationGroup != decoration_group->opcode()) { + if (!decoration_group || + spv::Op::OpDecorationGroup != decoration_group->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpGroupDecorate Decoration group '" - << _.getIdName(decoration_group_id) - << "' is not a decoration group."; + << "OpGroupDecorate Decoration group " + << _.getIdName(decoration_group_id) << " is not a decoration group."; } for (unsigned i = 1; i < inst->operands().size(); ++i) { auto target_id = inst->GetOperandAs(i); auto target = _.FindDef(target_id); - if (!target || target->opcode() == SpvOpDecorationGroup) { + if (!target || target->opcode() == spv::Op::OpDecorationGroup) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpGroupDecorate may not target OpDecorationGroup '" - << _.getIdName(target_id) << "'"; + << "OpGroupDecorate may not target OpDecorationGroup " + << _.getIdName(target_id); } } return SPV_SUCCESS; @@ -502,11 +411,11 @@ spv_result_t ValidateGroupMemberDecorate(ValidationState_t& _, const Instruction* inst) { const auto decoration_group_id = inst->GetOperandAs(0); const auto decoration_group = _.FindDef(decoration_group_id); - if (!decoration_group || SpvOpDecorationGroup != decoration_group->opcode()) { + if (!decoration_group || + spv::Op::OpDecorationGroup != decoration_group->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpGroupMemberDecorate Decoration group '" - << _.getIdName(decoration_group_id) - << "' is not a decoration group."; + << "OpGroupMemberDecorate Decoration group " + << _.getIdName(decoration_group_id) << " is not a decoration group."; } // Grammar checks ensures that the number of arguments to this instruction // is an odd number: 1 decoration group + (id,literal) pairs. @@ -514,10 +423,10 @@ spv_result_t ValidateGroupMemberDecorate(ValidationState_t& _, const uint32_t struct_id = inst->GetOperandAs(i); const uint32_t index = inst->GetOperandAs(i + 1); auto struct_instr = _.FindDef(struct_id); - if (!struct_instr || SpvOpTypeStruct != struct_instr->opcode()) { + if (!struct_instr || spv::Op::OpTypeStruct != struct_instr->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpGroupMemberDecorate Structure type '" - << _.getIdName(struct_id) << "' is not a struct type."; + << "OpGroupMemberDecorate Structure type " + << _.getIdName(struct_id) << " is not a struct type."; } const uint32_t num_struct_members = static_cast(struct_instr->words().size() - 2); @@ -539,10 +448,11 @@ spv_result_t ValidateGroupMemberDecorate(ValidationState_t& _, spv_result_t RegisterDecorations(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: { + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: { const uint32_t target_id = inst->word(1); - const SpvDecoration dec_type = static_cast(inst->word(2)); + const spv::Decoration dec_type = + static_cast(inst->word(2)); std::vector dec_params; if (inst->words().size() > 3) { dec_params.insert(dec_params.end(), inst->words().begin() + 3, @@ -551,10 +461,11 @@ spv_result_t RegisterDecorations(ValidationState_t& _, _.RegisterDecorationForId(target_id, Decoration(dec_type, dec_params)); break; } - case SpvOpMemberDecorate: { + case spv::Op::OpMemberDecorate: { const uint32_t struct_id = inst->word(1); const uint32_t index = inst->word(2); - const SpvDecoration dec_type = static_cast(inst->word(3)); + const spv::Decoration dec_type = + static_cast(inst->word(3)); std::vector dec_params; if (inst->words().size() > 4) { dec_params.insert(dec_params.end(), inst->words().begin() + 4, @@ -564,16 +475,16 @@ spv_result_t RegisterDecorations(ValidationState_t& _, Decoration(dec_type, dec_params, index)); break; } - case SpvOpDecorationGroup: { + case spv::Op::OpDecorationGroup: { // We don't need to do anything right now. Assigning decorations to groups // will be taken care of via OpGroupDecorate. break; } - case SpvOpGroupDecorate: { + case spv::Op::OpGroupDecorate: { // Word 1 is the group . All subsequent words are target s that // are going to be decorated with the decorations. const uint32_t decoration_group_id = inst->word(1); - std::vector& group_decorations = + std::set& group_decorations = _.id_decorations(decoration_group_id); for (size_t i = 2; i < inst->words().size(); ++i) { const uint32_t target_id = inst->word(i); @@ -582,12 +493,12 @@ spv_result_t RegisterDecorations(ValidationState_t& _, } break; } - case SpvOpGroupMemberDecorate: { + case spv::Op::OpGroupMemberDecorate: { // Word 1 is the Decoration Group followed by (struct,literal) // pairs. All decorations of the group should be applied to all the struct // members that are specified in the instructions. const uint32_t decoration_group_id = inst->word(1); - std::vector& group_decorations = + std::set& group_decorations = _.id_decorations(decoration_group_id); // Grammar checks ensures that the number of arguments to this instruction // is an odd number: 1 decoration group + (id,literal) pairs. @@ -612,24 +523,24 @@ spv_result_t RegisterDecorations(ValidationState_t& _, spv_result_t AnnotationPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpDecorate: + case spv::Op::OpDecorate: if (auto error = ValidateDecorate(_, inst)) return error; break; - case SpvOpDecorateId: + case spv::Op::OpDecorateId: if (auto error = ValidateDecorateId(_, inst)) return error; break; - // TODO(dneto): SpvOpDecorateStringGOOGLE + // TODO(dneto): spv::Op::OpDecorateStringGOOGLE // See https://github.com/KhronosGroup/SPIRV-Tools/issues/2253 - case SpvOpMemberDecorate: + case spv::Op::OpMemberDecorate: if (auto error = ValidateMemberDecorate(_, inst)) return error; break; - case SpvOpDecorationGroup: + case spv::Op::OpDecorationGroup: if (auto error = ValidateDecorationGroup(_, inst)) return error; break; - case SpvOpGroupDecorate: + case spv::Op::OpGroupDecorate: if (auto error = ValidateGroupDecorate(_, inst)) return error; break; - case SpvOpGroupMemberDecorate: + case spv::Op::OpGroupMemberDecorate: if (auto error = ValidateGroupMemberDecorate(_, inst)) return error; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_arithmetics.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_arithmetics.cpp index 433330d74..b608a8595 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_arithmetics.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_arithmetics.cpp @@ -14,13 +14,11 @@ // Performs validation of arithmetic instructions. -#include "source/val/validate.h" - #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -28,29 +26,45 @@ namespace val { // Validates correctness of arithmetic instructions. spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpFAdd: - case SpvOpFSub: - case SpvOpFMul: - case SpvOpFDiv: - case SpvOpFRem: - case SpvOpFMod: - case SpvOpFNegate: { + case spv::Op::OpFAdd: + case spv::Op::OpFSub: + case spv::Op::OpFMul: + case spv::Op::OpFDiv: + case spv::Op::OpFRem: + case spv::Op::OpFMod: + case spv::Op::OpFNegate: { bool supportsCoopMat = - (opcode != SpvOpFMul && opcode != SpvOpFRem && opcode != SpvOpFMod); + (opcode != spv::Op::OpFMul && opcode != spv::Op::OpFRem && + opcode != spv::Op::OpFMod); if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type) && - !(supportsCoopMat && _.IsFloatCooperativeMatrixType(result_type))) + !(supportsCoopMat && _.IsFloatCooperativeMatrixType(result_type)) && + !(opcode == spv::Op::OpFMul && + _.IsCooperativeMatrixKHRType(result_type) && + _.IsFloatCooperativeMatrixType(result_type))) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected floating scalar or vector type as Result Type: " << spvOpcodeString(opcode); for (size_t operand_index = 2; operand_index < inst->operands().size(); ++operand_index) { - if (_.GetOperandTypeId(inst, operand_index) != result_type) + if (supportsCoopMat && _.IsCooperativeMatrixKHRType(result_type)) { + const uint32_t type_id = _.GetOperandTypeId(inst, operand_index); + if (!_.IsCooperativeMatrixKHRType(type_id) || + !_.IsFloatCooperativeMatrixType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected arithmetic operands to be of Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; + } + spv_result_t ret = + _.CooperativeMatrixShapesMatch(inst, type_id, result_type); + if (ret != SPV_SUCCESS) return ret; + } else if (_.GetOperandTypeId(inst, operand_index) != result_type) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected arithmetic operands to be of Result Type: " << spvOpcodeString(opcode) << " operand index " @@ -59,9 +73,9 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpUDiv: - case SpvOpUMod: { - bool supportsCoopMat = (opcode == SpvOpUDiv); + case spv::Op::OpUDiv: + case spv::Op::OpUMod: { + bool supportsCoopMat = (opcode == spv::Op::OpUDiv); if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type) && !(supportsCoopMat && @@ -72,7 +86,19 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { for (size_t operand_index = 2; operand_index < inst->operands().size(); ++operand_index) { - if (_.GetOperandTypeId(inst, operand_index) != result_type) + if (supportsCoopMat && _.IsCooperativeMatrixKHRType(result_type)) { + const uint32_t type_id = _.GetOperandTypeId(inst, operand_index); + if (!_.IsCooperativeMatrixKHRType(type_id) || + !_.IsUnsignedIntCooperativeMatrixType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected arithmetic operands to be of Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; + } + spv_result_t ret = + _.CooperativeMatrixShapesMatch(inst, type_id, result_type); + if (ret != SPV_SUCCESS) return ret; + } else if (_.GetOperandTypeId(inst, operand_index) != result_type) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected arithmetic operands to be of Result Type: " << spvOpcodeString(opcode) << " operand index " @@ -81,17 +107,21 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpISub: - case SpvOpIAdd: - case SpvOpIMul: - case SpvOpSDiv: - case SpvOpSMod: - case SpvOpSRem: - case SpvOpSNegate: { + case spv::Op::OpISub: + case spv::Op::OpIAdd: + case spv::Op::OpIMul: + case spv::Op::OpSDiv: + case spv::Op::OpSMod: + case spv::Op::OpSRem: + case spv::Op::OpSNegate: { bool supportsCoopMat = - (opcode != SpvOpIMul && opcode != SpvOpSRem && opcode != SpvOpSMod); + (opcode != spv::Op::OpIMul && opcode != spv::Op::OpSRem && + opcode != spv::Op::OpSMod); if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type) && - !(supportsCoopMat && _.IsIntCooperativeMatrixType(result_type))) + !(supportsCoopMat && _.IsIntCooperativeMatrixType(result_type)) && + !(opcode == spv::Op::OpIMul && + _.IsCooperativeMatrixKHRType(result_type) && + _.IsIntCooperativeMatrixType(result_type))) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as Result Type: " << spvOpcodeString(opcode); @@ -102,9 +132,26 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { for (size_t operand_index = 2; operand_index < inst->operands().size(); ++operand_index) { const uint32_t type_id = _.GetOperandTypeId(inst, operand_index); + + if (supportsCoopMat && _.IsCooperativeMatrixKHRType(result_type)) { + if (!_.IsCooperativeMatrixKHRType(type_id) || + !_.IsIntCooperativeMatrixType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected arithmetic operands to be of Result Type: " + << spvOpcodeString(opcode) << " operand index " + << operand_index; + } + spv_result_t ret = + _.CooperativeMatrixShapesMatch(inst, type_id, result_type); + if (ret != SPV_SUCCESS) return ret; + } + if (!type_id || (!_.IsIntScalarType(type_id) && !_.IsIntVectorType(type_id) && - !(supportsCoopMat && _.IsIntCooperativeMatrixType(result_type)))) + !(supportsCoopMat && _.IsIntCooperativeMatrixType(result_type)) && + !(opcode == spv::Op::OpIMul && + _.IsCooperativeMatrixKHRType(result_type) && + _.IsIntCooperativeMatrixType(result_type)))) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as operand: " << spvOpcodeString(opcode) << " operand index " @@ -125,7 +172,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpDot: { + case spv::Op::OpDot: { if (!_.IsFloatScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected float scalar type as Result Type: " @@ -155,14 +202,14 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { first_vector_num_components = num_components; } else if (num_components != first_vector_num_components) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected operands to have the same number of componenets: " + << "Expected operands to have the same number of components: " << spvOpcodeString(opcode); } } break; } - case SpvOpVectorTimesScalar: { + case spv::Op::OpVectorTimesScalar: { if (!_.IsFloatVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected float vector type as Result Type: " @@ -185,9 +232,9 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpMatrixTimesScalar: { + case spv::Op::OpMatrixTimesScalar: { if (!_.IsFloatMatrixType(result_type) && - !_.IsCooperativeMatrixType(result_type)) + !(_.IsCooperativeMatrixType(result_type))) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected float matrix type as Result Type: " << spvOpcodeString(opcode); @@ -209,7 +256,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpVectorTimesMatrix: { + case spv::Op::OpVectorTimesMatrix: { const uint32_t vector_type_id = _.GetOperandTypeId(inst, 2); const uint32_t matrix_type_id = _.GetOperandTypeId(inst, 3); @@ -259,7 +306,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpMatrixTimesVector: { + case spv::Op::OpMatrixTimesVector: { const uint32_t matrix_type_id = _.GetOperandTypeId(inst, 2); const uint32_t vector_type_id = _.GetOperandTypeId(inst, 3); @@ -303,7 +350,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpMatrixTimesMatrix: { + case spv::Op::OpMatrixTimesMatrix: { const uint32_t left_type_id = _.GetOperandTypeId(inst, 2); const uint32_t right_type_id = _.GetOperandTypeId(inst, 3); @@ -369,7 +416,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpOuterProduct: { + case spv::Op::OpOuterProduct: { const uint32_t left_type_id = _.GetOperandTypeId(inst, 2); const uint32_t right_type_id = _.GetOperandTypeId(inst, 3); @@ -407,10 +454,10 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpIAddCarry: - case SpvOpISubBorrow: - case SpvOpUMulExtended: - case SpvOpSMulExtended: { + case spv::Op::OpIAddCarry: + case spv::Op::OpISubBorrow: + case spv::Op::OpUMulExtended: + case spv::Op::OpSMulExtended: { std::vector result_types; if (!_.GetStructMemberTypes(result_type, &result_types)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -422,7 +469,7 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { << "Expected Result Type struct to have two members: " << spvOpcodeString(opcode); - if (opcode == SpvOpSMulExtended) { + if (opcode == spv::Op::OpSMulExtended) { if (!_.IsIntScalarType(result_types[0]) && !_.IsIntVectorType(result_types[0])) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -453,28 +500,114 @@ spv_result_t ArithmeticsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpCooperativeMatrixMulAddNV: { + case spv::Op::OpCooperativeMatrixMulAddNV: { const uint32_t D_type_id = _.GetOperandTypeId(inst, 1); const uint32_t A_type_id = _.GetOperandTypeId(inst, 2); const uint32_t B_type_id = _.GetOperandTypeId(inst, 3); const uint32_t C_type_id = _.GetOperandTypeId(inst, 4); - if (!_.IsCooperativeMatrixType(A_type_id)) { + if (!_.IsCooperativeMatrixNVType(A_type_id)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected cooperative matrix type as A Type: " << spvOpcodeString(opcode); } - if (!_.IsCooperativeMatrixType(B_type_id)) { + if (!_.IsCooperativeMatrixNVType(B_type_id)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected cooperative matrix type as B Type: " << spvOpcodeString(opcode); } - if (!_.IsCooperativeMatrixType(C_type_id)) { + if (!_.IsCooperativeMatrixNVType(C_type_id)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected cooperative matrix type as C Type: " << spvOpcodeString(opcode); } - if (!_.IsCooperativeMatrixType(D_type_id)) { + if (!_.IsCooperativeMatrixNVType(D_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected cooperative matrix type as Result Type: " + << spvOpcodeString(opcode); + } + + const auto A = _.FindDef(A_type_id); + const auto B = _.FindDef(B_type_id); + const auto C = _.FindDef(C_type_id); + const auto D = _.FindDef(D_type_id); + + std::tuple A_scope, B_scope, C_scope, D_scope, + A_rows, B_rows, C_rows, D_rows, A_cols, B_cols, C_cols, D_cols; + + A_scope = _.EvalInt32IfConst(A->GetOperandAs(2)); + B_scope = _.EvalInt32IfConst(B->GetOperandAs(2)); + C_scope = _.EvalInt32IfConst(C->GetOperandAs(2)); + D_scope = _.EvalInt32IfConst(D->GetOperandAs(2)); + + A_rows = _.EvalInt32IfConst(A->GetOperandAs(3)); + B_rows = _.EvalInt32IfConst(B->GetOperandAs(3)); + C_rows = _.EvalInt32IfConst(C->GetOperandAs(3)); + D_rows = _.EvalInt32IfConst(D->GetOperandAs(3)); + + A_cols = _.EvalInt32IfConst(A->GetOperandAs(4)); + B_cols = _.EvalInt32IfConst(B->GetOperandAs(4)); + C_cols = _.EvalInt32IfConst(C->GetOperandAs(4)); + D_cols = _.EvalInt32IfConst(D->GetOperandAs(4)); + + const auto notEqual = [](std::tuple X, + std::tuple Y) { + return (std::get<1>(X) && std::get<1>(Y) && + std::get<2>(X) != std::get<2>(Y)); + }; + + if (notEqual(A_scope, B_scope) || notEqual(A_scope, C_scope) || + notEqual(A_scope, D_scope) || notEqual(B_scope, C_scope) || + notEqual(B_scope, D_scope) || notEqual(C_scope, D_scope)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix scopes must match: " + << spvOpcodeString(opcode); + } + + if (notEqual(A_rows, C_rows) || notEqual(A_rows, D_rows) || + notEqual(C_rows, D_rows)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix 'M' mismatch: " + << spvOpcodeString(opcode); + } + + if (notEqual(B_cols, C_cols) || notEqual(B_cols, D_cols) || + notEqual(C_cols, D_cols)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix 'N' mismatch: " + << spvOpcodeString(opcode); + } + + if (notEqual(A_cols, B_rows)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix 'K' mismatch: " + << spvOpcodeString(opcode); + } + break; + } + + case spv::Op::OpCooperativeMatrixMulAddKHR: { + const uint32_t D_type_id = _.GetOperandTypeId(inst, 1); + const uint32_t A_type_id = _.GetOperandTypeId(inst, 2); + const uint32_t B_type_id = _.GetOperandTypeId(inst, 3); + const uint32_t C_type_id = _.GetOperandTypeId(inst, 4); + + if (!_.IsCooperativeMatrixAType(A_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix type must be A Type: " + << spvOpcodeString(opcode); + } + if (!_.IsCooperativeMatrixBType(B_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix type must be B Type: " + << spvOpcodeString(opcode); + } + if (!_.IsCooperativeMatrixAccType(C_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix type must be Accumulator Type: " + << spvOpcodeString(opcode); + } + if (!_.IsCooperativeMatrixKHRType(D_type_id)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected cooperative matrix type as Result Type: " << spvOpcodeString(opcode); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_atomics.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_atomics.cpp index cfa15d9f7..8ddef1789 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_atomics.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_atomics.cpp @@ -16,30 +16,29 @@ // Validates correctness of atomic SPIR-V instructions. -#include "source/val/validate.h" - -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_target_env.h" #include "source/util/bitutils.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validate_memory_semantics.h" #include "source/val/validate_scopes.h" #include "source/val/validation_state.h" namespace { -bool IsStorageClassAllowedByUniversalRules(uint32_t storage_class) { +bool IsStorageClassAllowedByUniversalRules(spv::StorageClass storage_class) { switch (storage_class) { - case SpvStorageClassUniform: - case SpvStorageClassStorageBuffer: - case SpvStorageClassWorkgroup: - case SpvStorageClassCrossWorkgroup: - case SpvStorageClassGeneric: - case SpvStorageClassAtomicCounter: - case SpvStorageClassImage: - case SpvStorageClassFunction: - case SpvStorageClassPhysicalStorageBufferEXT: + case spv::StorageClass::Uniform: + case spv::StorageClass::StorageBuffer: + case spv::StorageClass::Workgroup: + case spv::StorageClass::CrossWorkgroup: + case spv::StorageClass::Generic: + case spv::StorageClass::AtomicCounter: + case spv::StorageClass::Image: + case spv::StorageClass::Function: + case spv::StorageClass::PhysicalStorageBuffer: + case spv::StorageClass::TaskPayloadWorkgroupEXT: return true; break; default: @@ -47,10 +46,10 @@ bool IsStorageClassAllowedByUniversalRules(uint32_t storage_class) { } } -bool HasReturnType(uint32_t opcode) { +bool HasReturnType(spv::Op opcode) { switch (opcode) { - case SpvOpAtomicStore: - case SpvOpAtomicFlagClear: + case spv::Op::OpAtomicStore: + case spv::Op::OpAtomicFlagClear: return false; break; default: @@ -58,11 +57,11 @@ bool HasReturnType(uint32_t opcode) { } } -bool HasOnlyFloatReturnType(uint32_t opcode) { +bool HasOnlyFloatReturnType(spv::Op opcode) { switch (opcode) { - case SpvOpAtomicFAddEXT: - case SpvOpAtomicFMinEXT: - case SpvOpAtomicFMaxEXT: + case spv::Op::OpAtomicFAddEXT: + case spv::Op::OpAtomicFMinEXT: + case spv::Op::OpAtomicFMaxEXT: return true; break; default: @@ -70,21 +69,21 @@ bool HasOnlyFloatReturnType(uint32_t opcode) { } } -bool HasOnlyIntReturnType(uint32_t opcode) { +bool HasOnlyIntReturnType(spv::Op opcode) { switch (opcode) { - case SpvOpAtomicCompareExchange: - case SpvOpAtomicCompareExchangeWeak: - case SpvOpAtomicIIncrement: - case SpvOpAtomicIDecrement: - case SpvOpAtomicIAdd: - case SpvOpAtomicISub: - case SpvOpAtomicSMin: - case SpvOpAtomicUMin: - case SpvOpAtomicSMax: - case SpvOpAtomicUMax: - case SpvOpAtomicAnd: - case SpvOpAtomicOr: - case SpvOpAtomicXor: + case spv::Op::OpAtomicCompareExchange: + case spv::Op::OpAtomicCompareExchangeWeak: + case spv::Op::OpAtomicIIncrement: + case spv::Op::OpAtomicIDecrement: + case spv::Op::OpAtomicIAdd: + case spv::Op::OpAtomicISub: + case spv::Op::OpAtomicSMin: + case spv::Op::OpAtomicUMin: + case spv::Op::OpAtomicSMax: + case spv::Op::OpAtomicUMax: + case spv::Op::OpAtomicAnd: + case spv::Op::OpAtomicOr: + case spv::Op::OpAtomicXor: return true; break; default: @@ -92,10 +91,10 @@ bool HasOnlyIntReturnType(uint32_t opcode) { } } -bool HasIntOrFloatReturnType(uint32_t opcode) { +bool HasIntOrFloatReturnType(spv::Op opcode) { switch (opcode) { - case SpvOpAtomicLoad: - case SpvOpAtomicExchange: + case spv::Op::OpAtomicLoad: + case spv::Op::OpAtomicExchange: return true; break; default: @@ -103,9 +102,9 @@ bool HasIntOrFloatReturnType(uint32_t opcode) { } } -bool HasOnlyBoolReturnType(uint32_t opcode) { +bool HasOnlyBoolReturnType(spv::Op opcode) { switch (opcode) { - case SpvOpAtomicFlagTestAndSet: + case spv::Op::OpAtomicFlagTestAndSet: return true; break; default: @@ -120,37 +119,38 @@ namespace val { // Validates correctness of atomic instructions. spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); switch (opcode) { - case SpvOpAtomicLoad: - case SpvOpAtomicStore: - case SpvOpAtomicExchange: - case SpvOpAtomicFAddEXT: - case SpvOpAtomicCompareExchange: - case SpvOpAtomicCompareExchangeWeak: - case SpvOpAtomicIIncrement: - case SpvOpAtomicIDecrement: - case SpvOpAtomicIAdd: - case SpvOpAtomicISub: - case SpvOpAtomicSMin: - case SpvOpAtomicUMin: - case SpvOpAtomicFMinEXT: - case SpvOpAtomicSMax: - case SpvOpAtomicUMax: - case SpvOpAtomicFMaxEXT: - case SpvOpAtomicAnd: - case SpvOpAtomicOr: - case SpvOpAtomicXor: - case SpvOpAtomicFlagTestAndSet: - case SpvOpAtomicFlagClear: { + case spv::Op::OpAtomicLoad: + case spv::Op::OpAtomicStore: + case spv::Op::OpAtomicExchange: + case spv::Op::OpAtomicFAddEXT: + case spv::Op::OpAtomicCompareExchange: + case spv::Op::OpAtomicCompareExchangeWeak: + case spv::Op::OpAtomicIIncrement: + case spv::Op::OpAtomicIDecrement: + case spv::Op::OpAtomicIAdd: + case spv::Op::OpAtomicISub: + case spv::Op::OpAtomicSMin: + case spv::Op::OpAtomicUMin: + case spv::Op::OpAtomicFMinEXT: + case spv::Op::OpAtomicSMax: + case spv::Op::OpAtomicUMax: + case spv::Op::OpAtomicFMaxEXT: + case spv::Op::OpAtomicAnd: + case spv::Op::OpAtomicOr: + case spv::Op::OpAtomicXor: + case spv::Op::OpAtomicFlagTestAndSet: + case spv::Op::OpAtomicFlagClear: { const uint32_t result_type = inst->type_id(); - // All current atomics only are scalar result // Validate return type first so can just check if pointer type is same // (if applicable) if (HasReturnType(opcode)) { if (HasOnlyFloatReturnType(opcode) && - !_.IsFloatScalarType(result_type)) { + (!(_.HasCapability(spv::Capability::AtomicFloat16VectorNV) && + _.IsFloat16Vector2Or4Type(result_type)) && + !_.IsFloatScalarType(result_type))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Result Type to be float scalar type"; @@ -161,6 +161,9 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { << ": expected Result Type to be integer scalar type"; } else if (HasIntOrFloatReturnType(opcode) && !_.IsFloatScalarType(result_type) && + !(opcode == spv::Op::OpAtomicExchange && + _.HasCapability(spv::Capability::AtomicFloat16VectorNV) && + _.IsFloat16Vector2Or4Type(result_type)) && !_.IsIntScalarType(result_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) @@ -176,7 +179,7 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { uint32_t operand_index = HasReturnType(opcode) ? 2 : 0; const uint32_t pointer_type = _.GetOperandTypeId(inst, operand_index++); uint32_t data_type = 0; - uint32_t storage_class = 0; + spv::StorageClass storage_class; if (!_.GetPointerTypeInfo(pointer_type, &data_type, &storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) @@ -184,8 +187,8 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { } // Can't use result_type because OpAtomicStore doesn't have a result - if ( _.IsIntScalarType(data_type) &&_.GetBitWidth(data_type) == 64 && - !_.HasCapability(SpvCapabilityInt64Atomics)) { + if (_.IsIntScalarType(data_type) && _.GetBitWidth(data_type) == 64 && + !_.HasCapability(spv::Capability::Int64Atomics)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": 64-bit atomics require the Int64Atomics capability"; @@ -199,68 +202,87 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { } // Then Shader rules - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { // Vulkan environment rule if (spvIsVulkanEnv(_.context()->target_env)) { - if ((storage_class != SpvStorageClassUniform) && - (storage_class != SpvStorageClassStorageBuffer) && - (storage_class != SpvStorageClassWorkgroup) && - (storage_class != SpvStorageClassImage) && - (storage_class != SpvStorageClassPhysicalStorageBuffer)) { + if ((storage_class != spv::StorageClass::Uniform) && + (storage_class != spv::StorageClass::StorageBuffer) && + (storage_class != spv::StorageClass::Workgroup) && + (storage_class != spv::StorageClass::Image) && + (storage_class != spv::StorageClass::PhysicalStorageBuffer) && + (storage_class != spv::StorageClass::TaskPayloadWorkgroupEXT)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4686) << spvOpcodeString(opcode) << ": Vulkan spec only allows storage classes for atomic to " - "be: Uniform, Workgroup, Image, StorageBuffer, or " - "PhysicalStorageBuffer."; + "be: Uniform, Workgroup, Image, StorageBuffer, " + "PhysicalStorageBuffer or TaskPayloadWorkgroupEXT."; } - } else if (storage_class == SpvStorageClassFunction) { + } else if (storage_class == spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Function storage class forbidden when the Shader " "capability is declared."; } - if (opcode == SpvOpAtomicFAddEXT) { + if (opcode == spv::Op::OpAtomicFAddEXT) { // result type being float checked already - if ((_.GetBitWidth(result_type) == 16) && - (!_.HasCapability(SpvCapabilityAtomicFloat16AddEXT))) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << spvOpcodeString(opcode) - << ": float add atomics require the AtomicFloat32AddEXT " - "capability"; + if (_.GetBitWidth(result_type) == 16) { + if (_.IsFloat16Vector2Or4Type(result_type)) { + if (!_.HasCapability(spv::Capability::AtomicFloat16VectorNV)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << spvOpcodeString(opcode) + << ": float vector atomics require the " + "AtomicFloat16VectorNV capability"; + } else { + if (!_.HasCapability(spv::Capability::AtomicFloat16AddEXT)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << spvOpcodeString(opcode) + << ": float add atomics require the AtomicFloat32AddEXT " + "capability"; + } + } } if ((_.GetBitWidth(result_type) == 32) && - (!_.HasCapability(SpvCapabilityAtomicFloat32AddEXT))) { + (!_.HasCapability(spv::Capability::AtomicFloat32AddEXT))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": float add atomics require the AtomicFloat32AddEXT " "capability"; } if ((_.GetBitWidth(result_type) == 64) && - (!_.HasCapability(SpvCapabilityAtomicFloat64AddEXT))) { + (!_.HasCapability(spv::Capability::AtomicFloat64AddEXT))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": float add atomics require the AtomicFloat64AddEXT " "capability"; } - } else if (opcode == SpvOpAtomicFMinEXT || - opcode == SpvOpAtomicFMaxEXT) { - if ((_.GetBitWidth(result_type) == 16) && - (!_.HasCapability(SpvCapabilityAtomicFloat16MinMaxEXT))) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << spvOpcodeString(opcode) - << ": float min/max atomics require the " - "AtomicFloat16MinMaxEXT capability"; + } else if (opcode == spv::Op::OpAtomicFMinEXT || + opcode == spv::Op::OpAtomicFMaxEXT) { + if (_.GetBitWidth(result_type) == 16) { + if (_.IsFloat16Vector2Or4Type(result_type)) { + if (!_.HasCapability(spv::Capability::AtomicFloat16VectorNV)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << spvOpcodeString(opcode) + << ": float vector atomics require the " + "AtomicFloat16VectorNV capability"; + } else { + if (!_.HasCapability(spv::Capability::AtomicFloat16MinMaxEXT)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << spvOpcodeString(opcode) + << ": float min/max atomics require the " + "AtomicFloat16MinMaxEXT capability"; + } + } } if ((_.GetBitWidth(result_type) == 32) && - (!_.HasCapability(SpvCapabilityAtomicFloat32MinMaxEXT))) { + (!_.HasCapability(spv::Capability::AtomicFloat32MinMaxEXT))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": float min/max atomics require the " "AtomicFloat32MinMaxEXT capability"; } if ((_.GetBitWidth(result_type) == 64) && - (!_.HasCapability(SpvCapabilityAtomicFloat64MinMaxEXT))) { + (!_.HasCapability(spv::Capability::AtomicFloat64MinMaxEXT))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": float min/max atomics require the " @@ -271,10 +293,10 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { // And finally OpenCL environment rules if (spvIsOpenCLEnv(_.context()->target_env)) { - if ((storage_class != SpvStorageClassFunction) && - (storage_class != SpvStorageClassWorkgroup) && - (storage_class != SpvStorageClassCrossWorkgroup) && - (storage_class != SpvStorageClassGeneric)) { + if ((storage_class != spv::StorageClass::Function) && + (storage_class != spv::StorageClass::Workgroup) && + (storage_class != spv::StorageClass::CrossWorkgroup) && + (storage_class != spv::StorageClass::Generic)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": storage class must be Function, Workgroup, " @@ -282,7 +304,7 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { } if (_.context()->target_env == SPV_ENV_OPENCL_1_2) { - if (storage_class == SpvStorageClassGeneric) { + if (storage_class == spv::StorageClass::Generic) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Storage class cannot be Generic in OpenCL 1.2 " "environment"; @@ -291,15 +313,15 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { } // If result and pointer type are different, need to do special check here - if (opcode == SpvOpAtomicFlagTestAndSet || - opcode == SpvOpAtomicFlagClear) { + if (opcode == spv::Op::OpAtomicFlagTestAndSet || + opcode == spv::Op::OpAtomicFlagClear) { if (!_.IsIntScalarType(data_type) || _.GetBitWidth(data_type) != 32) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Pointer to point to a value of 32-bit integer " "type"; } - } else if (opcode == SpvOpAtomicStore) { + } else if (opcode == spv::Op::OpAtomicStore) { if (!_.IsFloatScalarType(data_type) && !_.IsIntScalarType(data_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) @@ -323,8 +345,8 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { memory_scope)) return error; - if (opcode == SpvOpAtomicCompareExchange || - opcode == SpvOpAtomicCompareExchangeWeak) { + if (opcode == spv::Op::OpAtomicCompareExchange || + opcode == spv::Op::OpAtomicCompareExchangeWeak) { const auto unequal_semantics_index = operand_index++; if (auto error = ValidateMemorySemantics( _, inst, unequal_semantics_index, memory_scope)) @@ -344,15 +366,15 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { _.EvalInt32IfConst( inst->GetOperandAs(unequal_semantics_index)); if (is_equal_const && is_unequal_const && - ((equal_value & SpvMemorySemanticsVolatileMask) ^ - (unequal_value & SpvMemorySemanticsVolatileMask))) { + ((equal_value & uint32_t(spv::MemorySemanticsMask::Volatile)) ^ + (unequal_value & uint32_t(spv::MemorySemanticsMask::Volatile)))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Volatile mask setting must match for Equal and Unequal " "memory semantics"; } } - if (opcode == SpvOpAtomicStore) { + if (opcode == spv::Op::OpAtomicStore) { const uint32_t value_type = _.GetOperandTypeId(inst, 3); if (value_type != data_type) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -360,10 +382,11 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { << ": expected Value type and the type pointed to by " "Pointer to be the same"; } - } else if (opcode != SpvOpAtomicLoad && opcode != SpvOpAtomicIIncrement && - opcode != SpvOpAtomicIDecrement && - opcode != SpvOpAtomicFlagTestAndSet && - opcode != SpvOpAtomicFlagClear) { + } else if (opcode != spv::Op::OpAtomicLoad && + opcode != spv::Op::OpAtomicIIncrement && + opcode != spv::Op::OpAtomicIDecrement && + opcode != spv::Op::OpAtomicFlagTestAndSet && + opcode != spv::Op::OpAtomicFlagClear) { const uint32_t value_type = _.GetOperandTypeId(inst, operand_index++); if (value_type != result_type) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -372,8 +395,8 @@ spv_result_t AtomicsPass(ValidationState_t& _, const Instruction* inst) { } } - if (opcode == SpvOpAtomicCompareExchange || - opcode == SpvOpAtomicCompareExchangeWeak) { + if (opcode == spv::Op::OpAtomicCompareExchange || + opcode == spv::Op::OpAtomicCompareExchangeWeak) { const uint32_t comparator_type = _.GetOperandTypeId(inst, operand_index++); if (comparator_type != result_type) { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_barriers.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_barriers.cpp index 3a9e3e7c5..0abd5c859 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_barriers.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_barriers.cpp @@ -16,11 +16,8 @@ #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" -#include "source/spirv_target_env.h" -#include "source/util/bitutils.h" #include "source/val/instruction.h" #include "source/val/validate.h" #include "source/val/validate_memory_semantics.h" @@ -32,25 +29,26 @@ namespace val { // Validates correctness of barrier instructions. spv_result_t BarriersPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpControlBarrier: { + case spv::Op::OpControlBarrier: { if (_.version() < SPV_SPIRV_VERSION_WORD(1, 3)) { _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - [](SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelTessellationControl && - model != SpvExecutionModelGLCompute && - model != SpvExecutionModelKernel && - model != SpvExecutionModelTaskNV && - model != SpvExecutionModelMeshNV) { + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::TessellationControl && + model != spv::ExecutionModel::GLCompute && + model != spv::ExecutionModel::Kernel && + model != spv::ExecutionModel::TaskNV && + model != spv::ExecutionModel::MeshNV) { if (message) { *message = "OpControlBarrier requires one of the following " "Execution " - "Models: TessellationControl, GLCompute or Kernel"; + "Models: TessellationControl, GLCompute, Kernel, " + "MeshNV or TaskNV"; } return false; } @@ -75,7 +73,7 @@ spv_result_t BarriersPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpMemoryBarrier: { + case spv::Op::OpMemoryBarrier: { const uint32_t memory_scope = inst->word(1); if (auto error = ValidateMemoryScope(_, inst, memory_scope)) { @@ -88,8 +86,8 @@ spv_result_t BarriersPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpNamedBarrierInitialize: { - if (_.GetIdOpcode(result_type) != SpvOpTypeNamedBarrier) { + case spv::Op::OpNamedBarrierInitialize: { + if (_.GetIdOpcode(result_type) != spv::Op::OpTypeNamedBarrier) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Result Type to be OpTypeNamedBarrier"; @@ -105,9 +103,9 @@ spv_result_t BarriersPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpMemoryNamedBarrier: { + case spv::Op::OpMemoryNamedBarrier: { const uint32_t named_barrier_type = _.GetOperandTypeId(inst, 0); - if (_.GetIdOpcode(named_barrier_type) != SpvOpTypeNamedBarrier) { + if (_.GetIdOpcode(named_barrier_type) != spv::Op::OpTypeNamedBarrier) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": expected Named Barrier to be of type OpTypeNamedBarrier"; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_bitwise.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_bitwise.cpp index d46b3fcab..d8d995814 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_bitwise.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_bitwise.cpp @@ -14,25 +14,56 @@ // Validates correctness of bitwise instructions. -#include "source/val/validate.h" - -#include "source/diagnostic.h" #include "source/opcode.h" +#include "source/spirv_target_env.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { namespace val { +// Validates when base and result need to be the same type +spv_result_t ValidateBaseType(ValidationState_t& _, const Instruction* inst, + const uint32_t base_type) { + const spv::Op opcode = inst->opcode(); + + if (!_.IsIntScalarType(base_type) && !_.IsIntVectorType(base_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(4781) + << "Expected int scalar or vector type for Base operand: " + << spvOpcodeString(opcode); + } + + // Vulkan has a restriction to 32 bit for base + if (spvIsVulkanEnv(_.context()->target_env)) { + if (_.GetBitWidth(base_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(4781) + << "Expected 32-bit int type for Base operand: " + << spvOpcodeString(opcode); + } + } + + // OpBitCount just needs same number of components + if (base_type != inst->type_id() && opcode != spv::Op::OpBitCount) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Base Type to be equal to Result Type: " + << spvOpcodeString(opcode); + } + + return SPV_SUCCESS; +} + // Validates correctness of bitwise instructions. spv_result_t BitwisePass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpShiftRightLogical: - case SpvOpShiftRightArithmetic: - case SpvOpShiftLeftLogical: { + case spv::Op::OpShiftRightLogical: + case spv::Op::OpShiftRightArithmetic: + case spv::Op::OpShiftLeftLogical: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as Result Type: " @@ -71,10 +102,10 @@ spv_result_t BitwisePass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpBitwiseOr: - case SpvOpBitwiseXor: - case SpvOpBitwiseAnd: - case SpvOpNot: { + case spv::Op::OpBitwiseOr: + case spv::Op::OpBitwiseXor: + case spv::Op::OpBitwiseAnd: + case spv::Op::OpNot: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as Result Type: " @@ -108,21 +139,15 @@ spv_result_t BitwisePass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpBitFieldInsert: { - if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); - + case spv::Op::OpBitFieldInsert: { const uint32_t base_type = _.GetOperandTypeId(inst, 2); const uint32_t insert_type = _.GetOperandTypeId(inst, 3); const uint32_t offset_type = _.GetOperandTypeId(inst, 4); const uint32_t count_type = _.GetOperandTypeId(inst, 5); - if (base_type != result_type) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + if (spv_result_t error = ValidateBaseType(_, inst, base_type)) { + return error; + } if (insert_type != result_type) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -141,21 +166,15 @@ spv_result_t BitwisePass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpBitFieldSExtract: - case SpvOpBitFieldUExtract: { - if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); - + case spv::Op::OpBitFieldSExtract: + case spv::Op::OpBitFieldUExtract: { const uint32_t base_type = _.GetOperandTypeId(inst, 2); const uint32_t offset_type = _.GetOperandTypeId(inst, 3); const uint32_t count_type = _.GetOperandTypeId(inst, 4); - if (base_type != result_type) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + if (spv_result_t error = ValidateBaseType(_, inst, base_type)) { + return error; + } if (!offset_type || !_.IsIntScalarType(offset_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -169,33 +188,27 @@ spv_result_t BitwisePass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpBitReverse: { - if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected int scalar or vector type as Result Type: " - << spvOpcodeString(opcode); - + case spv::Op::OpBitReverse: { const uint32_t base_type = _.GetOperandTypeId(inst, 2); - if (base_type != result_type) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Base Type to be equal to Result Type: " - << spvOpcodeString(opcode); + if (spv_result_t error = ValidateBaseType(_, inst, base_type)) { + return error; + } + break; } - case SpvOpBitCount: { + case spv::Op::OpBitCount: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as Result Type: " << spvOpcodeString(opcode); const uint32_t base_type = _.GetOperandTypeId(inst, 2); - if (!base_type || - (!_.IsIntScalarType(base_type) && !_.IsIntVectorType(base_type))) - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Base Type to be int scalar or vector: " - << spvOpcodeString(opcode); + + if (spv_result_t error = ValidateBaseType(_, inst, base_type)) { + return error; + } const uint32_t base_dimension = _.GetDimension(base_type); const uint32_t result_dimension = _.GetDimension(result_type); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_builtins.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_builtins.cpp index 57dde8ad9..a7e9942a0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_builtins.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_builtins.cpp @@ -24,10 +24,8 @@ #include #include #include -#include #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_target_env.h" #include "source/util/bitutils.h" @@ -62,7 +60,7 @@ spv_result_t GetUnderlyingType(ValidationState_t& _, const Instruction& inst, uint32_t* underlying_type) { if (decoration.struct_member_index() != Decoration::kInvalidMember) { - if (inst.opcode() != SpvOpTypeStruct) { + if (inst.opcode() != spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << GetIdDesc(inst) << "Attempted to get underlying data type via member index for " @@ -72,7 +70,7 @@ spv_result_t GetUnderlyingType(ValidationState_t& _, return SPV_SUCCESS; } - if (inst.opcode() == SpvOpTypeStruct) { + if (inst.opcode() == spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << GetIdDesc(inst) << " did not find an member index to get underlying data type for " @@ -84,7 +82,7 @@ spv_result_t GetUnderlyingType(ValidationState_t& _, return SPV_SUCCESS; } - uint32_t storage_class = 0; + spv::StorageClass storage_class; if (!_.GetPointerTypeInfo(inst.type_id(), underlying_type, &storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << GetIdDesc(inst) @@ -95,22 +93,22 @@ spv_result_t GetUnderlyingType(ValidationState_t& _, } // Returns Storage Class used by the instruction if applicable. -// Returns SpvStorageClassMax if not. -SpvStorageClass GetStorageClass(const Instruction& inst) { +// Returns spv::StorageClass::Max if not. +spv::StorageClass GetStorageClass(const Instruction& inst) { switch (inst.opcode()) { - case SpvOpTypePointer: - case SpvOpTypeForwardPointer: { - return SpvStorageClass(inst.word(2)); + case spv::Op::OpTypePointer: + case spv::Op::OpTypeForwardPointer: { + return spv::StorageClass(inst.word(2)); } - case SpvOpVariable: { - return SpvStorageClass(inst.word(3)); + case spv::Op::OpVariable: { + return spv::StorageClass(inst.word(3)); } - case SpvOpGenericCastToPtrExplicit: { - return SpvStorageClass(inst.word(4)); + case spv::Op::OpGenericCastToPtrExplicit: { + return spv::StorageClass(inst.word(4)); } default: { break; } } - return SpvStorageClassMax; + return spv::StorageClass::Max; } typedef enum VUIDError_ { @@ -120,52 +118,60 @@ typedef enum VUIDError_ { VUIDErrorMax, } VUIDError; -const static uint32_t NumVUIDBuiltins = 33; +const static uint32_t NumVUIDBuiltins = 39; typedef struct { - SpvBuiltIn builtIn; + spv::BuiltIn builtIn; uint32_t vuid[VUIDErrorMax]; // execution mode, storage class, type VUIDs } BuiltinVUIDMapping; +// Many built-ins have the same checks (Storage Class, Type, etc) +// This table provides a nice LUT for the VUIDs std::array builtinVUIDInfo = {{ // clang-format off - {SpvBuiltInSubgroupEqMask, {0, 4370, 4371}}, - {SpvBuiltInSubgroupGeMask, {0, 4372, 4373}}, - {SpvBuiltInSubgroupGtMask, {0, 4374, 4375}}, - {SpvBuiltInSubgroupLeMask, {0, 4376, 4377}}, - {SpvBuiltInSubgroupLtMask, {0, 4378, 4379}}, - {SpvBuiltInSubgroupLocalInvocationId, {0, 4380, 4381}}, - {SpvBuiltInSubgroupSize, {0, 4382, 4383}}, - {SpvBuiltInGlobalInvocationId, {4236, 4237, 4238}}, - {SpvBuiltInLocalInvocationId, {4281, 4282, 4283}}, - {SpvBuiltInNumWorkgroups, {4296, 4297, 4298}}, - {SpvBuiltInNumSubgroups, {4293, 4294, 4295}}, - {SpvBuiltInSubgroupId, {4367, 4368, 4369}}, - {SpvBuiltInWorkgroupId, {4422, 4423, 4424}}, - {SpvBuiltInHitKindKHR, {4242, 4243, 4244}}, - {SpvBuiltInHitTNV, {4245, 4246, 4247}}, - {SpvBuiltInInstanceCustomIndexKHR, {4251, 4252, 4253}}, - {SpvBuiltInInstanceId, {4254, 4255, 4256}}, - {SpvBuiltInRayGeometryIndexKHR, {4345, 4346, 4347}}, - {SpvBuiltInObjectRayDirectionKHR, {4299, 4300, 4301}}, - {SpvBuiltInObjectRayOriginKHR, {4302, 4303, 4304}}, - {SpvBuiltInObjectToWorldKHR, {4305, 4306, 4307}}, - {SpvBuiltInWorldToObjectKHR, {4434, 4435, 4436}}, - {SpvBuiltInIncomingRayFlagsKHR, {4248, 4249, 4250}}, - {SpvBuiltInRayTminKHR, {4351, 4352, 4353}}, - {SpvBuiltInRayTmaxKHR, {4348, 4349, 4350}}, - {SpvBuiltInWorldRayDirectionKHR, {4428, 4429, 4430}}, - {SpvBuiltInWorldRayOriginKHR, {4431, 4432, 4433}}, - {SpvBuiltInLaunchIdKHR, {4266, 4267, 4268}}, - {SpvBuiltInLaunchSizeKHR, {4269, 4270, 4271}}, - {SpvBuiltInFragInvocationCountEXT, {4217, 4218, 4219}}, - {SpvBuiltInFragSizeEXT, {4220, 4221, 4222}}, - {SpvBuiltInFragStencilRefEXT, {4223, 4224, 4225}}, - {SpvBuiltInFullyCoveredEXT, {4232, 4233, 4234}}, - // clang-format off -} }; - -uint32_t GetVUIDForBuiltin(SpvBuiltIn builtIn, VUIDError type) { + {spv::BuiltIn::SubgroupEqMask, {0, 4370, 4371}}, + {spv::BuiltIn::SubgroupGeMask, {0, 4372, 4373}}, + {spv::BuiltIn::SubgroupGtMask, {0, 4374, 4375}}, + {spv::BuiltIn::SubgroupLeMask, {0, 4376, 4377}}, + {spv::BuiltIn::SubgroupLtMask, {0, 4378, 4379}}, + {spv::BuiltIn::SubgroupLocalInvocationId, {0, 4380, 4381}}, + {spv::BuiltIn::SubgroupSize, {0, 4382, 4383}}, + {spv::BuiltIn::GlobalInvocationId, {4236, 4237, 4238}}, + {spv::BuiltIn::LocalInvocationId, {4281, 4282, 4283}}, + {spv::BuiltIn::NumWorkgroups, {4296, 4297, 4298}}, + {spv::BuiltIn::NumSubgroups, {4293, 4294, 4295}}, + {spv::BuiltIn::SubgroupId, {4367, 4368, 4369}}, + {spv::BuiltIn::WorkgroupId, {4422, 4423, 4424}}, + {spv::BuiltIn::HitKindKHR, {4242, 4243, 4244}}, + {spv::BuiltIn::HitTNV, {4245, 4246, 4247}}, + {spv::BuiltIn::InstanceCustomIndexKHR, {4251, 4252, 4253}}, + {spv::BuiltIn::InstanceId, {4254, 4255, 4256}}, + {spv::BuiltIn::RayGeometryIndexKHR, {4345, 4346, 4347}}, + {spv::BuiltIn::ObjectRayDirectionKHR, {4299, 4300, 4301}}, + {spv::BuiltIn::ObjectRayOriginKHR, {4302, 4303, 4304}}, + {spv::BuiltIn::ObjectToWorldKHR, {4305, 4306, 4307}}, + {spv::BuiltIn::WorldToObjectKHR, {4434, 4435, 4436}}, + {spv::BuiltIn::IncomingRayFlagsKHR, {4248, 4249, 4250}}, + {spv::BuiltIn::RayTminKHR, {4351, 4352, 4353}}, + {spv::BuiltIn::RayTmaxKHR, {4348, 4349, 4350}}, + {spv::BuiltIn::WorldRayDirectionKHR, {4428, 4429, 4430}}, + {spv::BuiltIn::WorldRayOriginKHR, {4431, 4432, 4433}}, + {spv::BuiltIn::LaunchIdKHR, {4266, 4267, 4268}}, + {spv::BuiltIn::LaunchSizeKHR, {4269, 4270, 4271}}, + {spv::BuiltIn::FragInvocationCountEXT, {4217, 4218, 4219}}, + {spv::BuiltIn::FragSizeEXT, {4220, 4221, 4222}}, + {spv::BuiltIn::FragStencilRefEXT, {4223, 4224, 4225}}, + {spv::BuiltIn::FullyCoveredEXT, {4232, 4233, 4234}}, + {spv::BuiltIn::CullMaskKHR, {6735, 6736, 6737}}, + {spv::BuiltIn::BaryCoordKHR, {4154, 4155, 4156}}, + {spv::BuiltIn::BaryCoordNoPerspKHR, {4160, 4161, 4162}}, + {spv::BuiltIn::PrimitivePointIndicesEXT, {7041, 7043, 7044}}, + {spv::BuiltIn::PrimitiveLineIndicesEXT, {7047, 7049, 7050}}, + {spv::BuiltIn::PrimitiveTriangleIndicesEXT, {7053, 7055, 7056}}, + // clang-format on +}}; + +uint32_t GetVUIDForBuiltin(spv::BuiltIn builtIn, VUIDError type) { uint32_t vuid = 0; for (const auto& iter: builtinVUIDInfo) { if (iter.builtIn == builtIn) { @@ -177,56 +183,57 @@ uint32_t GetVUIDForBuiltin(SpvBuiltIn builtIn, VUIDError type) { return vuid; } -bool IsExecutionModelValidForRtBuiltIn(SpvBuiltIn builtin, - SpvExecutionModel stage) { +bool IsExecutionModelValidForRtBuiltIn(spv::BuiltIn builtin, + spv::ExecutionModel stage) { switch (builtin) { - case SpvBuiltInHitKindKHR: - case SpvBuiltInHitTNV: - if (stage == SpvExecutionModelAnyHitKHR || - stage == SpvExecutionModelClosestHitKHR) { + case spv::BuiltIn::HitKindKHR: + case spv::BuiltIn::HitTNV: + if (stage == spv::ExecutionModel::AnyHitKHR || + stage == spv::ExecutionModel::ClosestHitKHR) { return true; } break; - case SpvBuiltInInstanceCustomIndexKHR: - case SpvBuiltInInstanceId: - case SpvBuiltInRayGeometryIndexKHR: - case SpvBuiltInObjectRayDirectionKHR: - case SpvBuiltInObjectRayOriginKHR: - case SpvBuiltInObjectToWorldKHR: - case SpvBuiltInWorldToObjectKHR: + case spv::BuiltIn::InstanceCustomIndexKHR: + case spv::BuiltIn::InstanceId: + case spv::BuiltIn::RayGeometryIndexKHR: + case spv::BuiltIn::ObjectRayDirectionKHR: + case spv::BuiltIn::ObjectRayOriginKHR: + case spv::BuiltIn::ObjectToWorldKHR: + case spv::BuiltIn::WorldToObjectKHR: switch (stage) { - case SpvExecutionModelIntersectionKHR: - case SpvExecutionModelAnyHitKHR: - case SpvExecutionModelClosestHitKHR: + case spv::ExecutionModel::IntersectionKHR: + case spv::ExecutionModel::AnyHitKHR: + case spv::ExecutionModel::ClosestHitKHR: return true; default: return false; } break; - case SpvBuiltInIncomingRayFlagsKHR: - case SpvBuiltInRayTminKHR: - case SpvBuiltInRayTmaxKHR: - case SpvBuiltInWorldRayDirectionKHR: - case SpvBuiltInWorldRayOriginKHR: + case spv::BuiltIn::IncomingRayFlagsKHR: + case spv::BuiltIn::RayTminKHR: + case spv::BuiltIn::RayTmaxKHR: + case spv::BuiltIn::WorldRayDirectionKHR: + case spv::BuiltIn::WorldRayOriginKHR: + case spv::BuiltIn::CullMaskKHR: switch (stage) { - case SpvExecutionModelIntersectionKHR: - case SpvExecutionModelAnyHitKHR: - case SpvExecutionModelClosestHitKHR: - case SpvExecutionModelMissKHR: + case spv::ExecutionModel::IntersectionKHR: + case spv::ExecutionModel::AnyHitKHR: + case spv::ExecutionModel::ClosestHitKHR: + case spv::ExecutionModel::MissKHR: return true; default: return false; } break; - case SpvBuiltInLaunchIdKHR: - case SpvBuiltInLaunchSizeKHR: + case spv::BuiltIn::LaunchIdKHR: + case spv::BuiltIn::LaunchSizeKHR: switch (stage) { - case SpvExecutionModelRayGenerationKHR: - case SpvExecutionModelIntersectionKHR: - case SpvExecutionModelAnyHitKHR: - case SpvExecutionModelClosestHitKHR: - case SpvExecutionModelMissKHR: - case SpvExecutionModelCallableKHR: + case spv::ExecutionModel::RayGenerationKHR: + case spv::ExecutionModel::IntersectionKHR: + case spv::ExecutionModel::AnyHitKHR: + case spv::ExecutionModel::ClosestHitKHR: + case spv::ExecutionModel::MissKHR: + case spv::ExecutionModel::CallableKHR: return true; default: return false; @@ -329,9 +336,11 @@ class BuiltInsValidator { // Used for GlobalInvocationId, LocalInvocationId, NumWorkgroups, WorkgroupId. spv_result_t ValidateComputeShaderI32Vec3InputAtDefinition( const Decoration& decoration, const Instruction& inst); - spv_result_t ValidateSMBuiltinsAtDefinition(const Decoration& decoration, + spv_result_t ValidateNVSMOrARMCoreBuiltinsAtDefinition(const Decoration& decoration, const Instruction& inst); - + // Used for BaryCoord, BaryCoordNoPersp. + spv_result_t ValidateFragmentShaderF32Vec3InputAtDefinition( + const Decoration& decoration, const Instruction& inst); // Used for SubgroupEqMask, SubgroupGeMask, SubgroupGtMask, SubgroupLtMask, // SubgroupLeMask. spv_result_t ValidateI32Vec4InputAtDefinition(const Decoration& decoration, @@ -352,6 +361,9 @@ class BuiltInsValidator { spv_result_t ValidateRayTracingBuiltinsAtDefinition( const Decoration& decoration, const Instruction& inst); + spv_result_t ValidateMeshShadingEXTBuiltinsAtDefinition( + const Decoration& decoration, const Instruction& inst); + // The following section contains functions which are called when id defined // by |referenced_inst| is // 1. referenced by |referenced_from_inst| @@ -509,13 +521,20 @@ class BuiltInsValidator { const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst); + + // Used for BaryCoord, BaryCoordNoPersp. + spv_result_t ValidateFragmentShaderF32Vec3InputAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + // Used for SubgroupId and NumSubgroups. spv_result_t ValidateComputeI32InputAtReference( const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst); - spv_result_t ValidateSMBuiltinsAtReference( + spv_result_t ValidateNVSMOrARMCoreBuiltinsAtReference( const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst); @@ -535,6 +554,11 @@ class BuiltInsValidator { const Instruction& referenced_inst, const Instruction& referenced_from_inst); + spv_result_t ValidateMeshShadingEXTBuiltinsAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst); + // Validates that |built_in_inst| is not (even indirectly) referenced from // within a function which can be called with |execution_model|. // @@ -546,7 +570,7 @@ class BuiltInsValidator { // |referenced_from_inst| - instruction which references id defined by // |referenced_inst| from within a function. spv_result_t ValidateNotCalledWithExecutionModel( - int vuid, const char* comment, SpvExecutionModel execution_model, + int vuid, const char* comment, spv::ExecutionModel execution_model, const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst); @@ -570,6 +594,10 @@ class BuiltInsValidator { spv_result_t ValidateI32Arr( const Decoration& decoration, const Instruction& inst, const std::function& diag); + spv_result_t ValidateArrayedI32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag); spv_result_t ValidateOptionalArrayedI32( const Decoration& decoration, const Instruction& inst, const std::function& diag); @@ -629,7 +657,7 @@ class BuiltInsValidator { const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst, - SpvExecutionModel execution_model = SpvExecutionModelMax) const; + spv::ExecutionModel execution_model = spv::ExecutionModel::Max) const; // Generates strings like "ID <51> (OpTypePointer) uses storage class // UniformConstant". @@ -658,12 +686,12 @@ class BuiltInsValidator { const std::vector* entry_points_ = &no_entry_points; // Execution models with which the current function can be called. - std::set execution_models_; + std::set execution_models_; }; void BuiltInsValidator::Update(const Instruction& inst) { - const SpvOp opcode = inst.opcode(); - if (opcode == SpvOpFunction) { + const spv::Op opcode = inst.opcode(); + if (opcode == spv::Op::OpFunction) { // Entering a function. assert(function_id_ == 0); function_id_ = inst.id(); @@ -678,7 +706,7 @@ void BuiltInsValidator::Update(const Instruction& inst) { } } - if (opcode == SpvOpFunctionEnd) { + if (opcode == spv::Op::OpFunctionEnd) { // Exiting a function. assert(function_id_ != 0); function_id_ = 0; @@ -691,7 +719,7 @@ std::string BuiltInsValidator::GetDefinitionDesc( const Decoration& decoration, const Instruction& inst) const { std::ostringstream ss; if (decoration.struct_member_index() != Decoration::kInvalidMember) { - assert(inst.opcode() == SpvOpTypeStruct); + assert(inst.opcode() == spv::Op::OpTypeStruct); ss << "Member #" << decoration.struct_member_index(); ss << " of struct ID <" << inst.id() << ">"; } else { @@ -703,7 +731,7 @@ std::string BuiltInsValidator::GetDefinitionDesc( std::string BuiltInsValidator::GetReferenceDesc( const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst, - SpvExecutionModel execution_model) const { + spv::ExecutionModel execution_model) const { std::ostringstream ss; ss << GetIdDesc(referenced_from_inst) << " is referencing " << GetIdDesc(referenced_inst); @@ -716,10 +744,10 @@ std::string BuiltInsValidator::GetReferenceDesc( decoration.params()[0]); if (function_id_) { ss << " in function <" << function_id_ << ">"; - if (execution_model != SpvExecutionModelMax) { + if (execution_model != spv::ExecutionModel::Max) { ss << " called with execution model "; ss << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_EXECUTION_MODEL, - execution_model); + uint32_t(execution_model)); } } ss << "."; @@ -731,7 +759,7 @@ std::string BuiltInsValidator::GetStorageClassDesc( std::ostringstream ss; ss << GetIdDesc(inst) << " uses storage class "; ss << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_STORAGE_CLASS, - GetStorageClass(inst)); + uint32_t(GetStorageClass(inst))); ss << "."; return ss.str(); } @@ -790,7 +818,7 @@ spv_result_t BuiltInsValidator::ValidateOptionalArrayedI32( } // Strip the array, if present. - if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + if (_.GetIdOpcode(underlying_type) == spv::Op::OpTypeArray) { underlying_type = _.FindDef(underlying_type)->word(2u); } @@ -826,7 +854,7 @@ spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32( } // Strip the array, if present. - if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + if (_.GetIdOpcode(underlying_type) == spv::Op::OpTypeArray) { underlying_type = _.FindDef(underlying_type)->word(2u); } @@ -898,6 +926,45 @@ spv_result_t BuiltInsValidator::ValidateI32Vec( return SPV_SUCCESS; } +spv_result_t BuiltInsValidator::ValidateArrayedI32Vec( + const Decoration& decoration, const Instruction& inst, + uint32_t num_components, + const std::function& diag) { + uint32_t underlying_type = 0; + if (spv_result_t error = + GetUnderlyingType(_, decoration, inst, &underlying_type)) { + return error; + } + + const Instruction* const type_inst = _.FindDef(underlying_type); + if (type_inst->opcode() != spv::Op::OpTypeArray) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an array."); + } + + const uint32_t component_type = type_inst->word(2); + if (!_.IsIntVectorType(component_type)) { + return diag(GetDefinitionDesc(decoration, inst) + " is not an int vector."); + } + + const uint32_t actual_num_components = _.GetDimension(component_type); + if (_.GetDimension(component_type) != num_components) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) << " has " + << actual_num_components << " components."; + return diag(ss.str()); + } + + const uint32_t bit_width = _.GetBitWidth(component_type); + if (bit_width != 32) { + std::ostringstream ss; + ss << GetDefinitionDesc(decoration, inst) + << " has components with bit width " << bit_width << "."; + return diag(ss.str()); + } + + return SPV_SUCCESS; +} + spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32Vec( const Decoration& decoration, const Instruction& inst, uint32_t num_components, @@ -909,7 +976,7 @@ spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32Vec( } // Strip the array, if present. - if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + if (_.GetIdOpcode(underlying_type) == spv::Op::OpTypeArray) { underlying_type = _.FindDef(underlying_type)->word(2u); } @@ -970,7 +1037,7 @@ spv_result_t BuiltInsValidator::ValidateI32Arr( } const Instruction* const type_inst = _.FindDef(underlying_type); - if (type_inst->opcode() != SpvOpTypeArray) { + if (type_inst->opcode() != spv::Op::OpTypeArray) { return diag(GetDefinitionDesc(decoration, inst) + " is not an array."); } @@ -1016,9 +1083,9 @@ spv_result_t BuiltInsValidator::ValidateOptionalArrayedF32Arr( } // Strip an extra layer of arraying if present. - if (_.GetIdOpcode(underlying_type) == SpvOpTypeArray) { + if (_.GetIdOpcode(underlying_type) == spv::Op::OpTypeArray) { uint32_t subtype = _.FindDef(underlying_type)->word(2u); - if (_.GetIdOpcode(subtype) == SpvOpTypeArray) { + if (_.GetIdOpcode(subtype) == spv::Op::OpTypeArray) { underlying_type = subtype; } } @@ -1033,7 +1100,7 @@ spv_result_t BuiltInsValidator::ValidateF32ArrHelper( const std::function& diag, uint32_t underlying_type) { const Instruction* const type_inst = _.FindDef(underlying_type); - if (type_inst->opcode() != SpvOpTypeArray) { + if (type_inst->opcode() != spv::Op::OpTypeArray) { return diag(GetDefinitionDesc(decoration, inst) + " is not an array."); } @@ -1053,7 +1120,7 @@ spv_result_t BuiltInsValidator::ValidateF32ArrHelper( if (num_components != 0) { uint64_t actual_num_components = 0; - if (!_.GetConstantValUint64(type_inst->word(3), &actual_num_components)) { + if (!_.EvalConstantValUint64(type_inst->word(3), &actual_num_components)) { assert(0 && "Array type definition is corrupt"); } if (actual_num_components != num_components) { @@ -1094,14 +1161,14 @@ spv_result_t BuiltInsValidator::ValidateF32Mat( } spv_result_t BuiltInsValidator::ValidateNotCalledWithExecutionModel( - int vuid, const char* comment, SpvExecutionModel execution_model, + int vuid, const char* comment, spv::ExecutionModel execution_model, const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (function_id_) { if (execution_models_.count(execution_model)) { const char* execution_model_str = _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_EXECUTION_MODEL, execution_model); + SPV_OPERAND_TYPE_EXECUTION_MODEL, uint32_t(execution_model)); const char* built_in_str = _.grammar().lookupOperandName( SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) @@ -1136,11 +1203,11 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { - uint32_t vuid = (decoration.params()[0] == SpvBuiltInClipDistance) ? 4190 : 4199; + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4190 : 4199; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -1152,47 +1219,54 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassInput) { + if (storage_class == spv::StorageClass::Input) { assert(function_id_ == 0); - uint32_t vuid = (decoration.params()[0] == SpvBuiltInClipDistance) ? 4188 : 4197; + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4188 : 4197; id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " "used for variables with Input storage class if execution model is " "Vertex.", - SpvExecutionModelVertex, decoration, built_in_inst, + spv::ExecutionModel::Vertex, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " "used for variables with Input storage class if execution model is " - "Vertex.", - SpvExecutionModelMeshNV, decoration, built_in_inst, + "MeshNV.", + spv::ExecutionModel::MeshNV, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, + "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " + "used for variables with Input storage class if execution model is " + "MeshEXT.", + spv::ExecutionModel::MeshEXT, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - if (storage_class == SpvStorageClassOutput) { + if (storage_class == spv::StorageClass::Output) { assert(function_id_ == 0); - uint32_t vuid = (decoration.params()[0] == SpvBuiltInClipDistance) ? 4189 : 4198; + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4189 : 4198; id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, "Vulkan spec doesn't allow BuiltIn ClipDistance/CullDistance to be " "used for variables with Output storage class if execution model is " "Fragment.", - SpvExecutionModelFragment, decoration, built_in_inst, + spv::ExecutionModel::Fragment, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelFragment: - case SpvExecutionModelVertex: { + case spv::ExecutionModel::Fragment: + case spv::ExecutionModel::Vertex: { if (spv_result_t error = ValidateF32Arr( decoration, built_in_inst, /* Any number of components */ 0, [this, &decoration, &referenced_from_inst]( const std::string& message) -> spv_result_t { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInClipDistance) + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4191 : 4200; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) @@ -1208,10 +1282,11 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( } break; } - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - case SpvExecutionModelGeometry: - case SpvExecutionModelMeshNV: { + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: { if (decoration.struct_member_index() != Decoration::kInvalidMember) { // The outer level of array is applied on the variable. if (spv_result_t error = ValidateF32Arr( @@ -1219,7 +1294,7 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( [this, &decoration, &referenced_from_inst]( const std::string& message) -> spv_result_t { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInClipDistance) + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4191 : 4200; return _.diag(SPV_ERROR_INVALID_DATA, @@ -1240,7 +1315,7 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( [this, &decoration, &referenced_from_inst]( const std::string& message) -> spv_result_t { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInClipDistance) + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4191 : 4200; return _.diag(SPV_ERROR_INVALID_DATA, @@ -1261,7 +1336,7 @@ spv_result_t BuiltInsValidator::ValidateClipOrCullDistanceAtReference( default: { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInClipDistance) ? 4187 : 4196; + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::ClipDistance) ? 4187 : 4196; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -1314,9 +1389,9 @@ spv_result_t BuiltInsValidator::ValidateFragCoordAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4211) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn FragCoord to be only used for " @@ -1326,8 +1401,8 @@ spv_result_t BuiltInsValidator::ValidateFragCoordAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4210) << spvLogStringForEnv(_.context()->target_env) @@ -1375,9 +1450,9 @@ spv_result_t BuiltInsValidator::ValidateFragDepthAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4214) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn FragDepth to be only used for " @@ -1387,8 +1462,8 @@ spv_result_t BuiltInsValidator::ValidateFragDepthAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4213) << spvLogStringForEnv(_.context()->target_env) @@ -1403,7 +1478,7 @@ spv_result_t BuiltInsValidator::ValidateFragDepthAtReference( // Every entry point from which this function is called needs to have // Execution Mode DepthReplacing. const auto* modes = _.GetExecutionModes(entry_point); - if (!modes || !modes->count(SpvExecutionModeDepthReplacing)) { + if (!modes || !modes->count(spv::ExecutionMode::DepthReplacing)) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4216) << spvLogStringForEnv(_.context()->target_env) @@ -1451,9 +1526,9 @@ spv_result_t BuiltInsValidator::ValidateFrontFacingAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4230) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn FrontFacing to be only used for " @@ -1463,8 +1538,8 @@ spv_result_t BuiltInsValidator::ValidateFrontFacingAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4229) << spvLogStringForEnv(_.context()->target_env) @@ -1511,9 +1586,9 @@ spv_result_t BuiltInsValidator::ValidateHelperInvocationAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4240) << "Vulkan spec allows BuiltIn HelperInvocation to be only used " @@ -1523,8 +1598,8 @@ spv_result_t BuiltInsValidator::ValidateHelperInvocationAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4239) << "Vulkan spec allows BuiltIn HelperInvocation to be used only " @@ -1571,9 +1646,9 @@ spv_result_t BuiltInsValidator::ValidateInvocationIdAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4258) << "Vulkan spec allows BuiltIn InvocationId to be only used for " @@ -1583,9 +1658,9 @@ spv_result_t BuiltInsValidator::ValidateInvocationIdAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelTessellationControl && - execution_model != SpvExecutionModelGeometry) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::TessellationControl && + execution_model != spv::ExecutionModel::Geometry) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4257) << "Vulkan spec allows BuiltIn InvocationId to be used only " @@ -1632,9 +1707,9 @@ spv_result_t BuiltInsValidator::ValidateInstanceIndexAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4264) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn InstanceIndex to be only used for " @@ -1644,8 +1719,8 @@ spv_result_t BuiltInsValidator::ValidateInstanceIndexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelVertex) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Vertex) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4263) << spvLogStringForEnv(_.context()->target_env) @@ -1692,9 +1767,9 @@ spv_result_t BuiltInsValidator::ValidatePatchVerticesAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4309) << "Vulkan spec allows BuiltIn PatchVertices to be only used for " @@ -1704,9 +1779,9 @@ spv_result_t BuiltInsValidator::ValidatePatchVerticesAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelTessellationControl && - execution_model != SpvExecutionModelTessellationEvaluation) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::TessellationControl && + execution_model != spv::ExecutionModel::TessellationEvaluation) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4308) << "Vulkan spec allows BuiltIn PatchVertices to be used only " @@ -1754,9 +1829,9 @@ spv_result_t BuiltInsValidator::ValidatePointCoordAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4312) << "Vulkan spec allows BuiltIn PointCoord to be only used for " @@ -1766,8 +1841,8 @@ spv_result_t BuiltInsValidator::ValidatePointCoordAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4311) << "Vulkan spec allows BuiltIn PointCoord to be used only with " @@ -1799,10 +1874,10 @@ spv_result_t BuiltInsValidator::ValidatePointSizeAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4316) << "Vulkan spec allows BuiltIn PointSize to be only used for " @@ -1812,20 +1887,20 @@ spv_result_t BuiltInsValidator::ValidatePointSizeAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassInput) { + if (storage_class == spv::StorageClass::Input) { assert(function_id_ == 0); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4315, "Vulkan spec doesn't allow BuiltIn PointSize to be used for " "variables with Input storage class if execution model is " "Vertex.", - SpvExecutionModelVertex, decoration, built_in_inst, + spv::ExecutionModel::Vertex, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelVertex: { + case spv::ExecutionModel::Vertex: { if (spv_result_t error = ValidateF32( decoration, built_in_inst, [this, &referenced_from_inst]( @@ -1840,10 +1915,11 @@ spv_result_t BuiltInsValidator::ValidatePointSizeAtReference( } break; } - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - case SpvExecutionModelGeometry: - case SpvExecutionModelMeshNV: { + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: { // PointSize can be a per-vertex variable for tessellation control, // tessellation evaluation and geometry shader stages. In such cases // variables will have an array of 32-bit floats. @@ -1916,10 +1992,10 @@ spv_result_t BuiltInsValidator::ValidatePositionAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4320) << "Vulkan spec allows BuiltIn Position to be only used for " "variables with Input or Output storage class. " @@ -1928,27 +2004,34 @@ spv_result_t BuiltInsValidator::ValidatePositionAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassInput) { + if (storage_class == spv::StorageClass::Input) { assert(function_id_ == 0); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4319, "Vulkan spec doesn't allow BuiltIn Position to be used " "for variables " "with Input storage class if execution model is Vertex.", - SpvExecutionModelVertex, decoration, built_in_inst, + spv::ExecutionModel::Vertex, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4319, "Vulkan spec doesn't allow BuiltIn Position to be used " "for variables " "with Input storage class if execution model is MeshNV.", - SpvExecutionModelMeshNV, decoration, built_in_inst, + spv::ExecutionModel::MeshNV, decoration, built_in_inst, + referenced_from_inst, std::placeholders::_1)); + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4319, + "Vulkan spec doesn't allow BuiltIn Position to be used " + "for variables " + "with Input storage class if execution model is MeshEXT.", + spv::ExecutionModel::MeshEXT, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelVertex: { + case spv::ExecutionModel::Vertex: { if (spv_result_t error = ValidateF32Vec( decoration, built_in_inst, 4, [this, &referenced_from_inst]( @@ -1964,10 +2047,11 @@ spv_result_t BuiltInsValidator::ValidatePositionAtReference( } break; } - case SpvExecutionModelGeometry: - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - case SpvExecutionModelMeshNV: { + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: { // Position can be a per-vertex variable for tessellation control, // tessellation evaluation, geometry and mesh shader stages. In such // cases variables will have an array of 4-component 32-bit float @@ -2073,10 +2157,10 @@ spv_result_t BuiltInsValidator::ValidatePrimitiveIdAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << "Vulkan spec allows BuiltIn PrimitiveId to be only used for " "variables with Input or Output storage class. " @@ -2085,62 +2169,63 @@ spv_result_t BuiltInsValidator::ValidatePrimitiveIdAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassOutput) { + if (storage_class == spv::StorageClass::Output) { assert(function_id_ == 0); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "TessellationControl.", - SpvExecutionModelTessellationControl, decoration, built_in_inst, + spv::ExecutionModel::TessellationControl, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "TessellationEvaluation.", - SpvExecutionModelTessellationEvaluation, decoration, built_in_inst, + spv::ExecutionModel::TessellationEvaluation, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "Fragment.", - SpvExecutionModelFragment, decoration, built_in_inst, + spv::ExecutionModel::Fragment, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "IntersectionKHR.", - SpvExecutionModelIntersectionKHR, decoration, built_in_inst, + spv::ExecutionModel::IntersectionKHR, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "AnyHitKHR.", - SpvExecutionModelAnyHitKHR, decoration, built_in_inst, + spv::ExecutionModel::AnyHitKHR, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, 4334, "Vulkan spec doesn't allow BuiltIn PrimitiveId to be used for " "variables with Output storage class if execution model is " "ClosestHitKHR.", - SpvExecutionModelClosestHitKHR, decoration, built_in_inst, + spv::ExecutionModel::ClosestHitKHR, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelFragment: - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - case SpvExecutionModelGeometry: - case SpvExecutionModelMeshNV: - case SpvExecutionModelIntersectionKHR: - case SpvExecutionModelAnyHitKHR: - case SpvExecutionModelClosestHitKHR: { + case spv::ExecutionModel::Fragment: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: + case spv::ExecutionModel::IntersectionKHR: + case spv::ExecutionModel::AnyHitKHR: + case spv::ExecutionModel::ClosestHitKHR: { // Ok. break; } @@ -2150,9 +2235,8 @@ spv_result_t BuiltInsValidator::ValidatePrimitiveIdAtReference( << _.VkErrorID(4330) << "Vulkan spec allows BuiltIn PrimitiveId to be used only " "with Fragment, TessellationControl, " - "TessellationEvaluation, Geometry, MeshNV, " - "IntersectionKHR, " - "AnyHitKHR, and ClosestHitKHR execution models. " + "TessellationEvaluation, Geometry, MeshNV, MeshEXT, " + "IntersectionKHR, AnyHitKHR, and ClosestHitKHR execution models. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); } @@ -2195,9 +2279,9 @@ spv_result_t BuiltInsValidator::ValidateSampleIdAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4355) << "Vulkan spec allows BuiltIn SampleId to be only used for " @@ -2207,8 +2291,8 @@ spv_result_t BuiltInsValidator::ValidateSampleIdAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4354) << "Vulkan spec allows BuiltIn SampleId to be used only with " @@ -2254,10 +2338,10 @@ spv_result_t BuiltInsValidator::ValidateSampleMaskAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4358) << "Vulkan spec allows BuiltIn SampleMask to be only used for " @@ -2267,8 +2351,8 @@ spv_result_t BuiltInsValidator::ValidateSampleMaskAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4357) << "Vulkan spec allows BuiltIn SampleMask to be used only " @@ -2316,9 +2400,9 @@ spv_result_t BuiltInsValidator::ValidateSamplePositionAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4361) << "Vulkan spec allows BuiltIn SamplePosition to be only used " @@ -2329,8 +2413,8 @@ spv_result_t BuiltInsValidator::ValidateSamplePositionAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4360) << "Vulkan spec allows BuiltIn SamplePosition to be used only " @@ -2378,9 +2462,9 @@ spv_result_t BuiltInsValidator::ValidateTessCoordAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4388) << "Vulkan spec allows BuiltIn TessCoord to be only used for " @@ -2390,8 +2474,8 @@ spv_result_t BuiltInsValidator::ValidateTessCoordAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelTessellationEvaluation) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::TessellationEvaluation) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4387) << "Vulkan spec allows BuiltIn TessCoord to be used only with " @@ -2460,10 +2544,10 @@ spv_result_t BuiltInsValidator::ValidateTessLevelAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -2475,42 +2559,42 @@ spv_result_t BuiltInsValidator::ValidateTessLevelAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassInput) { + if (storage_class == spv::StorageClass::Input) { assert(function_id_ == 0); - uint32_t vuid = (decoration.params()[0] == SpvBuiltInTessLevelOuter) ? 4391 : 4395; + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::TessLevelOuter) ? 4391 : 4395; id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, "Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be " "used " "for variables with Input storage class if execution model is " "TessellationControl.", - SpvExecutionModelTessellationControl, decoration, built_in_inst, + spv::ExecutionModel::TessellationControl, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - if (storage_class == SpvStorageClassOutput) { + if (storage_class == spv::StorageClass::Output) { assert(function_id_ == 0); - uint32_t vuid = (decoration.params()[0] == SpvBuiltInTessLevelOuter) ? 4392 : 4396; + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::TessLevelOuter) ? 4392 : 4396; id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( &BuiltInsValidator::ValidateNotCalledWithExecutionModel, this, vuid, "Vulkan spec doesn't allow TessLevelOuter/TessLevelInner to be " "used " "for variables with Output storage class if execution model is " "TessellationEvaluation.", - SpvExecutionModelTessellationEvaluation, decoration, built_in_inst, + spv::ExecutionModel::TessellationEvaluation, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: { + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: { // Ok. break; } default: { - uint32_t vuid = (operand == SpvBuiltInTessLevelOuter) ? 4390 : 4394; + uint32_t vuid = (spv::BuiltIn(operand) == spv::BuiltIn::TessLevelOuter) ? 4390 : 4394; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -2593,9 +2677,9 @@ spv_result_t BuiltInsValidator::ValidateVertexIndexAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4399) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn VertexIndex to be only used for " @@ -2605,8 +2689,8 @@ spv_result_t BuiltInsValidator::ValidateVertexIndexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelVertex) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Vertex) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4398) << spvLogStringForEnv(_.context()->target_env) @@ -2640,7 +2724,7 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtDefinition( [this, &decoration, &inst](const std::string& message) -> spv_result_t { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInLayer) ? 4276 : 4408; + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::Layer) ? 4276 : 4408; return _.diag(SPV_ERROR_INVALID_DATA, &inst) << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " @@ -2657,7 +2741,7 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtDefinition( [this, &decoration, &inst](const std::string& message) -> spv_result_t { uint32_t vuid = - (decoration.params()[0] == SpvBuiltInLayer) ? 4276 : 4408; + (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::Layer) ? 4276 : 4408; return _.diag(SPV_ERROR_INVALID_DATA, &inst) << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " @@ -2681,10 +2765,10 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -2696,63 +2780,65 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - if (storage_class == SpvStorageClassInput) { + if (storage_class == spv::StorageClass::Input) { assert(function_id_ == 0); for (const auto em : - {SpvExecutionModelVertex, SpvExecutionModelTessellationEvaluation, - SpvExecutionModelGeometry, SpvExecutionModelMeshNV}) { + {spv::ExecutionModel::Vertex, spv::ExecutionModel::TessellationEvaluation, + spv::ExecutionModel::Geometry, spv::ExecutionModel::MeshNV, + spv::ExecutionModel::MeshEXT}) { id_to_at_reference_checks_[referenced_from_inst.id()].push_back( std::bind(&BuiltInsValidator::ValidateNotCalledWithExecutionModel, - this, ((operand == SpvBuiltInLayer) ? 4274 : 4406), + this, ((spv::BuiltIn(operand) == spv::BuiltIn::Layer) ? 4274 : 4406), "Vulkan spec doesn't allow BuiltIn Layer and " "ViewportIndex to be " "used for variables with Input storage class if " "execution model is Vertex, TessellationEvaluation, " - "Geometry, or MeshNV.", + "Geometry, MeshNV or MeshEXT.", em, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } } - if (storage_class == SpvStorageClassOutput) { + if (storage_class == spv::StorageClass::Output) { assert(function_id_ == 0); id_to_at_reference_checks_[referenced_from_inst.id()].push_back( std::bind(&BuiltInsValidator::ValidateNotCalledWithExecutionModel, - this, ((operand == SpvBuiltInLayer) ? 4275 : 4407), + this, ((spv::BuiltIn(operand) == spv::BuiltIn::Layer) ? 4275 : 4407), "Vulkan spec doesn't allow BuiltIn Layer and " "ViewportIndex to be " "used for variables with Output storage class if " "execution model is " "Fragment.", - SpvExecutionModelFragment, decoration, built_in_inst, + spv::ExecutionModel::Fragment, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelGeometry: - case SpvExecutionModelFragment: - case SpvExecutionModelMeshNV: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::Fragment: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: // Ok. break; - case SpvExecutionModelVertex: - case SpvExecutionModelTessellationEvaluation: { - if (!_.HasCapability(SpvCapabilityShaderViewportIndexLayerEXT)) { - if (operand == SpvBuiltInViewportIndex && - _.HasCapability(SpvCapabilityShaderViewportIndex)) + case spv::ExecutionModel::Vertex: + case spv::ExecutionModel::TessellationEvaluation: { + if (!_.HasCapability(spv::Capability::ShaderViewportIndexLayerEXT)) { + if (spv::BuiltIn(operand) == spv::BuiltIn::ViewportIndex && + _.HasCapability(spv::Capability::ShaderViewportIndex)) break; // Ok - if (operand == SpvBuiltInLayer && - _.HasCapability(SpvCapabilityShaderLayer)) + if (spv::BuiltIn(operand) == spv::BuiltIn::Layer && + _.HasCapability(spv::Capability::ShaderLayer)) break; // Ok const char* capability = "ShaderViewportIndexLayerEXT"; - if (operand == SpvBuiltInViewportIndex) + if (spv::BuiltIn(operand) == spv::BuiltIn::ViewportIndex) capability = "ShaderViewportIndexLayerEXT or ShaderViewportIndex"; - if (operand == SpvBuiltInLayer) + if (spv::BuiltIn(operand) == spv::BuiltIn::Layer) capability = "ShaderViewportIndexLayerEXT or ShaderLayer"; - uint32_t vuid = (operand == SpvBuiltInLayer) ? 4273 : 4405; + uint32_t vuid = (spv::BuiltIn(operand) == spv::BuiltIn::Layer) ? 4273 : 4405; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Using BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -2763,7 +2849,7 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference( break; } default: { - uint32_t vuid = (operand == SpvBuiltInLayer) ? 4272 : 4404; + uint32_t vuid = (spv::BuiltIn(operand) == spv::BuiltIn::Layer) ? 4272 : 4404; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -2788,10 +2874,84 @@ spv_result_t BuiltInsValidator::ValidateLayerOrViewportIndexAtReference( return SPV_SUCCESS; } +spv_result_t BuiltInsValidator::ValidateFragmentShaderF32Vec3InputAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + if (spv_result_t error = ValidateF32Vec( + decoration, inst, 3, + [this, &inst, builtin](const std::string& message) -> spv_result_t { + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorType); + return _.diag(SPV_ERROR_INVALID_DATA, &inst) + << _.VkErrorID(vuid) << "According to the " + << spvLogStringForEnv(_.context()->target_env) + << " spec BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + uint32_t(builtin)) + << " variable needs to be a 3-component 32-bit float " + "vector. " + << message; + })) { + return error; + } + } + + // Seed at reference checks with this built-in. + return ValidateFragmentShaderF32Vec3InputAtReference(decoration, inst, inst, + inst); +} + +spv_result_t BuiltInsValidator::ValidateFragmentShaderF32Vec3InputAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + + if (spvIsVulkanEnv(_.context()->target_env)) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); + return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) + << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) + << " spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) + << " to be only used for variables with Input storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); + return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) + << _.VkErrorID(vuid) + << spvLogStringForEnv(_.context()->target_env) + << " spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) + << " to be used only with Fragment execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( + &BuiltInsValidator::ValidateFragmentShaderF32Vec3InputAtReference, this, + decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (spv_result_t error = ValidateI32Vec( decoration, inst, 3, [this, &inst, builtin](const std::string& message) -> spv_result_t { @@ -2801,7 +2961,7 @@ spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtDefinition( << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, - builtin) + uint32_t(builtin)) << " variable needs to be a 3-component 32-bit int " "vector. " << message; @@ -2820,33 +2980,37 @@ spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - bool has_vulkan_model = execution_model == SpvExecutionModelGLCompute || - execution_model == SpvExecutionModelTaskNV || - execution_model == SpvExecutionModelMeshNV; + for (const spv::ExecutionModel execution_model : execution_models_) { + bool has_vulkan_model = execution_model == spv::ExecutionModel::GLCompute || + execution_model == spv::ExecutionModel::TaskNV || + execution_model == spv::ExecutionModel::MeshNV || + execution_model == spv::ExecutionModel::TaskEXT || + execution_model == spv::ExecutionModel::MeshEXT; + if (spvIsVulkanEnv(_.context()->target_env) && !has_vulkan_model) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) - << " to be used only with GLCompute, MeshNV, or TaskNV execution model. " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) + << " to be used only with GLCompute, MeshNV, TaskNV, MeshEXT or" + << " TaskEXT execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); } @@ -2867,11 +3031,11 @@ spv_result_t BuiltInsValidator::ValidateComputeShaderI32Vec3InputAtReference( spv_result_t BuiltInsValidator::ValidateComputeI32InputAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (decoration.struct_member_index() != Decoration::kInvalidMember) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << "BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " cannot be used as a member decoration "; } if (spv_result_t error = ValidateI32( @@ -2883,7 +3047,7 @@ spv_result_t BuiltInsValidator::ValidateComputeI32InputAtDefinition( << "According to the " << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 32-bit int " "vector. " << message; @@ -2901,34 +3065,37 @@ spv_result_t BuiltInsValidator::ValidateComputeI32InputAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - bool has_vulkan_model = execution_model == SpvExecutionModelGLCompute || - execution_model == SpvExecutionModelTaskNV || - execution_model == SpvExecutionModelMeshNV; + for (const spv::ExecutionModel execution_model : execution_models_) { + bool has_vulkan_model = execution_model == spv::ExecutionModel::GLCompute || + execution_model == spv::ExecutionModel::TaskNV || + execution_model == spv::ExecutionModel::MeshNV || + execution_model == spv::ExecutionModel::TaskEXT || + execution_model == spv::ExecutionModel::MeshEXT; if (spvIsVulkanEnv(_.context()->target_env) && !has_vulkan_model) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) - << " to be used only with GLCompute, MeshNV, or TaskNV execution model. " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) + << " to be used only with GLCompute, MeshNV, TaskNV, MeshEXT or " + << "TaskEXT execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); } @@ -2949,11 +3116,11 @@ spv_result_t BuiltInsValidator::ValidateComputeI32InputAtReference( spv_result_t BuiltInsValidator::ValidateI32InputAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (decoration.struct_member_index() != Decoration::kInvalidMember) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << "BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " cannot be used as a member decoration "; } if (spv_result_t error = ValidateI32( @@ -2965,21 +3132,21 @@ spv_result_t BuiltInsValidator::ValidateI32InputAtDefinition( << "According to the " << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 32-bit int. " << message; })) { return error; } - const SpvStorageClass storage_class = GetStorageClass(inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, inst, inst, inst) << " " << GetStorageClassDesc(inst); @@ -2992,11 +3159,11 @@ spv_result_t BuiltInsValidator::ValidateI32InputAtDefinition( spv_result_t BuiltInsValidator::ValidateI32Vec4InputAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (decoration.struct_member_index() != Decoration::kInvalidMember) { return _.diag(SPV_ERROR_INVALID_DATA, &inst) << "BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " cannot be used as a member decoration "; } if (spv_result_t error = ValidateI32Vec( @@ -3008,7 +3175,7 @@ spv_result_t BuiltInsValidator::ValidateI32Vec4InputAtDefinition( << "According to the " << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 4-component 32-bit int " "vector. " << message; @@ -3016,15 +3183,15 @@ spv_result_t BuiltInsValidator::ValidateI32Vec4InputAtDefinition( return error; } - const SpvStorageClass storage_class = GetStorageClass(inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, inst, inst, inst) << " " << GetStorageClassDesc(inst); @@ -3069,17 +3236,20 @@ spv_result_t BuiltInsValidator::ValidateWorkgroupSizeAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelGLCompute && - execution_model != SpvExecutionModelTaskNV && - execution_model != SpvExecutionModelMeshNV) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::GLCompute && + execution_model != spv::ExecutionModel::TaskNV && + execution_model != spv::ExecutionModel::MeshNV && + execution_model != spv::ExecutionModel::TaskEXT && + execution_model != spv::ExecutionModel::MeshEXT) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4425) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]) - << " to be used only with GLCompute, MeshNV, or TaskNV execution model. " + << " to be used only with GLCompute, MeshNV, TaskNV, MeshEXT or " + << "TaskEXT execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); } @@ -3103,7 +3273,7 @@ spv_result_t BuiltInsValidator::ValidateBaseInstanceOrVertexAtDefinition( decoration, inst, [this, &inst, &decoration](const std::string& message) -> spv_result_t { - uint32_t vuid = (decoration.params()[0] == SpvBuiltInBaseInstance) + uint32_t vuid = (spv::BuiltIn(decoration.params()[0]) == spv::BuiltIn::BaseInstance) ? 4183 : 4186; return _.diag(SPV_ERROR_INVALID_DATA, &inst) @@ -3127,10 +3297,10 @@ spv_result_t BuiltInsValidator::ValidateBaseInstanceOrVertexAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { - uint32_t vuid = (operand == SpvBuiltInBaseInstance) ? 4182 : 4185; + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { + uint32_t vuid = (spv::BuiltIn(operand) == spv::BuiltIn::BaseInstance) ? 4182 : 4185; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3141,9 +3311,9 @@ spv_result_t BuiltInsValidator::ValidateBaseInstanceOrVertexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelVertex) { - uint32_t vuid = (operand == SpvBuiltInBaseInstance) ? 4181 : 4184; + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Vertex) { + uint32_t vuid = (spv::BuiltIn(operand) == spv::BuiltIn::BaseInstance) ? 4181 : 4184; return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3194,9 +3364,9 @@ spv_result_t BuiltInsValidator::ValidateDrawIndexAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4208) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3207,15 +3377,18 @@ spv_result_t BuiltInsValidator::ValidateDrawIndexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelVertex && - execution_model != SpvExecutionModelMeshNV && - execution_model != SpvExecutionModelTaskNV) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Vertex && + execution_model != spv::ExecutionModel::MeshNV && + execution_model != spv::ExecutionModel::TaskNV && + execution_model != spv::ExecutionModel::MeshEXT && + execution_model != spv::ExecutionModel::TaskEXT) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4207) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, operand) - << " to be used only with Vertex, MeshNV, or TaskNV execution " + << " to be used only with Vertex, MeshNV, TaskNV , MeshEXT or" + << " TaskEXT execution " "model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3261,9 +3434,9 @@ spv_result_t BuiltInsValidator::ValidateViewIndexAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4402) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3274,8 +3447,8 @@ spv_result_t BuiltInsValidator::ValidateViewIndexAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model == SpvExecutionModelGLCompute) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model == spv::ExecutionModel::GLCompute) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4401) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3325,9 +3498,9 @@ spv_result_t BuiltInsValidator::ValidateDeviceIndexAtReference( const Instruction& referenced_from_inst) { uint32_t operand = decoration.params()[0]; if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4205) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3353,7 +3526,7 @@ spv_result_t BuiltInsValidator::ValidateFragInvocationCountAtDefinition(const De const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (spv_result_t error = ValidateI32( decoration, inst, [this, &inst, &builtin](const std::string& message) -> spv_result_t { @@ -3363,7 +3536,7 @@ spv_result_t BuiltInsValidator::ValidateFragInvocationCountAtDefinition(const De << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, - builtin) + uint32_t(builtin)) << " variable needs to be a 32-bit int scalar. " << message; })) { @@ -3380,29 +3553,29 @@ spv_result_t BuiltInsValidator::ValidateFragInvocationCountAtReference( const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be used only with Fragment execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3423,7 +3596,7 @@ spv_result_t BuiltInsValidator::ValidateFragInvocationCountAtReference( spv_result_t BuiltInsValidator::ValidateFragSizeAtDefinition(const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (spv_result_t error = ValidateI32Vec( decoration, inst, 2, [this, &inst, &builtin](const std::string& message) -> spv_result_t { @@ -3433,7 +3606,7 @@ spv_result_t BuiltInsValidator::ValidateFragSizeAtDefinition(const Decoration& d << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, - builtin) + uint32_t(builtin)) << " variable needs to be a 2-component 32-bit int vector. " << message; })) { @@ -3450,29 +3623,29 @@ spv_result_t BuiltInsValidator::ValidateFragSizeAtReference( const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be used only with Fragment execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3493,7 +3666,7 @@ spv_result_t BuiltInsValidator::ValidateFragSizeAtReference( spv_result_t BuiltInsValidator::ValidateFragStencilRefAtDefinition(const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (spv_result_t error = ValidateI( decoration, inst, [this, &inst, &builtin](const std::string& message) -> spv_result_t { @@ -3503,7 +3676,7 @@ spv_result_t BuiltInsValidator::ValidateFragStencilRefAtDefinition(const Decorat << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, - builtin) + uint32_t(builtin)) << " variable needs to be a int scalar. " << message; })) { @@ -3520,29 +3693,29 @@ spv_result_t BuiltInsValidator::ValidateFragStencilRefAtReference( const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassOutput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Output) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Output storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be used only with Fragment execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3563,7 +3736,7 @@ spv_result_t BuiltInsValidator::ValidateFragStencilRefAtReference( spv_result_t BuiltInsValidator::ValidateFullyCoveredAtDefinition(const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); if (spv_result_t error = ValidateBool( decoration, inst, [this, &inst, &builtin](const std::string& message) -> spv_result_t { @@ -3573,7 +3746,7 @@ spv_result_t BuiltInsValidator::ValidateFullyCoveredAtDefinition(const Decoratio << spvLogStringForEnv(_.context()->target_env) << " spec BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, - builtin) + uint32_t(builtin)) << " variable needs to be a bool scalar. " << message; })) { @@ -3590,29 +3763,29 @@ spv_result_t BuiltInsValidator::ValidateFullyCoveredAtReference( const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be only used for variables with Input storage class. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst) << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " - << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, builtin) + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " to be used only with Fragment execution model. " << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3630,7 +3803,7 @@ spv_result_t BuiltInsValidator::ValidateFullyCoveredAtReference( return SPV_SUCCESS; } -spv_result_t BuiltInsValidator::ValidateSMBuiltinsAtDefinition( +spv_result_t BuiltInsValidator::ValidateNVSMOrARMCoreBuiltinsAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { if (spv_result_t error = ValidateI32( @@ -3651,17 +3824,17 @@ spv_result_t BuiltInsValidator::ValidateSMBuiltinsAtDefinition( } // Seed at reference checks with this built-in. - return ValidateSMBuiltinsAtReference(decoration, inst, inst, inst); + return ValidateNVSMOrARMCoreBuiltinsAtReference(decoration, inst, inst, inst); } -spv_result_t BuiltInsValidator::ValidateSMBuiltinsAtReference( +spv_result_t BuiltInsValidator::ValidateNVSMOrARMCoreBuiltinsAtReference( const Decoration& decoration, const Instruction& built_in_inst, const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << spvLogStringForEnv(_.context()->target_env) << " spec allows BuiltIn " @@ -3678,7 +3851,7 @@ spv_result_t BuiltInsValidator::ValidateSMBuiltinsAtReference( if (function_id_ == 0) { // Propagate this rule to all dependant ids in the global scope. id_to_at_reference_checks_[referenced_from_inst.id()].push_back(std::bind( - &BuiltInsValidator::ValidateSMBuiltinsAtReference, this, decoration, + &BuiltInsValidator::ValidateNVSMOrARMCoreBuiltinsAtReference, this, decoration, built_in_inst, referenced_from_inst, std::placeholders::_1)); } @@ -3713,9 +3886,9 @@ spv_result_t BuiltInsValidator::ValidatePrimitiveShadingRateAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassOutput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Output) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4485) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3726,11 +3899,12 @@ spv_result_t BuiltInsValidator::ValidatePrimitiveShadingRateAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { switch (execution_model) { - case SpvExecutionModelVertex: - case SpvExecutionModelGeometry: - case SpvExecutionModelMeshNV: + case spv::ExecutionModel::Vertex: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::MeshNV: + case spv::ExecutionModel::MeshEXT: break; default: { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) @@ -3785,9 +3959,9 @@ spv_result_t BuiltInsValidator::ValidateShadingRateAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4491) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3798,8 +3972,8 @@ spv_result_t BuiltInsValidator::ValidateShadingRateAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { - if (execution_model != SpvExecutionModelFragment) { + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::Fragment) { return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(4490) << "Vulkan spec allows BuiltIn " << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, @@ -3824,11 +3998,11 @@ spv_result_t BuiltInsValidator::ValidateShadingRateAtReference( spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( const Decoration& decoration, const Instruction& inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); switch (builtin) { - case SpvBuiltInHitTNV: - case SpvBuiltInRayTminKHR: - case SpvBuiltInRayTmaxKHR: + case spv::BuiltIn::HitTNV: + case spv::BuiltIn::RayTminKHR: + case spv::BuiltIn::RayTmaxKHR: // f32 scalar if (spv_result_t error = ValidateF32( decoration, inst, @@ -3839,18 +4013,19 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_BUILT_IN, builtin) + SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 32-bit float scalar. " << message; })) { return error; } break; - case SpvBuiltInHitKindKHR: - case SpvBuiltInInstanceCustomIndexKHR: - case SpvBuiltInInstanceId: - case SpvBuiltInRayGeometryIndexKHR: - case SpvBuiltInIncomingRayFlagsKHR: + case spv::BuiltIn::HitKindKHR: + case spv::BuiltIn::InstanceCustomIndexKHR: + case spv::BuiltIn::InstanceId: + case spv::BuiltIn::RayGeometryIndexKHR: + case spv::BuiltIn::IncomingRayFlagsKHR: + case spv::BuiltIn::CullMaskKHR: // i32 scalar if (spv_result_t error = ValidateI32( decoration, inst, @@ -3861,17 +4036,17 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_BUILT_IN, builtin) + SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 32-bit int scalar. " << message; })) { return error; } break; - case SpvBuiltInObjectRayDirectionKHR: - case SpvBuiltInObjectRayOriginKHR: - case SpvBuiltInWorldRayDirectionKHR: - case SpvBuiltInWorldRayOriginKHR: + case spv::BuiltIn::ObjectRayDirectionKHR: + case spv::BuiltIn::ObjectRayOriginKHR: + case spv::BuiltIn::WorldRayDirectionKHR: + case spv::BuiltIn::WorldRayOriginKHR: // f32 vec3 if (spv_result_t error = ValidateF32Vec( decoration, inst, 3, @@ -3882,7 +4057,7 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_BUILT_IN, builtin) + SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 3-component 32-bit float " "vector. " << message; @@ -3890,8 +4065,8 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( return error; } break; - case SpvBuiltInLaunchIdKHR: - case SpvBuiltInLaunchSizeKHR: + case spv::BuiltIn::LaunchIdKHR: + case spv::BuiltIn::LaunchSizeKHR: // i32 vec3 if (spv_result_t error = ValidateI32Vec( decoration, inst, 3, @@ -3902,7 +4077,7 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_BUILT_IN, builtin) + SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a 3-component 32-bit int " "vector. " << message; @@ -3910,8 +4085,8 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( return error; } break; - case SpvBuiltInObjectToWorldKHR: - case SpvBuiltInWorldToObjectKHR: + case spv::BuiltIn::ObjectToWorldKHR: + case spv::BuiltIn::WorldToObjectKHR: // f32 mat4x3 if (spv_result_t error = ValidateF32Mat( decoration, inst, 3, 4, @@ -3922,7 +4097,7 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtDefinition( << _.VkErrorID(vuid) << "According to the Vulkan spec BuiltIn " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_BUILT_IN, builtin) + SPV_OPERAND_TYPE_BUILT_IN, uint32_t(builtin)) << " variable needs to be a matrix with" << " 4 columns of 3-component vectors of 32-bit " "floats. " @@ -3946,10 +4121,10 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtReference( const Instruction& referenced_inst, const Instruction& referenced_from_inst) { if (spvIsVulkanEnv(_.context()->target_env)) { - const SpvBuiltIn builtin = SpvBuiltIn(decoration.params()[0]); - const SpvStorageClass storage_class = GetStorageClass(referenced_from_inst); - if (storage_class != SpvStorageClassMax && - storage_class != SpvStorageClassInput) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Input) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) << _.VkErrorID(vuid) << "Vulkan spec allows BuiltIn " @@ -3961,7 +4136,7 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtReference( << " " << GetStorageClassDesc(referenced_from_inst); } - for (const SpvExecutionModel execution_model : execution_models_) { + for (const spv::ExecutionModel execution_model : execution_models_) { if (!IsExecutionModelValidForRtBuiltIn(builtin, execution_model)) { uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) @@ -3970,7 +4145,7 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtReference( decoration.params()[0]) << " to be used with the execution model " << _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_EXECUTION_MODEL, execution_model) + SPV_OPERAND_TYPE_EXECUTION_MODEL, uint32_t(execution_model)) << ".\n" << GetReferenceDesc(decoration, built_in_inst, referenced_inst, referenced_from_inst, execution_model); @@ -3989,9 +4164,122 @@ spv_result_t BuiltInsValidator::ValidateRayTracingBuiltinsAtReference( return SPV_SUCCESS; } +spv_result_t BuiltInsValidator::ValidateMeshShadingEXTBuiltinsAtDefinition( + const Decoration& decoration, const Instruction& inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorType); + if (builtin == spv::BuiltIn::PrimitivePointIndicesEXT) { + if (spv_result_t error = ValidateI32Arr( + decoration, inst, + [this, &inst, &decoration, + &vuid](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA, &inst) + << _.VkErrorID(vuid) << "According to the " + << spvLogStringForEnv(_.context()->target_env) + << " spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]) + << " variable needs to be a 32-bit int array." + << message; + })) { + return error; + } + } + if (builtin == spv::BuiltIn::PrimitiveLineIndicesEXT) { + if (spv_result_t error = ValidateArrayedI32Vec( + decoration, inst, 2, + [this, &inst, &decoration, + &vuid](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA, &inst) + << _.VkErrorID(vuid) << "According to the " + << spvLogStringForEnv(_.context()->target_env) + << " spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]) + << " variable needs to be a 2-component 32-bit int " + "array." + << message; + })) { + return error; + } + } + if (builtin == spv::BuiltIn::PrimitiveTriangleIndicesEXT) { + if (spv_result_t error = ValidateArrayedI32Vec( + decoration, inst, 3, + [this, &inst, &decoration, + &vuid](const std::string& message) -> spv_result_t { + return _.diag(SPV_ERROR_INVALID_DATA, &inst) + << _.VkErrorID(vuid) << "According to the " + << spvLogStringForEnv(_.context()->target_env) + << " spec BuiltIn " + << _.grammar().lookupOperandName( + SPV_OPERAND_TYPE_BUILT_IN, decoration.params()[0]) + << " variable needs to be a 3-component 32-bit int " + "array." + << message; + })) { + return error; + } + } + } + // Seed at reference checks with this built-in. + return ValidateMeshShadingEXTBuiltinsAtReference(decoration, inst, inst, + inst); +} + +spv_result_t BuiltInsValidator::ValidateMeshShadingEXTBuiltinsAtReference( + const Decoration& decoration, const Instruction& built_in_inst, + const Instruction& referenced_inst, + const Instruction& referenced_from_inst) { + if (spvIsVulkanEnv(_.context()->target_env)) { + const spv::BuiltIn builtin = spv::BuiltIn(decoration.params()[0]); + const spv::StorageClass storage_class = + GetStorageClass(referenced_from_inst); + if (storage_class != spv::StorageClass::Max && + storage_class != spv::StorageClass::Output) { + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorStorageClass); + return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) + << _.VkErrorID(vuid) << spvLogStringForEnv(_.context()->target_env) + << " spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + uint32_t(builtin)) + << " to be only used for variables with Output storage class. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst) + << " " << GetStorageClassDesc(referenced_from_inst); + } + + for (const spv::ExecutionModel execution_model : execution_models_) { + if (execution_model != spv::ExecutionModel::MeshEXT) { + uint32_t vuid = GetVUIDForBuiltin(builtin, VUIDErrorExecutionModel); + return _.diag(SPV_ERROR_INVALID_DATA, &referenced_from_inst) + << _.VkErrorID(vuid) + << spvLogStringForEnv(_.context()->target_env) + << " spec allows BuiltIn " + << _.grammar().lookupOperandName(SPV_OPERAND_TYPE_BUILT_IN, + uint32_t(builtin)) + << " to be used only with MeshEXT execution model. " + << GetReferenceDesc(decoration, built_in_inst, referenced_inst, + referenced_from_inst, execution_model); + } + } + } + + if (function_id_ == 0) { + // Propagate this rule to all dependant ids in the global scope. + id_to_at_reference_checks_[referenced_from_inst.id()].push_back( + std::bind(&BuiltInsValidator::ValidateMeshShadingEXTBuiltinsAtReference, + this, decoration, built_in_inst, referenced_from_inst, + std::placeholders::_1)); + } + + return SPV_SUCCESS; +} + spv_result_t BuiltInsValidator::ValidateSingleBuiltInAtDefinition( const Decoration& decoration, const Instruction& inst) { - const SpvBuiltIn label = SpvBuiltIn(decoration.params()[0]); + const spv::BuiltIn label = spv::BuiltIn(decoration.params()[0]); if (!spvIsVulkanEnv(_.context()->target_env)) { // Early return. All currently implemented rules are based on Vulkan spec. @@ -4008,192 +4296,176 @@ spv_result_t BuiltInsValidator::ValidateSingleBuiltInAtDefinition( // If the newly added enum has validation rules associated with it // consider leaving a TODO and/or creating an issue. switch (label) { - case SpvBuiltInClipDistance: - case SpvBuiltInCullDistance: { + case spv::BuiltIn::ClipDistance: + case spv::BuiltIn::CullDistance: { return ValidateClipOrCullDistanceAtDefinition(decoration, inst); } - case SpvBuiltInFragCoord: { + case spv::BuiltIn::FragCoord: { return ValidateFragCoordAtDefinition(decoration, inst); } - case SpvBuiltInFragDepth: { + case spv::BuiltIn::FragDepth: { return ValidateFragDepthAtDefinition(decoration, inst); } - case SpvBuiltInFrontFacing: { + case spv::BuiltIn::FrontFacing: { return ValidateFrontFacingAtDefinition(decoration, inst); } - case SpvBuiltInGlobalInvocationId: - case SpvBuiltInLocalInvocationId: - case SpvBuiltInNumWorkgroups: - case SpvBuiltInWorkgroupId: { + case spv::BuiltIn::GlobalInvocationId: + case spv::BuiltIn::LocalInvocationId: + case spv::BuiltIn::NumWorkgroups: + case spv::BuiltIn::WorkgroupId: { return ValidateComputeShaderI32Vec3InputAtDefinition(decoration, inst); } - case SpvBuiltInHelperInvocation: { + case spv::BuiltIn::BaryCoordKHR: + case spv::BuiltIn::BaryCoordNoPerspKHR: { + return ValidateFragmentShaderF32Vec3InputAtDefinition(decoration, inst); + } + case spv::BuiltIn::HelperInvocation: { return ValidateHelperInvocationAtDefinition(decoration, inst); } - case SpvBuiltInInvocationId: { + case spv::BuiltIn::InvocationId: { return ValidateInvocationIdAtDefinition(decoration, inst); } - case SpvBuiltInInstanceIndex: { + case spv::BuiltIn::InstanceIndex: { return ValidateInstanceIndexAtDefinition(decoration, inst); } - case SpvBuiltInLayer: - case SpvBuiltInViewportIndex: { + case spv::BuiltIn::Layer: + case spv::BuiltIn::ViewportIndex: { return ValidateLayerOrViewportIndexAtDefinition(decoration, inst); } - case SpvBuiltInPatchVertices: { + case spv::BuiltIn::PatchVertices: { return ValidatePatchVerticesAtDefinition(decoration, inst); } - case SpvBuiltInPointCoord: { + case spv::BuiltIn::PointCoord: { return ValidatePointCoordAtDefinition(decoration, inst); } - case SpvBuiltInPointSize: { + case spv::BuiltIn::PointSize: { return ValidatePointSizeAtDefinition(decoration, inst); } - case SpvBuiltInPosition: { + case spv::BuiltIn::Position: { return ValidatePositionAtDefinition(decoration, inst); } - case SpvBuiltInPrimitiveId: { + case spv::BuiltIn::PrimitiveId: { return ValidatePrimitiveIdAtDefinition(decoration, inst); } - case SpvBuiltInSampleId: { + case spv::BuiltIn::SampleId: { return ValidateSampleIdAtDefinition(decoration, inst); } - case SpvBuiltInSampleMask: { + case spv::BuiltIn::SampleMask: { return ValidateSampleMaskAtDefinition(decoration, inst); } - case SpvBuiltInSamplePosition: { + case spv::BuiltIn::SamplePosition: { return ValidateSamplePositionAtDefinition(decoration, inst); } - case SpvBuiltInSubgroupId: - case SpvBuiltInNumSubgroups: { + case spv::BuiltIn::SubgroupId: + case spv::BuiltIn::NumSubgroups: { return ValidateComputeI32InputAtDefinition(decoration, inst); } - case SpvBuiltInSubgroupLocalInvocationId: - case SpvBuiltInSubgroupSize: { + case spv::BuiltIn::SubgroupLocalInvocationId: + case spv::BuiltIn::SubgroupSize: { return ValidateI32InputAtDefinition(decoration, inst); } - case SpvBuiltInSubgroupEqMask: - case SpvBuiltInSubgroupGeMask: - case SpvBuiltInSubgroupGtMask: - case SpvBuiltInSubgroupLeMask: - case SpvBuiltInSubgroupLtMask: { + case spv::BuiltIn::SubgroupEqMask: + case spv::BuiltIn::SubgroupGeMask: + case spv::BuiltIn::SubgroupGtMask: + case spv::BuiltIn::SubgroupLeMask: + case spv::BuiltIn::SubgroupLtMask: { return ValidateI32Vec4InputAtDefinition(decoration, inst); } - case SpvBuiltInTessCoord: { + case spv::BuiltIn::TessCoord: { return ValidateTessCoordAtDefinition(decoration, inst); } - case SpvBuiltInTessLevelOuter: { + case spv::BuiltIn::TessLevelOuter: { return ValidateTessLevelOuterAtDefinition(decoration, inst); } - case SpvBuiltInTessLevelInner: { + case spv::BuiltIn::TessLevelInner: { return ValidateTessLevelInnerAtDefinition(decoration, inst); } - case SpvBuiltInVertexIndex: { + case spv::BuiltIn::VertexIndex: { return ValidateVertexIndexAtDefinition(decoration, inst); } - case SpvBuiltInWorkgroupSize: { + case spv::BuiltIn::WorkgroupSize: { return ValidateWorkgroupSizeAtDefinition(decoration, inst); } - case SpvBuiltInVertexId: { + case spv::BuiltIn::VertexId: { return ValidateVertexIdAtDefinition(decoration, inst); } - case SpvBuiltInLocalInvocationIndex: { + case spv::BuiltIn::LocalInvocationIndex: { return ValidateLocalInvocationIndexAtDefinition(decoration, inst); } - case SpvBuiltInWarpsPerSMNV: - case SpvBuiltInSMCountNV: - case SpvBuiltInWarpIDNV: - case SpvBuiltInSMIDNV: { - return ValidateSMBuiltinsAtDefinition(decoration, inst); - } - case SpvBuiltInBaseInstance: - case SpvBuiltInBaseVertex: { + case spv::BuiltIn::CoreIDARM: + case spv::BuiltIn::CoreCountARM: + case spv::BuiltIn::CoreMaxIDARM: + case spv::BuiltIn::WarpIDARM: + case spv::BuiltIn::WarpMaxIDARM: + case spv::BuiltIn::WarpsPerSMNV: + case spv::BuiltIn::SMCountNV: + case spv::BuiltIn::WarpIDNV: + case spv::BuiltIn::SMIDNV: { + return ValidateNVSMOrARMCoreBuiltinsAtDefinition(decoration, inst); + } + case spv::BuiltIn::BaseInstance: + case spv::BuiltIn::BaseVertex: { return ValidateBaseInstanceOrVertexAtDefinition(decoration, inst); } - case SpvBuiltInDrawIndex: { + case spv::BuiltIn::DrawIndex: { return ValidateDrawIndexAtDefinition(decoration, inst); } - case SpvBuiltInViewIndex: { + case spv::BuiltIn::ViewIndex: { return ValidateViewIndexAtDefinition(decoration, inst); } - case SpvBuiltInDeviceIndex: { + case spv::BuiltIn::DeviceIndex: { return ValidateDeviceIndexAtDefinition(decoration, inst); } - case SpvBuiltInFragInvocationCountEXT: { - // alias SpvBuiltInInvocationsPerPixelNV + case spv::BuiltIn::FragInvocationCountEXT: { + // alias spv::BuiltIn::InvocationsPerPixelNV return ValidateFragInvocationCountAtDefinition(decoration, inst); } - case SpvBuiltInFragSizeEXT: { - // alias SpvBuiltInFragmentSizeNV + case spv::BuiltIn::FragSizeEXT: { + // alias spv::BuiltIn::FragmentSizeNV return ValidateFragSizeAtDefinition(decoration, inst); } - case SpvBuiltInFragStencilRefEXT: { + case spv::BuiltIn::FragStencilRefEXT: { return ValidateFragStencilRefAtDefinition(decoration, inst); } - case SpvBuiltInFullyCoveredEXT:{ + case spv::BuiltIn::FullyCoveredEXT:{ return ValidateFullyCoveredAtDefinition(decoration, inst); } // Ray tracing builtins - case SpvBuiltInHitKindKHR: // alias SpvBuiltInHitKindNV - case SpvBuiltInHitTNV: // NOT present in KHR - case SpvBuiltInInstanceId: - case SpvBuiltInLaunchIdKHR: // alias SpvBuiltInLaunchIdNV - case SpvBuiltInLaunchSizeKHR: // alias SpvBuiltInLaunchSizeNV - case SpvBuiltInWorldRayOriginKHR: // alias SpvBuiltInWorldRayOriginNV - case SpvBuiltInWorldRayDirectionKHR: // alias SpvBuiltInWorldRayDirectionNV - case SpvBuiltInObjectRayOriginKHR: // alias SpvBuiltInObjectRayOriginNV - case SpvBuiltInObjectRayDirectionKHR: // alias - // SpvBuiltInObjectRayDirectionNV - case SpvBuiltInRayTminKHR: // alias SpvBuiltInRayTminNV - case SpvBuiltInRayTmaxKHR: // alias SpvBuiltInRayTmaxNV - case SpvBuiltInInstanceCustomIndexKHR: // alias - // SpvBuiltInInstanceCustomIndexNV - case SpvBuiltInObjectToWorldKHR: // alias SpvBuiltInObjectToWorldNV - case SpvBuiltInWorldToObjectKHR: // alias SpvBuiltInWorldToObjectNV - case SpvBuiltInIncomingRayFlagsKHR: // alias SpvBuiltInIncomingRayFlagsNV - case SpvBuiltInRayGeometryIndexKHR: { // NOT present in NV + case spv::BuiltIn::HitKindKHR: // alias spv::BuiltIn::HitKindNV + case spv::BuiltIn::HitTNV: // NOT present in KHR + case spv::BuiltIn::InstanceId: + case spv::BuiltIn::LaunchIdKHR: // alias spv::BuiltIn::LaunchIdNV + case spv::BuiltIn::LaunchSizeKHR: // alias spv::BuiltIn::LaunchSizeNV + case spv::BuiltIn::WorldRayOriginKHR: // alias spv::BuiltIn::WorldRayOriginNV + case spv::BuiltIn::WorldRayDirectionKHR: // alias spv::BuiltIn::WorldRayDirectionNV + case spv::BuiltIn::ObjectRayOriginKHR: // alias spv::BuiltIn::ObjectRayOriginNV + case spv::BuiltIn::ObjectRayDirectionKHR: // alias + // spv::BuiltIn::ObjectRayDirectionNV + case spv::BuiltIn::RayTminKHR: // alias spv::BuiltIn::RayTminNV + case spv::BuiltIn::RayTmaxKHR: // alias spv::BuiltIn::RayTmaxNV + case spv::BuiltIn::InstanceCustomIndexKHR: // alias + // spv::BuiltIn::InstanceCustomIndexNV + case spv::BuiltIn::ObjectToWorldKHR: // alias spv::BuiltIn::ObjectToWorldNV + case spv::BuiltIn::WorldToObjectKHR: // alias spv::BuiltIn::WorldToObjectNV + case spv::BuiltIn::IncomingRayFlagsKHR: // alias spv::BuiltIn::IncomingRayFlagsNV + case spv::BuiltIn::RayGeometryIndexKHR: // NOT present in NV + case spv::BuiltIn::CullMaskKHR: { return ValidateRayTracingBuiltinsAtDefinition(decoration, inst); } - case SpvBuiltInWorkDim: - case SpvBuiltInGlobalSize: - case SpvBuiltInEnqueuedWorkgroupSize: - case SpvBuiltInGlobalOffset: - case SpvBuiltInGlobalLinearId: - case SpvBuiltInSubgroupMaxSize: - case SpvBuiltInNumEnqueuedSubgroups: - case SpvBuiltInBaryCoordNoPerspAMD: - case SpvBuiltInBaryCoordNoPerspCentroidAMD: - case SpvBuiltInBaryCoordNoPerspSampleAMD: - case SpvBuiltInBaryCoordSmoothAMD: - case SpvBuiltInBaryCoordSmoothCentroidAMD: - case SpvBuiltInBaryCoordSmoothSampleAMD: - case SpvBuiltInBaryCoordPullModelAMD: - case SpvBuiltInViewportMaskNV: - case SpvBuiltInSecondaryPositionNV: - case SpvBuiltInSecondaryViewportMaskNV: - case SpvBuiltInPositionPerViewNV: - case SpvBuiltInViewportMaskPerViewNV: - case SpvBuiltInMax: - case SpvBuiltInTaskCountNV: - case SpvBuiltInPrimitiveCountNV: - case SpvBuiltInPrimitiveIndicesNV: - case SpvBuiltInClipDistancePerViewNV: - case SpvBuiltInCullDistancePerViewNV: - case SpvBuiltInLayerPerViewNV: - case SpvBuiltInMeshViewCountNV: - case SpvBuiltInMeshViewIndicesNV: - case SpvBuiltInBaryCoordNV: - case SpvBuiltInBaryCoordNoPerspNV: - case SpvBuiltInCurrentRayTimeNV: - // No validation rules (for the moment). - break; - - case SpvBuiltInPrimitiveShadingRateKHR: { + case spv::BuiltIn::PrimitivePointIndicesEXT: + case spv::BuiltIn::PrimitiveLineIndicesEXT: + case spv::BuiltIn::PrimitiveTriangleIndicesEXT: { + return ValidateMeshShadingEXTBuiltinsAtDefinition(decoration, inst); + } + case spv::BuiltIn::PrimitiveShadingRateKHR: { return ValidatePrimitiveShadingRateAtDefinition(decoration, inst); } - case SpvBuiltInShadingRateKHR: { + case spv::BuiltIn::ShadingRateKHR: { return ValidateShadingRateAtDefinition(decoration, inst); } + default: + // No validation rules (for the moment). + break; } return SPV_SUCCESS; } @@ -4210,7 +4482,7 @@ spv_result_t BuiltInsValidator::ValidateBuiltInsAtDefinition() { assert(inst); for (const auto& decoration : kv.second) { - if (decoration.dec_type() != SpvDecorationBuiltIn) { + if (decoration.dec_type() != spv::Decoration::BuiltIn) { continue; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_capability.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_capability.cpp index 8efd55420..81d2ad52d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_capability.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_capability.cpp @@ -16,9 +16,7 @@ #include #include -#include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" #include "source/val/validate.h" @@ -29,74 +27,82 @@ namespace val { namespace { bool IsSupportGuaranteedVulkan_1_0(uint32_t capability) { - switch (capability) { - case SpvCapabilityMatrix: - case SpvCapabilityShader: - case SpvCapabilityInputAttachment: - case SpvCapabilitySampled1D: - case SpvCapabilityImage1D: - case SpvCapabilitySampledBuffer: - case SpvCapabilityImageBuffer: - case SpvCapabilityImageQuery: - case SpvCapabilityDerivativeControl: + switch (spv::Capability(capability)) { + case spv::Capability::Matrix: + case spv::Capability::Shader: + case spv::Capability::InputAttachment: + case spv::Capability::Sampled1D: + case spv::Capability::Image1D: + case spv::Capability::SampledBuffer: + case spv::Capability::ImageBuffer: + case spv::Capability::ImageQuery: + case spv::Capability::DerivativeControl: return true; + default: + break; } return false; } bool IsSupportGuaranteedVulkan_1_1(uint32_t capability) { if (IsSupportGuaranteedVulkan_1_0(capability)) return true; - switch (capability) { - case SpvCapabilityDeviceGroup: - case SpvCapabilityMultiView: + switch (spv::Capability(capability)) { + case spv::Capability::DeviceGroup: + case spv::Capability::MultiView: return true; + default: + break; } return false; } bool IsSupportGuaranteedVulkan_1_2(uint32_t capability) { if (IsSupportGuaranteedVulkan_1_1(capability)) return true; - switch (capability) { - case SpvCapabilityShaderNonUniform: + switch (spv::Capability(capability)) { + case spv::Capability::ShaderNonUniform: return true; + default: + break; } return false; } bool IsSupportOptionalVulkan_1_0(uint32_t capability) { - switch (capability) { - case SpvCapabilityGeometry: - case SpvCapabilityTessellation: - case SpvCapabilityFloat64: - case SpvCapabilityInt64: - case SpvCapabilityInt16: - case SpvCapabilityTessellationPointSize: - case SpvCapabilityGeometryPointSize: - case SpvCapabilityImageGatherExtended: - case SpvCapabilityStorageImageMultisample: - case SpvCapabilityUniformBufferArrayDynamicIndexing: - case SpvCapabilitySampledImageArrayDynamicIndexing: - case SpvCapabilityStorageBufferArrayDynamicIndexing: - case SpvCapabilityStorageImageArrayDynamicIndexing: - case SpvCapabilityClipDistance: - case SpvCapabilityCullDistance: - case SpvCapabilityImageCubeArray: - case SpvCapabilitySampleRateShading: - case SpvCapabilitySparseResidency: - case SpvCapabilityMinLod: - case SpvCapabilitySampledCubeArray: - case SpvCapabilityImageMSArray: - case SpvCapabilityStorageImageExtendedFormats: - case SpvCapabilityInterpolationFunction: - case SpvCapabilityStorageImageReadWithoutFormat: - case SpvCapabilityStorageImageWriteWithoutFormat: - case SpvCapabilityMultiViewport: - case SpvCapabilityInt64Atomics: - case SpvCapabilityTransformFeedback: - case SpvCapabilityGeometryStreams: - case SpvCapabilityFloat16: - case SpvCapabilityInt8: + switch (spv::Capability(capability)) { + case spv::Capability::Geometry: + case spv::Capability::Tessellation: + case spv::Capability::Float64: + case spv::Capability::Int64: + case spv::Capability::Int16: + case spv::Capability::TessellationPointSize: + case spv::Capability::GeometryPointSize: + case spv::Capability::ImageGatherExtended: + case spv::Capability::StorageImageMultisample: + case spv::Capability::UniformBufferArrayDynamicIndexing: + case spv::Capability::SampledImageArrayDynamicIndexing: + case spv::Capability::StorageBufferArrayDynamicIndexing: + case spv::Capability::StorageImageArrayDynamicIndexing: + case spv::Capability::ClipDistance: + case spv::Capability::CullDistance: + case spv::Capability::ImageCubeArray: + case spv::Capability::SampleRateShading: + case spv::Capability::SparseResidency: + case spv::Capability::MinLod: + case spv::Capability::SampledCubeArray: + case spv::Capability::ImageMSArray: + case spv::Capability::StorageImageExtendedFormats: + case spv::Capability::InterpolationFunction: + case spv::Capability::StorageImageReadWithoutFormat: + case spv::Capability::StorageImageWriteWithoutFormat: + case spv::Capability::MultiViewport: + case spv::Capability::Int64Atomics: + case spv::Capability::TransformFeedback: + case spv::Capability::GeometryStreams: + case spv::Capability::Float16: + case spv::Capability::Int8: return true; + default: + break; } return false; } @@ -104,27 +110,29 @@ bool IsSupportOptionalVulkan_1_0(uint32_t capability) { bool IsSupportOptionalVulkan_1_1(uint32_t capability) { if (IsSupportOptionalVulkan_1_0(capability)) return true; - switch (capability) { - case SpvCapabilityGroupNonUniform: - case SpvCapabilityGroupNonUniformVote: - case SpvCapabilityGroupNonUniformArithmetic: - case SpvCapabilityGroupNonUniformBallot: - case SpvCapabilityGroupNonUniformShuffle: - case SpvCapabilityGroupNonUniformShuffleRelative: - case SpvCapabilityGroupNonUniformClustered: - case SpvCapabilityGroupNonUniformQuad: - case SpvCapabilityDrawParameters: - // Alias SpvCapabilityStorageBuffer16BitAccess. - case SpvCapabilityStorageUniformBufferBlock16: - // Alias SpvCapabilityUniformAndStorageBuffer16BitAccess. - case SpvCapabilityStorageUniform16: - case SpvCapabilityStoragePushConstant16: - case SpvCapabilityStorageInputOutput16: - case SpvCapabilityDeviceGroup: - case SpvCapabilityMultiView: - case SpvCapabilityVariablePointersStorageBuffer: - case SpvCapabilityVariablePointers: + switch (spv::Capability(capability)) { + case spv::Capability::GroupNonUniform: + case spv::Capability::GroupNonUniformVote: + case spv::Capability::GroupNonUniformArithmetic: + case spv::Capability::GroupNonUniformBallot: + case spv::Capability::GroupNonUniformShuffle: + case spv::Capability::GroupNonUniformShuffleRelative: + case spv::Capability::GroupNonUniformClustered: + case spv::Capability::GroupNonUniformQuad: + case spv::Capability::DrawParameters: + // Alias spv::Capability::StorageBuffer16BitAccess. + case spv::Capability::StorageUniformBufferBlock16: + // Alias spv::Capability::UniformAndStorageBuffer16BitAccess. + case spv::Capability::StorageUniform16: + case spv::Capability::StoragePushConstant16: + case spv::Capability::StorageInputOutput16: + case spv::Capability::DeviceGroup: + case spv::Capability::MultiView: + case spv::Capability::VariablePointersStorageBuffer: + case spv::Capability::VariablePointers: return true; + default: + break; } return false; } @@ -132,47 +140,51 @@ bool IsSupportOptionalVulkan_1_1(uint32_t capability) { bool IsSupportOptionalVulkan_1_2(uint32_t capability) { if (IsSupportOptionalVulkan_1_1(capability)) return true; - switch (capability) { - case SpvCapabilityDenormPreserve: - case SpvCapabilityDenormFlushToZero: - case SpvCapabilitySignedZeroInfNanPreserve: - case SpvCapabilityRoundingModeRTE: - case SpvCapabilityRoundingModeRTZ: - case SpvCapabilityVulkanMemoryModel: - case SpvCapabilityVulkanMemoryModelDeviceScope: - case SpvCapabilityStorageBuffer8BitAccess: - case SpvCapabilityUniformAndStorageBuffer8BitAccess: - case SpvCapabilityStoragePushConstant8: - case SpvCapabilityShaderViewportIndex: - case SpvCapabilityShaderLayer: - case SpvCapabilityPhysicalStorageBufferAddresses: - case SpvCapabilityRuntimeDescriptorArray: - case SpvCapabilityUniformTexelBufferArrayDynamicIndexing: - case SpvCapabilityStorageTexelBufferArrayDynamicIndexing: - case SpvCapabilityUniformBufferArrayNonUniformIndexing: - case SpvCapabilitySampledImageArrayNonUniformIndexing: - case SpvCapabilityStorageBufferArrayNonUniformIndexing: - case SpvCapabilityStorageImageArrayNonUniformIndexing: - case SpvCapabilityInputAttachmentArrayNonUniformIndexing: - case SpvCapabilityUniformTexelBufferArrayNonUniformIndexing: - case SpvCapabilityStorageTexelBufferArrayNonUniformIndexing: + switch (spv::Capability(capability)) { + case spv::Capability::DenormPreserve: + case spv::Capability::DenormFlushToZero: + case spv::Capability::SignedZeroInfNanPreserve: + case spv::Capability::RoundingModeRTE: + case spv::Capability::RoundingModeRTZ: + case spv::Capability::VulkanMemoryModel: + case spv::Capability::VulkanMemoryModelDeviceScope: + case spv::Capability::StorageBuffer8BitAccess: + case spv::Capability::UniformAndStorageBuffer8BitAccess: + case spv::Capability::StoragePushConstant8: + case spv::Capability::ShaderViewportIndex: + case spv::Capability::ShaderLayer: + case spv::Capability::PhysicalStorageBufferAddresses: + case spv::Capability::RuntimeDescriptorArray: + case spv::Capability::UniformTexelBufferArrayDynamicIndexing: + case spv::Capability::StorageTexelBufferArrayDynamicIndexing: + case spv::Capability::UniformBufferArrayNonUniformIndexing: + case spv::Capability::SampledImageArrayNonUniformIndexing: + case spv::Capability::StorageBufferArrayNonUniformIndexing: + case spv::Capability::StorageImageArrayNonUniformIndexing: + case spv::Capability::InputAttachmentArrayNonUniformIndexing: + case spv::Capability::UniformTexelBufferArrayNonUniformIndexing: + case spv::Capability::StorageTexelBufferArrayNonUniformIndexing: return true; + default: + break; } return false; } bool IsSupportGuaranteedOpenCL_1_2(uint32_t capability, bool embedded_profile) { - switch (capability) { - case SpvCapabilityAddresses: - case SpvCapabilityFloat16Buffer: - case SpvCapabilityInt16: - case SpvCapabilityInt8: - case SpvCapabilityKernel: - case SpvCapabilityLinkage: - case SpvCapabilityVector16: + switch (spv::Capability(capability)) { + case spv::Capability::Addresses: + case spv::Capability::Float16Buffer: + case spv::Capability::Int16: + case spv::Capability::Int8: + case spv::Capability::Kernel: + case spv::Capability::Linkage: + case spv::Capability::Vector16: return true; - case SpvCapabilityInt64: + case spv::Capability::Int64: return !embedded_profile; + default: + break; } return false; } @@ -180,12 +192,14 @@ bool IsSupportGuaranteedOpenCL_1_2(uint32_t capability, bool embedded_profile) { bool IsSupportGuaranteedOpenCL_2_0(uint32_t capability, bool embedded_profile) { if (IsSupportGuaranteedOpenCL_1_2(capability, embedded_profile)) return true; - switch (capability) { - case SpvCapabilityDeviceEnqueue: - case SpvCapabilityGenericPointer: - case SpvCapabilityGroups: - case SpvCapabilityPipes: + switch (spv::Capability(capability)) { + case spv::Capability::DeviceEnqueue: + case spv::Capability::GenericPointer: + case spv::Capability::Groups: + case spv::Capability::Pipes: return true; + default: + break; } return false; } @@ -193,19 +207,23 @@ bool IsSupportGuaranteedOpenCL_2_0(uint32_t capability, bool embedded_profile) { bool IsSupportGuaranteedOpenCL_2_2(uint32_t capability, bool embedded_profile) { if (IsSupportGuaranteedOpenCL_2_0(capability, embedded_profile)) return true; - switch (capability) { - case SpvCapabilitySubgroupDispatch: - case SpvCapabilityPipeStorage: + switch (spv::Capability(capability)) { + case spv::Capability::SubgroupDispatch: + case spv::Capability::PipeStorage: return true; + default: + break; } return false; } bool IsSupportOptionalOpenCL_1_2(uint32_t capability) { - switch (capability) { - case SpvCapabilityImageBasic: - case SpvCapabilityFloat64: + switch (spv::Capability(capability)) { + case spv::Capability::ImageBasic: + case spv::Capability::Float64: return true; + default: + break; } return false; } @@ -222,21 +240,23 @@ bool IsEnabledByExtension(ValidationState_t& _, uint32_t capability) { ExtensionSet operand_exts(operand_desc->numExtensions, operand_desc->extensions); - if (operand_exts.IsEmpty()) return false; + if (operand_exts.empty()) return false; return _.HasAnyOfExtensions(operand_exts); } bool IsEnabledByCapabilityOpenCL_1_2(ValidationState_t& _, uint32_t capability) { - if (_.HasCapability(SpvCapabilityImageBasic)) { - switch (capability) { - case SpvCapabilityLiteralSampler: - case SpvCapabilitySampled1D: - case SpvCapabilityImage1D: - case SpvCapabilitySampledBuffer: - case SpvCapabilityImageBuffer: + if (_.HasCapability(spv::Capability::ImageBasic)) { + switch (spv::Capability(capability)) { + case spv::Capability::LiteralSampler: + case spv::Capability::Sampled1D: + case spv::Capability::Image1D: + case spv::Capability::SampledBuffer: + case spv::Capability::ImageBuffer: return true; + default: + break; } return false; } @@ -245,15 +265,17 @@ bool IsEnabledByCapabilityOpenCL_1_2(ValidationState_t& _, bool IsEnabledByCapabilityOpenCL_2_0(ValidationState_t& _, uint32_t capability) { - if (_.HasCapability(SpvCapabilityImageBasic)) { - switch (capability) { - case SpvCapabilityImageReadWrite: - case SpvCapabilityLiteralSampler: - case SpvCapabilitySampled1D: - case SpvCapabilityImage1D: - case SpvCapabilitySampledBuffer: - case SpvCapabilityImageBuffer: + if (_.HasCapability(spv::Capability::ImageBasic)) { + switch (spv::Capability(capability)) { + case spv::Capability::ImageReadWrite: + case spv::Capability::LiteralSampler: + case spv::Capability::Sampled1D: + case spv::Capability::Image1D: + case spv::Capability::SampledBuffer: + case spv::Capability::ImageBuffer: return true; + default: + break; } return false; } @@ -265,7 +287,7 @@ bool IsEnabledByCapabilityOpenCL_2_0(ValidationState_t& _, // Validates that capability declarations use operands allowed in the current // context. spv_result_t CapabilityPass(ValidationState_t& _, const Instruction* inst) { - if (inst->opcode() != SpvOpCapability) return SPV_SUCCESS; + if (inst->opcode() != spv::Op::OpCapability) return SPV_SUCCESS; assert(inst->operands().size() == 1); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_cfg.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_cfg.cpp index 26b2e94a6..9b7161fc4 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_cfg.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_cfg.cpp @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include #include #include #include -#include #include #include #include @@ -28,7 +26,6 @@ #include "source/cfa.h" #include "source/opcode.h" #include "source/spirv_constant.h" -#include "source/spirv_target_env.h" #include "source/spirv_validator_options.h" #include "source/val/basic_block.h" #include "source/val/construct.h" @@ -54,9 +51,8 @@ spv_result_t ValidatePhi(ValidationState_t& _, const Instruction* inst) { << "OpPhi must not have void result type"; } if (_.IsPointerType(inst->type_id()) && - _.addressing_model() == SpvAddressingModelLogical) { - if (!_.features().variable_pointers && - !_.features().variable_pointers_storage_buffer) { + _.addressing_model() == spv::AddressingModel::Logical) { + if (!_.features().variable_pointers) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Using pointers with OpPhi requires capability " << "VariablePointers or VariablePointersStorageBuffer"; @@ -65,12 +61,14 @@ spv_result_t ValidatePhi(ValidationState_t& _, const Instruction* inst) { const Instruction* type_inst = _.FindDef(inst->type_id()); assert(type_inst); - const SpvOp type_opcode = type_inst->opcode(); - - if (!_.options()->before_hlsl_legalization) { - if (type_opcode == SpvOpTypeSampledImage || - (_.HasCapability(SpvCapabilityShader) && - (type_opcode == SpvOpTypeImage || type_opcode == SpvOpTypeSampler))) { + const spv::Op type_opcode = type_inst->opcode(); + + if (!_.options()->before_hlsl_legalization && + !_.HasCapability(spv::Capability::BindlessTextureNV)) { + if (type_opcode == spv::Op::OpTypeSampledImage || + (_.HasCapability(spv::Capability::Shader) && + (type_opcode == spv::Op::OpTypeImage || + type_opcode == spv::Op::OpTypeSampler))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result type cannot be Op" << spvOpcodeString(type_opcode); } @@ -108,7 +106,7 @@ spv_result_t ValidatePhi(ValidationState_t& _, const Instruction* inst) { << " type " << _.getIdName(inc_type_id) << "."; } } else { - if (_.GetIdOpcode(inc_id) != SpvOpLabel) { + if (_.GetIdOpcode(inc_id) != spv::Op::OpLabel) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpPhi's incoming basic block " << _.getIdName(inc_id) << " is not an OpLabel."; @@ -143,7 +141,7 @@ spv_result_t ValidateBranch(ValidationState_t& _, const Instruction* inst) { // target operands must be OpLabel const auto id = inst->GetOperandAs(0); const auto target = _.FindDef(id); - if (!target || SpvOpLabel != target->opcode()) { + if (!target || spv::Op::OpLabel != target->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "'Target Label' operands for OpBranch must be the ID " "of an OpLabel instruction"; @@ -178,7 +176,7 @@ spv_result_t ValidateBranchConditional(ValidationState_t& _, // PerformCfgChecks already checks for that const auto true_id = inst->GetOperandAs(1); const auto true_target = _.FindDef(true_id); - if (!true_target || SpvOpLabel != true_target->opcode()) { + if (!true_target || spv::Op::OpLabel != true_target->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "The 'True Label' operand for OpBranchConditional must be the " "ID of an OpLabel instruction"; @@ -186,12 +184,14 @@ spv_result_t ValidateBranchConditional(ValidationState_t& _, const auto false_id = inst->GetOperandAs(2); const auto false_target = _.FindDef(false_id); - if (!false_target || SpvOpLabel != false_target->opcode()) { + if (!false_target || spv::Op::OpLabel != false_target->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "The 'False Label' operand for OpBranchConditional must be the " "ID of an OpLabel instruction"; } + // A similar requirement for SPV_KHR_maximal_reconvergence is deferred until + // entry point call trees have been reconrded. if (_.version() >= SPV_SPIRV_VERSION_WORD(1, 6) && true_id == false_id) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "In SPIR-V 1.6 or later, True Label and False Label must be " @@ -213,7 +213,7 @@ spv_result_t ValidateSwitch(ValidationState_t& _, const Instruction* inst) { } const auto default_label = _.FindDef(inst->GetOperandAs(1)); - if (default_label->opcode() != SpvOpLabel) { + if (default_label->opcode() != spv::Op::OpLabel) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Default must be an OpLabel instruction"; } @@ -223,7 +223,7 @@ spv_result_t ValidateSwitch(ValidationState_t& _, const Instruction* inst) { // literal, id const auto id = inst->GetOperandAs(i + 1); const auto target = _.FindDef(id); - if (!target || SpvOpLabel != target->opcode()) { + if (!target || spv::Op::OpLabel != target->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "'Target Label' operands for OpSwitch must be IDs of an " "OpLabel instruction"; @@ -239,27 +239,23 @@ spv_result_t ValidateReturnValue(ValidationState_t& _, const auto value = _.FindDef(value_id); if (!value || !value->type_id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpReturnValue Value '" << _.getIdName(value_id) - << "' does not represent a value."; + << "OpReturnValue Value " << _.getIdName(value_id) + << " does not represent a value."; } auto value_type = _.FindDef(value->type_id()); - if (!value_type || SpvOpTypeVoid == value_type->opcode()) { + if (!value_type || spv::Op::OpTypeVoid == value_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpReturnValue value's type '" - << _.getIdName(value->type_id()) << "' is missing or void."; + << "OpReturnValue value's type " + << _.getIdName(value->type_id()) << " is missing or void."; } - const bool uses_variable_pointer = - _.features().variable_pointers || - _.features().variable_pointers_storage_buffer; - - if (_.addressing_model() == SpvAddressingModelLogical && - SpvOpTypePointer == value_type->opcode() && !uses_variable_pointer && - !_.options()->relax_logical_pointer) { + if (_.addressing_model() == spv::AddressingModel::Logical && + spv::Op::OpTypePointer == value_type->opcode() && + !_.features().variable_pointers && !_.options()->relax_logical_pointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpReturnValue value's type '" + << "OpReturnValue value's type " << _.getIdName(value->type_id()) - << "' is a pointer, which is invalid in the Logical addressing " + << " is a pointer, which is invalid in the Logical addressing " "model."; } @@ -267,17 +263,22 @@ spv_result_t ValidateReturnValue(ValidationState_t& _, const auto return_type = _.FindDef(function->GetResultTypeId()); if (!return_type || return_type->id() != value_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpReturnValue Value '" << _.getIdName(value_id) - << "'s type does not match OpFunction's return type."; + << "OpReturnValue Value " << _.getIdName(value_id) + << "s type does not match OpFunction's return type."; } return SPV_SUCCESS; } +uint32_t operator>>(const spv::LoopControlShift& lhs, + const spv::LoopControlShift& rhs) { + return uint32_t(lhs) >> uint32_t(rhs); +} + spv_result_t ValidateLoopMerge(ValidationState_t& _, const Instruction* inst) { const auto merge_id = inst->GetOperandAs(0); const auto merge = _.FindDef(merge_id); - if (!merge || merge->opcode() != SpvOpLabel) { + if (!merge || merge->opcode() != spv::Op::OpLabel) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Merge Block " << _.getIdName(merge_id) << " must be an OpLabel"; } @@ -288,7 +289,7 @@ spv_result_t ValidateLoopMerge(ValidationState_t& _, const Instruction* inst) { const auto continue_id = inst->GetOperandAs(1); const auto continue_target = _.FindDef(continue_id); - if (!continue_target || continue_target->opcode() != SpvOpLabel) { + if (!continue_target || continue_target->opcode() != spv::Op::OpLabel) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Continue Target " << _.getIdName(continue_id) << " must be an OpLabel"; @@ -299,36 +300,36 @@ spv_result_t ValidateLoopMerge(ValidationState_t& _, const Instruction* inst) { << "Merge Block and Continue Target must be different ids"; } - const auto loop_control = inst->GetOperandAs(2); - if ((loop_control >> SpvLoopControlUnrollShift) & 0x1 && - (loop_control >> SpvLoopControlDontUnrollShift) & 0x1) { + const auto loop_control = inst->GetOperandAs(2); + if ((loop_control >> spv::LoopControlShift::Unroll) & 0x1 && + (loop_control >> spv::LoopControlShift::DontUnroll) & 0x1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Unroll and DontUnroll loop controls must not both be specified"; } - if ((loop_control >> SpvLoopControlDontUnrollShift) & 0x1 && - (loop_control >> SpvLoopControlPeelCountShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::DontUnroll) & 0x1 && + (loop_control >> spv::LoopControlShift::PeelCount) & 0x1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "PeelCount and DontUnroll " "loop controls must not " "both be specified"; } - if ((loop_control >> SpvLoopControlDontUnrollShift) & 0x1 && - (loop_control >> SpvLoopControlPartialCountShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::DontUnroll) & 0x1 && + (loop_control >> spv::LoopControlShift::PartialCount) & 0x1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "PartialCount and " "DontUnroll loop controls " "must not both be specified"; } uint32_t operand = 3; - if ((loop_control >> SpvLoopControlDependencyLengthShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::DependencyLength) & 0x1) { ++operand; } - if ((loop_control >> SpvLoopControlMinIterationsShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::MinIterations) & 0x1) { ++operand; } - if ((loop_control >> SpvLoopControlMaxIterationsShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::MaxIterations) & 0x1) { ++operand; } - if ((loop_control >> SpvLoopControlIterationMultipleShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::IterationMultiple) & 0x1) { if (inst->operands().size() < operand || inst->GetOperandAs(operand) == 0) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "IterationMultiple loop " @@ -337,10 +338,10 @@ spv_result_t ValidateLoopMerge(ValidationState_t& _, const Instruction* inst) { } ++operand; } - if ((loop_control >> SpvLoopControlPeelCountShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::PeelCount) & 0x1) { ++operand; } - if ((loop_control >> SpvLoopControlPartialCountShift) & 0x1) { + if ((loop_control >> spv::LoopControlShift::PartialCount) & 0x1) { ++operand; } @@ -471,7 +472,7 @@ spv_result_t FindCaseFallThrough( std::vector stack; stack.push_back(target_block); std::unordered_set visited; - bool target_reachable = target_block->reachable(); + bool target_reachable = target_block->structurally_reachable(); int target_depth = function->GetBlockDepth(target_block); while (!stack.empty()) { auto block = stack.back(); @@ -481,8 +482,8 @@ spv_result_t FindCaseFallThrough( if (!visited.insert(block).second) continue; - if (target_reachable && block->reachable() && - target_block->dominates(*block)) { + if (target_reachable && block->structurally_reachable() && + target_block->structurally_dominates(*block)) { // Still in the case construct. for (auto successor : *block->successors()) { stack.push_back(successor); @@ -554,11 +555,12 @@ spv_result_t StructuredSwitchChecks(ValidationState_t& _, Function* function, if (seen_iter == seen_to_fall_through.end()) { const auto target_block = function->GetBlock(target).first; // OpSwitch must dominate all its case constructs. - if (header->reachable() && target_block->reachable() && - !header->dominates(*target_block)) { + if (header->structurally_reachable() && + target_block->structurally_reachable() && + !header->structurally_dominates(*target_block)) { return _.diag(SPV_ERROR_INVALID_CFG, header->label()) - << "Selection header " << _.getIdName(header->id()) - << " does not dominate its case construct " + << "Switch header " << _.getIdName(header->id()) + << " does not structurally dominate its case construct " << _.getIdName(target); } @@ -647,9 +649,9 @@ spv_result_t ValidateStructuredSelections( const auto index = terminator - &_.ordered_instructions()[0]; auto* merge = &_.ordered_instructions()[index - 1]; // Marks merges and continues as seen. - if (merge->opcode() == SpvOpSelectionMerge) { + if (merge->opcode() == spv::Op::OpSelectionMerge) { seen.insert(merge->GetOperandAs(0)); - } else if (merge->opcode() == SpvOpLoopMerge) { + } else if (merge->opcode() == spv::Op::OpLoopMerge) { seen.insert(merge->GetOperandAs(0)); seen.insert(merge->GetOperandAs(1)); } else { @@ -658,9 +660,9 @@ spv_result_t ValidateStructuredSelections( } // Skip unreachable blocks. - if (!block->reachable()) continue; + if (!block->structurally_reachable()) continue; - if (terminator->opcode() == SpvOpBranchConditional) { + if (terminator->opcode() == spv::Op::OpBranchConditional) { const auto true_label = terminator->GetOperandAs(1); const auto false_label = terminator->GetOperandAs(2); // Mark the upcoming blocks as seen now, but only error out if this block @@ -668,14 +670,15 @@ spv_result_t ValidateStructuredSelections( // previously. const bool true_label_unseen = seen.insert(true_label).second; const bool false_label_unseen = seen.insert(false_label).second; - if (!merge && true_label_unseen && false_label_unseen) { + if ((!merge || merge->opcode() == spv::Op::OpLoopMerge) && + true_label_unseen && false_label_unseen) { return _.diag(SPV_ERROR_INVALID_CFG, terminator) << "Selection must be structured"; } - } else if (terminator->opcode() == SpvOpSwitch) { + } else if (terminator->opcode() == spv::Op::OpSwitch) { if (!merge) { return _.diag(SPV_ERROR_INVALID_CFG, terminator) - << "OpSwitch must be preceeded by an OpSelectionMerge " + << "OpSwitch must be preceded by an OpSelectionMerge " "instruction"; } // Mark the targets as seen. @@ -713,7 +716,7 @@ spv_result_t StructuredControlFlowChecks( // Check the loop headers have exactly one back-edge branching to it for (BasicBlock* loop_header : function->ordered_blocks()) { - if (!loop_header->reachable()) continue; + if (!loop_header->structurally_reachable()) continue; if (!loop_header->is_type(kBlockTypeLoop)) continue; auto loop_header_id = loop_header->id(); auto num_latch_blocks = loop_latch_blocks[loop_header_id].size(); @@ -728,9 +731,10 @@ spv_result_t StructuredControlFlowChecks( // Check construct rules for (const Construct& construct : function->constructs()) { auto header = construct.entry_block(); + if (!header->structurally_reachable()) continue; auto merge = construct.exit_block(); - if (header->reachable() && !merge) { + if (!merge) { std::string construct_name, header_name, exit_name; std::tie(construct_name, header_name, exit_name) = ConstructNames(construct.type()); @@ -740,32 +744,32 @@ spv_result_t StructuredControlFlowChecks( exit_name + ". This may be a bug in the validator."; } - // If the exit block is reachable then it's dominated by the - // header. - if (merge && merge->reachable()) { - if (!header->dominates(*merge)) { - return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(merge->id())) - << ConstructErrorString(construct, _.getIdName(header->id()), - _.getIdName(merge->id()), - "does not dominate"); - } - // If it's really a merge block for a selection or loop, then it must be - // *strictly* dominated by the header. - if (construct.ExitBlockIsMergeBlock() && (header == merge)) { - return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(merge->id())) - << ConstructErrorString(construct, _.getIdName(header->id()), - _.getIdName(merge->id()), - "does not strictly dominate"); - } + // If the header is reachable, the merge is guaranteed to be structurally + // reachable. + if (!header->structurally_dominates(*merge)) { + return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(merge->id())) + << ConstructErrorString(construct, _.getIdName(header->id()), + _.getIdName(merge->id()), + "does not structurally dominate"); } + + // If it's really a merge block for a selection or loop, then it must be + // *strictly* structrually dominated by the header. + if (construct.ExitBlockIsMergeBlock() && (header == merge)) { + return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(merge->id())) + << ConstructErrorString(construct, _.getIdName(header->id()), + _.getIdName(merge->id()), + "does not strictly structurally dominate"); + } + // Check post-dominance for continue constructs. But dominance and // post-dominance only make sense when the construct is reachable. - if (header->reachable() && construct.type() == ConstructType::kContinue) { - if (!merge->postdominates(*header)) { + if (construct.type() == ConstructType::kContinue) { + if (!merge->structurally_postdominates(*header)) { return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(merge->id())) << ConstructErrorString(construct, _.getIdName(header->id()), _.getIdName(merge->id()), - "is not post dominated by"); + "is not structurally post dominated by"); } } @@ -776,7 +780,7 @@ spv_result_t StructuredControlFlowChecks( for (auto block : construct_blocks) { // Check that all exits from the construct are via structured exits. for (auto succ : *block->successors()) { - if (block->reachable() && !construct_blocks.count(succ) && + if (!construct_blocks.count(succ) && !construct.IsStructuredExit(_, succ)) { return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(block->id())) << "block " << _.getIdName(block->id()) << " exits the " @@ -789,7 +793,7 @@ spv_result_t StructuredControlFlowChecks( // Check that for all non-header blocks, all predecessors are within this // construct. for (auto pred : *block->predecessors()) { - if (pred->reachable() && !construct_blocks.count(pred)) { + if (pred->structurally_reachable() && !construct_blocks.count(pred)) { return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(pred->id())) << "block " << pred->id() << " branches to the " << construct_name << " construct, but not to the " @@ -801,11 +805,11 @@ spv_result_t StructuredControlFlowChecks( block->is_type(BlockType::kBlockTypeLoop)) { size_t index = (block->terminator() - &_.ordered_instructions()[0]) - 1; const auto& merge_inst = _.ordered_instructions()[index]; - if (merge_inst.opcode() == SpvOpSelectionMerge || - merge_inst.opcode() == SpvOpLoopMerge) { + if (merge_inst.opcode() == spv::Op::OpSelectionMerge || + merge_inst.opcode() == spv::Op::OpLoopMerge) { uint32_t merge_id = merge_inst.GetOperandAs(0); auto merge_block = function->GetBlock(merge_id).first; - if (merge_block->reachable() && + if (merge_block->structurally_reachable() && !construct_blocks.count(merge_block)) { return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(block->id())) << "Header block " << _.getIdName(block->id()) @@ -818,9 +822,46 @@ spv_result_t StructuredControlFlowChecks( } } + if (construct.type() == ConstructType::kLoop) { + // If the continue target differs from the loop header, then check that + // all edges into the continue construct come from within the loop. + const auto index = header->terminator() - &_.ordered_instructions()[0]; + const auto& merge_inst = _.ordered_instructions()[index - 1]; + const auto continue_id = merge_inst.GetOperandAs(1); + const auto* continue_inst = _.FindDef(continue_id); + // OpLabel instructions aren't stored as part of the basic block for + // legacy reaasons. Grab the next instruction and use it's block pointer + // instead. + const auto next_index = + (continue_inst - &_.ordered_instructions()[0]) + 1; + const auto& next_inst = _.ordered_instructions()[next_index]; + const auto* continue_target = next_inst.block(); + if (header->id() != continue_id) { + for (auto pred : *continue_target->predecessors()) { + // Ignore back-edges from within the continue construct. + bool is_back_edge = false; + for (auto back_edge : back_edges) { + uint32_t back_edge_block; + uint32_t header_block; + std::tie(back_edge_block, header_block) = back_edge; + if (header_block == continue_id && back_edge_block == pred->id()) + is_back_edge = true; + } + if (!construct_blocks.count(pred) && !is_back_edge) { + return _.diag(SPV_ERROR_INVALID_CFG, pred->terminator()) + << "Block " << _.getIdName(pred->id()) + << " branches to the loop continue target " + << _.getIdName(continue_id) + << ", but is not contained in the associated loop construct " + << _.getIdName(header->id()); + } + } + } + } + // Checks rules for case constructs. if (construct.type() == ConstructType::kSelection && - header->terminator()->opcode() == SpvOpSwitch) { + header->terminator()->opcode() == spv::Op::OpSwitch) { const auto terminator = header->terminator(); if (auto error = StructuredSwitchChecks(_, function, terminator, header, merge)) { @@ -836,6 +877,95 @@ spv_result_t StructuredControlFlowChecks( return SPV_SUCCESS; } +spv_result_t MaximalReconvergenceChecks(ValidationState_t& _) { + // Find all the entry points with the MaximallyReconvergencesKHR execution + // mode. + std::unordered_set maximal_funcs; + std::unordered_set maximal_entry_points; + for (auto entry_point : _.entry_points()) { + const auto* exec_modes = _.GetExecutionModes(entry_point); + if (exec_modes && + exec_modes->count(spv::ExecutionMode::MaximallyReconvergesKHR)) { + maximal_entry_points.insert(entry_point); + maximal_funcs.insert(entry_point); + } + } + + if (maximal_entry_points.empty()) { + return SPV_SUCCESS; + } + + // Find all the functions reachable from a maximal reconvergence entry point. + for (const auto& func : _.functions()) { + const auto& entry_points = _.EntryPointReferences(func.id()); + for (auto id : entry_points) { + if (maximal_entry_points.count(id)) { + maximal_funcs.insert(func.id()); + break; + } + } + } + + // Check for conditional branches with the same true and false targets. + for (const auto& inst : _.ordered_instructions()) { + if (inst.opcode() == spv::Op::OpBranchConditional) { + const auto true_id = inst.GetOperandAs(1); + const auto false_id = inst.GetOperandAs(2); + if (true_id == false_id && maximal_funcs.count(inst.function()->id())) { + return _.diag(SPV_ERROR_INVALID_ID, &inst) + << "In entry points using the MaximallyReconvergesKHR execution " + "mode, True Label and False Label must be different labels"; + } + } + } + + // Check for invalid multiple predecessors. Only loop headers, continue + // targets, merge targets or switch targets or defaults may have multiple + // unique predecessors. + for (const auto& func : _.functions()) { + if (!maximal_funcs.count(func.id())) continue; + + for (const auto* block : func.ordered_blocks()) { + std::unordered_set unique_preds; + const auto* preds = block->predecessors(); + if (!preds) continue; + + for (const auto* pred : *preds) { + unique_preds.insert(pred->id()); + } + if (unique_preds.size() < 2) continue; + + const auto* terminator = block->terminator(); + const auto index = terminator - &_.ordered_instructions()[0]; + const auto* pre_terminator = &_.ordered_instructions()[index - 1]; + if (pre_terminator->opcode() == spv::Op::OpLoopMerge) continue; + + const auto* label = _.FindDef(block->id()); + bool ok = false; + for (const auto& pair : label->uses()) { + const auto* use_inst = pair.first; + switch (use_inst->opcode()) { + case spv::Op::OpSelectionMerge: + case spv::Op::OpLoopMerge: + case spv::Op::OpSwitch: + ok = true; + break; + default: + break; + } + } + if (!ok) { + return _.diag(SPV_ERROR_INVALID_CFG, label) + << "In entry points using the MaximallyReconvergesKHR " + "execution mode, this basic block must not have multiple " + "unique predecessors"; + } + } + } + + return SPV_SUCCESS; +} + spv_result_t PerformCfgChecks(ValidationState_t& _) { for (auto& function : _.functions()) { // Check all referenced blocks are defined within a function @@ -855,52 +985,27 @@ spv_result_t PerformCfgChecks(ValidationState_t& _) { << _.getIdName(function.id()); } - // Set each block's immediate dominator and immediate postdominator, - // and find all back-edges. + // Set each block's immediate dominator. // // We want to analyze all the blocks in the function, even in degenerate // control flow cases including unreachable blocks. So use the augmented // CFG to ensure we cover all the blocks. std::vector postorder; - std::vector postdom_postorder; - std::vector> back_edges; auto ignore_block = [](const BasicBlock*) {}; - auto ignore_edge = [](const BasicBlock*, const BasicBlock*) {}; + auto no_terminal_blocks = [](const BasicBlock*) { return false; }; if (!function.ordered_blocks().empty()) { /// calculate dominators CFA::DepthFirstTraversal( function.first_block(), function.AugmentedCFGSuccessorsFunction(), ignore_block, [&](const BasicBlock* b) { postorder.push_back(b); }, - ignore_edge); + no_terminal_blocks); auto edges = CFA::CalculateDominators( postorder, function.AugmentedCFGPredecessorsFunction()); for (auto edge : edges) { if (edge.first != edge.second) edge.first->SetImmediateDominator(edge.second); } - - /// calculate post dominators - CFA::DepthFirstTraversal( - function.pseudo_exit_block(), - function.AugmentedCFGPredecessorsFunction(), ignore_block, - [&](const BasicBlock* b) { postdom_postorder.push_back(b); }, - ignore_edge); - auto postdom_edges = CFA::CalculateDominators( - postdom_postorder, function.AugmentedCFGSuccessorsFunction()); - for (auto edge : postdom_edges) { - edge.first->SetImmediatePostDominator(edge.second); - } - /// calculate back edges. - CFA::DepthFirstTraversal( - function.pseudo_entry_block(), - function - .AugmentedCFGSuccessorsFunctionIncludingHeaderToContinueEdge(), - ignore_block, ignore_block, - [&](const BasicBlock* from, const BasicBlock* to) { - back_edges.emplace_back(from->id(), to->id()); - }); } - UpdateContinueConstructExitBlocks(function, back_edges); auto& blocks = function.ordered_blocks(); if (!blocks.empty()) { @@ -917,9 +1022,9 @@ spv_result_t PerformCfgChecks(ValidationState_t& _) { } } } - // If we have structed control flow, check that no block has a control + // If we have structured control flow, check that no block has a control // flow nesting depth larger than the limit. - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { const int control_flow_nesting_depth_limit = _.options()->universal_limits_.max_control_flow_nesting_depth; for (auto block = begin(blocks); block != end(blocks); ++block) { @@ -933,19 +1038,70 @@ spv_result_t PerformCfgChecks(ValidationState_t& _) { } /// Structured control flow checks are only required for shader capabilities - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { + // Calculate structural dominance. + postorder.clear(); + std::vector postdom_postorder; + std::vector> back_edges; + if (!function.ordered_blocks().empty()) { + /// calculate dominators + CFA::DepthFirstTraversal( + function.first_block(), + function.AugmentedStructuralCFGSuccessorsFunction(), ignore_block, + [&](const BasicBlock* b) { postorder.push_back(b); }, + no_terminal_blocks); + auto edges = CFA::CalculateDominators( + postorder, function.AugmentedStructuralCFGPredecessorsFunction()); + for (auto edge : edges) { + if (edge.first != edge.second) + edge.first->SetImmediateStructuralDominator(edge.second); + } + + /// calculate post dominators + CFA::DepthFirstTraversal( + function.pseudo_exit_block(), + function.AugmentedStructuralCFGPredecessorsFunction(), ignore_block, + [&](const BasicBlock* b) { postdom_postorder.push_back(b); }, + no_terminal_blocks); + auto postdom_edges = CFA::CalculateDominators( + postdom_postorder, + function.AugmentedStructuralCFGSuccessorsFunction()); + for (auto edge : postdom_edges) { + edge.first->SetImmediateStructuralPostDominator(edge.second); + } + /// calculate back edges. + CFA::DepthFirstTraversal( + function.pseudo_entry_block(), + function.AugmentedStructuralCFGSuccessorsFunction(), ignore_block, + ignore_block, + [&](const BasicBlock* from, const BasicBlock* to) { + // A back edge must be a real edge. Since the augmented successors + // contain structural edges, filter those from consideration. + for (const auto* succ : *(from->successors())) { + if (succ == to) back_edges.emplace_back(from->id(), to->id()); + } + }, + no_terminal_blocks); + } + UpdateContinueConstructExitBlocks(function, back_edges); + if (auto error = StructuredControlFlowChecks(_, &function, back_edges, postorder)) return error; } } + + if (auto error = MaximalReconvergenceChecks(_)) { + return error; + } + return SPV_SUCCESS; } spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); switch (opcode) { - case SpvOpLabel: + case spv::Op::OpLabel: if (auto error = _.current_function().RegisterBlock(inst->id())) return error; @@ -954,7 +1110,7 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { // passes the OpLabel ends up not being part of the basic block it starts. _.current_function().current_block()->set_label(inst); break; - case SpvOpLoopMerge: { + case spv::Op::OpLoopMerge: { uint32_t merge_block = inst->GetOperandAs(0); uint32_t continue_block = inst->GetOperandAs(1); CFG_ASSERT(MergeBlockAssert, merge_block); @@ -963,20 +1119,20 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { continue_block)) return error; } break; - case SpvOpSelectionMerge: { + case spv::Op::OpSelectionMerge: { uint32_t merge_block = inst->GetOperandAs(0); CFG_ASSERT(MergeBlockAssert, merge_block); if (auto error = _.current_function().RegisterSelectionMerge(merge_block)) return error; } break; - case SpvOpBranch: { + case spv::Op::OpBranch: { uint32_t target = inst->GetOperandAs(0); CFG_ASSERT(FirstBlockAssert, target); _.current_function().RegisterBlockEnd({target}); } break; - case SpvOpBranchConditional: { + case spv::Op::OpBranchConditional: { uint32_t tlabel = inst->GetOperandAs(1); uint32_t flabel = inst->GetOperandAs(2); CFG_ASSERT(FirstBlockAssert, tlabel); @@ -985,7 +1141,7 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { _.current_function().RegisterBlockEnd({tlabel, flabel}); } break; - case SpvOpSwitch: { + case spv::Op::OpSwitch: { std::vector cases; for (size_t i = 1; i < inst->operands().size(); i += 2) { uint32_t target = inst->GetOperandAs(i); @@ -994,43 +1150,45 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { } _.current_function().RegisterBlockEnd({cases}); } break; - case SpvOpReturn: { + case spv::Op::OpReturn: { const uint32_t return_type = _.current_function().GetResultTypeId(); const Instruction* return_type_inst = _.FindDef(return_type); assert(return_type_inst); - if (return_type_inst->opcode() != SpvOpTypeVoid) + if (return_type_inst->opcode() != spv::Op::OpTypeVoid) return _.diag(SPV_ERROR_INVALID_CFG, inst) << "OpReturn can only be called from a function with void " << "return type."; _.current_function().RegisterBlockEnd(std::vector()); break; } - case SpvOpKill: - case SpvOpReturnValue: - case SpvOpUnreachable: - case SpvOpTerminateInvocation: - case SpvOpIgnoreIntersectionKHR: - case SpvOpTerminateRayKHR: + case spv::Op::OpKill: + case spv::Op::OpReturnValue: + case spv::Op::OpUnreachable: + case spv::Op::OpTerminateInvocation: + case spv::Op::OpIgnoreIntersectionKHR: + case spv::Op::OpTerminateRayKHR: + case spv::Op::OpEmitMeshTasksEXT: _.current_function().RegisterBlockEnd(std::vector()); - if (opcode == SpvOpKill) { + // Ops with dedicated passes check for the Execution Model there + if (opcode == spv::Op::OpKill) { _.current_function().RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, "OpKill requires Fragment execution model"); } - if (opcode == SpvOpTerminateInvocation) { + if (opcode == spv::Op::OpTerminateInvocation) { _.current_function().RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, "OpTerminateInvocation requires Fragment execution model"); } - if (opcode == SpvOpIgnoreIntersectionKHR) { + if (opcode == spv::Op::OpIgnoreIntersectionKHR) { _.current_function().RegisterExecutionModelLimitation( - SpvExecutionModelAnyHitKHR, - "OpIgnoreIntersectionKHR requires AnyHit execution model"); + spv::ExecutionModel::AnyHitKHR, + "OpIgnoreIntersectionKHR requires AnyHitKHR execution model"); } - if (opcode == SpvOpTerminateRayKHR) { + if (opcode == spv::Op::OpTerminateRayKHR) { _.current_function().RegisterExecutionModelLimitation( - SpvExecutionModelAnyHitKHR, - "OpTerminateRayKHR requires AnyHit execution model"); + spv::ExecutionModel::AnyHitKHR, + "OpTerminateRayKHR requires AnyHitKHR execution model"); } break; @@ -1059,26 +1217,46 @@ void ReachabilityPass(ValidationState_t& _) { } } } + + // Repeat for structural reachability. + for (auto& f : _.functions()) { + std::vector stack; + auto entry = f.first_block(); + // Skip function declarations. + if (entry) stack.push_back(entry); + + while (!stack.empty()) { + auto block = stack.back(); + stack.pop_back(); + + if (block->structurally_reachable()) continue; + + block->set_structurally_reachable(true); + for (auto succ : *block->structural_successors()) { + stack.push_back(succ); + } + } + } } spv_result_t ControlFlowPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpPhi: + case spv::Op::OpPhi: if (auto error = ValidatePhi(_, inst)) return error; break; - case SpvOpBranch: + case spv::Op::OpBranch: if (auto error = ValidateBranch(_, inst)) return error; break; - case SpvOpBranchConditional: + case spv::Op::OpBranchConditional: if (auto error = ValidateBranchConditional(_, inst)) return error; break; - case SpvOpReturnValue: + case spv::Op::OpReturnValue: if (auto error = ValidateReturnValue(_, inst)) return error; break; - case SpvOpSwitch: + case spv::Op::OpSwitch: if (auto error = ValidateSwitch(_, inst)) return error; break; - case SpvOpLoopMerge: + case spv::Op::OpLoopMerge: if (auto error = ValidateLoopMerge(_, inst)) return error; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_composites.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_composites.cpp index 5d6c5e377..26486dac7 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_composites.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_composites.cpp @@ -14,12 +14,10 @@ // Validates correctness of composite SPIR-V instructions. -#include "source/val/validate.h" - -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_target_env.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -35,9 +33,10 @@ namespace { spv_result_t GetExtractInsertValueType(ValidationState_t& _, const Instruction* inst, uint32_t* member_type) { - const SpvOp opcode = inst->opcode(); - assert(opcode == SpvOpCompositeExtract || opcode == SpvOpCompositeInsert); - uint32_t word_index = opcode == SpvOpCompositeExtract ? 4 : 5; + const spv::Op opcode = inst->opcode(); + assert(opcode == spv::Op::OpCompositeExtract || + opcode == spv::Op::OpCompositeInsert); + uint32_t word_index = opcode == spv::Op::OpCompositeExtract ? 4 : 5; const uint32_t num_words = static_cast(inst->words().size()); const uint32_t composite_id_index = word_index - 1; const uint32_t num_indices = num_words - word_index; @@ -66,7 +65,7 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, const Instruction* const type_inst = _.FindDef(*member_type); assert(type_inst); switch (type_inst->opcode()) { - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { *member_type = type_inst->word(2); const uint32_t vector_size = type_inst->word(3); if (component_index >= vector_size) { @@ -76,7 +75,7 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, } break; } - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { *member_type = type_inst->word(2); const uint32_t num_cols = type_inst->word(3); if (component_index >= num_cols) { @@ -86,7 +85,7 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, } break; } - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { uint64_t array_size = 0; auto size = _.FindDef(type_inst->word(3)); *member_type = type_inst->word(2); @@ -95,7 +94,7 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, break; } - if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { + if (!_.EvalConstantValUint64(type_inst->word(3), &array_size)) { assert(0 && "Array type definition is corrupt"); } if (component_index >= array_size) { @@ -105,12 +104,12 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, } break; } - case SpvOpTypeRuntimeArray: { + case spv::Op::OpTypeRuntimeArray: { *member_type = type_inst->word(2); // Array size is unknown. break; } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const size_t num_struct_members = type_inst->words().size() - 2; if (component_index >= num_struct_members) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -123,7 +122,8 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, *member_type = type_inst->word(component_index + 2); break; } - case SpvOpTypeCooperativeMatrixNV: { + case spv::Op::OpTypeCooperativeMatrixKHR: + case spv::Op::OpTypeCooperativeMatrixNV: { *member_type = type_inst->word(2); break; } @@ -140,15 +140,15 @@ spv_result_t GetExtractInsertValueType(ValidationState_t& _, spv_result_t ValidateVectorExtractDynamic(ValidationState_t& _, const Instruction* inst) { const uint32_t result_type = inst->type_id(); - const SpvOp result_opcode = _.GetIdOpcode(result_type); + const spv::Op result_opcode = _.GetIdOpcode(result_type); if (!spvOpcodeIsScalarType(result_opcode)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be a scalar type"; } const uint32_t vector_type = _.GetOperandTypeId(inst, 2); - const SpvOp vector_opcode = _.GetIdOpcode(vector_type); - if (vector_opcode != SpvOpTypeVector) { + const spv::Op vector_opcode = _.GetIdOpcode(vector_type); + if (vector_opcode != spv::Op::OpTypeVector) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Vector type to be OpTypeVector"; } @@ -164,7 +164,7 @@ spv_result_t ValidateVectorExtractDynamic(ValidationState_t& _, << "Expected Index to be int scalar"; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot extract from a vector of 8- or 16-bit types"; @@ -175,8 +175,8 @@ spv_result_t ValidateVectorExtractDynamic(ValidationState_t& _, spv_result_t ValidateVectorInsertDyanmic(ValidationState_t& _, const Instruction* inst) { const uint32_t result_type = inst->type_id(); - const SpvOp result_opcode = _.GetIdOpcode(result_type); - if (result_opcode != SpvOpTypeVector) { + const spv::Op result_opcode = _.GetIdOpcode(result_type); + if (result_opcode != spv::Op::OpTypeVector) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypeVector"; } @@ -200,7 +200,7 @@ spv_result_t ValidateVectorInsertDyanmic(ValidationState_t& _, << "Expected Index to be int scalar"; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot insert into a vector of 8- or 16-bit types"; @@ -212,9 +212,9 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, const Instruction* inst) { const uint32_t num_operands = static_cast(inst->operands().size()); const uint32_t result_type = inst->type_id(); - const SpvOp result_opcode = _.GetIdOpcode(result_type); + const spv::Op result_opcode = _.GetIdOpcode(result_type); switch (result_opcode) { - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { const uint32_t num_result_components = _.GetDimension(result_type); const uint32_t result_component_type = _.GetComponentType(result_type); uint32_t given_component_count = 0; @@ -230,7 +230,7 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, if (operand_type == result_component_type) { ++given_component_count; } else { - if (_.GetIdOpcode(operand_type) != SpvOpTypeVector || + if (_.GetIdOpcode(operand_type) != spv::Op::OpTypeVector || _.GetComponentType(operand_type) != result_component_type) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Constituents to be scalars or vectors of" @@ -249,7 +249,7 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, break; } - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { uint32_t result_num_rows = 0; uint32_t result_num_cols = 0; uint32_t result_col_type = 0; @@ -277,10 +277,10 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, break; } - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { const Instruction* const array_inst = _.FindDef(result_type); assert(array_inst); - assert(array_inst->opcode() == SpvOpTypeArray); + assert(array_inst->opcode() == spv::Op::OpTypeArray); auto size = _.FindDef(array_inst->word(3)); if (spvOpcodeIsSpecConstant(size->opcode())) { @@ -289,7 +289,7 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, } uint64_t array_size = 0; - if (!_.GetConstantValUint64(array_inst->word(3), &array_size)) { + if (!_.EvalConstantValUint64(array_inst->word(3), &array_size)) { assert(0 && "Array type definition is corrupt"); } @@ -312,10 +312,10 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, break; } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const Instruction* const struct_inst = _.FindDef(result_type); assert(struct_inst); - assert(struct_inst->opcode() == SpvOpTypeStruct); + assert(struct_inst->opcode() == spv::Op::OpTypeStruct); if (struct_inst->operands().size() + 1 != num_operands) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -336,7 +336,26 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, break; } - case SpvOpTypeCooperativeMatrixNV: { + case spv::Op::OpTypeCooperativeMatrixKHR: { + const auto result_type_inst = _.FindDef(result_type); + assert(result_type_inst); + const auto component_type_id = + result_type_inst->GetOperandAs(1); + + if (3 != num_operands) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Must be only one constituent"; + } + + const uint32_t operand_type_id = _.GetOperandTypeId(inst, 2); + + if (operand_type_id != component_type_id) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Constituent type to be equal to the component type"; + } + break; + } + case spv::Op::OpTypeCooperativeMatrixNV: { const auto result_type_inst = _.FindDef(result_type); assert(result_type_inst); const auto component_type_id = @@ -362,7 +381,7 @@ spv_result_t ValidateCompositeConstruct(ValidationState_t& _, } } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot create a composite containing 8- or 16-bit types"; @@ -386,7 +405,7 @@ spv_result_t ValidateCompositeExtract(ValidationState_t& _, << spvOpcodeString(_.GetIdOpcode(member_type)) << ")."; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot extract from a composite of 8- or 16-bit types"; @@ -421,7 +440,7 @@ spv_result_t ValidateCompositeInsert(ValidationState_t& _, << spvOpcodeString(_.GetIdOpcode(member_type)) << ")."; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot insert into a composite of 8- or 16-bit types"; @@ -480,7 +499,7 @@ spv_result_t ValidateTranspose(ValidationState_t& _, const Instruction* inst) { << "to be the reverse of those of Result Type"; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot transpose matrices of 16-bit floats"; @@ -491,11 +510,12 @@ spv_result_t ValidateTranspose(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateVectorShuffle(ValidationState_t& _, const Instruction* inst) { auto resultType = _.FindDef(inst->type_id()); - if (!resultType || resultType->opcode() != SpvOpTypeVector) { + if (!resultType || resultType->opcode() != spv::Op::OpTypeVector) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "The Result Type of OpVectorShuffle must be" << " OpTypeVector. Found Op" - << spvOpcodeString(static_cast(resultType->opcode())) << "."; + << spvOpcodeString(static_cast(resultType->opcode())) + << "."; } // The number of components in Result Type must be the same as the number of @@ -505,8 +525,8 @@ spv_result_t ValidateVectorShuffle(ValidationState_t& _, if (componentCount != resultVectorDimension) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpVectorShuffle component literals count does not match " - "Result Type '" - << _.getIdName(resultType->id()) << "'s vector component count."; + "Result Type " + << _.getIdName(resultType->id()) << "s vector component count."; } // Vector 1 and Vector 2 must both have vector types, with the same Component @@ -515,11 +535,11 @@ spv_result_t ValidateVectorShuffle(ValidationState_t& _, auto vector1Type = _.FindDef(vector1Object->type_id()); auto vector2Object = _.FindDef(inst->GetOperandAs(3)); auto vector2Type = _.FindDef(vector2Object->type_id()); - if (!vector1Type || vector1Type->opcode() != SpvOpTypeVector) { + if (!vector1Type || vector1Type->opcode() != spv::Op::OpTypeVector) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "The type of Vector 1 must be OpTypeVector."; } - if (!vector2Type || vector2Type->opcode() != SpvOpTypeVector) { + if (!vector2Type || vector2Type->opcode() != spv::Op::OpTypeVector) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "The type of Vector 2 must be OpTypeVector."; } @@ -548,7 +568,7 @@ spv_result_t ValidateVectorShuffle(ValidationState_t& _, } } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot shuffle a vector of 8- or 16-bit types"; @@ -572,7 +592,7 @@ spv_result_t ValidateCopyLogical(ValidationState_t& _, << "Result Type does not logically match the Operand type"; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Cannot copy composites of 8- or 16-bit types"; @@ -586,23 +606,23 @@ spv_result_t ValidateCopyLogical(ValidationState_t& _, // Validates correctness of composite instructions. spv_result_t CompositesPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpVectorExtractDynamic: + case spv::Op::OpVectorExtractDynamic: return ValidateVectorExtractDynamic(_, inst); - case SpvOpVectorInsertDynamic: + case spv::Op::OpVectorInsertDynamic: return ValidateVectorInsertDyanmic(_, inst); - case SpvOpVectorShuffle: + case spv::Op::OpVectorShuffle: return ValidateVectorShuffle(_, inst); - case SpvOpCompositeConstruct: + case spv::Op::OpCompositeConstruct: return ValidateCompositeConstruct(_, inst); - case SpvOpCompositeExtract: + case spv::Op::OpCompositeExtract: return ValidateCompositeExtract(_, inst); - case SpvOpCompositeInsert: + case spv::Op::OpCompositeInsert: return ValidateCompositeInsert(_, inst); - case SpvOpCopyObject: + case spv::Op::OpCopyObject: return ValidateCopyObject(_, inst); - case SpvOpTranspose: + case spv::Op::OpTranspose: return ValidateTranspose(_, inst); - case SpvOpCopyLogical: + case spv::Op::OpCopyLogical: return ValidateCopyLogical(_, inst); default: break; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_constants.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_constants.cpp index dea95c8a2..4deaa4968 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_constants.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_constants.cpp @@ -24,10 +24,10 @@ namespace { spv_result_t ValidateConstantBool(ValidationState_t& _, const Instruction* inst) { auto type = _.FindDef(inst->type_id()); - if (!type || type->opcode() != SpvOpTypeBool) { + if (!type || type->opcode() != spv::Op::OpTypeBool) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Op" << spvOpcodeString(inst->opcode()) << " Result Type '" - << _.getIdName(inst->type_id()) << "' is not a boolean type."; + << "Op" << spvOpcodeString(inst->opcode()) << " Result Type " + << _.getIdName(inst->type_id()) << " is not a boolean type."; } return SPV_SUCCESS; @@ -40,22 +40,21 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, const auto result_type = _.FindDef(inst->type_id()); if (!result_type || !spvOpcodeIsComposite(result_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Result Type '" - << _.getIdName(inst->type_id()) << "' is not a composite type."; + << opcode_name << " Result Type " + << _.getIdName(inst->type_id()) << " is not a composite type."; } const auto constituent_count = inst->words().size() - 3; switch (result_type->opcode()) { - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { const auto component_count = result_type->GetOperandAs(2); if (component_count != constituent_count) { // TODO: Output ID's on diagnostic return _.diag(SPV_ERROR_INVALID_ID, inst) << opcode_name << " Constituent count does not match " - "Result Type '" - << _.getIdName(result_type->id()) - << "'s vector component count."; + "Result Type " + << _.getIdName(result_type->id()) << "s vector component count."; } const auto component_type = _.FindDef(result_type->GetOperandAs(1)); @@ -71,30 +70,30 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, if (!constituent || !spvOpcodeIsConstantOrUndef(constituent->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' is not a constant or undef."; + << " is not a constant or undef."; } const auto constituent_result_type = _.FindDef(constituent->type_id()); if (!constituent_result_type || - component_type->opcode() != constituent_result_type->opcode()) { + component_type->id() != constituent_result_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "'s type does not match Result Type '" - << _.getIdName(result_type->id()) << "'s vector element type."; + << "s type does not match Result Type " + << _.getIdName(result_type->id()) << "s vector element type."; } } } break; - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { const auto column_count = result_type->GetOperandAs(2); if (column_count != constituent_count) { // TODO: Output ID's on diagnostic return _.diag(SPV_ERROR_INVALID_ID, inst) << opcode_name << " Constituent count does not match " - "Result Type '" - << _.getIdName(result_type->id()) << "'s matrix column count."; + "Result Type " + << _.getIdName(result_type->id()) << "s matrix column count."; } const auto column_type = _.FindDef(result_type->words()[2]); @@ -120,9 +119,9 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, // The message says "... or undef" because the spec does not say // undef is a constant. return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' is not a constant or undef."; + << " is not a constant or undef."; } const auto vector = _.FindDef(constituent->type_id()); if (!vector) { @@ -131,32 +130,32 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, } if (column_type->opcode() != vector->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' type does not match Result Type '" - << _.getIdName(result_type->id()) << "'s matrix column type."; + << " type does not match Result Type " + << _.getIdName(result_type->id()) << "s matrix column type."; } const auto vector_component_type = _.FindDef(vector->GetOperandAs(1)); if (component_type->id() != vector_component_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' component type does not match Result Type '" + << " component type does not match Result Type " << _.getIdName(result_type->id()) - << "'s matrix column component type."; + << "s matrix column component type."; } if (component_count != vector->words()[3]) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' vector component count does not match Result Type '" + << " vector component count does not match Result Type " << _.getIdName(result_type->id()) - << "'s vector component count."; + << "s vector component count."; } } } break; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { auto element_type = _.FindDef(result_type->GetOperandAs(1)); if (!element_type) { return _.diag(SPV_ERROR_INVALID_ID, result_type) @@ -175,8 +174,8 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, return _.diag(SPV_ERROR_INVALID_ID, inst) << opcode_name << " Constituent count does not match " - "Result Type '" - << _.getIdName(result_type->id()) << "'s array length."; + "Result Type " + << _.getIdName(result_type->id()) << "s array length."; } for (size_t constituent_index = 2; constituent_index < inst->operands().size(); constituent_index++) { @@ -186,9 +185,9 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, if (!constituent || !spvOpcodeIsConstantOrUndef(constituent->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' is not a constant or undef."; + << " is not a constant or undef."; } const auto constituent_type = _.FindDef(constituent->type_id()); if (!constituent_type) { @@ -197,21 +196,21 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, } if (element_type->id() != constituent_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "'s type does not match Result Type '" - << _.getIdName(result_type->id()) << "'s array element type."; + << "s type does not match Result Type " + << _.getIdName(result_type->id()) << "s array element type."; } } } break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const auto member_count = result_type->words().size() - 2; if (member_count != constituent_count) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(inst->type_id()) - << "' count does not match Result Type '" - << _.getIdName(result_type->id()) << "'s struct member count."; + << " count does not match Result Type " + << _.getIdName(result_type->id()) << "s struct member count."; } for (uint32_t constituent_index = 2, member_index = 1; constituent_index < inst->operands().size(); @@ -222,9 +221,9 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, if (!constituent || !spvOpcodeIsConstantOrUndef(constituent->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' is not a constant or undef."; + << " is not a constant or undef."; } const auto constituent_type = _.FindDef(constituent->type_id()); if (!constituent_type) { @@ -237,26 +236,26 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, const auto member_type = _.FindDef(member_type_id); if (!member_type || member_type->id() != constituent_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' type does not match the Result Type '" - << _.getIdName(result_type->id()) << "'s member type."; + << " type does not match the Result Type " + << _.getIdName(result_type->id()) << "s member type."; } } } break; - case SpvOpTypeCooperativeMatrixNV: { + case spv::Op::OpTypeCooperativeMatrixKHR: + case spv::Op::OpTypeCooperativeMatrixNV: { if (1 != constituent_count) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" - << _.getIdName(inst->type_id()) << "' count must be one."; + << opcode_name << " Constituent " + << _.getIdName(inst->type_id()) << " count must be one."; } const auto constituent_id = inst->GetOperandAs(2); const auto constituent = _.FindDef(constituent_id); if (!constituent || !spvOpcodeIsConstantOrUndef(constituent->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" - << _.getIdName(constituent_id) - << "' is not a constant or undef."; + << opcode_name << " Constituent " + << _.getIdName(constituent_id) << " is not a constant or undef."; } const auto constituent_type = _.FindDef(constituent->type_id()); if (!constituent_type) { @@ -268,10 +267,10 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, const auto component_type = _.FindDef(component_type_id); if (!component_type || component_type->id() != constituent_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opcode_name << " Constituent '" + << opcode_name << " Constituent " << _.getIdName(constituent_id) - << "' type does not match the Result Type '" - << _.getIdName(result_type->id()) << "'s component type."; + << " type does not match the Result Type " + << _.getIdName(result_type->id()) << "s component type."; } } break; default: @@ -283,10 +282,10 @@ spv_result_t ValidateConstantComposite(ValidationState_t& _, spv_result_t ValidateConstantSampler(ValidationState_t& _, const Instruction* inst) { const auto result_type = _.FindDef(inst->type_id()); - if (!result_type || result_type->opcode() != SpvOpTypeSampler) { + if (!result_type || result_type->opcode() != spv::Op::OpTypeSampler) { return _.diag(SPV_ERROR_INVALID_ID, result_type) - << "OpConstantSampler Result Type '" - << _.getIdName(inst->type_id()) << "' is not a sampler type."; + << "OpConstantSampler Result Type " + << _.getIdName(inst->type_id()) << " is not a sampler type."; } return SPV_SUCCESS; @@ -300,23 +299,24 @@ bool IsTypeNullable(const std::vector& instruction, uint16_t opcode; uint16_t word_count; spvOpcodeSplit(instruction[0], &word_count, &opcode); - switch (static_cast(opcode)) { - case SpvOpTypeBool: - case SpvOpTypeInt: - case SpvOpTypeFloat: - case SpvOpTypeEvent: - case SpvOpTypeDeviceEvent: - case SpvOpTypeReserveId: - case SpvOpTypeQueue: + switch (static_cast(opcode)) { + case spv::Op::OpTypeBool: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeEvent: + case spv::Op::OpTypeDeviceEvent: + case spv::Op::OpTypeReserveId: + case spv::Op::OpTypeQueue: return true; - case SpvOpTypeArray: - case SpvOpTypeMatrix: - case SpvOpTypeCooperativeMatrixNV: - case SpvOpTypeVector: { + case spv::Op::OpTypeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: + case spv::Op::OpTypeVector: { auto base_type = _.FindDef(instruction[2]); return base_type && IsTypeNullable(base_type->words(), _); } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { for (size_t elementIndex = 2; elementIndex < instruction.size(); ++elementIndex) { auto element = _.FindDef(instruction[elementIndex]); @@ -324,8 +324,9 @@ bool IsTypeNullable(const std::vector& instruction, } return true; } - case SpvOpTypePointer: - if (instruction[2] == SpvStorageClassPhysicalStorageBuffer) { + case spv::Op::OpTypePointer: + if (spv::StorageClass(instruction[2]) == + spv::StorageClass::PhysicalStorageBuffer) { return false; } return true; @@ -339,8 +340,8 @@ spv_result_t ValidateConstantNull(ValidationState_t& _, const auto result_type = _.FindDef(inst->type_id()); if (!result_type || !IsTypeNullable(result_type->words(), _)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpConstantNull Result Type '" - << _.getIdName(inst->type_id()) << "' cannot have a null value."; + << "OpConstantNull Result Type " << _.getIdName(inst->type_id()) + << " cannot have a null value."; } return SPV_SUCCESS; @@ -353,7 +354,8 @@ spv_result_t ValidateSpecConstant(ValidationState_t& _, auto type_id = inst->GetOperandAs(0); auto type_instruction = _.FindDef(type_id); auto type_opcode = type_instruction->opcode(); - if (type_opcode != SpvOpTypeInt && type_opcode != SpvOpTypeFloat) { + if (type_opcode != spv::Op::OpTypeInt && + type_opcode != spv::Op::OpTypeFloat) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Specialization constant " "must be an integer or " "floating-point number."; @@ -363,22 +365,22 @@ spv_result_t ValidateSpecConstant(ValidationState_t& _, spv_result_t ValidateSpecConstantOp(ValidationState_t& _, const Instruction* inst) { - const auto op = inst->GetOperandAs(2); + const auto op = inst->GetOperandAs(2); // The binary parser already ensures that the op is valid for *some* // environment. Here we check restrictions. switch (op) { - case SpvOpQuantizeToF16: - if (!_.HasCapability(SpvCapabilityShader)) { + case spv::Op::OpQuantizeToF16: + if (!_.HasCapability(spv::Capability::Shader)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Specialization constant operation " << spvOpcodeString(op) << " requires Shader capability"; } break; - case SpvOpUConvert: + case spv::Op::OpUConvert: if (!_.features().uconvert_spec_constant_op && - !_.HasCapability(SpvCapabilityKernel)) { + !_.HasCapability(spv::Capability::Kernel)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Prior to SPIR-V 1.4, specialization constant operation " "UConvert requires Kernel capability or extension " @@ -386,27 +388,27 @@ spv_result_t ValidateSpecConstantOp(ValidationState_t& _, } break; - case SpvOpConvertFToS: - case SpvOpConvertSToF: - case SpvOpConvertFToU: - case SpvOpConvertUToF: - case SpvOpConvertPtrToU: - case SpvOpConvertUToPtr: - case SpvOpGenericCastToPtr: - case SpvOpPtrCastToGeneric: - case SpvOpBitcast: - case SpvOpFNegate: - case SpvOpFAdd: - case SpvOpFSub: - case SpvOpFMul: - case SpvOpFDiv: - case SpvOpFRem: - case SpvOpFMod: - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpPtrAccessChain: - case SpvOpInBoundsPtrAccessChain: - if (!_.HasCapability(SpvCapabilityKernel)) { + case spv::Op::OpConvertFToS: + case spv::Op::OpConvertSToF: + case spv::Op::OpConvertFToU: + case spv::Op::OpConvertUToF: + case spv::Op::OpConvertPtrToU: + case spv::Op::OpConvertUToPtr: + case spv::Op::OpGenericCastToPtr: + case spv::Op::OpPtrCastToGeneric: + case spv::Op::OpBitcast: + case spv::Op::OpFNegate: + case spv::Op::OpFAdd: + case spv::Op::OpFSub: + case spv::Op::OpFMul: + case spv::Op::OpFDiv: + case spv::Op::OpFRem: + case spv::Op::OpFMod: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpPtrAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: + if (!_.HasCapability(spv::Capability::Kernel)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Specialization constant operation " << spvOpcodeString(op) << " requires Kernel capability"; @@ -425,26 +427,26 @@ spv_result_t ValidateSpecConstantOp(ValidationState_t& _, spv_result_t ConstantPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpConstantTrue: - case SpvOpConstantFalse: - case SpvOpSpecConstantTrue: - case SpvOpSpecConstantFalse: + case spv::Op::OpConstantTrue: + case spv::Op::OpConstantFalse: + case spv::Op::OpSpecConstantTrue: + case spv::Op::OpSpecConstantFalse: if (auto error = ValidateConstantBool(_, inst)) return error; break; - case SpvOpConstantComposite: - case SpvOpSpecConstantComposite: + case spv::Op::OpConstantComposite: + case spv::Op::OpSpecConstantComposite: if (auto error = ValidateConstantComposite(_, inst)) return error; break; - case SpvOpConstantSampler: + case spv::Op::OpConstantSampler: if (auto error = ValidateConstantSampler(_, inst)) return error; break; - case SpvOpConstantNull: + case spv::Op::OpConstantNull: if (auto error = ValidateConstantNull(_, inst)) return error; break; - case SpvOpSpecConstant: + case spv::Op::OpSpecConstant: if (auto error = ValidateSpecConstant(_, inst)) return error; break; - case SpvOpSpecConstantOp: + case spv::Op::OpSpecConstantOp: if (auto error = ValidateSpecConstantOp(_, inst)) return error; break; default: @@ -454,7 +456,7 @@ spv_result_t ConstantPass(ValidationState_t& _, const Instruction* inst) { // Generally disallow creating 8- or 16-bit constants unless the full // capabilities are present. if (spvOpcodeIsConstant(inst->opcode()) && - _.HasCapability(SpvCapabilityShader) && + _.HasCapability(spv::Capability::Shader) && !_.IsPointerType(inst->type_id()) && _.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_conversion.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_conversion.cpp index b4e39cfe4..b2892a863 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_conversion.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_conversion.cpp @@ -14,7 +14,6 @@ // Validates correctness of conversion instructions. -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" @@ -27,11 +26,11 @@ namespace val { // Validates correctness of conversion instructions. spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpConvertFToU: { + case spv::Op::OpConvertFToU: { if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type) && !_.IsUnsignedIntCooperativeMatrixType(result_type)) @@ -62,7 +61,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpConvertFToS: { + case spv::Op::OpConvertFToS: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type) && !_.IsIntCooperativeMatrixType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -92,8 +91,8 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpConvertSToF: - case SpvOpConvertUToF: { + case spv::Op::OpConvertSToF: + case spv::Op::OpConvertUToF: { if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type) && !_.IsFloatCooperativeMatrixType(result_type)) @@ -124,7 +123,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpUConvert: { + case spv::Op::OpUConvert: { if (!_.IsUnsignedIntScalarType(result_type) && !_.IsUnsignedIntVectorType(result_type) && !_.IsUnsignedIntCooperativeMatrixType(result_type)) @@ -160,7 +159,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpSConvert: { + case spv::Op::OpSConvert: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type) && !_.IsIntCooperativeMatrixType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -195,7 +194,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpFConvert: { + case spv::Op::OpFConvert: { if (!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type) && !_.IsFloatCooperativeMatrixType(result_type)) @@ -231,7 +230,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpQuantizeToF16: { + case spv::Op::OpQuantizeToF16: { if ((!_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) || _.GetBitWidth(result_type) != 32) @@ -247,7 +246,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpConvertPtrToU: { + case spv::Op::OpConvertPtrToU: { if (!_.IsUnsignedIntScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected unsigned int scalar type as Result Type: " @@ -258,17 +257,18 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to be a pointer: " << spvOpcodeString(opcode); - if (_.addressing_model() == SpvAddressingModelLogical) + if (_.addressing_model() == spv::AddressingModel::Logical) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Logical addressing not supported: " << spvOpcodeString(opcode); - if (_.addressing_model() == SpvAddressingModelPhysicalStorageBuffer64) { - uint32_t input_storage_class = 0; + if (_.addressing_model() == + spv::AddressingModel::PhysicalStorageBuffer64) { + spv::StorageClass input_storage_class; uint32_t input_data_type = 0; _.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class); - if (input_storage_class != SpvStorageClassPhysicalStorageBuffer) + if (input_storage_class != spv::StorageClass::PhysicalStorageBuffer) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Pointer storage class must be PhysicalStorageBuffer: " << spvOpcodeString(opcode); @@ -286,8 +286,8 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpSatConvertSToU: - case SpvOpSatConvertUToS: { + case spv::Op::OpSatConvertSToU: + case spv::Op::OpSatConvertUToS: { if (!_.IsIntScalarType(result_type) && !_.IsIntVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar or vector type as Result Type: " @@ -307,7 +307,7 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpConvertUToPtr: { + case spv::Op::OpConvertUToPtr: { if (!_.IsPointerType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be a pointer: " @@ -318,17 +318,18 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected int scalar as input: " << spvOpcodeString(opcode); - if (_.addressing_model() == SpvAddressingModelLogical) + if (_.addressing_model() == spv::AddressingModel::Logical) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Logical addressing not supported: " << spvOpcodeString(opcode); - if (_.addressing_model() == SpvAddressingModelPhysicalStorageBuffer64) { - uint32_t result_storage_class = 0; + if (_.addressing_model() == + spv::AddressingModel::PhysicalStorageBuffer64) { + spv::StorageClass result_storage_class; uint32_t result_data_type = 0; _.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class); - if (result_storage_class != SpvStorageClassPhysicalStorageBuffer) + if (result_storage_class != spv::StorageClass::PhysicalStorageBuffer) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Pointer storage class must be PhysicalStorageBuffer: " << spvOpcodeString(opcode); @@ -346,8 +347,8 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpPtrCastToGeneric: { - uint32_t result_storage_class = 0; + case spv::Op::OpPtrCastToGeneric: { + spv::StorageClass result_storage_class; uint32_t result_data_type = 0; if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) @@ -355,22 +356,22 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { << "Expected Result Type to be a pointer: " << spvOpcodeString(opcode); - if (result_storage_class != SpvStorageClassGeneric) + if (result_storage_class != spv::StorageClass::Generic) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to have storage class Generic: " << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - uint32_t input_storage_class = 0; + spv::StorageClass input_storage_class; uint32_t input_data_type = 0; if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to be a pointer: " << spvOpcodeString(opcode); - if (input_storage_class != SpvStorageClassWorkgroup && - input_storage_class != SpvStorageClassCrossWorkgroup && - input_storage_class != SpvStorageClassFunction) + if (input_storage_class != spv::StorageClass::Workgroup && + input_storage_class != spv::StorageClass::CrossWorkgroup && + input_storage_class != spv::StorageClass::Function) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to have storage class Workgroup, " << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); @@ -382,8 +383,8 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpGenericCastToPtr: { - uint32_t result_storage_class = 0; + case spv::Op::OpGenericCastToPtr: { + spv::StorageClass result_storage_class; uint32_t result_data_type = 0; if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) @@ -391,22 +392,22 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { << "Expected Result Type to be a pointer: " << spvOpcodeString(opcode); - if (result_storage_class != SpvStorageClassWorkgroup && - result_storage_class != SpvStorageClassCrossWorkgroup && - result_storage_class != SpvStorageClassFunction) + if (result_storage_class != spv::StorageClass::Workgroup && + result_storage_class != spv::StorageClass::CrossWorkgroup && + result_storage_class != spv::StorageClass::Function) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to have storage class Workgroup, " << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - uint32_t input_storage_class = 0; + spv::StorageClass input_storage_class; uint32_t input_data_type = 0; if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to be a pointer: " << spvOpcodeString(opcode); - if (input_storage_class != SpvStorageClassGeneric) + if (input_storage_class != spv::StorageClass::Generic) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to have storage class Generic: " << spvOpcodeString(opcode); @@ -418,8 +419,8 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpGenericCastToPtrExplicit: { - uint32_t result_storage_class = 0; + case spv::Op::OpGenericCastToPtrExplicit: { + spv::StorageClass result_storage_class; uint32_t result_data_type = 0; if (!_.GetPointerTypeInfo(result_type, &result_data_type, &result_storage_class)) @@ -427,21 +428,22 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { << "Expected Result Type to be a pointer: " << spvOpcodeString(opcode); - const uint32_t target_storage_class = inst->word(4); + const auto target_storage_class = + inst->GetOperandAs(3); if (result_storage_class != target_storage_class) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be of target storage class: " << spvOpcodeString(opcode); const uint32_t input_type = _.GetOperandTypeId(inst, 2); - uint32_t input_storage_class = 0; + spv::StorageClass input_storage_class; uint32_t input_data_type = 0; if (!_.GetPointerTypeInfo(input_type, &input_data_type, &input_storage_class)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to be a pointer: " << spvOpcodeString(opcode); - if (input_storage_class != SpvStorageClassGeneric) + if (input_storage_class != spv::StorageClass::Generic) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to have storage class Generic: " << spvOpcodeString(opcode); @@ -451,16 +453,16 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { << "Expected input and Result Type to point to the same type: " << spvOpcodeString(opcode); - if (target_storage_class != SpvStorageClassWorkgroup && - target_storage_class != SpvStorageClassCrossWorkgroup && - target_storage_class != SpvStorageClassFunction) + if (target_storage_class != spv::StorageClass::Workgroup && + target_storage_class != spv::StorageClass::CrossWorkgroup && + target_storage_class != spv::StorageClass::Function) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected target storage class to be Workgroup, " << "CrossWorkgroup or Function: " << spvOpcodeString(opcode); break; } - case SpvOpBitcast: { + case spv::Op::OpBitcast: { const uint32_t input_type = _.GetOperandTypeId(inst, 2); if (!input_type) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -471,7 +473,10 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { const bool input_is_pointer = _.IsPointerType(input_type); const bool input_is_int_scalar = _.IsIntScalarType(input_type); - if (!result_is_pointer && !result_is_int_scalar && + const bool result_is_coopmat = _.IsCooperativeMatrixType(result_type); + const bool input_is_coopmat = _.IsCooperativeMatrixType(input_type); + + if (!result_is_pointer && !result_is_int_scalar && !result_is_coopmat && !_.IsIntVectorType(result_type) && !_.IsFloatScalarType(result_type) && !_.IsFloatVectorType(result_type)) @@ -479,21 +484,32 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { << "Expected Result Type to be a pointer or int or float vector " << "or scalar type: " << spvOpcodeString(opcode); - if (!input_is_pointer && !input_is_int_scalar && + if (!input_is_pointer && !input_is_int_scalar && !input_is_coopmat && !_.IsIntVectorType(input_type) && !_.IsFloatScalarType(input_type) && !_.IsFloatVectorType(input_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected input to be a pointer or int or float vector " << "or scalar: " << spvOpcodeString(opcode); + if (result_is_coopmat != input_is_coopmat) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cooperative matrix can only be cast to another cooperative " + << "matrix: " << spvOpcodeString(opcode); + + if (result_is_coopmat) { + spv_result_t ret = + _.CooperativeMatrixShapesMatch(inst, result_type, input_type); + if (ret != SPV_SUCCESS) return ret; + } + if (_.version() >= SPV_SPIRV_VERSION_WORD(1, 5) || _.HasExtension(kSPV_KHR_physical_storage_buffer)) { const bool result_is_int_vector = _.IsIntVectorType(result_type); const bool result_has_int32 = - _.ContainsSizedIntOrFloatType(result_type, SpvOpTypeInt, 32); + _.ContainsSizedIntOrFloatType(result_type, spv::Op::OpTypeInt, 32); const bool input_is_int_vector = _.IsIntVectorType(input_type); const bool input_has_int32 = - _.ContainsSizedIntOrFloatType(input_type, SpvOpTypeInt, 32); + _.ContainsSizedIntOrFloatType(input_type, spv::Op::OpTypeInt, 32); if (result_is_pointer && !input_is_pointer && !input_is_int_scalar && !(input_is_int_vector && input_has_int32)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -534,17 +550,35 @@ spv_result_t ConversionPass(ValidationState_t& _, const Instruction* inst) { break; } + case spv::Op::OpConvertUToAccelerationStructureKHR: { + if (!_.IsAccelerationStructureType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Result Type to be a Acceleration Structure: " + << spvOpcodeString(opcode); + } + + const uint32_t input_type = _.GetOperandTypeId(inst, 2); + if (!input_type || !_.IsUnsigned64BitHandle(input_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected 64-bit uint scalar or 2-component 32-bit uint " + "vector as input: " + << spvOpcodeString(opcode); + } + + break; + } + default: break; } - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { switch (inst->opcode()) { - case SpvOpConvertFToU: - case SpvOpConvertFToS: - case SpvOpConvertSToF: - case SpvOpConvertUToF: - case SpvOpBitcast: + case spv::Op::OpConvertFToU: + case spv::Op::OpConvertFToS: + case spv::Op::OpConvertSToF: + case spv::Op::OpConvertUToF: + case spv::Op::OpBitcast: if (_.ContainsLimitedUseIntOrFloatType(inst->type_id()) || _.ContainsLimitedUseIntOrFloatType(_.GetOperandTypeId(inst, 2u))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_debug.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_debug.cpp index 0a25d8ab7..ef537ea02 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_debug.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_debug.cpp @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "source/val/validate.h" - -#include "source/opcode.h" #include "source/spirv_target_env.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -26,18 +24,18 @@ namespace { spv_result_t ValidateMemberName(ValidationState_t& _, const Instruction* inst) { const auto type_id = inst->GetOperandAs(0); const auto type = _.FindDef(type_id); - if (!type || SpvOpTypeStruct != type->opcode()) { + if (!type || spv::Op::OpTypeStruct != type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpMemberName Type '" << _.getIdName(type_id) - << "' is not a struct type."; + << "OpMemberName Type " << _.getIdName(type_id) + << " is not a struct type."; } const auto member_id = inst->GetOperandAs(1); const auto member_count = (uint32_t)(type->words().size() - 2); if (member_count <= member_id) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpMemberName Member '" << _.getIdName(member_id) - << "' index is larger than Type '" << _.getIdName(type->id()) - << "'s member count."; + << "OpMemberName Member " << _.getIdName(member_id) + << " index is larger than Type " << _.getIdName(type->id()) + << "s member count."; } return SPV_SUCCESS; } @@ -45,10 +43,10 @@ spv_result_t ValidateMemberName(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateLine(ValidationState_t& _, const Instruction* inst) { const auto file_id = inst->GetOperandAs(0); const auto file = _.FindDef(file_id); - if (!file || SpvOpString != file->opcode()) { + if (!file || spv::Op::OpString != file->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpLine Target '" << _.getIdName(file_id) - << "' is not an OpString."; + << "OpLine Target " << _.getIdName(file_id) + << " is not an OpString."; } return SPV_SUCCESS; } @@ -57,10 +55,10 @@ spv_result_t ValidateLine(ValidationState_t& _, const Instruction* inst) { spv_result_t DebugPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpMemberName: + case spv::Op::OpMemberName: if (auto error = ValidateMemberName(_, inst)) return error; break; - case SpvOpLine: + case spv::Op::OpLine: if (auto error = ValidateLine(_, inst)) return error; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_decorations.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_decorations.cpp index eb6109021..0a7df6581 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_decorations.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_decorations.cpp @@ -21,7 +21,6 @@ #include #include -#include "source/binary.h" #include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" @@ -48,13 +47,6 @@ struct PairHash { } }; -// A functor for hashing decoration types. -struct SpvDecorationHash { - std::size_t operator()(SpvDecoration dec) const { - return static_cast(dec); - } -}; - // Struct member layout attributes that are inherited through arrays. struct LayoutConstraints { explicit LayoutConstraints( @@ -72,7 +64,7 @@ using MemberConstraints = std::unordered_map, // Returns the array stride of the given array type. uint32_t GetArrayStride(uint32_t array_id, ValidationState_t& vstate) { for (auto& decoration : vstate.id_decorations(array_id)) { - if (SpvDecorationArrayStride == decoration.dec_type()) { + if (spv::Decoration::ArrayStride == decoration.dec_type()) { return decoration.params()[0]; } } @@ -82,9 +74,10 @@ uint32_t GetArrayStride(uint32_t array_id, ValidationState_t& vstate) { // Returns true if the given variable has a BuiltIn decoration. bool isBuiltInVar(uint32_t var_id, ValidationState_t& vstate) { const auto& decorations = vstate.id_decorations(var_id); - return std::any_of( - decorations.begin(), decorations.end(), - [](const Decoration& d) { return SpvDecorationBuiltIn == d.dec_type(); }); + return std::any_of(decorations.begin(), decorations.end(), + [](const Decoration& d) { + return spv::Decoration::BuiltIn == d.dec_type(); + }); } // Returns true if the given structure type has any members with BuiltIn @@ -93,7 +86,7 @@ bool isBuiltInStruct(uint32_t struct_id, ValidationState_t& vstate) { const auto& decorations = vstate.id_decorations(struct_id); return std::any_of( decorations.begin(), decorations.end(), [](const Decoration& d) { - return SpvDecorationBuiltIn == d.dec_type() && + return spv::Decoration::BuiltIn == d.dec_type() && Decoration::kInvalidMember != d.struct_member_index(); }); } @@ -101,20 +94,21 @@ bool isBuiltInStruct(uint32_t struct_id, ValidationState_t& vstate) { // Returns true if the given structure type has a Block decoration. bool isBlock(uint32_t struct_id, ValidationState_t& vstate) { const auto& decorations = vstate.id_decorations(struct_id); - return std::any_of( - decorations.begin(), decorations.end(), - [](const Decoration& d) { return SpvDecorationBlock == d.dec_type(); }); + return std::any_of(decorations.begin(), decorations.end(), + [](const Decoration& d) { + return spv::Decoration::Block == d.dec_type(); + }); } // Returns true if the given ID has the Import LinkageAttributes decoration. bool hasImportLinkageAttribute(uint32_t id, ValidationState_t& vstate) { const auto& decorations = vstate.id_decorations(id); - return std::any_of(decorations.begin(), decorations.end(), - [](const Decoration& d) { - return SpvDecorationLinkageAttributes == d.dec_type() && - d.params().size() >= 2u && - d.params().back() == SpvLinkageTypeImport; - }); + return std::any_of( + decorations.begin(), decorations.end(), [](const Decoration& d) { + return spv::Decoration::LinkageAttributes == d.dec_type() && + d.params().size() >= 2u && + spv::LinkageType(d.params().back()) == spv::LinkageType::Import; + }); } // Returns a vector of all members of a structure. @@ -125,7 +119,7 @@ std::vector getStructMembers(uint32_t struct_id, } // Returns a vector of all members of a structure that have specific type. -std::vector getStructMembers(uint32_t struct_id, SpvOp type, +std::vector getStructMembers(uint32_t struct_id, spv::Op type, ValidationState_t& vstate) { std::vector members; for (auto id : getStructMembers(struct_id, vstate)) { @@ -142,21 +136,21 @@ bool isMissingOffsetInStruct(uint32_t struct_id, ValidationState_t& vstate) { const auto* inst = vstate.FindDef(struct_id); std::vector hasOffset; std::vector struct_members; - if (inst->opcode() == SpvOpTypeStruct) { + if (inst->opcode() == spv::Op::OpTypeStruct) { // Check offsets of member decorations. struct_members = getStructMembers(struct_id, vstate); hasOffset.resize(struct_members.size(), false); for (auto& decoration : vstate.id_decorations(struct_id)) { - if (SpvDecorationOffset == decoration.dec_type() && + if (spv::Decoration::Offset == decoration.dec_type() && Decoration::kInvalidMember != decoration.struct_member_index()) { // Offset 0xffffffff is not valid so ignore it for simplicity's sake. if (decoration.params()[0] == 0xffffffff) return true; hasOffset[decoration.struct_member_index()] = true; } } - } else if (inst->opcode() == SpvOpTypeArray || - inst->opcode() == SpvOpTypeRuntimeArray) { + } else if (inst->opcode() == spv::Op::OpTypeArray || + inst->opcode() == spv::Op::OpTypeRuntimeArray) { hasOffset.resize(1, true); struct_members.push_back(inst->GetOperandAs(1u)); } @@ -179,8 +173,9 @@ uint32_t align(uint32_t x, uint32_t alignment) { } // Returns base alignment of struct member. If |roundUp| is true, also -// ensure that structs and arrays are aligned at least to a multiple of 16 -// bytes. +// ensure that structs, arrays, and matrices are aligned at least to a +// multiple of 16 bytes. (That is, when roundUp is true, this function +// returns the *extended* alignment as it's called by the Vulkan spec.) uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, const LayoutConstraints& inherited, MemberConstraints& constraints, @@ -190,11 +185,18 @@ uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, // Minimal alignment is byte-aligned. uint32_t baseAlignment = 1; switch (inst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeImage: + if (vstate.HasCapability(spv::Capability::BindlessTextureNV)) + return baseAlignment = vstate.samplerimage_variable_address_mode() / 8; + assert(0); + return 0; + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: baseAlignment = words[2] / 8; break; - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { const auto componentId = words[2]; const auto numComponents = words[3]; const auto componentAlignment = getBaseAlignment( @@ -203,7 +205,7 @@ uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, componentAlignment * (numComponents == 3 ? 4 : numComponents); break; } - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { const auto column_type = words[2]; if (inherited.majorness == kColumnMajor) { baseAlignment = getBaseAlignment(column_type, roundUp, inherited, @@ -219,14 +221,15 @@ uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, baseAlignment = componentAlignment * (num_columns == 3 ? 4 : num_columns); } + if (roundUp) baseAlignment = align(baseAlignment, 16u); } break; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: baseAlignment = getBaseAlignment(words[2], roundUp, inherited, constraints, vstate); if (roundUp) baseAlignment = align(baseAlignment, 16u); break; - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const auto members = getStructMembers(member_id, vstate); for (uint32_t memberIdx = 0, numMembers = uint32_t(members.size()); memberIdx < numMembers; ++memberIdx) { @@ -240,7 +243,7 @@ uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, if (roundUp) baseAlignment = align(baseAlignment, 16u); break; } - case SpvOpTypePointer: + case spv::Op::OpTypePointer: baseAlignment = vstate.pointer_size_and_alignment(); break; default: @@ -256,17 +259,24 @@ uint32_t getScalarAlignment(uint32_t type_id, ValidationState_t& vstate) { const auto inst = vstate.FindDef(type_id); const auto& words = inst->words(); switch (inst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeImage: + if (vstate.HasCapability(spv::Capability::BindlessTextureNV)) + return vstate.samplerimage_variable_address_mode() / 8; + assert(0); + return 0; + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: return words[2] / 8; - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: { + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: { const auto compositeMemberTypeId = words[2]; return getScalarAlignment(compositeMemberTypeId, vstate); } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const auto members = getStructMembers(type_id, vstate); uint32_t max_member_alignment = 1; for (uint32_t memberIdx = 0, numMembers = uint32_t(members.size()); @@ -279,7 +289,7 @@ uint32_t getScalarAlignment(uint32_t type_id, ValidationState_t& vstate) { } return max_member_alignment; } break; - case SpvOpTypePointer: + case spv::Op::OpTypePointer: return vstate.pointer_size_and_alignment(); default: assert(0); @@ -296,10 +306,17 @@ uint32_t getSize(uint32_t member_id, const LayoutConstraints& inherited, const auto inst = vstate.FindDef(member_id); const auto& words = inst->words(); switch (inst->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeSampler: + case spv::Op::OpTypeImage: + if (vstate.HasCapability(spv::Capability::BindlessTextureNV)) + return vstate.samplerimage_variable_address_mode() / 8; + assert(0); + return 0; + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: return words[2] / 8; - case SpvOpTypeVector: { + case spv::Op::OpTypeVector: { const auto componentId = words[2]; const auto numComponents = words[3]; const auto componentSize = @@ -307,10 +324,10 @@ uint32_t getSize(uint32_t member_id, const LayoutConstraints& inherited, const auto size = componentSize * numComponents; return size; } - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { const auto sizeInst = vstate.FindDef(words[3]); if (spvOpcodeIsSpecConstant(sizeInst->opcode())) return 0; - assert(SpvOpConstant == sizeInst->opcode()); + assert(spv::Op::OpConstant == sizeInst->opcode()); const uint32_t num_elem = sizeInst->words()[3]; const uint32_t elem_type = words[2]; const uint32_t elem_size = @@ -321,9 +338,9 @@ uint32_t getSize(uint32_t member_id, const LayoutConstraints& inherited, (num_elem - 1) * GetArrayStride(member_id, vstate) + elem_size; return size; } - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: return 0; - case SpvOpTypeMatrix: { + case spv::Op::OpTypeMatrix: { const auto num_columns = words[3]; if (inherited.majorness == kColumnMajor) { return num_columns * inherited.matrix_stride; @@ -339,17 +356,20 @@ uint32_t getSize(uint32_t member_id, const LayoutConstraints& inherited, num_columns * scalar_elem_size; } } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { const auto& members = getStructMembers(member_id, vstate); if (members.empty()) return 0; const auto lastIdx = uint32_t(members.size() - 1); const auto& lastMember = members.back(); uint32_t offset = 0xffffffff; // Find the offset of the last element and add the size. - for (auto& decoration : vstate.id_decorations(member_id)) { - if (SpvDecorationOffset == decoration.dec_type() && - decoration.struct_member_index() == (int)lastIdx) { - offset = decoration.params()[0]; + auto member_decorations = + vstate.id_member_decorations(member_id, lastIdx); + for (auto decoration = member_decorations.begin; + decoration != member_decorations.end; ++decoration) { + assert(decoration->struct_member_index() == (int)lastIdx); + if (spv::Decoration::Offset == decoration->dec_type()) { + offset = decoration->params()[0]; } } // This check depends on the fact that all members have offsets. This @@ -358,7 +378,7 @@ uint32_t getSize(uint32_t member_id, const LayoutConstraints& inherited, const auto& constraint = constraints[std::make_pair(lastMember, lastIdx)]; return offset + getSize(lastMember, constraint, constraints, vstate); } - case SpvOpTypePointer: + case spv::Op::OpTypePointer: return vstate.pointer_size_and_alignment(); default: assert(0); @@ -432,7 +452,16 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, return ds; }; - const auto& members = getStructMembers(struct_id, vstate); + // If we are checking physical storage buffer pointers, we may not actually + // have a struct here. Instead, pretend we have a struct with a single member + // at offset 0. + const auto& struct_type = vstate.FindDef(struct_id); + std::vector members; + if (struct_type->opcode() == spv::Op::OpTypeStruct) { + members = getStructMembers(struct_id, vstate); + } else { + members.push_back(struct_id); + } // To check for member overlaps, we want to traverse the members in // offset order. @@ -441,31 +470,40 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, uint32_t offset; }; std::vector member_offsets; - member_offsets.reserve(members.size()); - for (uint32_t memberIdx = 0, numMembers = uint32_t(members.size()); - memberIdx < numMembers; memberIdx++) { - uint32_t offset = 0xffffffff; - for (auto& decoration : vstate.id_decorations(struct_id)) { - if (decoration.struct_member_index() == (int)memberIdx) { - switch (decoration.dec_type()) { - case SpvDecorationOffset: - offset = decoration.params()[0]; + + // With physical storage buffers, we might be checking layouts that do not + // originate from a structure. + if (struct_type->opcode() == spv::Op::OpTypeStruct) { + member_offsets.reserve(members.size()); + for (uint32_t memberIdx = 0, numMembers = uint32_t(members.size()); + memberIdx < numMembers; memberIdx++) { + uint32_t offset = 0xffffffff; + auto member_decorations = + vstate.id_member_decorations(struct_id, memberIdx); + for (auto decoration = member_decorations.begin; + decoration != member_decorations.end; ++decoration) { + assert(decoration->struct_member_index() == (int)memberIdx); + switch (decoration->dec_type()) { + case spv::Decoration::Offset: + offset = decoration->params()[0]; break; default: break; } } + member_offsets.push_back( + MemberOffsetPair{memberIdx, incoming_offset + offset}); } - member_offsets.push_back( - MemberOffsetPair{memberIdx, incoming_offset + offset}); + std::stable_sort( + member_offsets.begin(), member_offsets.end(), + [](const MemberOffsetPair& lhs, const MemberOffsetPair& rhs) { + return lhs.offset < rhs.offset; + }); + } else { + member_offsets.push_back({0, 0}); } - std::stable_sort( - member_offsets.begin(), member_offsets.end(), - [](const MemberOffsetPair& lhs, const MemberOffsetPair& rhs) { - return lhs.offset < rhs.offset; - }); - // Now scan from lowest offest to highest offset. + // Now scan from lowest offset to highest offset. uint32_t nextValidOffset = 0; for (size_t ordered_member_idx = 0; ordered_member_idx < member_offsets.size(); ordered_member_idx++) { @@ -489,7 +527,7 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, if (offset == 0xffffffff) return fail(memberIdx) << "is missing an Offset decoration"; if (!scalar_block_layout && relaxed_block_layout && - opcode == SpvOpTypeVector) { + opcode == spv::Op::OpTypeVector) { // In relaxed block layout, the vector offset must be aligned to the // vector's scalar element type. const auto componentId = inst->words()[2]; @@ -513,21 +551,20 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, << nextValidOffset - 1; if (!scalar_block_layout && relaxed_block_layout) { // Check improper straddle of vectors. - if (SpvOpTypeVector == opcode && + if (spv::Op::OpTypeVector == opcode && hasImproperStraddle(id, offset, constraint, constraints, vstate)) return fail(memberIdx) << "is an improperly straddling vector at offset " << offset; } // Check struct members recursively. spv_result_t recursive_status = SPV_SUCCESS; - if (SpvOpTypeStruct == opcode && + if (spv::Op::OpTypeStruct == opcode && SPV_SUCCESS != (recursive_status = checkLayout( id, storage_class_str, decoration_str, blockRules, - scalar_block_layout, - offset, constraints, vstate))) + scalar_block_layout, offset, constraints, vstate))) return recursive_status; // Check matrix stride. - if (SpvOpTypeMatrix == opcode) { + if (spv::Op::OpTypeMatrix == opcode) { const auto stride = constraint.matrix_stride; if (!IsAlignedTo(stride, alignment)) { return fail(memberIdx) << "is a matrix with stride " << stride @@ -538,14 +575,14 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, // Check arrays and runtime arrays recursively. auto array_inst = inst; auto array_alignment = alignment; - while (array_inst->opcode() == SpvOpTypeArray || - array_inst->opcode() == SpvOpTypeRuntimeArray) { + while (array_inst->opcode() == spv::Op::OpTypeArray || + array_inst->opcode() == spv::Op::OpTypeRuntimeArray) { const auto typeId = array_inst->word(2); const auto element_inst = vstate.FindDef(typeId); // Check array stride. uint32_t array_stride = 0; for (auto& decoration : vstate.id_decorations(array_inst->id())) { - if (SpvDecorationArrayStride == decoration.dec_type()) { + if (spv::Decoration::ArrayStride == decoration.dec_type()) { array_stride = decoration.params()[0]; if (array_stride == 0) { return fail(memberIdx) << "contains an array with stride 0"; @@ -560,7 +597,7 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, bool is_int32 = false; bool is_const = false; uint32_t num_elements = 0; - if (array_inst->opcode() == SpvOpTypeArray) { + if (array_inst->opcode() == spv::Op::OpTypeArray) { std::tie(is_int32, is_const, num_elements) = vstate.EvalInt32IfConst(array_inst->word(3)); } @@ -569,7 +606,7 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, // limitation to this check if the array size is a spec constant or is a // runtime array then we will only check a single element. This means // some improper straddles might be missed. - if (SpvOpTypeStruct == element_inst->opcode()) { + if (spv::Op::OpTypeStruct == element_inst->opcode()) { std::vector seen(16, false); for (uint32_t i = 0; i < num_elements; ++i) { uint32_t next_offset = i * array_stride + offset; @@ -604,10 +641,10 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, } } nextValidOffset = offset + size; - if (!scalar_block_layout && blockRules && - (SpvOpTypeArray == opcode || SpvOpTypeStruct == opcode)) { - // Uniform block rules don't permit anything in the padding of a struct - // or array. + if (!scalar_block_layout && + (spv::Op::OpTypeArray == opcode || spv::Op::OpTypeStruct == opcode)) { + // Non-scalar block layout rules don't permit anything in the padding of + // a struct or array. nextValidOffset = align(nextValidOffset, alignment); } } @@ -616,15 +653,15 @@ spv_result_t checkLayout(uint32_t struct_id, const char* storage_class_str, // Returns true if variable or structure id has given decoration. Handles also // nested structures. -bool hasDecoration(uint32_t id, SpvDecoration decoration, +bool hasDecoration(uint32_t id, spv::Decoration decoration, ValidationState_t& vstate) { for (auto& dec : vstate.id_decorations(id)) { if (decoration == dec.dec_type()) return true; } - if (SpvOpTypeStruct != vstate.FindDef(id)->opcode()) { + if (spv::Op::OpTypeStruct != vstate.FindDef(id)->opcode()) { return false; } - for (auto member_id : getStructMembers(id, SpvOpTypeStruct, vstate)) { + for (auto member_id : getStructMembers(id, spv::Op::OpTypeStruct, vstate)) { if (hasDecoration(member_id, decoration, vstate)) { return true; } @@ -633,18 +670,19 @@ bool hasDecoration(uint32_t id, SpvDecoration decoration, } // Returns true if all ids of given type have a specified decoration. -bool checkForRequiredDecoration(uint32_t struct_id, SpvDecoration decoration, - SpvOp type, ValidationState_t& vstate) { +bool checkForRequiredDecoration(uint32_t struct_id, + std::function checker, + spv::Op type, ValidationState_t& vstate) { const auto& members = getStructMembers(struct_id, vstate); for (size_t memberIdx = 0; memberIdx < members.size(); memberIdx++) { const auto id = members[memberIdx]; if (type != vstate.FindDef(id)->opcode()) continue; bool found = false; for (auto& dec : vstate.id_decorations(id)) { - if (decoration == dec.dec_type()) found = true; + if (checker(dec.dec_type())) found = true; } for (auto& dec : vstate.id_decorations(struct_id)) { - if (decoration == dec.dec_type() && + if (checker(dec.dec_type()) && (int)memberIdx == dec.struct_member_index()) { found = true; } @@ -653,8 +691,8 @@ bool checkForRequiredDecoration(uint32_t struct_id, SpvDecoration decoration, return false; } } - for (auto id : getStructMembers(struct_id, SpvOpTypeStruct, vstate)) { - if (!checkForRequiredDecoration(id, decoration, type, vstate)) { + for (auto id : getStructMembers(struct_id, spv::Op::OpTypeStruct, vstate)) { + if (!checkForRequiredDecoration(id, checker, type, vstate)) { return false; } } @@ -709,8 +747,8 @@ spv_result_t CheckBuiltInVariable(uint32_t var_id, ValidationState_t& vstate) { const auto& decorations = vstate.id_decorations(var_id); for (const auto& d : decorations) { if (spvIsVulkanEnv(vstate.context()->target_env)) { - if (d.dec_type() == SpvDecorationLocation || - d.dec_type() == SpvDecorationComponent) { + if (d.dec_type() == spv::Decoration::Location || + d.dec_type() == spv::Decoration::Component) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) << vstate.VkErrorID(4915) << "A BuiltIn variable (id " << var_id << ") cannot have any Location or Component decorations"; @@ -720,7 +758,7 @@ spv_result_t CheckBuiltInVariable(uint32_t var_id, ValidationState_t& vstate) { return SPV_SUCCESS; } -// Checks whether proper decorations have been appied to the entry points. +// Checks whether proper decorations have been applied to the entry points. spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { for (uint32_t entry_point : vstate.entry_points()) { const auto& descs = vstate.entry_point_descriptions(entry_point); @@ -733,18 +771,18 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { std::unordered_set seen_vars; for (auto interface : desc.interfaces) { Instruction* var_instr = vstate.FindDef(interface); - if (!var_instr || SpvOpVariable != var_instr->opcode()) { + if (!var_instr || spv::Op::OpVariable != var_instr->opcode()) { return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) << "Interfaces passed to OpEntryPoint must be of type " "OpTypeVariable. Found Op" << spvOpcodeString(var_instr->opcode()) << "."; } - const SpvStorageClass storage_class = - var_instr->GetOperandAs(2); + const spv::StorageClass storage_class = + var_instr->GetOperandAs(2); if (vstate.version() >= SPV_SPIRV_VERSION_WORD(1, 4)) { // Starting in 1.4, OpEntryPoint must list all global variables // it statically uses and those interfaces must be unique. - if (storage_class == SpvStorageClassFunction) { + if (storage_class == spv::StorageClass::Function) { return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) << "OpEntryPoint interfaces should only list global " "variables"; @@ -756,14 +794,14 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { << vstate.getIdName(interface) << " is disallowed"; } } else { - if (storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) << "OpEntryPoint interfaces must be OpVariables with " "Storage Class of Input(1) or Output(3). Found Storage " "Class " - << storage_class << " for Entry Point id " << entry_point - << "."; + << uint32_t(storage_class) << " for Entry Point id " + << entry_point << "."; } } @@ -774,7 +812,7 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { // to. const uint32_t type_id = ptr_instr->word(3); Instruction* type_instr = vstate.FindDef(type_id); - if (type_instr && SpvOpTypeStruct == type_instr->opcode() && + if (type_instr && spv::Op::OpTypeStruct == type_instr->opcode() && isBuiltInStruct(type_id, vstate)) { if (!isBlock(type_id, vstate)) { return vstate.diag(SPV_ERROR_INVALID_DATA, vstate.FindDef(type_id)) @@ -785,8 +823,9 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { "OpVariable with a structure type that is a block not " "decorated with Location."; } - if (storage_class == SpvStorageClassInput) ++num_builtin_block_inputs; - if (storage_class == SpvStorageClassOutput) + if (storage_class == spv::StorageClass::Input) + ++num_builtin_block_inputs; + if (storage_class == spv::StorageClass::Output) ++num_builtin_block_outputs; if (num_builtin_block_inputs > 1 || num_builtin_block_outputs > 1) break; @@ -797,15 +836,68 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { return error; } - if (storage_class == SpvStorageClassWorkgroup) { + if (storage_class == spv::StorageClass::Workgroup) { ++num_workgroup_variables; - if (type_instr && SpvOpTypeStruct == type_instr->opcode()) { - if (hasDecoration(type_id, SpvDecorationBlock, vstate)) + if (type_instr && spv::Op::OpTypeStruct == type_instr->opcode()) { + if (hasDecoration(type_id, spv::Decoration::Block, vstate)) ++num_workgroup_variables_with_block; - if (hasDecoration(var_instr->id(), SpvDecorationAliased, vstate)) + if (hasDecoration(var_instr->id(), spv::Decoration::Aliased, + vstate)) ++num_workgroup_variables_with_aliased; } } + + if (spvIsVulkanEnv(vstate.context()->target_env)) { + const auto* models = vstate.GetExecutionModels(entry_point); + const bool has_frag = + models->find(spv::ExecutionModel::Fragment) != models->end(); + const bool has_vert = + models->find(spv::ExecutionModel::Vertex) != models->end(); + for (const auto& decoration : + vstate.id_decorations(var_instr->id())) { + if (decoration == spv::Decoration::Flat || + decoration == spv::Decoration::NoPerspective || + decoration == spv::Decoration::Sample || + decoration == spv::Decoration::Centroid) { + // VUID 04670 already validates these decorations are input/output + if (storage_class == spv::StorageClass::Input && + (models->size() > 1 || has_vert)) { + return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) + << vstate.VkErrorID(6202) + << vstate.SpvDecorationString(decoration.dec_type()) + << " decorated variable must not be used in vertex " + "execution model as an Input storage class for Entry " + "Point id " + << entry_point << "."; + } else if (storage_class == spv::StorageClass::Output && + (models->size() > 1 || has_frag)) { + return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) + << vstate.VkErrorID(6201) + << vstate.SpvDecorationString(decoration.dec_type()) + << " decorated variable must not be used in fragment " + "execution model as an Output storage class for " + "Entry Point id " + << entry_point << "."; + } + } + } + + const bool has_flat = + hasDecoration(var_instr->id(), spv::Decoration::Flat, vstate); + if (has_frag && storage_class == spv::StorageClass::Input && + !has_flat && + ((vstate.IsFloatScalarType(type_id) && + vstate.GetBitWidth(type_id) == 64) || + vstate.IsIntScalarOrVectorType(type_id))) { + return vstate.diag(SPV_ERROR_INVALID_ID, var_instr) + << vstate.VkErrorID(4744) + << "Fragment OpEntryPoint operand " + << interface << " with Input interfaces with integer or " + "float type must have a Flat decoration " + "for Entry Point id " + << entry_point << "."; + } + } } if (num_builtin_block_inputs > 1 || num_builtin_block_outputs > 1) { return vstate.diag(SPV_ERROR_INVALID_BINARY, @@ -818,7 +910,7 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { // The LinkageAttributes Decoration cannot be applied to functions // targeted by an OpEntryPoint instruction for (auto& decoration : vstate.id_decorations(entry_point)) { - if (SpvDecorationLinkageAttributes == decoration.dec_type()) { + if (spv::Decoration::LinkageAttributes == decoration.dec_type()) { const std::string linkage_name = spvtools::utils::MakeString(decoration.params()); return vstate.diag(SPV_ERROR_INVALID_BINARY, @@ -830,8 +922,9 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { } } - if (vstate.HasCapability(SpvCapabilityWorkgroupMemoryExplicitLayoutKHR) && - num_workgroup_variables > 0 && + const bool workgroup_blocks_allowed = vstate.HasCapability( + spv::Capability::WorkgroupMemoryExplicitLayoutKHR); + if (workgroup_blocks_allowed && num_workgroup_variables > 0 && num_workgroup_variables_with_block > 0) { if (num_workgroup_variables != num_workgroup_variables_with_block) { return vstate.diag(SPV_ERROR_INVALID_BINARY, vstate.FindDef(entry_point)) @@ -852,6 +945,13 @@ spv_result_t CheckDecorationsOfEntryPoints(ValidationState_t& vstate) { "Entry point id " << entry_point << " does not meet this requirement."; } + } else if (!workgroup_blocks_allowed && + num_workgroup_variables_with_block > 0) { + return vstate.diag(SPV_ERROR_INVALID_BINARY, + vstate.FindDef(entry_point)) + << "Workgroup Storage Class variables can't be decorated with " + "Block unless declaring the WorkgroupMemoryExplicitLayoutKHR " + "capability."; } } } @@ -878,21 +978,23 @@ void ComputeMemberConstraintsForStruct(MemberConstraints* constraints, LayoutConstraints& constraint = (*constraints)[std::make_pair(struct_id, memberIdx)]; constraint = inherited; - for (auto& decoration : vstate.id_decorations(struct_id)) { - if (decoration.struct_member_index() == (int)memberIdx) { - switch (decoration.dec_type()) { - case SpvDecorationRowMajor: - constraint.majorness = kRowMajor; - break; - case SpvDecorationColMajor: - constraint.majorness = kColumnMajor; - break; - case SpvDecorationMatrixStride: - constraint.matrix_stride = decoration.params()[0]; - break; - default: - break; - } + auto member_decorations = + vstate.id_member_decorations(struct_id, memberIdx); + for (auto decoration = member_decorations.begin; + decoration != member_decorations.end; ++decoration) { + assert(decoration->struct_member_index() == (int)memberIdx); + switch (decoration->dec_type()) { + case spv::Decoration::RowMajor: + constraint.majorness = kRowMajor; + break; + case spv::Decoration::ColMajor: + constraint.majorness = kColumnMajor; + break; + case spv::Decoration::MatrixStride: + constraint.matrix_stride = decoration->params()[0]; + break; + default: + break; } } @@ -901,12 +1003,12 @@ void ComputeMemberConstraintsForStruct(MemberConstraints* constraints, const auto member_type_inst = vstate.FindDef(member_type_id); const auto opcode = member_type_inst->opcode(); switch (opcode) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: ComputeMemberConstraintsForArray(constraints, member_type_id, inherited, vstate); break; - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: ComputeMemberConstraintsForStruct(constraints, member_type_id, inherited, vstate); break; @@ -925,12 +1027,12 @@ void ComputeMemberConstraintsForArray(MemberConstraints* constraints, const auto elem_type_inst = vstate.FindDef(elem_type_id); const auto opcode = elem_type_inst->opcode(); switch (opcode) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: ComputeMemberConstraintsForArray(constraints, elem_type_id, inherited, vstate); break; - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: ComputeMemberConstraintsForStruct(constraints, elem_type_id, inherited, vstate); break; @@ -944,53 +1046,57 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { std::unordered_set uses_push_constant; for (const auto& inst : vstate.ordered_instructions()) { const auto& words = inst.words(); - if (SpvOpVariable == inst.opcode()) { + auto type_id = inst.type_id(); + const Instruction* type_inst = vstate.FindDef(type_id); + if (spv::Op::OpVariable == inst.opcode()) { const auto var_id = inst.id(); // For storage class / decoration combinations, see Vulkan 14.5.4 "Offset // and Stride Assignment". - const auto storageClass = words[3]; - const bool uniform = storageClass == SpvStorageClassUniform; + const auto storageClass = inst.GetOperandAs(2); + const bool uniform = storageClass == spv::StorageClass::Uniform; const bool uniform_constant = - storageClass == SpvStorageClassUniformConstant; - const bool push_constant = storageClass == SpvStorageClassPushConstant; - const bool storage_buffer = storageClass == SpvStorageClassStorageBuffer; + storageClass == spv::StorageClass::UniformConstant; + const bool push_constant = + storageClass == spv::StorageClass::PushConstant; + const bool storage_buffer = + storageClass == spv::StorageClass::StorageBuffer; if (spvIsVulkanEnv(vstate.context()->target_env)) { - // Vulkan 14.5.1: There must be no more than one PushConstant block - // per entry point. + // Vulkan: There must be no more than one PushConstant block per entry + // point. if (push_constant) { auto entry_points = vstate.EntryPointReferences(var_id); for (auto ep_id : entry_points) { const bool already_used = !uses_push_constant.insert(ep_id).second; if (already_used) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << "Entry point id '" << ep_id + << vstate.VkErrorID(6674) << "Entry point id '" << ep_id << "' uses more than one PushConstant interface.\n" - << "From Vulkan spec, section 14.5.1:\n" + << "From Vulkan spec:\n" << "There must be no more than one push constant block " << "statically used per shader entry point."; } } } - // Vulkan 14.5.2: Check DescriptorSet and Binding decoration for + // Vulkan: Check DescriptorSet and Binding decoration for // UniformConstant which cannot be a struct. if (uniform_constant) { auto entry_points = vstate.EntryPointReferences(var_id); if (!entry_points.empty() && - !hasDecoration(var_id, SpvDecorationDescriptorSet, vstate)) { + !hasDecoration(var_id, spv::Decoration::DescriptorSet, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << "UniformConstant id '" << var_id + << vstate.VkErrorID(6677) << "UniformConstant id '" << var_id << "' is missing DescriptorSet decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "These variables must have DescriptorSet and Binding " "decorations specified"; } if (!entry_points.empty() && - !hasDecoration(var_id, SpvDecorationBinding, vstate)) { + !hasDecoration(var_id, spv::Decoration::Binding, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << "UniformConstant id '" << var_id + << vstate.VkErrorID(6677) << "UniformConstant id '" << var_id << "' is missing Binding decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "These variables must have DescriptorSet and Binding " "decorations specified"; } @@ -998,14 +1104,14 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { } if (spvIsOpenGLEnv(vstate.context()->target_env)) { - bool has_block = hasDecoration(var_id, SpvDecorationBlock, vstate); + bool has_block = hasDecoration(var_id, spv::Decoration::Block, vstate); bool has_buffer_block = - hasDecoration(var_id, SpvDecorationBufferBlock, vstate); + hasDecoration(var_id, spv::Decoration::BufferBlock, vstate); if ((uniform && (has_block || has_buffer_block)) || (storage_buffer && has_block)) { auto entry_points = vstate.EntryPointReferences(var_id); if (!entry_points.empty() && - !hasDecoration(var_id, SpvDecorationBinding, vstate)) { + !hasDecoration(var_id, spv::Decoration::Binding, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) << (uniform ? "Uniform" : "Storage Buffer") << " id '" << var_id << "' is missing Binding decoration.\n" @@ -1017,24 +1123,25 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { } const bool phys_storage_buffer = - storageClass == SpvStorageClassPhysicalStorageBufferEXT; + storageClass == spv::StorageClass::PhysicalStorageBuffer; const bool workgroup = - storageClass == SpvStorageClassWorkgroup && - vstate.HasCapability(SpvCapabilityWorkgroupMemoryExplicitLayoutKHR); + storageClass == spv::StorageClass::Workgroup && + vstate.HasCapability( + spv::Capability::WorkgroupMemoryExplicitLayoutKHR); if (uniform || push_constant || storage_buffer || phys_storage_buffer || workgroup) { const auto ptrInst = vstate.FindDef(words[1]); - assert(SpvOpTypePointer == ptrInst->opcode()); + assert(spv::Op::OpTypePointer == ptrInst->opcode()); auto id = ptrInst->words()[3]; auto id_inst = vstate.FindDef(id); // Jump through one level of arraying. - if (!workgroup && (id_inst->opcode() == SpvOpTypeArray || - id_inst->opcode() == SpvOpTypeRuntimeArray)) { + if (!workgroup && (id_inst->opcode() == spv::Op::OpTypeArray || + id_inst->opcode() == spv::Op::OpTypeRuntimeArray)) { id = id_inst->GetOperandAs(1u); id_inst = vstate.FindDef(id); } // Struct requirement is checked on variables so just move on here. - if (SpvOpTypeStruct != id_inst->opcode()) continue; + if (spv::Op::OpTypeStruct != id_inst->opcode()) continue; MemberConstraints constraints; ComputeMemberConstraintsForStruct(&constraints, id, LayoutConstraints(), vstate); @@ -1046,60 +1153,61 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { : "StorageBuffer")); if (spvIsVulkanEnv(vstate.context()->target_env)) { - const bool block = hasDecoration(id, SpvDecorationBlock, vstate); + const bool block = hasDecoration(id, spv::Decoration::Block, vstate); const bool buffer_block = - hasDecoration(id, SpvDecorationBufferBlock, vstate); + hasDecoration(id, spv::Decoration::BufferBlock, vstate); if (storage_buffer && buffer_block) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << "Storage buffer id '" << var_id + << vstate.VkErrorID(6675) << "Storage buffer id '" << var_id << " In Vulkan, BufferBlock is disallowed on variables in " "the StorageBuffer storage class"; } - // Vulkan 14.5.1/2: Check Block decoration for PushConstant, Uniform + // Vulkan: Check Block decoration for PushConstant, Uniform // and StorageBuffer variables. Uniform can also use BufferBlock. if (push_constant && !block) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) - << "PushConstant id '" << id + << vstate.VkErrorID(6675) << "PushConstant id '" << id << "' is missing Block decoration.\n" - << "From Vulkan spec, section 14.5.1:\n" + << "From Vulkan spec:\n" << "Such variables must be identified with a Block " "decoration"; } if (storage_buffer && !block) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) - << "StorageBuffer id '" << id + << vstate.VkErrorID(6675) << "StorageBuffer id '" << id << "' is missing Block decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "Such variables must be identified with a Block " "decoration"; } if (uniform && !block && !buffer_block) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) - << "Uniform id '" << id + << vstate.VkErrorID(6676) << "Uniform id '" << id << "' is missing Block or BufferBlock decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "Such variables must be identified with a Block or " "BufferBlock decoration"; } - // Vulkan 14.5.2: Check DescriptorSet and Binding decoration for + // Vulkan: Check DescriptorSet and Binding decoration for // Uniform and StorageBuffer variables. if (uniform || storage_buffer) { auto entry_points = vstate.EntryPointReferences(var_id); if (!entry_points.empty() && - !hasDecoration(var_id, SpvDecorationDescriptorSet, vstate)) { + !hasDecoration(var_id, spv::Decoration::DescriptorSet, + vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << sc_str << " id '" << var_id + << vstate.VkErrorID(6677) << sc_str << " id '" << var_id << "' is missing DescriptorSet decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "These variables must have DescriptorSet and Binding " "decorations specified"; } if (!entry_points.empty() && - !hasDecoration(var_id, SpvDecorationBinding, vstate)) { + !hasDecoration(var_id, spv::Decoration::Binding, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(var_id)) - << sc_str << " id '" << var_id + << vstate.VkErrorID(6677) << sc_str << " id '" << var_id << "' is missing Binding decoration.\n" - << "From Vulkan spec, section 14.5.2:\n" + << "From Vulkan spec:\n" << "These variables must have DescriptorSet and Binding " "decorations specified"; } @@ -1107,8 +1215,9 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { } for (const auto& dec : vstate.id_decorations(id)) { - const bool blockDeco = SpvDecorationBlock == dec.dec_type(); - const bool bufferDeco = SpvDecorationBufferBlock == dec.dec_type(); + const bool blockDeco = spv::Decoration::Block == dec.dec_type(); + const bool bufferDeco = + spv::Decoration::BufferBlock == dec.dec_type(); const bool blockRules = uniform && blockDeco; const bool bufferRules = (uniform && bufferDeco) || @@ -1136,133 +1245,136 @@ spv_result_t CheckDecorationsOfBuffers(ValidationState_t& vstate) { << "Structure id " << id << " decorated as " << deco_str << " must be explicitly laid out with Offset " "decorations."; - } else if (hasDecoration(id, SpvDecorationGLSLShared, vstate)) { - return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) - << "Structure id " << id << " decorated as " << deco_str - << " must not use GLSLShared decoration."; - } else if (hasDecoration(id, SpvDecorationGLSLPacked, vstate)) { - return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) - << "Structure id " << id << " decorated as " << deco_str - << " must not use GLSLPacked decoration."; - } else if (!checkForRequiredDecoration(id, SpvDecorationArrayStride, - SpvOpTypeArray, vstate)) { + } + + if (!checkForRequiredDecoration( + id, + [](spv::Decoration d) { + return d == spv::Decoration::ArrayStride; + }, + spv::Op::OpTypeArray, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "Structure id " << id << " decorated as " << deco_str << " must be explicitly laid out with ArrayStride " "decorations."; - } else if (!checkForRequiredDecoration(id, - SpvDecorationMatrixStride, - SpvOpTypeMatrix, vstate)) { + } + + if (!checkForRequiredDecoration( + id, + [](spv::Decoration d) { + return d == spv::Decoration::MatrixStride; + }, + spv::Op::OpTypeMatrix, vstate)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "Structure id " << id << " decorated as " << deco_str << " must be explicitly laid out with MatrixStride " "decorations."; - } else if (blockRules && - (SPV_SUCCESS != (recursive_status = checkLayout( - id, sc_str, deco_str, true, - scalar_block_layout, 0, - constraints, vstate)))) { - return recursive_status; - } else if (bufferRules && - (SPV_SUCCESS != (recursive_status = checkLayout( - id, sc_str, deco_str, false, - scalar_block_layout, 0, - constraints, vstate)))) { - return recursive_status; + } + + if (!checkForRequiredDecoration( + id, + [](spv::Decoration d) { + return d == spv::Decoration::RowMajor || + d == spv::Decoration::ColMajor; + }, + spv::Op::OpTypeMatrix, vstate)) { + return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) + << "Structure id " << id << " decorated as " << deco_str + << " must be explicitly laid out with RowMajor or " + "ColMajor decorations."; + } + + if (spvIsVulkanEnv(vstate.context()->target_env)) { + if (blockRules && (SPV_SUCCESS != (recursive_status = checkLayout( + id, sc_str, deco_str, true, + scalar_block_layout, 0, + constraints, vstate)))) { + return recursive_status; + } else if (bufferRules && + (SPV_SUCCESS != + (recursive_status = checkLayout( + id, sc_str, deco_str, false, scalar_block_layout, + 0, constraints, vstate)))) { + return recursive_status; + } } } } } + } else if (type_inst && type_inst->opcode() == spv::Op::OpTypePointer && + type_inst->GetOperandAs(1u) == + spv::StorageClass::PhysicalStorageBuffer) { + const bool scalar_block_layout = vstate.options()->scalar_block_layout; + MemberConstraints constraints; + const bool buffer = true; + const auto data_type_id = type_inst->GetOperandAs(2u); + const auto* data_type_inst = vstate.FindDef(data_type_id); + if (data_type_inst->opcode() == spv::Op::OpTypeStruct) { + ComputeMemberConstraintsForStruct(&constraints, data_type_id, + LayoutConstraints(), vstate); + } + if (auto res = checkLayout(data_type_id, "PhysicalStorageBuffer", "Block", + !buffer, scalar_block_layout, 0, constraints, + vstate)) { + return res; + } } } return SPV_SUCCESS; } // Returns true if |decoration| cannot be applied to the same id more than once. -bool AtMostOncePerId(SpvDecoration decoration) { - return decoration == SpvDecorationArrayStride; +bool AtMostOncePerId(spv::Decoration decoration) { + return decoration != spv::Decoration::UserSemantic && + decoration != spv::Decoration::FuncParamAttr; } // Returns true if |decoration| cannot be applied to the same member more than // once. -bool AtMostOncePerMember(SpvDecoration decoration) { - switch (decoration) { - case SpvDecorationOffset: - case SpvDecorationMatrixStride: - case SpvDecorationRowMajor: - case SpvDecorationColMajor: - return true; - default: - return false; - } -} - -// Returns the string name for |decoration|. -const char* GetDecorationName(SpvDecoration decoration) { - switch (decoration) { - case SpvDecorationAliased: - return "Aliased"; - case SpvDecorationRestrict: - return "Restrict"; - case SpvDecorationArrayStride: - return "ArrayStride"; - case SpvDecorationOffset: - return "Offset"; - case SpvDecorationMatrixStride: - return "MatrixStride"; - case SpvDecorationRowMajor: - return "RowMajor"; - case SpvDecorationColMajor: - return "ColMajor"; - case SpvDecorationBlock: - return "Block"; - case SpvDecorationBufferBlock: - return "BufferBlock"; - default: - return ""; - } +bool AtMostOncePerMember(spv::Decoration decoration) { + return decoration != spv::Decoration::UserSemantic; } spv_result_t CheckDecorationsCompatibility(ValidationState_t& vstate) { - using PerIDKey = std::tuple; - using PerMemberKey = std::tuple; + using PerIDKey = std::tuple; + using PerMemberKey = std::tuple; // An Array of pairs where the decorations in the pair cannot both be applied // to the same id. - static const SpvDecoration mutually_exclusive_per_id[][2] = { - {SpvDecorationBlock, SpvDecorationBufferBlock}, - {SpvDecorationRestrict, SpvDecorationAliased}}; + static const spv::Decoration mutually_exclusive_per_id[][2] = { + {spv::Decoration::Block, spv::Decoration::BufferBlock}, + {spv::Decoration::Restrict, spv::Decoration::Aliased}}; static const auto num_mutually_exclusive_per_id_pairs = - sizeof(mutually_exclusive_per_id) / (2 * sizeof(SpvDecoration)); + sizeof(mutually_exclusive_per_id) / (2 * sizeof(spv::Decoration)); // An Array of pairs where the decorations in the pair cannot both be applied // to the same member. - static const SpvDecoration mutually_exclusive_per_member[][2] = { - {SpvDecorationRowMajor, SpvDecorationColMajor}}; + static const spv::Decoration mutually_exclusive_per_member[][2] = { + {spv::Decoration::RowMajor, spv::Decoration::ColMajor}}; static const auto num_mutually_exclusive_per_mem_pairs = - sizeof(mutually_exclusive_per_member) / (2 * sizeof(SpvDecoration)); + sizeof(mutually_exclusive_per_member) / (2 * sizeof(spv::Decoration)); std::set seen_per_id; std::set seen_per_member; for (const auto& inst : vstate.ordered_instructions()) { const auto& words = inst.words(); - if (SpvOpDecorate == inst.opcode()) { + if (spv::Op::OpDecorate == inst.opcode()) { const auto id = words[1]; - const auto dec_type = static_cast(words[2]); + const auto dec_type = static_cast(words[2]); const auto k = PerIDKey(dec_type, id); const auto already_used = !seen_per_id.insert(k).second; if (already_used && AtMostOncePerId(dec_type)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "ID '" << id << "' decorated with " - << GetDecorationName(dec_type) + << vstate.SpvDecorationString(dec_type) << " multiple times is not allowed."; } // Verify certain mutually exclusive decorations are not both applied on // an ID. for (uint32_t pair_idx = 0; pair_idx < num_mutually_exclusive_per_id_pairs; ++pair_idx) { - SpvDecoration excl_dec_type = SpvDecorationMax; + spv::Decoration excl_dec_type = spv::Decoration::Max; if (mutually_exclusive_per_id[pair_idx][0] == dec_type) { excl_dec_type = mutually_exclusive_per_id[pair_idx][1]; } else if (mutually_exclusive_per_id[pair_idx][1] == dec_type) { @@ -1275,27 +1387,28 @@ spv_result_t CheckDecorationsCompatibility(ValidationState_t& vstate) { if (seen_per_id.find(excl_k) != seen_per_id.end()) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "ID '" << id << "' decorated with both " - << GetDecorationName(dec_type) << " and " - << GetDecorationName(excl_dec_type) << " is not allowed."; + << vstate.SpvDecorationString(dec_type) << " and " + << vstate.SpvDecorationString(excl_dec_type) + << " is not allowed."; } } - } else if (SpvOpMemberDecorate == inst.opcode()) { + } else if (spv::Op::OpMemberDecorate == inst.opcode()) { const auto id = words[1]; const auto member_id = words[2]; - const auto dec_type = static_cast(words[3]); + const auto dec_type = static_cast(words[3]); const auto k = PerMemberKey(dec_type, id, member_id); const auto already_used = !seen_per_member.insert(k).second; if (already_used && AtMostOncePerMember(dec_type)) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "ID '" << id << "', member '" << member_id - << "' decorated with " << GetDecorationName(dec_type) + << "' decorated with " << vstate.SpvDecorationString(dec_type) << " multiple times is not allowed."; } // Verify certain mutually exclusive decorations are not both applied on // a (ID, member) tuple. for (uint32_t pair_idx = 0; pair_idx < num_mutually_exclusive_per_mem_pairs; ++pair_idx) { - SpvDecoration excl_dec_type = SpvDecorationMax; + spv::Decoration excl_dec_type = spv::Decoration::Max; if (mutually_exclusive_per_member[pair_idx][0] == dec_type) { excl_dec_type = mutually_exclusive_per_member[pair_idx][1]; } else if (mutually_exclusive_per_member[pair_idx][1] == dec_type) { @@ -1308,8 +1421,9 @@ spv_result_t CheckDecorationsCompatibility(ValidationState_t& vstate) { if (seen_per_member.find(excl_k) != seen_per_member.end()) { return vstate.diag(SPV_ERROR_INVALID_ID, vstate.FindDef(id)) << "ID '" << id << "', member '" << member_id - << "' decorated with both " << GetDecorationName(dec_type) - << " and " << GetDecorationName(excl_dec_type) + << "' decorated with both " + << vstate.SpvDecorationString(dec_type) << " and " + << vstate.SpvDecorationString(excl_dec_type) << " is not allowed."; } } @@ -1320,7 +1434,7 @@ spv_result_t CheckDecorationsCompatibility(ValidationState_t& vstate) { spv_result_t CheckVulkanMemoryModelDeprecatedDecorations( ValidationState_t& vstate) { - if (vstate.memory_model() != SpvMemoryModelVulkanKHR) return SPV_SUCCESS; + if (vstate.memory_model() != spv::MemoryModel::VulkanKHR) return SPV_SUCCESS; std::string msg; std::ostringstream str(msg); @@ -1329,10 +1443,10 @@ spv_result_t CheckVulkanMemoryModelDeprecatedDecorations( const auto id = inst->id(); for (const auto& dec : vstate.id_decorations(id)) { const auto member = dec.struct_member_index(); - if (dec.dec_type() == SpvDecorationCoherent || - dec.dec_type() == SpvDecorationVolatile) { - str << (dec.dec_type() == SpvDecorationCoherent ? "Coherent" - : "Volatile"); + if (dec.dec_type() == spv::Decoration::Coherent || + dec.dec_type() == spv::Decoration::Volatile) { + str << (dec.dec_type() == spv::Decoration::Coherent ? "Coherent" + : "Volatile"); str << " decoration targeting " << vstate.getIdName(id); if (member != Decoration::kInvalidMember) { str << " (member index " << member << ")"; @@ -1353,7 +1467,7 @@ spv_result_t CheckFPRoundingModeForShaders(ValidationState_t& vstate, const Decoration& decoration) { // Validates width-only conversion instruction for floating-point object // i.e., OpFConvert - if (inst.opcode() != SpvOpFConvert) { + if (inst.opcode() != spv::Op::OpFConvert) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "FPRoundingMode decoration can be applied only to a " "width-only conversion instruction for floating-point " @@ -1361,8 +1475,9 @@ spv_result_t CheckFPRoundingModeForShaders(ValidationState_t& vstate, } if (spvIsVulkanEnv(vstate.context()->target_env)) { - const auto mode = decoration.params()[0]; - if ((mode != SpvFPRoundingModeRTE) && (mode != SpvFPRoundingModeRTZ)) { + const auto mode = spv::FPRoundingMode(decoration.params()[0]); + if ((mode != spv::FPRoundingMode::RTE) && + (mode != spv::FPRoundingMode::RTZ)) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << vstate.VkErrorID(4675) << "In Vulkan, the FPRoundingMode mode must only by RTE or RTZ."; @@ -1372,11 +1487,11 @@ spv_result_t CheckFPRoundingModeForShaders(ValidationState_t& vstate, // Validates Object operand of an OpStore for (const auto& use : inst.uses()) { const auto store = use.first; - if (store->opcode() == SpvOpFConvert) continue; + if (store->opcode() == spv::Op::OpFConvert) continue; if (spvOpcodeIsDebug(store->opcode())) continue; if (store->IsNonSemantic()) continue; if (spvOpcodeIsDecoration(store->opcode())) continue; - if (store->opcode() != SpvOpStore) { + if (store->opcode() != spv::Op::OpStore) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "FPRoundingMode decoration can be applied only to the " "Object operand of an OpStore."; @@ -1402,16 +1517,17 @@ spv_result_t CheckFPRoundingModeForShaders(ValidationState_t& vstate, } // Validates storage class of the pointer to the OpStore - const auto storage = ptr_type->GetOperandAs(1); - if (storage != SpvStorageClassStorageBuffer && - storage != SpvStorageClassUniform && - storage != SpvStorageClassPushConstant && - storage != SpvStorageClassInput && storage != SpvStorageClassOutput && - storage != SpvStorageClassPhysicalStorageBufferEXT) { + const auto storage = ptr_type->GetOperandAs(1); + if (storage != spv::StorageClass::StorageBuffer && + storage != spv::StorageClass::Uniform && + storage != spv::StorageClass::PushConstant && + storage != spv::StorageClass::Input && + storage != spv::StorageClass::Output && + storage != spv::StorageClass::PhysicalStorageBuffer) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "FPRoundingMode decoration can be applied only to the " "Object operand of an OpStore in the StorageBuffer, " - "PhysicalStorageBufferEXT, Uniform, PushConstant, Input, or " + "PhysicalStorageBuffer, Uniform, PushConstant, Input, or " "Output Storage Classes."; } } @@ -1432,23 +1548,26 @@ spv_result_t CheckNonWritableDecoration(ValidationState_t& vstate, // First, it must be a variable or function parameter. const auto opcode = inst.opcode(); const auto type_id = inst.type_id(); - if (opcode != SpvOpVariable && opcode != SpvOpFunctionParameter) { + if (opcode != spv::Op::OpVariable && + opcode != spv::Op::OpFunctionParameter && + opcode != spv::Op::OpRawAccessChainNV) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "Target of NonWritable decoration must be a memory object " "declaration (a variable or a function parameter)"; } - const auto var_storage_class = opcode == SpvOpVariable - ? inst.GetOperandAs(2) - : SpvStorageClassMax; - if ((var_storage_class == SpvStorageClassFunction || - var_storage_class == SpvStorageClassPrivate) && + const auto var_storage_class = opcode == spv::Op::OpVariable + ? inst.GetOperandAs(2) + : spv::StorageClass::Max; + if ((var_storage_class == spv::StorageClass::Function || + var_storage_class == spv::StorageClass::Private) && vstate.features().nonwritable_var_in_function_or_private) { // New permitted feature in SPIR-V 1.4. } else if ( - // It may point to a UBO, SSBO, or storage image. + // It may point to a UBO, SSBO, storage image, or raw access chain. vstate.IsPointerToUniformBlock(type_id) || vstate.IsPointerToStorageBuffer(type_id) || - vstate.IsPointerToStorageImage(type_id)) { + vstate.IsPointerToStorageImage(type_id) || + opcode == spv::Op::OpRawAccessChainNV) { } else { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "Target of NonWritable decoration is invalid: must point to a " @@ -1471,8 +1590,9 @@ spv_result_t CheckNonWritableDecoration(ValidationState_t& vstate, spv_result_t CheckUniformDecoration(ValidationState_t& vstate, const Instruction& inst, const Decoration& decoration) { - const char* const dec_name = - decoration.dec_type() == SpvDecorationUniform ? "Uniform" : "UniformId"; + const char* const dec_name = decoration.dec_type() == spv::Decoration::Uniform + ? "Uniform" + : "UniformId"; // Uniform or UniformId must decorate an "object" // - has a result ID @@ -1486,7 +1606,7 @@ spv_result_t CheckUniformDecoration(ValidationState_t& vstate, << dec_name << " decoration applied to a non-object"; } if (Instruction* type_inst = vstate.FindDef(inst.type_id())) { - if (type_inst->opcode() == SpvOpTypeVoid) { + if (type_inst->opcode() == spv::Op::OpTypeVoid) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << dec_name << " decoration applied to a value with void type"; } @@ -1500,7 +1620,7 @@ spv_result_t CheckUniformDecoration(ValidationState_t& vstate, // Use of Uniform with OpDecorate is checked elsewhere. // Use of UniformId with OpDecorateId is checked elsewhere. - if (decoration.dec_type() == SpvDecorationUniformId) { + if (decoration.dec_type() == spv::Decoration::UniformId) { assert(decoration.params().size() == 1 && "Grammar ensures UniformId has one parameter"); @@ -1521,13 +1641,13 @@ spv_result_t CheckIntegerWrapDecoration(ValidationState_t& vstate, const Instruction& inst, const Decoration& decoration) { switch (inst.opcode()) { - case SpvOpIAdd: - case SpvOpISub: - case SpvOpIMul: - case SpvOpShiftLeftLogical: - case SpvOpSNegate: + case spv::Op::OpIAdd: + case spv::Op::OpISub: + case spv::Op::OpIMul: + case spv::Op::OpShiftLeftLogical: + case spv::Op::OpSNegate: return SPV_SUCCESS; - case SpvOpExtInst: + case spv::Op::OpExtInst: // TODO(dneto): Only certain extended instructions allow these // decorations. For now allow anything. return SPV_SUCCESS; @@ -1536,7 +1656,7 @@ spv_result_t CheckIntegerWrapDecoration(ValidationState_t& vstate, } return vstate.diag(SPV_ERROR_INVALID_ID, &inst) - << (decoration.dec_type() == SpvDecorationNoSignedWrap + << (decoration.dec_type() == spv::Decoration::NoSignedWrap ? "NoSignedWrap" : "NoUnsignedWrap") << " decoration may not be applied to " @@ -1550,29 +1670,32 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate, const Instruction& inst, const Decoration& decoration) { assert(inst.id() && "Parser ensures the target of the decoration has an ID"); + assert(decoration.params().size() == 1 && + "Grammar ensures Component has one parameter"); uint32_t type_id; if (decoration.struct_member_index() == Decoration::kInvalidMember) { // The target must be a memory object declaration. const auto opcode = inst.opcode(); - if (opcode != SpvOpVariable && opcode != SpvOpFunctionParameter) { + if (opcode != spv::Op::OpVariable && + opcode != spv::Op::OpFunctionParameter) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "Target of Component decoration must be a memory object " "declaration (a variable or a function parameter)"; } // Only valid for the Input and Output Storage Classes. - const auto storage_class = opcode == SpvOpVariable - ? inst.GetOperandAs(2) - : SpvStorageClassMax; - if (storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput && - storage_class != SpvStorageClassMax) { + const auto storage_class = opcode == spv::Op::OpVariable + ? inst.GetOperandAs(2) + : spv::StorageClass::Max; + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output && + storage_class != spv::StorageClass::Max) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << "Target of Component decoration is invalid: must point to a " "Storage Class of Input(1) or Output(3). Found Storage " "Class " - << storage_class; + << uint32_t(storage_class); } type_id = inst.type_id(); @@ -1581,7 +1704,7 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate, type_id = pointer->GetOperandAs(2); } } else { - if (inst.opcode() != SpvOpTypeStruct) { + if (inst.opcode() != spv::Op::OpTypeStruct) { return vstate.diag(SPV_ERROR_INVALID_DATA, &inst) << "Attempted to get underlying data type via member index for " "non-struct type."; @@ -1591,30 +1714,56 @@ spv_result_t CheckComponentDecoration(ValidationState_t& vstate, if (spvIsVulkanEnv(vstate.context()->target_env)) { // Strip the array, if present. - if (vstate.GetIdOpcode(type_id) == SpvOpTypeArray) { + if (vstate.GetIdOpcode(type_id) == spv::Op::OpTypeArray) { type_id = vstate.FindDef(type_id)->word(2u); } if (!vstate.IsIntScalarOrVectorType(type_id) && !vstate.IsFloatScalarOrVectorType(type_id)) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(4924) << "Component decoration specified for type " << vstate.getIdName(type_id) << " that is not a scalar or vector"; } - // For 16-, and 32-bit types, it is invalid if this sequence of components - // gets larger than 3. + const auto component = decoration.params()[0]; + if (component > 3) { + return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(4920) + << "Component decoration value must not be greater than 3"; + } + + const auto dimension = vstate.GetDimension(type_id); const auto bit_width = vstate.GetBitWidth(type_id); if (bit_width == 16 || bit_width == 32) { - assert(decoration.params().size() == 1 && - "Grammar ensures Component has one parameter"); - - const auto component = decoration.params()[0]; - const auto last_component = component + vstate.GetDimension(type_id) - 1; - if (last_component > 3) { + const auto sum_component = component + dimension; + if (sum_component > 4) { + return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(4921) + << "Sequence of components starting with " << component + << " and ending with " << (sum_component - 1) + << " gets larger than 3"; + } + } else if (bit_width == 64) { + if (dimension > 2) { + return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(7703) + << "Component decoration only allowed on 64-bit scalar and " + "2-component vector"; + } + if (component == 1 || component == 3) { + return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(4923) + << "Component decoration value must not be 1 or 3 for 64-bit " + "data types"; + } + // 64-bit is double per component dimension + const auto sum_component = component + (2 * dimension); + if (sum_component > 4) { return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << vstate.VkErrorID(4922) << "Sequence of components starting with " << component - << " and ending with " << last_component + << " and ending with " << (sum_component - 1) << " gets larger than 3"; } } @@ -1630,9 +1779,10 @@ spv_result_t CheckBlockDecoration(ValidationState_t& vstate, const Instruction& inst, const Decoration& decoration) { assert(inst.id() && "Parser ensures the target of the decoration has an ID"); - if (inst.opcode() != SpvOpTypeStruct) { - const char* const dec_name = - decoration.dec_type() == SpvDecorationBlock ? "Block" : "BufferBlock"; + if (inst.opcode() != spv::Op::OpTypeStruct) { + const char* const dec_name = decoration.dec_type() == spv::Decoration::Block + ? "Block" + : "BufferBlock"; return vstate.diag(SPV_ERROR_INVALID_ID, &inst) << dec_name << " decoration on a non-struct type."; } @@ -1642,10 +1792,10 @@ spv_result_t CheckBlockDecoration(ValidationState_t& vstate, spv_result_t CheckLocationDecoration(ValidationState_t& vstate, const Instruction& inst, const Decoration& decoration) { - if (inst.opcode() == SpvOpVariable) return SPV_SUCCESS; + if (inst.opcode() == spv::Op::OpVariable) return SPV_SUCCESS; if (decoration.struct_member_index() != Decoration::kInvalidMember && - inst.opcode() == SpvOpTypeStruct) { + inst.opcode() == spv::Op::OpTypeStruct) { return SPV_SUCCESS; } @@ -1654,6 +1804,24 @@ spv_result_t CheckLocationDecoration(ValidationState_t& vstate, "of a structure type"; } +spv_result_t CheckRelaxPrecisionDecoration(ValidationState_t& vstate, + const Instruction& inst, + const Decoration& decoration) { + // This is not the most precise check, but the rules for RelaxPrecision are + // very general, and it will be difficult to implement precisely. For now, + // I will only check for the cases that cause problems for the optimizer. + if (!spvOpcodeGeneratesType(inst.opcode())) { + return SPV_SUCCESS; + } + + if (decoration.struct_member_index() != Decoration::kInvalidMember && + inst.opcode() == spv::Op::OpTypeStruct) { + return SPV_SUCCESS; + } + return vstate.diag(SPV_ERROR_INVALID_ID, &inst) + << "RelaxPrecision decoration cannot be applied to a type"; +} + #define PASS_OR_BAIL_AT_LINE(X, LINE) \ { \ spv_result_t e##LINE = (X); \ @@ -1666,7 +1834,7 @@ spv_result_t CheckLocationDecoration(ValidationState_t& vstate, // propagated down to the group members. spv_result_t CheckDecorationsFromDecoration(ValidationState_t& vstate) { // Some rules are only checked for shaders. - const bool is_shader = vstate.HasCapability(SpvCapabilityShader); + const bool is_shader = vstate.HasCapability(spv::Capability::Shader); for (const auto& kv : vstate.id_decorations()) { const uint32_t id = kv.first; @@ -1678,36 +1846,40 @@ spv_result_t CheckDecorationsFromDecoration(ValidationState_t& vstate) { // We assume the decorations applied to a decoration group have already // been propagated down to the group members. - if (inst->opcode() == SpvOpDecorationGroup) continue; + if (inst->opcode() == spv::Op::OpDecorationGroup) continue; for (const auto& decoration : decorations) { switch (decoration.dec_type()) { - case SpvDecorationComponent: + case spv::Decoration::Component: PASS_OR_BAIL(CheckComponentDecoration(vstate, *inst, decoration)); break; - case SpvDecorationFPRoundingMode: + case spv::Decoration::FPRoundingMode: if (is_shader) PASS_OR_BAIL( CheckFPRoundingModeForShaders(vstate, *inst, decoration)); break; - case SpvDecorationNonWritable: + case spv::Decoration::NonWritable: PASS_OR_BAIL(CheckNonWritableDecoration(vstate, *inst, decoration)); break; - case SpvDecorationUniform: - case SpvDecorationUniformId: + case spv::Decoration::Uniform: + case spv::Decoration::UniformId: PASS_OR_BAIL(CheckUniformDecoration(vstate, *inst, decoration)); break; - case SpvDecorationNoSignedWrap: - case SpvDecorationNoUnsignedWrap: + case spv::Decoration::NoSignedWrap: + case spv::Decoration::NoUnsignedWrap: PASS_OR_BAIL(CheckIntegerWrapDecoration(vstate, *inst, decoration)); break; - case SpvDecorationBlock: - case SpvDecorationBufferBlock: + case spv::Decoration::Block: + case spv::Decoration::BufferBlock: PASS_OR_BAIL(CheckBlockDecoration(vstate, *inst, decoration)); break; - case SpvDecorationLocation: + case spv::Decoration::Location: PASS_OR_BAIL(CheckLocationDecoration(vstate, *inst, decoration)); break; + case spv::Decoration::RelaxedPrecision: + PASS_OR_BAIL( + CheckRelaxPrecisionDecoration(vstate, *inst, decoration)); + break; default: break; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_derivatives.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_derivatives.cpp index 25b941aba..90cf6645c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_derivatives.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_derivatives.cpp @@ -14,13 +14,11 @@ // Validates correctness of derivative SPIR-V instructions. -#include "source/val/validate.h" - #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -28,25 +26,26 @@ namespace val { // Validates correctness of derivative instructions. spv_result_t DerivativesPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpDPdx: - case SpvOpDPdy: - case SpvOpFwidth: - case SpvOpDPdxFine: - case SpvOpDPdyFine: - case SpvOpFwidthFine: - case SpvOpDPdxCoarse: - case SpvOpDPdyCoarse: - case SpvOpFwidthCoarse: { + case spv::Op::OpDPdx: + case spv::Op::OpDPdy: + case spv::Op::OpFwidth: + case spv::Op::OpDPdxFine: + case spv::Op::OpDPdyFine: + case spv::Op::OpFwidthFine: + case spv::Op::OpDPdxCoarse: + case spv::Op::OpDPdyCoarse: + case spv::Op::OpFwidthCoarse: { if (!_.IsFloatScalarOrVectorType(result_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be float scalar or vector type: " << spvOpcodeString(opcode); } - if (!_.ContainsSizedIntOrFloatType(result_type, SpvOpTypeFloat, 32)) { + if (!_.ContainsSizedIntOrFloatType(result_type, spv::Op::OpTypeFloat, + 32)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Result type component width must be 32 bits"; } @@ -58,10 +57,10 @@ spv_result_t DerivativesPass(ValidationState_t& _, const Instruction* inst) { << spvOpcodeString(opcode); } _.function(inst->function()->id()) - ->RegisterExecutionModelLimitation([opcode](SpvExecutionModel model, + ->RegisterExecutionModelLimitation([opcode](spv::ExecutionModel model, std::string* message) { - if (model != SpvExecutionModelFragment && - model != SpvExecutionModelGLCompute) { + if (model != spv::ExecutionModel::Fragment && + model != spv::ExecutionModel::GLCompute) { if (message) { *message = std::string( @@ -80,11 +79,11 @@ spv_result_t DerivativesPass(ValidationState_t& _, const Instruction* inst) { const auto* models = state.GetExecutionModels(entry_point->id()); const auto* modes = state.GetExecutionModes(entry_point->id()); if (models && - models->find(SpvExecutionModelGLCompute) != models->end() && + models->find(spv::ExecutionModel::GLCompute) != models->end() && (!modes || - (modes->find(SpvExecutionModeDerivativeGroupLinearNV) == + (modes->find(spv::ExecutionMode::DerivativeGroupLinearNV) == modes->end() && - modes->find(SpvExecutionModeDerivativeGroupQuadsNV) == + modes->find(spv::ExecutionMode::DerivativeGroupQuadsNV) == modes->end()))) { if (message) { *message = std::string( diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_execution_limitations.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_execution_limitations.cpp index aac1c4987..0221d7ef2 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_execution_limitations.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_execution_limitations.cpp @@ -13,8 +13,6 @@ // limitations under the License. #include "source/val/validate.h" - -#include "source/val/function.h" #include "source/val/validation_state.h" namespace spvtools { @@ -22,7 +20,7 @@ namespace val { spv_result_t ValidateExecutionLimitations(ValidationState_t& _, const Instruction* inst) { - if (inst->opcode() != SpvOpFunction) { + if (inst->opcode() != spv::Op::OpFunction) { return SPV_SUCCESS; } @@ -44,8 +42,8 @@ spv_result_t ValidateExecutionLimitations(ValidationState_t& _, std::string reason; if (!func->IsCompatibleWithExecutionModel(model, &reason)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpEntryPoint Entry Point '" << _.getIdName(entry_id) - << "'s callgraph contains function " + << "OpEntryPoint Entry Point " << _.getIdName(entry_id) + << "s callgraph contains function " << _.getIdName(inst->id()) << ", which cannot be used with the current execution " "model:\n" @@ -57,9 +55,8 @@ spv_result_t ValidateExecutionLimitations(ValidationState_t& _, std::string reason; if (!func->CheckLimitations(_, _.function(entry_id), &reason)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpEntryPoint Entry Point '" << _.getIdName(entry_id) - << "'s callgraph contains function " - << _.getIdName(inst->id()) + << "OpEntryPoint Entry Point " << _.getIdName(entry_id) + << "s callgraph contains function " << _.getIdName(inst->id()) << ", which cannot be used with the current execution " "modes:\n" << reason; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_extensions.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_extensions.cpp index b9f8e3c50..7b73c9c6e 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_extensions.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_extensions.cpp @@ -18,31 +18,41 @@ #include #include -#include "spirv/unified1/NonSemanticClspvReflection.h" - #include "NonSemanticShaderDebugInfo100.h" #include "OpenCLDebugInfo100.h" #include "source/common_debug_info.h" -#include "source/diagnostic.h" #include "source/enum_string_mapping.h" #include "source/extensions.h" #include "source/latest_version_glsl_std_450_header.h" #include "source/latest_version_opencl_std_header.h" -#include "source/opcode.h" #include "source/spirv_constant.h" -#include "source/spirv_target_env.h" #include "source/val/instruction.h" #include "source/val/validate.h" #include "source/val/validation_state.h" +#include "spirv/unified1/NonSemanticClspvReflection.h" namespace spvtools { namespace val { namespace { +std::string ReflectionInstructionName(ValidationState_t& _, + const Instruction* inst) { + spv_ext_inst_desc desc = nullptr; + if (_.grammar().lookupExtInst(SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION, + inst->word(4), &desc) != SPV_SUCCESS || + !desc) { + return std::string("Unknown ExtInst"); + } + std::ostringstream ss; + ss << desc->name; + + return ss.str(); +} + uint32_t GetSizeTBitWidth(const ValidationState_t& _) { - if (_.addressing_model() == SpvAddressingModelPhysical32) return 32; + if (_.addressing_model() == spv::AddressingModel::Physical32) return 32; - if (_.addressing_model() == SpvAddressingModelPhysical64) return 64; + if (_.addressing_model() == spv::AddressingModel::Physical64) return 64; return 0; } @@ -50,7 +60,7 @@ uint32_t GetSizeTBitWidth(const ValidationState_t& _) { bool IsIntScalar(ValidationState_t& _, uint32_t id, bool must_len32, bool must_unsigned) { auto type = _.FindDef(id); - if (!type || type->opcode() != SpvOpTypeInt) { + if (!type || type->opcode() != spv::Op::OpTypeInt) { return false; } @@ -63,7 +73,7 @@ bool IsIntScalar(ValidationState_t& _, uint32_t id, bool must_len32, bool IsUint32Constant(ValidationState_t& _, uint32_t id) { auto inst = _.FindDef(id); - if (!inst || inst->opcode() != SpvOpConstant) { + if (!inst || inst->opcode() != spv::Op::OpConstant) { return false; } @@ -79,7 +89,7 @@ uint32_t GetUint32Constant(ValidationState_t& _, uint32_t id) { // is a result id of an instruction with |expected_opcode|. spv_result_t ValidateOperandForDebugInfo( ValidationState_t& _, const std::string& operand_name, - SpvOp expected_opcode, const Instruction* inst, uint32_t word_index, + spv::Op expected_opcode, const Instruction* inst, uint32_t word_index, const std::function& ext_inst_name) { auto* operand = _.FindDef(inst->word(word_index)); if (operand->opcode() != expected_opcode) { @@ -129,7 +139,7 @@ spv_result_t ValidateUint32ConstantOperandForDebugInfo( } // True if the operand of a debug info instruction |inst| at |word_index| -// satisifies |expectation| that is given as a function. Otherwise, +// satisfies |expectation| that is given as a function. Otherwise, // returns false. bool DoesDebugInfoOperandMatchExpectation( const ValidationState_t& _, @@ -137,7 +147,7 @@ bool DoesDebugInfoOperandMatchExpectation( const Instruction* inst, uint32_t word_index) { if (inst->words().size() <= word_index) return false; auto* debug_inst = _.FindDef(inst->word(word_index)); - if (debug_inst->opcode() != SpvOpExtInst || + if (debug_inst->opcode() != spv::Op::OpExtInst || (debug_inst->ext_inst_type() != SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 && debug_inst->ext_inst_type() != SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) || @@ -147,6 +157,24 @@ bool DoesDebugInfoOperandMatchExpectation( return true; } +// Overload for NonSemanticShaderDebugInfo100Instructions. +bool DoesDebugInfoOperandMatchExpectation( + const ValidationState_t& _, + const std::function& + expectation, + const Instruction* inst, uint32_t word_index) { + if (inst->words().size() <= word_index) return false; + auto* debug_inst = _.FindDef(inst->word(word_index)); + if (debug_inst->opcode() != spv::Op::OpExtInst || + (debug_inst->ext_inst_type() != + SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) || + !expectation( + NonSemanticShaderDebugInfo100Instructions(debug_inst->word(4)))) { + return false; + } + return true; +} + // Check that the operand of a debug info instruction |inst| at |word_index| // is a result id of an debug info instruction whose debug instruction type // is |expected_debug_inst|. @@ -223,6 +251,18 @@ spv_result_t ValidateOperandDebugType( const Instruction* inst, uint32_t word_index, const std::function& ext_inst_name, bool allow_template_param) { + // Check for NonSemanticShaderDebugInfo100 specific types. + if (inst->ext_inst_type() == + SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100) { + std::function expectation = + [](NonSemanticShaderDebugInfo100Instructions dbg_inst) { + return dbg_inst == NonSemanticShaderDebugInfo100DebugTypeMatrix; + }; + if (DoesDebugInfoOperandMatchExpectation(_, expectation, inst, word_index)) + return SPV_SUCCESS; + } + + // Check for common types. std::function expectation = [&allow_template_param](CommonDebugInfoInstructions dbg_inst) { if (allow_template_param && @@ -243,12 +283,14 @@ spv_result_t ValidateOperandDebugType( } spv_result_t ValidateClspvReflectionKernel(ValidationState_t& _, - const Instruction* inst) { + const Instruction* inst, + uint32_t version) { + const auto inst_name = ReflectionInstructionName(_, inst); const auto kernel_id = inst->GetOperandAs(4); const auto kernel = _.FindDef(kernel_id); - if (kernel->opcode() != SpvOpFunction) { + if (kernel->opcode() != spv::Op::OpFunction) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Kernel does not reference a function"; + << inst_name << " does not reference a function"; } bool found_kernel = false; @@ -260,23 +302,23 @@ spv_result_t ValidateClspvReflectionKernel(ValidationState_t& _, } if (!found_kernel) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Kernel does not reference an entry-point"; + << inst_name << " does not reference an entry-point"; } const auto* exec_models = _.GetExecutionModels(kernel_id); if (!exec_models || exec_models->empty()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Kernel does not reference an entry-point"; + << inst_name << " does not reference an entry-point"; } for (auto exec_model : *exec_models) { - if (exec_model != SpvExecutionModelGLCompute) { + if (exec_model != spv::ExecutionModel::GLCompute) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Kernel must refer only to GLCompute entry-points"; + << inst_name << " must refer only to GLCompute entry-points"; } } auto name = _.FindDef(inst->GetOperandAs(5)); - if (!name || name->opcode() != SpvOpString) { + if (!name || name->opcode() != spv::Op::OpString) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Name must be an OpString"; } @@ -293,17 +335,48 @@ spv_result_t ValidateClspvReflectionKernel(ValidationState_t& _, << "Name must match an entry-point for Kernel"; } + const auto num_operands = inst->operands().size(); + if (version < 5 && num_operands > 6) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Version " << version << " of the " << inst_name + << " instruction can only have 2 additional operands"; + } + + if (num_operands > 6) { + const auto num_args_id = inst->GetOperandAs(6); + if (!IsUint32Constant(_, num_args_id)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "NumArguments must be a 32-bit unsigned integer OpConstant"; + } + } + + if (num_operands > 7) { + const auto flags_id = inst->GetOperandAs(7); + if (!IsUint32Constant(_, flags_id)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Flags must be a 32-bit unsigned integer OpConstant"; + } + } + + if (num_operands > 8) { + const auto atts_id = inst->GetOperandAs(8); + if (_.GetIdOpcode(atts_id) != spv::Op::OpString) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Attributes must be an OpString"; + } + } + return SPV_SUCCESS; } spv_result_t ValidateClspvReflectionArgumentInfo(ValidationState_t& _, const Instruction* inst) { const auto num_operands = inst->operands().size(); - if (_.GetIdOpcode(inst->GetOperandAs(4)) != SpvOpString) { + if (_.GetIdOpcode(inst->GetOperandAs(4)) != spv::Op::OpString) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Name must be an OpString"; } if (num_operands > 5) { - if (_.GetIdOpcode(inst->GetOperandAs(5)) != SpvOpString) { + if (_.GetIdOpcode(inst->GetOperandAs(5)) != spv::Op::OpString) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "TypeName must be an OpString"; } @@ -336,7 +409,7 @@ spv_result_t ValidateClspvReflectionArgumentInfo(ValidationState_t& _, spv_result_t ValidateKernelDecl(ValidationState_t& _, const Instruction* inst) { const auto decl_id = inst->GetOperandAs(4); const auto decl = _.FindDef(decl_id); - if (!decl || decl->opcode() != SpvOpExtInst) { + if (!decl || decl->opcode() != spv::Op::OpExtInst) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Kernel must be a Kernel extended instruction"; } @@ -359,7 +432,7 @@ spv_result_t ValidateKernelDecl(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateArgInfo(ValidationState_t& _, const Instruction* inst, uint32_t info_index) { auto info = _.FindDef(inst->GetOperandAs(info_index)); - if (!info || info->opcode() != SpvOpExtInst) { + if (!info || info->opcode() != spv::Op::OpExtInst) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "ArgInfo must be an ArgumentInfo extended instruction"; } @@ -409,8 +482,8 @@ spv_result_t ValidateClspvReflectionArgumentBuffer(ValidationState_t& _, return SPV_SUCCESS; } -spv_result_t ValidateClspvReflectionArgumentPodBuffer(ValidationState_t& _, - const Instruction* inst) { +spv_result_t ValidateClspvReflectionArgumentOffsetBuffer( + ValidationState_t& _, const Instruction* inst) { const auto num_operands = inst->operands().size(); if (auto error = ValidateKernelDecl(_, inst)) { return error; @@ -450,7 +523,7 @@ spv_result_t ValidateClspvReflectionArgumentPodBuffer(ValidationState_t& _, return SPV_SUCCESS; } -spv_result_t ValidateClspvReflectionArgumentPodPushConstant( +spv_result_t ValidateClspvReflectionArgumentPushConstant( ValidationState_t& _, const Instruction* inst) { const auto num_operands = inst->operands().size(); if (auto error = ValidateKernelDecl(_, inst)) { @@ -557,8 +630,8 @@ spv_result_t ValidateClspvReflectionPushConstant(ValidationState_t& _, return SPV_SUCCESS; } -spv_result_t ValidateClspvReflectionConstantData(ValidationState_t& _, - const Instruction* inst) { +spv_result_t ValidateClspvReflectionInitializedData(ValidationState_t& _, + const Instruction* inst) { if (!IsUint32Constant(_, inst->GetOperandAs(4))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "DescriptorSet must be a 32-bit unsigned integer OpConstant"; @@ -569,7 +642,7 @@ spv_result_t ValidateClspvReflectionConstantData(ValidationState_t& _, << "Binding must be a 32-bit unsigned integer OpConstant"; } - if (_.GetIdOpcode(inst->GetOperandAs(6)) != SpvOpString) { + if (_.GetIdOpcode(inst->GetOperandAs(6)) != spv::Op::OpString) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Data must be an OpString"; } @@ -620,18 +693,250 @@ spv_result_t ValidateClspvReflectionPropertyRequiredWorkgroupSize( return SPV_SUCCESS; } +spv_result_t ValidateClspvReflectionSubgroupMaxSize(ValidationState_t& _, + const Instruction* inst) { + const auto size_id = inst->GetOperandAs(4); + if (!IsUint32Constant(_, size_id)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionPointerRelocation(ValidationState_t& _, + const Instruction* inst) { + if (!IsUint32Constant(_, inst->GetOperandAs(4))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "ObjectOffset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "PointerOffset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(6))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "PointerSize must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionImageMetadataPushConstant( + ValidationState_t& _, const Instruction* inst) { + if (auto error = ValidateKernelDecl(_, inst)) { + return error; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Ordinal must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(6))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Offset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(7))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionImageMetadataUniform( + ValidationState_t& _, const Instruction* inst) { + if (auto error = ValidateKernelDecl(_, inst)) { + return error; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Ordinal must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(6))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "DescriptorSet must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(7))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Binding must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(8))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Offset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(9))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionPushConstantData(ValidationState_t& _, + const Instruction* inst) { + if (!IsUint32Constant(_, inst->GetOperandAs(4))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Offset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + if (_.GetIdOpcode(inst->GetOperandAs(6)) != spv::Op::OpString) { + return _.diag(SPV_ERROR_INVALID_ID, inst) << "Data must be an OpString"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionPrintfInfo(ValidationState_t& _, + const Instruction* inst) { + if (!IsUint32Constant(_, inst->GetOperandAs(4))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "PrintfID must be a 32-bit unsigned integer OpConstant"; + } + + if (_.GetIdOpcode(inst->GetOperandAs(5)) != spv::Op::OpString) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "FormatString must be an OpString"; + } + + for (size_t i = 6; i < inst->operands().size(); ++i) { + if (!IsUint32Constant(_, inst->GetOperandAs(i))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "ArgumentSizes must be a 32-bit unsigned integer OpConstant"; + } + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionPrintfStorageBuffer( + ValidationState_t& _, const Instruction* inst) { + if (!IsUint32Constant(_, inst->GetOperandAs(4))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "DescriptorSet must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Binding must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(6))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateClspvReflectionPrintfPushConstant( + ValidationState_t& _, const Instruction* inst) { + if (!IsUint32Constant(_, inst->GetOperandAs(4))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Offset must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(5))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Size must be a 32-bit unsigned integer OpConstant"; + } + + if (!IsUint32Constant(_, inst->GetOperandAs(6))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "BufferSize must be a 32-bit unsigned integer OpConstant"; + } + + return SPV_SUCCESS; +} + spv_result_t ValidateClspvReflectionInstruction(ValidationState_t& _, const Instruction* inst, - uint32_t /*version*/) { + uint32_t version) { if (!_.IsVoidType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Return Type must be OpTypeVoid"; } - auto ext_inst = inst->GetOperandAs(3); + uint32_t required_version = 0; + const auto ext_inst = + inst->GetOperandAs(3); switch (ext_inst) { case NonSemanticClspvReflectionKernel: - return ValidateClspvReflectionKernel(_, inst); + case NonSemanticClspvReflectionArgumentInfo: + case NonSemanticClspvReflectionArgumentStorageBuffer: + case NonSemanticClspvReflectionArgumentUniform: + case NonSemanticClspvReflectionArgumentPodStorageBuffer: + case NonSemanticClspvReflectionArgumentPodUniform: + case NonSemanticClspvReflectionArgumentPodPushConstant: + case NonSemanticClspvReflectionArgumentSampledImage: + case NonSemanticClspvReflectionArgumentStorageImage: + case NonSemanticClspvReflectionArgumentSampler: + case NonSemanticClspvReflectionArgumentWorkgroup: + case NonSemanticClspvReflectionSpecConstantWorkgroupSize: + case NonSemanticClspvReflectionSpecConstantGlobalOffset: + case NonSemanticClspvReflectionSpecConstantWorkDim: + case NonSemanticClspvReflectionPushConstantGlobalOffset: + case NonSemanticClspvReflectionPushConstantEnqueuedLocalSize: + case NonSemanticClspvReflectionPushConstantGlobalSize: + case NonSemanticClspvReflectionPushConstantRegionOffset: + case NonSemanticClspvReflectionPushConstantNumWorkgroups: + case NonSemanticClspvReflectionPushConstantRegionGroupOffset: + case NonSemanticClspvReflectionConstantDataStorageBuffer: + case NonSemanticClspvReflectionConstantDataUniform: + case NonSemanticClspvReflectionLiteralSampler: + case NonSemanticClspvReflectionPropertyRequiredWorkgroupSize: + required_version = 1; + break; + case NonSemanticClspvReflectionSpecConstantSubgroupMaxSize: + required_version = 2; + break; + case NonSemanticClspvReflectionArgumentPointerPushConstant: + case NonSemanticClspvReflectionArgumentPointerUniform: + case NonSemanticClspvReflectionProgramScopeVariablesStorageBuffer: + case NonSemanticClspvReflectionProgramScopeVariablePointerRelocation: + case NonSemanticClspvReflectionImageArgumentInfoChannelOrderPushConstant: + case NonSemanticClspvReflectionImageArgumentInfoChannelDataTypePushConstant: + case NonSemanticClspvReflectionImageArgumentInfoChannelOrderUniform: + case NonSemanticClspvReflectionImageArgumentInfoChannelDataTypeUniform: + required_version = 3; + break; + case NonSemanticClspvReflectionArgumentStorageTexelBuffer: + case NonSemanticClspvReflectionArgumentUniformTexelBuffer: + required_version = 4; + break; + case NonSemanticClspvReflectionConstantDataPointerPushConstant: + case NonSemanticClspvReflectionProgramScopeVariablePointerPushConstant: + case NonSemanticClspvReflectionPrintfInfo: + case NonSemanticClspvReflectionPrintfBufferStorageBuffer: + case NonSemanticClspvReflectionPrintfBufferPointerPushConstant: + required_version = 5; + break; + default: + break; + } + if (version < required_version) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << ReflectionInstructionName(_, inst) << " requires version " + << required_version << ", but parsed version is " << version; + } + + switch (ext_inst) { + case NonSemanticClspvReflectionKernel: + return ValidateClspvReflectionKernel(_, inst, version); case NonSemanticClspvReflectionArgumentInfo: return ValidateClspvReflectionArgumentInfo(_, inst); case NonSemanticClspvReflectionArgumentStorageBuffer: @@ -639,12 +944,16 @@ spv_result_t ValidateClspvReflectionInstruction(ValidationState_t& _, case NonSemanticClspvReflectionArgumentSampledImage: case NonSemanticClspvReflectionArgumentStorageImage: case NonSemanticClspvReflectionArgumentSampler: + case NonSemanticClspvReflectionArgumentStorageTexelBuffer: + case NonSemanticClspvReflectionArgumentUniformTexelBuffer: return ValidateClspvReflectionArgumentBuffer(_, inst); case NonSemanticClspvReflectionArgumentPodStorageBuffer: case NonSemanticClspvReflectionArgumentPodUniform: - return ValidateClspvReflectionArgumentPodBuffer(_, inst); + case NonSemanticClspvReflectionArgumentPointerUniform: + return ValidateClspvReflectionArgumentOffsetBuffer(_, inst); case NonSemanticClspvReflectionArgumentPodPushConstant: - return ValidateClspvReflectionArgumentPodPushConstant(_, inst); + case NonSemanticClspvReflectionArgumentPointerPushConstant: + return ValidateClspvReflectionArgumentPushConstant(_, inst); case NonSemanticClspvReflectionArgumentWorkgroup: return ValidateClspvReflectionArgumentWorkgroup(_, inst); case NonSemanticClspvReflectionSpecConstantWorkgroupSize: @@ -661,11 +970,31 @@ spv_result_t ValidateClspvReflectionInstruction(ValidationState_t& _, return ValidateClspvReflectionPushConstant(_, inst); case NonSemanticClspvReflectionConstantDataStorageBuffer: case NonSemanticClspvReflectionConstantDataUniform: - return ValidateClspvReflectionConstantData(_, inst); + case NonSemanticClspvReflectionProgramScopeVariablesStorageBuffer: + return ValidateClspvReflectionInitializedData(_, inst); case NonSemanticClspvReflectionLiteralSampler: return ValidateClspvReflectionSampler(_, inst); case NonSemanticClspvReflectionPropertyRequiredWorkgroupSize: return ValidateClspvReflectionPropertyRequiredWorkgroupSize(_, inst); + case NonSemanticClspvReflectionSpecConstantSubgroupMaxSize: + return ValidateClspvReflectionSubgroupMaxSize(_, inst); + case NonSemanticClspvReflectionProgramScopeVariablePointerRelocation: + return ValidateClspvReflectionPointerRelocation(_, inst); + case NonSemanticClspvReflectionImageArgumentInfoChannelOrderPushConstant: + case NonSemanticClspvReflectionImageArgumentInfoChannelDataTypePushConstant: + return ValidateClspvReflectionImageMetadataPushConstant(_, inst); + case NonSemanticClspvReflectionImageArgumentInfoChannelOrderUniform: + case NonSemanticClspvReflectionImageArgumentInfoChannelDataTypeUniform: + return ValidateClspvReflectionImageMetadataUniform(_, inst); + case NonSemanticClspvReflectionConstantDataPointerPushConstant: + case NonSemanticClspvReflectionProgramScopeVariablePointerPushConstant: + return ValidateClspvReflectionPushConstantData(_, inst); + case NonSemanticClspvReflectionPrintfInfo: + return ValidateClspvReflectionPrintfInfo(_, inst); + case NonSemanticClspvReflectionPrintfBufferStorageBuffer: + return ValidateClspvReflectionPrintfStorageBuffer(_, inst); + case NonSemanticClspvReflectionPrintfBufferPointerPushConstant: + return ValidateClspvReflectionPrintfPushConstant(_, inst); default: break; } @@ -675,7 +1004,7 @@ spv_result_t ValidateClspvReflectionInstruction(ValidationState_t& _, bool IsConstIntScalarTypeWith32Or64Bits(ValidationState_t& _, Instruction* instr) { - if (instr->opcode() != SpvOpConstant) return false; + if (instr->opcode() != spv::Op::OpConstant) return false; if (!_.IsIntScalarType(instr->type_id())) return false; uint32_t size_in_bits = _.GetBitWidth(instr->type_id()); return size_in_bits == 32 || size_in_bits == 64; @@ -684,7 +1013,7 @@ bool IsConstIntScalarTypeWith32Or64Bits(ValidationState_t& _, bool IsConstWithIntScalarType(ValidationState_t& _, const Instruction* inst, uint32_t word_index) { auto* int_scalar_const = _.FindDef(inst->word(word_index)); - if (int_scalar_const->opcode() == SpvOpConstant && + if (int_scalar_const->opcode() == spv::Op::OpConstant && _.IsIntScalarType(int_scalar_const->type_id())) { return true; } @@ -726,10 +1055,11 @@ spv_result_t ValidateExtension(ValidationState_t& _, const Instruction* inst) { if (_.version() < SPV_SPIRV_VERSION_WORD(1, 4)) { std::string extension = GetExtensionString(&(inst->c_inst())); if (extension == - ExtensionToString(kSPV_KHR_workgroup_memory_explicit_layout)) { + ExtensionToString(kSPV_KHR_workgroup_memory_explicit_layout) || + extension == ExtensionToString(kSPV_EXT_mesh_shader) || + extension == ExtensionToString(kSPV_NV_shader_invocation_reorder)) { return _.diag(SPV_ERROR_WRONG_VERSION, inst) - << "SPV_KHR_workgroup_memory_explicit_layout extension " - "requires SPIR-V version 1.4 or later."; + << extension << " extension requires SPIR-V version 1.4 or later."; } } @@ -990,7 +1320,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand X type to be equal to Result Type"; } - uint32_t i_storage_class = 0; + spv::StorageClass i_storage_class; uint32_t i_data_type = 0; if (!_.GetPointerTypeInfo(i_type, &i_data_type, &i_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1045,7 +1375,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand X type to be equal to Result Type"; } - uint32_t exp_storage_class = 0; + spv::StorageClass exp_storage_class; uint32_t exp_data_type = 0; if (!_.GetPointerTypeInfo(exp_type, &exp_data_type, &exp_storage_class)) { @@ -1394,7 +1724,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { case GLSLstd450InterpolateAtCentroid: case GLSLstd450InterpolateAtSample: case GLSLstd450InterpolateAtOffset: { - if (!_.HasCapability(SpvCapabilityInterpolationFunction)) { + if (!_.HasCapability(spv::Capability::InterpolationFunction)) { return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << ext_inst_name() << " requires capability InterpolationFunction"; @@ -1414,11 +1744,11 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { uint32_t interp_id = inst->GetOperandAs(4); auto* interp_inst = _.FindDef(interp_id); uint32_t interpolant_type = (_.options()->before_hlsl_legalization && - interp_inst->opcode() == SpvOpLoad) + interp_inst->opcode() == spv::Op::OpLoad) ? _.GetOperandTypeId(interp_inst, 2) : _.GetOperandTypeId(inst, 4); - uint32_t interpolant_storage_class = 0; + spv::StorageClass interpolant_storage_class; uint32_t interpolant_data_type = 0; if (!_.GetPointerTypeInfo(interpolant_type, &interpolant_data_type, &interpolant_storage_class)) { @@ -1433,7 +1763,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected Interpolant data type to be equal to Result Type"; } - if (interpolant_storage_class != SpvStorageClassInput) { + if (interpolant_storage_class != spv::StorageClass::Input) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected Interpolant storage class to be Input"; @@ -1462,7 +1792,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, ext_inst_name() + std::string(" requires Fragment execution model")); break; @@ -1632,7 +1962,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } const uint32_t p_type = _.GetOperandTypeId(inst, 5); - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1640,10 +1970,10 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected the last operand to be a pointer"; } - if (p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected storage class of the pointer to be Generic, " @@ -1694,7 +2024,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } const uint32_t p_type = _.GetOperandTypeId(inst, operand_index++); - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1702,10 +2032,10 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected the last operand to be a pointer"; } - if (p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected storage class of the pointer to be Generic, " @@ -2224,7 +2554,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "-bit integer for the addressing model used in the module)"; } - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2232,11 +2562,11 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand P to be a pointer"; } - if (p_storage_class != SpvStorageClassUniformConstant && - p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::UniformConstant && + p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand P storage class to be UniformConstant, " @@ -2261,7 +2591,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } case OpenCLLIB::Vstoren: { - if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(result_type) != spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": expected Result Type to be void"; } @@ -2299,7 +2629,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "-bit integer for the addressing model used in the module)"; } - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2307,10 +2637,10 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand P to be a pointer"; } - if (p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand P storage class to be Generic, " @@ -2352,7 +2682,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "-bit integer for the addressing model used in the module)"; } - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2360,11 +2690,11 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand P to be a pointer"; } - if (p_storage_class != SpvStorageClassUniformConstant && - p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::UniformConstant && + p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand P storage class to be UniformConstant, " @@ -2414,7 +2744,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "-bit integer for the addressing model used in the module)"; } - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2422,11 +2752,11 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand P to be a pointer"; } - if (p_storage_class != SpvStorageClassUniformConstant && - p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::UniformConstant && + p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand P storage class to be UniformConstant, " @@ -2456,7 +2786,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { case OpenCLLIB::Vstore_halfn_r: case OpenCLLIB::Vstorea_halfn: case OpenCLLIB::Vstorea_halfn_r: { - if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(result_type) != spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": expected Result Type to be void"; } @@ -2507,7 +2837,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "-bit integer for the addressing model used in the module)"; } - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2515,10 +2845,10 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand P to be a pointer"; } - if (p_storage_class != SpvStorageClassGeneric && - p_storage_class != SpvStorageClassCrossWorkgroup && - p_storage_class != SpvStorageClassWorkgroup && - p_storage_class != SpvStorageClassFunction) { + if (p_storage_class != spv::StorageClass::Generic && + p_storage_class != spv::StorageClass::CrossWorkgroup && + p_storage_class != spv::StorageClass::Workgroup && + p_storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand P storage class to be Generic, " @@ -2623,7 +2953,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } const uint32_t format_type = _.GetOperandTypeId(inst, 4); - uint32_t format_storage_class = 0; + spv::StorageClass format_storage_class; uint32_t format_data_type = 0; if (!_.GetPointerTypeInfo(format_type, &format_data_type, &format_storage_class)) { @@ -2632,7 +2962,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand Format to be a pointer"; } - if (format_storage_class != SpvStorageClassUniformConstant) { + if (format_storage_class != spv::StorageClass::UniformConstant) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected Format storage class to be UniformConstant"; @@ -2648,7 +2978,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } case OpenCLLIB::Prefetch: { - if (_.GetIdOpcode(result_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(result_type) != spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": expected Result Type to be void"; } @@ -2656,7 +2986,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { const uint32_t p_type = _.GetOperandTypeId(inst, 4); const uint32_t num_elements_type = _.GetOperandTypeId(inst, 5); - uint32_t p_storage_class = 0; + spv::StorageClass p_storage_class; uint32_t p_data_type = 0; if (!_.GetPointerTypeInfo(p_type, &p_data_type, &p_storage_class)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2664,7 +2994,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand Ptr to be a pointer"; } - if (p_storage_class != SpvStorageClassCrossWorkgroup) { + if (p_storage_class != spv::StorageClass::CrossWorkgroup) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand Ptr storage class to be CrossWorkgroup"; @@ -2719,6 +3049,86 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto num_words = inst->words().size(); + // Handle any non-common NonSemanticShaderDebugInfo instructions. + if (vulkanDebugInfo) { + const NonSemanticShaderDebugInfo100Instructions ext_inst_key = + NonSemanticShaderDebugInfo100Instructions(ext_inst_index); + switch (ext_inst_key) { + // The following block of instructions will be handled by the common + // validation. + case NonSemanticShaderDebugInfo100DebugInfoNone: + case NonSemanticShaderDebugInfo100DebugCompilationUnit: + case NonSemanticShaderDebugInfo100DebugTypeBasic: + case NonSemanticShaderDebugInfo100DebugTypePointer: + case NonSemanticShaderDebugInfo100DebugTypeQualifier: + case NonSemanticShaderDebugInfo100DebugTypeArray: + case NonSemanticShaderDebugInfo100DebugTypeVector: + case NonSemanticShaderDebugInfo100DebugTypedef: + case NonSemanticShaderDebugInfo100DebugTypeFunction: + case NonSemanticShaderDebugInfo100DebugTypeEnum: + case NonSemanticShaderDebugInfo100DebugTypeComposite: + case NonSemanticShaderDebugInfo100DebugTypeMember: + case NonSemanticShaderDebugInfo100DebugTypeInheritance: + case NonSemanticShaderDebugInfo100DebugTypePtrToMember: + case NonSemanticShaderDebugInfo100DebugTypeTemplate: + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: + case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: + case NonSemanticShaderDebugInfo100DebugGlobalVariable: + case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: + case NonSemanticShaderDebugInfo100DebugFunction: + case NonSemanticShaderDebugInfo100DebugLexicalBlock: + case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: + case NonSemanticShaderDebugInfo100DebugScope: + case NonSemanticShaderDebugInfo100DebugNoScope: + case NonSemanticShaderDebugInfo100DebugInlinedAt: + case NonSemanticShaderDebugInfo100DebugLocalVariable: + case NonSemanticShaderDebugInfo100DebugInlinedVariable: + case NonSemanticShaderDebugInfo100DebugDeclare: + case NonSemanticShaderDebugInfo100DebugValue: + case NonSemanticShaderDebugInfo100DebugOperation: + case NonSemanticShaderDebugInfo100DebugExpression: + case NonSemanticShaderDebugInfo100DebugMacroDef: + case NonSemanticShaderDebugInfo100DebugMacroUndef: + case NonSemanticShaderDebugInfo100DebugImportedEntity: + case NonSemanticShaderDebugInfo100DebugSource: + break; + case NonSemanticShaderDebugInfo100DebugTypeMatrix: { + CHECK_DEBUG_OPERAND("Vector Type", CommonDebugInfoDebugTypeVector, 5); + + CHECK_CONST_UINT_OPERAND("Vector Count", 6); + + uint32_t vector_count = inst->word(6); + uint64_t const_val; + if (!_.EvalConstantValUint64(vector_count, &const_val)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << ext_inst_name() + << ": Vector Count must be 32-bit integer OpConstant"; + } + + vector_count = const_val & 0xffffffff; + if (!vector_count || vector_count > 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << ext_inst_name() << ": Vector Count must be positive " + << "integer less than or equal to 4"; + } + break; + } + // TODO: Add validation rules for remaining cases as well. + case NonSemanticShaderDebugInfo100DebugFunctionDefinition: + case NonSemanticShaderDebugInfo100DebugSourceContinued: + case NonSemanticShaderDebugInfo100DebugLine: + case NonSemanticShaderDebugInfo100DebugNoLine: + case NonSemanticShaderDebugInfo100DebugBuildIdentifier: + case NonSemanticShaderDebugInfo100DebugStoragePath: + case NonSemanticShaderDebugInfo100DebugEntryPoint: + break; + case NonSemanticShaderDebugInfo100InstructionsMax: + assert(0); + break; + } + } + // Handle any non-common OpenCL insts, then common if (ext_inst_type != SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 || OpenCLDebugInfo100Instructions(ext_inst_index) != @@ -2747,27 +3157,27 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugSource: { - CHECK_OPERAND("File", SpvOpString, 5); - if (num_words == 7) CHECK_OPERAND("Text", SpvOpString, 6); + CHECK_OPERAND("File", spv::Op::OpString, 5); + if (num_words == 7) CHECK_OPERAND("Text", spv::Op::OpString, 6); break; } case CommonDebugInfoDebugTypeBasic: { - CHECK_OPERAND("Name", SpvOpString, 5); - CHECK_OPERAND("Size", SpvOpConstant, 6); + CHECK_OPERAND("Name", spv::Op::OpString, 5); + CHECK_OPERAND("Size", spv::Op::OpConstant, 6); CHECK_CONST_UINT_OPERAND("Encoding", 7); break; } case CommonDebugInfoDebugTypePointer: { - auto validate_base_type = - ValidateOperandBaseType(_, inst, 5, ext_inst_name); + auto validate_base_type = ValidateOperandDebugType( + _, "Base Type", inst, 5, ext_inst_name, false); if (validate_base_type != SPV_SUCCESS) return validate_base_type; CHECK_CONST_UINT_OPERAND("Storage Class", 6); CHECK_CONST_UINT_OPERAND("Flags", 7); break; } case CommonDebugInfoDebugTypeQualifier: { - auto validate_base_type = - ValidateOperandBaseType(_, inst, 5, ext_inst_name); + auto validate_base_type = ValidateOperandDebugType( + _, "Base Type", inst, 5, ext_inst_name, false); if (validate_base_type != SPV_SUCCESS) return validate_base_type; CHECK_CONST_UINT_OPERAND("Type Qualifier", 6); break; @@ -2781,7 +3191,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { uint32_t component_count = inst->word(6); if (vulkanDebugInfo) { uint64_t const_val; - if (!_.GetConstantValUint64(component_count, &const_val)) { + if (!_.EvalConstantValUint64(component_count, &const_val)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": Component Count must be 32-bit integer OpConstant"; @@ -2804,8 +3214,9 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { bool invalid = false; auto* component_count = _.FindDef(inst->word(i)); if (IsConstIntScalarTypeWith32Or64Bits(_, component_count)) { - // TODO: We need a spec discussion for the bindless array. - if (!component_count->word(3)) { + // TODO: We need a spec discussion for the runtime array for + // OpenCL. + if (!vulkanDebugInfo && !component_count->word(3)) { invalid = true; } } else if (component_count->words().size() > 6 && @@ -2855,7 +3266,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugTypedef: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); auto validate_base_type = ValidateOperandBaseType(_, inst, 6, ext_inst_name); if (validate_base_type != SPV_SUCCESS) return validate_base_type; @@ -2872,7 +3283,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto* return_type = _.FindDef(inst->word(6)); // TODO: We need a spec discussion that we have to allow return and // parameter types of a DebugTypeFunction to have template parameter. - if (return_type->opcode() != SpvOpTypeVoid) { + if (return_type->opcode() != spv::Op::OpTypeVoid) { auto validate_return = ValidateOperandDebugType( _, "Return Type", inst, 6, ext_inst_name, true); if (validate_return != SPV_SUCCESS) return validate_return; @@ -2885,7 +3296,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugTypeEnum: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); if (!DoesDebugInfoOperandMatchExpectation( _, [](CommonDebugInfoInstructions dbg_inst) { @@ -2903,7 +3314,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto validate_parent = ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); if (validate_parent != SPV_SUCCESS) return validate_parent; - CHECK_OPERAND("Size", SpvOpConstant, 11); + CHECK_OPERAND("Size", spv::Op::OpConstant, 11); auto* size = _.FindDef(inst->word(11)); if (!_.IsIntScalarType(size->type_id()) || !size->word(3)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -2913,27 +3324,27 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { CHECK_CONST_UINT_OPERAND("Flags", 12); for (uint32_t word_index = 13; word_index + 1 < num_words; word_index += 2) { - CHECK_OPERAND("Value", SpvOpConstant, word_index); - CHECK_OPERAND("Name", SpvOpString, word_index + 1); + CHECK_OPERAND("Value", spv::Op::OpConstant, word_index); + CHECK_OPERAND("Name", spv::Op::OpString, word_index + 1); } break; } case CommonDebugInfoDebugTypeComposite: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); CHECK_DEBUG_OPERAND("Source", CommonDebugInfoDebugSource, 7); CHECK_CONST_UINT_OPERAND("Line", 8); CHECK_CONST_UINT_OPERAND("Column", 9); auto validate_parent = ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); if (validate_parent != SPV_SUCCESS) return validate_parent; - CHECK_OPERAND("Linkage Name", SpvOpString, 11); + CHECK_OPERAND("Linkage Name", spv::Op::OpString, 11); if (!DoesDebugInfoOperandMatchExpectation( _, [](CommonDebugInfoInstructions dbg_inst) { return dbg_inst == CommonDebugInfoDebugInfoNone; }, inst, 12)) { - CHECK_OPERAND("Size", SpvOpConstant, 12); + CHECK_OPERAND("Size", spv::Op::OpConstant, 12); } CHECK_CONST_UINT_OPERAND("Flags", 13); for (uint32_t word_index = 14; word_index < num_words; ++word_index) { @@ -2955,7 +3366,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugTypeMember: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); // TODO: We need a spec discussion that we have to allow member types // to have template parameter. auto validate_type = @@ -2966,17 +3377,19 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { CHECK_CONST_UINT_OPERAND("Column", 9); // NonSemantic.Shader.DebugInfo doesn't have the Parent operand if (vulkanDebugInfo) { - CHECK_OPERAND("Offset", SpvOpConstant, 10); - CHECK_OPERAND("Size", SpvOpConstant, 11); + CHECK_OPERAND("Offset", spv::Op::OpConstant, 10); + CHECK_OPERAND("Size", spv::Op::OpConstant, 11); CHECK_CONST_UINT_OPERAND("Flags", 12); - if (num_words == 14) CHECK_OPERAND("Value", SpvOpConstant, 13); + if (num_words == 14) + CHECK_OPERAND("Value", spv::Op::OpConstant, 13); } else { CHECK_DEBUG_OPERAND("Parent", CommonDebugInfoDebugTypeComposite, 10); - CHECK_OPERAND("Offset", SpvOpConstant, 11); - CHECK_OPERAND("Size", SpvOpConstant, 12); + CHECK_OPERAND("Offset", spv::Op::OpConstant, 11); + CHECK_OPERAND("Size", spv::Op::OpConstant, 12); CHECK_CONST_UINT_OPERAND("Flags", 13); - if (num_words == 15) CHECK_OPERAND("Value", SpvOpConstant, 14); + if (num_words == 15) + CHECK_OPERAND("Value", spv::Op::OpConstant, 14); } break; } @@ -3003,13 +3416,13 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { << "expected operand Parent must be class or struct debug " "type"; } - CHECK_OPERAND("Offset", SpvOpConstant, 7); - CHECK_OPERAND("Size", SpvOpConstant, 8); + CHECK_OPERAND("Offset", spv::Op::OpConstant, 7); + CHECK_OPERAND("Size", spv::Op::OpConstant, 8); CHECK_CONST_UINT_OPERAND("Flags", 9); break; } case CommonDebugInfoDebugFunction: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); auto validate_type = ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); if (validate_type != SPV_SUCCESS) return validate_type; @@ -3019,7 +3432,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto validate_parent = ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); if (validate_parent != SPV_SUCCESS) return validate_parent; - CHECK_OPERAND("Linkage Name", SpvOpString, 11); + CHECK_OPERAND("Linkage Name", spv::Op::OpString, 11); CHECK_CONST_UINT_OPERAND("Flags", 12); CHECK_CONST_UINT_OPERAND("Scope Line", 13); // NonSemantic.Shader.DebugInfo.100 doesn't include a reference to the @@ -3036,7 +3449,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { return dbg_inst == CommonDebugInfoDebugInfoNone; }, inst, 14)) { - CHECK_OPERAND("Function", SpvOpFunction, 14); + CHECK_OPERAND("Function", spv::Op::OpFunction, 14); } if (num_words == 16) { CHECK_DEBUG_OPERAND("Declaration", @@ -3046,7 +3459,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugFunctionDeclaration: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); auto validate_type = ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); if (validate_type != SPV_SUCCESS) return validate_type; @@ -3056,7 +3469,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto validate_parent = ValidateOperandLexicalScope(_, "Parent", inst, 10, ext_inst_name); if (validate_parent != SPV_SUCCESS) return validate_parent; - CHECK_OPERAND("Linkage Name", SpvOpString, 11); + CHECK_OPERAND("Linkage Name", spv::Op::OpString, 11); CHECK_CONST_UINT_OPERAND("Flags", 12); break; } @@ -3067,7 +3480,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto validate_parent = ValidateOperandLexicalScope(_, "Parent", inst, 8, ext_inst_name); if (validate_parent != SPV_SUCCESS) return validate_parent; - if (num_words == 10) CHECK_OPERAND("Name", SpvOpString, 9); + if (num_words == 10) CHECK_OPERAND("Name", spv::Op::OpString, 9); break; } case CommonDebugInfoDebugScope: { @@ -3080,7 +3493,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugLocalVariable: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); // TODO: We need a spec discussion that we have to allow local // variable types to have template parameter. auto validate_type = @@ -3102,8 +3515,8 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { CHECK_DEBUG_OPERAND("Local Variable", CommonDebugInfoDebugLocalVariable, 5); auto* operand = _.FindDef(inst->word(6)); - if (operand->opcode() != SpvOpVariable && - operand->opcode() != SpvOpFunctionParameter) { + if (operand->opcode() != spv::Op::OpVariable && + operand->opcode() != spv::Op::OpFunctionParameter) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand Variable must be a result id of " @@ -3165,7 +3578,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugTypeTemplateParameter: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); auto validate_actual_type = ValidateOperandDebugType( _, "Actual Type", inst, 6, ext_inst_name, false); if (validate_actual_type != SPV_SUCCESS) return validate_actual_type; @@ -3175,7 +3588,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { return dbg_inst == CommonDebugInfoDebugInfoNone; }, inst, 7)) { - CHECK_OPERAND("Value", SpvOpConstant, 7); + CHECK_OPERAND("Value", spv::Op::OpConstant, 7); } CHECK_DEBUG_OPERAND("Source", CommonDebugInfoDebugSource, 8); CHECK_CONST_UINT_OPERAND("Line", 9); @@ -3183,7 +3596,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { break; } case CommonDebugInfoDebugGlobalVariable: { - CHECK_OPERAND("Name", SpvOpString, 5); + CHECK_OPERAND("Name", spv::Op::OpString, 5); auto validate_type = ValidateOperandDebugType(_, "Type", inst, 6, ext_inst_name, false); if (validate_type != SPV_SUCCESS) return validate_type; @@ -3193,7 +3606,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { auto validate_scope = ValidateOperandLexicalScope(_, "Scope", inst, 10, ext_inst_name); if (validate_scope != SPV_SUCCESS) return validate_scope; - CHECK_OPERAND("Linkage Name", SpvOpString, 11); + CHECK_OPERAND("Linkage Name", spv::Op::OpString, 11); if (!DoesDebugInfoOperandMatchExpectation( _, [](CommonDebugInfoInstructions dbg_inst) { @@ -3201,8 +3614,8 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { }, inst, 12)) { auto* operand = _.FindDef(inst->word(12)); - if (operand->opcode() != SpvOpVariable && - operand->opcode() != SpvOpConstant) { + if (operand->opcode() != spv::Op::OpVariable && + operand->opcode() != spv::Op::OpConstant) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected operand Variable must be a result id of " @@ -3290,10 +3703,10 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { } spv_result_t ExtensionPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); - if (opcode == SpvOpExtension) return ValidateExtension(_, inst); - if (opcode == SpvOpExtInstImport) return ValidateExtInstImport(_, inst); - if (opcode == SpvOpExtInst) return ValidateExtInst(_, inst); + const spv::Op opcode = inst->opcode(); + if (opcode == spv::Op::OpExtension) return ValidateExtension(_, inst); + if (opcode == spv::Op::OpExtInstImport) return ValidateExtInstImport(_, inst); + if (opcode == spv::Op::OpExtInst) return ValidateExtInst(_, inst); return SPV_SUCCESS; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_function.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_function.cpp index 596186bbe..639817fef 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_function.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_function.cpp @@ -14,6 +14,7 @@ #include +#include "source/enum_string_mapping.h" #include "source/opcode.h" #include "source/val/instruction.h" #include "source/val/validate.h" @@ -28,7 +29,8 @@ namespace { // of the decorations that apply to |a|. bool DoPointeesLogicallyMatch(val::Instruction* a, val::Instruction* b, ValidationState_t& _) { - if (a->opcode() != SpvOpTypePointer || b->opcode() != SpvOpTypePointer) { + if (a->opcode() != spv::Op::OpTypePointer || + b->opcode() != spv::Op::OpTypePointer) { return false; } @@ -56,35 +58,35 @@ bool DoPointeesLogicallyMatch(val::Instruction* a, val::Instruction* b, spv_result_t ValidateFunction(ValidationState_t& _, const Instruction* inst) { const auto function_type_id = inst->GetOperandAs(3); const auto function_type = _.FindDef(function_type_id); - if (!function_type || SpvOpTypeFunction != function_type->opcode()) { + if (!function_type || spv::Op::OpTypeFunction != function_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunction Function Type '" << _.getIdName(function_type_id) - << "' is not a function type."; + << "OpFunction Function Type " << _.getIdName(function_type_id) + << " is not a function type."; } const auto return_id = function_type->GetOperandAs(1); if (return_id != inst->type_id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunction Result Type '" << _.getIdName(inst->type_id()) - << "' does not match the Function Type's return type '" - << _.getIdName(return_id) << "'."; + << "OpFunction Result Type " << _.getIdName(inst->type_id()) + << " does not match the Function Type's return type " + << _.getIdName(return_id) << "."; } - const std::vector acceptable = { - SpvOpGroupDecorate, - SpvOpDecorate, - SpvOpEnqueueKernel, - SpvOpEntryPoint, - SpvOpExecutionMode, - SpvOpExecutionModeId, - SpvOpFunctionCall, - SpvOpGetKernelNDrangeSubGroupCount, - SpvOpGetKernelNDrangeMaxSubGroupSize, - SpvOpGetKernelWorkGroupSize, - SpvOpGetKernelPreferredWorkGroupSizeMultiple, - SpvOpGetKernelLocalSizeForSubgroupCount, - SpvOpGetKernelMaxNumSubgroups, - SpvOpName}; + const std::vector acceptable = { + spv::Op::OpGroupDecorate, + spv::Op::OpDecorate, + spv::Op::OpEnqueueKernel, + spv::Op::OpEntryPoint, + spv::Op::OpExecutionMode, + spv::Op::OpExecutionModeId, + spv::Op::OpFunctionCall, + spv::Op::OpGetKernelNDrangeSubGroupCount, + spv::Op::OpGetKernelNDrangeMaxSubGroupSize, + spv::Op::OpGetKernelWorkGroupSize, + spv::Op::OpGetKernelPreferredWorkGroupSizeMultiple, + spv::Op::OpGetKernelLocalSizeForSubgroupCount, + spv::Op::OpGetKernelMaxNumSubgroups, + spv::Op::OpName}; for (auto& pair : inst->uses()) { const auto* use = pair.first; if (std::find(acceptable.begin(), acceptable.end(), use->opcode()) == @@ -112,14 +114,14 @@ spv_result_t ValidateFunctionParameter(ValidationState_t& _, auto func_inst = &_.ordered_instructions()[inst_num]; while (--inst_num) { func_inst = &_.ordered_instructions()[inst_num]; - if (func_inst->opcode() == SpvOpFunction) { + if (func_inst->opcode() == spv::Op::OpFunction) { break; - } else if (func_inst->opcode() == SpvOpFunctionParameter) { + } else if (func_inst->opcode() == spv::Op::OpFunctionParameter) { ++param_index; } } - if (func_inst->opcode() != SpvOpFunction) { + if (func_inst->opcode() != spv::Op::OpFunction) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Function parameter must be preceded by a function."; } @@ -141,79 +143,79 @@ spv_result_t ValidateFunctionParameter(ValidationState_t& _, _.FindDef(function_type->GetOperandAs(param_index + 2)); if (!param_type || inst->type_id() != param_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunctionParameter Result Type '" + << "OpFunctionParameter Result Type " << _.getIdName(inst->type_id()) - << "' does not match the OpTypeFunction parameter " + << " does not match the OpTypeFunction parameter " "type of the same index."; } - // Validate that PhysicalStorageBufferEXT have one of Restrict, Aliased, - // RestrictPointerEXT, or AliasedPointerEXT. + // Validate that PhysicalStorageBuffer have one of Restrict, Aliased, + // RestrictPointer, or AliasedPointer. auto param_nonarray_type_id = param_type->id(); - while (_.GetIdOpcode(param_nonarray_type_id) == SpvOpTypeArray) { + while (_.GetIdOpcode(param_nonarray_type_id) == spv::Op::OpTypeArray) { param_nonarray_type_id = _.FindDef(param_nonarray_type_id)->GetOperandAs(1u); } - if (_.GetIdOpcode(param_nonarray_type_id) == SpvOpTypePointer) { + if (_.GetIdOpcode(param_nonarray_type_id) == spv::Op::OpTypePointer) { auto param_nonarray_type = _.FindDef(param_nonarray_type_id); - if (param_nonarray_type->GetOperandAs(1u) == - SpvStorageClassPhysicalStorageBufferEXT) { + if (param_nonarray_type->GetOperandAs(1u) == + spv::StorageClass::PhysicalStorageBuffer) { // check for Aliased or Restrict const auto& decorations = _.id_decorations(inst->id()); bool foundAliased = std::any_of( decorations.begin(), decorations.end(), [](const Decoration& d) { - return SpvDecorationAliased == d.dec_type(); + return spv::Decoration::Aliased == d.dec_type(); }); bool foundRestrict = std::any_of( decorations.begin(), decorations.end(), [](const Decoration& d) { - return SpvDecorationRestrict == d.dec_type(); + return spv::Decoration::Restrict == d.dec_type(); }); if (!foundAliased && !foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpFunctionParameter " << inst->id() - << ": expected Aliased or Restrict for PhysicalStorageBufferEXT " + << ": expected Aliased or Restrict for PhysicalStorageBuffer " "pointer."; } if (foundAliased && foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpFunctionParameter " << inst->id() << ": can't specify both Aliased and Restrict for " - "PhysicalStorageBufferEXT pointer."; + "PhysicalStorageBuffer pointer."; } } else { const auto pointee_type_id = param_nonarray_type->GetOperandAs(2); const auto pointee_type = _.FindDef(pointee_type_id); - if (SpvOpTypePointer == pointee_type->opcode() && - pointee_type->GetOperandAs(1u) == - SpvStorageClassPhysicalStorageBufferEXT) { - // check for AliasedPointerEXT/RestrictPointerEXT + if (spv::Op::OpTypePointer == pointee_type->opcode() && + pointee_type->GetOperandAs(1u) == + spv::StorageClass::PhysicalStorageBuffer) { + // check for AliasedPointer/RestrictPointer const auto& decorations = _.id_decorations(inst->id()); bool foundAliased = std::any_of( decorations.begin(), decorations.end(), [](const Decoration& d) { - return SpvDecorationAliasedPointerEXT == d.dec_type(); + return spv::Decoration::AliasedPointer == d.dec_type(); }); bool foundRestrict = std::any_of( decorations.begin(), decorations.end(), [](const Decoration& d) { - return SpvDecorationRestrictPointerEXT == d.dec_type(); + return spv::Decoration::RestrictPointer == d.dec_type(); }); if (!foundAliased && !foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpFunctionParameter " << inst->id() - << ": expected AliasedPointerEXT or RestrictPointerEXT for " - "PhysicalStorageBufferEXT pointer."; + << ": expected AliasedPointer or RestrictPointer for " + "PhysicalStorageBuffer pointer."; } if (foundAliased && foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpFunctionParameter " << inst->id() - << ": can't specify both AliasedPointerEXT and " - "RestrictPointerEXT for PhysicalStorageBufferEXT pointer."; + << ": can't specify both AliasedPointer and " + "RestrictPointer for PhysicalStorageBuffer pointer."; } } } @@ -226,24 +228,23 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _, const Instruction* inst) { const auto function_id = inst->GetOperandAs(2); const auto function = _.FindDef(function_id); - if (!function || SpvOpFunction != function->opcode()) { + if (!function || spv::Op::OpFunction != function->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunctionCall Function '" << _.getIdName(function_id) - << "' is not a function."; + << "OpFunctionCall Function " << _.getIdName(function_id) + << " is not a function."; } auto return_type = _.FindDef(function->type_id()); if (!return_type || return_type->id() != inst->type_id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunctionCall Result Type '" - << _.getIdName(inst->type_id()) - << "'s type does not match Function '" - << _.getIdName(return_type->id()) << "'s return type."; + << "OpFunctionCall Result Type " << _.getIdName(inst->type_id()) + << "s type does not match Function " + << _.getIdName(return_type->id()) << "s return type."; } const auto function_type_id = function->GetOperandAs(3); const auto function_type = _.FindDef(function_type_id); - if (!function_type || function_type->opcode() != SpvOpTypeFunction) { + if (!function_type || function_type->opcode() != spv::Op::OpTypeFunction) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Missing function type definition."; } @@ -280,27 +281,28 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _, if (!_.options()->before_hlsl_legalization || !DoPointeesLogicallyMatch(argument_type, parameter_type, _)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpFunctionCall Argument '" << _.getIdName(argument_id) - << "'s type does not match Function '" - << _.getIdName(parameter_type_id) << "'s parameter type."; + << "OpFunctionCall Argument " << _.getIdName(argument_id) + << "s type does not match Function " + << _.getIdName(parameter_type_id) << "s parameter type."; } } - if (_.addressing_model() == SpvAddressingModelLogical) { - if (parameter_type->opcode() == SpvOpTypePointer && + if (_.addressing_model() == spv::AddressingModel::Logical) { + if (parameter_type->opcode() == spv::Op::OpTypePointer && !_.options()->relax_logical_pointer) { - SpvStorageClass sc = parameter_type->GetOperandAs(1u); + spv::StorageClass sc = + parameter_type->GetOperandAs(1u); // Validate which storage classes can be pointer operands. switch (sc) { - case SpvStorageClassUniformConstant: - case SpvStorageClassFunction: - case SpvStorageClassPrivate: - case SpvStorageClassWorkgroup: - case SpvStorageClassAtomicCounter: + case spv::StorageClass::UniformConstant: + case spv::StorageClass::Function: + case spv::StorageClass::Private: + case spv::StorageClass::Workgroup: + case spv::StorageClass::AtomicCounter: // These are always allowed. break; - case SpvStorageClassStorageBuffer: - if (!_.features().variable_pointers_storage_buffer) { + case spv::StorageClass::StorageBuffer: + if (!_.features().variable_pointers) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "StorageBuffer pointer operand " << _.getIdName(argument_id) @@ -314,14 +316,14 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _, } // Validate memory object declaration requirements. - if (argument->opcode() != SpvOpVariable && - argument->opcode() != SpvOpFunctionParameter) { - const bool ssbo_vptr = - _.features().variable_pointers_storage_buffer && - sc == SpvStorageClassStorageBuffer; + if (argument->opcode() != spv::Op::OpVariable && + argument->opcode() != spv::Op::OpFunctionParameter) { + const bool ssbo_vptr = _.features().variable_pointers && + sc == spv::StorageClass::StorageBuffer; const bool wg_vptr = - _.features().variable_pointers && sc == SpvStorageClassWorkgroup; - const bool uc_ptr = sc == SpvStorageClassUniformConstant; + _.HasCapability(spv::Capability::VariablePointers) && + sc == spv::StorageClass::Workgroup; + const bool uc_ptr = sc == spv::StorageClass::UniformConstant; if (!ssbo_vptr && !wg_vptr && !uc_ptr) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Pointer operand " << _.getIdName(argument_id) @@ -338,13 +340,13 @@ spv_result_t ValidateFunctionCall(ValidationState_t& _, spv_result_t FunctionPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpFunction: + case spv::Op::OpFunction: if (auto error = ValidateFunction(_, inst)) return error; break; - case SpvOpFunctionParameter: + case spv::Op::OpFunctionParameter: if (auto error = ValidateFunctionParameter(_, inst)) return error; break; - case SpvOpFunctionCall: + case spv::Op::OpFunctionCall: if (auto error = ValidateFunctionCall(_, inst)) return error; break; default: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_id.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_id.cpp index 2bab20349..bcfeb5915 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_id.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_id.cpp @@ -12,25 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "source/val/validate.h" - -#include - -#include -#include -#include -#include -#include #include -#include #include -#include "source/diagnostic.h" #include "source/instruction.h" #include "source/opcode.h" #include "source/operand.h" -#include "source/spirv_validator_options.h" #include "source/val/function.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" #include "spirv-tools/libspirv.h" @@ -71,7 +60,7 @@ spv_result_t CheckIdDefinitionDominateUse(ValidationState_t& _) { const Instruction* use = use_index_pair.first; if (const BasicBlock* use_block = use->block()) { if (use_block->reachable() == false) continue; - if (use->opcode() == SpvOpPhi) { + if (use->opcode() == spv::Op::OpPhi) { if (phi_ids.insert(use->id()).second) { phi_instructions.push_back(use); } @@ -131,7 +120,7 @@ spv_result_t CheckIdDefinitionDominateUse(ValidationState_t& _) { // instruction operand's ID can be forward referenced. spv_result_t IdPass(ValidationState_t& _, Instruction* inst) { auto can_have_forward_declared_ids = - inst->opcode() == SpvOpExtInst && + inst->opcode() == spv::Op::OpExtInst && spvExtInstIsDebugInfo(inst->ext_inst_type()) ? spvDbgInfoExtOperandCanBeForwardDeclaredFunction( inst->ext_inst_type(), inst->word(4)) @@ -172,23 +161,33 @@ spv_result_t IdPass(ValidationState_t& _, Instruction* inst) { if (spvOpcodeGeneratesType(def->opcode()) && !spvOpcodeGeneratesType(opcode) && !spvOpcodeIsDebug(opcode) && !inst->IsDebugInfo() && !inst->IsNonSemantic() && - !spvOpcodeIsDecoration(opcode) && opcode != SpvOpFunction && - opcode != SpvOpCooperativeMatrixLengthNV && - !(opcode == SpvOpSpecConstantOp && - inst->word(3) == SpvOpCooperativeMatrixLengthNV)) { + !spvOpcodeIsDecoration(opcode) && opcode != spv::Op::OpFunction && + opcode != spv::Op::OpCooperativeMatrixLengthNV && + opcode != spv::Op::OpCooperativeMatrixLengthKHR && + !(opcode == spv::Op::OpSpecConstantOp && + (spv::Op(inst->word(3)) == + spv::Op::OpCooperativeMatrixLengthNV || + spv::Op(inst->word(3)) == + spv::Op::OpCooperativeMatrixLengthKHR))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Operand " << _.getIdName(operand_word) << " cannot be a type"; } else if (def->type_id() == 0 && !spvOpcodeGeneratesType(opcode) && !spvOpcodeIsDebug(opcode) && !inst->IsDebugInfo() && !inst->IsNonSemantic() && !spvOpcodeIsDecoration(opcode) && - !spvOpcodeIsBranch(opcode) && opcode != SpvOpPhi && - opcode != SpvOpExtInst && opcode != SpvOpExtInstImport && - opcode != SpvOpSelectionMerge && - opcode != SpvOpLoopMerge && opcode != SpvOpFunction && - opcode != SpvOpCooperativeMatrixLengthNV && - !(opcode == SpvOpSpecConstantOp && - inst->word(3) == SpvOpCooperativeMatrixLengthNV)) { + !spvOpcodeIsBranch(opcode) && opcode != spv::Op::OpPhi && + opcode != spv::Op::OpExtInst && + opcode != spv::Op::OpExtInstImport && + opcode != spv::Op::OpSelectionMerge && + opcode != spv::Op::OpLoopMerge && + opcode != spv::Op::OpFunction && + opcode != spv::Op::OpCooperativeMatrixLengthNV && + opcode != spv::Op::OpCooperativeMatrixLengthKHR && + !(opcode == spv::Op::OpSpecConstantOp && + (spv::Op(inst->word(3)) == + spv::Op::OpCooperativeMatrixLengthNV || + spv::Op(inst->word(3)) == + spv::Op::OpCooperativeMatrixLengthKHR))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Operand " << _.getIdName(operand_word) << " requires a type"; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_image.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_image.cpp index 037fab69f..a1a76ea27 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_image.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_image.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Google Inc. +// Copyright (c) 2017 Google Inc. // Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights // reserved. // @@ -18,7 +18,6 @@ #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" @@ -32,47 +31,47 @@ namespace spvtools { namespace val { namespace { -// Performs compile time check that all SpvImageOperandsXXX cases are handled in -// this module. If SpvImageOperandsXXX list changes, this function will fail the -// build. -// For all other purposes this is a placeholder function. +// Performs compile time check that all spv::ImageOperandsMask::XXX cases are +// handled in this module. If spv::ImageOperandsMask::XXX list changes, this +// function will fail the build. For all other purposes this is a placeholder +// function. bool CheckAllImageOperandsHandled() { - SpvImageOperandsMask enum_val = SpvImageOperandsBiasMask; + spv::ImageOperandsMask enum_val = spv::ImageOperandsMask::Bias; // Some improvised code to prevent the compiler from considering enum_val // constant and optimizing the switch away. uint32_t stack_var = 0; if (reinterpret_cast(&stack_var) % 256) - enum_val = SpvImageOperandsLodMask; + enum_val = spv::ImageOperandsMask::Lod; switch (enum_val) { // Please update the validation rules in this module if you are changing // the list of image operands, and add new enum values to this switch. - case SpvImageOperandsMaskNone: + case spv::ImageOperandsMask::MaskNone: return false; - case SpvImageOperandsBiasMask: - case SpvImageOperandsLodMask: - case SpvImageOperandsGradMask: - case SpvImageOperandsConstOffsetMask: - case SpvImageOperandsOffsetMask: - case SpvImageOperandsConstOffsetsMask: - case SpvImageOperandsSampleMask: - case SpvImageOperandsMinLodMask: + case spv::ImageOperandsMask::Bias: + case spv::ImageOperandsMask::Lod: + case spv::ImageOperandsMask::Grad: + case spv::ImageOperandsMask::ConstOffset: + case spv::ImageOperandsMask::Offset: + case spv::ImageOperandsMask::ConstOffsets: + case spv::ImageOperandsMask::Sample: + case spv::ImageOperandsMask::MinLod: // TODO(dneto): Support image operands related to the Vulkan memory model. // https://gitlab.khronos.org/spirv/spirv-tools/issues/32 - case SpvImageOperandsMakeTexelAvailableKHRMask: - case SpvImageOperandsMakeTexelVisibleKHRMask: - case SpvImageOperandsNonPrivateTexelKHRMask: - case SpvImageOperandsVolatileTexelKHRMask: - case SpvImageOperandsSignExtendMask: - case SpvImageOperandsZeroExtendMask: + case spv::ImageOperandsMask::MakeTexelAvailableKHR: + case spv::ImageOperandsMask::MakeTexelVisibleKHR: + case spv::ImageOperandsMask::NonPrivateTexelKHR: + case spv::ImageOperandsMask::VolatileTexelKHR: + case spv::ImageOperandsMask::SignExtend: + case spv::ImageOperandsMask::ZeroExtend: // TODO(jaebaek): Move this line properly after handling image offsets // operand. This line temporarily fixes CI failure that // blocks other PRs. // https://github.com/KhronosGroup/SPIRV-Tools/issues/4565 - case SpvImageOperandsOffsetsMask: - case SpvImageOperandsNontemporalMask: + case spv::ImageOperandsMask::Offsets: + case spv::ImageOperandsMask::Nontemporal: return true; } return false; @@ -81,13 +80,13 @@ bool CheckAllImageOperandsHandled() { // Used by GetImageTypeInfo. See OpTypeImage spec for more information. struct ImageTypeInfo { uint32_t sampled_type = 0; - SpvDim dim = SpvDimMax; + spv::Dim dim = spv::Dim::Max; uint32_t depth = 0; uint32_t arrayed = 0; uint32_t multisampled = 0; uint32_t sampled = 0; - SpvImageFormat format = SpvImageFormatMax; - SpvAccessQualifier access_qualifier = SpvAccessQualifierMax; + spv::ImageFormat format = spv::ImageFormat::Max; + spv::AccessQualifier access_qualifier = spv::AccessQualifier::Max; }; // Provides information on image type. |id| should be object of either @@ -100,39 +99,39 @@ bool GetImageTypeInfo(const ValidationState_t& _, uint32_t id, const Instruction* inst = _.FindDef(id); assert(inst); - if (inst->opcode() == SpvOpTypeSampledImage) { + if (inst->opcode() == spv::Op::OpTypeSampledImage) { inst = _.FindDef(inst->word(2)); assert(inst); } - if (inst->opcode() != SpvOpTypeImage) return false; + if (inst->opcode() != spv::Op::OpTypeImage) return false; const size_t num_words = inst->words().size(); if (num_words != 9 && num_words != 10) return false; info->sampled_type = inst->word(2); - info->dim = static_cast(inst->word(3)); + info->dim = static_cast(inst->word(3)); info->depth = inst->word(4); info->arrayed = inst->word(5); info->multisampled = inst->word(6); info->sampled = inst->word(7); - info->format = static_cast(inst->word(8)); - info->access_qualifier = num_words < 10 - ? SpvAccessQualifierMax - : static_cast(inst->word(9)); + info->format = static_cast(inst->word(8)); + info->access_qualifier = + num_words < 10 ? spv::AccessQualifier::Max + : static_cast(inst->word(9)); return true; } -bool IsImplicitLod(SpvOp opcode) { +bool IsImplicitLod(spv::Op opcode) { switch (opcode) { - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: return true; default: break; @@ -140,16 +139,16 @@ bool IsImplicitLod(SpvOp opcode) { return false; } -bool IsExplicitLod(SpvOp opcode) { +bool IsExplicitLod(spv::Op opcode) { switch (opcode) { - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: return true; default: break; @@ -157,22 +156,22 @@ bool IsExplicitLod(SpvOp opcode) { return false; } -bool IsValidLodOperand(const ValidationState_t& _, SpvOp opcode) { +bool IsValidLodOperand(const ValidationState_t& _, spv::Op opcode) { switch (opcode) { - case SpvOpImageRead: - case SpvOpImageWrite: - case SpvOpImageSparseRead: - return _.HasCapability(SpvCapabilityImageReadWriteLodAMD); + case spv::Op::OpImageRead: + case spv::Op::OpImageWrite: + case spv::Op::OpImageSparseRead: + return _.HasCapability(spv::Capability::ImageReadWriteLodAMD); default: return IsExplicitLod(opcode); } } -bool IsValidGatherLodBiasAMD(const ValidationState_t& _, SpvOp opcode) { +bool IsValidGatherLodBiasAMD(const ValidationState_t& _, spv::Op opcode) { switch (opcode) { - case SpvOpImageGather: - case SpvOpImageSparseGather: - return _.HasCapability(SpvCapabilityImageGatherBiasLodAMD); + case spv::Op::OpImageGather: + case spv::Op::OpImageSparseGather: + return _.HasCapability(spv::Capability::ImageGatherBiasLodAMD); default: break; } @@ -181,16 +180,16 @@ bool IsValidGatherLodBiasAMD(const ValidationState_t& _, SpvOp opcode) { // Returns true if the opcode is a Image instruction which applies // homogenous projection to the coordinates. -bool IsProj(SpvOp opcode) { +bool IsProj(spv::Op opcode) { switch (opcode) { - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: return true; default: break; @@ -204,21 +203,23 @@ uint32_t GetPlaneCoordSize(const ImageTypeInfo& info) { uint32_t plane_size = 0; // If this switch breaks your build, please add new values below. switch (info.dim) { - case SpvDim1D: - case SpvDimBuffer: + case spv::Dim::Dim1D: + case spv::Dim::Buffer: plane_size = 1; break; - case SpvDim2D: - case SpvDimRect: - case SpvDimSubpassData: + case spv::Dim::Dim2D: + case spv::Dim::Rect: + case spv::Dim::SubpassData: + case spv::Dim::TileImageDataEXT: plane_size = 2; break; - case SpvDim3D: - case SpvDimCube: + case spv::Dim::Dim3D: + case spv::Dim::Cube: // For Cube direction vector is used instead of UV. plane_size = 3; break; - case SpvDimMax: + case spv::Dim::Max: + default: assert(0); break; } @@ -228,10 +229,10 @@ uint32_t GetPlaneCoordSize(const ImageTypeInfo& info) { // Returns minimal number of coordinates based on image dim, arrayed and whether // the instruction uses projection coordinates. -uint32_t GetMinCoordSize(SpvOp opcode, const ImageTypeInfo& info) { - if (info.dim == SpvDimCube && - (opcode == SpvOpImageRead || opcode == SpvOpImageWrite || - opcode == SpvOpImageSparseRead)) { +uint32_t GetMinCoordSize(spv::Op opcode, const ImageTypeInfo& info) { + if (info.dim == spv::Dim::Cube && + (opcode == spv::Op::OpImageRead || opcode == spv::Op::OpImageWrite || + opcode == spv::Op::OpImageSparseRead)) { // These opcodes use UV for Cube, not direction vector. return 3; } @@ -248,7 +249,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, static const bool kAllImageOperandsHandled = CheckAllImageOperandsHandled(); (void)kAllImageOperandsHandled; - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const size_t num_words = inst->words().size(); const bool have_explicit_mask = (word_index - 1 < num_words); @@ -257,13 +258,14 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, if (have_explicit_mask) { // NonPrivate, Volatile, SignExtend, ZeroExtend take no operand words. const uint32_t mask_bits_having_operands = - mask & ~uint32_t(SpvImageOperandsNonPrivateTexelKHRMask | - SpvImageOperandsVolatileTexelKHRMask | - SpvImageOperandsSignExtendMask | - SpvImageOperandsZeroExtendMask); + mask & ~uint32_t(spv::ImageOperandsMask::NonPrivateTexelKHR | + spv::ImageOperandsMask::VolatileTexelKHR | + spv::ImageOperandsMask::SignExtend | + spv::ImageOperandsMask::ZeroExtend | + spv::ImageOperandsMask::Nontemporal); size_t expected_num_image_operand_words = spvtools::utils::CountSetBits(mask_bits_having_operands); - if (mask & SpvImageOperandsGradMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Grad)) { // Grad uses two words. ++expected_num_image_operand_words; } @@ -278,7 +280,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, << "Number of image operand ids doesn't correspond to the bit mask"; } - if (info.multisampled & (0 == (mask & SpvImageOperandsSampleMask))) { + if (info.multisampled & + (0 == (mask & uint32_t(spv::ImageOperandsMask::Sample)))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Sample is required for operation on " "multi-sampled image"; @@ -288,12 +291,12 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // the module to be invalid. if (mask == 0) return SPV_SUCCESS; - if (spvtools::utils::CountSetBits(mask & (SpvImageOperandsOffsetMask | - SpvImageOperandsConstOffsetMask | - SpvImageOperandsConstOffsetsMask | - SpvImageOperandsOffsetsMask)) > 1) { + if (spvtools::utils::CountSetBits( + mask & uint32_t(spv::ImageOperandsMask::Offset | + spv::ImageOperandsMask::ConstOffset | + spv::ImageOperandsMask::ConstOffsets | + spv::ImageOperandsMask::Offsets)) > 1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << _.VkErrorID(4662) << "Image Operands Offset, ConstOffset, ConstOffsets, Offsets " "cannot be used together"; } @@ -305,7 +308,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // The checks should be done in the order of definition of OperandImage. - if (mask & SpvImageOperandsBiasMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Bias)) { if (!is_implicit_lod && !is_valid_gather_lod_bias_amd) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Bias can only be used with ImplicitLod opcodes"; @@ -317,8 +320,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, << "Expected Image Operand Bias to be float scalar"; } - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimCube) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Bias requires 'Dim' parameter to be 1D, 2D, 3D " "or Cube"; @@ -327,15 +330,16 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // Multisampled is already checked. } - if (mask & SpvImageOperandsLodMask) { - if (!is_valid_lod_operand && opcode != SpvOpImageFetch && - opcode != SpvOpImageSparseFetch && !is_valid_gather_lod_bias_amd) { + if (mask & uint32_t(spv::ImageOperandsMask::Lod)) { + if (!is_valid_lod_operand && opcode != spv::Op::OpImageFetch && + opcode != spv::Op::OpImageSparseFetch && + !is_valid_gather_lod_bias_amd) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Lod can only be used with ExplicitLod opcodes " << "and OpImageFetch"; } - if (mask & SpvImageOperandsGradMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Grad)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand bits Lod and Grad cannot be set at the same " "time"; @@ -356,8 +360,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimCube) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Lod requires 'Dim' parameter to be 1D, 2D, 3D " "or Cube"; @@ -366,7 +370,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // Multisampled is already checked. } - if (mask & SpvImageOperandsGradMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Grad)) { if (!is_explicit_lod) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Grad can only be used with ExplicitLod opcodes"; @@ -399,8 +403,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // Multisampled is already checked. } - if (mask & SpvImageOperandsConstOffsetMask) { - if (info.dim == SpvDimCube) { + if (mask & uint32_t(spv::ImageOperandsMask::ConstOffset)) { + if (info.dim == spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand ConstOffset cannot be used with Cube Image " "'Dim'"; @@ -428,8 +432,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (mask & SpvImageOperandsOffsetMask) { - if (info.dim == SpvDimCube) { + if (mask & uint32_t(spv::ImageOperandsMask::Offset)) { + if (info.dim == spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Offset cannot be used with Cube Image 'Dim'"; } @@ -452,9 +456,10 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, if (!_.options()->before_hlsl_legalization && spvIsVulkanEnv(_.context()->target_env)) { - if (opcode != SpvOpImageGather && opcode != SpvOpImageDrefGather && - opcode != SpvOpImageSparseGather && - opcode != SpvOpImageSparseDrefGather) { + if (opcode != spv::Op::OpImageGather && + opcode != spv::Op::OpImageDrefGather && + opcode != spv::Op::OpImageSparseGather && + opcode != spv::Op::OpImageSparseDrefGather) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4663) << "Image Operand Offset can only be used with " @@ -463,16 +468,17 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (mask & SpvImageOperandsConstOffsetsMask) { - if (opcode != SpvOpImageGather && opcode != SpvOpImageDrefGather && - opcode != SpvOpImageSparseGather && - opcode != SpvOpImageSparseDrefGather) { + if (mask & uint32_t(spv::ImageOperandsMask::ConstOffsets)) { + if (opcode != spv::Op::OpImageGather && + opcode != spv::Op::OpImageDrefGather && + opcode != spv::Op::OpImageSparseGather && + opcode != spv::Op::OpImageSparseDrefGather) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand ConstOffsets can only be used with " "OpImageGather and OpImageDrefGather"; } - if (info.dim == SpvDimCube) { + if (info.dim == spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand ConstOffsets cannot be used with Cube Image " "'Dim'"; @@ -483,13 +489,13 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, const Instruction* type_inst = _.FindDef(type_id); assert(type_inst); - if (type_inst->opcode() != SpvOpTypeArray) { + if (type_inst->opcode() != spv::Op::OpTypeArray) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image Operand ConstOffsets to be an array of size 4"; } uint64_t array_size = 0; - if (!_.GetConstantValUint64(type_inst->word(3), &array_size)) { + if (!_.EvalConstantValUint64(type_inst->word(3), &array_size)) { assert(0 && "Array type definition is corrupt"); } @@ -502,7 +508,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, if (!_.IsIntVectorType(component_type) || _.GetDimension(component_type) != 2) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image Operand ConstOffsets array componenets to be " + << "Expected Image Operand ConstOffsets array components to be " "int vectors of size 2"; } @@ -512,10 +518,11 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (mask & SpvImageOperandsSampleMask) { - if (opcode != SpvOpImageFetch && opcode != SpvOpImageRead && - opcode != SpvOpImageWrite && opcode != SpvOpImageSparseFetch && - opcode != SpvOpImageSparseRead) { + if (mask & uint32_t(spv::ImageOperandsMask::Sample)) { + if (opcode != spv::Op::OpImageFetch && opcode != spv::Op::OpImageRead && + opcode != spv::Op::OpImageWrite && + opcode != spv::Op::OpImageSparseFetch && + opcode != spv::Op::OpImageSparseRead) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand Sample can only be used with OpImageFetch, " << "OpImageRead, OpImageWrite, OpImageSparseFetch and " @@ -534,8 +541,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (mask & SpvImageOperandsMinLodMask) { - if (!is_implicit_lod && !(mask & SpvImageOperandsGradMask)) { + if (mask & uint32_t(spv::ImageOperandsMask::MinLod)) { + if (!is_implicit_lod && !(mask & uint32_t(spv::ImageOperandsMask::Grad))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MinLod can only be used with ImplicitLod " << "opcodes or together with Image Operand Grad"; @@ -547,8 +554,8 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, << "Expected Image Operand MinLod to be float scalar"; } - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimCube) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MinLod requires 'Dim' parameter to be 1D, 2D, " "3D or Cube"; @@ -560,16 +567,16 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, } } - if (mask & SpvImageOperandsMakeTexelAvailableKHRMask) { + if (mask & uint32_t(spv::ImageOperandsMask::MakeTexelAvailableKHR)) { // Checked elsewhere: capability and memory model are correct. - if (opcode != SpvOpImageWrite) { + if (opcode != spv::Op::OpImageWrite) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MakeTexelAvailableKHR can only be used with Op" - << spvOpcodeString(SpvOpImageWrite) << ": Op" + << spvOpcodeString(spv::Op::OpImageWrite) << ": Op" << spvOpcodeString(opcode); } - if (!(mask & SpvImageOperandsNonPrivateTexelKHRMask)) { + if (!(mask & uint32_t(spv::ImageOperandsMask::NonPrivateTexelKHR))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MakeTexelAvailableKHR requires " "NonPrivateTexelKHR is also specified: Op" @@ -581,17 +588,18 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, return error; } - if (mask & SpvImageOperandsMakeTexelVisibleKHRMask) { + if (mask & uint32_t(spv::ImageOperandsMask::MakeTexelVisibleKHR)) { // Checked elsewhere: capability and memory model are correct. - if (opcode != SpvOpImageRead && opcode != SpvOpImageSparseRead) { + if (opcode != spv::Op::OpImageRead && + opcode != spv::Op::OpImageSparseRead) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MakeTexelVisibleKHR can only be used with Op" - << spvOpcodeString(SpvOpImageRead) << " or Op" - << spvOpcodeString(SpvOpImageSparseRead) << ": Op" + << spvOpcodeString(spv::Op::OpImageRead) << " or Op" + << spvOpcodeString(spv::Op::OpImageSparseRead) << ": Op" << spvOpcodeString(opcode); } - if (!(mask & SpvImageOperandsNonPrivateTexelKHRMask)) { + if (!(mask & uint32_t(spv::ImageOperandsMask::NonPrivateTexelKHR))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Operand MakeTexelVisibleKHR requires NonPrivateTexelKHR " "is also specified: Op" @@ -602,7 +610,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, if (auto error = ValidateMemoryScope(_, inst, visible_scope)) return error; } - if (mask & SpvImageOperandsSignExtendMask) { + if (mask & uint32_t(spv::ImageOperandsMask::SignExtend)) { // Checked elsewhere: SPIR-V 1.4 version or later. // "The texel value is converted to the target value via sign extension. @@ -615,7 +623,7 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // setup. } - if (mask & SpvImageOperandsZeroExtendMask) { + if (mask & uint32_t(spv::ImageOperandsMask::ZeroExtend)) { // Checked elsewhere: SPIR-V 1.4 version or later. // "The texel value is converted to the target value via zero extension. @@ -628,97 +636,93 @@ spv_result_t ValidateImageOperands(ValidationState_t& _, // setup. } - if (mask & SpvImageOperandsOffsetsMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Offsets)) { // TODO: add validation } - if (mask & SpvImageOperandsNontemporalMask) { + if (mask & uint32_t(spv::ImageOperandsMask::Nontemporal)) { // Checked elsewhere: SPIR-V 1.6 version or later. } return SPV_SUCCESS; } -// Checks some of the validation rules which are common to multiple opcodes. -spv_result_t ValidateImageCommon(ValidationState_t& _, const Instruction* inst, - const ImageTypeInfo& info) { - const SpvOp opcode = inst->opcode(); - if (IsProj(opcode)) { - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimRect) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'Dim' parameter to be 1D, 2D, 3D or Rect"; - } +// Validate OpImage*Proj* instructions +spv_result_t ValidateImageProj(ValidationState_t& _, const Instruction* inst, + const ImageTypeInfo& info) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Rect) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Image 'Dim' parameter to be 1D, 2D, 3D or Rect"; + } - if (info.multisampled != 0) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'MS' parameter to be 0"; - } + if (info.multisampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Image 'MS' parameter to be 0"; + } - if (info.arrayed != 0) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'arrayed' parameter to be 0"; - } + if (info.arrayed != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Image 'arrayed' parameter to be 0"; } - if (opcode == SpvOpImageRead || opcode == SpvOpImageSparseRead || - opcode == SpvOpImageWrite) { - if (info.sampled == 0) { - } else if (info.sampled == 2) { - if (info.dim == SpvDim1D && !_.HasCapability(SpvCapabilityImage1D)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability Image1D is required to access storage image"; - } else if (info.dim == SpvDimRect && - !_.HasCapability(SpvCapabilityImageRect)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability ImageRect is required to access storage image"; - } else if (info.dim == SpvDimBuffer && - !_.HasCapability(SpvCapabilityImageBuffer)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability ImageBuffer is required to access storage image"; - } else if (info.dim == SpvDimCube && info.arrayed == 1 && - !_.HasCapability(SpvCapabilityImageCubeArray)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability ImageCubeArray is required to access " - << "storage image"; - } + return SPV_SUCCESS; +} - if (info.multisampled == 1 && - !_.HasCapability(SpvCapabilityImageMSArray)) { -#if 0 - // TODO(atgoo@github.com) The description of this rule in the spec - // is unclear and Glslang doesn't declare ImageMSArray. Need to clarify - // and reenable. - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability ImageMSArray is required to access storage " - << "image"; -#endif - } - } else { +// Validate OpImage*Read and OpImage*Write instructions +spv_result_t ValidateImageReadWrite(ValidationState_t& _, + const Instruction* inst, + const ImageTypeInfo& info) { + if (info.sampled == 2) { + if (info.dim == spv::Dim::Dim1D && + !_.HasCapability(spv::Capability::Image1D)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Capability Image1D is required to access storage image"; + } else if (info.dim == spv::Dim::Rect && + !_.HasCapability(spv::Capability::ImageRect)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'Sampled' parameter to be 0 or 2"; + << "Capability ImageRect is required to access storage image"; + } else if (info.dim == spv::Dim::Buffer && + !_.HasCapability(spv::Capability::ImageBuffer)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Capability ImageBuffer is required to access storage image"; + } else if (info.dim == spv::Dim::Cube && info.arrayed == 1 && + !_.HasCapability(spv::Capability::ImageCubeArray)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Capability ImageCubeArray is required to access " + << "storage image"; } + + if (info.multisampled == 1 && info.arrayed == 1 && info.sampled == 2 && + !_.HasCapability(spv::Capability::ImageMSArray)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Capability ImageMSArray is required to access storage " + << "image"; + } + } else if (info.sampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Image 'Sampled' parameter to be 0 or 2"; } return SPV_SUCCESS; } // Returns true if opcode is *ImageSparse*, false otherwise. -bool IsSparse(SpvOp opcode) { +bool IsSparse(spv::Op opcode) { switch (opcode) { - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: - case SpvOpImageSparseFetch: - case SpvOpImageSparseGather: - case SpvOpImageSparseDrefGather: - case SpvOpImageSparseTexelsResident: - case SpvOpImageSparseRead: { + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseFetch: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: + case spv::Op::OpImageSparseTexelsResident: + case spv::Op::OpImageSparseRead: { return true; } @@ -733,13 +737,13 @@ bool IsSparse(SpvOp opcode) { // Not valid for sparse image opcodes which do not return a struct. spv_result_t GetActualResultType(ValidationState_t& _, const Instruction* inst, uint32_t* actual_result_type) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); if (IsSparse(opcode)) { const Instruction* const type_inst = _.FindDef(inst->type_id()); assert(type_inst); - if (!type_inst || type_inst->opcode() != SpvOpTypeStruct) { + if (!type_inst || type_inst->opcode() != spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypeStruct"; } @@ -761,7 +765,7 @@ spv_result_t GetActualResultType(ValidationState_t& _, const Instruction* inst, // Returns a string describing actual result type of an opcode. // Not valid for sparse image opcodes which do not return a struct. -const char* GetActualResultTypeStr(SpvOp opcode) { +const char* GetActualResultTypeStr(spv::Op opcode) { if (IsSparse(opcode)) return "Result Type's second member"; return "Result Type"; } @@ -777,7 +781,7 @@ spv_result_t ValidateTypeImage(ValidationState_t& _, const Instruction* inst) { if (_.IsIntScalarType(info.sampled_type) && (64 == _.GetBitWidth(info.sampled_type)) && - !_.HasCapability(SpvCapabilityInt64ImageEXT)) { + !_.HasCapability(spv::Capability::Int64ImageEXT)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Capability Int64ImageEXT is required when using Sampled Type of " "64-bit int"; @@ -802,17 +806,18 @@ spv_result_t ValidateTypeImage(ValidationState_t& _, const Instruction* inst) { << "Sampled Type must be OpTypeVoid in the OpenCL environment."; } } else { - const SpvOp sampled_type_opcode = _.GetIdOpcode(info.sampled_type); - if (sampled_type_opcode != SpvOpTypeVoid && - sampled_type_opcode != SpvOpTypeInt && - sampled_type_opcode != SpvOpTypeFloat) { + const spv::Op sampled_type_opcode = _.GetIdOpcode(info.sampled_type); + if (sampled_type_opcode != spv::Op::OpTypeVoid && + sampled_type_opcode != spv::Op::OpTypeInt && + sampled_type_opcode != spv::Op::OpTypeFloat) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sampled Type to be either void or" << " numerical scalar type"; } } - // Dim is checked elsewhere. + // Universal checks on image type operands + // Dim and Format and Access Qualifier are checked elsewhere. if (info.depth > 2) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -824,75 +829,100 @@ spv_result_t ValidateTypeImage(ValidationState_t& _, const Instruction* inst) { << "Invalid Arrayed " << info.arrayed << " (must be 0 or 1)"; } - if (spvIsOpenCLEnv(target_env)) { - if ((info.arrayed == 1) && (info.dim != SpvDim1D) && - (info.dim != SpvDim2D)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "In the OpenCL environment, Arrayed may only be set to 1 " - << "when Dim is either 1D or 2D."; - } - } - if (info.multisampled > 1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Invalid MS " << info.multisampled << " (must be 0 or 1)"; } - if (spvIsOpenCLEnv(target_env)) { - if (info.multisampled != 0) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "MS must be 0 in the OpenCL environment."; - } - } - if (info.sampled > 2) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Invalid Sampled " << info.sampled << " (must be 0, 1 or 2)"; } - if (spvIsVulkanEnv(target_env)) { - if (info.sampled == 0) { + if (info.dim == spv::Dim::SubpassData) { + if (info.sampled != 2) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << _.VkErrorID(4657) - << "Sampled must be 1 or 2 in the Vulkan environment."; + << _.VkErrorID(6214) << "Dim SubpassData requires Sampled to be 2"; } - } - if (spvIsOpenCLEnv(_.context()->target_env)) { - if (info.sampled != 0) { + if (info.format != spv::ImageFormat::Unknown) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Sampled must be 0 in the OpenCL environment."; + << "Dim SubpassData requires format Unknown"; + } + } else if (info.dim == spv::Dim::TileImageDataEXT) { + if (_.IsVoidType(info.sampled_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Dim TileImageDataEXT requires Sampled Type to be not " + "OpTypeVoid"; + } + if (info.sampled != 2) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Dim TileImageDataEXT requires Sampled to be 2"; + } + if (info.format != spv::ImageFormat::Unknown) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Dim TileImageDataEXT requires format Unknown"; + } + if (info.depth != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Dim TileImageDataEXT requires Depth to be 0"; + } + if (info.arrayed != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Dim TileImageDataEXT requires Arrayed to be 0"; + } + } else { + if (info.multisampled && (info.sampled == 2) && + !_.HasCapability(spv::Capability::StorageImageMultisample)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Capability StorageImageMultisample is required when using " + "multisampled storage image"; } } - if (info.dim == SpvDimSubpassData) { - if (info.sampled != 2) { + if (spvIsOpenCLEnv(target_env)) { + if ((info.arrayed == 1) && (info.dim != spv::Dim::Dim1D) && + (info.dim != spv::Dim::Dim2D)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Dim SubpassData requires Sampled to be 2"; + << "In the OpenCL environment, Arrayed may only be set to 1 " + << "when Dim is either 1D or 2D."; } - if (info.format != SpvImageFormatUnknown) { + if (info.multisampled != 0) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Dim SubpassData requires format Unknown"; + << "MS must be 0 in the OpenCL environment."; } - } - // Format and Access Qualifier are also checked elsewhere. + if (info.sampled != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Sampled must be 0 in the OpenCL environment."; + } - if (spvIsOpenCLEnv(_.context()->target_env)) { - if (info.access_qualifier == SpvAccessQualifierMax) { + if (info.access_qualifier == spv::AccessQualifier::Max) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "In the OpenCL environment, the optional Access Qualifier" << " must be present."; } } - if (info.multisampled && (info.sampled == 2) && - (info.dim != SpvDimSubpassData)) { - if (!_.HasCapability(SpvCapabilityStorageImageMultisample)) { + if (spvIsVulkanEnv(target_env)) { + if (info.sampled == 0) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Capability StorageImageMultisample is required when using " - "multisampled storage image"; + << _.VkErrorID(4657) + << "Sampled must be 1 or 2 in the Vulkan environment."; + } + + if (info.dim == spv::Dim::SubpassData && info.arrayed != 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(6214) + << "Dim SubpassData requires Arrayed to be 0 in the Vulkan " + "environment"; + } + + if (info.dim == spv::Dim::Rect) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(9638) + << "Dim must not be Rect in the Vulkan environment"; } } @@ -902,7 +932,7 @@ spv_result_t ValidateTypeImage(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateTypeSampledImage(ValidationState_t& _, const Instruction* inst) { const uint32_t image_type = inst->word(2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -914,6 +944,8 @@ spv_result_t ValidateTypeSampledImage(ValidationState_t& _, } // OpenCL requires Sampled=0, checked elsewhere. // Vulkan uses the Sampled=1 case. + // If Dim is TileImageDataEXT, Sampled must be 2 and this is validated + // elsewhere. if ((info.sampled != 0) && (info.sampled != 1)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4657) @@ -922,7 +954,8 @@ spv_result_t ValidateTypeSampledImage(ValidationState_t& _, } // This covers both OpTypeSampledImage and OpSampledImage. - if (_.version() >= SPV_SPIRV_VERSION_WORD(1, 6) && info.dim == SpvDimBuffer) { + if (_.version() >= SPV_SPIRV_VERSION_WORD(1, 6) && + info.dim == spv::Dim::Buffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "In SPIR-V 1.6 or later, sampled image dimension must not be " "Buffer"; @@ -931,29 +964,40 @@ spv_result_t ValidateTypeSampledImage(ValidationState_t& _, return SPV_SUCCESS; } -bool IsAllowedSampledImageOperand(SpvOp opcode) { +bool IsAllowedSampledImageOperand(spv::Op opcode, ValidationState_t& _) { switch (opcode) { - case SpvOpSampledImage: - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageGather: - case SpvOpImageDrefGather: - case SpvOpImage: - case SpvOpImageQueryLod: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: - case SpvOpImageSparseGather: - case SpvOpImageSparseDrefGather: - case SpvOpCopyObject: + case spv::Op::OpSampledImage: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImage: + case spv::Op::OpImageQueryLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: + case spv::Op::OpCopyObject: + case spv::Op::OpImageSampleWeightedQCOM: + case spv::Op::OpImageBoxFilterQCOM: + case spv::Op::OpImageBlockMatchSSDQCOM: + case spv::Op::OpImageBlockMatchSADQCOM: + case spv::Op::OpImageBlockMatchWindowSADQCOM: + case spv::Op::OpImageBlockMatchWindowSSDQCOM: + case spv::Op::OpImageBlockMatchGatherSADQCOM: + case spv::Op::OpImageBlockMatchGatherSSDQCOM: return true; + case spv::Op::OpStore: + if (_.HasCapability(spv::Capability::BindlessTextureNV)) return true; + return false; default: return false; } @@ -961,13 +1005,13 @@ bool IsAllowedSampledImageOperand(SpvOp opcode) { spv_result_t ValidateSampledImage(ValidationState_t& _, const Instruction* inst) { - if (_.GetIdOpcode(inst->type_id()) != SpvOpTypeSampledImage) { + if (_.GetIdOpcode(inst->type_id()) != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypeSampledImage."; } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage."; } @@ -984,8 +1028,9 @@ spv_result_t ValidateSampledImage(ValidationState_t& _, if (spvIsVulkanEnv(_.context()->target_env)) { if (info.sampled != 1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'Sampled' parameter to be 1 " - << "for Vulkan environment."; + << _.VkErrorID(6671) + << "Expected Image 'Sampled' parameter to be 1 for Vulkan " + "environment."; } } else { if (info.sampled != 0 && info.sampled != 1) { @@ -994,12 +1039,12 @@ spv_result_t ValidateSampledImage(ValidationState_t& _, } } - if (info.dim == SpvDimSubpassData) { + if (info.dim == spv::Dim::SubpassData) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image 'Dim' parameter to be not SubpassData."; } - if (_.GetIdOpcode(_.GetOperandTypeId(inst, 3)) != SpvOpTypeSampler) { + if (_.GetIdOpcode(_.GetOperandTypeId(inst, 3)) != spv::Op::OpTypeSampler) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sampler to be of type OpTypeSampler"; } @@ -1020,50 +1065,63 @@ spv_result_t ValidateSampledImage(ValidationState_t& _, << "All OpSampledImage instructions must be in the same block " "in " "which their Result are consumed. OpSampledImage Result " - "Type '" + "Type " << _.getIdName(inst->id()) - << "' has a consumer in a different basic " - "block. The consumer instruction is '" - << _.getIdName(consumer_instr->id()) << "'."; + << " has a consumer in a different basic " + "block. The consumer instruction is " + << _.getIdName(consumer_instr->id()) << "."; } - if (consumer_opcode == SpvOpPhi || consumer_opcode == SpvOpSelect) { + if (consumer_opcode == spv::Op::OpPhi || + consumer_opcode == spv::Op::OpSelect) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result from OpSampledImage instruction must not appear " "as " "operands of Op" - << spvOpcodeString(static_cast(consumer_opcode)) << "." - << " Found result '" << _.getIdName(inst->id()) - << "' as an operand of '" - << _.getIdName(consumer_instr->id()) << "'."; + << spvOpcodeString(static_cast(consumer_opcode)) << "." + << " Found result " << _.getIdName(inst->id()) + << " as an operand of " << _.getIdName(consumer_instr->id()) + << "."; } - if (!IsAllowedSampledImageOperand(consumer_opcode)) { + if (!IsAllowedSampledImageOperand(consumer_opcode, _)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result from OpSampledImage instruction must not appear " "as operand for Op" - << spvOpcodeString(static_cast(consumer_opcode)) - << ", since it is not specificed as taking an " + << spvOpcodeString(static_cast(consumer_opcode)) + << ", since it is not specified as taking an " << "OpTypeSampledImage." - << " Found result '" << _.getIdName(inst->id()) - << "' as an operand of '" - << _.getIdName(consumer_instr->id()) << "'."; + << " Found result " << _.getIdName(inst->id()) + << " as an operand of " << _.getIdName(consumer_instr->id()) + << "."; } } } + + const Instruction* ld_inst; + { + int t_idx = inst->GetOperandAs(2); + ld_inst = _.FindDef(t_idx); + } + + if (ld_inst->opcode() == spv::Op::OpLoad) { + int texture_id = ld_inst->GetOperandAs(2); // variable to load + _.RegisterQCOMImageProcessingTextureConsumer(texture_id, ld_inst, inst); + } + return SPV_SUCCESS; } spv_result_t ValidateImageTexelPointer(ValidationState_t& _, const Instruction* inst) { const auto result_type = _.FindDef(inst->type_id()); - if (result_type->opcode() != SpvOpTypePointer) { + if (result_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypePointer"; } - const auto storage_class = result_type->GetOperandAs(1); - if (storage_class != SpvStorageClassImage) { + const auto storage_class = result_type->GetOperandAs(1); + if (storage_class != spv::StorageClass::Image) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypePointer whose Storage Class " "operand is Image"; @@ -1071,21 +1129,24 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, const auto ptr_type = result_type->GetOperandAs(2); const auto ptr_opcode = _.GetIdOpcode(ptr_type); - if (ptr_opcode != SpvOpTypeInt && ptr_opcode != SpvOpTypeFloat && - ptr_opcode != SpvOpTypeVoid) { + if (ptr_opcode != spv::Op::OpTypeInt && ptr_opcode != spv::Op::OpTypeFloat && + ptr_opcode != spv::Op::OpTypeVoid && + !(ptr_opcode == spv::Op::OpTypeVector && + _.HasCapability(spv::Capability::AtomicFloat16VectorNV) && + _.IsFloat16Vector2Or4Type(ptr_type))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypePointer whose Type operand " "must be a scalar numerical type or OpTypeVoid"; } const auto image_ptr = _.FindDef(_.GetOperandTypeId(inst, 2)); - if (!image_ptr || image_ptr->opcode() != SpvOpTypePointer) { + if (!image_ptr || image_ptr->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be OpTypePointer"; } const auto image_type = image_ptr->GetOperandAs(2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be OpTypePointer with Type OpTypeImage"; } @@ -1096,17 +1157,30 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, << "Corrupt image type definition"; } - if (info.sampled_type != ptr_type) { + if (info.sampled_type != ptr_type && + !(_.HasCapability(spv::Capability::AtomicFloat16VectorNV) && + _.IsFloat16Vector2Or4Type(ptr_type) && + _.GetIdOpcode(info.sampled_type) == spv::Op::OpTypeFloat && + ((_.GetDimension(ptr_type) == 2 && + info.format == spv::ImageFormat::Rg16f) || + (_.GetDimension(ptr_type) == 4 && + info.format == spv::ImageFormat::Rgba16f)))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image 'Sampled Type' to be the same as the Type " "pointed to by Result Type"; } - if (info.dim == SpvDimSubpassData) { + if (info.dim == spv::Dim::SubpassData) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Dim SubpassData cannot be used with OpImageTexelPointer"; } + if (info.dim == spv::Dim::TileImageDataEXT) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Image Dim TileImageDataEXT cannot be used with " + "OpImageTexelPointer"; + } + const uint32_t coord_type = _.GetOperandTypeId(inst, 3); if (!coord_type || !_.IsIntScalarOrVectorType(coord_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1118,11 +1192,11 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, expected_coord_size = GetPlaneCoordSize(info); } else if (info.arrayed == 1) { switch (info.dim) { - case SpvDim1D: + case spv::Dim::Dim1D: expected_coord_size = 2; break; - case SpvDimCube: - case SpvDim2D: + case spv::Dim::Cube: + case spv::Dim::Dim2D: expected_coord_size = 3; break; default: @@ -1148,7 +1222,7 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, if (info.multisampled == 0) { uint64_t ms = 0; - if (!_.GetConstantValUint64(inst->GetOperandAs(4), &ms) || + if (!_.EvalConstantValUint64(inst->GetOperandAs(4), &ms) || ms != 0) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sample for Image with MS 0 to be a valid for " @@ -1157,11 +1231,14 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, } if (spvIsVulkanEnv(_.context()->target_env)) { - if ((info.format != SpvImageFormatR64i) && - (info.format != SpvImageFormatR64ui) && - (info.format != SpvImageFormatR32f) && - (info.format != SpvImageFormatR32i) && - (info.format != SpvImageFormatR32ui)) { + if ((info.format != spv::ImageFormat::R64i) && + (info.format != spv::ImageFormat::R64ui) && + (info.format != spv::ImageFormat::R32f) && + (info.format != spv::ImageFormat::R32i) && + (info.format != spv::ImageFormat::R32ui) && + !((info.format == spv::ImageFormat::Rg16f || + info.format == spv::ImageFormat::Rgba16f) && + _.HasCapability(spv::Capability::AtomicFloat16VectorNV))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4658) << "Expected the Image Format in Image to be R64i, R64ui, R32f, " @@ -1173,7 +1250,7 @@ spv_result_t ValidateImageTexelPointer(ValidationState_t& _, } spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); uint32_t actual_result_type = 0; if (spv_result_t error = GetActualResultType(_, inst, &actual_result_type)) { return error; @@ -1193,7 +1270,7 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sampled Image to be of type OpTypeSampledImage"; } @@ -1204,7 +1281,9 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { << "Corrupt image type definition"; } - if (spv_result_t result = ValidateImageCommon(_, inst, info)) return result; + if (IsProj(opcode)) { + if (spv_result_t result = ValidateImageProj(_, inst, info)) return result; + } if (info.multisampled) { // When using image operands, the Sample image operand is required if and @@ -1214,7 +1293,7 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { << "Sampling operation is invalid for multisample image"; } - if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(info.sampled_type) != spv::Op::OpTypeVoid) { const uint32_t texel_component_type = _.GetComponentType(actual_result_type); if (texel_component_type != info.sampled_type) { @@ -1225,9 +1304,9 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { } const uint32_t coord_type = _.GetOperandTypeId(inst, 3); - if ((opcode == SpvOpImageSampleExplicitLod || - opcode == SpvOpImageSparseSampleExplicitLod) && - _.HasCapability(SpvCapabilityKernel)) { + if ((opcode == spv::Op::OpImageSampleExplicitLod || + opcode == spv::Op::OpImageSparseSampleExplicitLod) && + _.HasCapability(spv::Capability::Kernel)) { if (!_.IsFloatScalarOrVectorType(coord_type) && !_.IsIntScalarOrVectorType(coord_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1250,9 +1329,9 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { const uint32_t mask = inst->words().size() <= 5 ? 0 : inst->word(5); - if (mask & SpvImageOperandsConstOffsetMask) { + if (mask & uint32_t(spv::ImageOperandsMask::ConstOffset)) { if (spvIsOpenCLEnv(_.context()->target_env)) { - if (opcode == SpvOpImageSampleExplicitLod) { + if (opcode == spv::Op::OpImageSampleExplicitLod) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "ConstOffset image operand not allowed " << "in the OpenCL environment."; @@ -1267,9 +1346,30 @@ spv_result_t ValidateImageLod(ValidationState_t& _, const Instruction* inst) { return SPV_SUCCESS; } +// Validates anything OpImage*Dref* instruction +spv_result_t ValidateImageDref(ValidationState_t& _, const Instruction* inst, + const ImageTypeInfo& info) { + const uint32_t dref_type = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatScalarType(dref_type) || _.GetBitWidth(dref_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Dref to be of 32-bit float type"; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (info.dim == spv::Dim::Dim3D) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(4777) + << "In Vulkan, OpImage*Dref* instructions must not use images " + "with a 3D Dim"; + } + } + + return SPV_SUCCESS; +} + spv_result_t ValidateImageDrefLod(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); uint32_t actual_result_type = 0; if (spv_result_t error = GetActualResultType(_, inst, &actual_result_type)) { return error; @@ -1283,7 +1383,7 @@ spv_result_t ValidateImageDrefLod(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sampled Image to be of type OpTypeSampledImage"; } @@ -1294,7 +1394,9 @@ spv_result_t ValidateImageDrefLod(ValidationState_t& _, << "Corrupt image type definition"; } - if (spv_result_t result = ValidateImageCommon(_, inst, info)) return result; + if (IsProj(opcode)) { + if (spv_result_t result = ValidateImageProj(_, inst, info)) return result; + } if (info.multisampled) { // When using image operands, the Sample image operand is required if and @@ -1324,11 +1426,7 @@ spv_result_t ValidateImageDrefLod(ValidationState_t& _, << " components, but given only " << actual_coord_size; } - const uint32_t dref_type = _.GetOperandTypeId(inst, 4); - if (!_.IsFloatScalarType(dref_type) || _.GetBitWidth(dref_type) != 32) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Dref to be of 32-bit float type"; - } + if (spv_result_t result = ValidateImageDref(_, inst, info)) return result; if (spv_result_t result = ValidateImageOperands(_, inst, info, /* word_index = */ 7)) @@ -1343,7 +1441,7 @@ spv_result_t ValidateImageFetch(ValidationState_t& _, const Instruction* inst) { return error; } - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); if (!_.IsIntVectorType(actual_result_type) && !_.IsFloatVectorType(actual_result_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1358,7 +1456,7 @@ spv_result_t ValidateImageFetch(ValidationState_t& _, const Instruction* inst) { } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -1369,7 +1467,7 @@ spv_result_t ValidateImageFetch(ValidationState_t& _, const Instruction* inst) { << "Corrupt image type definition"; } - if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(info.sampled_type) != spv::Op::OpTypeVoid) { const uint32_t result_component_type = _.GetComponentType(actual_result_type); if (result_component_type != info.sampled_type) { @@ -1379,7 +1477,7 @@ spv_result_t ValidateImageFetch(ValidationState_t& _, const Instruction* inst) { } } - if (info.dim == SpvDimCube) { + if (info.dim == spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image 'Dim' cannot be Cube"; } @@ -1415,7 +1513,7 @@ spv_result_t ValidateImageGather(ValidationState_t& _, if (spv_result_t error = GetActualResultType(_, inst, &actual_result_type)) return error; - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); if (!_.IsIntVectorType(actual_result_type) && !_.IsFloatVectorType(actual_result_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1430,7 +1528,7 @@ spv_result_t ValidateImageGather(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sampled Image to be of type OpTypeSampledImage"; } @@ -1449,8 +1547,9 @@ spv_result_t ValidateImageGather(ValidationState_t& _, << "Gather operation is invalid for multisample image"; } - if (opcode == SpvOpImageDrefGather || opcode == SpvOpImageSparseDrefGather || - _.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + if (opcode == spv::Op::OpImageDrefGather || + opcode == spv::Op::OpImageSparseDrefGather || + _.GetIdOpcode(info.sampled_type) != spv::Op::OpTypeVoid) { const uint32_t result_component_type = _.GetComponentType(actual_result_type); if (result_component_type != info.sampled_type) { @@ -1460,10 +1559,11 @@ spv_result_t ValidateImageGather(ValidationState_t& _, } } - if (info.dim != SpvDim2D && info.dim != SpvDimCube && - info.dim != SpvDimRect) { + if (info.dim != spv::Dim::Dim2D && info.dim != spv::Dim::Cube && + info.dim != spv::Dim::Rect) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Image 'Dim' cannot be Cube"; + << _.VkErrorID(4777) + << "Expected Image 'Dim' to be 2D, Cube, or Rect"; } const uint32_t coord_type = _.GetOperandTypeId(inst, 3); @@ -1480,7 +1580,8 @@ spv_result_t ValidateImageGather(ValidationState_t& _, << " components, but given only " << actual_coord_size; } - if (opcode == SpvOpImageGather || opcode == SpvOpImageSparseGather) { + if (opcode == spv::Op::OpImageGather || + opcode == spv::Op::OpImageSparseGather) { const uint32_t component = inst->GetOperandAs(4); const uint32_t component_index_type = _.GetTypeId(component); if (!_.IsIntScalarType(component_index_type) || @@ -1497,13 +1598,9 @@ spv_result_t ValidateImageGather(ValidationState_t& _, } } } else { - assert(opcode == SpvOpImageDrefGather || - opcode == SpvOpImageSparseDrefGather); - const uint32_t dref_type = _.GetOperandTypeId(inst, 4); - if (!_.IsFloatScalarType(dref_type) || _.GetBitWidth(dref_type) != 32) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Dref to be of 32-bit float type"; - } + assert(opcode == spv::Op::OpImageDrefGather || + opcode == spv::Op::OpImageSparseDrefGather); + if (spv_result_t result = ValidateImageDref(_, inst, info)) return result; } if (spv_result_t result = @@ -1514,7 +1611,7 @@ spv_result_t ValidateImageGather(ValidationState_t& _, } spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); uint32_t actual_result_type = 0; if (spv_result_t error = GetActualResultType(_, inst, &actual_result_type)) { return error; @@ -1539,7 +1636,7 @@ spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { } // Check OpenCL below, after we get the image info. const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -1571,22 +1668,35 @@ spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { << " to have 4 components"; } } + + const uint32_t mask = inst->words().size() <= 5 ? 0 : inst->word(5); + if (mask & uint32_t(spv::ImageOperandsMask::ConstOffset)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ConstOffset image operand not allowed " + << "in the OpenCL environment."; + } } - if (info.dim == SpvDimSubpassData) { - if (opcode == SpvOpImageSparseRead) { + if (info.dim == spv::Dim::SubpassData) { + if (opcode == spv::Op::OpImageSparseRead) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image Dim SubpassData cannot be used with ImageSparseRead"; } _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, std::string("Dim SubpassData requires Fragment execution model: ") + spvOpcodeString(opcode)); } - if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + if (info.dim == spv::Dim::TileImageDataEXT) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Image Dim TileImageDataEXT cannot be used with " + << spvOpcodeString(opcode); + } + + if (_.GetIdOpcode(info.sampled_type) != spv::Op::OpTypeVoid) { const uint32_t result_component_type = _.GetComponentType(actual_result_type); if (result_component_type != info.sampled_type) { @@ -1596,7 +1706,8 @@ spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { } } - if (spv_result_t result = ValidateImageCommon(_, inst, info)) return result; + if (spv_result_t result = ValidateImageReadWrite(_, inst, info)) + return result; const uint32_t coord_type = _.GetOperandTypeId(inst, 3); if (!_.IsIntScalarOrVectorType(coord_type)) { @@ -1613,24 +1724,15 @@ spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { } if (spvIsVulkanEnv(_.context()->target_env)) { - if (info.format == SpvImageFormatUnknown && info.dim != SpvDimSubpassData && - !_.HasCapability(SpvCapabilityStorageImageReadWithoutFormat)) { + if (info.format == spv::ImageFormat::Unknown && + info.dim != spv::Dim::SubpassData && + !_.HasCapability(spv::Capability::StorageImageReadWithoutFormat)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Capability StorageImageReadWithoutFormat is required to " << "read storage image"; } } - const uint32_t mask = inst->words().size() <= 5 ? 0 : inst->word(5); - - if (mask & SpvImageOperandsConstOffsetMask) { - if (spvIsOpenCLEnv(_.context()->target_env)) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "ConstOffset image operand not allowed " - << "in the OpenCL environment."; - } - } - if (spv_result_t result = ValidateImageOperands(_, inst, info, /* word_index = */ 6)) return result; @@ -1640,7 +1742,7 @@ spv_result_t ValidateImageRead(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { const uint32_t image_type = _.GetOperandTypeId(inst, 0); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -1651,12 +1753,18 @@ spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { << "Corrupt image type definition"; } - if (info.dim == SpvDimSubpassData) { + if (info.dim == spv::Dim::SubpassData) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image 'Dim' cannot be SubpassData"; } - if (spv_result_t result = ValidateImageCommon(_, inst, info)) return result; + if (info.dim == spv::Dim::TileImageDataEXT) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Image 'Dim' cannot be TileImageDataEXT"; + } + + if (spv_result_t result = ValidateImageReadWrite(_, inst, info)) + return result; const uint32_t coord_type = _.GetOperandTypeId(inst, 1); if (!_.IsIntScalarOrVectorType(coord_type)) { @@ -1672,8 +1780,7 @@ spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { << " components, but given only " << actual_coord_size; } - // TODO(atgoo@github.com) The spec doesn't explicitely say what the type - // of texel should be. + // because it needs to match with 'Sampled Type' the Texel can't be a boolean const uint32_t texel_type = _.GetOperandTypeId(inst, 2); if (!_.IsIntScalarOrVectorType(texel_type) && !_.IsFloatScalarOrVectorType(texel_type)) { @@ -1681,15 +1788,7 @@ spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { << "Expected Texel to be int or float vector or scalar"; } -#if 0 - // TODO: See above. - if (_.GetDimension(texel_type) != 4) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Expected Texel to have 4 components"; - } -#endif - - if (_.GetIdOpcode(info.sampled_type) != SpvOpTypeVoid) { + if (_.GetIdOpcode(info.sampled_type) != spv::Op::OpTypeVoid) { const uint32_t texel_component_type = _.GetComponentType(texel_type); if (texel_component_type != info.sampled_type) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1699,8 +1798,9 @@ spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { } if (spvIsVulkanEnv(_.context()->target_env)) { - if (info.format == SpvImageFormatUnknown && info.dim != SpvDimSubpassData && - !_.HasCapability(SpvCapabilityStorageImageWriteWithoutFormat)) { + if (info.format == spv::ImageFormat::Unknown && + info.dim != spv::Dim::SubpassData && + !_.HasCapability(spv::Capability::StorageImageWriteWithoutFormat)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Capability StorageImageWriteWithoutFormat is required to " "write " @@ -1725,7 +1825,7 @@ spv_result_t ValidateImageWrite(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateImage(ValidationState_t& _, const Instruction* inst) { const uint32_t result_type = inst->type_id(); - if (_.GetIdOpcode(result_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(result_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Result Type to be OpTypeImage"; } @@ -1734,7 +1834,7 @@ spv_result_t ValidateImage(ValidationState_t& _, const Instruction* inst) { const Instruction* sampled_image_type_inst = _.FindDef(sampled_image_type); assert(sampled_image_type_inst); - if (sampled_image_type_inst->opcode() != SpvOpTypeSampledImage) { + if (sampled_image_type_inst->opcode() != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Sample Image to be of type OpTypeSampleImage"; } @@ -1756,7 +1856,7 @@ spv_result_t ValidateImageQuerySizeLod(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -1769,14 +1869,14 @@ spv_result_t ValidateImageQuerySizeLod(ValidationState_t& _, uint32_t expected_num_components = info.arrayed; switch (info.dim) { - case SpvDim1D: + case spv::Dim::Dim1D: expected_num_components += 1; break; - case SpvDim2D: - case SpvDimCube: + case spv::Dim::Dim2D: + case spv::Dim::Cube: expected_num_components += 2; break; - case SpvDim3D: + case spv::Dim::Dim3D: expected_num_components += 3; break; default: @@ -1822,7 +1922,7 @@ spv_result_t ValidateImageQuerySize(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -1835,16 +1935,16 @@ spv_result_t ValidateImageQuerySize(ValidationState_t& _, uint32_t expected_num_components = info.arrayed; switch (info.dim) { - case SpvDim1D: - case SpvDimBuffer: + case spv::Dim::Dim1D: + case spv::Dim::Buffer: expected_num_components += 1; break; - case SpvDim2D: - case SpvDimCube: - case SpvDimRect: + case spv::Dim::Dim2D: + case spv::Dim::Cube: + case spv::Dim::Rect: expected_num_components += 2; break; - case SpvDim3D: + case spv::Dim::Dim3D: expected_num_components += 3; break; default: @@ -1852,8 +1952,8 @@ spv_result_t ValidateImageQuerySize(ValidationState_t& _, << "Image 'Dim' must be 1D, Buffer, 2D, Cube, 3D or Rect"; } - if (info.dim == SpvDim1D || info.dim == SpvDim2D || info.dim == SpvDim3D || - info.dim == SpvDimCube) { + if (info.dim == spv::Dim::Dim1D || info.dim == spv::Dim::Dim2D || + info.dim == spv::Dim::Dim3D || info.dim == spv::Dim::Cube) { if (info.multisampled != 1 && info.sampled != 0 && info.sampled != 2) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image must have either 'MS'=1 or 'Sampled'=0 or 'Sampled'=2"; @@ -1877,10 +1977,22 @@ spv_result_t ValidateImageQueryFormatOrOrder(ValidationState_t& _, << "Expected Result Type to be int scalar type"; } - if (_.GetIdOpcode(_.GetOperandTypeId(inst, 2)) != SpvOpTypeImage) { + const uint32_t image_type = _.GetOperandTypeId(inst, 2); + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected operand to be of type OpTypeImage"; } + + ImageTypeInfo info; + if (!GetImageTypeInfo(_, image_type, &info)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Corrupt image type definition"; + } + + if (info.dim == spv::Dim::TileImageDataEXT) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Image 'Dim' cannot be TileImageDataEXT"; + } return SPV_SUCCESS; } @@ -1888,9 +2000,9 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _, const Instruction* inst) { _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - [&](SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelFragment && - model != SpvExecutionModelGLCompute) { + [&](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::Fragment && + model != spv::ExecutionModel::GLCompute) { if (message) { *message = std::string( "OpImageQueryLod requires Fragment or GLCompute execution " @@ -1906,10 +2018,10 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _, std::string* message) { const auto* models = state.GetExecutionModels(entry_point->id()); const auto* modes = state.GetExecutionModes(entry_point->id()); - if (models->find(SpvExecutionModelGLCompute) != models->end() && - modes->find(SpvExecutionModeDerivativeGroupLinearNV) == + if (models->find(spv::ExecutionModel::GLCompute) != models->end() && + modes->find(spv::ExecutionMode::DerivativeGroupLinearNV) == modes->end() && - modes->find(SpvExecutionModeDerivativeGroupQuadsNV) == + modes->find(spv::ExecutionMode::DerivativeGroupQuadsNV) == modes->end()) { if (message) { *message = std::string( @@ -1934,7 +2046,7 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeSampledImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeSampledImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image operand to be of type OpTypeSampledImage"; } @@ -1945,14 +2057,14 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _, << "Corrupt image type definition"; } - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimCube) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image 'Dim' must be 1D, 2D, 3D or Cube"; } const uint32_t coord_type = _.GetOperandTypeId(inst, 3); - if (_.HasCapability(SpvCapabilityKernel)) { + if (_.HasCapability(spv::Capability::Kernel)) { if (!_.IsFloatScalarOrVectorType(coord_type) && !_.IsIntScalarOrVectorType(coord_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -1973,11 +2085,11 @@ spv_result_t ValidateImageQueryLod(ValidationState_t& _, << " components, but given only " << actual_coord_size; } - // The operad is a sampled image. + // The operand is a sampled image. // The sampled image type is already checked to be parameterized by an image // type with Sampled=0 or Sampled=1. Vulkan bans Sampled=0, and so we have // Sampled=1. So the validator already enforces Vulkan VUID 4659: - // OpImageQuerySizeLod must only consume an “Image” operand whose type has + // OpImageQuerySizeLod must only consume an "Image" operand whose type has // its "Sampled" operand set to 1 return SPV_SUCCESS; } @@ -1997,7 +2109,7 @@ spv_result_t ValidateImageQueryLevelsOrSamples(ValidationState_t& _, } const uint32_t image_type = _.GetOperandTypeId(inst, 2); - if (_.GetIdOpcode(image_type) != SpvOpTypeImage) { + if (_.GetIdOpcode(image_type) != spv::Op::OpTypeImage) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Image to be of type OpTypeImage"; } @@ -2008,10 +2120,10 @@ spv_result_t ValidateImageQueryLevelsOrSamples(ValidationState_t& _, << "Corrupt image type definition"; } - const SpvOp opcode = inst->opcode(); - if (opcode == SpvOpImageQueryLevels) { - if (info.dim != SpvDim1D && info.dim != SpvDim2D && info.dim != SpvDim3D && - info.dim != SpvDimCube) { + const spv::Op opcode = inst->opcode(); + if (opcode == spv::Op::OpImageQueryLevels) { + if (info.dim != spv::Dim::Dim1D && info.dim != spv::Dim::Dim2D && + info.dim != spv::Dim::Dim3D && info.dim != spv::Dim::Cube) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image 'Dim' must be 1D, 2D, 3D or Cube"; } @@ -2025,8 +2137,8 @@ spv_result_t ValidateImageQueryLevelsOrSamples(ValidationState_t& _, } } } else { - assert(opcode == SpvOpImageQuerySamples); - if (info.dim != SpvDim2D) { + assert(opcode == spv::Op::OpImageQuerySamples); + if (info.dim != spv::Dim::Dim2D) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Image 'Dim' must be 2D"; } @@ -2053,17 +2165,138 @@ spv_result_t ValidateImageSparseTexelsResident(ValidationState_t& _, return SPV_SUCCESS; } +spv_result_t ValidateImageProcessingQCOMDecoration(ValidationState_t& _, int id, + spv::Decoration decor) { + const Instruction* si_inst = nullptr; + const Instruction* ld_inst = _.FindDef(id); + bool is_intf_obj = (ld_inst->opcode() == spv::Op::OpSampledImage); + if (is_intf_obj == true) { + si_inst = ld_inst; + int t_idx = si_inst->GetOperandAs(2); // texture + ld_inst = _.FindDef(t_idx); + } + if (ld_inst->opcode() != spv::Op::OpLoad) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) << "Expect to see OpLoad"; + } + int texture_id = ld_inst->GetOperandAs(2); // variable to load + if (!_.HasDecoration(texture_id, decor)) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) + << "Missing decoration " << _.SpvDecorationString(decor); + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateImageProcessing2QCOMWindowDecoration(ValidationState_t& _, + int id) { + const Instruction* ld_inst = _.FindDef(id); + bool is_intf_obj = (ld_inst->opcode() != spv::Op::OpSampledImage); + if (is_intf_obj == true) { + if (ld_inst->opcode() != spv::Op::OpLoad) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) << "Expect to see OpLoad"; + } + int texture_id = ld_inst->GetOperandAs(2); // variable to load + spv::Decoration decor = spv::Decoration::BlockMatchTextureQCOM; + if (!_.HasDecoration(texture_id, decor)) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) + << "Missing decoration " << _.SpvDecorationString(decor); + } + decor = spv::Decoration::BlockMatchSamplerQCOM; + if (!_.HasDecoration(texture_id, decor)) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) + << "Missing decoration " << _.SpvDecorationString(decor); + } + } else { + const Instruction* si_inst = ld_inst; + int t_idx = si_inst->GetOperandAs(2); // texture + const Instruction* t_ld_inst = _.FindDef(t_idx); + if (t_ld_inst->opcode() != spv::Op::OpLoad) { + return _.diag(SPV_ERROR_INVALID_DATA, t_ld_inst) + << "Expect to see OpLoad"; + } + int texture_id = t_ld_inst->GetOperandAs(2); // variable to load + spv::Decoration decor = spv::Decoration::BlockMatchTextureQCOM; + if (!_.HasDecoration(texture_id, decor)) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) + << "Missing decoration " << _.SpvDecorationString(decor); + } + int s_idx = si_inst->GetOperandAs(3); // sampler + const Instruction* s_ld_inst = _.FindDef(s_idx); + if (s_ld_inst->opcode() != spv::Op::OpLoad) { + return _.diag(SPV_ERROR_INVALID_DATA, s_ld_inst) + << "Expect to see OpLoad"; + } + int sampler_id = s_ld_inst->GetOperandAs(2); // variable to load + decor = spv::Decoration::BlockMatchSamplerQCOM; + if (!_.HasDecoration(sampler_id, decor)) { + return _.diag(SPV_ERROR_INVALID_DATA, ld_inst) + << "Missing decoration " << _.SpvDecorationString(decor); + } + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateImageProcessingQCOM(ValidationState_t& _, + const Instruction* inst) { + spv_result_t res = SPV_SUCCESS; + const spv::Op opcode = inst->opcode(); + switch (opcode) { + case spv::Op::OpImageSampleWeightedQCOM: { + int wi_idx = inst->GetOperandAs(4); // weight + res = ValidateImageProcessingQCOMDecoration( + _, wi_idx, spv::Decoration::WeightTextureQCOM); + break; + } + case spv::Op::OpImageBlockMatchSSDQCOM: + case spv::Op::OpImageBlockMatchSADQCOM: { + int tgt_idx = inst->GetOperandAs(2); // target + res = ValidateImageProcessingQCOMDecoration( + _, tgt_idx, spv::Decoration::BlockMatchTextureQCOM); + if (res != SPV_SUCCESS) break; + int ref_idx = inst->GetOperandAs(4); // reference + res = ValidateImageProcessingQCOMDecoration( + _, ref_idx, spv::Decoration::BlockMatchTextureQCOM); + break; + } + case spv::Op::OpImageBlockMatchWindowSSDQCOM: + case spv::Op::OpImageBlockMatchWindowSADQCOM: { + int tgt_idx = inst->GetOperandAs(2); // target + res = ValidateImageProcessing2QCOMWindowDecoration(_, tgt_idx); + if (res != SPV_SUCCESS) break; + int ref_idx = inst->GetOperandAs(4); // reference + res = ValidateImageProcessing2QCOMWindowDecoration(_, ref_idx); + break; + } + case spv::Op::OpImageBlockMatchGatherSSDQCOM: + case spv::Op::OpImageBlockMatchGatherSADQCOM: { + int tgt_idx = inst->GetOperandAs(2); // target + res = ValidateImageProcessingQCOMDecoration( + _, tgt_idx, spv::Decoration::BlockMatchTextureQCOM); + if (res != SPV_SUCCESS) break; + int ref_idx = inst->GetOperandAs(4); // reference + res = ValidateImageProcessingQCOMDecoration( + _, ref_idx, spv::Decoration::BlockMatchTextureQCOM); + break; + } + default: + break; + } + + return res; +} + } // namespace // Validates correctness of image instructions. spv_result_t ImagePass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); if (IsImplicitLod(opcode)) { _.function(inst->function()->id()) - ->RegisterExecutionModelLimitation([opcode](SpvExecutionModel model, + ->RegisterExecutionModelLimitation([opcode](spv::ExecutionModel model, std::string* message) { - if (model != SpvExecutionModelFragment && - model != SpvExecutionModelGLCompute) { + if (model != spv::ExecutionModel::Fragment && + model != spv::ExecutionModel::GLCompute) { if (message) { *message = std::string( @@ -2082,11 +2315,11 @@ spv_result_t ImagePass(ValidationState_t& _, const Instruction* inst) { const auto* models = state.GetExecutionModels(entry_point->id()); const auto* modes = state.GetExecutionModes(entry_point->id()); if (models && - models->find(SpvExecutionModelGLCompute) != models->end() && + models->find(spv::ExecutionModel::GLCompute) != models->end() && (!modes || - (modes->find(SpvExecutionModeDerivativeGroupLinearNV) == + (modes->find(spv::ExecutionMode::DerivativeGroupLinearNV) == modes->end() && - modes->find(SpvExecutionModeDerivativeGroupQuadsNV) == + modes->find(spv::ExecutionMode::DerivativeGroupQuadsNV) == modes->end()))) { if (message) { *message = @@ -2103,79 +2336,182 @@ spv_result_t ImagePass(ValidationState_t& _, const Instruction* inst) { } switch (opcode) { - case SpvOpTypeImage: + case spv::Op::OpTypeImage: return ValidateTypeImage(_, inst); - case SpvOpTypeSampledImage: + case spv::Op::OpTypeSampledImage: return ValidateTypeSampledImage(_, inst); - case SpvOpSampledImage: + case spv::Op::OpSampledImage: return ValidateSampledImage(_, inst); - case SpvOpImageTexelPointer: + case spv::Op::OpImageTexelPointer: return ValidateImageTexelPointer(_, inst); - case SpvOpImageSampleImplicitLod: - case SpvOpImageSampleExplicitLod: - case SpvOpImageSampleProjImplicitLod: - case SpvOpImageSampleProjExplicitLod: - case SpvOpImageSparseSampleImplicitLod: - case SpvOpImageSparseSampleExplicitLod: + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: return ValidateImageLod(_, inst); - case SpvOpImageSampleDrefImplicitLod: - case SpvOpImageSampleDrefExplicitLod: - case SpvOpImageSampleProjDrefImplicitLod: - case SpvOpImageSampleProjDrefExplicitLod: - case SpvOpImageSparseSampleDrefImplicitLod: - case SpvOpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: return ValidateImageDrefLod(_, inst); - case SpvOpImageFetch: - case SpvOpImageSparseFetch: + case spv::Op::OpImageFetch: + case spv::Op::OpImageSparseFetch: return ValidateImageFetch(_, inst); - case SpvOpImageGather: - case SpvOpImageDrefGather: - case SpvOpImageSparseGather: - case SpvOpImageSparseDrefGather: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: return ValidateImageGather(_, inst); - case SpvOpImageRead: - case SpvOpImageSparseRead: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseRead: return ValidateImageRead(_, inst); - case SpvOpImageWrite: + case spv::Op::OpImageWrite: return ValidateImageWrite(_, inst); - case SpvOpImage: + case spv::Op::OpImage: return ValidateImage(_, inst); - case SpvOpImageQueryFormat: - case SpvOpImageQueryOrder: + case spv::Op::OpImageQueryFormat: + case spv::Op::OpImageQueryOrder: return ValidateImageQueryFormatOrOrder(_, inst); - case SpvOpImageQuerySizeLod: + case spv::Op::OpImageQuerySizeLod: return ValidateImageQuerySizeLod(_, inst); - case SpvOpImageQuerySize: + case spv::Op::OpImageQuerySize: return ValidateImageQuerySize(_, inst); - case SpvOpImageQueryLod: + case spv::Op::OpImageQueryLod: return ValidateImageQueryLod(_, inst); - case SpvOpImageQueryLevels: - case SpvOpImageQuerySamples: + case spv::Op::OpImageQueryLevels: + case spv::Op::OpImageQuerySamples: return ValidateImageQueryLevelsOrSamples(_, inst); - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: return ValidateImageSparseLod(_, inst); - case SpvOpImageSparseTexelsResident: + case spv::Op::OpImageSparseTexelsResident: return ValidateImageSparseTexelsResident(_, inst); + case spv::Op::OpImageSampleWeightedQCOM: + case spv::Op::OpImageBoxFilterQCOM: + case spv::Op::OpImageBlockMatchSSDQCOM: + case spv::Op::OpImageBlockMatchSADQCOM: + case spv::Op::OpImageBlockMatchWindowSADQCOM: + case spv::Op::OpImageBlockMatchWindowSSDQCOM: + case spv::Op::OpImageBlockMatchGatherSADQCOM: + case spv::Op::OpImageBlockMatchGatherSSDQCOM: + return ValidateImageProcessingQCOM(_, inst); + + default: + break; + } + + return SPV_SUCCESS; +} + +bool IsImageInstruction(const spv::Op opcode) { + switch (opcode) { + case spv::Op::OpImageSampleImplicitLod: + case spv::Op::OpImageSampleDrefImplicitLod: + case spv::Op::OpImageSampleProjImplicitLod: + case spv::Op::OpImageSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleImplicitLod: + case spv::Op::OpImageSparseSampleDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + + case spv::Op::OpImageSampleExplicitLod: + case spv::Op::OpImageSampleDrefExplicitLod: + case spv::Op::OpImageSampleProjExplicitLod: + case spv::Op::OpImageSampleProjDrefExplicitLod: + case spv::Op::OpImageSparseSampleExplicitLod: + case spv::Op::OpImageSparseSampleDrefExplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: + + case spv::Op::OpImage: + case spv::Op::OpImageFetch: + case spv::Op::OpImageSparseFetch: + case spv::Op::OpImageGather: + case spv::Op::OpImageDrefGather: + case spv::Op::OpImageSparseGather: + case spv::Op::OpImageSparseDrefGather: + case spv::Op::OpImageRead: + case spv::Op::OpImageSparseRead: + case spv::Op::OpImageWrite: + + case spv::Op::OpImageQueryFormat: + case spv::Op::OpImageQueryOrder: + case spv::Op::OpImageQuerySizeLod: + case spv::Op::OpImageQuerySize: + case spv::Op::OpImageQueryLod: + case spv::Op::OpImageQueryLevels: + case spv::Op::OpImageQuerySamples: + + case spv::Op::OpImageSampleWeightedQCOM: + case spv::Op::OpImageBoxFilterQCOM: + case spv::Op::OpImageBlockMatchSSDQCOM: + case spv::Op::OpImageBlockMatchSADQCOM: + case spv::Op::OpImageBlockMatchWindowSADQCOM: + case spv::Op::OpImageBlockMatchWindowSSDQCOM: + case spv::Op::OpImageBlockMatchGatherSADQCOM: + case spv::Op::OpImageBlockMatchGatherSSDQCOM: + return true; default: break; } + return false; +} +spv_result_t ValidateQCOMImageProcessingTextureUsages(ValidationState_t& _, + const Instruction* inst) { + const spv::Op opcode = inst->opcode(); + if (!IsImageInstruction(opcode)) return SPV_SUCCESS; + + switch (opcode) { + case spv::Op::OpImageSampleWeightedQCOM: + case spv::Op::OpImageBoxFilterQCOM: + case spv::Op::OpImageBlockMatchSSDQCOM: + case spv::Op::OpImageBlockMatchSADQCOM: + break; + case spv::Op::OpImageBlockMatchWindowSADQCOM: + case spv::Op::OpImageBlockMatchWindowSSDQCOM: + case spv::Op::OpImageBlockMatchGatherSADQCOM: + case spv::Op::OpImageBlockMatchGatherSSDQCOM: + break; + default: + for (size_t i = 0; i < inst->operands().size(); ++i) { + int id = inst->GetOperandAs(i); + const Instruction* operand_inst = _.FindDef(id); + if (operand_inst == nullptr) continue; + if (operand_inst->opcode() == spv::Op::OpLoad) { + if (_.IsQCOMImageProcessingTextureConsumer(id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Illegal use of QCOM image processing decorated texture"; + } + } + if (operand_inst->opcode() == spv::Op::OpSampledImage) { + if (_.IsQCOMImageProcessingTextureConsumer(id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Illegal use of QCOM image processing decorated texture"; + } + } + } + break; + } return SPV_SUCCESS; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_instruction.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_instruction.cpp index dad98673b..5bc4d2cef 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_instruction.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_instruction.cpp @@ -14,26 +14,20 @@ // Performs validation on instructions that appear inside of a SPIR-V block. -#include #include -#include #include #include #include -#include "source/binary.h" -#include "source/diagnostic.h" #include "source/enum_set.h" #include "source/enum_string_mapping.h" #include "source/extensions.h" #include "source/opcode.h" #include "source/operand.h" #include "source/spirv_constant.h" -#include "source/spirv_definition.h" #include "source/spirv_target_env.h" #include "source/spirv_validator_options.h" #include "source/util/string_utils.h" -#include "source/val/function.h" #include "source/val/validate.h" #include "source/val/validation_state.h" @@ -44,14 +38,14 @@ namespace { std::string ToString(const CapabilitySet& capabilities, const AssemblyGrammar& grammar) { std::stringstream ss; - capabilities.ForEach([&grammar, &ss](SpvCapability cap) { + for (auto capability : capabilities) { spv_operand_desc desc; - if (SPV_SUCCESS == - grammar.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) + if (SPV_SUCCESS == grammar.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, + uint32_t(capability), &desc)) ss << desc->name << " "; else - ss << cap << " "; - }); + ss << uint32_t(capability) << " "; + } return ss.str(); } @@ -60,18 +54,18 @@ std::string ToString(const CapabilitySet& capabilities, // the opcode may only be used if at least one of the capabilities is specified // by the module. CapabilitySet EnablingCapabilitiesForOp(const ValidationState_t& state, - SpvOp opcode) { + spv::Op opcode) { // Exceptions for SPV_AMD_shader_ballot switch (opcode) { // Normally these would require Group capability - case SpvOpGroupIAddNonUniformAMD: - case SpvOpGroupFAddNonUniformAMD: - case SpvOpGroupFMinNonUniformAMD: - case SpvOpGroupUMinNonUniformAMD: - case SpvOpGroupSMinNonUniformAMD: - case SpvOpGroupFMaxNonUniformAMD: - case SpvOpGroupUMaxNonUniformAMD: - case SpvOpGroupSMaxNonUniformAMD: + case spv::Op::OpGroupIAddNonUniformAMD: + case spv::Op::OpGroupFAddNonUniformAMD: + case spv::Op::OpGroupFMinNonUniformAMD: + case spv::Op::OpGroupUMinNonUniformAMD: + case spv::Op::OpGroupSMinNonUniformAMD: + case spv::Op::OpGroupFMaxNonUniformAMD: + case spv::Op::OpGroupUMaxNonUniformAMD: + case spv::Op::OpGroupSMaxNonUniformAMD: if (state.HasExtension(kSPV_AMD_shader_ballot)) return CapabilitySet(); break; default: @@ -151,10 +145,10 @@ spv_result_t CheckRequiredCapabilities(ValidationState_t& state, // not implemented yet. This rule is independent of target environment. // See https://github.com/KhronosGroup/SPIRV-Tools/issues/365 if (operand.type == SPV_OPERAND_TYPE_BUILT_IN) { - switch (word) { - case SpvBuiltInPointSize: - case SpvBuiltInClipDistance: - case SpvBuiltInCullDistance: + switch (spv::BuiltIn(word)) { + case spv::BuiltIn::PointSize: + case spv::BuiltIn::ClipDistance: + case spv::BuiltIn::CullDistance: return SPV_SUCCESS; default: break; @@ -166,7 +160,7 @@ spv_result_t CheckRequiredCapabilities(ValidationState_t& state, } } else if (operand.type == SPV_OPERAND_TYPE_GROUP_OPERATION && state.features().group_ops_reduce_and_scans && - (word <= uint32_t(SpvGroupOperationExclusiveScan))) { + (word <= uint32_t(spv::GroupOperation::ExclusiveScan))) { // Allow certain group operations if requested. return SPV_SUCCESS; } @@ -178,15 +172,17 @@ spv_result_t CheckRequiredCapabilities(ValidationState_t& state, if (lookup_result == SPV_SUCCESS) { // Allow FPRoundingMode decoration if requested. if (operand.type == SPV_OPERAND_TYPE_DECORATION && - operand_desc->value == SpvDecorationFPRoundingMode) { + spv::Decoration(operand_desc->value) == + spv::Decoration::FPRoundingMode) { if (state.features().free_fp_rounding_mode) return SPV_SUCCESS; // Vulkan API requires more capabilities on rounding mode. if (spvIsVulkanEnv(state.context()->target_env)) { - enabling_capabilities.Add(SpvCapabilityStorageUniformBufferBlock16); - enabling_capabilities.Add(SpvCapabilityStorageUniform16); - enabling_capabilities.Add(SpvCapabilityStoragePushConstant16); - enabling_capabilities.Add(SpvCapabilityStorageInputOutput16); + enabling_capabilities.insert( + spv::Capability::StorageUniformBufferBlock16); + enabling_capabilities.insert(spv::Capability::StorageUniform16); + enabling_capabilities.insert(spv::Capability::StoragePushConstant16); + enabling_capabilities.insert(spv::Capability::StorageInputOutput16); } } else { enabling_capabilities = state.grammar().filterCapsAgainstTargetEnv( @@ -197,10 +193,10 @@ spv_result_t CheckRequiredCapabilities(ValidationState_t& state, // registers a capability with the module *before* checking capabilities. // So in the case of an OpCapability instruction, don't bother checking // enablement by another capability. - if (inst->opcode() != SpvOpCapability) { + if (inst->opcode() != spv::Op::OpCapability) { const bool enabled_by_cap = state.HasAnyOfCapabilities(enabling_capabilities); - if (!enabling_capabilities.IsEmpty() && !enabled_by_cap) { + if (!enabling_capabilities.empty() && !enabled_by_cap) { return state.diag(SPV_ERROR_INVALID_CAPABILITY, inst) << "Operand " << which_operand << " of " << spvOpcodeString(inst->opcode()) @@ -218,14 +214,14 @@ spv_result_t CheckRequiredCapabilities(ValidationState_t& state, // is explicitly reserved in the SPIR-V core spec. Otherwise return // SPV_SUCCESS. spv_result_t ReservedCheck(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); switch (opcode) { // These instructions are enabled by a capability, but should never // be used anyway. - case SpvOpImageSparseSampleProjImplicitLod: - case SpvOpImageSparseSampleProjExplicitLod: - case SpvOpImageSparseSampleProjDrefImplicitLod: - case SpvOpImageSparseSampleProjDrefExplicitLod: { + case spv::Op::OpImageSparseSampleProjImplicitLod: + case spv::Op::OpImageSparseSampleProjExplicitLod: + case spv::Op::OpImageSparseSampleProjDrefImplicitLod: + case spv::Op::OpImageSparseSampleProjDrefExplicitLod: { spv_opcode_desc inst_desc; _.grammar().lookupOpcode(opcode, &inst_desc); return _.diag(SPV_ERROR_INVALID_BINARY, inst) @@ -241,7 +237,7 @@ spv_result_t ReservedCheck(ValidationState_t& _, const Instruction* inst) { // instruction is invalid because the required capability isn't declared // in the module. spv_result_t CapabilityCheck(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); CapabilitySet opcode_caps = EnablingCapabilitiesForOp(_, opcode); if (!_.HasAnyOfCapabilities(opcode_caps)) { return _.diag(SPV_ERROR_INVALID_CAPABILITY, inst) @@ -297,9 +293,9 @@ spv_result_t VersionCheck(ValidationState_t& _, const Instruction* inst) { } // OpTerminateInvocation is special because it is enabled by Shader - // capability, but also requries a extension and/or version check. + // capability, but also requires an extension and/or version check. const bool capability_check_is_sufficient = - inst->opcode() != SpvOpTerminateInvocation; + inst->opcode() != spv::Op::OpTerminateInvocation; if (capability_check_is_sufficient && (inst_desc->numCapabilities > 0u)) { // We already checked that the direct capability dependency has been @@ -308,7 +304,7 @@ spv_result_t VersionCheck(ValidationState_t& _, const Instruction* inst) { } ExtensionSet exts(inst_desc->numExtensions, inst_desc->extensions); - if (exts.IsEmpty()) { + if (exts.empty()) { // If no extensions can enable this instruction, then emit error // messages only concerning core SPIR-V versions if errors happen. if (min_version == ~0u) { @@ -357,7 +353,7 @@ spv_result_t LimitCheckIdBound(ValidationState_t& _, const Instruction* inst) { // Checks that the number of OpTypeStruct members is within the limit. spv_result_t LimitCheckStruct(ValidationState_t& _, const Instruction* inst) { - if (SpvOpTypeStruct != inst->opcode()) { + if (spv::Op::OpTypeStruct != inst->opcode()) { return SPV_SUCCESS; } @@ -382,7 +378,7 @@ spv_result_t LimitCheckStruct(ValidationState_t& _, const Instruction* inst) { for (size_t word_i = 2; word_i < inst->words().size(); ++word_i) { auto member = inst->word(word_i); auto memberTypeInstr = _.FindDef(member); - if (memberTypeInstr && SpvOpTypeStruct == memberTypeInstr->opcode()) { + if (memberTypeInstr && spv::Op::OpTypeStruct == memberTypeInstr->opcode()) { max_member_depth = std::max( max_member_depth, _.struct_nesting_depth(memberTypeInstr->id())); } @@ -402,11 +398,11 @@ spv_result_t LimitCheckStruct(ValidationState_t& _, const Instruction* inst) { // Checks that the number of (literal, label) pairs in OpSwitch is within // the limit. spv_result_t LimitCheckSwitch(ValidationState_t& _, const Instruction* inst) { - if (SpvOpSwitch == inst->opcode()) { + if (spv::Op::OpSwitch == inst->opcode()) { // The instruction syntax is as follows: // OpSwitch literal label literal label ... // literal,label pairs come after the first 2 operands. - // It is guaranteed at this point that num_operands is an even numner. + // It is guaranteed at this point that num_operands is an even number. size_t num_pairs = (inst->operands().size() - 2) / 2; const unsigned int num_pairs_limit = _.options()->universal_limits_.max_switch_branches; @@ -422,8 +418,8 @@ spv_result_t LimitCheckSwitch(ValidationState_t& _, const Instruction* inst) { // Ensure the number of variables of the given class does not exceed the // limit. spv_result_t LimitCheckNumVars(ValidationState_t& _, const uint32_t var_id, - const SpvStorageClass storage_class) { - if (SpvStorageClassFunction == storage_class) { + const spv::StorageClass storage_class) { + if (spv::StorageClass::Function == storage_class) { _.registerLocalVariable(var_id); const uint32_t num_local_vars_limit = _.options()->universal_limits_.max_local_variables; @@ -462,27 +458,44 @@ spv_result_t CheckIfKnownExtension(ValidationState_t& _, } // namespace spv_result_t InstructionPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); - if (opcode == SpvOpExtension) { + const spv::Op opcode = inst->opcode(); + if (opcode == spv::Op::OpExtension) { CheckIfKnownExtension(_, inst); - } else if (opcode == SpvOpCapability) { - _.RegisterCapability(inst->GetOperandAs(0)); - } else if (opcode == SpvOpMemoryModel) { + } else if (opcode == spv::Op::OpCapability) { + _.RegisterCapability(inst->GetOperandAs(0)); + } else if (opcode == spv::Op::OpMemoryModel) { if (_.has_memory_model_specified()) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "OpMemoryModel should only be provided once."; } - _.set_addressing_model(inst->GetOperandAs(0)); - _.set_memory_model(inst->GetOperandAs(1)); - } else if (opcode == SpvOpExecutionMode) { + _.set_addressing_model(inst->GetOperandAs(0)); + _.set_memory_model(inst->GetOperandAs(1)); + } else if (opcode == spv::Op::OpExecutionMode || + opcode == spv::Op::OpExecutionModeId) { const uint32_t entry_point = inst->word(1); _.RegisterExecutionModeForEntryPoint(entry_point, - SpvExecutionMode(inst->word(2))); - } else if (opcode == SpvOpVariable) { - const auto storage_class = inst->GetOperandAs(2); + spv::ExecutionMode(inst->word(2))); + } else if (opcode == spv::Op::OpVariable) { + const auto storage_class = inst->GetOperandAs(2); if (auto error = LimitCheckNumVars(_, inst->id(), storage_class)) { return error; } + } else if (opcode == spv::Op::OpSamplerImageAddressingModeNV) { + if (!_.HasCapability(spv::Capability::BindlessTextureNV)) { + return _.diag(SPV_ERROR_MISSING_EXTENSION, inst) + << "OpSamplerImageAddressingModeNV supported only with extension " + "SPV_NV_bindless_texture"; + } + uint32_t bitwidth = inst->GetOperandAs(0); + if (_.samplerimage_variable_address_mode() != 0) { + return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) + << "OpSamplerImageAddressingModeNV should only be provided once"; + } + if (bitwidth != 32 && bitwidth != 64) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "OpSamplerImageAddressingModeNV bitwidth should be 64 or 32"; + } + _.set_samplerimage_variable_address_mode(bitwidth); } if (auto error = ReservedCheck(_, inst)) return error; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_interfaces.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_interfaces.cpp index adf2e4724..ace548aa1 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_interfaces.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_interfaces.cpp @@ -15,7 +15,6 @@ #include #include -#include "source/diagnostic.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" #include "source/val/function.h" @@ -35,12 +34,15 @@ const uint32_t kMaxLocations = 4096 * 4; bool is_interface_variable(const Instruction* inst, bool is_spv_1_4) { if (is_spv_1_4) { // Starting in SPIR-V 1.4, all global variables are interface variables. - return inst->opcode() == SpvOpVariable && - inst->word(3u) != SpvStorageClassFunction; + return inst->opcode() == spv::Op::OpVariable && + inst->GetOperandAs(2u) != + spv::StorageClass::Function; } else { - return inst->opcode() == SpvOpVariable && - (inst->word(3u) == SpvStorageClassInput || - inst->word(3u) == SpvStorageClassOutput); + return inst->opcode() == spv::Op::OpVariable && + (inst->GetOperandAs(2u) == + spv::StorageClass::Input || + inst->GetOperandAs(2u) == + spv::StorageClass::Output); } } @@ -114,29 +116,30 @@ spv_result_t NumConsumedLocations(ValidationState_t& _, const Instruction* type, uint32_t* num_locations) { *num_locations = 0; switch (type->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: // Scalars always consume a single location. *num_locations = 1; break; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: // 3- and 4-component 64-bit vectors consume two locations. - if ((_.ContainsSizedIntOrFloatType(type->id(), SpvOpTypeInt, 64) || - _.ContainsSizedIntOrFloatType(type->id(), SpvOpTypeFloat, 64)) && + if ((_.ContainsSizedIntOrFloatType(type->id(), spv::Op::OpTypeInt, 64) || + _.ContainsSizedIntOrFloatType(type->id(), spv::Op::OpTypeFloat, + 64)) && (type->GetOperandAs(2) > 2)) { *num_locations = 2; } else { *num_locations = 1; } break; - case SpvOpTypeMatrix: + case spv::Op::OpTypeMatrix: // Matrices consume locations equal to the underlying vector type for // each column. NumConsumedLocations(_, _.FindDef(type->GetOperandAs(1)), num_locations); *num_locations *= type->GetOperandAs(2); break; - case SpvOpTypeArray: { + case spv::Op::OpTypeArray: { // Arrays consume locations equal to the underlying type times the number // of elements in the vector. NumConsumedLocations(_, _.FindDef(type->GetOperandAs(1)), @@ -150,9 +153,9 @@ spv_result_t NumConsumedLocations(ValidationState_t& _, const Instruction* type, if (is_int && is_const) *num_locations *= value; break; } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { // Members cannot have location decorations at this point. - if (_.HasDecoration(type->id(), SpvDecorationLocation)) { + if (_.HasDecoration(type->id(), spv::Decoration::Location)) { return _.diag(SPV_ERROR_INVALID_DATA, type) << _.VkErrorID(4918) << "Members cannot be assigned a location"; } @@ -170,8 +173,19 @@ spv_result_t NumConsumedLocations(ValidationState_t& _, const Instruction* type, } break; } + case spv::Op::OpTypePointer: { + if (_.addressing_model() == + spv::AddressingModel::PhysicalStorageBuffer64 && + type->GetOperandAs(1) == + spv::StorageClass::PhysicalStorageBuffer) { + *num_locations = 1; + break; + } + [[fallthrough]]; + } default: - break; + return _.diag(SPV_ERROR_INVALID_DATA, type) + << "Invalid type to assign a location"; } return SPV_SUCCESS; @@ -182,8 +196,8 @@ spv_result_t NumConsumedLocations(ValidationState_t& _, const Instruction* type, uint32_t NumConsumedComponents(ValidationState_t& _, const Instruction* type) { uint32_t num_components = 0; switch (type->opcode()) { - case SpvOpTypeInt: - case SpvOpTypeFloat: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: // 64-bit types consume two components. if (type->GetOperandAs(1) == 64) { num_components = 2; @@ -191,7 +205,7 @@ uint32_t NumConsumedComponents(ValidationState_t& _, const Instruction* type) { num_components = 1; } break; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: // Vectors consume components equal to the underlying type's consumption // times the number of elements in the vector. Note that 3- and 4-element // vectors cannot have a component decoration (i.e. assumed to be zero). @@ -199,10 +213,18 @@ uint32_t NumConsumedComponents(ValidationState_t& _, const Instruction* type) { NumConsumedComponents(_, _.FindDef(type->GetOperandAs(1))); num_components *= type->GetOperandAs(2); break; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: // Skip the array. return NumConsumedComponents(_, _.FindDef(type->GetOperandAs(1))); + case spv::Op::OpTypePointer: + if (_.addressing_model() == + spv::AddressingModel::PhysicalStorageBuffer64 && + type->GetOperandAs(1) == + spv::StorageClass::PhysicalStorageBuffer) { + return 2; + } + break; default: // This is an error that is validated elsewhere. break; @@ -218,10 +240,10 @@ spv_result_t GetLocationsForVariable( ValidationState_t& _, const Instruction* entry_point, const Instruction* variable, std::unordered_set* locations, std::unordered_set* output_index1_locations) { - const bool is_fragment = entry_point->GetOperandAs(0) == - SpvExecutionModelFragment; + const bool is_fragment = entry_point->GetOperandAs(0) == + spv::ExecutionModel::Fragment; const bool is_output = - variable->GetOperandAs(2) == SpvStorageClassOutput; + variable->GetOperandAs(2) == spv::StorageClass::Output; auto ptr_type_id = variable->GetOperandAs(0); auto ptr_type = _.FindDef(ptr_type_id); auto type_id = ptr_type->GetOperandAs(2); @@ -232,48 +254,47 @@ spv_result_t GetLocationsForVariable( // equal. Also track Patch and PerTaskNV decorations. bool has_location = false; uint32_t location = 0; - bool has_component = false; uint32_t component = 0; bool has_index = false; uint32_t index = 0; bool has_patch = false; bool has_per_task_nv = false; - bool has_per_vertex_nv = false; + bool has_per_vertex_khr = false; + // Duplicate Location, Component, Index are checked elsewhere. for (auto& dec : _.id_decorations(variable->id())) { - if (dec.dec_type() == SpvDecorationLocation) { - if (has_location && dec.params()[0] != location) { - return _.diag(SPV_ERROR_INVALID_DATA, variable) - << "Variable has conflicting location decorations"; - } + if (dec.dec_type() == spv::Decoration::Location) { has_location = true; location = dec.params()[0]; - } else if (dec.dec_type() == SpvDecorationComponent) { - if (has_component && dec.params()[0] != component) { - return _.diag(SPV_ERROR_INVALID_DATA, variable) - << "Variable has conflicting component decorations"; - } - has_component = true; + } else if (dec.dec_type() == spv::Decoration::Component) { component = dec.params()[0]; - } else if (dec.dec_type() == SpvDecorationIndex) { + } else if (dec.dec_type() == spv::Decoration::Index) { if (!is_output || !is_fragment) { return _.diag(SPV_ERROR_INVALID_DATA, variable) << "Index can only be applied to Fragment output variables"; } - if (has_index && dec.params()[0] != index) { - return _.diag(SPV_ERROR_INVALID_DATA, variable) - << "Variable has conflicting index decorations"; - } has_index = true; index = dec.params()[0]; - } else if (dec.dec_type() == SpvDecorationBuiltIn) { + } else if (dec.dec_type() == spv::Decoration::BuiltIn) { // Don't check built-ins. return SPV_SUCCESS; - } else if (dec.dec_type() == SpvDecorationPatch) { + } else if (dec.dec_type() == spv::Decoration::Patch) { has_patch = true; - } else if (dec.dec_type() == SpvDecorationPerTaskNV) { + } else if (dec.dec_type() == spv::Decoration::PerTaskNV) { has_per_task_nv = true; - } else if (dec.dec_type() == SpvDecorationPerVertexNV) { - has_per_vertex_nv = true; + } else if (dec.dec_type() == spv::Decoration::PerVertexKHR) { + if (!is_fragment) { + return _.diag(SPV_ERROR_INVALID_DATA, variable) + << _.VkErrorID(6777) + << "PerVertexKHR can only be applied to Fragment Execution " + "Models"; + } + if (type->opcode() != spv::Op::OpTypeArray && + type->opcode() != spv::Op::OpTypeRuntimeArray) { + return _.diag(SPV_ERROR_INVALID_DATA, variable) + << _.VkErrorID(6778) + << "PerVertexKHR must be declared as arrays"; + } + has_per_vertex_khr = true; } } @@ -281,28 +302,28 @@ spv_result_t GetLocationsForVariable( // tessellation control, evaluation and geometry per-vertex inputs have a // layer of arraying that is not included in interface matching. bool is_arrayed = false; - switch (entry_point->GetOperandAs(0)) { - case SpvExecutionModelTessellationControl: + switch (entry_point->GetOperandAs(0)) { + case spv::ExecutionModel::TessellationControl: if (!has_patch) { is_arrayed = true; } break; - case SpvExecutionModelTessellationEvaluation: + case spv::ExecutionModel::TessellationEvaluation: if (!is_output && !has_patch) { is_arrayed = true; } break; - case SpvExecutionModelGeometry: + case spv::ExecutionModel::Geometry: if (!is_output) { is_arrayed = true; } break; - case SpvExecutionModelFragment: - if (!is_output && has_per_vertex_nv) { + case spv::ExecutionModel::Fragment: + if (!is_output && has_per_vertex_khr) { is_arrayed = true; } break; - case SpvExecutionModelMeshNV: + case spv::ExecutionModel::MeshNV: if (is_output && !has_per_task_nv) { is_arrayed = true; } @@ -312,21 +333,21 @@ spv_result_t GetLocationsForVariable( } // Unpack arrayness. - if (is_arrayed && (type->opcode() == SpvOpTypeArray || - type->opcode() == SpvOpTypeRuntimeArray)) { + if (is_arrayed && (type->opcode() == spv::Op::OpTypeArray || + type->opcode() == spv::Op::OpTypeRuntimeArray)) { type_id = type->GetOperandAs(1); type = _.FindDef(type_id); } - if (type->opcode() == SpvOpTypeStruct) { + if (type->opcode() == spv::Op::OpTypeStruct) { // Don't check built-ins. - if (_.HasDecoration(type_id, SpvDecorationBuiltIn)) return SPV_SUCCESS; + if (_.HasDecoration(type_id, spv::Decoration::BuiltIn)) return SPV_SUCCESS; } // Only block-decorated structs don't need a location on the variable. - const bool is_block = _.HasDecoration(type_id, SpvDecorationBlock); + const bool is_block = _.HasDecoration(type_id, spv::Decoration::Block); if (!has_location && !is_block) { - const auto vuid = (type->opcode() == SpvOpTypeStruct) ? 4917 : 4916; + const auto vuid = (type->opcode() == spv::Op::OpTypeStruct) ? 4917 : 4916; return _.diag(SPV_ERROR_INVALID_DATA, variable) << _.VkErrorID(vuid) << "Variable must be decorated with a location"; } @@ -339,7 +360,7 @@ spv_result_t GetLocationsForVariable( uint32_t array_size = 1; // If the variable is still arrayed, mark the locations/components per // index. - if (type->opcode() == SpvOpTypeArray) { + if (type->opcode() == spv::Op::OpTypeArray) { // Determine the array size if possible and get the element type. std::tie(is_int, is_const, array_size) = _.EvalInt32IfConst(type->GetOperandAs(2)); @@ -348,12 +369,12 @@ spv_result_t GetLocationsForVariable( sub_type = _.FindDef(sub_type_id); } - for (uint32_t array_idx = 0; array_idx < array_size; ++array_idx) { - uint32_t num_locations = 0; - if (auto error = NumConsumedLocations(_, sub_type, &num_locations)) - return error; + uint32_t num_locations = 0; + if (auto error = NumConsumedLocations(_, sub_type, &num_locations)) + return error; + uint32_t num_components = NumConsumedComponents(_, sub_type); - uint32_t num_components = NumConsumedComponents(_, sub_type); + for (uint32_t array_idx = 0; array_idx < array_size; ++array_idx) { uint32_t array_location = location + (num_locations * array_idx); uint32_t start = array_location * 4; if (kMaxLocations <= start) { @@ -373,6 +394,7 @@ spv_result_t GetLocationsForVariable( for (uint32_t i = start; i < end; ++i) { if (!locs->insert(i).second) { return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << (is_output ? _.VkErrorID(8722) : _.VkErrorID(8721)) << "Entry-point has conflicting " << storage_class << " location assignment at location " << i / 4 << ", component " << i % 4; @@ -387,7 +409,7 @@ spv_result_t GetLocationsForVariable( std::unordered_map member_locations; std::unordered_map member_components; for (auto& dec : _.id_decorations(type_id)) { - if (dec.dec_type() == SpvDecorationLocation) { + if (dec.dec_type() == spv::Decoration::Location) { auto where = member_locations.find(dec.struct_member_index()); if (where == member_locations.end()) { member_locations[dec.struct_member_index()] = dec.params()[0]; @@ -396,7 +418,7 @@ spv_result_t GetLocationsForVariable( << "Member index " << dec.struct_member_index() << " has conflicting location assignments"; } - } else if (dec.dec_type() == SpvDecorationComponent) { + } else if (dec.dec_type() == spv::Decoration::Component) { auto where = member_components.find(dec.struct_member_index()); if (where == member_components.end()) { member_components[dec.struct_member_index()] = dec.params()[0]; @@ -435,7 +457,7 @@ spv_result_t GetLocationsForVariable( continue; } - if (member->opcode() == SpvOpTypeArray && num_components >= 1 && + if (member->opcode() == spv::Op::OpTypeArray && num_components >= 1 && num_components < 4) { // When an array has an element that takes less than a location in // size, calculate the used locations in a strided manner. @@ -444,6 +466,7 @@ spv_result_t GetLocationsForVariable( uint32_t check = 4 * l + c; if (!locations->insert(check).second) { return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << (is_output ? _.VkErrorID(8722) : _.VkErrorID(8721)) << "Entry-point has conflicting " << storage_class << " location assignment at location " << l << ", component " << c; @@ -461,6 +484,7 @@ spv_result_t GetLocationsForVariable( for (uint32_t l = start; l < end; ++l) { if (!locations->insert(l).second) { return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << (is_output ? _.VkErrorID(8722) : _.VkErrorID(8721)) << "Entry-point has conflicting " << storage_class << " location assignment at location " << l / 4 << ", component " << l % 4; @@ -480,12 +504,12 @@ spv_result_t ValidateLocations(ValidationState_t& _, // TODO(dneto): SPV_NV_ray_tracing also uses locations on interface variables, // in other shader stages. Similarly, the *provisional* version of // SPV_KHR_ray_tracing did as well, but not the final version. - switch (entry_point->GetOperandAs(0)) { - case SpvExecutionModelVertex: - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - case SpvExecutionModelGeometry: - case SpvExecutionModelFragment: + switch (entry_point->GetOperandAs(0)) { + case spv::ExecutionModel::Vertex: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::Fragment: break; default: return SPV_SUCCESS; @@ -499,9 +523,9 @@ spv_result_t ValidateLocations(ValidationState_t& _, for (uint32_t i = 3; i < entry_point->operands().size(); ++i) { auto interface_id = entry_point->GetOperandAs(i); auto interface_var = _.FindDef(interface_id); - auto storage_class = interface_var->GetOperandAs(2); - if (storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { + auto storage_class = interface_var->GetOperandAs(2); + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { continue; } if (!seen.insert(interface_id).second) { @@ -510,7 +534,7 @@ spv_result_t ValidateLocations(ValidationState_t& _, continue; } - auto locations = (storage_class == SpvStorageClassInput) + auto locations = (storage_class == spv::StorageClass::Input) ? &input_locations : &output_locations_index0; if (auto error = GetLocationsForVariable( @@ -521,6 +545,64 @@ spv_result_t ValidateLocations(ValidationState_t& _, return SPV_SUCCESS; } +spv_result_t ValidateStorageClass(ValidationState_t& _, + const Instruction* entry_point) { + bool has_push_constant = false; + bool has_ray_payload = false; + bool has_hit_attribute = false; + bool has_callable_data = false; + for (uint32_t i = 3; i < entry_point->operands().size(); ++i) { + auto interface_id = entry_point->GetOperandAs(i); + auto interface_var = _.FindDef(interface_id); + auto storage_class = interface_var->GetOperandAs(2); + switch (storage_class) { + case spv::StorageClass::PushConstant: { + if (has_push_constant) { + return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << _.VkErrorID(6673) + << "Entry-point has more than one variable with the " + "PushConstant storage class in the interface"; + } + has_push_constant = true; + break; + } + case spv::StorageClass::IncomingRayPayloadKHR: { + if (has_ray_payload) { + return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << _.VkErrorID(4700) + << "Entry-point has more than one variable with the " + "IncomingRayPayloadKHR storage class in the interface"; + } + has_ray_payload = true; + break; + } + case spv::StorageClass::HitAttributeKHR: { + if (has_hit_attribute) { + return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << _.VkErrorID(4702) + << "Entry-point has more than one variable with the " + "HitAttributeKHR storage class in the interface"; + } + has_hit_attribute = true; + break; + } + case spv::StorageClass::IncomingCallableDataKHR: { + if (has_callable_data) { + return _.diag(SPV_ERROR_INVALID_DATA, entry_point) + << _.VkErrorID(4706) + << "Entry-point has more than one variable with the " + "IncomingCallableDataKHR storage class in the interface"; + } + has_callable_data = true; + break; + } + default: + break; + } + } + return SPV_SUCCESS; +} + } // namespace spv_result_t ValidateInterfaces(ValidationState_t& _) { @@ -535,12 +617,15 @@ spv_result_t ValidateInterfaces(ValidationState_t& _) { if (spvIsVulkanEnv(_.context()->target_env)) { for (auto& inst : _.ordered_instructions()) { - if (inst.opcode() == SpvOpEntryPoint) { + if (inst.opcode() == spv::Op::OpEntryPoint) { if (auto error = ValidateLocations(_, &inst)) { return error; } + if (auto error = ValidateStorageClass(_, &inst)) { + return error; + } } - if (inst.opcode() == SpvOpTypeVoid) break; + if (inst.opcode() == spv::Op::OpTypeVoid) break; } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_layout.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_layout.cpp index d5823219d..dbc1f1e5d 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_layout.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_layout.cpp @@ -14,12 +14,9 @@ // Source code for logical layout validation as described in section 2.4 -#include - #include "DebugInfo.h" #include "NonSemanticShaderDebugInfo100.h" #include "OpenCLDebugInfo100.h" -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/operand.h" #include "source/val/function.h" @@ -35,9 +32,9 @@ namespace { // is part of the current layout section. If it is not then the next sections is // checked. spv_result_t ModuleScopedInstructions(ValidationState_t& _, - const Instruction* inst, SpvOp opcode) { + const Instruction* inst, spv::Op opcode) { switch (opcode) { - case SpvOpExtInst: + case spv::Op::OpExtInst: if (spvExtInstIsDebugInfo(inst->ext_inst_type())) { const uint32_t ext_inst_index = inst->word(4); bool local_debug_info = false; @@ -131,7 +128,7 @@ spv_result_t ModuleScopedInstructions(ValidationState_t& _, switch (_.current_layout_section()) { case kLayoutMemoryModel: - if (opcode != SpvOpMemoryModel) { + if (opcode != spv::Op::OpMemoryModel) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << spvOpcodeString(opcode) << " cannot appear before the memory model instruction"; @@ -154,7 +151,8 @@ spv_result_t ModuleScopedInstructions(ValidationState_t& _, // inside of another function. This stage ends when the first label is // encountered inside of a function. spv_result_t FunctionScopedInstructions(ValidationState_t& _, - const Instruction* inst, SpvOp opcode) { + const Instruction* inst, + spv::Op opcode) { // Make sure we advance into the function definitions when we hit // non-function declaration instructions. if (_.current_layout_section() == kLayoutFunctionDeclarations && @@ -171,12 +169,12 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, if (_.IsOpcodeInCurrentLayoutSection(opcode)) { switch (opcode) { - case SpvOpFunction: { + case spv::Op::OpFunction: { if (_.in_function_body()) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Cannot declare a function in a function body"; } - auto control_mask = inst->GetOperandAs(2); + auto control_mask = inst->GetOperandAs(2); if (auto error = _.RegisterFunction(inst->id(), inst->type_id(), control_mask, inst->GetOperandAs(3))) @@ -188,7 +186,7 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, } } break; - case SpvOpFunctionParameter: + case spv::Op::OpFunctionParameter: if (_.in_function_body() == false) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Function parameter instructions must be in a " @@ -204,7 +202,7 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, return error; break; - case SpvOpFunctionEnd: + case spv::Op::OpFunctionEnd: if (_.in_function_body() == false) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Function end instructions must be in a function body"; @@ -227,10 +225,10 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, if (auto error = _.RegisterFunctionEnd()) return error; break; - case SpvOpLine: - case SpvOpNoLine: + case spv::Op::OpLine: + case spv::Op::OpNoLine: break; - case SpvOpLabel: + case spv::Op::OpLabel: // If the label is encountered then the current function is a // definition so set the function to a declaration and update the // module section @@ -244,7 +242,7 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, } break; - case SpvOpExtInst: + case spv::Op::OpExtInst: if (spvExtInstIsDebugInfo(inst->ext_inst_type())) { const uint32_t ext_inst_index = inst->word(4); bool local_debug_info = false; @@ -356,13 +354,14 @@ spv_result_t FunctionScopedInstructions(ValidationState_t& _, // NOTE: This function does not handle CFG related validation // Performs logical layout validation. See Section 2.4 spv_result_t ModuleLayoutPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); switch (_.current_layout_section()) { case kLayoutCapabilities: case kLayoutExtensions: case kLayoutExtInstImport: case kLayoutMemoryModel: + case kLayoutSamplerImageAddressMode: case kLayoutEntryPoint: case kLayoutExecutionMode: case kLayoutDebug1: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_literals.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_literals.cpp index 53aae0767..15cc27a92 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_literals.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_literals.cpp @@ -14,13 +14,10 @@ // Validates literal numbers. -#include "source/val/validate.h" - #include -#include "source/diagnostic.h" -#include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_logicals.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_logicals.cpp index bb35f558e..4479e4395 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_logicals.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_logicals.cpp @@ -14,11 +14,9 @@ // Validates correctness of logical SPIR-V instructions. -#include "source/val/validate.h" - -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -26,12 +24,12 @@ namespace val { // Validates correctness of logical instructions. spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const uint32_t result_type = inst->type_id(); switch (opcode) { - case SpvOpAny: - case SpvOpAll: { + case spv::Op::OpAny: + case spv::Op::OpAll: { if (!_.IsBoolScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar type as Result Type: " @@ -46,11 +44,11 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpIsNan: - case SpvOpIsInf: - case SpvOpIsFinite: - case SpvOpIsNormal: - case SpvOpSignBitSet: { + case spv::Op::OpIsNan: + case spv::Op::OpIsInf: + case spv::Op::OpIsFinite: + case spv::Op::OpIsNormal: + case spv::Op::OpSignBitSet: { if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar or vector type as Result Type: " @@ -72,21 +70,21 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpFOrdEqual: - case SpvOpFUnordEqual: - case SpvOpFOrdNotEqual: - case SpvOpFUnordNotEqual: - case SpvOpFOrdLessThan: - case SpvOpFUnordLessThan: - case SpvOpFOrdGreaterThan: - case SpvOpFUnordGreaterThan: - case SpvOpFOrdLessThanEqual: - case SpvOpFUnordLessThanEqual: - case SpvOpFOrdGreaterThanEqual: - case SpvOpFUnordGreaterThanEqual: - case SpvOpLessOrGreater: - case SpvOpOrdered: - case SpvOpUnordered: { + case spv::Op::OpFOrdEqual: + case spv::Op::OpFUnordEqual: + case spv::Op::OpFOrdNotEqual: + case spv::Op::OpFUnordNotEqual: + case spv::Op::OpFOrdLessThan: + case spv::Op::OpFUnordLessThan: + case spv::Op::OpFOrdGreaterThan: + case spv::Op::OpFUnordGreaterThan: + case spv::Op::OpFOrdLessThanEqual: + case spv::Op::OpFUnordLessThanEqual: + case spv::Op::OpFOrdGreaterThanEqual: + case spv::Op::OpFUnordGreaterThanEqual: + case spv::Op::OpLessOrGreater: + case spv::Op::OpOrdered: + case spv::Op::OpUnordered: { if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar or vector type as Result Type: " @@ -113,10 +111,10 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpLogicalEqual: - case SpvOpLogicalNotEqual: - case SpvOpLogicalOr: - case SpvOpLogicalAnd: { + case spv::Op::OpLogicalEqual: + case spv::Op::OpLogicalNotEqual: + case spv::Op::OpLogicalOr: + case spv::Op::OpLogicalAnd: { if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar or vector type as Result Type: " @@ -131,7 +129,7 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpLogicalNot: { + case spv::Op::OpLogicalNot: { if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar or vector type as Result Type: " @@ -145,7 +143,7 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { break; } - case SpvOpSelect: { + case spv::Op::OpSelect: { uint32_t dimension = 1; { const Instruction* type_inst = _.FindDef(result_type); @@ -159,33 +157,42 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { << " type as Result Type: " << spvOpcodeString(opcode); }; - const SpvOp type_opcode = type_inst->opcode(); + const spv::Op type_opcode = type_inst->opcode(); switch (type_opcode) { - case SpvOpTypePointer: { - if (_.addressing_model() == SpvAddressingModelLogical && - !_.features().variable_pointers && - !_.features().variable_pointers_storage_buffer) + case spv::Op::OpTypePointer: { + if (_.addressing_model() == spv::AddressingModel::Logical && + !_.features().variable_pointers) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Using pointers with OpSelect requires capability " << "VariablePointers or VariablePointersStorageBuffer"; break; } - case SpvOpTypeVector: { + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampler: { + if (!_.HasCapability(spv::Capability::BindlessTextureNV)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Using image/sampler with OpSelect requires capability " + << "BindlessTextureNV"; + break; + } + + case spv::Op::OpTypeVector: { dimension = type_inst->word(3); break; } - case SpvOpTypeBool: - case SpvOpTypeInt: - case SpvOpTypeFloat: { + case spv::Op::OpTypeBool: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeFloat: { break; } // Not RuntimeArray because of other rules. - case SpvOpTypeArray: - case SpvOpTypeMatrix: - case SpvOpTypeStruct: { + case spv::Op::OpTypeArray: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeStruct: { if (!composites) return fail(); break; } @@ -226,16 +233,16 @@ spv_result_t LogicalsPass(ValidationState_t& _, const Instruction* inst) { } } - case SpvOpIEqual: - case SpvOpINotEqual: - case SpvOpUGreaterThan: - case SpvOpUGreaterThanEqual: - case SpvOpULessThan: - case SpvOpULessThanEqual: - case SpvOpSGreaterThan: - case SpvOpSGreaterThanEqual: - case SpvOpSLessThan: - case SpvOpSLessThanEqual: { + case spv::Op::OpIEqual: + case spv::Op::OpINotEqual: + case spv::Op::OpUGreaterThan: + case spv::Op::OpUGreaterThanEqual: + case spv::Op::OpULessThan: + case spv::Op::OpULessThanEqual: + case spv::Op::OpSGreaterThan: + case spv::Op::OpSGreaterThanEqual: + case spv::Op::OpSLessThan: + case spv::Op::OpSLessThanEqual: { if (!_.IsBoolScalarType(result_type) && !_.IsBoolVectorType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected bool scalar or vector type as Result Type: " diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory.cpp index 93b180004..2d6715f42 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory.cpp @@ -35,17 +35,17 @@ bool HaveLayoutCompatibleMembers(ValidationState_t&, const Instruction*, const Instruction*); bool HaveSameLayoutDecorations(ValidationState_t&, const Instruction*, const Instruction*); -bool HasConflictingMemberOffsets(const std::vector&, - const std::vector&); +bool HasConflictingMemberOffsets(const std::set&, + const std::set&); bool IsAllowedTypeOrArrayOfSame(ValidationState_t& _, const Instruction* type, - std::initializer_list allowed) { + std::initializer_list allowed) { if (std::find(allowed.begin(), allowed.end(), type->opcode()) != allowed.end()) { return true; } - if (type->opcode() == SpvOpTypeArray || - type->opcode() == SpvOpTypeRuntimeArray) { + if (type->opcode() == spv::Op::OpTypeArray || + type->opcode() == spv::Op::OpTypeRuntimeArray) { auto elem_type = _.FindDef(type->word(2)); return std::find(allowed.begin(), allowed.end(), elem_type->opcode()) != allowed.end(); @@ -57,10 +57,10 @@ bool IsAllowedTypeOrArrayOfSame(ValidationState_t& _, const Instruction* type, // validator can tell, have the exact same data layout. bool AreLayoutCompatibleStructs(ValidationState_t& _, const Instruction* type1, const Instruction* type2) { - if (type1->opcode() != SpvOpTypeStruct) { + if (type1->opcode() != spv::Op::OpTypeStruct) { return false; } - if (type2->opcode() != SpvOpTypeStruct) { + if (type2->opcode() != spv::Op::OpTypeStruct) { return false; } @@ -74,9 +74,9 @@ bool AreLayoutCompatibleStructs(ValidationState_t& _, const Instruction* type1, // be OpTypeStruct instructions. bool HaveLayoutCompatibleMembers(ValidationState_t& _, const Instruction* type1, const Instruction* type2) { - assert(type1->opcode() == SpvOpTypeStruct && + assert(type1->opcode() == spv::Op::OpTypeStruct && "type1 must be an OpTypeStruct instruction."); - assert(type2->opcode() == SpvOpTypeStruct && + assert(type2->opcode() == spv::Op::OpTypeStruct && "type2 must be an OpTypeStruct instruction."); const auto& type1_operands = type1->operands(); const auto& type2_operands = type2->operands(); @@ -101,14 +101,12 @@ bool HaveLayoutCompatibleMembers(ValidationState_t& _, const Instruction* type1, // OpTypeStruct instructions. bool HaveSameLayoutDecorations(ValidationState_t& _, const Instruction* type1, const Instruction* type2) { - assert(type1->opcode() == SpvOpTypeStruct && + assert(type1->opcode() == spv::Op::OpTypeStruct && "type1 must be an OpTypeStruct instruction."); - assert(type2->opcode() == SpvOpTypeStruct && + assert(type2->opcode() == spv::Op::OpTypeStruct && "type2 must be an OpTypeStruct instruction."); - const std::vector& type1_decorations = - _.id_decorations(type1->id()); - const std::vector& type2_decorations = - _.id_decorations(type2->id()); + const std::set& type1_decorations = _.id_decorations(type1->id()); + const std::set& type2_decorations = _.id_decorations(type2->id()); // TODO: Will have to add other check for arrays an matricies if we want to // handle them. @@ -120,8 +118,8 @@ bool HaveSameLayoutDecorations(ValidationState_t& _, const Instruction* type1, } bool HasConflictingMemberOffsets( - const std::vector& type1_decorations, - const std::vector& type2_decorations) { + const std::set& type1_decorations, + const std::set& type2_decorations) { { // We are interested in conflicting decoration. If a decoration is in one // list but not the other, then we will assume the code is correct. We are @@ -132,11 +130,11 @@ bool HasConflictingMemberOffsets( // type1_decoration. Therefore, it cannot lead to a conflict. for (const Decoration& decoration : type1_decorations) { switch (decoration.dec_type()) { - case SpvDecorationOffset: { + case spv::Decoration::Offset: { // Since these affect the layout of the struct, they must be present // in both structs. auto compare = [&decoration](const Decoration& rhs) { - if (rhs.dec_type() != SpvDecorationOffset) return false; + if (rhs.dec_type() != spv::Decoration::Offset) return false; return decoration.struct_member_index() == rhs.struct_member_index(); }; @@ -165,7 +163,7 @@ bool ContainsInvalidBool(ValidationState_t& _, const Instruction* storage, bool skip_builtin) { if (skip_builtin) { for (const Decoration& decoration : _.id_decorations(storage->id())) { - if (decoration.dec_type() == SpvDecorationBuiltIn) return false; + if (decoration.dec_type() == spv::Decoration::BuiltIn) return false; } } @@ -174,16 +172,16 @@ bool ContainsInvalidBool(ValidationState_t& _, const Instruction* storage, Instruction* elem_type; switch (storage->opcode()) { - case SpvOpTypeBool: + case spv::Op::OpTypeBool: return true; - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: elem_type_id = storage->GetOperandAs(elem_type_index); elem_type = _.FindDef(elem_type_id); return ContainsInvalidBool(_, elem_type, skip_builtin); - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: for (size_t member_type_index = 1; member_type_index < storage->operands().size(); ++member_type_index) { @@ -205,14 +203,15 @@ bool ContainsCooperativeMatrix(ValidationState_t& _, Instruction* elem_type; switch (storage->opcode()) { - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: return true; - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: elem_type_id = storage->GetOperandAs(elem_type_index); elem_type = _.FindDef(elem_type_id); return ContainsCooperativeMatrix(_, elem_type); - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: for (size_t member_type_index = 1; member_type_index < storage->operands().size(); ++member_type_index) { @@ -228,33 +227,35 @@ bool ContainsCooperativeMatrix(ValidationState_t& _, return false; } -std::pair GetStorageClass( +std::pair GetStorageClass( ValidationState_t& _, const Instruction* inst) { - SpvStorageClass dst_sc = SpvStorageClassMax; - SpvStorageClass src_sc = SpvStorageClassMax; + spv::StorageClass dst_sc = spv::StorageClass::Max; + spv::StorageClass src_sc = spv::StorageClass::Max; switch (inst->opcode()) { - case SpvOpCooperativeMatrixLoadNV: - case SpvOpLoad: { + case spv::Op::OpCooperativeMatrixLoadNV: + case spv::Op::OpCooperativeMatrixLoadKHR: + case spv::Op::OpLoad: { auto load_pointer = _.FindDef(inst->GetOperandAs(2)); auto load_pointer_type = _.FindDef(load_pointer->type_id()); - dst_sc = load_pointer_type->GetOperandAs(1); + dst_sc = load_pointer_type->GetOperandAs(1); break; } - case SpvOpCooperativeMatrixStoreNV: - case SpvOpStore: { + case spv::Op::OpCooperativeMatrixStoreNV: + case spv::Op::OpCooperativeMatrixStoreKHR: + case spv::Op::OpStore: { auto store_pointer = _.FindDef(inst->GetOperandAs(0)); auto store_pointer_type = _.FindDef(store_pointer->type_id()); - dst_sc = store_pointer_type->GetOperandAs(1); + dst_sc = store_pointer_type->GetOperandAs(1); break; } - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: { + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: { auto dst = _.FindDef(inst->GetOperandAs(0)); auto dst_type = _.FindDef(dst->type_id()); - dst_sc = dst_type->GetOperandAs(1); + dst_sc = dst_type->GetOperandAs(1); auto src = _.FindDef(inst->GetOperandAs(1)); auto src_type = _.FindDef(src->type_id()); - src_sc = src_type->GetOperandAs(1); + src_sc = src_type->GetOperandAs(1); break; } default: @@ -268,9 +269,9 @@ std::pair GetStorageClass( // argument and its implied operands. int MemoryAccessNumWords(uint32_t mask) { int result = 1; // Count the mask - if (mask & SpvMemoryAccessAlignedMask) ++result; - if (mask & SpvMemoryAccessMakePointerAvailableKHRMask) ++result; - if (mask & SpvMemoryAccessMakePointerVisibleKHRMask) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::Aligned)) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)) ++result; + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)) ++result; return result; } @@ -281,8 +282,8 @@ int MemoryAccessNumWords(uint32_t mask) { // OpCooperativeMatrixStoreNV. uint32_t GetMakeAvailableScope(const Instruction* inst, uint32_t mask, uint32_t mask_index) { - assert(mask & SpvMemoryAccessMakePointerAvailableKHRMask); - uint32_t this_bit = uint32_t(SpvMemoryAccessMakePointerAvailableKHRMask); + assert(mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)); + uint32_t this_bit = uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR); uint32_t index = mask_index - 1 + MemoryAccessNumWords(mask & (this_bit | (this_bit - 1))); return inst->GetOperandAs(index); @@ -293,8 +294,8 @@ uint32_t GetMakeAvailableScope(const Instruction* inst, uint32_t mask, // OpCooperativeMatrixStoreNV. uint32_t GetMakeVisibleScope(const Instruction* inst, uint32_t mask, uint32_t mask_index) { - assert(mask & SpvMemoryAccessMakePointerVisibleKHRMask); - uint32_t this_bit = uint32_t(SpvMemoryAccessMakePointerVisibleKHRMask); + assert(mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)); + uint32_t this_bit = uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR); uint32_t index = mask_index - 1 + MemoryAccessNumWords(mask & (this_bit | (this_bit - 1))); return inst->GetOperandAs(index); @@ -305,34 +306,36 @@ bool DoesStructContainRTA(const ValidationState_t& _, const Instruction* inst) { ++member_index) { const auto member_id = inst->GetOperandAs(member_index); const auto member_type = _.FindDef(member_id); - if (member_type->opcode() == SpvOpTypeRuntimeArray) return true; + if (member_type->opcode() == spv::Op::OpTypeRuntimeArray) return true; } return false; } spv_result_t CheckMemoryAccess(ValidationState_t& _, const Instruction* inst, uint32_t index) { - SpvStorageClass dst_sc, src_sc; + spv::StorageClass dst_sc, src_sc; std::tie(dst_sc, src_sc) = GetStorageClass(_, inst); if (inst->operands().size() <= index) { - if (src_sc == SpvStorageClassPhysicalStorageBufferEXT || - dst_sc == SpvStorageClassPhysicalStorageBufferEXT) { + // Cases where lack of some operand is invalid + if (src_sc == spv::StorageClass::PhysicalStorageBuffer || + dst_sc == spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Memory accesses with PhysicalStorageBufferEXT must use " - "Aligned."; + << _.VkErrorID(4708) + << "Memory accesses with PhysicalStorageBuffer must use Aligned."; } return SPV_SUCCESS; } const uint32_t mask = inst->GetOperandAs(index); - if (mask & SpvMemoryAccessMakePointerAvailableKHRMask) { - if (inst->opcode() == SpvOpLoad || - inst->opcode() == SpvOpCooperativeMatrixLoadNV) { + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)) { + if (inst->opcode() == spv::Op::OpLoad || + inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV || + inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "MakePointerAvailableKHR cannot be used with OpLoad."; } - if (!(mask & SpvMemoryAccessNonPrivatePointerKHRMask)) { + if (!(mask & uint32_t(spv::MemoryAccessMask::NonPrivatePointerKHR))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "NonPrivatePointerKHR must be specified if " "MakePointerAvailableKHR is specified."; @@ -344,14 +347,14 @@ spv_result_t CheckMemoryAccess(ValidationState_t& _, const Instruction* inst, return error; } - if (mask & SpvMemoryAccessMakePointerVisibleKHRMask) { - if (inst->opcode() == SpvOpStore || - inst->opcode() == SpvOpCooperativeMatrixStoreNV) { + if (mask & uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)) { + if (inst->opcode() == spv::Op::OpStore || + inst->opcode() == spv::Op::OpCooperativeMatrixStoreNV) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "MakePointerVisibleKHR cannot be used with OpStore."; } - if (!(mask & SpvMemoryAccessNonPrivatePointerKHRMask)) { + if (!(mask & uint32_t(spv::MemoryAccessMask::NonPrivatePointerKHR))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "NonPrivatePointerKHR must be specified if " << "MakePointerVisibleKHR is specified."; @@ -362,24 +365,27 @@ spv_result_t CheckMemoryAccess(ValidationState_t& _, const Instruction* inst, if (auto error = ValidateMemoryScope(_, inst, visible_scope)) return error; } - if (mask & SpvMemoryAccessNonPrivatePointerKHRMask) { - if (dst_sc != SpvStorageClassUniform && - dst_sc != SpvStorageClassWorkgroup && - dst_sc != SpvStorageClassCrossWorkgroup && - dst_sc != SpvStorageClassGeneric && dst_sc != SpvStorageClassImage && - dst_sc != SpvStorageClassStorageBuffer && - dst_sc != SpvStorageClassPhysicalStorageBufferEXT) { + if (mask & uint32_t(spv::MemoryAccessMask::NonPrivatePointerKHR)) { + if (dst_sc != spv::StorageClass::Uniform && + dst_sc != spv::StorageClass::Workgroup && + dst_sc != spv::StorageClass::CrossWorkgroup && + dst_sc != spv::StorageClass::Generic && + dst_sc != spv::StorageClass::Image && + dst_sc != spv::StorageClass::StorageBuffer && + dst_sc != spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "NonPrivatePointerKHR requires a pointer in Uniform, " << "Workgroup, CrossWorkgroup, Generic, Image or StorageBuffer " << "storage classes."; } - if (src_sc != SpvStorageClassMax && src_sc != SpvStorageClassUniform && - src_sc != SpvStorageClassWorkgroup && - src_sc != SpvStorageClassCrossWorkgroup && - src_sc != SpvStorageClassGeneric && src_sc != SpvStorageClassImage && - src_sc != SpvStorageClassStorageBuffer && - src_sc != SpvStorageClassPhysicalStorageBufferEXT) { + if (src_sc != spv::StorageClass::Max && + src_sc != spv::StorageClass::Uniform && + src_sc != spv::StorageClass::Workgroup && + src_sc != spv::StorageClass::CrossWorkgroup && + src_sc != spv::StorageClass::Generic && + src_sc != spv::StorageClass::Image && + src_sc != spv::StorageClass::StorageBuffer && + src_sc != spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "NonPrivatePointerKHR requires a pointer in Uniform, " << "Workgroup, CrossWorkgroup, Generic, Image or StorageBuffer " @@ -387,12 +393,12 @@ spv_result_t CheckMemoryAccess(ValidationState_t& _, const Instruction* inst, } } - if (!(mask & SpvMemoryAccessAlignedMask)) { - if (src_sc == SpvStorageClassPhysicalStorageBufferEXT || - dst_sc == SpvStorageClassPhysicalStorageBufferEXT) { + if (!(mask & uint32_t(spv::MemoryAccessMask::Aligned))) { + if (src_sc == spv::StorageClass::PhysicalStorageBuffer || + dst_sc == spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Memory accesses with PhysicalStorageBufferEXT must use " - "Aligned."; + << _.VkErrorID(4708) + << "Memory accesses with PhysicalStorageBuffer must use Aligned."; } } @@ -401,10 +407,10 @@ spv_result_t CheckMemoryAccess(ValidationState_t& _, const Instruction* inst, spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { auto result_type = _.FindDef(inst->type_id()); - if (!result_type || result_type->opcode() != SpvOpTypePointer) { + if (!result_type || result_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpVariable Result Type '" << _.getIdName(inst->type_id()) - << "' is not a pointer type."; + << "OpVariable Result Type " << _.getIdName(inst->type_id()) + << " is not a pointer type."; } const auto type_index = 2; @@ -417,15 +423,15 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { const auto initializer_id = inst->GetOperandAs(initializer_index); const auto initializer = _.FindDef(initializer_id); const auto is_module_scope_var = - initializer && (initializer->opcode() == SpvOpVariable) && - (initializer->GetOperandAs(storage_class_index) != - SpvStorageClassFunction); + initializer && (initializer->opcode() == spv::Op::OpVariable) && + (initializer->GetOperandAs(storage_class_index) != + spv::StorageClass::Function); const auto is_constant = initializer && spvOpcodeIsConstant(initializer->opcode()); if (!initializer || !(is_constant || is_module_scope_var)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpVariable Initializer '" << _.getIdName(initializer_id) - << "' is not a constant or module-scope variable."; + << "OpVariable Initializer " << _.getIdName(initializer_id) + << " is not a constant or module-scope variable."; } if (initializer->type_id() != value_id) { return _.diag(SPV_ERROR_INVALID_ID, inst) @@ -434,33 +440,49 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } - auto storage_class = inst->GetOperandAs(storage_class_index); - if (storage_class != SpvStorageClassWorkgroup && - storage_class != SpvStorageClassCrossWorkgroup && - storage_class != SpvStorageClassPrivate && - storage_class != SpvStorageClassFunction && - storage_class != SpvStorageClassRayPayloadNV && - storage_class != SpvStorageClassIncomingRayPayloadNV && - storage_class != SpvStorageClassHitAttributeNV && - storage_class != SpvStorageClassCallableDataNV && - storage_class != SpvStorageClassIncomingCallableDataNV) { - bool storage_input_or_output = storage_class == SpvStorageClassInput || - storage_class == SpvStorageClassOutput; + auto storage_class = + inst->GetOperandAs(storage_class_index); + if (storage_class != spv::StorageClass::Workgroup && + storage_class != spv::StorageClass::CrossWorkgroup && + storage_class != spv::StorageClass::Private && + storage_class != spv::StorageClass::Function && + storage_class != spv::StorageClass::UniformConstant && + storage_class != spv::StorageClass::RayPayloadKHR && + storage_class != spv::StorageClass::IncomingRayPayloadKHR && + storage_class != spv::StorageClass::HitAttributeKHR && + storage_class != spv::StorageClass::CallableDataKHR && + storage_class != spv::StorageClass::IncomingCallableDataKHR && + storage_class != spv::StorageClass::TaskPayloadWorkgroupEXT && + storage_class != spv::StorageClass::HitObjectAttributeNV) { + bool storage_input_or_output = storage_class == spv::StorageClass::Input || + storage_class == spv::StorageClass::Output; bool builtin = false; if (storage_input_or_output) { for (const Decoration& decoration : _.id_decorations(inst->id())) { - if (decoration.dec_type() == SpvDecorationBuiltIn) { + if (decoration.dec_type() == spv::Decoration::BuiltIn) { builtin = true; break; } } } - if (!(storage_input_or_output && builtin) && + if (!builtin && ContainsInvalidBool(_, value_type, storage_input_or_output)) { - return _.diag(SPV_ERROR_INVALID_ID, inst) - << "If OpTypeBool is stored in conjunction with OpVariable, it " - << "can only be used with non-externally visible shader Storage " - << "Classes: Workgroup, CrossWorkgroup, Private, and Function"; + if (storage_input_or_output) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(7290) + << "If OpTypeBool is stored in conjunction with OpVariable " + "using Input or Output Storage Classes it requires a BuiltIn " + "decoration"; + + } else { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "If OpTypeBool is stored in conjunction with OpVariable, it " + "can only be used with non-externally visible shader Storage " + "Classes: Workgroup, CrossWorkgroup, Private, Function, " + "Input, Output, RayPayloadKHR, IncomingRayPayloadKHR, " + "HitAttributeKHR, CallableDataKHR, " + "IncomingCallableDataKHR, or UniformConstant"; + } } } @@ -470,18 +492,18 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { << "Invalid storage class for target environment"; } - if (storage_class == SpvStorageClassGeneric) { + if (storage_class == spv::StorageClass::Generic) { return _.diag(SPV_ERROR_INVALID_BINARY, inst) << "OpVariable storage class cannot be Generic"; } - if (inst->function() && storage_class != SpvStorageClassFunction) { + if (inst->function() && storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Variables must have a function[7] storage class inside" " of a function"; } - if (!inst->function() && storage_class == SpvStorageClassFunction) { + if (!inst->function() && storage_class == spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_LAYOUT, inst) << "Variables can not have a function[7] storage class " "outside of a function"; @@ -491,7 +513,7 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { // storage class. const auto result_storage_class_index = 1; const auto result_storage_class = - result_type->GetOperandAs(result_storage_class_index); + result_type->GetOperandAs(result_storage_class_index); if (storage_class != result_storage_class) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "From SPIR-V spec, section 3.32.8 on OpVariable:\n" @@ -501,16 +523,16 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { // Variable pointer related restrictions. const auto pointee = _.FindDef(result_type->word(3)); - if (_.addressing_model() == SpvAddressingModelLogical && + if (_.addressing_model() == spv::AddressingModel::Logical && !_.options()->relax_logical_pointer) { // VariablePointersStorageBuffer is implied by VariablePointers. - if (pointee->opcode() == SpvOpTypePointer) { - if (!_.HasCapability(SpvCapabilityVariablePointersStorageBuffer)) { + if (pointee->opcode() == spv::Op::OpTypePointer) { + if (!_.HasCapability(spv::Capability::VariablePointersStorageBuffer)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "In Logical addressing, variables may not allocate a pointer " << "type"; - } else if (storage_class != SpvStorageClassFunction && - storage_class != SpvStorageClassPrivate) { + } else if (storage_class != spv::StorageClass::Function && + storage_class != spv::StorageClass::Private) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "In Logical addressing with variable pointers, variables " << "that allocate pointers must be in Function or Private " @@ -519,28 +541,30 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } - // Vulkan 14.5.1: Check type of PushConstant variables. - // Vulkan 14.5.2: Check type of UniformConstant and Uniform variables. if (spvIsVulkanEnv(_.context()->target_env)) { - if (storage_class == SpvStorageClassPushConstant) { - if (!IsAllowedTypeOrArrayOfSame(_, pointee, {SpvOpTypeStruct})) { + // Vulkan Push Constant Interface section: Check type of PushConstant + // variables. + if (storage_class == spv::StorageClass::PushConstant) { + if (pointee->opcode() != spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "PushConstant OpVariable '" << _.getIdName(inst->id()) - << "' has illegal type.\n" - << "From Vulkan spec, section 14.5.1:\n" - << "Such variables must be typed as OpTypeStruct, " - << "or an array of this type"; + << _.VkErrorID(6808) << "PushConstant OpVariable " + << _.getIdName(inst->id()) << " has illegal type.\n" + << "From Vulkan spec, Push Constant Interface section:\n" + << "Such variables must be typed as OpTypeStruct"; } } - if (storage_class == SpvStorageClassUniformConstant) { + // Vulkan Descriptor Set Interface: Check type of UniformConstant and + // Uniform variables. + if (storage_class == spv::StorageClass::UniformConstant) { if (!IsAllowedTypeOrArrayOfSame( _, pointee, - {SpvOpTypeImage, SpvOpTypeSampler, SpvOpTypeSampledImage, - SpvOpTypeAccelerationStructureKHR})) { + {spv::Op::OpTypeImage, spv::Op::OpTypeSampler, + spv::Op::OpTypeSampledImage, + spv::Op::OpTypeAccelerationStructureKHR})) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << _.VkErrorID(4655) << "UniformConstant OpVariable '" - << _.getIdName(inst->id()) << "' has illegal type.\n" + << _.VkErrorID(4655) << "UniformConstant OpVariable " + << _.getIdName(inst->id()) << " has illegal type.\n" << "Variables identified with the UniformConstant storage class " << "are used only as handles to refer to opaque resources. Such " << "variables must be typed as OpTypeImage, OpTypeSampler, " @@ -549,12 +573,12 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } - if (storage_class == SpvStorageClassUniform) { - if (!IsAllowedTypeOrArrayOfSame(_, pointee, {SpvOpTypeStruct})) { + if (storage_class == spv::StorageClass::Uniform) { + if (!IsAllowedTypeOrArrayOfSame(_, pointee, {spv::Op::OpTypeStruct})) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Uniform OpVariable '" << _.getIdName(inst->id()) - << "' has illegal type.\n" - << "From Vulkan spec, section 14.5.2:\n" + << _.VkErrorID(6807) << "Uniform OpVariable " + << _.getIdName(inst->id()) << " has illegal type.\n" + << "From Vulkan spec:\n" << "Variables identified with the Uniform storage class are " << "used to access transparent buffer backed resources. Such " << "variables must be typed as OpTypeStruct, or an array of " @@ -562,12 +586,12 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } - if (storage_class == SpvStorageClassStorageBuffer) { - if (!IsAllowedTypeOrArrayOfSame(_, pointee, {SpvOpTypeStruct})) { + if (storage_class == spv::StorageClass::StorageBuffer) { + if (!IsAllowedTypeOrArrayOfSame(_, pointee, {spv::Op::OpTypeStruct})) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "StorageBuffer OpVariable '" << _.getIdName(inst->id()) - << "' has illegal type.\n" - << "From Vulkan spec, section 14.5.2:\n" + << _.VkErrorID(6807) << "StorageBuffer OpVariable " + << _.getIdName(inst->id()) << " has illegal type.\n" + << "From Vulkan spec:\n" << "Variables identified with the StorageBuffer storage class " "are used to access transparent buffer backed resources. " "Such variables must be typed as OpTypeStruct, or an array " @@ -576,9 +600,9 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } // Check for invalid use of Invariant - if (storage_class != SpvStorageClassInput && - storage_class != SpvStorageClassOutput) { - if (_.HasDecoration(inst->id(), SpvDecorationInvariant)) { + if (storage_class != spv::StorageClass::Input && + storage_class != spv::StorageClass::Output) { + if (_.HasDecoration(inst->id(), spv::Decoration::Invariant)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << _.VkErrorID(4677) << "Variable decorated with Invariant must only be identified " @@ -586,8 +610,8 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { "environment."; } // Need to check if only the members in a struct are decorated - if (value_type && value_type->opcode() == SpvOpTypeStruct) { - if (_.HasDecoration(value_id, SpvDecorationInvariant)) { + if (value_type && value_type->opcode() == spv::Op::OpTypeStruct) { + if (_.HasDecoration(value_id, spv::Decoration::Invariant)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << _.VkErrorID(4677) << "Variable struct member decorated with Invariant must only " @@ -596,27 +620,27 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } } - } - // Vulkan Appendix A: Check that if contains initializer, then - // storage class is Output, Private, or Function. - if (inst->operands().size() > 3 && storage_class != SpvStorageClassOutput && - storage_class != SpvStorageClassPrivate && - storage_class != SpvStorageClassFunction) { - if (spvIsVulkanEnv(_.context()->target_env)) { - if (storage_class == SpvStorageClassWorkgroup) { + // Initializers in Vulkan are only allowed in some storage clases + if (inst->operands().size() > 3) { + if (storage_class == spv::StorageClass::Workgroup) { auto init_id = inst->GetOperandAs(3); auto init = _.FindDef(init_id); - if (init->opcode() != SpvOpConstantNull) { + if (init->opcode() != spv::Op::OpConstantNull) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Variable initializers in Workgroup storage class are " - "limited to OpConstantNull"; + << _.VkErrorID(4734) << "OpVariable, " + << _.getIdName(inst->id()) + << ", initializers are limited to OpConstantNull in " + "Workgroup " + "storage class"; } - } else { + } else if (storage_class != spv::StorageClass::Output && + storage_class != spv::StorageClass::Private && + storage_class != spv::StorageClass::Function) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << _.VkErrorID(4651) << "OpVariable, '" + << _.VkErrorID(4651) << "OpVariable, " << _.getIdName(inst->id()) - << "', has a disallowed initializer & storage class " + << ", has a disallowed initializer & storage class " << "combination.\n" << "From " << spvLogStringForEnv(_.context()->target_env) << " spec:\n" @@ -627,34 +651,52 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } } - if (storage_class == SpvStorageClassPhysicalStorageBufferEXT) { + if (inst->operands().size() > 3) { + if (storage_class == spv::StorageClass::TaskPayloadWorkgroupEXT) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpVariable, " << _.getIdName(inst->id()) + << ", initializer are not allowed for TaskPayloadWorkgroupEXT"; + } + if (storage_class == spv::StorageClass::Input) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpVariable, " << _.getIdName(inst->id()) + << ", initializer are not allowed for Input"; + } + if (storage_class == spv::StorageClass::HitObjectAttributeNV) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpVariable, " << _.getIdName(inst->id()) + << ", initializer are not allowed for HitObjectAttributeNV"; + } + } + + if (storage_class == spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "PhysicalStorageBufferEXT must not be used with OpVariable."; + << "PhysicalStorageBuffer must not be used with OpVariable."; } auto pointee_base = pointee; - while (pointee_base->opcode() == SpvOpTypeArray) { + while (pointee_base->opcode() == spv::Op::OpTypeArray) { pointee_base = _.FindDef(pointee_base->GetOperandAs(1u)); } - if (pointee_base->opcode() == SpvOpTypePointer) { - if (pointee_base->GetOperandAs(1u) == - SpvStorageClassPhysicalStorageBufferEXT) { - // check for AliasedPointerEXT/RestrictPointerEXT + if (pointee_base->opcode() == spv::Op::OpTypePointer) { + if (pointee_base->GetOperandAs(1u) == + spv::StorageClass::PhysicalStorageBuffer) { + // check for AliasedPointer/RestrictPointer bool foundAliased = - _.HasDecoration(inst->id(), SpvDecorationAliasedPointerEXT); + _.HasDecoration(inst->id(), spv::Decoration::AliasedPointer); bool foundRestrict = - _.HasDecoration(inst->id(), SpvDecorationRestrictPointerEXT); + _.HasDecoration(inst->id(), spv::Decoration::RestrictPointer); if (!foundAliased && !foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpVariable " << inst->id() - << ": expected AliasedPointerEXT or RestrictPointerEXT for " - << "PhysicalStorageBufferEXT pointer."; + << ": expected AliasedPointer or RestrictPointer for " + << "PhysicalStorageBuffer pointer."; } if (foundAliased && foundRestrict) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpVariable " << inst->id() - << ": can't specify both AliasedPointerEXT and " - << "RestrictPointerEXT for PhysicalStorageBufferEXT pointer."; + << ": can't specify both AliasedPointer and " + << "RestrictPointer for PhysicalStorageBuffer pointer."; } } } @@ -664,21 +706,23 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { // OpTypeRuntimeArray should only ever be in a container like OpTypeStruct, // so should never appear as a bare variable. // Unless the module has the RuntimeDescriptorArrayEXT capability. - if (value_type && value_type->opcode() == SpvOpTypeRuntimeArray) { - if (!_.HasCapability(SpvCapabilityRuntimeDescriptorArrayEXT)) { + if (value_type && value_type->opcode() == spv::Op::OpTypeRuntimeArray) { + if (!_.HasCapability(spv::Capability::RuntimeDescriptorArrayEXT)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpVariable, '" << _.getIdName(inst->id()) - << "', is attempting to create memory for an illegal type, " + << _.VkErrorID(4680) << "OpVariable, " + << _.getIdName(inst->id()) + << ", is attempting to create memory for an illegal type, " << "OpTypeRuntimeArray.\nFor Vulkan OpTypeRuntimeArray can only " << "appear as the final member of an OpTypeStruct, thus cannot " << "be instantiated via OpVariable"; } else { // A bare variable OpTypeRuntimeArray is allowed in this context, but // still need to check the storage class. - if (storage_class != SpvStorageClassStorageBuffer && - storage_class != SpvStorageClassUniform && - storage_class != SpvStorageClassUniformConstant) { + if (storage_class != spv::StorageClass::StorageBuffer && + storage_class != spv::StorageClass::Uniform && + storage_class != spv::StorageClass::UniformConstant) { return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(4680) << "For Vulkan with RuntimeDescriptorArrayEXT, a variable " << "containing OpTypeRuntimeArray must have storage class of " << "StorageBuffer, Uniform, or UniformConstant."; @@ -690,35 +734,40 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { // must either have the storage class StorageBuffer and be decorated // with Block, or it must be in the Uniform storage class and be decorated // as BufferBlock. - if (value_type && value_type->opcode() == SpvOpTypeStruct) { + if (value_type && value_type->opcode() == spv::Op::OpTypeStruct) { if (DoesStructContainRTA(_, value_type)) { - if (storage_class == SpvStorageClassStorageBuffer) { - if (!_.HasDecoration(value_id, SpvDecorationBlock)) { + if (storage_class == spv::StorageClass::StorageBuffer || + storage_class == spv::StorageClass::PhysicalStorageBuffer) { + if (!_.HasDecoration(value_id, spv::Decoration::Block)) { return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(4680) << "For Vulkan, an OpTypeStruct variable containing an " << "OpTypeRuntimeArray must be decorated with Block if it " - << "has storage class StorageBuffer."; + << "has storage class StorageBuffer or " + "PhysicalStorageBuffer."; } - } else if (storage_class == SpvStorageClassUniform) { - if (!_.HasDecoration(value_id, SpvDecorationBufferBlock)) { + } else if (storage_class == spv::StorageClass::Uniform) { + if (!_.HasDecoration(value_id, spv::Decoration::BufferBlock)) { return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(4680) << "For Vulkan, an OpTypeStruct variable containing an " << "OpTypeRuntimeArray must be decorated with BufferBlock " << "if it has storage class Uniform."; } } else { return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(4680) << "For Vulkan, OpTypeStruct variables containing " << "OpTypeRuntimeArray must have storage class of " - << "StorageBuffer or Uniform."; + << "StorageBuffer, PhysicalStorageBuffer, or Uniform."; } } } } // Cooperative matrix types can only be allocated in Function or Private - if ((storage_class != SpvStorageClassFunction && - storage_class != SpvStorageClassPrivate) && + if ((storage_class != spv::StorageClass::Function && + storage_class != spv::StorageClass::Private) && ContainsCooperativeMatrix(_, pointee)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Cooperative matrix types (or types containing them) can only be " @@ -727,57 +776,59 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { "parameters"; } - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { // Don't allow variables containing 16-bit elements without the appropriate // capabilities. - if ((!_.HasCapability(SpvCapabilityInt16) && - _.ContainsSizedIntOrFloatType(value_id, SpvOpTypeInt, 16)) || - (!_.HasCapability(SpvCapabilityFloat16) && - _.ContainsSizedIntOrFloatType(value_id, SpvOpTypeFloat, 16))) { + if ((!_.HasCapability(spv::Capability::Int16) && + _.ContainsSizedIntOrFloatType(value_id, spv::Op::OpTypeInt, 16)) || + (!_.HasCapability(spv::Capability::Float16) && + _.ContainsSizedIntOrFloatType(value_id, spv::Op::OpTypeFloat, 16))) { auto underlying_type = value_type; - while (underlying_type->opcode() == SpvOpTypePointer) { - storage_class = underlying_type->GetOperandAs(1u); + while (underlying_type->opcode() == spv::Op::OpTypePointer) { + storage_class = underlying_type->GetOperandAs(1u); underlying_type = _.FindDef(underlying_type->GetOperandAs(2u)); } bool storage_class_ok = true; std::string sc_name = _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_STORAGE_CLASS, storage_class); + SPV_OPERAND_TYPE_STORAGE_CLASS, uint32_t(storage_class)); switch (storage_class) { - case SpvStorageClassStorageBuffer: - case SpvStorageClassPhysicalStorageBufferEXT: - if (!_.HasCapability(SpvCapabilityStorageBuffer16BitAccess)) { + case spv::StorageClass::StorageBuffer: + case spv::StorageClass::PhysicalStorageBuffer: + if (!_.HasCapability(spv::Capability::StorageBuffer16BitAccess)) { storage_class_ok = false; } break; - case SpvStorageClassUniform: + case spv::StorageClass::Uniform: if (!_.HasCapability( - SpvCapabilityUniformAndStorageBuffer16BitAccess)) { - if (underlying_type->opcode() == SpvOpTypeArray || - underlying_type->opcode() == SpvOpTypeRuntimeArray) { + spv::Capability::UniformAndStorageBuffer16BitAccess)) { + if (underlying_type->opcode() == spv::Op::OpTypeArray || + underlying_type->opcode() == spv::Op::OpTypeRuntimeArray) { underlying_type = _.FindDef(underlying_type->GetOperandAs(1u)); } - if (!_.HasCapability(SpvCapabilityStorageBuffer16BitAccess) || + if (!_.HasCapability(spv::Capability::StorageBuffer16BitAccess) || !_.HasDecoration(underlying_type->id(), - SpvDecorationBufferBlock)) { + spv::Decoration::BufferBlock)) { storage_class_ok = false; } } break; - case SpvStorageClassPushConstant: - if (!_.HasCapability(SpvCapabilityStoragePushConstant16)) { + case spv::StorageClass::PushConstant: + if (!_.HasCapability(spv::Capability::StoragePushConstant16)) { storage_class_ok = false; } break; - case SpvStorageClassInput: - case SpvStorageClassOutput: - if (!_.HasCapability(SpvCapabilityStorageInputOutput16)) { + case spv::StorageClass::Input: + case spv::StorageClass::Output: + if (!_.HasCapability(spv::Capability::StorageInputOutput16)) { storage_class_ok = false; } break; - case SpvStorageClassWorkgroup: - if (!_.HasCapability(SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR)) { + case spv::StorageClass::Workgroup: + if (!_.HasCapability( + spv::Capability:: + WorkgroupMemoryExplicitLayout16BitAccessKHR)) { storage_class_ok = false; } break; @@ -794,46 +845,48 @@ spv_result_t ValidateVariable(ValidationState_t& _, const Instruction* inst) { } // Don't allow variables containing 8-bit elements without the appropriate // capabilities. - if (!_.HasCapability(SpvCapabilityInt8) && - _.ContainsSizedIntOrFloatType(value_id, SpvOpTypeInt, 8)) { + if (!_.HasCapability(spv::Capability::Int8) && + _.ContainsSizedIntOrFloatType(value_id, spv::Op::OpTypeInt, 8)) { auto underlying_type = value_type; - while (underlying_type->opcode() == SpvOpTypePointer) { - storage_class = underlying_type->GetOperandAs(1u); + while (underlying_type->opcode() == spv::Op::OpTypePointer) { + storage_class = underlying_type->GetOperandAs(1u); underlying_type = _.FindDef(underlying_type->GetOperandAs(2u)); } bool storage_class_ok = true; std::string sc_name = _.grammar().lookupOperandName( - SPV_OPERAND_TYPE_STORAGE_CLASS, storage_class); + SPV_OPERAND_TYPE_STORAGE_CLASS, uint32_t(storage_class)); switch (storage_class) { - case SpvStorageClassStorageBuffer: - case SpvStorageClassPhysicalStorageBufferEXT: - if (!_.HasCapability(SpvCapabilityStorageBuffer8BitAccess)) { + case spv::StorageClass::StorageBuffer: + case spv::StorageClass::PhysicalStorageBuffer: + if (!_.HasCapability(spv::Capability::StorageBuffer8BitAccess)) { storage_class_ok = false; } break; - case SpvStorageClassUniform: + case spv::StorageClass::Uniform: if (!_.HasCapability( - SpvCapabilityUniformAndStorageBuffer8BitAccess)) { - if (underlying_type->opcode() == SpvOpTypeArray || - underlying_type->opcode() == SpvOpTypeRuntimeArray) { + spv::Capability::UniformAndStorageBuffer8BitAccess)) { + if (underlying_type->opcode() == spv::Op::OpTypeArray || + underlying_type->opcode() == spv::Op::OpTypeRuntimeArray) { underlying_type = _.FindDef(underlying_type->GetOperandAs(1u)); } - if (!_.HasCapability(SpvCapabilityStorageBuffer8BitAccess) || + if (!_.HasCapability(spv::Capability::StorageBuffer8BitAccess) || !_.HasDecoration(underlying_type->id(), - SpvDecorationBufferBlock)) { + spv::Decoration::BufferBlock)) { storage_class_ok = false; } } break; - case SpvStorageClassPushConstant: - if (!_.HasCapability(SpvCapabilityStoragePushConstant8)) { + case spv::StorageClass::PushConstant: + if (!_.HasCapability(spv::Capability::StoragePushConstant8)) { storage_class_ok = false; } break; - case SpvStorageClassWorkgroup: - if (!_.HasCapability(SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR)) { + case spv::StorageClass::Workgroup: + if (!_.HasCapability( + spv::Capability:: + WorkgroupMemoryExplicitLayout8BitAccessKHR)) { storage_class_ok = false; } break; @@ -857,40 +910,40 @@ spv_result_t ValidateLoad(ValidationState_t& _, const Instruction* inst) { const auto result_type = _.FindDef(inst->type_id()); if (!result_type) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpLoad Result Type '" << _.getIdName(inst->type_id()) - << "' is not defined."; + << "OpLoad Result Type " << _.getIdName(inst->type_id()) + << " is not defined."; } - const bool uses_variable_pointers = - _.features().variable_pointers || - _.features().variable_pointers_storage_buffer; const auto pointer_index = 2; const auto pointer_id = inst->GetOperandAs(pointer_index); const auto pointer = _.FindDef(pointer_id); if (!pointer || - ((_.addressing_model() == SpvAddressingModelLogical) && - ((!uses_variable_pointers && + ((_.addressing_model() == spv::AddressingModel::Logical) && + ((!_.features().variable_pointers && !spvOpcodeReturnsLogicalPointer(pointer->opcode())) || - (uses_variable_pointers && + (_.features().variable_pointers && !spvOpcodeReturnsLogicalVariablePointer(pointer->opcode()))))) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpLoad Pointer '" << _.getIdName(pointer_id) - << "' is not a logical pointer."; + << "OpLoad Pointer " << _.getIdName(pointer_id) + << " is not a logical pointer."; } const auto pointer_type = _.FindDef(pointer->type_id()); - if (!pointer_type || pointer_type->opcode() != SpvOpTypePointer) { + if (!pointer_type || pointer_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpLoad type for pointer '" << _.getIdName(pointer_id) - << "' is not a pointer type."; + << "OpLoad type for pointer " << _.getIdName(pointer_id) + << " is not a pointer type."; } - const auto pointee_type = _.FindDef(pointer_type->GetOperandAs(2)); - if (!pointee_type || result_type->id() != pointee_type->id()) { + uint32_t pointee_data_type; + spv::StorageClass storage_class; + if (!_.GetPointerTypeInfo(pointer_type->id(), &pointee_data_type, + &storage_class) || + result_type->id() != pointee_data_type) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpLoad Result Type '" << _.getIdName(inst->type_id()) - << "' does not match Pointer '" << _.getIdName(pointer->id()) - << "'s type."; + << "OpLoad Result Type " << _.getIdName(inst->type_id()) + << " does not match Pointer " << _.getIdName(pointer->id()) + << "s type."; } if (!_.options()->before_hlsl_legalization && @@ -901,84 +954,104 @@ spv_result_t ValidateLoad(ValidationState_t& _, const Instruction* inst) { if (auto error = CheckMemoryAccess(_, inst, 3)) return error; - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id()) && - result_type->opcode() != SpvOpTypePointer) { - if (result_type->opcode() != SpvOpTypeInt && - result_type->opcode() != SpvOpTypeFloat && - result_type->opcode() != SpvOpTypeVector && - result_type->opcode() != SpvOpTypeMatrix) { + result_type->opcode() != spv::Op::OpTypePointer) { + if (result_type->opcode() != spv::Op::OpTypeInt && + result_type->opcode() != spv::Op::OpTypeFloat && + result_type->opcode() != spv::Op::OpTypeVector && + result_type->opcode() != spv::Op::OpTypeMatrix) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "8- or 16-bit loads must be a scalar, vector or matrix type"; } } + _.RegisterQCOMImageProcessingTextureConsumer(pointer_id, inst, nullptr); + return SPV_SUCCESS; } spv_result_t ValidateStore(ValidationState_t& _, const Instruction* inst) { - const bool uses_variable_pointer = - _.features().variable_pointers || - _.features().variable_pointers_storage_buffer; const auto pointer_index = 0; const auto pointer_id = inst->GetOperandAs(pointer_index); const auto pointer = _.FindDef(pointer_id); if (!pointer || - (_.addressing_model() == SpvAddressingModelLogical && - ((!uses_variable_pointer && + (_.addressing_model() == spv::AddressingModel::Logical && + ((!_.features().variable_pointers && !spvOpcodeReturnsLogicalPointer(pointer->opcode())) || - (uses_variable_pointer && + (_.features().variable_pointers && !spvOpcodeReturnsLogicalVariablePointer(pointer->opcode()))))) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "' is not a logical pointer."; + << "OpStore Pointer " << _.getIdName(pointer_id) + << " is not a logical pointer."; } const auto pointer_type = _.FindDef(pointer->type_id()); - if (!pointer_type || pointer_type->opcode() != SpvOpTypePointer) { + if (!pointer_type || pointer_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore type for pointer '" << _.getIdName(pointer_id) - << "' is not a pointer type."; + << "OpStore type for pointer " << _.getIdName(pointer_id) + << " is not a pointer type."; } const auto type_id = pointer_type->GetOperandAs(2); const auto type = _.FindDef(type_id); - if (!type || SpvOpTypeVoid == type->opcode()) { + if (!type || spv::Op::OpTypeVoid == type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "'s type is void."; + << "OpStore Pointer " << _.getIdName(pointer_id) + << "s type is void."; } // validate storage class { uint32_t data_type; - uint32_t storage_class; + spv::StorageClass storage_class; if (!_.GetPointerTypeInfo(pointer_type->id(), &data_type, &storage_class)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "' is not pointer type"; + << "OpStore Pointer " << _.getIdName(pointer_id) + << " is not pointer type"; } - if (storage_class == SpvStorageClassUniformConstant || - storage_class == SpvStorageClassInput || - storage_class == SpvStorageClassPushConstant) { + if (storage_class == spv::StorageClass::UniformConstant || + storage_class == spv::StorageClass::Input || + storage_class == spv::StorageClass::PushConstant) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpStore Pointer " << _.getIdName(pointer_id) + << " storage class is read-only"; + } else if (storage_class == spv::StorageClass::ShaderRecordBufferKHR) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "' storage class is read-only"; + << "ShaderRecordBufferKHR Storage Class variables are read only"; + } else if (storage_class == spv::StorageClass::HitAttributeKHR) { + std::string errorVUID = _.VkErrorID(4703); + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model == spv::ExecutionModel::AnyHitKHR || + model == spv::ExecutionModel::ClosestHitKHR) { + if (message) { + *message = + errorVUID + + "HitAttributeKHR Storage Class variables are read only " + "with AnyHitKHR and ClosestHitKHR"; + } + return false; + } + return true; + }); } if (spvIsVulkanEnv(_.context()->target_env) && - storage_class == SpvStorageClassUniform) { + storage_class == spv::StorageClass::Uniform) { auto base_ptr = _.TracePointer(pointer); - if (base_ptr->opcode() == SpvOpVariable) { + if (base_ptr->opcode() == spv::Op::OpVariable) { // If it's not a variable a different check should catch the problem. auto base_type = _.FindDef(base_ptr->GetOperandAs(0)); // Get the pointed-to type. base_type = _.FindDef(base_type->GetOperandAs(2u)); - if (base_type->opcode() == SpvOpTypeArray || - base_type->opcode() == SpvOpTypeRuntimeArray) { + if (base_type->opcode() == spv::Op::OpTypeArray || + base_type->opcode() == spv::Op::OpTypeRuntimeArray) { base_type = _.FindDef(base_type->GetOperandAs(1u)); } - if (_.HasDecoration(base_type->id(), SpvDecorationBlock)) { + if (_.HasDecoration(base_type->id(), spv::Decoration::Block)) { return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(6925) << "In the Vulkan environment, cannot store to Uniform Blocks"; } } @@ -990,43 +1063,44 @@ spv_result_t ValidateStore(ValidationState_t& _, const Instruction* inst) { const auto object = _.FindDef(object_id); if (!object || !object->type_id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Object '" << _.getIdName(object_id) - << "' is not an object."; + << "OpStore Object " << _.getIdName(object_id) + << " is not an object."; } const auto object_type = _.FindDef(object->type_id()); - if (!object_type || SpvOpTypeVoid == object_type->opcode()) { + if (!object_type || spv::Op::OpTypeVoid == object_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Object '" << _.getIdName(object_id) - << "'s type is void."; + << "OpStore Object " << _.getIdName(object_id) + << "s type is void."; } if (type->id() != object_type->id()) { - if (!_.options()->relax_struct_store || type->opcode() != SpvOpTypeStruct || - object_type->opcode() != SpvOpTypeStruct) { + if (!_.options()->relax_struct_store || + type->opcode() != spv::Op::OpTypeStruct || + object_type->opcode() != spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "'s type does not match Object '" - << _.getIdName(object->id()) << "'s type."; + << "OpStore Pointer " << _.getIdName(pointer_id) + << "s type does not match Object " + << _.getIdName(object->id()) << "s type."; } // TODO: Check for layout compatible matricies and arrays as well. if (!AreLayoutCompatibleStructs(_, type, object_type)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpStore Pointer '" << _.getIdName(pointer_id) - << "'s layout does not match Object '" - << _.getIdName(object->id()) << "'s layout."; + << "OpStore Pointer " << _.getIdName(pointer_id) + << "s layout does not match Object " + << _.getIdName(object->id()) << "s layout."; } } if (auto error = CheckMemoryAccess(_, inst, 2)) return error; - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id()) && - object_type->opcode() != SpvOpTypePointer) { - if (object_type->opcode() != SpvOpTypeInt && - object_type->opcode() != SpvOpTypeFloat && - object_type->opcode() != SpvOpTypeVector && - object_type->opcode() != SpvOpTypeMatrix) { + object_type->opcode() != spv::Op::OpTypePointer) { + if (object_type->opcode() != spv::Op::OpTypeInt && + object_type->opcode() != spv::Op::OpTypeFloat && + object_type->opcode() != spv::Op::OpTypeVector && + object_type->opcode() != spv::Op::OpTypeMatrix) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "8- or 16-bit stores must be a scalar, vector or matrix type"; } @@ -1037,9 +1111,10 @@ spv_result_t ValidateStore(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateCopyMemoryMemoryAccess(ValidationState_t& _, const Instruction* inst) { - assert(inst->opcode() == SpvOpCopyMemory || - inst->opcode() == SpvOpCopyMemorySized); - const uint32_t first_access_index = inst->opcode() == SpvOpCopyMemory ? 2 : 3; + assert(inst->opcode() == spv::Op::OpCopyMemory || + inst->opcode() == spv::Op::OpCopyMemorySized); + const uint32_t first_access_index = + inst->opcode() == spv::Op::OpCopyMemory ? 2 : 3; if (inst->operands().size() > first_access_index) { if (auto error = CheckMemoryAccess(_, inst, first_access_index)) return error; @@ -1057,21 +1132,23 @@ spv_result_t ValidateCopyMemoryMemoryAccess(ValidationState_t& _, // make-visible. // - the second is the source (read) access and it can't have // make-available. - if (first_access & SpvMemoryAccessMakePointerVisibleKHRMask) { + if (first_access & + uint32_t(spv::MemoryAccessMask::MakePointerVisibleKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Target memory access must not include " "MakePointerVisibleKHR"; } const auto second_access = inst->GetOperandAs(second_access_index); - if (second_access & SpvMemoryAccessMakePointerAvailableKHRMask) { + if (second_access & + uint32_t(spv::MemoryAccessMask::MakePointerAvailableKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Source memory access must not include " "MakePointerAvailableKHR"; } } else { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << spvOpcodeString(static_cast(inst->opcode())) + << spvOpcodeString(static_cast(inst->opcode())) << " with two memory access operands requires SPIR-V 1.4 or " "later"; } @@ -1086,8 +1163,8 @@ spv_result_t ValidateCopyMemory(ValidationState_t& _, const Instruction* inst) { const auto target = _.FindDef(target_id); if (!target) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Target operand '" << _.getIdName(target_id) - << "' is not defined."; + << "Target operand " << _.getIdName(target_id) + << " is not defined."; } const auto source_index = 1; @@ -1095,104 +1172,100 @@ spv_result_t ValidateCopyMemory(ValidationState_t& _, const Instruction* inst) { const auto source = _.FindDef(source_id); if (!source) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Source operand '" << _.getIdName(source_id) - << "' is not defined."; + << "Source operand " << _.getIdName(source_id) + << " is not defined."; } const auto target_pointer_type = _.FindDef(target->type_id()); if (!target_pointer_type || - target_pointer_type->opcode() != SpvOpTypePointer) { + target_pointer_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Target operand '" << _.getIdName(target_id) - << "' is not a pointer."; + << "Target operand " << _.getIdName(target_id) + << " is not a pointer."; } const auto source_pointer_type = _.FindDef(source->type_id()); if (!source_pointer_type || - source_pointer_type->opcode() != SpvOpTypePointer) { + source_pointer_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Source operand '" << _.getIdName(source_id) - << "' is not a pointer."; + << "Source operand " << _.getIdName(source_id) + << " is not a pointer."; } - if (inst->opcode() == SpvOpCopyMemory) { + if (inst->opcode() == spv::Op::OpCopyMemory) { const auto target_type = _.FindDef(target_pointer_type->GetOperandAs(2)); - if (!target_type || target_type->opcode() == SpvOpTypeVoid) { + if (!target_type || target_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Target operand '" << _.getIdName(target_id) - << "' cannot be a void pointer."; + << "Target operand " << _.getIdName(target_id) + << " cannot be a void pointer."; } const auto source_type = _.FindDef(source_pointer_type->GetOperandAs(2)); - if (!source_type || source_type->opcode() == SpvOpTypeVoid) { + if (!source_type || source_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Source operand '" << _.getIdName(source_id) - << "' cannot be a void pointer."; + << "Source operand " << _.getIdName(source_id) + << " cannot be a void pointer."; } if (target_type->id() != source_type->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Target '" << _.getIdName(source_id) - << "'s type does not match Source '" - << _.getIdName(source_type->id()) << "'s type."; + << "Target " << _.getIdName(source_id) + << "s type does not match Source " + << _.getIdName(source_type->id()) << "s type."; } - - if (auto error = CheckMemoryAccess(_, inst, 2)) return error; } else { const auto size_id = inst->GetOperandAs(2); const auto size = _.FindDef(size_id); if (!size) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Size operand '" << _.getIdName(size_id) - << "' is not defined."; + << "Size operand " << _.getIdName(size_id) + << " is not defined."; } const auto size_type = _.FindDef(size->type_id()); if (!_.IsIntScalarType(size_type->id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Size operand '" << _.getIdName(size_id) - << "' must be a scalar integer type."; + << "Size operand " << _.getIdName(size_id) + << " must be a scalar integer type."; } bool is_zero = true; switch (size->opcode()) { - case SpvOpConstantNull: + case spv::Op::OpConstantNull: return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Size operand '" << _.getIdName(size_id) - << "' cannot be a constant zero."; - case SpvOpConstant: + << "Size operand " << _.getIdName(size_id) + << " cannot be a constant zero."; + case spv::Op::OpConstant: if (size_type->word(3) == 1 && size->word(size->words().size() - 1) & 0x80000000) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Size operand '" << _.getIdName(size_id) - << "' cannot have the sign bit set to 1."; + << "Size operand " << _.getIdName(size_id) + << " cannot have the sign bit set to 1."; } for (size_t i = 3; is_zero && i < size->words().size(); ++i) { is_zero &= (size->word(i) == 0); } if (is_zero) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Size operand '" << _.getIdName(size_id) - << "' cannot be a constant zero."; + << "Size operand " << _.getIdName(size_id) + << " cannot be a constant zero."; } break; default: // Cannot infer any other opcodes. break; } - - if (auto error = CheckMemoryAccess(_, inst, 3)) return error; } if (auto error = ValidateCopyMemoryMemoryAccess(_, inst)) return error; // Get past the pointers to avoid checking a pointer copy. auto sub_type = _.FindDef(target_pointer_type->GetOperandAs(2)); - while (sub_type->opcode() == SpvOpTypePointer) { + while (sub_type->opcode() == spv::Op::OpTypePointer) { sub_type = _.FindDef(sub_type->GetOperandAs(2)); } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(sub_type->id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Cannot copy memory of objects containing 8- or 16-bit types"; @@ -1204,15 +1277,16 @@ spv_result_t ValidateCopyMemory(ValidationState_t& _, const Instruction* inst) { spv_result_t ValidateAccessChain(ValidationState_t& _, const Instruction* inst) { std::string instr_name = - "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); + "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); // The result type must be OpTypePointer. auto result_type = _.FindDef(inst->type_id()); - if (SpvOpTypePointer != result_type->opcode()) { + if (spv::Op::OpTypePointer != result_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "The Result Type of " << instr_name << " '" - << _.getIdName(inst->id()) << "' must be OpTypePointer. Found Op" - << spvOpcodeString(static_cast(result_type->opcode())) << "."; + << "The Result Type of " << instr_name << " " + << _.getIdName(inst->id()) << " must be OpTypePointer. Found Op" + << spvOpcodeString(static_cast(result_type->opcode())) + << "."; } // Result type is a pointer. Find out what it's pointing to. @@ -1225,9 +1299,9 @@ spv_result_t ValidateAccessChain(ValidationState_t& _, const auto base_id = inst->GetOperandAs(base_index); const auto base = _.FindDef(base_id); const auto base_type = _.FindDef(base->type_id()); - if (!base_type || SpvOpTypePointer != base_type->opcode()) { + if (!base_type || spv::Op::OpTypePointer != base_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "The Base '" << _.getIdName(base_id) << "' in " << instr_name + << "The Base " << _.getIdName(base_id) << " in " << instr_name << " instruction must be a pointer."; } @@ -1249,8 +1323,8 @@ spv_result_t ValidateAccessChain(ValidationState_t& _, // The number of indexes passed to OpAccessChain may not exceed 255 // The instruction includes 4 words + N words (for N indexes) size_t num_indexes = inst->words().size() - 4; - if (inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain) { + if (inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain) { // In pointer access chains, the element operand is required, but not // counted as an index. --num_indexes; @@ -1270,8 +1344,8 @@ spv_result_t ValidateAccessChain(ValidationState_t& _, // on. Once any non-composite type is reached, there must be no remaining // (unused) indexes. auto starting_index = 4; - if (inst->opcode() == SpvOpPtrAccessChain || - inst->opcode() == SpvOpInBoundsPtrAccessChain) { + if (inst->opcode() == spv::Op::OpPtrAccessChain || + inst->opcode() == spv::Op::OpInBoundsPtrAccessChain) { ++starting_index; } for (size_t i = starting_index; i < inst->words().size(); ++i) { @@ -1280,144 +1354,310 @@ spv_result_t ValidateAccessChain(ValidationState_t& _, auto cur_word_instr = _.FindDef(cur_word); // The index must be a scalar integer type (See OpAccessChain in the Spec.) auto index_type = _.FindDef(cur_word_instr->type_id()); - if (!index_type || SpvOpTypeInt != index_type->opcode()) { + if (!index_type || spv::Op::OpTypeInt != index_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Indexes passed to " << instr_name << " must be of type integer."; } switch (type_pointee->opcode()) { - case SpvOpTypeMatrix: - case SpvOpTypeVector: - case SpvOpTypeCooperativeMatrixNV: - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: { - // In OpTypeMatrix, OpTypeVector, SpvOpTypeCooperativeMatrixNV, + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: { + // In OpTypeMatrix, OpTypeVector, spv::Op::OpTypeCooperativeMatrixNV, // OpTypeArray, and OpTypeRuntimeArray, word 2 is the Element Type. type_pointee = _.FindDef(type_pointee->word(2)); break; } - case SpvOpTypeStruct: { + case spv::Op::OpTypeStruct: { // In case of structures, there is an additional constraint on the // index: the index must be an OpConstant. - if (SpvOpConstant != cur_word_instr->opcode()) { + int64_t cur_index; + if (!_.EvalConstantValInt64(cur_word, &cur_index)) { return _.diag(SPV_ERROR_INVALID_ID, cur_word_instr) << "The passed to " << instr_name << " to index into a " "structure must be an OpConstant."; } - // Get the index value from the OpConstant (word 3 of OpConstant). - // OpConstant could be a signed integer. But it's okay to treat it as - // unsigned because a negative constant int would never be seen as - // correct as a struct offset, since structs can't have more than 2 - // billion members. - const uint32_t cur_index = cur_word_instr->word(3); + // The index points to the struct member we want, therefore, the index // should be less than the number of struct members. - const uint32_t num_struct_members = - static_cast(type_pointee->words().size() - 2); - if (cur_index >= num_struct_members) { + const int64_t num_struct_members = + static_cast(type_pointee->words().size() - 2); + if (cur_index >= num_struct_members || cur_index < 0) { return _.diag(SPV_ERROR_INVALID_ID, cur_word_instr) << "Index is out of bounds: " << instr_name - << " can not find index " << cur_index - << " into the structure '" - << _.getIdName(type_pointee->id()) << "'. This structure has " + << " cannot find index " << cur_index + << " into the structure " + << _.getIdName(type_pointee->id()) << ". This structure has " << num_struct_members << " members. Largest valid index is " << num_struct_members - 1 << "."; } // Struct members IDs start at word 2 of OpTypeStruct. - auto structMemberId = type_pointee->word(cur_index + 2); + const size_t word_index = static_cast(cur_index) + 2; + auto structMemberId = type_pointee->word(word_index); type_pointee = _.FindDef(structMemberId); break; } default: { // Give an error. reached non-composite type while indexes still remain. - return _.diag(SPV_ERROR_INVALID_ID, cur_word_instr) + return _.diag(SPV_ERROR_INVALID_ID, inst) << instr_name << " reached non-composite type while indexes " "still remain to be traversed."; } } } - // At this point, we have fully walked down from the base using the indeces. + // At this point, we have fully walked down from the base using the indices. // The type being pointed to should be the same as the result type. if (type_pointee->id() != result_type_pointee->id()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << instr_name << " result type (Op" - << spvOpcodeString(static_cast(result_type_pointee->opcode())) + << spvOpcodeString( + static_cast(result_type_pointee->opcode())) << ") does not match the type that results from indexing into the " "base " " (Op" - << spvOpcodeString(static_cast(type_pointee->opcode())) + << spvOpcodeString(static_cast(type_pointee->opcode())) << ")."; } return SPV_SUCCESS; } +spv_result_t ValidateRawAccessChain(ValidationState_t& _, + const Instruction* inst) { + std::string instr_name = "Op" + std::string(spvOpcodeString(inst->opcode())); + + // The result type must be OpTypePointer. + const auto result_type = _.FindDef(inst->type_id()); + if (spv::Op::OpTypePointer != result_type->opcode()) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The Result Type of " << instr_name << " " + << _.getIdName(inst->id()) << " must be OpTypePointer. Found Op" + << spvOpcodeString(result_type->opcode()) << '.'; + } + + // The pointed storage class must be valid. + const auto storage_class = result_type->GetOperandAs(1); + if (storage_class != spv::StorageClass::StorageBuffer && + storage_class != spv::StorageClass::PhysicalStorageBuffer && + storage_class != spv::StorageClass::Uniform) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The Result Type of " << instr_name << " " + << _.getIdName(inst->id()) + << " must point to a storage class of " + "StorageBuffer, PhysicalStorageBuffer, or Uniform."; + } + + // The pointed type must not be one in the list below. + const auto result_type_pointee = + _.FindDef(result_type->GetOperandAs(2)); + if (result_type_pointee->opcode() == spv::Op::OpTypeArray || + result_type_pointee->opcode() == spv::Op::OpTypeMatrix || + result_type_pointee->opcode() == spv::Op::OpTypeStruct) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The Result Type of " << instr_name << " " + << _.getIdName(inst->id()) + << " must not point to " + "OpTypeArray, OpTypeMatrix, or OpTypeStruct."; + } + + // Validate Stride is a OpConstant. + const auto stride = _.FindDef(inst->GetOperandAs(3)); + if (stride->opcode() != spv::Op::OpConstant) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The Stride of " << instr_name << " " + << _.getIdName(inst->id()) << " must be OpConstant. Found Op" + << spvOpcodeString(stride->opcode()) << '.'; + } + // Stride type must be OpTypeInt + const auto stride_type = _.FindDef(stride->type_id()); + if (stride_type->opcode() != spv::Op::OpTypeInt) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The type of Stride of " << instr_name << " " + << _.getIdName(inst->id()) << " must be OpTypeInt. Found Op" + << spvOpcodeString(stride_type->opcode()) << '.'; + } + + // Index and Offset type must be OpTypeInt with a width of 32 + const auto ValidateType = [&](const char* name, + int operandIndex) -> spv_result_t { + const auto value = _.FindDef(inst->GetOperandAs(operandIndex)); + const auto value_type = _.FindDef(value->type_id()); + if (value_type->opcode() != spv::Op::OpTypeInt) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The type of " << name << " of " << instr_name << " " + << _.getIdName(inst->id()) << " must be OpTypeInt. Found Op" + << spvOpcodeString(value_type->opcode()) << '.'; + } + const auto width = value_type->GetOperandAs(1); + if (width != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The integer width of " << name << " of " << instr_name + << " " << _.getIdName(inst->id()) << " must be 32. Found " + << width << '.'; + } + return SPV_SUCCESS; + }; + spv_result_t result; + result = ValidateType("Index", 4); + if (result != SPV_SUCCESS) { + return result; + } + result = ValidateType("Offset", 5); + if (result != SPV_SUCCESS) { + return result; + } + + uint32_t access_operands = 0; + if (inst->operands().size() >= 7) { + access_operands = inst->GetOperandAs(6); + } + if (access_operands & + uint32_t(spv::RawAccessChainOperandsMask::RobustnessPerElementNV)) { + uint64_t stride_value = 0; + if (_.EvalConstantValUint64(stride->id(), &stride_value) && + stride_value == 0) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Stride must not be zero when per-element robustness is used."; + } + } + if (access_operands & + uint32_t(spv::RawAccessChainOperandsMask::RobustnessPerComponentNV) || + access_operands & + uint32_t(spv::RawAccessChainOperandsMask::RobustnessPerElementNV)) { + if (storage_class == spv::StorageClass::PhysicalStorageBuffer) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Storage class cannot be PhysicalStorageBuffer when " + "raw access chain robustness is used."; + } + } + if (access_operands & + uint32_t(spv::RawAccessChainOperandsMask::RobustnessPerComponentNV) && + access_operands & + uint32_t(spv::RawAccessChainOperandsMask::RobustnessPerElementNV)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Per-component robustness and per-element robustness are " + "mutually exclusive."; + } + + return SPV_SUCCESS; +} + spv_result_t ValidatePtrAccessChain(ValidationState_t& _, const Instruction* inst) { - if (_.addressing_model() == SpvAddressingModelLogical) { - if (!_.features().variable_pointers && - !_.features().variable_pointers_storage_buffer) { + if (_.addressing_model() == spv::AddressingModel::Logical) { + if (!_.features().variable_pointers) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Generating variable pointers requires capability " << "VariablePointers or VariablePointersStorageBuffer"; } } - return ValidateAccessChain(_, inst); + + // Need to call first, will make sure Base is a valid ID + if (auto error = ValidateAccessChain(_, inst)) return error; + + const auto base_id = inst->GetOperandAs(2); + const auto base = _.FindDef(base_id); + const auto base_type = _.FindDef(base->type_id()); + const auto base_type_storage_class = + base_type->GetOperandAs(1); + + if (_.HasCapability(spv::Capability::Shader) && + (base_type_storage_class == spv::StorageClass::Uniform || + base_type_storage_class == spv::StorageClass::StorageBuffer || + base_type_storage_class == spv::StorageClass::PhysicalStorageBuffer || + base_type_storage_class == spv::StorageClass::PushConstant || + (_.HasCapability(spv::Capability::WorkgroupMemoryExplicitLayoutKHR) && + base_type_storage_class == spv::StorageClass::Workgroup)) && + !_.HasDecoration(base_type->id(), spv::Decoration::ArrayStride)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "OpPtrAccessChain must have a Base whose type is decorated " + "with ArrayStride"; + } + + if (spvIsVulkanEnv(_.context()->target_env)) { + if (base_type_storage_class == spv::StorageClass::Workgroup) { + if (!_.HasCapability(spv::Capability::VariablePointers)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(7651) + << "OpPtrAccessChain Base operand pointing to Workgroup " + "storage class must use VariablePointers capability"; + } + } else if (base_type_storage_class == spv::StorageClass::StorageBuffer) { + if (!_.features().variable_pointers) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(7652) + << "OpPtrAccessChain Base operand pointing to StorageBuffer " + "storage class must use VariablePointers or " + "VariablePointersStorageBuffer capability"; + } + } else if (base_type_storage_class != + spv::StorageClass::PhysicalStorageBuffer) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << _.VkErrorID(7650) + << "OpPtrAccessChain Base operand must point to Workgroup, " + "StorageBuffer, or PhysicalStorageBuffer storage class"; + } + } + + return SPV_SUCCESS; } spv_result_t ValidateArrayLength(ValidationState_t& state, const Instruction* inst) { std::string instr_name = - "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); + "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); // Result type must be a 32-bit unsigned int. auto result_type = state.FindDef(inst->type_id()); - if (result_type->opcode() != SpvOpTypeInt || + if (result_type->opcode() != spv::Op::OpTypeInt || result_type->GetOperandAs(1) != 32 || result_type->GetOperandAs(2) != 0) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The Result Type of " << instr_name << " '" + << "The Result Type of " << instr_name << " " << state.getIdName(inst->id()) - << "' must be OpTypeInt with width 32 and signedness 0."; + << " must be OpTypeInt with width 32 and signedness 0."; } // The structure that is passed in must be an pointer to a structure, whose // last element is a runtime array. auto pointer = state.FindDef(inst->GetOperandAs(2)); auto pointer_type = state.FindDef(pointer->type_id()); - if (pointer_type->opcode() != SpvOpTypePointer) { + if (pointer_type->opcode() != spv::Op::OpTypePointer) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The Struture's type in " << instr_name << " '" + << "The Structure's type in " << instr_name << " " << state.getIdName(inst->id()) - << "' must be a pointer to an OpTypeStruct."; + << " must be a pointer to an OpTypeStruct."; } auto structure_type = state.FindDef(pointer_type->GetOperandAs(2)); - if (structure_type->opcode() != SpvOpTypeStruct) { + if (structure_type->opcode() != spv::Op::OpTypeStruct) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The Struture's type in " << instr_name << " '" + << "The Structure's type in " << instr_name << " " << state.getIdName(inst->id()) - << "' must be a pointer to an OpTypeStruct."; + << " must be a pointer to an OpTypeStruct."; } auto num_of_members = structure_type->operands().size() - 1; auto last_member = state.FindDef(structure_type->GetOperandAs(num_of_members)); - if (last_member->opcode() != SpvOpTypeRuntimeArray) { + if (last_member->opcode() != spv::Op::OpTypeRuntimeArray) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The Struture's last member in " << instr_name << " '" - << state.getIdName(inst->id()) << "' must be an OpTypeRuntimeArray."; + << "The Structure's last member in " << instr_name << " " + << state.getIdName(inst->id()) << " must be an OpTypeRuntimeArray."; } // The array member must the index of the last element (the run time // array). if (inst->GetOperandAs(3) != num_of_members - 1) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The array member in " << instr_name << " '" + << "The array member in " << instr_name << " " << state.getIdName(inst->id()) - << "' must be an the last member of the struct."; + << " must be an the last member of the struct."; } return SPV_SUCCESS; } @@ -1425,26 +1665,31 @@ spv_result_t ValidateArrayLength(ValidationState_t& state, spv_result_t ValidateCooperativeMatrixLengthNV(ValidationState_t& state, const Instruction* inst) { std::string instr_name = - "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); + "Op" + std::string(spvOpcodeString(static_cast(inst->opcode()))); // Result type must be a 32-bit unsigned int. auto result_type = state.FindDef(inst->type_id()); - if (result_type->opcode() != SpvOpTypeInt || + if (result_type->opcode() != spv::Op::OpTypeInt || result_type->GetOperandAs(1) != 32 || result_type->GetOperandAs(2) != 0) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The Result Type of " << instr_name << " '" + << "The Result Type of " << instr_name << " " << state.getIdName(inst->id()) - << "' must be OpTypeInt with width 32 and signedness 0."; + << " must be OpTypeInt with width 32 and signedness 0."; } + bool isKhr = inst->opcode() == spv::Op::OpCooperativeMatrixLengthKHR; auto type_id = inst->GetOperandAs(2); auto type = state.FindDef(type_id); - if (type->opcode() != SpvOpTypeCooperativeMatrixNV) { + if (isKhr && type->opcode() != spv::Op::OpTypeCooperativeMatrixKHR) { return state.diag(SPV_ERROR_INVALID_ID, inst) - << "The type in " << instr_name << " '" + << "The type in " << instr_name << " " << state.getIdName(type_id) - << "' must be OpTypeCooperativeMatrixNV."; + << " must be OpTypeCooperativeMatrixKHR."; + } else if (!isKhr && type->opcode() != spv::Op::OpTypeCooperativeMatrixNV) { + return state.diag(SPV_ERROR_INVALID_ID, inst) + << "The type in " << instr_name << " " + << state.getIdName(type_id) << " must be OpTypeCooperativeMatrixNV."; } return SPV_SUCCESS; } @@ -1453,66 +1698,63 @@ spv_result_t ValidateCooperativeMatrixLoadStoreNV(ValidationState_t& _, const Instruction* inst) { uint32_t type_id; const char* opname; - if (inst->opcode() == SpvOpCooperativeMatrixLoadNV) { + if (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) { type_id = inst->type_id(); - opname = "SpvOpCooperativeMatrixLoadNV"; + opname = "spv::Op::OpCooperativeMatrixLoadNV"; } else { // get Object operand's type type_id = _.FindDef(inst->GetOperandAs(1))->type_id(); - opname = "SpvOpCooperativeMatrixStoreNV"; + opname = "spv::Op::OpCooperativeMatrixStoreNV"; } auto matrix_type = _.FindDef(type_id); - if (matrix_type->opcode() != SpvOpTypeCooperativeMatrixNV) { - if (inst->opcode() == SpvOpCooperativeMatrixLoadNV) { + if (matrix_type->opcode() != spv::Op::OpTypeCooperativeMatrixNV) { + if (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "SpvOpCooperativeMatrixLoadNV Result Type '" - << _.getIdName(type_id) << "' is not a cooperative matrix type."; + << "spv::Op::OpCooperativeMatrixLoadNV Result Type " + << _.getIdName(type_id) << " is not a cooperative matrix type."; } else { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "SpvOpCooperativeMatrixStoreNV Object type '" - << _.getIdName(type_id) << "' is not a cooperative matrix type."; + << "spv::Op::OpCooperativeMatrixStoreNV Object type " + << _.getIdName(type_id) << " is not a cooperative matrix type."; } } - const bool uses_variable_pointers = - _.features().variable_pointers || - _.features().variable_pointers_storage_buffer; const auto pointer_index = - (inst->opcode() == SpvOpCooperativeMatrixLoadNV) ? 2u : 0u; + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) ? 2u : 0u; const auto pointer_id = inst->GetOperandAs(pointer_index); const auto pointer = _.FindDef(pointer_id); if (!pointer || - ((_.addressing_model() == SpvAddressingModelLogical) && - ((!uses_variable_pointers && + ((_.addressing_model() == spv::AddressingModel::Logical) && + ((!_.features().variable_pointers && !spvOpcodeReturnsLogicalPointer(pointer->opcode())) || - (uses_variable_pointers && + (_.features().variable_pointers && !spvOpcodeReturnsLogicalVariablePointer(pointer->opcode()))))) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opname << " Pointer '" << _.getIdName(pointer_id) - << "' is not a logical pointer."; + << opname << " Pointer " << _.getIdName(pointer_id) + << " is not a logical pointer."; } const auto pointer_type_id = pointer->type_id(); const auto pointer_type = _.FindDef(pointer_type_id); - if (!pointer_type || pointer_type->opcode() != SpvOpTypePointer) { + if (!pointer_type || pointer_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opname << " type for pointer '" << _.getIdName(pointer_id) - << "' is not a pointer type."; + << opname << " type for pointer " << _.getIdName(pointer_id) + << " is not a pointer type."; } const auto storage_class_index = 1u; const auto storage_class = - pointer_type->GetOperandAs(storage_class_index); + pointer_type->GetOperandAs(storage_class_index); - if (storage_class != SpvStorageClassWorkgroup && - storage_class != SpvStorageClassStorageBuffer && - storage_class != SpvStorageClassPhysicalStorageBufferEXT) { + if (storage_class != spv::StorageClass::Workgroup && + storage_class != spv::StorageClass::StorageBuffer && + storage_class != spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opname << " storage class for pointer type '" + << opname << " storage class for pointer type " << _.getIdName(pointer_type_id) - << "' is not Workgroup or StorageBuffer."; + << " is not Workgroup or StorageBuffer."; } const auto pointee_id = pointer_type->GetOperandAs(2); @@ -1520,34 +1762,141 @@ spv_result_t ValidateCooperativeMatrixLoadStoreNV(ValidationState_t& _, if (!pointee_type || !(_.IsIntScalarOrVectorType(pointee_id) || _.IsFloatScalarOrVectorType(pointee_id))) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << opname << " Pointer '" << _.getIdName(pointer->id()) - << "'s Type must be a scalar or vector type."; + << opname << " Pointer " << _.getIdName(pointer->id()) + << "s Type must be a scalar or vector type."; } const auto stride_index = - (inst->opcode() == SpvOpCooperativeMatrixLoadNV) ? 3u : 2u; + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) ? 3u : 2u; const auto stride_id = inst->GetOperandAs(stride_index); const auto stride = _.FindDef(stride_id); if (!stride || !_.IsIntScalarType(stride->type_id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Stride operand '" << _.getIdName(stride_id) - << "' must be a scalar integer type."; + << "Stride operand " << _.getIdName(stride_id) + << " must be a scalar integer type."; } const auto colmajor_index = - (inst->opcode() == SpvOpCooperativeMatrixLoadNV) ? 4u : 3u; + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) ? 4u : 3u; const auto colmajor_id = inst->GetOperandAs(colmajor_index); const auto colmajor = _.FindDef(colmajor_id); if (!colmajor || !_.IsBoolScalarType(colmajor->type_id()) || !(spvOpcodeIsConstant(colmajor->opcode()) || spvOpcodeIsSpecConstant(colmajor->opcode()))) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Column Major operand '" << _.getIdName(colmajor_id) - << "' must be a boolean constant instruction."; + << "Column Major operand " << _.getIdName(colmajor_id) + << " must be a boolean constant instruction."; } const auto memory_access_index = - (inst->opcode() == SpvOpCooperativeMatrixLoadNV) ? 5u : 4u; + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadNV) ? 5u : 4u; + if (inst->operands().size() > memory_access_index) { + if (auto error = CheckMemoryAccess(_, inst, memory_access_index)) + return error; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateCooperativeMatrixLoadStoreKHR(ValidationState_t& _, + const Instruction* inst) { + uint32_t type_id; + const char* opname; + if (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) { + type_id = inst->type_id(); + opname = "spv::Op::OpCooperativeMatrixLoadKHR"; + } else { + // get Object operand's type + type_id = _.FindDef(inst->GetOperandAs(1))->type_id(); + opname = "spv::Op::OpCooperativeMatrixStoreKHR"; + } + + auto matrix_type = _.FindDef(type_id); + + if (matrix_type->opcode() != spv::Op::OpTypeCooperativeMatrixKHR) { + if (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "spv::Op::OpCooperativeMatrixLoadKHR Result Type " + << _.getIdName(type_id) << " is not a cooperative matrix type."; + } else { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "spv::Op::OpCooperativeMatrixStoreKHR Object type " + << _.getIdName(type_id) << " is not a cooperative matrix type."; + } + } + + const auto pointer_index = + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) ? 2u : 0u; + const auto pointer_id = inst->GetOperandAs(pointer_index); + const auto pointer = _.FindDef(pointer_id); + if (!pointer || + ((_.addressing_model() == spv::AddressingModel::Logical) && + ((!_.features().variable_pointers && + !spvOpcodeReturnsLogicalPointer(pointer->opcode())) || + (_.features().variable_pointers && + !spvOpcodeReturnsLogicalVariablePointer(pointer->opcode()))))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << opname << " Pointer " << _.getIdName(pointer_id) + << " is not a logical pointer."; + } + + const auto pointer_type_id = pointer->type_id(); + const auto pointer_type = _.FindDef(pointer_type_id); + if (!pointer_type || pointer_type->opcode() != spv::Op::OpTypePointer) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << opname << " type for pointer " << _.getIdName(pointer_id) + << " is not a pointer type."; + } + + const auto storage_class_index = 1u; + const auto storage_class = + pointer_type->GetOperandAs(storage_class_index); + + if (storage_class != spv::StorageClass::Workgroup && + storage_class != spv::StorageClass::StorageBuffer && + storage_class != spv::StorageClass::PhysicalStorageBuffer) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(8973) << opname + << " storage class for pointer type " + << _.getIdName(pointer_type_id) + << " is not Workgroup, StorageBuffer, or PhysicalStorageBuffer."; + } + + const auto pointee_id = pointer_type->GetOperandAs(2); + const auto pointee_type = _.FindDef(pointee_id); + if (!pointee_type || !(_.IsIntScalarOrVectorType(pointee_id) || + _.IsFloatScalarOrVectorType(pointee_id))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << opname << " Pointer " << _.getIdName(pointer->id()) + << "s Type must be a scalar or vector type."; + } + + const auto layout_index = + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) ? 3u : 2u; + const auto colmajor_id = inst->GetOperandAs(layout_index); + const auto colmajor = _.FindDef(colmajor_id); + if (!colmajor || !_.IsIntScalarType(colmajor->type_id()) || + !(spvOpcodeIsConstant(colmajor->opcode()) || + spvOpcodeIsSpecConstant(colmajor->opcode()))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "MemoryLayout operand " << _.getIdName(colmajor_id) + << " must be a 32-bit integer constant instruction."; + } + + const auto stride_index = + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) ? 4u : 3u; + if (inst->operands().size() > stride_index) { + const auto stride_id = inst->GetOperandAs(stride_index); + const auto stride = _.FindDef(stride_id); + if (!stride || !_.IsIntScalarType(stride->type_id())) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "Stride operand " << _.getIdName(stride_id) + << " must be a scalar integer type."; + } + } + + const auto memory_access_index = + (inst->opcode() == spv::Op::OpCooperativeMatrixLoadKHR) ? 5u : 4u; if (inst->operands().size() > memory_access_index) { if (auto error = CheckMemoryAccess(_, inst, memory_access_index)) return error; @@ -1558,21 +1907,21 @@ spv_result_t ValidateCooperativeMatrixLoadStoreNV(ValidationState_t& _, spv_result_t ValidatePtrComparison(ValidationState_t& _, const Instruction* inst) { - if (_.addressing_model() == SpvAddressingModelLogical && - !_.features().variable_pointers_storage_buffer) { + if (_.addressing_model() == spv::AddressingModel::Logical && + !_.features().variable_pointers) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "Instruction cannot be used without a variable pointers " - "capability"; + << "Instruction cannot for logical addressing model be used without " + "a variable pointers capability"; } const auto result_type = _.FindDef(inst->type_id()); - if (inst->opcode() == SpvOpPtrDiff) { - if (!result_type || result_type->opcode() != SpvOpTypeInt) { + if (inst->opcode() == spv::Op::OpPtrDiff) { + if (!result_type || result_type->opcode() != spv::Op::OpTypeInt) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result Type must be an integer scalar"; } } else { - if (!result_type || result_type->opcode() != SpvOpTypeBool) { + if (!result_type || result_type->opcode() != spv::Op::OpTypeBool) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Result Type must be OpTypeBool"; } @@ -1585,24 +1934,26 @@ spv_result_t ValidatePtrComparison(ValidationState_t& _, << "The types of Operand 1 and Operand 2 must match"; } const auto op1_type = _.FindDef(op1->type_id()); - if (!op1_type || op1_type->opcode() != SpvOpTypePointer) { + if (!op1_type || op1_type->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Operand type must be a pointer"; } - SpvStorageClass sc = op1_type->GetOperandAs(1u); - if (_.addressing_model() == SpvAddressingModelLogical) { - if (sc != SpvStorageClassWorkgroup && sc != SpvStorageClassStorageBuffer) { + spv::StorageClass sc = op1_type->GetOperandAs(1u); + if (_.addressing_model() == spv::AddressingModel::Logical) { + if (sc != spv::StorageClass::Workgroup && + sc != spv::StorageClass::StorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Invalid pointer storage class"; } - if (sc == SpvStorageClassWorkgroup && !_.features().variable_pointers) { + if (sc == spv::StorageClass::Workgroup && + !_.HasCapability(spv::Capability::VariablePointers)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Workgroup storage class pointer requires VariablePointers " "capability to be specified"; } - } else if (sc == SpvStorageClassPhysicalStorageBuffer) { + } else if (sc == spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Cannot use a pointer in the PhysicalStorageBuffer storage class"; } @@ -1614,45 +1965,54 @@ spv_result_t ValidatePtrComparison(ValidationState_t& _, spv_result_t MemoryPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpVariable: + case spv::Op::OpVariable: if (auto error = ValidateVariable(_, inst)) return error; break; - case SpvOpLoad: + case spv::Op::OpLoad: if (auto error = ValidateLoad(_, inst)) return error; break; - case SpvOpStore: + case spv::Op::OpStore: if (auto error = ValidateStore(_, inst)) return error; break; - case SpvOpCopyMemory: - case SpvOpCopyMemorySized: + case spv::Op::OpCopyMemory: + case spv::Op::OpCopyMemorySized: if (auto error = ValidateCopyMemory(_, inst)) return error; break; - case SpvOpPtrAccessChain: + case spv::Op::OpPtrAccessChain: if (auto error = ValidatePtrAccessChain(_, inst)) return error; break; - case SpvOpAccessChain: - case SpvOpInBoundsAccessChain: - case SpvOpInBoundsPtrAccessChain: + case spv::Op::OpAccessChain: + case spv::Op::OpInBoundsAccessChain: + case spv::Op::OpInBoundsPtrAccessChain: if (auto error = ValidateAccessChain(_, inst)) return error; break; - case SpvOpArrayLength: + case spv::Op::OpRawAccessChainNV: + if (auto error = ValidateRawAccessChain(_, inst)) return error; + break; + case spv::Op::OpArrayLength: if (auto error = ValidateArrayLength(_, inst)) return error; break; - case SpvOpCooperativeMatrixLoadNV: - case SpvOpCooperativeMatrixStoreNV: + case spv::Op::OpCooperativeMatrixLoadNV: + case spv::Op::OpCooperativeMatrixStoreNV: if (auto error = ValidateCooperativeMatrixLoadStoreNV(_, inst)) return error; break; - case SpvOpCooperativeMatrixLengthNV: + case spv::Op::OpCooperativeMatrixLengthKHR: + case spv::Op::OpCooperativeMatrixLengthNV: if (auto error = ValidateCooperativeMatrixLengthNV(_, inst)) return error; break; - case SpvOpPtrEqual: - case SpvOpPtrNotEqual: - case SpvOpPtrDiff: + case spv::Op::OpCooperativeMatrixLoadKHR: + case spv::Op::OpCooperativeMatrixStoreKHR: + if (auto error = ValidateCooperativeMatrixLoadStoreKHR(_, inst)) + return error; + break; + case spv::Op::OpPtrEqual: + case spv::Op::OpPtrNotEqual: + case spv::Op::OpPtrDiff: if (auto error = ValidatePtrComparison(_, inst)) return error; break; - case SpvOpImageTexelPointer: - case SpvOpGenericPtrMemSemantics: + case spv::Op::OpImageTexelPointer: + case spv::Op::OpGenericPtrMemSemantics: default: break; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory_semantics.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory_semantics.cpp index d9189313a..dab7b5a19 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory_semantics.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_memory_semantics.cpp @@ -14,7 +14,6 @@ #include "source/val/validate_memory_semantics.h" -#include "source/diagnostic.h" #include "source/spirv_target_env.h" #include "source/util/bitutils.h" #include "source/val/instruction.h" @@ -27,7 +26,7 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, const Instruction* inst, uint32_t operand_index, uint32_t memory_scope) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); const auto id = inst->GetOperandAs(operand_index); bool is_int32 = false, is_const_int32 = false; uint32_t value = 0; @@ -40,15 +39,15 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } if (!is_const_int32) { - if (_.HasCapability(SpvCapabilityShader) && - !_.HasCapability(SpvCapabilityCooperativeMatrixNV)) { + if (_.HasCapability(spv::Capability::Shader) && + !_.HasCapability(spv::Capability::CooperativeMatrixNV)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Memory Semantics ids must be OpConstant when Shader " "capability is present"; } - if (_.HasCapability(SpvCapabilityShader) && - _.HasCapability(SpvCapabilityCooperativeMatrixNV) && + if (_.HasCapability(spv::Capability::Shader) && + _.HasCapability(spv::Capability::CooperativeMatrixNV) && !spvOpcodeIsConstant(_.GetIdOpcode(id))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Memory Semantics must be a constant instruction when " @@ -58,9 +57,10 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } const size_t num_memory_order_set_bits = spvtools::utils::CountSetBits( - value & (SpvMemorySemanticsAcquireMask | SpvMemorySemanticsReleaseMask | - SpvMemorySemanticsAcquireReleaseMask | - SpvMemorySemanticsSequentiallyConsistentMask)); + value & uint32_t(spv::MemorySemanticsMask::Acquire | + spv::MemorySemanticsMask::Release | + spv::MemorySemanticsMask::AcquireRelease | + spv::MemorySemanticsMask::SequentiallyConsistent)); if (num_memory_order_set_bits > 1) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -71,40 +71,40 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, "SequentiallyConsistent"; } - if (_.memory_model() == SpvMemoryModelVulkanKHR && - value & SpvMemorySemanticsSequentiallyConsistentMask) { + if (_.memory_model() == spv::MemoryModel::VulkanKHR && + value & uint32_t(spv::MemorySemanticsMask::SequentiallyConsistent)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "SequentiallyConsistent memory " "semantics cannot be used with " "the VulkanKHR memory model."; } - if (value & SpvMemorySemanticsMakeAvailableKHRMask && - !_.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + if (value & uint32_t(spv::MemorySemanticsMask::MakeAvailableKHR) && + !_.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics MakeAvailableKHR requires capability " << "VulkanMemoryModelKHR"; } - if (value & SpvMemorySemanticsMakeVisibleKHRMask && - !_.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + if (value & uint32_t(spv::MemorySemanticsMask::MakeVisibleKHR) && + !_.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics MakeVisibleKHR requires capability " << "VulkanMemoryModelKHR"; } - if (value & SpvMemorySemanticsOutputMemoryKHRMask && - !_.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + if (value & uint32_t(spv::MemorySemanticsMask::OutputMemoryKHR) && + !_.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics OutputMemoryKHR requires capability " << "VulkanMemoryModelKHR"; } - if (value & SpvMemorySemanticsVolatileMask) { - if (!_.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + if (value & uint32_t(spv::MemorySemanticsMask::Volatile)) { + if (!_.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics Volatile requires capability " @@ -118,26 +118,27 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } } - if (value & SpvMemorySemanticsUniformMemoryMask && - !_.HasCapability(SpvCapabilityShader)) { + if (value & uint32_t(spv::MemorySemanticsMask::UniformMemory) && + !_.HasCapability(spv::Capability::Shader)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics UniformMemory requires capability Shader"; } - // Checking for SpvCapabilityAtomicStorage is intentionally not done here. See - // https://github.com/KhronosGroup/glslang/issues/1618 for the reasoning why. + // Checking for spv::Capability::AtomicStorage is intentionally not done here. + // See https://github.com/KhronosGroup/glslang/issues/1618 for the reasoning + // why. - if (value & (SpvMemorySemanticsMakeAvailableKHRMask | - SpvMemorySemanticsMakeVisibleKHRMask)) { + if (value & uint32_t(spv::MemorySemanticsMask::MakeAvailableKHR | + spv::MemorySemanticsMask::MakeVisibleKHR)) { const bool includes_storage_class = - value & (SpvMemorySemanticsUniformMemoryMask | - SpvMemorySemanticsSubgroupMemoryMask | - SpvMemorySemanticsWorkgroupMemoryMask | - SpvMemorySemanticsCrossWorkgroupMemoryMask | - SpvMemorySemanticsAtomicCounterMemoryMask | - SpvMemorySemanticsImageMemoryMask | - SpvMemorySemanticsOutputMemoryKHRMask); + value & uint32_t(spv::MemorySemanticsMask::UniformMemory | + spv::MemorySemanticsMask::SubgroupMemory | + spv::MemorySemanticsMask::WorkgroupMemory | + spv::MemorySemanticsMask::CrossWorkgroupMemory | + spv::MemorySemanticsMask::AtomicCounterMemory | + spv::MemorySemanticsMask::ImageMemory | + spv::MemorySemanticsMask::OutputMemoryKHR); if (!includes_storage_class) { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -146,18 +147,18 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } } - if (value & SpvMemorySemanticsMakeVisibleKHRMask && - !(value & (SpvMemorySemanticsAcquireMask | - SpvMemorySemanticsAcquireReleaseMask))) { + if (value & uint32_t(spv::MemorySemanticsMask::MakeVisibleKHR) && + !(value & uint32_t(spv::MemorySemanticsMask::Acquire | + spv::MemorySemanticsMask::AcquireRelease))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": MakeVisibleKHR Memory Semantics also requires either Acquire " "or AcquireRelease Memory Semantics"; } - if (value & SpvMemorySemanticsMakeAvailableKHRMask && - !(value & (SpvMemorySemanticsReleaseMask | - SpvMemorySemanticsAcquireReleaseMask))) { + if (value & uint32_t(spv::MemorySemanticsMask::MakeAvailableKHR) && + !(value & uint32_t(spv::MemorySemanticsMask::Release | + spv::MemorySemanticsMask::AcquireRelease))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": MakeAvailableKHR Memory Semantics also requires either " @@ -166,12 +167,12 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, if (spvIsVulkanEnv(_.context()->target_env)) { const bool includes_storage_class = - value & (SpvMemorySemanticsUniformMemoryMask | - SpvMemorySemanticsWorkgroupMemoryMask | - SpvMemorySemanticsImageMemoryMask | - SpvMemorySemanticsOutputMemoryKHRMask); + value & uint32_t(spv::MemorySemanticsMask::UniformMemory | + spv::MemorySemanticsMask::WorkgroupMemory | + spv::MemorySemanticsMask::ImageMemory | + spv::MemorySemanticsMask::OutputMemoryKHR); - if (opcode == SpvOpMemoryBarrier && !num_memory_order_set_bits) { + if (opcode == spv::Op::OpMemoryBarrier && !num_memory_order_set_bits) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4732) << spvOpcodeString(opcode) << ": Vulkan specification requires Memory Semantics to have " @@ -179,13 +180,15 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, "of the following bits set: Acquire, Release, " "AcquireRelease " "or SequentiallyConsistent"; - } else if (opcode != SpvOpMemoryBarrier && num_memory_order_set_bits) { + } else if (opcode != spv::Op::OpMemoryBarrier && + num_memory_order_set_bits) { // should leave only atomics and control barriers for Vulkan env bool memory_is_int32 = false, memory_is_const_int32 = false; uint32_t memory_value = 0; std::tie(memory_is_int32, memory_is_const_int32, memory_value) = _.EvalInt32IfConst(memory_scope); - if (memory_is_int32 && memory_value == SpvScopeInvocation) { + if (memory_is_int32 && + spv::Scope(memory_value) == spv::Scope::Invocation) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4641) << spvOpcodeString(opcode) << ": Vulkan specification requires Memory Semantics to be None " @@ -193,36 +196,33 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } } - if (opcode == SpvOpMemoryBarrier && !includes_storage_class) { + if (opcode == spv::Op::OpMemoryBarrier && !includes_storage_class) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4733) << spvOpcodeString(opcode) << ": expected Memory Semantics to include a Vulkan-supported " "storage class"; } -#if 0 - // TODO(atgoo@github.com): this check fails Vulkan CTS, reenable once fixed. - if (opcode == SpvOpControlBarrier && value && !includes_storage_class) { + if (opcode == spv::Op::OpControlBarrier && value && !includes_storage_class) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << spvOpcodeString(opcode) + << _.VkErrorID(4650) << spvOpcodeString(opcode) << ": expected Memory Semantics to include a Vulkan-supported " "storage class if Memory Semantics is not None"; } -#endif } - if (opcode == SpvOpAtomicFlagClear && - (value & SpvMemorySemanticsAcquireMask || - value & SpvMemorySemanticsAcquireReleaseMask)) { + if (opcode == spv::Op::OpAtomicFlagClear && + (value & uint32_t(spv::MemorySemanticsMask::Acquire) || + value & uint32_t(spv::MemorySemanticsMask::AcquireRelease))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Memory Semantics Acquire and AcquireRelease cannot be used " "with " << spvOpcodeString(opcode); } - if (opcode == SpvOpAtomicCompareExchange && operand_index == 5 && - (value & SpvMemorySemanticsReleaseMask || - value & SpvMemorySemanticsAcquireReleaseMask)) { + if (opcode == spv::Op::OpAtomicCompareExchange && operand_index == 5 && + (value & uint32_t(spv::MemorySemanticsMask::Release) || + value & uint32_t(spv::MemorySemanticsMask::AcquireRelease))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Memory Semantics Release and AcquireRelease cannot be " @@ -231,20 +231,20 @@ spv_result_t ValidateMemorySemantics(ValidationState_t& _, } if (spvIsVulkanEnv(_.context()->target_env)) { - if (opcode == SpvOpAtomicLoad && - (value & SpvMemorySemanticsReleaseMask || - value & SpvMemorySemanticsAcquireReleaseMask || - value & SpvMemorySemanticsSequentiallyConsistentMask)) { + if (opcode == spv::Op::OpAtomicLoad && + (value & uint32_t(spv::MemorySemanticsMask::Release) || + value & uint32_t(spv::MemorySemanticsMask::AcquireRelease) || + value & uint32_t(spv::MemorySemanticsMask::SequentiallyConsistent))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4731) << "Vulkan spec disallows OpAtomicLoad with Memory Semantics " "Release, AcquireRelease and SequentiallyConsistent"; } - if (opcode == SpvOpAtomicStore && - (value & SpvMemorySemanticsAcquireMask || - value & SpvMemorySemanticsAcquireReleaseMask || - value & SpvMemorySemanticsSequentiallyConsistentMask)) { + if (opcode == spv::Op::OpAtomicStore && + (value & uint32_t(spv::MemorySemanticsMask::Acquire) || + value & uint32_t(spv::MemorySemanticsMask::AcquireRelease) || + value & uint32_t(spv::MemorySemanticsMask::SequentiallyConsistent))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4730) << "Vulkan spec disallows OpAtomicStore with Memory Semantics " diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mesh_shading.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mesh_shading.cpp new file mode 100644 index 000000000..e569e251c --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mesh_shading.cpp @@ -0,0 +1,123 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates ray query instructions from SPV_KHR_ray_query + +#include "source/opcode.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" + +namespace spvtools { +namespace val { + +spv_result_t MeshShadingPass(ValidationState_t& _, const Instruction* inst) { + const spv::Op opcode = inst->opcode(); + switch (opcode) { + case spv::Op::OpEmitMeshTasksEXT: { + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::TaskEXT) { + if (message) { + *message = + "OpEmitMeshTasksEXT requires TaskEXT execution model"; + } + return false; + } + return true; + }); + + const uint32_t group_count_x = _.GetOperandTypeId(inst, 0); + if (!_.IsUnsignedIntScalarType(group_count_x) || + _.GetBitWidth(group_count_x) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Group Count X must be a 32-bit unsigned int scalar"; + } + + const uint32_t group_count_y = _.GetOperandTypeId(inst, 1); + if (!_.IsUnsignedIntScalarType(group_count_y) || + _.GetBitWidth(group_count_y) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Group Count Y must be a 32-bit unsigned int scalar"; + } + + const uint32_t group_count_z = _.GetOperandTypeId(inst, 2); + if (!_.IsUnsignedIntScalarType(group_count_z) || + _.GetBitWidth(group_count_z) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Group Count Z must be a 32-bit unsigned int scalar"; + } + + if (inst->operands().size() == 4) { + const auto payload = _.FindDef(inst->GetOperandAs(3)); + if (payload->opcode() != spv::Op::OpVariable) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Payload must be the result of a OpVariable"; + } + if (payload->GetOperandAs(2) != + spv::StorageClass::TaskPayloadWorkgroupEXT) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Payload OpVariable must have a storage class of " + "TaskPayloadWorkgroupEXT"; + } + } + break; + } + + case spv::Op::OpSetMeshOutputsEXT: { + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::MeshEXT) { + if (message) { + *message = + "OpSetMeshOutputsEXT requires MeshEXT execution model"; + } + return false; + } + return true; + }); + + const uint32_t vertex_count = _.GetOperandTypeId(inst, 0); + if (!_.IsUnsignedIntScalarType(vertex_count) || + _.GetBitWidth(vertex_count) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Vertex Count must be a 32-bit unsigned int scalar"; + } + + const uint32_t primitive_count = _.GetOperandTypeId(inst, 1); + if (!_.IsUnsignedIntScalarType(primitive_count) || + _.GetBitWidth(primitive_count) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Primitive Count must be a 32-bit unsigned int scalar"; + } + + break; + } + + case spv::Op::OpWritePackedPrimitiveIndices4x8NV: { + // No validation rules (for the moment). + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace val +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_misc.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_misc.cpp index 3bc15ca04..d71fd2d26 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_misc.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_misc.cpp @@ -30,7 +30,7 @@ spv_result_t ValidateUndef(ValidationState_t& _, const Instruction* inst) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Cannot create undefined values with void type"; } - if (_.HasCapability(SpvCapabilityShader) && + if (_.HasCapability(spv::Capability::Shader) && _.ContainsLimitedUseIntOrFloatType(inst->type_id()) && !_.IsPointerType(inst->type_id())) { return _.diag(SPV_ERROR_INVALID_ID, inst) @@ -50,7 +50,8 @@ spv_result_t ValidateShaderClock(ValidationState_t& _, bool is_int32 = false, is_const_int32 = false; uint32_t value = 0; std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); - if (is_const_int32 && value != SpvScopeSubgroup && value != SpvScopeDevice) { + if (is_const_int32 && spv::Scope(value) != spv::Scope::Subgroup && + spv::Scope(value) != spv::Scope::Device) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4652) << "Scope must be Subgroup or Device"; } @@ -59,10 +60,7 @@ spv_result_t ValidateShaderClock(ValidationState_t& _, // a vector of two - components of 32 - // bit unsigned integer type const uint32_t result_type = inst->type_id(); - if (!(_.IsUnsignedIntScalarType(result_type) && - _.GetBitWidth(result_type) == 64) && - !(_.IsUnsignedIntVectorType(result_type) && - _.GetDimension(result_type) == 2 && _.GetBitWidth(result_type) == 32)) { + if (!_.IsUnsigned64BitHandle(result_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Expected Value to be a " "vector of two components" " of unsigned integer" @@ -107,18 +105,18 @@ spv_result_t ValidateExpect(ValidationState_t& _, const Instruction* inst) { spv_result_t MiscPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpUndef: + case spv::Op::OpUndef: if (auto error = ValidateUndef(_, inst)) return error; break; default: break; } switch (inst->opcode()) { - case SpvOpBeginInvocationInterlockEXT: - case SpvOpEndInvocationInterlockEXT: + case spv::Op::OpBeginInvocationInterlockEXT: + case spv::Op::OpEndInvocationInterlockEXT: _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, "OpBeginInvocationInterlockEXT/OpEndInvocationInterlockEXT " "require Fragment execution model"); @@ -129,14 +127,14 @@ spv_result_t MiscPass(ValidationState_t& _, const Instruction* inst) { const auto* execution_modes = state.GetExecutionModes(entry_point->id()); - auto find_interlock = [](const SpvExecutionMode& mode) { + auto find_interlock = [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModePixelInterlockOrderedEXT: - case SpvExecutionModePixelInterlockUnorderedEXT: - case SpvExecutionModeSampleInterlockOrderedEXT: - case SpvExecutionModeSampleInterlockUnorderedEXT: - case SpvExecutionModeShadingRateInterlockOrderedEXT: - case SpvExecutionModeShadingRateInterlockUnorderedEXT: + case spv::ExecutionMode::PixelInterlockOrderedEXT: + case spv::ExecutionMode::PixelInterlockUnorderedEXT: + case spv::ExecutionMode::SampleInterlockOrderedEXT: + case spv::ExecutionMode::SampleInterlockUnorderedEXT: + case spv::ExecutionMode::ShadingRateInterlockOrderedEXT: + case spv::ExecutionMode::ShadingRateInterlockUnorderedEXT: return true; default: return false; @@ -159,18 +157,18 @@ spv_result_t MiscPass(ValidationState_t& _, const Instruction* inst) { return true; }); break; - case SpvOpDemoteToHelperInvocationEXT: + case spv::Op::OpDemoteToHelperInvocationEXT: _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, "OpDemoteToHelperInvocationEXT requires Fragment execution " "model"); break; - case SpvOpIsHelperInvocationEXT: { + case spv::Op::OpIsHelperInvocationEXT: { const uint32_t result_type = inst->type_id(); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelFragment, + spv::ExecutionModel::Fragment, "OpIsHelperInvocationEXT requires Fragment execution model"); if (!_.IsBoolScalarType(result_type)) return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -178,17 +176,17 @@ spv_result_t MiscPass(ValidationState_t& _, const Instruction* inst) { << spvOpcodeString(inst->opcode()); break; } - case SpvOpReadClockKHR: + case spv::Op::OpReadClockKHR: if (auto error = ValidateShaderClock(_, inst)) { return error; } break; - case SpvOpAssumeTrueKHR: + case spv::Op::OpAssumeTrueKHR: if (auto error = ValidateAssumeTrue(_, inst)) { return error; } break; - case SpvOpExpectKHR: + case spv::Op::OpExpectKHR: if (auto error = ValidateExpect(_, inst)) { return error; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mode_setting.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mode_setting.cpp index 963526870..8502fda53 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mode_setting.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_mode_setting.cpp @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. // -#include "source/val/validate.h" - #include #include "source/opcode.h" #include "source/spirv_target_env.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -28,60 +27,60 @@ namespace { spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { const auto entry_point_id = inst->GetOperandAs(1); auto entry_point = _.FindDef(entry_point_id); - if (!entry_point || SpvOpFunction != entry_point->opcode()) { + if (!entry_point || spv::Op::OpFunction != entry_point->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpEntryPoint Entry Point '" << _.getIdName(entry_point_id) - << "' is not a function."; + << "OpEntryPoint Entry Point " << _.getIdName(entry_point_id) + << " is not a function."; } // Only check the shader execution models - const SpvExecutionModel execution_model = - inst->GetOperandAs(0); - if (execution_model != SpvExecutionModelKernel) { + const spv::ExecutionModel execution_model = + inst->GetOperandAs(0); + if (execution_model != spv::ExecutionModel::Kernel) { const auto entry_point_type_id = entry_point->GetOperandAs(3); const auto entry_point_type = _.FindDef(entry_point_type_id); if (!entry_point_type || 3 != entry_point_type->words().size()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << _.VkErrorID(4633) << "OpEntryPoint Entry Point '" + << _.VkErrorID(4633) << "OpEntryPoint Entry Point " << _.getIdName(entry_point_id) - << "'s function parameter count is not zero."; + << "s function parameter count is not zero."; } } auto return_type = _.FindDef(entry_point->type_id()); - if (!return_type || SpvOpTypeVoid != return_type->opcode()) { + if (!return_type || spv::Op::OpTypeVoid != return_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << _.VkErrorID(4633) << "OpEntryPoint Entry Point '" + << _.VkErrorID(4633) << "OpEntryPoint Entry Point " << _.getIdName(entry_point_id) - << "'s function return type is not void."; + << "s function return type is not void."; } const auto* execution_modes = _.GetExecutionModes(entry_point_id); - if (_.HasCapability(SpvCapabilityShader)) { + if (_.HasCapability(spv::Capability::Shader)) { switch (execution_model) { - case SpvExecutionModelFragment: + case spv::ExecutionModel::Fragment: if (execution_modes && - execution_modes->count(SpvExecutionModeOriginUpperLeft) && - execution_modes->count(SpvExecutionModeOriginLowerLeft)) { + execution_modes->count(spv::ExecutionMode::OriginUpperLeft) && + execution_modes->count(spv::ExecutionMode::OriginLowerLeft)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Fragment execution model entry points can only specify " "one of OriginUpperLeft or OriginLowerLeft execution " "modes."; } if (!execution_modes || - (!execution_modes->count(SpvExecutionModeOriginUpperLeft) && - !execution_modes->count(SpvExecutionModeOriginLowerLeft))) { + (!execution_modes->count(spv::ExecutionMode::OriginUpperLeft) && + !execution_modes->count(spv::ExecutionMode::OriginLowerLeft))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Fragment execution model entry points require either an " "OriginUpperLeft or OriginLowerLeft execution mode."; } if (execution_modes && 1 < std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModeDepthGreater: - case SpvExecutionModeDepthLess: - case SpvExecutionModeDepthUnchanged: + case spv::ExecutionMode::DepthGreater: + case spv::ExecutionMode::DepthLess: + case spv::ExecutionMode::DepthUnchanged: return true; default: return false; @@ -95,14 +94,15 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { if (execution_modes && 1 < std::count_if( execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModePixelInterlockOrderedEXT: - case SpvExecutionModePixelInterlockUnorderedEXT: - case SpvExecutionModeSampleInterlockOrderedEXT: - case SpvExecutionModeSampleInterlockUnorderedEXT: - case SpvExecutionModeShadingRateInterlockOrderedEXT: - case SpvExecutionModeShadingRateInterlockUnorderedEXT: + case spv::ExecutionMode::PixelInterlockOrderedEXT: + case spv::ExecutionMode::PixelInterlockUnorderedEXT: + case spv::ExecutionMode::SampleInterlockOrderedEXT: + case spv::ExecutionMode::SampleInterlockUnorderedEXT: + case spv::ExecutionMode::ShadingRateInterlockOrderedEXT: + case spv::ExecutionMode:: + ShadingRateInterlockUnorderedEXT: return true; default: return false; @@ -112,21 +112,60 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { << "Fragment execution model entry points can specify at most " "one fragment shader interlock execution mode."; } + if (execution_modes && + 1 < std::count_if( + execution_modes->begin(), execution_modes->end(), + [](const spv::ExecutionMode& mode) { + switch (mode) { + case spv::ExecutionMode::StencilRefUnchangedFrontAMD: + case spv::ExecutionMode::StencilRefLessFrontAMD: + case spv::ExecutionMode::StencilRefGreaterFrontAMD: + return true; + default: + return false; + } + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Fragment execution model entry points can specify at most " + "one of StencilRefUnchangedFrontAMD, " + "StencilRefLessFrontAMD or StencilRefGreaterFrontAMD " + "execution modes."; + } + if (execution_modes && + 1 < std::count_if( + execution_modes->begin(), execution_modes->end(), + [](const spv::ExecutionMode& mode) { + switch (mode) { + case spv::ExecutionMode::StencilRefUnchangedBackAMD: + case spv::ExecutionMode::StencilRefLessBackAMD: + case spv::ExecutionMode::StencilRefGreaterBackAMD: + return true; + default: + return false; + } + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Fragment execution model entry points can specify at most " + "one of StencilRefUnchangedBackAMD, " + "StencilRefLessBackAMD or StencilRefGreaterBackAMD " + "execution modes."; + } break; - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: if (execution_modes && - 1 < std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { - switch (mode) { - case SpvExecutionModeSpacingEqual: - case SpvExecutionModeSpacingFractionalEven: - case SpvExecutionModeSpacingFractionalOdd: - return true; - default: - return false; - } - })) { + 1 < std::count_if( + execution_modes->begin(), execution_modes->end(), + [](const spv::ExecutionMode& mode) { + switch (mode) { + case spv::ExecutionMode::SpacingEqual: + case spv::ExecutionMode::SpacingFractionalEven: + case spv::ExecutionMode::SpacingFractionalOdd: + return true; + default: + return false; + } + })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Tessellation execution model entry points can specify at " "most one of SpacingEqual, SpacingFractionalOdd or " @@ -134,11 +173,11 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { } if (execution_modes && 1 < std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModeTriangles: - case SpvExecutionModeQuads: - case SpvExecutionModeIsolines: + case spv::ExecutionMode::Triangles: + case spv::ExecutionMode::Quads: + case spv::ExecutionMode::Isolines: return true; default: return false; @@ -150,10 +189,10 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { } if (execution_modes && 1 < std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModeVertexOrderCw: - case SpvExecutionModeVertexOrderCcw: + case spv::ExecutionMode::VertexOrderCw: + case spv::ExecutionMode::VertexOrderCcw: return true; default: return false; @@ -165,16 +204,35 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { "modes."; } break; - case SpvExecutionModelGeometry: + case spv::ExecutionModel::Geometry: + if (!execution_modes || + 1 != std::count_if( + execution_modes->begin(), execution_modes->end(), + [](const spv::ExecutionMode& mode) { + switch (mode) { + case spv::ExecutionMode::InputPoints: + case spv::ExecutionMode::InputLines: + case spv::ExecutionMode::InputLinesAdjacency: + case spv::ExecutionMode::Triangles: + case spv::ExecutionMode::InputTrianglesAdjacency: + return true; + default: + return false; + } + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Geometry execution model entry points must specify " + "exactly one of InputPoints, InputLines, " + "InputLinesAdjacency, Triangles or InputTrianglesAdjacency " + "execution modes."; + } if (!execution_modes || 1 != std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModeInputPoints: - case SpvExecutionModeInputLines: - case SpvExecutionModeInputLinesAdjacency: - case SpvExecutionModeTriangles: - case SpvExecutionModeInputTrianglesAdjacency: + case spv::ExecutionMode::OutputPoints: + case spv::ExecutionMode::OutputLineStrip: + case spv::ExecutionMode::OutputTriangleStrip: return true; default: return false; @@ -182,26 +240,41 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Geometry execution model entry points must specify " - "exactly one of InputPoints, InputLines, " - "InputLinesAdjacency, Triangles or InputTrianglesAdjacency " - "execution modes."; + "exactly one of OutputPoints, OutputLineStrip or " + "OutputTriangleStrip execution modes."; } + break; + case spv::ExecutionModel::MeshEXT: if (!execution_modes || 1 != std::count_if(execution_modes->begin(), execution_modes->end(), - [](const SpvExecutionMode& mode) { + [](const spv::ExecutionMode& mode) { switch (mode) { - case SpvExecutionModeOutputPoints: - case SpvExecutionModeOutputLineStrip: - case SpvExecutionModeOutputTriangleStrip: + case spv::ExecutionMode::OutputPoints: + case spv::ExecutionMode::OutputLinesEXT: + case spv::ExecutionMode::OutputTrianglesEXT: return true; default: return false; } })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Geometry execution model entry points must specify " - "exactly one of OutputPoints, OutputLineStrip or " - "OutputTriangleStrip execution modes."; + << "MeshEXT execution model entry points must specify exactly " + "one of OutputPoints, OutputLinesEXT, or " + "OutputTrianglesEXT Execution Modes."; + } else if (2 != std::count_if( + execution_modes->begin(), execution_modes->end(), + [](const spv::ExecutionMode& mode) { + switch (mode) { + case spv::ExecutionMode::OutputPrimitivesEXT: + case spv::ExecutionMode::OutputVertices: + return true; + default: + return false; + } + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "MeshEXT execution model entry points must specify both " + "OutputPrimitivesEXT and OutputVertices Execution Modes."; } break; default: @@ -211,23 +284,25 @@ spv_result_t ValidateEntryPoint(ValidationState_t& _, const Instruction* inst) { if (spvIsVulkanEnv(_.context()->target_env)) { switch (execution_model) { - case SpvExecutionModelGLCompute: + case spv::ExecutionModel::GLCompute: if (!execution_modes || - !execution_modes->count(SpvExecutionModeLocalSize)) { + !execution_modes->count(spv::ExecutionMode::LocalSize)) { bool ok = false; for (auto& i : _.ordered_instructions()) { - if (i.opcode() == SpvOpDecorate) { + if (i.opcode() == spv::Op::OpDecorate) { if (i.operands().size() > 2) { - if (i.GetOperandAs(1) == SpvDecorationBuiltIn && - i.GetOperandAs(2) == SpvBuiltInWorkgroupSize) { + if (i.GetOperandAs(1) == + spv::Decoration::BuiltIn && + i.GetOperandAs(2) == + spv::BuiltIn::WorkgroupSize) { ok = true; break; } } } - if (i.opcode() == SpvOpExecutionModeId) { - const auto mode = i.GetOperandAs(1); - if (mode == SpvExecutionModeLocalSizeId) { + if (i.opcode() == spv::Op::OpExecutionModeId) { + const auto mode = i.GetOperandAs(1); + if (mode == spv::ExecutionMode::LocalSizeId) { ok = true; break; } @@ -258,37 +333,100 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, _.entry_points().cend(), entry_point_id); if (found == _.entry_points().cend()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpExecutionMode Entry Point '" - << _.getIdName(entry_point_id) - << "' is not the Entry Point " + << "OpExecutionMode Entry Point " << _.getIdName(entry_point_id) + << " is not the Entry Point " "operand of an OpEntryPoint."; } - const auto mode = inst->GetOperandAs(1); - if (inst->opcode() == SpvOpExecutionModeId) { + const auto mode = inst->GetOperandAs(1); + if (inst->opcode() == spv::Op::OpExecutionModeId) { + bool valid_mode = false; + switch (mode) { + case spv::ExecutionMode::SubgroupsPerWorkgroupId: + case spv::ExecutionMode::LocalSizeHintId: + case spv::ExecutionMode::LocalSizeId: + case spv::ExecutionMode::FPFastMathDefault: + case spv::ExecutionMode::MaximumRegistersIdINTEL: + valid_mode = true; + break; + default: + valid_mode = false; + break; + } + if (!valid_mode) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpExecutionModeId is only valid when the Mode operand is an " + "execution mode that takes Extra Operands that are id " + "operands."; + } + size_t operand_count = inst->operands().size(); for (size_t i = 2; i < operand_count; ++i) { - const auto operand_id = inst->GetOperandAs(2); + const auto operand_id = inst->GetOperandAs(i); const auto* operand_inst = _.FindDef(operand_id); - if (mode == SpvExecutionModeSubgroupsPerWorkgroupId || - mode == SpvExecutionModeLocalSizeHintId || - mode == SpvExecutionModeLocalSizeId) { - if (!spvOpcodeIsConstant(operand_inst->opcode())) { - return _.diag(SPV_ERROR_INVALID_ID, inst) - << "For OpExecutionModeId all Extra Operand ids must be " - "constant " - "instructions."; - } - } else { - return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpExecutionModeId is only valid when the Mode operand is an " - "execution mode that takes Extra Operands that are id " - "operands."; + switch (mode) { + case spv::ExecutionMode::SubgroupsPerWorkgroupId: + case spv::ExecutionMode::LocalSizeHintId: + case spv::ExecutionMode::LocalSizeId: + if (!spvOpcodeIsConstant(operand_inst->opcode())) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "For OpExecutionModeId all Extra Operand ids must be " + "constant instructions."; + } + break; + case spv::ExecutionMode::FPFastMathDefault: + if (i == 2) { + if (!_.IsFloatScalarType(operand_id)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "The Target Type operand must be a floating-point " + "scalar type"; + } + } else { + bool is_int32 = false; + bool is_const = false; + uint32_t value = 0; + std::tie(is_int32, is_const, value) = + _.EvalInt32IfConst(operand_id); + if (is_int32 && is_const) { + // Valid values include up to 0x00040000 (AllowTransform). + uint32_t invalid_mask = 0xfff80000; + if ((invalid_mask & value) != 0) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "The Fast Math Default operand is an invalid bitmask " + "value"; + } + if (value & + static_cast(spv::FPFastMathModeMask::Fast)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "The Fast Math Default operand must not include Fast"; + } + const auto reassoc_contract = + spv::FPFastMathModeMask::AllowContract | + spv::FPFastMathModeMask::AllowReassoc; + if ((value & static_cast( + spv::FPFastMathModeMask::AllowTransform)) != 0 && + ((value & static_cast(reassoc_contract)) != + static_cast(reassoc_contract))) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "The Fast Math Default operand must include " + "AllowContract and AllowReassoc when AllowTransform " + "is specified"; + } + } else { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "The Fast Math Default operand must be a " + "non-specialization constant"; + } + } + break; + default: + break; } } - } else if (mode == SpvExecutionModeSubgroupsPerWorkgroupId || - mode == SpvExecutionModeLocalSizeHintId || - mode == SpvExecutionModeLocalSizeId) { + } else if (mode == spv::ExecutionMode::SubgroupsPerWorkgroupId || + mode == spv::ExecutionMode::LocalSizeHintId || + mode == spv::ExecutionMode::LocalSizeId || + mode == spv::ExecutionMode::FPFastMathDefault) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "OpExecutionMode is only valid when the Mode operand is an " "execution mode that takes no Extra Operands, or takes Extra " @@ -297,38 +435,42 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, const auto* models = _.GetExecutionModels(entry_point_id); switch (mode) { - case SpvExecutionModeInvocations: - case SpvExecutionModeInputPoints: - case SpvExecutionModeInputLines: - case SpvExecutionModeInputLinesAdjacency: - case SpvExecutionModeInputTrianglesAdjacency: - case SpvExecutionModeOutputLineStrip: - case SpvExecutionModeOutputTriangleStrip: + case spv::ExecutionMode::Invocations: + case spv::ExecutionMode::InputPoints: + case spv::ExecutionMode::InputLines: + case spv::ExecutionMode::InputLinesAdjacency: + case spv::ExecutionMode::InputTrianglesAdjacency: + case spv::ExecutionMode::OutputLineStrip: + case spv::ExecutionMode::OutputTriangleStrip: if (!std::all_of(models->begin(), models->end(), - [](const SpvExecutionModel& model) { - return model == SpvExecutionModelGeometry; + [](const spv::ExecutionModel& model) { + return model == spv::ExecutionModel::Geometry; })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with the Geometry execution " "model."; } break; - case SpvExecutionModeOutputPoints: - if (!std::all_of(models->begin(), models->end(), - [&_](const SpvExecutionModel& model) { - switch (model) { - case SpvExecutionModelGeometry: - return true; - case SpvExecutionModelMeshNV: - return _.HasCapability(SpvCapabilityMeshShadingNV); - default: - return false; - } - })) { - if (_.HasCapability(SpvCapabilityMeshShadingNV)) { + case spv::ExecutionMode::OutputPoints: + if (!std::all_of( + models->begin(), models->end(), + [&_](const spv::ExecutionModel& model) { + switch (model) { + case spv::ExecutionModel::Geometry: + return true; + case spv::ExecutionModel::MeshNV: + return _.HasCapability(spv::Capability::MeshShadingNV); + case spv::ExecutionModel::MeshEXT: + return _.HasCapability(spv::Capability::MeshShadingEXT); + default: + return false; + } + })) { + if (_.HasCapability(spv::Capability::MeshShadingNV) || + _.HasCapability(spv::Capability::MeshShadingEXT)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << "Execution mode can only be used with the Geometry or " - "MeshNV execution model."; + << "Execution mode can only be used with the Geometry " + "MeshNV or MeshEXT execution model."; } else { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with the Geometry " @@ -337,32 +479,32 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, } } break; - case SpvExecutionModeSpacingEqual: - case SpvExecutionModeSpacingFractionalEven: - case SpvExecutionModeSpacingFractionalOdd: - case SpvExecutionModeVertexOrderCw: - case SpvExecutionModeVertexOrderCcw: - case SpvExecutionModePointMode: - case SpvExecutionModeQuads: - case SpvExecutionModeIsolines: + case spv::ExecutionMode::SpacingEqual: + case spv::ExecutionMode::SpacingFractionalEven: + case spv::ExecutionMode::SpacingFractionalOdd: + case spv::ExecutionMode::VertexOrderCw: + case spv::ExecutionMode::VertexOrderCcw: + case spv::ExecutionMode::PointMode: + case spv::ExecutionMode::Quads: + case spv::ExecutionMode::Isolines: if (!std::all_of( models->begin(), models->end(), - [](const SpvExecutionModel& model) { - return (model == SpvExecutionModelTessellationControl) || - (model == SpvExecutionModelTessellationEvaluation); + [](const spv::ExecutionModel& model) { + return (model == spv::ExecutionModel::TessellationControl) || + (model == spv::ExecutionModel::TessellationEvaluation); })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with a tessellation " "execution model."; } break; - case SpvExecutionModeTriangles: + case spv::ExecutionMode::Triangles: if (!std::all_of(models->begin(), models->end(), - [](const SpvExecutionModel& model) { + [](const spv::ExecutionModel& model) { switch (model) { - case SpvExecutionModelGeometry: - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: return true; default: return false; @@ -373,24 +515,28 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, "tessellation execution model."; } break; - case SpvExecutionModeOutputVertices: - if (!std::all_of(models->begin(), models->end(), - [&_](const SpvExecutionModel& model) { - switch (model) { - case SpvExecutionModelGeometry: - case SpvExecutionModelTessellationControl: - case SpvExecutionModelTessellationEvaluation: - return true; - case SpvExecutionModelMeshNV: - return _.HasCapability(SpvCapabilityMeshShadingNV); - default: - return false; - } - })) { - if (_.HasCapability(SpvCapabilityMeshShadingNV)) { + case spv::ExecutionMode::OutputVertices: + if (!std::all_of( + models->begin(), models->end(), + [&_](const spv::ExecutionModel& model) { + switch (model) { + case spv::ExecutionModel::Geometry: + case spv::ExecutionModel::TessellationControl: + case spv::ExecutionModel::TessellationEvaluation: + return true; + case spv::ExecutionModel::MeshNV: + return _.HasCapability(spv::Capability::MeshShadingNV); + case spv::ExecutionModel::MeshEXT: + return _.HasCapability(spv::Capability::MeshShadingEXT); + default: + return false; + } + })) { + if (_.HasCapability(spv::Capability::MeshShadingNV) || + _.HasCapability(spv::Capability::MeshShadingEXT)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with a Geometry, " - "tessellation or MeshNV execution model."; + "tessellation, MeshNV or MeshEXT execution model."; } else { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with a Geometry or " @@ -398,65 +544,106 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, } } break; - case SpvExecutionModePixelCenterInteger: - case SpvExecutionModeOriginUpperLeft: - case SpvExecutionModeOriginLowerLeft: - case SpvExecutionModeEarlyFragmentTests: - case SpvExecutionModeDepthReplacing: - case SpvExecutionModeDepthGreater: - case SpvExecutionModeDepthLess: - case SpvExecutionModeDepthUnchanged: - case SpvExecutionModePixelInterlockOrderedEXT: - case SpvExecutionModePixelInterlockUnorderedEXT: - case SpvExecutionModeSampleInterlockOrderedEXT: - case SpvExecutionModeSampleInterlockUnorderedEXT: - case SpvExecutionModeShadingRateInterlockOrderedEXT: - case SpvExecutionModeShadingRateInterlockUnorderedEXT: + case spv::ExecutionMode::OutputLinesEXT: + case spv::ExecutionMode::OutputTrianglesEXT: + case spv::ExecutionMode::OutputPrimitivesEXT: + if (!std::all_of(models->begin(), models->end(), + [](const spv::ExecutionModel& model) { + return (model == spv::ExecutionModel::MeshEXT || + model == spv::ExecutionModel::MeshNV); + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Execution mode can only be used with the MeshEXT or MeshNV " + "execution " + "model."; + } + break; + case spv::ExecutionMode::QuadDerivativesKHR: + if (!std::all_of(models->begin(), models->end(), + [](const spv::ExecutionModel& model) { + return (model == spv::ExecutionModel::Fragment || + model == spv::ExecutionModel::GLCompute); + })) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Execution mode can only be used with the Fragment or " + "GLCompute execution model."; + } + break; + case spv::ExecutionMode::PixelCenterInteger: + case spv::ExecutionMode::OriginUpperLeft: + case spv::ExecutionMode::OriginLowerLeft: + case spv::ExecutionMode::EarlyFragmentTests: + case spv::ExecutionMode::DepthReplacing: + case spv::ExecutionMode::DepthGreater: + case spv::ExecutionMode::DepthLess: + case spv::ExecutionMode::DepthUnchanged: + case spv::ExecutionMode::NonCoherentColorAttachmentReadEXT: + case spv::ExecutionMode::NonCoherentDepthAttachmentReadEXT: + case spv::ExecutionMode::NonCoherentStencilAttachmentReadEXT: + case spv::ExecutionMode::PixelInterlockOrderedEXT: + case spv::ExecutionMode::PixelInterlockUnorderedEXT: + case spv::ExecutionMode::SampleInterlockOrderedEXT: + case spv::ExecutionMode::SampleInterlockUnorderedEXT: + case spv::ExecutionMode::ShadingRateInterlockOrderedEXT: + case spv::ExecutionMode::ShadingRateInterlockUnorderedEXT: + case spv::ExecutionMode::EarlyAndLateFragmentTestsAMD: + case spv::ExecutionMode::StencilRefUnchangedFrontAMD: + case spv::ExecutionMode::StencilRefGreaterFrontAMD: + case spv::ExecutionMode::StencilRefLessFrontAMD: + case spv::ExecutionMode::StencilRefUnchangedBackAMD: + case spv::ExecutionMode::StencilRefGreaterBackAMD: + case spv::ExecutionMode::StencilRefLessBackAMD: + case spv::ExecutionMode::RequireFullQuadsKHR: if (!std::all_of(models->begin(), models->end(), - [](const SpvExecutionModel& model) { - return model == SpvExecutionModelFragment; + [](const spv::ExecutionModel& model) { + return model == spv::ExecutionModel::Fragment; })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with the Fragment execution " "model."; } break; - case SpvExecutionModeLocalSizeHint: - case SpvExecutionModeVecTypeHint: - case SpvExecutionModeContractionOff: - case SpvExecutionModeLocalSizeHintId: + case spv::ExecutionMode::LocalSizeHint: + case spv::ExecutionMode::VecTypeHint: + case spv::ExecutionMode::ContractionOff: + case spv::ExecutionMode::LocalSizeHintId: if (!std::all_of(models->begin(), models->end(), - [](const SpvExecutionModel& model) { - return model == SpvExecutionModelKernel; + [](const spv::ExecutionModel& model) { + return model == spv::ExecutionModel::Kernel; })) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with the Kernel execution " "model."; } break; - case SpvExecutionModeLocalSize: - case SpvExecutionModeLocalSizeId: - if (mode == SpvExecutionModeLocalSizeId && !_.IsLocalSizeIdAllowed()) + case spv::ExecutionMode::LocalSize: + case spv::ExecutionMode::LocalSizeId: + if (mode == spv::ExecutionMode::LocalSizeId && !_.IsLocalSizeIdAllowed()) return _.diag(SPV_ERROR_INVALID_DATA, inst) << "LocalSizeId mode is not allowed by the current environment."; - if (!std::all_of(models->begin(), models->end(), - [&_](const SpvExecutionModel& model) { - switch (model) { - case SpvExecutionModelKernel: - case SpvExecutionModelGLCompute: - return true; - case SpvExecutionModelTaskNV: - case SpvExecutionModelMeshNV: - return _.HasCapability(SpvCapabilityMeshShadingNV); - default: - return false; - } - })) { - if (_.HasCapability(SpvCapabilityMeshShadingNV)) { + if (!std::all_of( + models->begin(), models->end(), + [&_](const spv::ExecutionModel& model) { + switch (model) { + case spv::ExecutionModel::Kernel: + case spv::ExecutionModel::GLCompute: + return true; + case spv::ExecutionModel::TaskNV: + case spv::ExecutionModel::MeshNV: + return _.HasCapability(spv::Capability::MeshShadingNV); + case spv::ExecutionModel::TaskEXT: + case spv::ExecutionModel::MeshEXT: + return _.HasCapability(spv::Capability::MeshShadingEXT); + default: + return false; + } + })) { + if (_.HasCapability(spv::Capability::MeshShadingNV) || + _.HasCapability(spv::Capability::MeshShadingEXT)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with a Kernel, GLCompute, " - "MeshNV, or TaskNV execution model."; + "MeshNV, MeshEXT, TaskNV or TaskEXT execution model."; } else { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Execution mode can only be used with a Kernel or " @@ -468,14 +655,28 @@ spv_result_t ValidateExecutionMode(ValidationState_t& _, break; } + if (mode == spv::ExecutionMode::FPFastMathDefault) { + const auto* modes = _.GetExecutionModes(entry_point_id); + if (modes && modes->count(spv::ExecutionMode::ContractionOff)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "FPFastMathDefault and ContractionOff execution modes cannot " + "be applied to the same entry point"; + } + if (modes && modes->count(spv::ExecutionMode::SignedZeroInfNanPreserve)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "FPFastMathDefault and SignedZeroInfNanPreserve execution " + "modes cannot be applied to the same entry point"; + } + } + if (spvIsVulkanEnv(_.context()->target_env)) { - if (mode == SpvExecutionModeOriginLowerLeft) { + if (mode == spv::ExecutionMode::OriginLowerLeft) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4653) << "In the Vulkan environment, the OriginLowerLeft execution mode " "must not be used."; } - if (mode == SpvExecutionModePixelCenterInteger) { + if (mode == spv::ExecutionMode::PixelCenterInteger) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4654) << "In the Vulkan environment, the PixelCenterInteger execution " @@ -490,29 +691,30 @@ spv_result_t ValidateMemoryModel(ValidationState_t& _, const Instruction* inst) { // Already produced an error if multiple memory model instructions are // present. - if (_.memory_model() != SpvMemoryModelVulkanKHR && - _.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + if (_.memory_model() != spv::MemoryModel::VulkanKHR && + _.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "VulkanMemoryModelKHR capability must only be specified if " "the VulkanKHR memory model is used."; } if (spvIsOpenCLEnv(_.context()->target_env)) { - if ((_.addressing_model() != SpvAddressingModelPhysical32) && - (_.addressing_model() != SpvAddressingModelPhysical64)) { + if ((_.addressing_model() != spv::AddressingModel::Physical32) && + (_.addressing_model() != spv::AddressingModel::Physical64)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Addressing model must be Physical32 or Physical64 " << "in the OpenCL environment."; } - if (_.memory_model() != SpvMemoryModelOpenCL) { + if (_.memory_model() != spv::MemoryModel::OpenCL) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Memory model must be OpenCL in the OpenCL environment."; } } if (spvIsVulkanEnv(_.context()->target_env)) { - if ((_.addressing_model() != SpvAddressingModelLogical) && - (_.addressing_model() != SpvAddressingModelPhysicalStorageBuffer64)) { + if ((_.addressing_model() != spv::AddressingModel::Logical) && + (_.addressing_model() != + spv::AddressingModel::PhysicalStorageBuffer64)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4635) << "Addressing model must be Logical or PhysicalStorageBuffer64 " @@ -522,18 +724,101 @@ spv_result_t ValidateMemoryModel(ValidationState_t& _, return SPV_SUCCESS; } +bool PerEntryExecutionMode(spv::ExecutionMode mode) { + switch (mode) { + // These execution modes can be specified multiple times per entry point. + case spv::ExecutionMode::DenormPreserve: + case spv::ExecutionMode::DenormFlushToZero: + case spv::ExecutionMode::SignedZeroInfNanPreserve: + case spv::ExecutionMode::RoundingModeRTE: + case spv::ExecutionMode::RoundingModeRTZ: + case spv::ExecutionMode::FPFastMathDefault: + case spv::ExecutionMode::RoundingModeRTPINTEL: + case spv::ExecutionMode::RoundingModeRTNINTEL: + case spv::ExecutionMode::FloatingPointModeALTINTEL: + case spv::ExecutionMode::FloatingPointModeIEEEINTEL: + return false; + default: + return true; + } +} + } // namespace +spv_result_t ValidateFloatControls2(ValidationState_t& _) { + std::unordered_set fp_fast_math_default_entry_points; + for (auto entry_point : _.entry_points()) { + const auto* exec_modes = _.GetExecutionModes(entry_point); + if (exec_modes && + exec_modes->count(spv::ExecutionMode::FPFastMathDefault)) { + fp_fast_math_default_entry_points.insert(entry_point); + } + } + + std::vector> worklist; + for (const auto& inst : _.ordered_instructions()) { + if (inst.opcode() != spv::Op::OpDecorate) { + continue; + } + + const auto decoration = inst.GetOperandAs(1); + const auto target_id = inst.GetOperandAs(0); + const auto target = _.FindDef(target_id); + if (decoration == spv::Decoration::NoContraction) { + worklist.push_back(std::make_pair(target, decoration)); + } else if (decoration == spv::Decoration::FPFastMathMode) { + auto mask = inst.GetOperandAs(2); + if ((mask & spv::FPFastMathModeMask::Fast) != + spv::FPFastMathModeMask::MaskNone) { + worklist.push_back(std::make_pair(target, decoration)); + } + } + } + + std::unordered_set visited; + while (!worklist.empty()) { + const auto inst = worklist.back().first; + const auto decoration = worklist.back().second; + worklist.pop_back(); + + if (!visited.insert(inst).second) { + continue; + } + + const auto function = inst->function(); + if (function) { + const auto& entry_points = _.FunctionEntryPoints(function->id()); + for (auto entry_point : entry_points) { + if (fp_fast_math_default_entry_points.count(entry_point)) { + const std::string dec = decoration == spv::Decoration::NoContraction + ? "NoContraction" + : "FPFastMathMode Fast"; + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << dec + << " cannot be used by an entry point with the " + "FPFastMathDefault execution mode"; + } + } + } else { + for (const auto& pair : inst->uses()) { + worklist.push_back(std::make_pair(pair.first, decoration)); + } + } + } + + return SPV_SUCCESS; +} + spv_result_t ModeSettingPass(ValidationState_t& _, const Instruction* inst) { switch (inst->opcode()) { - case SpvOpEntryPoint: + case spv::Op::OpEntryPoint: if (auto error = ValidateEntryPoint(_, inst)) return error; break; - case SpvOpExecutionMode: - case SpvOpExecutionModeId: + case spv::Op::OpExecutionMode: + case spv::Op::OpExecutionModeId: if (auto error = ValidateExecutionMode(_, inst)) return error; break; - case SpvOpMemoryModel: + case spv::Op::OpMemoryModel: if (auto error = ValidateMemoryModel(_, inst)) return error; break; default: @@ -542,5 +827,52 @@ spv_result_t ModeSettingPass(ValidationState_t& _, const Instruction* inst) { return SPV_SUCCESS; } +spv_result_t ValidateDuplicateExecutionModes(ValidationState_t& _) { + using PerEntryKey = std::tuple; + using PerOperandKey = std::tuple; + std::set seen_per_entry; + std::set seen_per_operand; + + const auto lookupMode = [&_](spv::ExecutionMode mode) -> std::string { + spv_operand_desc desc = nullptr; + if (_.grammar().lookupOperand(SPV_OPERAND_TYPE_EXECUTION_MODE, + static_cast(mode), + &desc) == SPV_SUCCESS) { + return std::string(desc->name); + } + return "Unknown"; + }; + + for (const auto& inst : _.ordered_instructions()) { + if (inst.opcode() != spv::Op::OpExecutionMode && + inst.opcode() != spv::Op::OpExecutionModeId) { + continue; + } + + const auto entry = inst.GetOperandAs(0); + const auto mode = inst.GetOperandAs(1); + if (PerEntryExecutionMode(mode)) { + if (!seen_per_entry.insert(std::make_tuple(mode, entry)).second) { + return _.diag(SPV_ERROR_INVALID_ID, &inst) + << lookupMode(mode) + << " execution mode must not be specified multiple times per " + "entry point"; + } + } else { + // Execution modes allowed multiple times all take a single operand. + const auto operand = inst.GetOperandAs(2); + if (!seen_per_operand.insert(std::make_tuple(mode, entry, operand)) + .second) { + return _.diag(SPV_ERROR_INVALID_ID, &inst) + << lookupMode(mode) + << " execution mode must not be specified multiple times for " + "the same entry point and operands"; + } + } + } + + return SPV_SUCCESS; +} + } // namespace val } // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_non_uniform.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_non_uniform.cpp index 2b6eb8b5b..75967d2ff 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_non_uniform.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_non_uniform.cpp @@ -14,14 +14,11 @@ // Validates correctness of barrier SPIR-V instructions. -#include "source/val/validate.h" - -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" -#include "source/util/bitutils.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validate_scopes.h" #include "source/val/validation_state.h" @@ -29,6 +26,207 @@ namespace spvtools { namespace val { namespace { +spv_result_t ValidateGroupNonUniformElect(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsBoolScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar type"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformAnyAll(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsBoolScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar type"; + } + + if (!_.IsBoolScalarType(_.GetOperandTypeId(inst, 3))) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Predicate must be a boolean scalar type"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformAllEqual(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsBoolScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar type"; + } + + const auto value_type = _.GetOperandTypeId(inst, 3); + if (!_.IsFloatScalarOrVectorType(value_type) && + !_.IsIntScalarOrVectorType(value_type) && + !_.IsBoolScalarOrVectorType(value_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a scalar or vector of integer, floating-point, or " + "boolean type"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformBroadcastShuffle(ValidationState_t& _, + const Instruction* inst) { + const auto type_id = inst->type_id(); + if (!_.IsFloatScalarOrVectorType(type_id) && + !_.IsIntScalarOrVectorType(type_id) && + !_.IsBoolScalarOrVectorType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a scalar or vector of integer, floating-point, " + "or boolean type"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 3); + if (value_type_id != type_id) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The type of Value must match the Result type"; + } + + const auto GetOperandName = [](const spv::Op opcode) { + std::string operand; + switch (opcode) { + case spv::Op::OpGroupNonUniformBroadcast: + case spv::Op::OpGroupNonUniformShuffle: + operand = "Id"; + break; + case spv::Op::OpGroupNonUniformShuffleXor: + operand = "Mask"; + break; + case spv::Op::OpGroupNonUniformQuadBroadcast: + operand = "Index"; + break; + case spv::Op::OpGroupNonUniformQuadSwap: + operand = "Direction"; + break; + case spv::Op::OpGroupNonUniformShuffleUp: + case spv::Op::OpGroupNonUniformShuffleDown: + default: + operand = "Delta"; + break; + } + return operand; + }; + + const auto id_type_id = _.GetOperandTypeId(inst, 4); + if (!_.IsUnsignedIntScalarType(id_type_id)) { + std::string operand = GetOperandName(inst->opcode()); + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << operand << " must be an unsigned integer scalar"; + } + + const bool should_be_constant = + inst->opcode() == spv::Op::OpGroupNonUniformQuadSwap || + ((inst->opcode() == spv::Op::OpGroupNonUniformBroadcast || + inst->opcode() == spv::Op::OpGroupNonUniformQuadBroadcast) && + _.version() < SPV_SPIRV_VERSION_WORD(1, 5)); + if (should_be_constant) { + const auto id_id = inst->GetOperandAs(4); + const auto id_op = _.GetIdOpcode(id_id); + if (!spvOpcodeIsConstant(id_op)) { + std::string operand = GetOperandName(inst->opcode()); + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Before SPIR-V 1.5, " << operand + << " must be a constant instruction"; + } + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformBroadcastFirst(ValidationState_t& _, + const Instruction* inst) { + const auto type_id = inst->type_id(); + if (!_.IsFloatScalarOrVectorType(type_id) && + !_.IsIntScalarOrVectorType(type_id) && + !_.IsBoolScalarOrVectorType(type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a scalar or vector of integer, floating-point, " + "or boolean type"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 3); + if (value_type_id != type_id) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The type of Value must match the Result type"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformBallot(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsUnsignedIntVectorType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a 4-component unsigned integer vector"; + } + + if (_.GetDimension(inst->type_id()) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a 4-component unsigned integer vector"; + } + + const auto pred_type_id = _.GetOperandTypeId(inst, 3); + if (!_.IsBoolScalarType(pred_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Predicate must be a boolean scalar"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformInverseBallot(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsBoolScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 3); + if (!_.IsUnsignedIntVectorType(value_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + if (_.GetDimension(value_type_id) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformBallotBitExtract(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsBoolScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 3); + if (!_.IsUnsignedIntVectorType(value_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + if (_.GetDimension(value_type_id) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + const auto id_type_id = _.GetOperandTypeId(inst, 4); + if (!_.IsUnsignedIntScalarType(id_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Id must be an unsigned integer scalar"; + } + + return SPV_SUCCESS; +} + spv_result_t ValidateGroupNonUniformBallotBitCount(ValidationState_t& _, const Instruction* inst) { // Scope is already checked by ValidateExecutionScope() above. @@ -48,11 +246,11 @@ spv_result_t ValidateGroupNonUniformBallotBitCount(ValidationState_t& _, "of integer type scalar"; } - const auto group = inst->GetOperandAs(3); + const auto group = inst->GetOperandAs(3); if (spvIsVulkanEnv(_.context()->target_env)) { - if ((group != SpvGroupOperationReduce) && - (group != SpvGroupOperationInclusiveScan) && - (group != SpvGroupOperationExclusiveScan)) { + if ((group != spv::GroupOperation::Reduce) && + (group != spv::GroupOperation::InclusiveScan) && + (group != spv::GroupOperation::ExclusiveScan)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4685) << "In Vulkan: The OpGroupNonUniformBallotBitCount group " @@ -63,22 +261,231 @@ spv_result_t ValidateGroupNonUniformBallotBitCount(ValidationState_t& _, return SPV_SUCCESS; } +spv_result_t ValidateGroupNonUniformBallotFind(ValidationState_t& _, + const Instruction* inst) { + if (!_.IsUnsignedIntScalarType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be an unsigned integer scalar"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 3); + if (!_.IsUnsignedIntVectorType(value_type_id)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + if (_.GetDimension(value_type_id) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Value must be a 4-component unsigned integer vector"; + } + + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformArithmetic(ValidationState_t& _, + const Instruction* inst) { + const bool is_unsigned = inst->opcode() == spv::Op::OpGroupNonUniformUMin || + inst->opcode() == spv::Op::OpGroupNonUniformUMax; + const bool is_float = inst->opcode() == spv::Op::OpGroupNonUniformFAdd || + inst->opcode() == spv::Op::OpGroupNonUniformFMul || + inst->opcode() == spv::Op::OpGroupNonUniformFMin || + inst->opcode() == spv::Op::OpGroupNonUniformFMax; + const bool is_bool = inst->opcode() == spv::Op::OpGroupNonUniformLogicalAnd || + inst->opcode() == spv::Op::OpGroupNonUniformLogicalOr || + inst->opcode() == spv::Op::OpGroupNonUniformLogicalXor; + if (is_float) { + if (!_.IsFloatScalarOrVectorType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a floating-point scalar or vector"; + } + } else if (is_bool) { + if (!_.IsBoolScalarOrVectorType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be a boolean scalar or vector"; + } + } else if (is_unsigned) { + if (!_.IsUnsignedIntScalarOrVectorType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be an unsigned integer scalar or vector"; + } + } else if (!_.IsIntScalarOrVectorType(inst->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result must be an integer scalar or vector"; + } + + const auto value_type_id = _.GetOperandTypeId(inst, 4); + if (value_type_id != inst->type_id()) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "The type of Value must match the Result type"; + } + + const auto group_op = inst->GetOperandAs(3); + bool is_clustered_reduce = group_op == spv::GroupOperation::ClusteredReduce; + bool is_partitioned_nv = + group_op == spv::GroupOperation::PartitionedReduceNV || + group_op == spv::GroupOperation::PartitionedInclusiveScanNV || + group_op == spv::GroupOperation::PartitionedExclusiveScanNV; + if (inst->operands().size() <= 5) { + if (is_clustered_reduce) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ClusterSize must be present when Operation is ClusteredReduce"; + } else if (is_partitioned_nv) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ballot must be present when Operation is PartitionedReduceNV, " + "PartitionedInclusiveScanNV, or PartitionedExclusiveScanNV"; + } + } else { + const auto operand_id = inst->GetOperandAs(5); + const auto* operand = _.FindDef(operand_id); + if (is_partitioned_nv) { + if (!operand || !_.IsIntScalarOrVectorType(operand->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ballot must be a 4-component integer vector"; + } + + if (_.GetDimension(operand->type_id()) != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ballot must be a 4-component integer vector"; + } + } else { + if (!operand || !_.IsUnsignedIntScalarType(operand->type_id())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ClusterSize must be an unsigned integer scalar"; + } + + if (!spvOpcodeIsConstant(operand->opcode())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ClusterSize must be a constant instruction"; + } + } + } + return SPV_SUCCESS; +} + +spv_result_t ValidateGroupNonUniformRotateKHR(ValidationState_t& _, + const Instruction* inst) { + // Scope is already checked by ValidateExecutionScope() above. + const uint32_t result_type = inst->type_id(); + if (!_.IsIntScalarOrVectorType(result_type) && + !_.IsFloatScalarOrVectorType(result_type) && + !_.IsBoolScalarOrVectorType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Result Type to be a scalar or vector of " + "floating-point, integer or boolean type."; + } + + const uint32_t value_type = _.GetTypeId(inst->GetOperandAs(3)); + if (value_type != result_type) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Result Type must be the same as the type of Value."; + } + + const uint32_t delta_type = _.GetTypeId(inst->GetOperandAs(4)); + if (!_.IsUnsignedIntScalarType(delta_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Delta must be a scalar of integer type, whose Signedness " + "operand is 0."; + } + + if (inst->words().size() > 6) { + const uint32_t cluster_size_op_id = inst->GetOperandAs(5); + const Instruction* cluster_size_inst = _.FindDef(cluster_size_op_id); + const uint32_t cluster_size_type = + cluster_size_inst ? cluster_size_inst->type_id() : 0; + if (!_.IsUnsignedIntScalarType(cluster_size_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ClusterSize must be a scalar of integer type, whose " + "Signedness operand is 0."; + } + + if (!spvOpcodeIsConstant(cluster_size_inst->opcode())) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "ClusterSize must come from a constant instruction."; + } + + uint64_t cluster_size; + const bool valid_const = + _.EvalConstantValUint64(cluster_size_op_id, &cluster_size); + if (valid_const && + ((cluster_size == 0) || ((cluster_size & (cluster_size - 1)) != 0))) { + return _.diag(SPV_WARNING, inst) + << "Behavior is undefined unless ClusterSize is at least 1 and a " + "power of 2."; + } + + // TODO(kpet) Warn about undefined behavior when ClusterSize is greater than + // the declared SubGroupSize + } + + return SPV_SUCCESS; +} + } // namespace // Validates correctness of non-uniform group instructions. spv_result_t NonUniformPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); if (spvOpcodeIsNonUniformGroupOperation(opcode)) { - const uint32_t execution_scope = inst->word(3); - if (auto error = ValidateExecutionScope(_, inst, execution_scope)) { - return error; + // OpGroupNonUniformQuadAllKHR and OpGroupNonUniformQuadAnyKHR don't have + // scope paramter + if ((opcode != spv::Op::OpGroupNonUniformQuadAllKHR) && + (opcode != spv::Op::OpGroupNonUniformQuadAnyKHR)) { + const uint32_t execution_scope = inst->GetOperandAs(2); + if (auto error = ValidateExecutionScope(_, inst, execution_scope)) { + return error; + } } } switch (opcode) { - case SpvOpGroupNonUniformBallotBitCount: + case spv::Op::OpGroupNonUniformElect: + return ValidateGroupNonUniformElect(_, inst); + case spv::Op::OpGroupNonUniformAny: + case spv::Op::OpGroupNonUniformAll: + return ValidateGroupNonUniformAnyAll(_, inst); + case spv::Op::OpGroupNonUniformAllEqual: + return ValidateGroupNonUniformAllEqual(_, inst); + case spv::Op::OpGroupNonUniformBroadcast: + case spv::Op::OpGroupNonUniformShuffle: + case spv::Op::OpGroupNonUniformShuffleXor: + case spv::Op::OpGroupNonUniformShuffleUp: + case spv::Op::OpGroupNonUniformShuffleDown: + case spv::Op::OpGroupNonUniformQuadBroadcast: + case spv::Op::OpGroupNonUniformQuadSwap: + return ValidateGroupNonUniformBroadcastShuffle(_, inst); + case spv::Op::OpGroupNonUniformBroadcastFirst: + return ValidateGroupNonUniformBroadcastFirst(_, inst); + case spv::Op::OpGroupNonUniformBallot: + return ValidateGroupNonUniformBallot(_, inst); + case spv::Op::OpGroupNonUniformInverseBallot: + return ValidateGroupNonUniformInverseBallot(_, inst); + case spv::Op::OpGroupNonUniformBallotBitExtract: + return ValidateGroupNonUniformBallotBitExtract(_, inst); + case spv::Op::OpGroupNonUniformBallotBitCount: return ValidateGroupNonUniformBallotBitCount(_, inst); + case spv::Op::OpGroupNonUniformBallotFindLSB: + case spv::Op::OpGroupNonUniformBallotFindMSB: + return ValidateGroupNonUniformBallotFind(_, inst); + case spv::Op::OpGroupNonUniformIAdd: + case spv::Op::OpGroupNonUniformFAdd: + case spv::Op::OpGroupNonUniformIMul: + case spv::Op::OpGroupNonUniformFMul: + case spv::Op::OpGroupNonUniformSMin: + case spv::Op::OpGroupNonUniformUMin: + case spv::Op::OpGroupNonUniformFMin: + case spv::Op::OpGroupNonUniformSMax: + case spv::Op::OpGroupNonUniformUMax: + case spv::Op::OpGroupNonUniformFMax: + case spv::Op::OpGroupNonUniformBitwiseAnd: + case spv::Op::OpGroupNonUniformBitwiseOr: + case spv::Op::OpGroupNonUniformBitwiseXor: + case spv::Op::OpGroupNonUniformLogicalAnd: + case spv::Op::OpGroupNonUniformLogicalOr: + case spv::Op::OpGroupNonUniformLogicalXor: + return ValidateGroupNonUniformArithmetic(_, inst); + case spv::Op::OpGroupNonUniformRotateKHR: + return ValidateGroupNonUniformRotateKHR(_, inst); default: break; } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_primitives.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_primitives.cpp index 7d11f2e7a..6769090db 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_primitives.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_primitives.cpp @@ -14,13 +14,11 @@ // Validates correctness of primitive SPIR-V instructions. -#include "source/val/validate.h" - #include -#include "source/diagnostic.h" #include "source/opcode.h" #include "source/val/instruction.h" +#include "source/val/validate.h" #include "source/val/validation_state.h" namespace spvtools { @@ -28,16 +26,16 @@ namespace val { // Validates correctness of primitive instructions. spv_result_t PrimitivesPass(ValidationState_t& _, const Instruction* inst) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); switch (opcode) { - case SpvOpEmitVertex: - case SpvOpEndPrimitive: - case SpvOpEmitStreamVertex: - case SpvOpEndStreamPrimitive: + case spv::Op::OpEmitVertex: + case spv::Op::OpEndPrimitive: + case spv::Op::OpEmitStreamVertex: + case spv::Op::OpEndStreamPrimitive: _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - SpvExecutionModelGeometry, + spv::ExecutionModel::Geometry, std::string(spvOpcodeString(opcode)) + " instructions require Geometry execution model"); break; @@ -46,8 +44,8 @@ spv_result_t PrimitivesPass(ValidationState_t& _, const Instruction* inst) { } switch (opcode) { - case SpvOpEmitStreamVertex: - case SpvOpEndStreamPrimitive: { + case spv::Op::OpEmitStreamVertex: + case spv::Op::OpEndStreamPrimitive: { const uint32_t stream_id = inst->word(1); const uint32_t stream_type = _.GetTypeId(stream_id); if (!_.IsIntScalarType(stream_type)) { @@ -56,7 +54,7 @@ spv_result_t PrimitivesPass(ValidationState_t& _, const Instruction* inst) { << ": expected Stream to be int scalar"; } - const SpvOp stream_opcode = _.GetIdOpcode(stream_id); + const spv::Op stream_opcode = _.GetIdOpcode(stream_id); if (!spvOpcodeIsConstant(stream_opcode)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_query.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_query.cpp new file mode 100644 index 000000000..9b67fc922 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_query.cpp @@ -0,0 +1,274 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates ray query instructions from SPV_KHR_ray_query + +#include "source/opcode.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" + +namespace spvtools { +namespace val { +namespace { + +spv_result_t ValidateRayQueryPointer(ValidationState_t& _, + const Instruction* inst, + uint32_t ray_query_index) { + const uint32_t ray_query_id = inst->GetOperandAs(ray_query_index); + auto variable = _.FindDef(ray_query_id); + const auto var_opcode = variable->opcode(); + if (!variable || (var_opcode != spv::Op::OpVariable && + var_opcode != spv::Op::OpFunctionParameter && + var_opcode != spv::Op::OpAccessChain)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Query must be a memory object declaration"; + } + auto pointer = _.FindDef(variable->GetOperandAs(0)); + if (!pointer || pointer->opcode() != spv::Op::OpTypePointer) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Query must be a pointer"; + } + auto type = _.FindDef(pointer->GetOperandAs(2)); + if (!type || type->opcode() != spv::Op::OpTypeRayQueryKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Query must be a pointer to OpTypeRayQueryKHR"; + } + return SPV_SUCCESS; +} + +spv_result_t ValidateIntersectionId(ValidationState_t& _, + const Instruction* inst, + uint32_t intersection_index) { + const uint32_t intersection_id = + inst->GetOperandAs(intersection_index); + const uint32_t intersection_type = _.GetTypeId(intersection_id); + const spv::Op intersection_opcode = _.GetIdOpcode(intersection_id); + if (!_.IsIntScalarType(intersection_type) || + _.GetBitWidth(intersection_type) != 32 || + !spvOpcodeIsConstant(intersection_opcode)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Intersection ID to be a constant 32-bit int scalar"; + } + + return SPV_SUCCESS; +} + +} // namespace + +spv_result_t RayQueryPass(ValidationState_t& _, const Instruction* inst) { + const spv::Op opcode = inst->opcode(); + const uint32_t result_type = inst->type_id(); + + switch (opcode) { + case spv::Op::OpRayQueryInitializeKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 0)) return error; + + if (_.GetIdOpcode(_.GetOperandTypeId(inst, 1)) != + spv::Op::OpTypeAccelerationStructureKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Acceleration Structure to be of type " + "OpTypeAccelerationStructureKHR"; + } + + const uint32_t ray_flags = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarType(ray_flags) || _.GetBitWidth(ray_flags) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Flags must be a 32-bit int scalar"; + } + + const uint32_t cull_mask = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarType(cull_mask) || _.GetBitWidth(cull_mask) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cull Mask must be a 32-bit int scalar"; + } + + const uint32_t ray_origin = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatVectorType(ray_origin) || _.GetDimension(ray_origin) != 3 || + _.GetBitWidth(ray_origin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Origin must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmin = _.GetOperandTypeId(inst, 5); + if (!_.IsFloatScalarType(ray_tmin) || _.GetBitWidth(ray_tmin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMin must be a 32-bit float scalar"; + } + + const uint32_t ray_direction = _.GetOperandTypeId(inst, 6); + if (!_.IsFloatVectorType(ray_direction) || + _.GetDimension(ray_direction) != 3 || + _.GetBitWidth(ray_direction) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Direction must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmax = _.GetOperandTypeId(inst, 7); + if (!_.IsFloatScalarType(ray_tmax) || _.GetBitWidth(ray_tmax) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMax must be a 32-bit float scalar"; + } + break; + } + + case spv::Op::OpRayQueryTerminateKHR: + case spv::Op::OpRayQueryConfirmIntersectionKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 0)) return error; + break; + } + + case spv::Op::OpRayQueryGenerateIntersectionKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 0)) return error; + + const uint32_t hit_t_id = _.GetOperandTypeId(inst, 1); + if (!_.IsFloatScalarType(hit_t_id) || _.GetBitWidth(hit_t_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit T must be a 32-bit float scalar"; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionFrontFaceKHR: + case spv::Op::OpRayQueryProceedKHR: + case spv::Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + + if (!_.IsBoolScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be bool scalar type"; + } + + if (opcode == spv::Op::OpRayQueryGetIntersectionFrontFaceKHR) { + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionTKHR: + case spv::Op::OpRayQueryGetRayTMinKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + + if (!_.IsFloatScalarType(result_type) || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be 32-bit float scalar type"; + } + + if (opcode == spv::Op::OpRayQueryGetIntersectionTKHR) { + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionTypeKHR: + case spv::Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR: + case spv::Op::OpRayQueryGetIntersectionInstanceIdKHR: + case spv::Op:: + OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: + case spv::Op::OpRayQueryGetIntersectionGeometryIndexKHR: + case spv::Op::OpRayQueryGetIntersectionPrimitiveIndexKHR: + case spv::Op::OpRayQueryGetRayFlagsKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + + if (!_.IsIntScalarType(result_type) || _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be 32-bit int scalar type"; + } + + if (opcode != spv::Op::OpRayQueryGetRayFlagsKHR) { + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionObjectRayDirectionKHR: + case spv::Op::OpRayQueryGetIntersectionObjectRayOriginKHR: + case spv::Op::OpRayQueryGetWorldRayDirectionKHR: + case spv::Op::OpRayQueryGetWorldRayOriginKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + + if (!_.IsFloatVectorType(result_type) || + _.GetDimension(result_type) != 3 || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be 32-bit float 3-component " + "vector type"; + } + + if (opcode == spv::Op::OpRayQueryGetIntersectionObjectRayDirectionKHR || + opcode == spv::Op::OpRayQueryGetIntersectionObjectRayOriginKHR) { + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionBarycentricsKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + + if (!_.IsFloatVectorType(result_type) || + _.GetDimension(result_type) != 2 || + _.GetBitWidth(result_type) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be 32-bit float 2-component " + "vector type"; + } + + break; + } + + case spv::Op::OpRayQueryGetIntersectionObjectToWorldKHR: + case spv::Op::OpRayQueryGetIntersectionWorldToObjectKHR: { + if (auto error = ValidateRayQueryPointer(_, inst, 2)) return error; + if (auto error = ValidateIntersectionId(_, inst, 3)) return error; + + uint32_t num_rows = 0; + uint32_t num_cols = 0; + uint32_t col_type = 0; + uint32_t component_type = 0; + if (!_.GetMatrixTypeInfo(result_type, &num_rows, &num_cols, &col_type, + &component_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected matrix type as Result Type"; + } + + if (num_cols != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type matrix to have a Column Count of 4"; + } + + if (!_.IsFloatScalarType(component_type) || + _.GetBitWidth(result_type) != 32 || num_rows != 3) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type matrix to have a Column Type of " + "3-component 32-bit float vectors"; + } + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} + +} // namespace val +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing.cpp new file mode 100644 index 000000000..f74e9d4b9 --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing.cpp @@ -0,0 +1,209 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates ray tracing instructions from SPV_KHR_ray_tracing + +#include "source/opcode.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" + +namespace spvtools { +namespace val { + +spv_result_t RayTracingPass(ValidationState_t& _, const Instruction* inst) { + const spv::Op opcode = inst->opcode(); + const uint32_t result_type = inst->type_id(); + + switch (opcode) { + case spv::Op::OpTraceRayKHR: { + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + "OpTraceRayKHR requires RayGenerationKHR, " + "ClosestHitKHR and MissKHR execution models"; + } + return false; + } + return true; + }); + + if (_.GetIdOpcode(_.GetOperandTypeId(inst, 0)) != + spv::Op::OpTypeAccelerationStructureKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Acceleration Structure to be of type " + "OpTypeAccelerationStructureKHR"; + } + + const uint32_t ray_flags = _.GetOperandTypeId(inst, 1); + if (!_.IsIntScalarType(ray_flags) || _.GetBitWidth(ray_flags) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Flags must be a 32-bit int scalar"; + } + + const uint32_t cull_mask = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarType(cull_mask) || _.GetBitWidth(cull_mask) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cull Mask must be a 32-bit int scalar"; + } + + const uint32_t sbt_offset = _.GetOperandTypeId(inst, 3); + if (!_.IsIntScalarType(sbt_offset) || _.GetBitWidth(sbt_offset) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Offset must be a 32-bit int scalar"; + } + + const uint32_t sbt_stride = _.GetOperandTypeId(inst, 4); + if (!_.IsIntScalarType(sbt_stride) || _.GetBitWidth(sbt_stride) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Stride must be a 32-bit int scalar"; + } + + const uint32_t miss_index = _.GetOperandTypeId(inst, 5); + if (!_.IsIntScalarType(miss_index) || _.GetBitWidth(miss_index) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Miss Index must be a 32-bit int scalar"; + } + + const uint32_t ray_origin = _.GetOperandTypeId(inst, 6); + if (!_.IsFloatVectorType(ray_origin) || _.GetDimension(ray_origin) != 3 || + _.GetBitWidth(ray_origin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Origin must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmin = _.GetOperandTypeId(inst, 7); + if (!_.IsFloatScalarType(ray_tmin) || _.GetBitWidth(ray_tmin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMin must be a 32-bit float scalar"; + } + + const uint32_t ray_direction = _.GetOperandTypeId(inst, 8); + if (!_.IsFloatVectorType(ray_direction) || + _.GetDimension(ray_direction) != 3 || + _.GetBitWidth(ray_direction) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Direction must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmax = _.GetOperandTypeId(inst, 9); + if (!_.IsFloatScalarType(ray_tmax) || _.GetBitWidth(ray_tmax) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMax must be a 32-bit float scalar"; + } + + const Instruction* payload = _.FindDef(inst->GetOperandAs(10)); + if (payload->opcode() != spv::Op::OpVariable) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Payload must be the result of a OpVariable"; + } else if (payload->GetOperandAs(2) != + spv::StorageClass::RayPayloadKHR && + payload->GetOperandAs(2) != + spv::StorageClass::IncomingRayPayloadKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Payload must have storage class RayPayloadKHR or " + "IncomingRayPayloadKHR"; + } + break; + } + + case spv::Op::OpReportIntersectionKHR: { + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::IntersectionKHR) { + if (message) { + *message = + "OpReportIntersectionKHR requires IntersectionKHR " + "execution model"; + } + return false; + } + return true; + }); + + if (!_.IsBoolScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be bool scalar type"; + } + + const uint32_t hit = _.GetOperandTypeId(inst, 2); + if (!_.IsFloatScalarType(hit) || _.GetBitWidth(hit) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit must be a 32-bit int scalar"; + } + + const uint32_t hit_kind = _.GetOperandTypeId(inst, 3); + if (!_.IsUnsignedIntScalarType(hit_kind) || + _.GetBitWidth(hit_kind) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Kind must be a 32-bit unsigned int scalar"; + } + break; + } + + case spv::Op::OpExecuteCallableKHR: { + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation([](spv::ExecutionModel model, + std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR && + model != spv::ExecutionModel::CallableKHR) { + if (message) { + *message = + "OpExecuteCallableKHR requires RayGenerationKHR, " + "ClosestHitKHR, MissKHR and CallableKHR execution models"; + } + return false; + } + return true; + }); + + const uint32_t sbt_index = _.GetOperandTypeId(inst, 0); + if (!_.IsUnsignedIntScalarType(sbt_index) || + _.GetBitWidth(sbt_index) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Index must be a 32-bit unsigned int scalar"; + } + + const auto callable_data = _.FindDef(inst->GetOperandAs(1)); + if (callable_data->opcode() != spv::Op::OpVariable) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Callable Data must be the result of a OpVariable"; + } else if (callable_data->GetOperandAs(2) != + spv::StorageClass::CallableDataKHR && + callable_data->GetOperandAs(2) != + spv::StorageClass::IncomingCallableDataKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Callable Data must have storage class CallableDataKHR or " + "IncomingCallableDataKHR"; + } + + break; + } + + default: + break; + } + + return SPV_SUCCESS; +} +} // namespace val +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing_reorder.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing_reorder.cpp new file mode 100644 index 000000000..cb190f91e --- /dev/null +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_ray_tracing_reorder.cpp @@ -0,0 +1,625 @@ +// Copyright (c) 2022 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Validates ray tracing instructions from SPV_NV_shader_execution_reorder + +#include "source/opcode.h" +#include "source/val/instruction.h" +#include "source/val/validate.h" +#include "source/val/validation_state.h" + +#include + +namespace spvtools { +namespace val { + +static const uint32_t KRayParamInvalidId = std::numeric_limits::max(); + +spv_result_t ValidateHitObjectPointer(ValidationState_t& _, + const Instruction* inst, + uint32_t hit_object_index) { + const uint32_t hit_object_id = inst->GetOperandAs(hit_object_index); + auto variable = _.FindDef(hit_object_id); + const auto var_opcode = variable->opcode(); + if (!variable || (var_opcode != spv::Op::OpVariable && + var_opcode != spv::Op::OpFunctionParameter && + var_opcode != spv::Op::OpAccessChain)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Object must be a memory object declaration"; + } + auto pointer = _.FindDef(variable->GetOperandAs(0)); + if (!pointer || pointer->opcode() != spv::Op::OpTypePointer) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Object must be a pointer"; + } + auto type = _.FindDef(pointer->GetOperandAs(2)); + if (!type || type->opcode() != spv::Op::OpTypeHitObjectNV) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Type must be OpTypeHitObjectNV"; + } + return SPV_SUCCESS; +} + +spv_result_t ValidateHitObjectInstructionCommonParameters( + ValidationState_t& _, const Instruction* inst, + uint32_t acceleration_struct_index, uint32_t instance_id_index, + uint32_t primtive_id_index, uint32_t geometry_index, + uint32_t ray_flags_index, uint32_t cull_mask_index, uint32_t hit_kind_index, + uint32_t sbt_index, uint32_t sbt_offset_index, uint32_t sbt_stride_index, + uint32_t sbt_record_offset_index, uint32_t sbt_record_stride_index, + uint32_t miss_index, uint32_t ray_origin_index, uint32_t ray_tmin_index, + uint32_t ray_direction_index, uint32_t ray_tmax_index, + uint32_t payload_index, uint32_t hit_object_attr_index) { + auto isValidId = [](uint32_t spvid) { return spvid < KRayParamInvalidId; }; + if (isValidId(acceleration_struct_index) && + _.GetIdOpcode(_.GetOperandTypeId(inst, acceleration_struct_index)) != + spv::Op::OpTypeAccelerationStructureKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Acceleration Structure to be of type " + "OpTypeAccelerationStructureKHR"; + } + + if (isValidId(instance_id_index)) { + const uint32_t instance_id = _.GetOperandTypeId(inst, instance_id_index); + if (!_.IsIntScalarType(instance_id) || _.GetBitWidth(instance_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Instance Id must be a 32-bit int scalar"; + } + } + + if (isValidId(primtive_id_index)) { + const uint32_t primitive_id = _.GetOperandTypeId(inst, primtive_id_index); + if (!_.IsIntScalarType(primitive_id) || _.GetBitWidth(primitive_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Primitive Id must be a 32-bit int scalar"; + } + } + + if (isValidId(geometry_index)) { + const uint32_t geometry_index_id = _.GetOperandTypeId(inst, geometry_index); + if (!_.IsIntScalarType(geometry_index_id) || + _.GetBitWidth(geometry_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Geometry Index must be a 32-bit int scalar"; + } + } + + if (isValidId(miss_index)) { + const uint32_t miss_index_id = _.GetOperandTypeId(inst, miss_index); + if (!_.IsUnsignedIntScalarType(miss_index_id) || + _.GetBitWidth(miss_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Miss Index must be a 32-bit int scalar"; + } + } + + if (isValidId(cull_mask_index)) { + const uint32_t cull_mask_id = _.GetOperandTypeId(inst, cull_mask_index); + if (!_.IsUnsignedIntScalarType(cull_mask_id) || + _.GetBitWidth(cull_mask_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Cull mask must be a 32-bit int scalar"; + } + } + + if (isValidId(sbt_index)) { + const uint32_t sbt_index_id = _.GetOperandTypeId(inst, sbt_index); + if (!_.IsUnsignedIntScalarType(sbt_index_id) || + _.GetBitWidth(sbt_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Index must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(sbt_offset_index)) { + const uint32_t sbt_offset_id = _.GetOperandTypeId(inst, sbt_offset_index); + if (!_.IsUnsignedIntScalarType(sbt_offset_id) || + _.GetBitWidth(sbt_offset_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Offset must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(sbt_stride_index)) { + const uint32_t sbt_stride_index_id = + _.GetOperandTypeId(inst, sbt_stride_index); + if (!_.IsUnsignedIntScalarType(sbt_stride_index_id) || + _.GetBitWidth(sbt_stride_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT Stride must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(sbt_record_offset_index)) { + const uint32_t sbt_record_offset_index_id = + _.GetOperandTypeId(inst, sbt_record_offset_index); + if (!_.IsUnsignedIntScalarType(sbt_record_offset_index_id) || + _.GetBitWidth(sbt_record_offset_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT record offset must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(sbt_record_stride_index)) { + const uint32_t sbt_record_stride_index_id = + _.GetOperandTypeId(inst, sbt_record_stride_index); + if (!_.IsUnsignedIntScalarType(sbt_record_stride_index_id) || + _.GetBitWidth(sbt_record_stride_index_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "SBT record stride must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(ray_origin_index)) { + const uint32_t ray_origin_id = _.GetOperandTypeId(inst, ray_origin_index); + if (!_.IsFloatVectorType(ray_origin_id) || + _.GetDimension(ray_origin_id) != 3 || + _.GetBitWidth(ray_origin_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Origin must be a 32-bit float 3-component vector"; + } + } + + if (isValidId(ray_tmin_index)) { + const uint32_t ray_tmin_id = _.GetOperandTypeId(inst, ray_tmin_index); + if (!_.IsFloatScalarType(ray_tmin_id) || _.GetBitWidth(ray_tmin_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMin must be a 32-bit float scalar"; + } + } + + if (isValidId(ray_direction_index)) { + const uint32_t ray_direction_id = + _.GetOperandTypeId(inst, ray_direction_index); + if (!_.IsFloatVectorType(ray_direction_id) || + _.GetDimension(ray_direction_id) != 3 || + _.GetBitWidth(ray_direction_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Direction must be a 32-bit float 3-component vector"; + } + } + + if (isValidId(ray_tmax_index)) { + const uint32_t ray_tmax_id = _.GetOperandTypeId(inst, ray_tmax_index); + if (!_.IsFloatScalarType(ray_tmax_id) || _.GetBitWidth(ray_tmax_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMax must be a 32-bit float scalar"; + } + } + + if (isValidId(ray_flags_index)) { + const uint32_t ray_flags_id = _.GetOperandTypeId(inst, ray_flags_index); + if (!_.IsIntScalarType(ray_flags_id) || _.GetBitWidth(ray_flags_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Flags must be a 32-bit int scalar"; + } + } + + if (isValidId(payload_index)) { + const uint32_t payload_id = inst->GetOperandAs(payload_index); + auto variable = _.FindDef(payload_id); + const auto var_opcode = variable->opcode(); + if (!variable || var_opcode != spv::Op::OpVariable || + (variable->GetOperandAs(2) != + spv::StorageClass::RayPayloadKHR && + variable->GetOperandAs(2) != + spv::StorageClass::IncomingRayPayloadKHR)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "payload must be a OpVariable of storage " + "class RayPayloadKHR or IncomingRayPayloadKHR"; + } + } + + if (isValidId(hit_kind_index)) { + const uint32_t hit_kind_id = _.GetOperandTypeId(inst, hit_kind_index); + if (!_.IsUnsignedIntScalarType(hit_kind_id) || + _.GetBitWidth(hit_kind_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Kind must be a 32-bit unsigned int scalar"; + } + } + + if (isValidId(hit_object_attr_index)) { + const uint32_t hit_object_attr_id = + inst->GetOperandAs(hit_object_attr_index); + auto variable = _.FindDef(hit_object_attr_id); + const auto var_opcode = variable->opcode(); + if (!variable || var_opcode != spv::Op::OpVariable || + (variable->GetOperandAs(2)) != + spv::StorageClass::HitObjectAttributeNV) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Object Attributes id must be a OpVariable of storage " + "class HitObjectAttributeNV"; + } + } + + return SPV_SUCCESS; +} + +spv_result_t RayReorderNVPass(ValidationState_t& _, const Instruction* inst) { + const spv::Op opcode = inst->opcode(); + const uint32_t result_type = inst->type_id(); + + auto RegisterOpcodeForValidModel = [](ValidationState_t& vs, + const Instruction* rtinst) { + std::string opcode_name = spvOpcodeString(rtinst->opcode()); + vs.function(rtinst->function()->id()) + ->RegisterExecutionModelLimitation( + [opcode_name](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = opcode_name + + " requires RayGenerationKHR, ClosestHitKHR and " + "MissKHR execution models"; + } + return false; + } + return true; + }); + return; + }; + + switch (opcode) { + case spv::Op::OpHitObjectIsMissNV: + case spv::Op::OpHitObjectIsHitNV: + case spv::Op::OpHitObjectIsEmptyNV: { + RegisterOpcodeForValidModel(_, inst); + if (!_.IsBoolScalarType(result_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type to be bool scalar type"; + } + + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + break; + } + + case spv::Op::OpHitObjectGetShaderRecordBufferHandleNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + + if (!_.IsIntVectorType(result_type) || + (_.GetDimension(result_type) != 2) || + (_.GetBitWidth(result_type) != 32)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected 32-bit integer type 2-component vector as Result " + "Type: " + << spvOpcodeString(opcode); + break; + } + + case spv::Op::OpHitObjectGetHitKindNV: + case spv::Op::OpHitObjectGetPrimitiveIndexNV: + case spv::Op::OpHitObjectGetGeometryIndexNV: + case spv::Op::OpHitObjectGetInstanceIdNV: + case spv::Op::OpHitObjectGetInstanceCustomIndexNV: + case spv::Op::OpHitObjectGetShaderBindingTableRecordIndexNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + + if (!_.IsIntScalarType(result_type) || !_.GetBitWidth(result_type)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected 32-bit integer type scalar as Result Type: " + << spvOpcodeString(opcode); + break; + } + + case spv::Op::OpHitObjectGetCurrentTimeNV: + case spv::Op::OpHitObjectGetRayTMaxNV: + case spv::Op::OpHitObjectGetRayTMinNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + + if (!_.IsFloatScalarType(result_type) || _.GetBitWidth(result_type) != 32) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected 32-bit floating-point type scalar as Result Type: " + << spvOpcodeString(opcode); + break; + } + + case spv::Op::OpHitObjectGetObjectToWorldNV: + case spv::Op::OpHitObjectGetWorldToObjectNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + + uint32_t num_rows = 0; + uint32_t num_cols = 0; + uint32_t col_type = 0; + uint32_t component_type = 0; + + if (!_.GetMatrixTypeInfo(result_type, &num_rows, &num_cols, &col_type, + &component_type)) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected matrix type as Result Type: " + << spvOpcodeString(opcode); + } + + if (num_cols != 4) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type matrix to have a Column Count of 4" + << spvOpcodeString(opcode); + } + + if (!_.IsFloatScalarType(component_type) || + _.GetBitWidth(result_type) != 32 || num_rows != 3) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "expected Result Type matrix to have a Column Type of " + "3-component 32-bit float vectors: " + << spvOpcodeString(opcode); + } + break; + } + + case spv::Op::OpHitObjectGetObjectRayOriginNV: + case spv::Op::OpHitObjectGetObjectRayDirectionNV: + case spv::Op::OpHitObjectGetWorldRayDirectionNV: + case spv::Op::OpHitObjectGetWorldRayOriginNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 2)) return error; + + if (!_.IsFloatVectorType(result_type) || + (_.GetDimension(result_type) != 3) || + (_.GetBitWidth(result_type) != 32)) + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected 32-bit floating-point type 3-component vector as " + "Result Type: " + << spvOpcodeString(opcode); + break; + } + + case spv::Op::OpHitObjectGetAttributesNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + const uint32_t hit_object_attr_id = inst->GetOperandAs(1); + auto variable = _.FindDef(hit_object_attr_id); + const auto var_opcode = variable->opcode(); + if (!variable || var_opcode != spv::Op::OpVariable || + variable->GetOperandAs(2) != + spv::StorageClass::HitObjectAttributeNV) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Object Attributes id must be a OpVariable of storage " + "class HitObjectAttributeNV"; + } + break; + } + + case spv::Op::OpHitObjectExecuteShaderNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + const uint32_t hit_object_attr_id = inst->GetOperandAs(1); + auto variable = _.FindDef(hit_object_attr_id); + const auto var_opcode = variable->opcode(); + if (!variable || var_opcode != spv::Op::OpVariable || + (variable->GetOperandAs(2)) != + spv::StorageClass::RayPayloadKHR) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hit Object Attributes id must be a OpVariable of storage " + "class RayPayloadKHR"; + } + break; + } + + case spv::Op::OpHitObjectRecordEmptyNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + break; + } + + case spv::Op::OpHitObjectRecordMissNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + const uint32_t miss_index = _.GetOperandTypeId(inst, 1); + if (!_.IsUnsignedIntScalarType(miss_index) || + _.GetBitWidth(miss_index) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Miss Index must be a 32-bit int scalar"; + } + + const uint32_t ray_origin = _.GetOperandTypeId(inst, 2); + if (!_.IsFloatVectorType(ray_origin) || _.GetDimension(ray_origin) != 3 || + _.GetBitWidth(ray_origin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Origin must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmin = _.GetOperandTypeId(inst, 3); + if (!_.IsFloatScalarType(ray_tmin) || _.GetBitWidth(ray_tmin) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMin must be a 32-bit float scalar"; + } + + const uint32_t ray_direction = _.GetOperandTypeId(inst, 4); + if (!_.IsFloatVectorType(ray_direction) || + _.GetDimension(ray_direction) != 3 || + _.GetBitWidth(ray_direction) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray Direction must be a 32-bit float 3-component vector"; + } + + const uint32_t ray_tmax = _.GetOperandTypeId(inst, 5); + if (!_.IsFloatScalarType(ray_tmax) || _.GetBitWidth(ray_tmax) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Ray TMax must be a 32-bit float scalar"; + } + break; + } + + case spv::Op::OpHitObjectRecordHitWithIndexNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + if (auto error = ValidateHitObjectInstructionCommonParameters( + _, inst, 1 /* Acceleration Struct */, 2 /* Instance Id */, + 3 /* Primtive Id */, 4 /* Geometry Index */, + KRayParamInvalidId /* Ray Flags */, + KRayParamInvalidId /* Cull Mask */, 5 /* Hit Kind*/, + 6 /* SBT index */, KRayParamInvalidId /* SBT Offset */, + KRayParamInvalidId /* SBT Stride */, + KRayParamInvalidId /* SBT Record Offset */, + KRayParamInvalidId /* SBT Record Stride */, + KRayParamInvalidId /* Miss Index */, 7 /* Ray Origin */, + 8 /* Ray TMin */, 9 /* Ray Direction */, 10 /* Ray TMax */, + KRayParamInvalidId /* Payload */, 11 /* Hit Object Attribute */)) + return error; + + break; + } + + case spv::Op::OpHitObjectRecordHitNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + if (auto error = ValidateHitObjectInstructionCommonParameters( + _, inst, 1 /* Acceleration Struct */, 2 /* Instance Id */, + 3 /* Primtive Id */, 4 /* Geometry Index */, + KRayParamInvalidId /* Ray Flags */, + KRayParamInvalidId /* Cull Mask */, 5 /* Hit Kind*/, + KRayParamInvalidId /* SBT index */, + KRayParamInvalidId /* SBT Offset */, + KRayParamInvalidId /* SBT Stride */, 6 /* SBT Record Offset */, + 7 /* SBT Record Stride */, KRayParamInvalidId /* Miss Index */, + 8 /* Ray Origin */, 9 /* Ray TMin */, 10 /* Ray Direction */, + 11 /* Ray TMax */, KRayParamInvalidId /* Payload */, + 12 /* Hit Object Attribute */)) + return error; + + break; + } + + case spv::Op::OpHitObjectTraceRayMotionNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + if (auto error = ValidateHitObjectInstructionCommonParameters( + _, inst, 1 /* Acceleration Struct */, + KRayParamInvalidId /* Instance Id */, + KRayParamInvalidId /* Primtive Id */, + KRayParamInvalidId /* Geometry Index */, 2 /* Ray Flags */, + 3 /* Cull Mask */, KRayParamInvalidId /* Hit Kind*/, + KRayParamInvalidId /* SBT index */, 4 /* SBT Offset */, + 5 /* SBT Stride */, KRayParamInvalidId /* SBT Record Offset */, + KRayParamInvalidId /* SBT Record Stride */, 6 /* Miss Index */, + 7 /* Ray Origin */, 8 /* Ray TMin */, 9 /* Ray Direction */, + 10 /* Ray TMax */, 12 /* Payload */, + KRayParamInvalidId /* Hit Object Attribute */)) + return error; + // Current Time + const uint32_t current_time_id = _.GetOperandTypeId(inst, 11); + if (!_.IsFloatScalarType(current_time_id) || + _.GetBitWidth(current_time_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Current Times must be a 32-bit float scalar type"; + } + + break; + } + + case spv::Op::OpHitObjectTraceRayNV: { + RegisterOpcodeForValidModel(_, inst); + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + if (auto error = ValidateHitObjectInstructionCommonParameters( + _, inst, 1 /* Acceleration Struct */, + KRayParamInvalidId /* Instance Id */, + KRayParamInvalidId /* Primtive Id */, + KRayParamInvalidId /* Geometry Index */, 2 /* Ray Flags */, + 3 /* Cull Mask */, KRayParamInvalidId /* Hit Kind*/, + KRayParamInvalidId /* SBT index */, 4 /* SBT Offset */, + 5 /* SBT Stride */, KRayParamInvalidId /* SBT Record Offset */, + KRayParamInvalidId /* SBT Record Stride */, 6 /* Miss Index */, + 7 /* Ray Origin */, 8 /* Ray TMin */, 9 /* Ray Direction */, + 10 /* Ray TMax */, 11 /* Payload */, + KRayParamInvalidId /* Hit Object Attribute */)) + return error; + break; + } + + case spv::Op::OpReorderThreadWithHitObjectNV: { + std::string opcode_name = spvOpcodeString(inst->opcode()); + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [opcode_name](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR) { + if (message) { + *message = opcode_name + + " requires RayGenerationKHR execution model"; + } + return false; + } + return true; + }); + + if (auto error = ValidateHitObjectPointer(_, inst, 0)) return error; + + if (inst->operands().size() > 1) { + if (inst->operands().size() != 3) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hint and Bits are optional together i.e " + << " Either both Hint and Bits should be provided or neither."; + } + + // Validate the optional opreands Hint and Bits + const uint32_t hint_id = _.GetOperandTypeId(inst, 1); + if (!_.IsIntScalarType(hint_id) || _.GetBitWidth(hint_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hint must be a 32-bit int scalar"; + } + const uint32_t bits_id = _.GetOperandTypeId(inst, 2); + if (!_.IsIntScalarType(bits_id) || _.GetBitWidth(bits_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "bits must be a 32-bit int scalar"; + } + } + break; + } + + case spv::Op::OpReorderThreadWithHintNV: { + std::string opcode_name = spvOpcodeString(inst->opcode()); + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [opcode_name](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR) { + if (message) { + *message = opcode_name + + " requires RayGenerationKHR execution model"; + } + return false; + } + return true; + }); + + const uint32_t hint_id = _.GetOperandTypeId(inst, 0); + if (!_.IsIntScalarType(hint_id) || _.GetBitWidth(hint_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "Hint must be a 32-bit int scalar"; + } + + const uint32_t bits_id = _.GetOperandTypeId(inst, 1); + if (!_.IsIntScalarType(bits_id) || _.GetBitWidth(bits_id) != 32) { + return _.diag(SPV_ERROR_INVALID_DATA, inst) + << "bits must be a 32-bit int scalar"; + } + } + + default: + break; + } + return SPV_SUCCESS; +} +} // namespace val +} // namespace spvtools diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_scopes.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_scopes.cpp index 29ba58317..6b493538a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_scopes.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_scopes.cpp @@ -14,7 +14,6 @@ #include "source/val/validate_scopes.h" -#include "source/diagnostic.h" #include "source/spirv_target_env.h" #include "source/val/instruction.h" #include "source/val/validation_state.h" @@ -25,16 +24,16 @@ namespace val { bool IsValidScope(uint32_t scope) { // Deliberately avoid a default case so we have to update the list when the // scopes list changes. - switch (static_cast(scope)) { - case SpvScopeCrossDevice: - case SpvScopeDevice: - case SpvScopeWorkgroup: - case SpvScopeSubgroup: - case SpvScopeInvocation: - case SpvScopeQueueFamilyKHR: - case SpvScopeShaderCallKHR: + switch (static_cast(scope)) { + case spv::Scope::CrossDevice: + case spv::Scope::Device: + case spv::Scope::Workgroup: + case spv::Scope::Subgroup: + case spv::Scope::Invocation: + case spv::Scope::QueueFamilyKHR: + case spv::Scope::ShaderCallKHR: return true; - case SpvScopeMax: + case spv::Scope::Max: break; } return false; @@ -42,7 +41,7 @@ bool IsValidScope(uint32_t scope) { spv_result_t ValidateScope(ValidationState_t& _, const Instruction* inst, uint32_t scope) { - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); bool is_int32 = false, is_const_int32 = false; uint32_t value = 0; std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); @@ -53,14 +52,14 @@ spv_result_t ValidateScope(ValidationState_t& _, const Instruction* inst, } if (!is_const_int32) { - if (_.HasCapability(SpvCapabilityShader) && - !_.HasCapability(SpvCapabilityCooperativeMatrixNV)) { + if (_.HasCapability(spv::Capability::Shader) && + !_.HasCapability(spv::Capability::CooperativeMatrixNV)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Scope ids must be OpConstant when Shader capability is " << "present"; } - if (_.HasCapability(SpvCapabilityShader) && - _.HasCapability(SpvCapabilityCooperativeMatrixNV) && + if (_.HasCapability(spv::Capability::Shader) && + _.HasCapability(spv::Capability::CooperativeMatrixNV) && !spvOpcodeIsConstant(_.GetIdOpcode(scope))) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Scope ids must be constant or specialization constant when " @@ -78,10 +77,10 @@ spv_result_t ValidateScope(ValidationState_t& _, const Instruction* inst, spv_result_t ValidateExecutionScope(ValidationState_t& _, const Instruction* inst, uint32_t scope) { - SpvOp opcode = inst->opcode(); + spv::Op opcode = inst->opcode(); bool is_int32 = false, is_const_int32 = false; - uint32_t value = 0; - std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); + uint32_t tmp_value = 0; + std::tie(is_int32, is_const_int32, tmp_value) = _.EvalInt32IfConst(scope); if (auto error = ValidateScope(_, inst, scope)) { return error; @@ -91,13 +90,17 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, return SPV_SUCCESS; } + spv::Scope value = spv::Scope(tmp_value); + // Vulkan specific rules if (spvIsVulkanEnv(_.context()->target_env)) { // Vulkan 1.1 specific rules if (_.context()->target_env != SPV_ENV_VULKAN_1_0) { // Scope for Non Uniform Group Operations must be limited to Subgroup - if (spvOpcodeIsNonUniformGroupOperation(opcode) && - value != SpvScopeSubgroup) { + if ((spvOpcodeIsNonUniformGroupOperation(opcode) && + (opcode != spv::Op::OpGroupNonUniformQuadAllKHR) && + (opcode != spv::Op::OpGroupNonUniformQuadAnyKHR)) && + (value != spv::Scope::Subgroup)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4642) << spvOpcodeString(opcode) << ": in Vulkan environment Execution scope is limited to " @@ -107,21 +110,21 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, // OpControlBarrier must only use Subgroup execution scope for a subset of // execution models. - if (opcode == SpvOpControlBarrier && value != SpvScopeSubgroup) { + if (opcode == spv::Op::OpControlBarrier && value != spv::Scope::Subgroup) { std::string errorVUID = _.VkErrorID(4682); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation([errorVUID]( - SpvExecutionModel model, + spv::ExecutionModel model, std::string* message) { - if (model == SpvExecutionModelFragment || - model == SpvExecutionModelVertex || - model == SpvExecutionModelGeometry || - model == SpvExecutionModelTessellationEvaluation || - model == SpvExecutionModelRayGenerationKHR || - model == SpvExecutionModelIntersectionKHR || - model == SpvExecutionModelAnyHitKHR || - model == SpvExecutionModelClosestHitKHR || - model == SpvExecutionModelMissKHR) { + if (model == spv::ExecutionModel::Fragment || + model == spv::ExecutionModel::Vertex || + model == spv::ExecutionModel::Geometry || + model == spv::ExecutionModel::TessellationEvaluation || + model == spv::ExecutionModel::RayGenerationKHR || + model == spv::ExecutionModel::IntersectionKHR || + model == spv::ExecutionModel::AnyHitKHR || + model == spv::ExecutionModel::ClosestHitKHR || + model == spv::ExecutionModel::MissKHR) { if (message) { *message = errorVUID + @@ -137,21 +140,23 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, } // Only subset of execution models support Workgroup. - if (value == SpvScopeWorkgroup) { + if (value == spv::Scope::Workgroup) { std::string errorVUID = _.VkErrorID(4637); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - [errorVUID](SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelTaskNV && - model != SpvExecutionModelMeshNV && - model != SpvExecutionModelTessellationControl && - model != SpvExecutionModelGLCompute) { + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::TaskNV && + model != spv::ExecutionModel::MeshNV && + model != spv::ExecutionModel::TaskEXT && + model != spv::ExecutionModel::MeshEXT && + model != spv::ExecutionModel::TessellationControl && + model != spv::ExecutionModel::GLCompute) { if (message) { *message = errorVUID + "in Vulkan environment, Workgroup execution scope is " - "only for TaskNV, MeshNV, TessellationControl, and " - "GLCompute execution models"; + "only for TaskNV, MeshNV, TaskEXT, MeshEXT, " + "TessellationControl, and GLCompute execution models"; } return false; } @@ -161,7 +166,7 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, // Vulkan generic rules // Scope for execution must be limited to Workgroup or Subgroup - if (value != SpvScopeWorkgroup && value != SpvScopeSubgroup) { + if (value != spv::Scope::Workgroup && value != spv::Scope::Subgroup) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4636) << spvOpcodeString(opcode) << ": in Vulkan environment Execution Scope is limited to " @@ -175,7 +180,9 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, // Scope for execution must be limited to Workgroup or Subgroup for // non-uniform operations if (spvOpcodeIsNonUniformGroupOperation(opcode) && - value != SpvScopeSubgroup && value != SpvScopeWorkgroup) { + opcode != spv::Op::OpGroupNonUniformQuadAllKHR && + opcode != spv::Op::OpGroupNonUniformQuadAnyKHR && + value != spv::Scope::Subgroup && value != spv::Scope::Workgroup) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << spvOpcodeString(opcode) << ": Execution scope is limited to Subgroup or Workgroup"; @@ -186,10 +193,10 @@ spv_result_t ValidateExecutionScope(ValidationState_t& _, spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, uint32_t scope) { - const SpvOp opcode = inst->opcode(); + const spv::Op opcode = inst->opcode(); bool is_int32 = false, is_const_int32 = false; - uint32_t value = 0; - std::tie(is_int32, is_const_int32, value) = _.EvalInt32IfConst(scope); + uint32_t tmp_value = 0; + std::tie(is_int32, is_const_int32, tmp_value) = _.EvalInt32IfConst(scope); if (auto error = ValidateScope(_, inst, scope)) { return error; @@ -199,8 +206,10 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, return SPV_SUCCESS; } - if (value == SpvScopeQueueFamilyKHR) { - if (_.HasCapability(SpvCapabilityVulkanMemoryModelKHR)) { + spv::Scope value = spv::Scope(tmp_value); + + if (value == spv::Scope::QueueFamilyKHR) { + if (_.HasCapability(spv::Capability::VulkanMemoryModelKHR)) { return SPV_SUCCESS; } else { return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -210,9 +219,9 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, } } - if (value == SpvScopeDevice && - _.HasCapability(SpvCapabilityVulkanMemoryModelKHR) && - !_.HasCapability(SpvCapabilityVulkanMemoryModelDeviceScopeKHR)) { + if (value == spv::Scope::Device && + _.HasCapability(spv::Capability::VulkanMemoryModelKHR) && + !_.HasCapability(spv::Capability::VulkanMemoryModelDeviceScopeKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Use of device scope with VulkanKHR memory model requires the " << "VulkanMemoryModelDeviceScopeKHR capability"; @@ -220,43 +229,37 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, // Vulkan Specific rules if (spvIsVulkanEnv(_.context()->target_env)) { - if (value == SpvScopeCrossDevice) { - return _.diag(SPV_ERROR_INVALID_DATA, inst) - << _.VkErrorID(4638) << spvOpcodeString(opcode) - << ": in Vulkan environment, Memory Scope cannot be CrossDevice"; - } - // Vulkan 1.0 specifc rules - if (_.context()->target_env == SPV_ENV_VULKAN_1_0 && - value != SpvScopeDevice && value != SpvScopeWorkgroup && - value != SpvScopeInvocation) { + if (value != spv::Scope::Device && value != spv::Scope::Workgroup && + value != spv::Scope::Subgroup && value != spv::Scope::Invocation && + value != spv::Scope::ShaderCallKHR && + value != spv::Scope::QueueFamily) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << _.VkErrorID(4638) << spvOpcodeString(opcode) - << ": in Vulkan 1.0 environment Memory Scope is limited to " - << "Device, Workgroup and Invocation"; - } - // Vulkan 1.1 specifc rules - if ((_.context()->target_env == SPV_ENV_VULKAN_1_1 || - _.context()->target_env == SPV_ENV_VULKAN_1_2) && - value != SpvScopeDevice && value != SpvScopeWorkgroup && - value != SpvScopeSubgroup && value != SpvScopeInvocation && - value != SpvScopeShaderCallKHR) { + << ": in Vulkan environment Memory Scope is limited to Device, " + "QueueFamily, Workgroup, ShaderCallKHR, Subgroup, or " + "Invocation"; + } else if (_.context()->target_env == SPV_ENV_VULKAN_1_0 && + value == spv::Scope::Subgroup && + !_.HasCapability(spv::Capability::SubgroupBallotKHR) && + !_.HasCapability(spv::Capability::SubgroupVoteKHR)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) - << _.VkErrorID(4638) << spvOpcodeString(opcode) - << ": in Vulkan 1.1 and 1.2 environment Memory Scope is limited " - << "to Device, Workgroup, Invocation, and ShaderCall"; + << _.VkErrorID(7951) << spvOpcodeString(opcode) + << ": in Vulkan 1.0 environment Memory Scope is can not be " + "Subgroup without SubgroupBallotKHR or SubgroupVoteKHR " + "declared"; } - if (value == SpvScopeShaderCallKHR) { + if (value == spv::Scope::ShaderCallKHR) { std::string errorVUID = _.VkErrorID(4640); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - [errorVUID](SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelRayGenerationKHR && - model != SpvExecutionModelIntersectionKHR && - model != SpvExecutionModelAnyHitKHR && - model != SpvExecutionModelClosestHitKHR && - model != SpvExecutionModelMissKHR && - model != SpvExecutionModelCallableKHR) { + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::IntersectionKHR && + model != spv::ExecutionModel::AnyHitKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR && + model != spv::ExecutionModel::CallableKHR) { if (message) { *message = errorVUID + @@ -269,23 +272,45 @@ spv_result_t ValidateMemoryScope(ValidationState_t& _, const Instruction* inst, }); } - if (value == SpvScopeWorkgroup) { - std::string errorVUID = _.VkErrorID(4639); + if (value == spv::Scope::Workgroup) { + std::string errorVUID = _.VkErrorID(7321); _.function(inst->function()->id()) ->RegisterExecutionModelLimitation( - [errorVUID](SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelGLCompute && - model != SpvExecutionModelTaskNV && - model != SpvExecutionModelMeshNV) { + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::GLCompute && + model != spv::ExecutionModel::TessellationControl && + model != spv::ExecutionModel::TaskNV && + model != spv::ExecutionModel::MeshNV && + model != spv::ExecutionModel::TaskEXT && + model != spv::ExecutionModel::MeshEXT) { if (message) { *message = errorVUID + "Workgroup Memory Scope is limited to MeshNV, " - "TaskNV, and GLCompute execution model"; + "TaskNV, MeshEXT, TaskEXT, TessellationControl, " + "and GLCompute execution model"; } return false; } return true; }); + + if (_.memory_model() == spv::MemoryModel::GLSL450) { + errorVUID = _.VkErrorID(7320); + _.function(inst->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model == spv::ExecutionModel::TessellationControl) { + if (message) { + *message = + errorVUID + + "Workgroup Memory Scope can't be used with " + "TessellationControl using GLSL450 Memory Model"; + } + return false; + } + return true; + }); + } } } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_small_type_uses.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_small_type_uses.cpp index 9db82e7c7..69f61ee4f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_small_type_uses.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_small_type_uses.cpp @@ -22,7 +22,7 @@ namespace val { spv_result_t ValidateSmallTypeUses(ValidationState_t& _, const Instruction* inst) { - if (!_.HasCapability(SpvCapabilityShader) || inst->type_id() == 0 || + if (!_.HasCapability(spv::Capability::Shader) || inst->type_id() == 0 || !_.ContainsLimitedUseIntOrFloatType(inst->type_id())) { return SPV_SUCCESS; } @@ -36,13 +36,13 @@ spv_result_t ValidateSmallTypeUses(ValidationState_t& _, for (auto use : inst->uses()) { const auto* user = use.first; switch (user->opcode()) { - case SpvOpDecorate: - case SpvOpDecorateId: - case SpvOpCopyObject: - case SpvOpStore: - case SpvOpFConvert: - case SpvOpUConvert: - case SpvOpSConvert: + case spv::Op::OpDecorate: + case spv::Op::OpDecorateId: + case spv::Op::OpCopyObject: + case spv::Op::OpStore: + case spv::Op::OpFConvert: + case spv::Op::OpUConvert: + case spv::Op::OpSConvert: break; default: return _.diag(SPV_ERROR_INVALID_ID, user) diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_type.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_type.cpp index 4376b52c6..cb26a527c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_type.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validate_type.cpp @@ -19,27 +19,11 @@ #include "source/val/instruction.h" #include "source/val/validate.h" #include "source/val/validation_state.h" -#include "spirv/unified1/spirv.h" namespace spvtools { namespace val { namespace { -// Returns, as an int64_t, the literal value from an OpConstant or the -// default value of an OpSpecConstant, assuming it is an integral type. -// For signed integers, relies the rule that literal value is sign extended -// to fill out to word granularity. Assumes that the constant value -// has -int64_t ConstantLiteralAsInt64(uint32_t width, - const std::vector& const_words) { - const uint32_t lo_word = const_words[3]; - if (width <= 32) return int32_t(lo_word); - assert(width <= 64); - assert(const_words.size() > 4); - const uint32_t hi_word = const_words[4]; // Must exist, per spec. - return static_cast(uint64_t(lo_word) | uint64_t(hi_word) << 32); -} - // 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) @@ -50,8 +34,8 @@ spv_result_t ValidateUniqueness(ValidationState_t& _, const Instruction* inst) { return SPV_SUCCESS; const auto opcode = inst->opcode(); - if (opcode != SpvOpTypeArray && opcode != SpvOpTypeRuntimeArray && - opcode != SpvOpTypeStruct && opcode != SpvOpTypePointer && + if (opcode != spv::Op::OpTypeArray && opcode != spv::Op::OpTypeRuntimeArray && + opcode != spv::Op::OpTypeStruct && opcode != spv::Op::OpTypePointer && !_.RegisterUniqueTypeDeclaration(inst)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Duplicate non-aggregate type declarations are not allowed. " @@ -84,7 +68,7 @@ spv_result_t ValidateTypeInt(ValidationState_t& _, const Instruction* inst) { << "Using a 16-bit integer type requires the Int16 capability," " or an extension that explicitly enables 16-bit integers."; } else if (num_bits == 64) { - if (_.HasCapability(SpvCapabilityInt64)) { + if (_.HasCapability(spv::Capability::Int64)) { return SPV_SUCCESS; } return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -105,7 +89,8 @@ spv_result_t ValidateTypeInt(ValidationState_t& _, const Instruction* inst) { // SPIR-V Spec 2.16.3: Validation Rules for Kernel Capabilities: The // Signedness in OpTypeInt must always be 0. - if (SpvOpTypeInt == inst->opcode() && _.HasCapability(SpvCapabilityKernel) && + if (spv::Op::OpTypeInt == inst->opcode() && + _.HasCapability(spv::Capability::Kernel) && inst->GetOperandAs(2) != 0u) { return _.diag(SPV_ERROR_INVALID_BINARY, inst) << "The Signedness in OpTypeInt " @@ -135,7 +120,7 @@ spv_result_t ValidateTypeFloat(ValidationState_t& _, const Instruction* inst) { " or an extension that explicitly enables 16-bit floating point."; } if (num_bits == 64) { - if (_.HasCapability(SpvCapabilityFloat64)) { + if (_.HasCapability(spv::Capability::Float64)) { return SPV_SUCCESS; } return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -152,8 +137,8 @@ spv_result_t ValidateTypeVector(ValidationState_t& _, const Instruction* inst) { const auto component_type = _.FindDef(component_id); if (!component_type || !spvOpcodeIsScalarType(component_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeVector Component Type '" << _.getIdName(component_id) - << "' is not a scalar type."; + << "OpTypeVector Component Type " << _.getIdName(component_id) + << " is not a scalar type."; } // Validates that the number of components in the vector is valid. @@ -163,7 +148,7 @@ spv_result_t ValidateTypeVector(ValidationState_t& _, const Instruction* inst) { if (num_components == 2 || num_components == 3 || num_components == 4) { return SPV_SUCCESS; } else if (num_components == 8 || num_components == 16) { - if (_.HasCapability(SpvCapabilityVector16)) { + if (_.HasCapability(spv::Capability::Vector16)) { return SPV_SUCCESS; } return _.diag(SPV_ERROR_INVALID_DATA, inst) @@ -183,7 +168,7 @@ spv_result_t ValidateTypeMatrix(ValidationState_t& _, const Instruction* inst) { const auto column_type_index = 1; const auto column_type_id = inst->GetOperandAs(column_type_index); const auto column_type = _.FindDef(column_type_id); - if (!column_type || SpvOpTypeVector != column_type->opcode()) { + if (!column_type || spv::Op::OpTypeVector != column_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Columns in a matrix must be of type vector."; } @@ -192,7 +177,7 @@ spv_result_t ValidateTypeMatrix(ValidationState_t& _, const Instruction* inst) { // Operand 1 is the of the type of data in the vector. const auto comp_type_id = column_type->GetOperandAs(1); auto comp_type_instruction = _.FindDef(comp_type_id); - if (comp_type_instruction->opcode() != SpvOpTypeFloat) { + if (comp_type_instruction->opcode() != spv::Op::OpTypeFloat) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << "Matrix types can only be " "parameterized with " "floating-point types."; @@ -215,21 +200,21 @@ spv_result_t ValidateTypeArray(ValidationState_t& _, const Instruction* inst) { const auto element_type = _.FindDef(element_type_id); if (!element_type || !spvOpcodeGeneratesType(element_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Element Type '" << _.getIdName(element_type_id) - << "' is not a type."; + << "OpTypeArray Element Type " << _.getIdName(element_type_id) + << " is not a type."; } - if (element_type->opcode() == SpvOpTypeVoid) { + if (element_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Element Type '" << _.getIdName(element_type_id) - << "' is a void type."; + << "OpTypeArray Element Type " << _.getIdName(element_type_id) + << " is a void type."; } if (spvIsVulkanEnv(_.context()->target_env) && - element_type->opcode() == SpvOpTypeRuntimeArray) { + element_type->opcode() == spv::Op::OpTypeRuntimeArray) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Element Type '" << _.getIdName(element_type_id) - << "' is not valid in " + << _.VkErrorID(4680) << "OpTypeArray Element Type " + << _.getIdName(element_type_id) << " is not valid in " << spvLogStringForEnv(_.context()->target_env) << " environments."; } @@ -238,43 +223,31 @@ spv_result_t ValidateTypeArray(ValidationState_t& _, const Instruction* inst) { const auto length = _.FindDef(length_id); if (!length || !spvOpcodeIsConstant(length->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Length '" << _.getIdName(length_id) - << "' is not a scalar constant type."; + << "OpTypeArray Length " << _.getIdName(length_id) + << " is not a scalar constant type."; } // NOTE: Check the initialiser value of the constant const auto const_inst = length->words(); const auto const_result_type_index = 1; const auto const_result_type = _.FindDef(const_inst[const_result_type_index]); - if (!const_result_type || SpvOpTypeInt != const_result_type->opcode()) { + if (!const_result_type || spv::Op::OpTypeInt != const_result_type->opcode()) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Length '" << _.getIdName(length_id) - << "' is not a constant integer type."; - } - - switch (length->opcode()) { - case SpvOpSpecConstant: - case SpvOpConstant: { - auto& type_words = const_result_type->words(); - const bool is_signed = type_words[3] > 0; - const uint32_t width = type_words[2]; - const int64_t ivalue = ConstantLiteralAsInt64(width, length->words()); - if (ivalue == 0 || (ivalue < 0 && is_signed)) { - return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Length '" << _.getIdName(length_id) - << "' default value must be at least 1: found " << ivalue; - } - } break; - case SpvOpConstantNull: + << "OpTypeArray Length " << _.getIdName(length_id) + << " is not a constant integer type."; + } + + int64_t length_value; + if (_.EvalConstantValInt64(length_id, &length_value)) { + auto& type_words = const_result_type->words(); + const bool is_signed = type_words[3] > 0; + if (length_value == 0 || (length_value < 0 && is_signed)) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeArray Length '" << _.getIdName(length_id) - << "' default value must be at least 1."; - case SpvOpSpecConstantOp: - // Assume it's OK, rather than try to evaluate the operation. - break; - default: - assert(0 && "bug in spvOpcodeIsConstant() or result type isn't int"); + << "OpTypeArray Length " << _.getIdName(length_id) + << " default value must be at least 1: found " << length_value; + } } + return SPV_SUCCESS; } @@ -285,56 +258,27 @@ spv_result_t ValidateTypeRuntimeArray(ValidationState_t& _, const auto element_type = _.FindDef(element_id); if (!element_type || !spvOpcodeGeneratesType(element_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeRuntimeArray Element Type '" - << _.getIdName(element_id) << "' is not a type."; + << "OpTypeRuntimeArray Element Type " << _.getIdName(element_id) + << " is not a type."; } - if (element_type->opcode() == SpvOpTypeVoid) { + if (element_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeRuntimeArray Element Type '" - << _.getIdName(element_id) << "' is a void type."; + << "OpTypeRuntimeArray Element Type " << _.getIdName(element_id) + << " is a void type."; } if (spvIsVulkanEnv(_.context()->target_env) && - element_type->opcode() == SpvOpTypeRuntimeArray) { + element_type->opcode() == spv::Op::OpTypeRuntimeArray) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeRuntimeArray Element Type '" - << _.getIdName(element_id) << "' is not valid in " + << _.VkErrorID(4680) << "OpTypeRuntimeArray Element Type " + << _.getIdName(element_id) << " is not valid in " << spvLogStringForEnv(_.context()->target_env) << " environments."; } return SPV_SUCCESS; } -bool ContainsOpaqueType(ValidationState_t& _, const Instruction* str) { - const size_t elem_type_index = 1; - uint32_t elem_type_id; - Instruction* elem_type; - - if (spvOpcodeIsBaseOpaqueType(str->opcode())) { - return true; - } - - switch (str->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - elem_type_id = str->GetOperandAs(elem_type_index); - elem_type = _.FindDef(elem_type_id); - return ContainsOpaqueType(_, elem_type); - case SpvOpTypeStruct: - for (size_t member_type_index = 1; - member_type_index < str->operands().size(); ++member_type_index) { - auto member_type_id = str->GetOperandAs(member_type_index); - auto member_type = _.FindDef(member_type_id); - if (ContainsOpaqueType(_, member_type)) return true; - } - break; - default: - break; - } - return false; -} - spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { const uint32_t struct_id = inst->GetOperandAs(0); for (size_t member_type_index = 1; @@ -348,14 +292,14 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { auto member_type = _.FindDef(member_type_id); if (!member_type || !spvOpcodeGeneratesType(member_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeStruct Member Type '" << _.getIdName(member_type_id) - << "' is not a type."; + << "OpTypeStruct Member Type " << _.getIdName(member_type_id) + << " is not a type."; } - if (member_type->opcode() == SpvOpTypeVoid) { + if (member_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Structures cannot contain a void type."; } - if (SpvOpTypeStruct == member_type->opcode() && + if (spv::Op::OpTypeStruct == member_type->opcode() && _.IsStructTypeWithBuiltInMember(member_type_id)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Structure " << _.getIdName(member_type_id) @@ -368,15 +312,25 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { } if (spvIsVulkanEnv(_.context()->target_env) && - member_type->opcode() == SpvOpTypeRuntimeArray) { + member_type->opcode() == spv::Op::OpTypeRuntimeArray) { const bool is_last_member = member_type_index == inst->operands().size() - 1; if (!is_last_member) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "In " << spvLogStringForEnv(_.context()->target_env) + << _.VkErrorID(4680) << "In " + << spvLogStringForEnv(_.context()->target_env) << ", OpTypeRuntimeArray must only be used for the last member " "of an OpTypeStruct"; } + + if (!_.HasDecoration(inst->id(), spv::Decoration::Block) && + !_.HasDecoration(inst->id(), spv::Decoration::BufferBlock)) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << _.VkErrorID(4680) + << spvLogStringForEnv(_.context()->target_env) + << ", OpTypeStruct containing an OpTypeRuntimeArray " + << "must be decorated with Block or BufferBlock."; + } } } @@ -385,9 +339,10 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { for (size_t word_i = 2; word_i < inst->words().size(); ++word_i) { auto member = inst->word(word_i); auto memberTypeInstr = _.FindDef(member); - if (memberTypeInstr && SpvOpTypeStruct == memberTypeInstr->opcode()) { - if (_.HasDecoration(memberTypeInstr->id(), SpvDecorationBlock) || - _.HasDecoration(memberTypeInstr->id(), SpvDecorationBufferBlock) || + if (memberTypeInstr && spv::Op::OpTypeStruct == memberTypeInstr->opcode()) { + if (_.HasDecoration(memberTypeInstr->id(), spv::Decoration::Block) || + _.HasDecoration(memberTypeInstr->id(), + spv::Decoration::BufferBlock) || _.GetHasNestedBlockOrBufferBlockStruct(memberTypeInstr->id())) has_nested_blockOrBufferBlock_struct = true; } @@ -396,8 +351,8 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { _.SetHasNestedBlockOrBufferBlockStruct(inst->id(), has_nested_blockOrBufferBlock_struct); if (_.GetHasNestedBlockOrBufferBlockStruct(inst->id()) && - (_.HasDecoration(inst->id(), SpvDecorationBufferBlock) || - _.HasDecoration(inst->id(), SpvDecorationBlock))) { + (_.HasDecoration(inst->id(), spv::Decoration::BufferBlock) || + _.HasDecoration(inst->id(), spv::Decoration::Block))) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "rules: A Block or BufferBlock cannot be nested within another " "Block or BufferBlock. "; @@ -405,7 +360,7 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { std::unordered_set built_in_members; for (auto decoration : _.id_decorations(struct_id)) { - if (decoration.dec_type() == SpvDecorationBuiltIn && + if (decoration.dec_type() == spv::Decoration::BuiltIn && decoration.struct_member_index() != Decoration::kInvalidMember) { built_in_members.insert(decoration.struct_member_index()); } @@ -424,8 +379,21 @@ spv_result_t ValidateTypeStruct(ValidationState_t& _, const Instruction* inst) { _.RegisterStructTypeWithBuiltInMember(struct_id); } + const auto isOpaqueType = [&_](const Instruction* opaque_inst) { + auto opcode = opaque_inst->opcode(); + if (_.HasCapability(spv::Capability::BindlessTextureNV) && + (opcode == spv::Op::OpTypeImage || opcode == spv::Op::OpTypeSampler || + opcode == spv::Op::OpTypeSampledImage)) { + return false; + } else if (spvOpcodeIsBaseOpaqueType(opcode)) { + return true; + } + return false; + }; + if (spvIsVulkanEnv(_.context()->target_env) && - !_.options()->before_hlsl_legalization && ContainsOpaqueType(_, inst)) { + !_.options()->before_hlsl_legalization && + _.ContainsType(inst->id(), isOpaqueType)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << _.VkErrorID(4667) << "In " << spvLogStringForEnv(_.context()->target_env) @@ -441,19 +409,19 @@ spv_result_t ValidateTypePointer(ValidationState_t& _, auto type = _.FindDef(type_id); if (!type || !spvOpcodeGeneratesType(type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypePointer Type '" << _.getIdName(type_id) - << "' is not a type."; + << "OpTypePointer Type " << _.getIdName(type_id) + << " is not a type."; } // See if this points to a storage image. - const auto storage_class = inst->GetOperandAs(1); - if (storage_class == SpvStorageClassUniformConstant) { + const auto storage_class = inst->GetOperandAs(1); + if (storage_class == spv::StorageClass::UniformConstant) { // Unpack an optional level of arraying. - if (type->opcode() == SpvOpTypeArray || - type->opcode() == SpvOpTypeRuntimeArray) { + if (type->opcode() == spv::Op::OpTypeArray || + type->opcode() == spv::Op::OpTypeRuntimeArray) { type_id = type->GetOperandAs(1); type = _.FindDef(type_id); } - if (type->opcode() == SpvOpTypeImage) { + if (type->opcode() == spv::Op::OpTypeImage) { const auto sampled = type->GetOperandAs(6); // 2 indicates this image is known to be be used without a sampler, i.e. // a storage image. @@ -476,8 +444,8 @@ spv_result_t ValidateTypeFunction(ValidationState_t& _, const auto return_type = _.FindDef(return_type_id); if (!return_type || !spvOpcodeGeneratesType(return_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeFunction Return Type '" << _.getIdName(return_type_id) - << "' is not a type."; + << "OpTypeFunction Return Type " << _.getIdName(return_type_id) + << " is not a type."; } size_t num_args = 0; for (size_t param_type_index = 2; param_type_index < inst->operands().size(); @@ -486,14 +454,14 @@ spv_result_t ValidateTypeFunction(ValidationState_t& _, const auto param_type = _.FindDef(param_id); if (!param_type || !spvOpcodeGeneratesType(param_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeFunction Parameter Type '" << _.getIdName(param_id) - << "' is not a type."; + << "OpTypeFunction Parameter Type " << _.getIdName(param_id) + << " is not a type."; } - if (param_type->opcode() == SpvOpTypeVoid) { + if (param_type->opcode() == spv::Op::OpTypeVoid) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeFunction Parameter Type '" << _.getIdName(param_id) - << "' cannot be OpTypeVoid."; + << "OpTypeFunction Parameter Type " << _.getIdName(param_id) + << " cannot be OpTypeVoid."; } } const uint32_t num_function_args_limit = @@ -501,8 +469,8 @@ spv_result_t ValidateTypeFunction(ValidationState_t& _, if (num_args > num_function_args_limit) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "OpTypeFunction may not take more than " - << num_function_args_limit << " arguments. OpTypeFunction '" - << _.getIdName(inst->GetOperandAs(0)) << "' has " + << num_function_args_limit << " arguments. OpTypeFunction " + << _.getIdName(inst->GetOperandAs(0)) << " has " << num_args << " arguments."; } @@ -510,8 +478,9 @@ spv_result_t ValidateTypeFunction(ValidationState_t& _, // decoration instruction. for (auto& pair : inst->uses()) { const auto* use = pair.first; - if (use->opcode() != SpvOpFunction && !spvOpcodeIsDebug(use->opcode()) && - !use->IsNonSemantic() && !spvOpcodeIsDecoration(use->opcode())) { + if (use->opcode() != spv::Op::OpFunction && + !spvOpcodeIsDebug(use->opcode()) && !use->IsNonSemantic() && + !spvOpcodeIsDecoration(use->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, use) << "Invalid use of function type result id " << _.getIdName(inst->id()) << "."; @@ -525,13 +494,13 @@ spv_result_t ValidateTypeForwardPointer(ValidationState_t& _, const Instruction* inst) { const auto pointer_type_id = inst->GetOperandAs(0); const auto pointer_type_inst = _.FindDef(pointer_type_id); - if (pointer_type_inst->opcode() != SpvOpTypePointer) { + if (pointer_type_inst->opcode() != spv::Op::OpTypePointer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Pointer type in OpTypeForwardPointer is not a pointer type."; } - const auto storage_class = inst->GetOperandAs(1); - if (storage_class != pointer_type_inst->GetOperandAs(1)) { + const auto storage_class = inst->GetOperandAs(1); + if (storage_class != pointer_type_inst->GetOperandAs(1)) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Storage class in OpTypeForwardPointer does not match the " << "pointer definition."; @@ -539,13 +508,13 @@ spv_result_t ValidateTypeForwardPointer(ValidationState_t& _, const auto pointee_type_id = pointer_type_inst->GetOperandAs(2); const auto pointee_type = _.FindDef(pointee_type_id); - if (!pointee_type || pointee_type->opcode() != SpvOpTypeStruct) { + if (!pointee_type || pointee_type->opcode() != spv::Op::OpTypeStruct) { return _.diag(SPV_ERROR_INVALID_ID, inst) << "Forward pointers must point to a structure"; } if (spvIsVulkanEnv(_.context()->target_env)) { - if (storage_class != SpvStorageClassPhysicalStorageBuffer) { + if (storage_class != spv::StorageClass::PhysicalStorageBuffer) { return _.diag(SPV_ERROR_INVALID_ID, inst) << _.VkErrorID(4711) << "In Vulkan, OpTypeForwardPointer must have " @@ -556,18 +525,18 @@ spv_result_t ValidateTypeForwardPointer(ValidationState_t& _, return SPV_SUCCESS; } -spv_result_t ValidateTypeCooperativeMatrixNV(ValidationState_t& _, - const Instruction* inst) { +spv_result_t ValidateTypeCooperativeMatrix(ValidationState_t& _, + const Instruction* inst) { const auto component_type_index = 1; const auto component_type_id = inst->GetOperandAs(component_type_index); const auto component_type = _.FindDef(component_type_id); - if (!component_type || (SpvOpTypeFloat != component_type->opcode() && - SpvOpTypeInt != component_type->opcode())) { + if (!component_type || (spv::Op::OpTypeFloat != component_type->opcode() && + spv::Op::OpTypeInt != component_type->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeCooperativeMatrixNV Component Type '" + << "OpTypeCooperativeMatrix Component Type " << _.getIdName(component_type_id) - << "' is not a scalar numerical type."; + << " is not a scalar numerical type."; } const auto scope_index = 2; @@ -576,8 +545,8 @@ spv_result_t ValidateTypeCooperativeMatrixNV(ValidationState_t& _, if (!scope || !_.IsIntScalarType(scope->type_id()) || !spvOpcodeIsConstant(scope->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeCooperativeMatrixNV Scope '" << _.getIdName(scope_id) - << "' is not a constant instruction with scalar integer type."; + << "OpTypeCooperativeMatrix Scope " << _.getIdName(scope_id) + << " is not a constant instruction with scalar integer type."; } const auto rows_index = 3; @@ -586,8 +555,8 @@ spv_result_t ValidateTypeCooperativeMatrixNV(ValidationState_t& _, if (!rows || !_.IsIntScalarType(rows->type_id()) || !spvOpcodeIsConstant(rows->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeCooperativeMatrixNV Rows '" << _.getIdName(rows_id) - << "' is not a constant instruction with scalar integer type."; + << "OpTypeCooperativeMatrix Rows " << _.getIdName(rows_id) + << " is not a constant instruction with scalar integer type."; } const auto cols_index = 4; @@ -596,8 +565,20 @@ spv_result_t ValidateTypeCooperativeMatrixNV(ValidationState_t& _, if (!cols || !_.IsIntScalarType(cols->type_id()) || !spvOpcodeIsConstant(cols->opcode())) { return _.diag(SPV_ERROR_INVALID_ID, inst) - << "OpTypeCooperativeMatrixNV Cols '" << _.getIdName(cols_id) - << "' is not a constant instruction with scalar integer type."; + << "OpTypeCooperativeMatrix Cols " << _.getIdName(cols_id) + << " is not a constant instruction with scalar integer type."; + } + + if (inst->opcode() == spv::Op::OpTypeCooperativeMatrixKHR) { + const auto use_index = 5; + const auto use_id = inst->GetOperandAs(use_index); + const auto use = _.FindDef(use_id); + if (!use || !_.IsIntScalarType(use->type_id()) || + !spvOpcodeIsConstant(use->opcode())) { + return _.diag(SPV_ERROR_INVALID_ID, inst) + << "OpTypeCooperativeMatrixKHR Use " << _.getIdName(use_id) + << " is not a constant instruction with scalar integer type."; + } } return SPV_SUCCESS; @@ -606,45 +587,46 @@ spv_result_t ValidateTypeCooperativeMatrixNV(ValidationState_t& _, spv_result_t TypePass(ValidationState_t& _, const Instruction* inst) { if (!spvOpcodeGeneratesType(inst->opcode()) && - inst->opcode() != SpvOpTypeForwardPointer) { + inst->opcode() != spv::Op::OpTypeForwardPointer) { return SPV_SUCCESS; } if (auto error = ValidateUniqueness(_, inst)) return error; switch (inst->opcode()) { - case SpvOpTypeInt: + case spv::Op::OpTypeInt: if (auto error = ValidateTypeInt(_, inst)) return error; break; - case SpvOpTypeFloat: + case spv::Op::OpTypeFloat: if (auto error = ValidateTypeFloat(_, inst)) return error; break; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: if (auto error = ValidateTypeVector(_, inst)) return error; break; - case SpvOpTypeMatrix: + case spv::Op::OpTypeMatrix: if (auto error = ValidateTypeMatrix(_, inst)) return error; break; - case SpvOpTypeArray: + case spv::Op::OpTypeArray: if (auto error = ValidateTypeArray(_, inst)) return error; break; - case SpvOpTypeRuntimeArray: + case spv::Op::OpTypeRuntimeArray: if (auto error = ValidateTypeRuntimeArray(_, inst)) return error; break; - case SpvOpTypeStruct: + case spv::Op::OpTypeStruct: if (auto error = ValidateTypeStruct(_, inst)) return error; break; - case SpvOpTypePointer: + case spv::Op::OpTypePointer: if (auto error = ValidateTypePointer(_, inst)) return error; break; - case SpvOpTypeFunction: + case spv::Op::OpTypeFunction: if (auto error = ValidateTypeFunction(_, inst)) return error; break; - case SpvOpTypeForwardPointer: + case spv::Op::OpTypeForwardPointer: if (auto error = ValidateTypeForwardPointer(_, inst)) return error; break; - case SpvOpTypeCooperativeMatrixNV: - if (auto error = ValidateTypeCooperativeMatrixNV(_, inst)) return error; + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: + if (auto error = ValidateTypeCooperativeMatrix(_, inst)) return error; break; default: break; diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.cpp b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.cpp index 8c02af1a7..87322d2b9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.cpp +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.cpp @@ -21,6 +21,7 @@ #include "source/opcode.h" #include "source/spirv_constant.h" #include "source/spirv_target_env.h" +#include "source/util/make_unique.h" #include "source/val/basic_block.h" #include "source/val/construct.h" #include "source/val/function.h" @@ -31,72 +32,74 @@ namespace val { namespace { ModuleLayoutSection InstructionLayoutSection( - ModuleLayoutSection current_section, SpvOp op) { + ModuleLayoutSection current_section, spv::Op op) { // See Section 2.4 if (spvOpcodeGeneratesType(op) || spvOpcodeIsConstant(op)) return kLayoutTypes; switch (op) { - case SpvOpCapability: + case spv::Op::OpCapability: return kLayoutCapabilities; - case SpvOpExtension: + case spv::Op::OpExtension: return kLayoutExtensions; - case SpvOpExtInstImport: + case spv::Op::OpExtInstImport: return kLayoutExtInstImport; - case SpvOpMemoryModel: + case spv::Op::OpMemoryModel: return kLayoutMemoryModel; - case SpvOpEntryPoint: + case spv::Op::OpEntryPoint: return kLayoutEntryPoint; - case SpvOpExecutionMode: - case SpvOpExecutionModeId: + case spv::Op::OpExecutionMode: + case spv::Op::OpExecutionModeId: return kLayoutExecutionMode; - case SpvOpSourceContinued: - case SpvOpSource: - case SpvOpSourceExtension: - case SpvOpString: + case spv::Op::OpSourceContinued: + case spv::Op::OpSource: + case spv::Op::OpSourceExtension: + case spv::Op::OpString: return kLayoutDebug1; - case SpvOpName: - case SpvOpMemberName: + case spv::Op::OpName: + case spv::Op::OpMemberName: return kLayoutDebug2; - case SpvOpModuleProcessed: + case spv::Op::OpModuleProcessed: return kLayoutDebug3; - case SpvOpDecorate: - case SpvOpMemberDecorate: - case SpvOpGroupDecorate: - case SpvOpGroupMemberDecorate: - case SpvOpDecorationGroup: - case SpvOpDecorateId: - case SpvOpDecorateStringGOOGLE: - case SpvOpMemberDecorateStringGOOGLE: + case spv::Op::OpDecorate: + case spv::Op::OpMemberDecorate: + case spv::Op::OpGroupDecorate: + case spv::Op::OpGroupMemberDecorate: + case spv::Op::OpDecorationGroup: + case spv::Op::OpDecorateId: + case spv::Op::OpDecorateStringGOOGLE: + case spv::Op::OpMemberDecorateStringGOOGLE: return kLayoutAnnotations; - case SpvOpTypeForwardPointer: + case spv::Op::OpTypeForwardPointer: return kLayoutTypes; - case SpvOpVariable: + case spv::Op::OpVariable: if (current_section == kLayoutTypes) return kLayoutTypes; return kLayoutFunctionDefinitions; - case SpvOpExtInst: - // SpvOpExtInst is only allowed in types section for certain extended - // instruction sets. This will be checked separately. + case spv::Op::OpExtInst: + // spv::Op::OpExtInst is only allowed in types section for certain + // extended instruction sets. This will be checked separately. if (current_section == kLayoutTypes) return kLayoutTypes; return kLayoutFunctionDefinitions; - case SpvOpLine: - case SpvOpNoLine: - case SpvOpUndef: + case spv::Op::OpLine: + case spv::Op::OpNoLine: + case spv::Op::OpUndef: if (current_section == kLayoutTypes) return kLayoutTypes; return kLayoutFunctionDefinitions; - case SpvOpFunction: - case SpvOpFunctionParameter: - case SpvOpFunctionEnd: + case spv::Op::OpFunction: + case spv::Op::OpFunctionParameter: + case spv::Op::OpFunctionEnd: if (current_section == kLayoutFunctionDeclarations) return kLayoutFunctionDeclarations; return kLayoutFunctionDefinitions; + case spv::Op::OpSamplerImageAddressingModeNV: + return kLayoutSamplerImageAddressMode; default: break; } return kLayoutFunctionDefinitions; } -bool IsInstructionInLayoutSection(ModuleLayoutSection layout, SpvOp op) { +bool IsInstructionInLayoutSection(ModuleLayoutSection layout, spv::Op op) { return layout == InstructionLayoutSection(layout, op); } @@ -104,7 +107,9 @@ bool IsInstructionInLayoutSection(ModuleLayoutSection layout, SpvOp op) { spv_result_t CountInstructions(void* user_data, const spv_parsed_instruction_t* inst) { ValidationState_t& _ = *(reinterpret_cast(user_data)); - if (inst->opcode == SpvOpFunction) _.increment_total_functions(); + if (spv::Op(inst->opcode) == spv::Op::OpFunction) { + _.increment_total_functions(); + } _.increment_total_instructions(); return SPV_SUCCESS; @@ -158,9 +163,10 @@ ValidationState_t::ValidationState_t(const spv_const_context ctx, struct_nesting_depth_(), struct_has_nested_blockorbufferblock_struct_(), grammar_(ctx), - addressing_model_(SpvAddressingModelMax), - memory_model_(SpvMemoryModelMax), + addressing_model_(spv::AddressingModel::Max), + memory_model_(spv::MemoryModel::Max), pointer_size_and_alignment_(0), + sampler_image_addressing_mode_(0), in_function_(false), num_of_warnings_(0), max_num_of_warnings_(max_warnings) { @@ -205,9 +211,12 @@ ValidationState_t::ValidationState_t(const spv_const_context ctx, } UpdateFeaturesBasedOnSpirvVersion(&features_, version_); - friendly_mapper_ = spvtools::MakeUnique( - context_, words_, num_words_); - name_mapper_ = friendly_mapper_->GetNameMapper(); + name_mapper_ = spvtools::GetTrivialNameMapper(); + if (options_->use_friendly_names) { + friendly_mapper_ = spvtools::MakeUnique( + context_, words_, num_words_); + name_mapper_ = friendly_mapper_->GetNameMapper(); + } } void ValidationState_t::preallocateStorage() { @@ -242,7 +251,7 @@ std::string ValidationState_t::getIdName(uint32_t id) const { const std::string id_name = name_mapper_(id); std::stringstream out; - out << id << "[%" << id_name << "]"; + out << "'" << id << "[%" << id_name << "]'"; return out.str(); } @@ -284,13 +293,13 @@ void ValidationState_t::ProgressToNextLayoutSectionOrder() { } } -bool ValidationState_t::IsOpcodeInPreviousLayoutSection(SpvOp op) { +bool ValidationState_t::IsOpcodeInPreviousLayoutSection(spv::Op op) { ModuleLayoutSection section = InstructionLayoutSection(current_layout_section_, op); return section < current_layout_section_; } -bool ValidationState_t::IsOpcodeInCurrentLayoutSection(SpvOp op) { +bool ValidationState_t::IsOpcodeInCurrentLayoutSection(spv::Op op) { return IsInstructionInLayoutSection(current_layout_section_, op); } @@ -347,62 +356,61 @@ bool ValidationState_t::in_block() const { module_functions_.back().current_block() != nullptr; } -void ValidationState_t::RegisterCapability(SpvCapability cap) { +void ValidationState_t::RegisterCapability(spv::Capability cap) { // Avoid redundant work. Otherwise the recursion could induce work // quadrdatic in the capability dependency depth. (Ok, not much, but // it's something.) - if (module_capabilities_.Contains(cap)) return; + if (module_capabilities_.contains(cap)) return; - module_capabilities_.Add(cap); + module_capabilities_.insert(cap); spv_operand_desc desc; - if (SPV_SUCCESS == - grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, cap, &desc)) { - CapabilitySet(desc->numCapabilities, desc->capabilities) - .ForEach([this](SpvCapability c) { RegisterCapability(c); }); + if (SPV_SUCCESS == grammar_.lookupOperand(SPV_OPERAND_TYPE_CAPABILITY, + uint32_t(cap), &desc)) { + for (auto capability : + CapabilitySet(desc->numCapabilities, desc->capabilities)) { + RegisterCapability(capability); + } } switch (cap) { - case SpvCapabilityKernel: + case spv::Capability::Kernel: features_.group_ops_reduce_and_scans = true; break; - case SpvCapabilityInt8: + case spv::Capability::Int8: features_.use_int8_type = true; features_.declare_int8_type = true; break; - case SpvCapabilityStorageBuffer8BitAccess: - case SpvCapabilityUniformAndStorageBuffer8BitAccess: - case SpvCapabilityStoragePushConstant8: - case SpvCapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: + case spv::Capability::StorageBuffer8BitAccess: + case spv::Capability::UniformAndStorageBuffer8BitAccess: + case spv::Capability::StoragePushConstant8: + case spv::Capability::WorkgroupMemoryExplicitLayout8BitAccessKHR: features_.declare_int8_type = true; break; - case SpvCapabilityInt16: + case spv::Capability::Int16: features_.declare_int16_type = true; break; - case SpvCapabilityFloat16: - case SpvCapabilityFloat16Buffer: + case spv::Capability::Float16: + case spv::Capability::Float16Buffer: features_.declare_float16_type = true; break; - case SpvCapabilityStorageUniformBufferBlock16: - case SpvCapabilityStorageUniform16: - case SpvCapabilityStoragePushConstant16: - case SpvCapabilityStorageInputOutput16: - case SpvCapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: + case spv::Capability::StorageUniformBufferBlock16: + case spv::Capability::StorageUniform16: + case spv::Capability::StoragePushConstant16: + case spv::Capability::StorageInputOutput16: + case spv::Capability::WorkgroupMemoryExplicitLayout16BitAccessKHR: features_.declare_int16_type = true; features_.declare_float16_type = true; features_.free_fp_rounding_mode = true; break; - case SpvCapabilityVariablePointers: + case spv::Capability::VariablePointers: + case spv::Capability::VariablePointersStorageBuffer: features_.variable_pointers = true; - features_.variable_pointers_storage_buffer = true; - break; - case SpvCapabilityVariablePointersStorageBuffer: - features_.variable_pointers_storage_buffer = true; break; default: // TODO(dneto): For now don't validate SPV_NV_ray_tracing, which uses - // capability SpvCapabilityRayTracingNV. - // SpvCapabilityRayTracingProvisionalKHR would need the same treatment. - // One of the differences going from SPV_KHR_ray_tracing from + // capability spv::Capability::RayTracingNV. + // spv::Capability::RayTracingProvisionalKHR would need the same + // treatment. One of the differences going from SPV_KHR_ray_tracing from // provisional to final spec was the provisional spec uses Locations // for variables in certain storage classes, just like the // SPV_NV_ray_tracing extension. So it mimics the NVIDIA extension. @@ -413,9 +421,9 @@ void ValidationState_t::RegisterCapability(SpvCapability cap) { } void ValidationState_t::RegisterExtension(Extension ext) { - if (module_extensions_.Contains(ext)) return; + if (module_extensions_.contains(ext)) return; - module_extensions_.Add(ext); + module_extensions_.insert(ext); switch (ext) { case kSPV_AMD_gpu_shader_half_float: @@ -451,34 +459,45 @@ bool ValidationState_t::HasAnyOfExtensions( return module_extensions_.HasAnyOf(extensions); } -void ValidationState_t::set_addressing_model(SpvAddressingModel am) { +void ValidationState_t::set_addressing_model(spv::AddressingModel am) { addressing_model_ = am; switch (am) { - case SpvAddressingModelPhysical32: + case spv::AddressingModel::Physical32: pointer_size_and_alignment_ = 4; break; default: // fall through - case SpvAddressingModelPhysical64: - case SpvAddressingModelPhysicalStorageBuffer64EXT: + case spv::AddressingModel::Physical64: + case spv::AddressingModel::PhysicalStorageBuffer64: pointer_size_and_alignment_ = 8; break; } } -SpvAddressingModel ValidationState_t::addressing_model() const { +spv::AddressingModel ValidationState_t::addressing_model() const { return addressing_model_; } -void ValidationState_t::set_memory_model(SpvMemoryModel mm) { +void ValidationState_t::set_memory_model(spv::MemoryModel mm) { memory_model_ = mm; } -SpvMemoryModel ValidationState_t::memory_model() const { return memory_model_; } +spv::MemoryModel ValidationState_t::memory_model() const { + return memory_model_; +} + +void ValidationState_t::set_samplerimage_variable_address_mode( + uint32_t bit_width) { + sampler_image_addressing_mode_ = bit_width; +} + +uint32_t ValidationState_t::samplerimage_variable_address_mode() const { + return sampler_image_addressing_mode_; +} spv_result_t ValidationState_t::RegisterFunction( - uint32_t id, uint32_t ret_type_id, SpvFunctionControlMask function_control, - uint32_t function_type_id) { + uint32_t id, uint32_t ret_type_id, + spv::FunctionControlMask function_control, uint32_t function_type_id) { assert(in_function_body() == false && "RegisterFunction can only be called when parsing the binary outside " "of another function"); @@ -498,7 +517,7 @@ spv_result_t ValidationState_t::RegisterFunctionEnd() { "inside of another function"); assert(in_block() == false && "RegisterFunctionParameter can only be called when parsing the binary " - "ouside of a block"); + "outside of a block"); current_function().RegisterFunctionEnd(); in_function_ = false; return SPV_SUCCESS; @@ -514,24 +533,24 @@ Instruction* ValidationState_t::AddOrderedInstruction( // Improves diagnostic messages by collecting names of IDs void ValidationState_t::RegisterDebugInstruction(const Instruction* inst) { switch (inst->opcode()) { - case SpvOpName: { + case spv::Op::OpName: { const auto target = inst->GetOperandAs(0); const std::string str = inst->GetOperandAs(1); AssignNameToId(target, str); break; } - case SpvOpMemberName: { + case spv::Op::OpMemberName: { const auto target = inst->GetOperandAs(0); const std::string str = inst->GetOperandAs(2); AssignNameToId(target, str); break; } - case SpvOpSourceContinued: - case SpvOpSource: - case SpvOpSourceExtension: - case SpvOpString: - case SpvOpLine: - case SpvOpNoLine: + case spv::Op::OpSourceContinued: + case spv::Op::OpSource: + case spv::Op::OpSourceExtension: + case spv::Op::OpString: + case spv::Op::OpLine: + case spv::Op::OpNoLine: default: break; } @@ -541,7 +560,7 @@ void ValidationState_t::RegisterInstruction(Instruction* inst) { if (inst->id()) all_definitions_.insert(std::make_pair(inst->id(), inst)); // Some validation checks are easier by getting all the consumers - for (uint16_t i = 0; i < inst->operands().size(); ++i) { + for (size_t i = 0; i < inst->operands().size(); ++i) { const spv_parsed_operand_t& operand = inst->operand(i); if ((SPV_OPERAND_TYPE_ID == operand.type) || (SPV_OPERAND_TYPE_TYPE_ID == operand.type)) { @@ -555,7 +574,7 @@ void ValidationState_t::RegisterInstruction(Instruction* inst) { // should be recorded. The validator will ensure that all usages of an // OpTypeSampledImage and its definition are in the same basic block. if ((SPV_OPERAND_TYPE_ID == operand.type) && - (SpvOpSampledImage == operand_inst->opcode())) { + (spv::Op::OpSampledImage == operand_inst->opcode())) { RegisterSampledImageConsumer(operand_word, inst); } @@ -565,12 +584,12 @@ void ValidationState_t::RegisterInstruction(Instruction* inst) { // Instead just need to register storage class usage for consumers in a // function block. if (inst->function()) { - if (operand_inst->opcode() == SpvOpTypePointer) { + if (operand_inst->opcode() == spv::Op::OpTypePointer) { RegisterStorageClassConsumer( - operand_inst->GetOperandAs(1), inst); - } else if (operand_inst->opcode() == SpvOpVariable) { + operand_inst->GetOperandAs(1), inst); + } else if (operand_inst->opcode() == spv::Op::OpVariable) { RegisterStorageClassConsumer( - operand_inst->GetOperandAs(2), inst); + operand_inst->GetOperandAs(2), inst); } } } @@ -592,25 +611,39 @@ void ValidationState_t::RegisterSampledImageConsumer(uint32_t sampled_image_id, sampled_image_consumers_[sampled_image_id].push_back(consumer); } +void ValidationState_t::RegisterQCOMImageProcessingTextureConsumer( + uint32_t texture_id, const Instruction* consumer0, + const Instruction* consumer1) { + if (HasDecoration(texture_id, spv::Decoration::WeightTextureQCOM) || + HasDecoration(texture_id, spv::Decoration::BlockMatchTextureQCOM) || + HasDecoration(texture_id, spv::Decoration::BlockMatchSamplerQCOM)) { + qcom_image_processing_consumers_.insert(consumer0->id()); + if (consumer1) { + qcom_image_processing_consumers_.insert(consumer1->id()); + } + } +} + void ValidationState_t::RegisterStorageClassConsumer( - SpvStorageClass storage_class, Instruction* consumer) { + spv::StorageClass storage_class, Instruction* consumer) { if (spvIsVulkanEnv(context()->target_env)) { - if (storage_class == SpvStorageClassOutput) { + if (storage_class == spv::StorageClass::Output) { std::string errorVUID = VkErrorID(4644); function(consumer->function()->id()) ->RegisterExecutionModelLimitation([errorVUID]( - SpvExecutionModel model, std::string* message) { - if (model == SpvExecutionModelGLCompute || - model == SpvExecutionModelRayGenerationKHR || - model == SpvExecutionModelIntersectionKHR || - model == SpvExecutionModelAnyHitKHR || - model == SpvExecutionModelClosestHitKHR || - model == SpvExecutionModelMissKHR || - model == SpvExecutionModelCallableKHR) { + spv::ExecutionModel model, + std::string* message) { + if (model == spv::ExecutionModel::GLCompute || + model == spv::ExecutionModel::RayGenerationKHR || + model == spv::ExecutionModel::IntersectionKHR || + model == spv::ExecutionModel::AnyHitKHR || + model == spv::ExecutionModel::ClosestHitKHR || + model == spv::ExecutionModel::MissKHR || + model == spv::ExecutionModel::CallableKHR) { if (message) { *message = errorVUID + - "in Vulkan evironment, Output Storage Class must not be " + "in Vulkan environment, Output Storage Class must not be " "used in GLCompute, RayGenerationKHR, IntersectionKHR, " "AnyHitKHR, ClosestHitKHR, MissKHR, or CallableKHR " "execution models"; @@ -621,18 +654,21 @@ void ValidationState_t::RegisterStorageClassConsumer( }); } - if (storage_class == SpvStorageClassWorkgroup) { + if (storage_class == spv::StorageClass::Workgroup) { std::string errorVUID = VkErrorID(4645); function(consumer->function()->id()) ->RegisterExecutionModelLimitation([errorVUID]( - SpvExecutionModel model, std::string* message) { - if (model != SpvExecutionModelGLCompute && - model != SpvExecutionModelTaskNV && - model != SpvExecutionModelMeshNV) { + spv::ExecutionModel model, + std::string* message) { + if (model != spv::ExecutionModel::GLCompute && + model != spv::ExecutionModel::TaskNV && + model != spv::ExecutionModel::MeshNV && + model != spv::ExecutionModel::TaskEXT && + model != spv::ExecutionModel::MeshEXT) { if (message) { *message = errorVUID + - "in Vulkan evironment, Workgroup Storage Class is limited " + "in Vulkan environment, Workgroup Storage Class is limited " "to MeshNV, TaskNV, and GLCompute execution model"; } return false; @@ -641,6 +677,152 @@ void ValidationState_t::RegisterStorageClassConsumer( }); } } + + if (storage_class == spv::StorageClass::CallableDataKHR) { + std::string errorVUID = VkErrorID(4704); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::CallableKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + errorVUID + + "CallableDataKHR Storage Class is limited to " + "RayGenerationKHR, ClosestHitKHR, CallableKHR, and " + "MissKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::IncomingCallableDataKHR) { + std::string errorVUID = VkErrorID(4705); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::CallableKHR) { + if (message) { + *message = + errorVUID + + "IncomingCallableDataKHR Storage Class is limited to " + "CallableKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::RayPayloadKHR) { + std::string errorVUID = VkErrorID(4698); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation([errorVUID]( + spv::ExecutionModel model, + std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + errorVUID + + "RayPayloadKHR Storage Class is limited to RayGenerationKHR, " + "ClosestHitKHR, and MissKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::HitAttributeKHR) { + std::string errorVUID = VkErrorID(4701); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::IntersectionKHR && + model != spv::ExecutionModel::AnyHitKHR && + model != spv::ExecutionModel::ClosestHitKHR) { + if (message) { + *message = errorVUID + + "HitAttributeKHR Storage Class is limited to " + "IntersectionKHR, AnyHitKHR, sand ClosestHitKHR " + "execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::IncomingRayPayloadKHR) { + std::string errorVUID = VkErrorID(4699); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::AnyHitKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + errorVUID + + "IncomingRayPayloadKHR Storage Class is limited to " + "AnyHitKHR, ClosestHitKHR, and MissKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::ShaderRecordBufferKHR) { + std::string errorVUID = VkErrorID(7119); + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [errorVUID](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::IntersectionKHR && + model != spv::ExecutionModel::AnyHitKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::CallableKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + errorVUID + + "ShaderRecordBufferKHR Storage Class is limited to " + "RayGenerationKHR, IntersectionKHR, AnyHitKHR, " + "ClosestHitKHR, CallableKHR, and MissKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::TaskPayloadWorkgroupEXT) { + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation( + [](spv::ExecutionModel model, std::string* message) { + if (model != spv::ExecutionModel::TaskEXT && + model != spv::ExecutionModel::MeshEXT) { + if (message) { + *message = + "TaskPayloadWorkgroupEXT Storage Class is limited to " + "TaskEXT and MeshKHR execution model"; + } + return false; + } + return true; + }); + } else if (storage_class == spv::StorageClass::HitObjectAttributeNV) { + function(consumer->function()->id()) + ->RegisterExecutionModelLimitation([](spv::ExecutionModel model, + std::string* message) { + if (model != spv::ExecutionModel::RayGenerationKHR && + model != spv::ExecutionModel::ClosestHitKHR && + model != spv::ExecutionModel::MissKHR) { + if (message) { + *message = + "HitObjectAttributeNV Storage Class is limited to " + "RayGenerationKHR, ClosestHitKHR or MissKHR execution model"; + } + return false; + } + return true; + }); + } } uint32_t ValidationState_t::getIdBound() const { return id_bound_; } @@ -671,9 +853,9 @@ uint32_t ValidationState_t::GetTypeId(uint32_t id) const { return inst ? inst->type_id() : 0; } -SpvOp ValidationState_t::GetIdOpcode(uint32_t id) const { +spv::Op ValidationState_t::GetIdOpcode(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst ? inst->opcode() : SpvOpNop; + return inst ? inst->opcode() : spv::Op::OpNop; } uint32_t ValidationState_t::GetComponentType(uint32_t id) const { @@ -681,18 +863,19 @@ uint32_t ValidationState_t::GetComponentType(uint32_t id) const { assert(inst); switch (inst->opcode()) { - case SpvOpTypeFloat: - case SpvOpTypeInt: - case SpvOpTypeBool: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeBool: return id; - case SpvOpTypeVector: + case spv::Op::OpTypeVector: return inst->word(2); - case SpvOpTypeMatrix: + case spv::Op::OpTypeMatrix: return GetComponentType(inst->word(2)); - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: return inst->word(2); default: @@ -710,16 +893,17 @@ uint32_t ValidationState_t::GetDimension(uint32_t id) const { assert(inst); switch (inst->opcode()) { - case SpvOpTypeFloat: - case SpvOpTypeInt: - case SpvOpTypeBool: + case spv::Op::OpTypeFloat: + case spv::Op::OpTypeInt: + case spv::Op::OpTypeBool: return 1; - case SpvOpTypeVector: - case SpvOpTypeMatrix: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: return inst->word(3); - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: // Actual dimension isn't known, return 0 return 0; @@ -738,10 +922,11 @@ uint32_t ValidationState_t::GetBitWidth(uint32_t id) const { const Instruction* inst = FindDef(component_type_id); assert(inst); - if (inst->opcode() == SpvOpTypeFloat || inst->opcode() == SpvOpTypeInt) + if (inst->opcode() == spv::Op::OpTypeFloat || + inst->opcode() == spv::Op::OpTypeInt) return inst->word(2); - if (inst->opcode() == SpvOpTypeBool) return 1; + if (inst->opcode() == spv::Op::OpTypeBool) return 1; assert(0); return 0; @@ -749,12 +934,12 @@ uint32_t ValidationState_t::GetBitWidth(uint32_t id) const { bool ValidationState_t::IsVoidType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeVoid; + return inst && inst->opcode() == spv::Op::OpTypeVoid; } bool ValidationState_t::IsFloatScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeFloat; + return inst && inst->opcode() == spv::Op::OpTypeFloat; } bool ValidationState_t::IsFloatVectorType(uint32_t id) const { @@ -763,24 +948,38 @@ bool ValidationState_t::IsFloatVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsFloatScalarType(GetComponentType(id)); } return false; } +bool ValidationState_t::IsFloat16Vector2Or4Type(uint32_t id) const { + const Instruction* inst = FindDef(id); + assert(inst); + + if (inst->opcode() == spv::Op::OpTypeVector) { + uint32_t vectorDim = GetDimension(id); + return IsFloatScalarType(GetComponentType(id)) && + (vectorDim == 2 || vectorDim == 4) && + (GetBitWidth(GetComponentType(id)) == 16); + } + + return false; +} + bool ValidationState_t::IsFloatScalarOrVectorType(uint32_t id) const { const Instruction* inst = FindDef(id); if (!inst) { return false; } - if (inst->opcode() == SpvOpTypeFloat) { + if (inst->opcode() == spv::Op::OpTypeFloat) { return true; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsFloatScalarType(GetComponentType(id)); } @@ -789,7 +988,7 @@ bool ValidationState_t::IsFloatScalarOrVectorType(uint32_t id) const { bool ValidationState_t::IsIntScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeInt; + return inst && inst->opcode() == spv::Op::OpTypeInt; } bool ValidationState_t::IsIntVectorType(uint32_t id) const { @@ -798,7 +997,7 @@ bool ValidationState_t::IsIntVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsIntScalarType(GetComponentType(id)); } @@ -811,11 +1010,11 @@ bool ValidationState_t::IsIntScalarOrVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeInt) { + if (inst->opcode() == spv::Op::OpTypeInt) { return true; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsIntScalarType(GetComponentType(id)); } @@ -824,7 +1023,7 @@ bool ValidationState_t::IsIntScalarOrVectorType(uint32_t id) const { bool ValidationState_t::IsUnsignedIntScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeInt && inst->word(3) == 0; + return inst && inst->opcode() == spv::Op::OpTypeInt && inst->word(3) == 0; } bool ValidationState_t::IsUnsignedIntVectorType(uint32_t id) const { @@ -833,7 +1032,24 @@ bool ValidationState_t::IsUnsignedIntVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { + return IsUnsignedIntScalarType(GetComponentType(id)); + } + + return false; +} + +bool ValidationState_t::IsUnsignedIntScalarOrVectorType(uint32_t id) const { + const Instruction* inst = FindDef(id); + if (!inst) { + return false; + } + + if (inst->opcode() == spv::Op::OpTypeInt) { + return inst->GetOperandAs(2) == 0; + } + + if (inst->opcode() == spv::Op::OpTypeVector) { return IsUnsignedIntScalarType(GetComponentType(id)); } @@ -842,7 +1058,7 @@ bool ValidationState_t::IsUnsignedIntVectorType(uint32_t id) const { bool ValidationState_t::IsSignedIntScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeInt && inst->word(3) == 1; + return inst && inst->opcode() == spv::Op::OpTypeInt && inst->word(3) == 1; } bool ValidationState_t::IsSignedIntVectorType(uint32_t id) const { @@ -851,7 +1067,7 @@ bool ValidationState_t::IsSignedIntVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsSignedIntScalarType(GetComponentType(id)); } @@ -860,7 +1076,7 @@ bool ValidationState_t::IsSignedIntVectorType(uint32_t id) const { bool ValidationState_t::IsBoolScalarType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeBool; + return inst && inst->opcode() == spv::Op::OpTypeBool; } bool ValidationState_t::IsBoolVectorType(uint32_t id) const { @@ -869,7 +1085,7 @@ bool ValidationState_t::IsBoolVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsBoolScalarType(GetComponentType(id)); } @@ -882,11 +1098,11 @@ bool ValidationState_t::IsBoolScalarOrVectorType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeBool) { + if (inst->opcode() == spv::Op::OpTypeBool) { return true; } - if (inst->opcode() == SpvOpTypeVector) { + if (inst->opcode() == spv::Op::OpTypeVector) { return IsBoolScalarType(GetComponentType(id)); } @@ -899,7 +1115,7 @@ bool ValidationState_t::IsFloatMatrixType(uint32_t id) const { return false; } - if (inst->opcode() == SpvOpTypeMatrix) { + if (inst->opcode() == spv::Op::OpTypeMatrix) { return IsFloatScalarType(GetComponentType(id)); } @@ -914,13 +1130,13 @@ bool ValidationState_t::GetMatrixTypeInfo(uint32_t id, uint32_t* num_rows, const Instruction* mat_inst = FindDef(id); assert(mat_inst); - if (mat_inst->opcode() != SpvOpTypeMatrix) return false; + if (mat_inst->opcode() != spv::Op::OpTypeMatrix) return false; const uint32_t vec_type = mat_inst->word(2); const Instruction* vec_inst = FindDef(vec_type); assert(vec_inst); - if (vec_inst->opcode() != SpvOpTypeVector) { + if (vec_inst->opcode() != spv::Op::OpTypeVector) { assert(0); return false; } @@ -940,7 +1156,7 @@ bool ValidationState_t::GetStructMemberTypes( const Instruction* inst = FindDef(struct_type_id); assert(inst); - if (inst->opcode() != SpvOpTypeStruct) return false; + if (inst->opcode() != spv::Op::OpTypeStruct) return false; *member_types = std::vector(inst->words().cbegin() + 2, inst->words().cend()); @@ -952,49 +1168,107 @@ bool ValidationState_t::GetStructMemberTypes( bool ValidationState_t::IsPointerType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypePointer; + return inst && inst->opcode() == spv::Op::OpTypePointer; } -bool ValidationState_t::GetPointerTypeInfo(uint32_t id, uint32_t* data_type, - uint32_t* storage_class) const { +bool ValidationState_t::GetPointerTypeInfo( + uint32_t id, uint32_t* data_type, spv::StorageClass* storage_class) const { + *storage_class = spv::StorageClass::Max; if (!id) return false; const Instruction* inst = FindDef(id); assert(inst); - if (inst->opcode() != SpvOpTypePointer) return false; + if (inst->opcode() != spv::Op::OpTypePointer) return false; - *storage_class = inst->word(2); + *storage_class = spv::StorageClass(inst->word(2)); *data_type = inst->word(3); return true; } +bool ValidationState_t::IsAccelerationStructureType(uint32_t id) const { + const Instruction* inst = FindDef(id); + return inst && inst->opcode() == spv::Op::OpTypeAccelerationStructureKHR; +} + bool ValidationState_t::IsCooperativeMatrixType(uint32_t id) const { const Instruction* inst = FindDef(id); - return inst && inst->opcode() == SpvOpTypeCooperativeMatrixNV; + return inst && (inst->opcode() == spv::Op::OpTypeCooperativeMatrixNV || + inst->opcode() == spv::Op::OpTypeCooperativeMatrixKHR); +} + +bool ValidationState_t::IsCooperativeMatrixNVType(uint32_t id) const { + const Instruction* inst = FindDef(id); + return inst && inst->opcode() == spv::Op::OpTypeCooperativeMatrixNV; +} + +bool ValidationState_t::IsCooperativeMatrixKHRType(uint32_t id) const { + const Instruction* inst = FindDef(id); + return inst && inst->opcode() == spv::Op::OpTypeCooperativeMatrixKHR; +} + +bool ValidationState_t::IsCooperativeMatrixAType(uint32_t id) const { + if (!IsCooperativeMatrixKHRType(id)) return false; + const Instruction* inst = FindDef(id); + uint64_t matrixUse = 0; + if (EvalConstantValUint64(inst->word(6), &matrixUse)) { + return matrixUse == + static_cast(spv::CooperativeMatrixUse::MatrixAKHR); + } + return false; +} + +bool ValidationState_t::IsCooperativeMatrixBType(uint32_t id) const { + if (!IsCooperativeMatrixKHRType(id)) return false; + const Instruction* inst = FindDef(id); + uint64_t matrixUse = 0; + if (EvalConstantValUint64(inst->word(6), &matrixUse)) { + return matrixUse == + static_cast(spv::CooperativeMatrixUse::MatrixBKHR); + } + return false; +} +bool ValidationState_t::IsCooperativeMatrixAccType(uint32_t id) const { + if (!IsCooperativeMatrixKHRType(id)) return false; + const Instruction* inst = FindDef(id); + uint64_t matrixUse = 0; + if (EvalConstantValUint64(inst->word(6), &matrixUse)) { + return matrixUse == static_cast( + spv::CooperativeMatrixUse::MatrixAccumulatorKHR); + } + return false; } bool ValidationState_t::IsFloatCooperativeMatrixType(uint32_t id) const { - if (!IsCooperativeMatrixType(id)) return false; + if (!IsCooperativeMatrixNVType(id) && !IsCooperativeMatrixKHRType(id)) + return false; return IsFloatScalarType(FindDef(id)->word(2)); } bool ValidationState_t::IsIntCooperativeMatrixType(uint32_t id) const { - if (!IsCooperativeMatrixType(id)) return false; + if (!IsCooperativeMatrixNVType(id) && !IsCooperativeMatrixKHRType(id)) + return false; return IsIntScalarType(FindDef(id)->word(2)); } bool ValidationState_t::IsUnsignedIntCooperativeMatrixType(uint32_t id) const { - if (!IsCooperativeMatrixType(id)) return false; + if (!IsCooperativeMatrixNVType(id) && !IsCooperativeMatrixKHRType(id)) + return false; return IsUnsignedIntScalarType(FindDef(id)->word(2)); } +// Either a 32 bit 2-component uint vector or a 64 bit uint scalar +bool ValidationState_t::IsUnsigned64BitHandle(uint32_t id) const { + return ((IsUnsignedIntScalarType(id) && GetBitWidth(id) == 64) || + (IsUnsignedIntVectorType(id) && GetDimension(id) == 2 && + GetBitWidth(id) == 32)); +} + spv_result_t ValidationState_t::CooperativeMatrixShapesMatch( const Instruction* inst, uint32_t m1, uint32_t m2) { const auto m1_type = FindDef(m1); const auto m2_type = FindDef(m2); - if (m1_type->opcode() != SpvOpTypeCooperativeMatrixNV || - m2_type->opcode() != SpvOpTypeCooperativeMatrixNV) { + if (m1_type->opcode() != m2_type->opcode()) { return diag(SPV_ERROR_INVALID_DATA, inst) << "Expected cooperative matrix types"; } @@ -1044,6 +1318,21 @@ spv_result_t ValidationState_t::CooperativeMatrixShapesMatch( << "identical"; } + if (m1_type->opcode() == spv::Op::OpTypeCooperativeMatrixKHR) { + uint32_t m1_use_id = m1_type->GetOperandAs(5); + uint32_t m2_use_id = m2_type->GetOperandAs(5); + std::tie(m1_is_int32, m1_is_const_int32, m1_value) = + EvalInt32IfConst(m1_use_id); + std::tie(m2_is_int32, m2_is_const_int32, m2_value) = + EvalInt32IfConst(m2_use_id); + + if (m1_is_const_int32 && m2_is_const_int32 && m1_value != m2_value) { + return diag(SPV_ERROR_INVALID_DATA, inst) + << "Expected Use of Matrix type and Result Type to be " + << "identical"; + } + } + return SPV_SUCCESS; } @@ -1052,19 +1341,23 @@ uint32_t ValidationState_t::GetOperandTypeId(const Instruction* inst, return GetTypeId(inst->GetOperandAs(operand_index)); } -bool ValidationState_t::GetConstantValUint64(uint32_t id, uint64_t* val) const { +bool ValidationState_t::EvalConstantValUint64(uint32_t id, + uint64_t* val) const { const Instruction* inst = FindDef(id); if (!inst) { assert(0 && "Instruction not found"); return false; } - if (inst->opcode() != SpvOpConstant && inst->opcode() != SpvOpSpecConstant) - return false; - if (!IsIntScalarType(inst->type_id())) return false; - if (inst->words().size() == 4) { + if (inst->opcode() == spv::Op::OpConstantNull) { + *val = 0; + } else if (inst->opcode() != spv::Op::OpConstant) { + // Spec constant values cannot be evaluated so don't consider constant for + // static validation + return false; + } else if (inst->words().size() == 4) { *val = inst->word(3); } else { assert(inst->words().size() == 5); @@ -1074,6 +1367,32 @@ bool ValidationState_t::GetConstantValUint64(uint32_t id, uint64_t* val) const { return true; } +bool ValidationState_t::EvalConstantValInt64(uint32_t id, int64_t* val) const { + const Instruction* inst = FindDef(id); + if (!inst) { + assert(0 && "Instruction not found"); + return false; + } + + if (!IsIntScalarType(inst->type_id())) return false; + + if (inst->opcode() == spv::Op::OpConstantNull) { + *val = 0; + } else if (inst->opcode() != spv::Op::OpConstant) { + // Spec constant values cannot be evaluated so don't consider constant for + // static validation + return false; + } else if (inst->words().size() == 4) { + *val = int32_t(inst->word(3)); + } else { + assert(inst->words().size() == 5); + const uint32_t lo_word = inst->word(3); + const uint32_t hi_word = inst->word(4); + *val = static_cast(uint64_t(lo_word) | uint64_t(hi_word) << 32); + } + return true; +} + std::tuple ValidationState_t::EvalInt32IfConst( uint32_t id) const { const Instruction* const inst = FindDef(id); @@ -1091,7 +1410,7 @@ std::tuple ValidationState_t::EvalInt32IfConst( return std::make_tuple(true, false, 0); } - if (inst->opcode() == SpvOpConstantNull) { + if (inst->opcode() == spv::Op::OpConstantNull) { return std::make_tuple(true, true, 0); } @@ -1225,7 +1544,7 @@ bool ValidationState_t::LogicallyMatch(const Instruction* lhs, } } - if (lhs->opcode() == SpvOpTypeArray) { + if (lhs->opcode() == spv::Op::OpTypeArray) { // Size operands must match. if (lhs->GetOperandAs(2u) != rhs->GetOperandAs(2u)) { return false; @@ -1244,7 +1563,7 @@ bool ValidationState_t::LogicallyMatch(const Instruction* lhs, return false; } return LogicallyMatch(lhs_ele, rhs_ele, check_decorations); - } else if (lhs->opcode() == SpvOpTypeStruct) { + } else if (lhs->opcode() == spv::Op::OpTypeStruct) { // Number of elements must match. if (lhs->operands().size() != rhs->operands().size()) { return false; @@ -1282,11 +1601,11 @@ bool ValidationState_t::LogicallyMatch(const Instruction* lhs, const Instruction* ValidationState_t::TracePointer( const Instruction* inst) const { auto base_ptr = inst; - while (base_ptr->opcode() == SpvOpAccessChain || - base_ptr->opcode() == SpvOpInBoundsAccessChain || - base_ptr->opcode() == SpvOpPtrAccessChain || - base_ptr->opcode() == SpvOpInBoundsPtrAccessChain || - base_ptr->opcode() == SpvOpCopyObject) { + while (base_ptr->opcode() == spv::Op::OpAccessChain || + base_ptr->opcode() == spv::Op::OpInBoundsAccessChain || + base_ptr->opcode() == spv::Op::OpPtrAccessChain || + base_ptr->opcode() == spv::Op::OpInBoundsPtrAccessChain || + base_ptr->opcode() == spv::Op::OpCopyObject) { base_ptr = FindDef(base_ptr->GetOperandAs(2u)); } return base_ptr; @@ -1301,25 +1620,26 @@ bool ValidationState_t::ContainsType( if (f(inst)) return true; switch (inst->opcode()) { - case SpvOpTypeArray: - case SpvOpTypeRuntimeArray: - case SpvOpTypeVector: - case SpvOpTypeMatrix: - case SpvOpTypeImage: - case SpvOpTypeSampledImage: - case SpvOpTypeCooperativeMatrixNV: + case spv::Op::OpTypeArray: + case spv::Op::OpTypeRuntimeArray: + case spv::Op::OpTypeVector: + case spv::Op::OpTypeMatrix: + case spv::Op::OpTypeImage: + case spv::Op::OpTypeSampledImage: + case spv::Op::OpTypeCooperativeMatrixNV: + case spv::Op::OpTypeCooperativeMatrixKHR: return ContainsType(inst->GetOperandAs(1u), f, traverse_all_types); - case SpvOpTypePointer: + case spv::Op::OpTypePointer: if (IsForwardPointer(id)) return false; if (traverse_all_types) { return ContainsType(inst->GetOperandAs(2u), f, traverse_all_types); } break; - case SpvOpTypeFunction: - case SpvOpTypeStruct: - if (inst->opcode() == SpvOpTypeFunction && !traverse_all_types) { + case spv::Op::OpTypeFunction: + case spv::Op::OpTypeStruct: + if (inst->opcode() == spv::Op::OpTypeFunction && !traverse_all_types) { return false; } for (uint32_t i = 1; i < inst->operands().size(); ++i) { @@ -1336,9 +1656,9 @@ bool ValidationState_t::ContainsType( return false; } -bool ValidationState_t::ContainsSizedIntOrFloatType(uint32_t id, SpvOp type, +bool ValidationState_t::ContainsSizedIntOrFloatType(uint32_t id, spv::Op type, uint32_t width) const { - if (type != SpvOpTypeInt && type != SpvOpTypeFloat) return false; + if (type != spv::Op::OpTypeInt && type != spv::Op::OpTypeFloat) return false; const auto f = [type, width](const Instruction* inst) { if (inst->opcode() == type) { @@ -1350,12 +1670,12 @@ bool ValidationState_t::ContainsSizedIntOrFloatType(uint32_t id, SpvOp type, } bool ValidationState_t::ContainsLimitedUseIntOrFloatType(uint32_t id) const { - if ((!HasCapability(SpvCapabilityInt16) && - ContainsSizedIntOrFloatType(id, SpvOpTypeInt, 16)) || - (!HasCapability(SpvCapabilityInt8) && - ContainsSizedIntOrFloatType(id, SpvOpTypeInt, 8)) || - (!HasCapability(SpvCapabilityFloat16) && - ContainsSizedIntOrFloatType(id, SpvOpTypeFloat, 16))) { + if ((!HasCapability(spv::Capability::Int16) && + ContainsSizedIntOrFloatType(id, spv::Op::OpTypeInt, 16)) || + (!HasCapability(spv::Capability::Int8) && + ContainsSizedIntOrFloatType(id, spv::Op::OpTypeInt, 8)) || + (!HasCapability(spv::Capability::Float16) && + ContainsSizedIntOrFloatType(id, spv::Op::OpTypeFloat, 16))) { return true; } return false; @@ -1363,32 +1683,35 @@ bool ValidationState_t::ContainsLimitedUseIntOrFloatType(uint32_t id) const { bool ValidationState_t::ContainsRuntimeArray(uint32_t id) const { const auto f = [](const Instruction* inst) { - return inst->opcode() == SpvOpTypeRuntimeArray; + return inst->opcode() == spv::Op::OpTypeRuntimeArray; }; return ContainsType(id, f, /* traverse_all_types = */ false); } bool ValidationState_t::IsValidStorageClass( - SpvStorageClass storage_class) const { + spv::StorageClass storage_class) const { if (spvIsVulkanEnv(context()->target_env)) { switch (storage_class) { - case SpvStorageClassUniformConstant: - case SpvStorageClassUniform: - case SpvStorageClassStorageBuffer: - case SpvStorageClassInput: - case SpvStorageClassOutput: - case SpvStorageClassImage: - case SpvStorageClassWorkgroup: - case SpvStorageClassPrivate: - case SpvStorageClassFunction: - case SpvStorageClassPushConstant: - case SpvStorageClassPhysicalStorageBuffer: - case SpvStorageClassRayPayloadKHR: - case SpvStorageClassIncomingRayPayloadKHR: - case SpvStorageClassHitAttributeKHR: - case SpvStorageClassCallableDataKHR: - case SpvStorageClassIncomingCallableDataKHR: - case SpvStorageClassShaderRecordBufferKHR: + case spv::StorageClass::UniformConstant: + case spv::StorageClass::Uniform: + case spv::StorageClass::StorageBuffer: + case spv::StorageClass::Input: + case spv::StorageClass::Output: + case spv::StorageClass::Image: + case spv::StorageClass::Workgroup: + case spv::StorageClass::Private: + case spv::StorageClass::Function: + case spv::StorageClass::PushConstant: + case spv::StorageClass::PhysicalStorageBuffer: + case spv::StorageClass::RayPayloadKHR: + case spv::StorageClass::IncomingRayPayloadKHR: + case spv::StorageClass::HitAttributeKHR: + case spv::StorageClass::CallableDataKHR: + case spv::StorageClass::IncomingCallableDataKHR: + case spv::StorageClass::ShaderRecordBufferKHR: + case spv::StorageClass::TaskPayloadWorkgroupEXT: + case spv::StorageClass::HitObjectAttributeNV: + case spv::StorageClass::TileImageEXT: return true; default: return false; @@ -1407,13 +1730,25 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return ""; } - // This large switch case is only searched when an error has occured. + // This large switch case is only searched when an error has occurred. // If an id is changed, the old case must be modified or removed. Each string // here is interpreted as being "implemented" // Clang format adds spaces between hyphens // clang-format off switch (id) { + case 4154: + return VUID_WRAP(VUID-BaryCoordKHR-BaryCoordKHR-04154); + case 4155: + return VUID_WRAP(VUID-BaryCoordKHR-BaryCoordKHR-04155); + case 4156: + return VUID_WRAP(VUID-BaryCoordKHR-BaryCoordKHR-04156); + case 4160: + return VUID_WRAP(VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04160); + case 4161: + return VUID_WRAP(VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04161); + case 4162: + return VUID_WRAP(VUID-BaryCoordNoPerspKHR-BaryCoordNoPerspKHR-04162); case 4181: return VUID_WRAP(VUID-BaseInstance-BaseInstance-04181); case 4182: @@ -1446,6 +1781,12 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-CullDistance-CullDistance-04199); case 4200: return VUID_WRAP(VUID-CullDistance-CullDistance-04200); + case 6735: + return VUID_WRAP(VUID-CullMaskKHR-CullMaskKHR-06735); // Execution Model + case 6736: + return VUID_WRAP(VUID-CullMaskKHR-CullMaskKHR-06736); // input storage + case 6737: + return VUID_WRAP(VUID-CullMaskKHR-CullMaskKHR-06737); // 32 int scalar case 4205: return VUID_WRAP(VUID-DeviceIndex-DeviceIndex-04205); case 4206: @@ -1814,8 +2155,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-None-04637); case 4638: return VUID_WRAP(VUID-StandaloneSpirv-None-04638); - case 4639: - return VUID_WRAP(VUID-StandaloneSpirv-None-04639); + case 7321: + return VUID_WRAP(VUID-StandaloneSpirv-None-07321); case 4640: return VUID_WRAP(VUID-StandaloneSpirv-None-04640); case 4641: @@ -1828,6 +2169,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-None-04644); case 4645: return VUID_WRAP(VUID-StandaloneSpirv-None-04645); + case 4650: + return VUID_WRAP(VUID-StandaloneSpirv-OpControlBarrier-04650); case 4651: return VUID_WRAP(VUID-StandaloneSpirv-OpVariable-04651); case 4652: @@ -1846,8 +2189,6 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-OpImageTexelPointer-04658); case 4659: return VUID_WRAP(VUID-StandaloneSpirv-OpImageQuerySizeLod-04659); - case 4662: - return VUID_WRAP(VUID-StandaloneSpirv-Offset-04662); case 4663: return VUID_WRAP(VUID-StandaloneSpirv-Offset-04663); case 4664: @@ -1862,6 +2203,8 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-FPRoundingMode-04675); case 4677: return VUID_WRAP(VUID-StandaloneSpirv-Invariant-04677); + case 4680: + return VUID_WRAP(VUID-StandaloneSpirv-OpTypeRuntimeArray-04680); case 4682: return VUID_WRAP(VUID-StandaloneSpirv-OpControlBarrier-04682); case 6426: @@ -1870,6 +2213,28 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-OpGroupNonUniformBallotBitCount-04685); case 4686: return VUID_WRAP(VUID-StandaloneSpirv-None-04686); + case 4698: + return VUID_WRAP(VUID-StandaloneSpirv-RayPayloadKHR-04698); + case 4699: + return VUID_WRAP(VUID-StandaloneSpirv-IncomingRayPayloadKHR-04699); + case 4700: + return VUID_WRAP(VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700); + case 4701: + return VUID_WRAP(VUID-StandaloneSpirv-HitAttributeKHR-04701); + case 4702: + return VUID_WRAP(VUID-StandaloneSpirv-HitAttributeKHR-04702); + case 4703: + return VUID_WRAP(VUID-StandaloneSpirv-HitAttributeKHR-04703); + case 4704: + return VUID_WRAP(VUID-StandaloneSpirv-CallableDataKHR-04704); + case 4705: + return VUID_WRAP(VUID-StandaloneSpirv-IncomingCallableDataKHR-04705); + case 4706: + return VUID_WRAP(VUID-StandaloneSpirv-IncomingCallableDataKHR-04706); + case 7119: + return VUID_WRAP(VUID-StandaloneSpirv-ShaderRecordBufferKHR-07119); + case 4708: + return VUID_WRAP(VUID-StandaloneSpirv-PhysicalStorageBuffer64-04708); case 4710: return VUID_WRAP(VUID-StandaloneSpirv-PhysicalStorageBuffer64-04710); case 4711: @@ -1882,8 +2247,16 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-OpMemoryBarrier-04732); case 4733: return VUID_WRAP(VUID-StandaloneSpirv-OpMemoryBarrier-04733); + case 4734: + return VUID_WRAP(VUID-StandaloneSpirv-OpVariable-04734); + case 4744: + return VUID_WRAP(VUID-StandaloneSpirv-Flat-04744); + case 4777: + return VUID_WRAP(VUID-StandaloneSpirv-OpImage-04777); case 4780: return VUID_WRAP(VUID-StandaloneSpirv-Result-04780); + case 4781: + return VUID_WRAP(VUID-StandaloneSpirv-Base-04781); case 4915: return VUID_WRAP(VUID-StandaloneSpirv-Location-04915); case 4916: @@ -1894,6 +2267,92 @@ std::string ValidationState_t::VkErrorID(uint32_t id, return VUID_WRAP(VUID-StandaloneSpirv-Location-04918); case 4919: return VUID_WRAP(VUID-StandaloneSpirv-Location-04919); + case 4920: + return VUID_WRAP(VUID-StandaloneSpirv-Component-04920); + case 4921: + return VUID_WRAP(VUID-StandaloneSpirv-Component-04921); + case 4922: + return VUID_WRAP(VUID-StandaloneSpirv-Component-04922); + case 4923: + return VUID_WRAP(VUID-StandaloneSpirv-Component-04923); + case 4924: + return VUID_WRAP(VUID-StandaloneSpirv-Component-04924); + case 6201: + return VUID_WRAP(VUID-StandaloneSpirv-Flat-06201); + case 6202: + return VUID_WRAP(VUID-StandaloneSpirv-Flat-06202); + case 6214: + return VUID_WRAP(VUID-StandaloneSpirv-OpTypeImage-06214); + case 6491: + return VUID_WRAP(VUID-StandaloneSpirv-DescriptorSet-06491); + case 6671: + return VUID_WRAP(VUID-StandaloneSpirv-OpTypeSampledImage-06671); + case 6672: + return VUID_WRAP(VUID-StandaloneSpirv-Location-06672); + case 6673: + return VUID_WRAP(VUID-StandaloneSpirv-OpVariable-06673); + case 6674: + return VUID_WRAP(VUID-StandaloneSpirv-OpEntryPoint-06674); + case 6675: + return VUID_WRAP(VUID-StandaloneSpirv-PushConstant-06675); + case 6676: + return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06676); + case 6677: + return VUID_WRAP(VUID-StandaloneSpirv-UniformConstant-06677); + case 6678: + return VUID_WRAP(VUID-StandaloneSpirv-InputAttachmentIndex-06678); + case 6777: + return VUID_WRAP(VUID-StandaloneSpirv-PerVertexKHR-06777); + case 6778: + return VUID_WRAP(VUID-StandaloneSpirv-Input-06778); + case 6807: + return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06807); + case 6808: + return VUID_WRAP(VUID-StandaloneSpirv-PushConstant-06808); + case 6925: + return VUID_WRAP(VUID-StandaloneSpirv-Uniform-06925); + case 7041: + return VUID_WRAP(VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07041); + case 7043: + return VUID_WRAP(VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07043); + case 7044: + return VUID_WRAP(VUID-PrimitivePointIndicesEXT-PrimitivePointIndicesEXT-07044); + case 7047: + return VUID_WRAP(VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07047); + case 7049: + return VUID_WRAP(VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07049); + case 7050: + return VUID_WRAP(VUID-PrimitiveLineIndicesEXT-PrimitiveLineIndicesEXT-07050); + case 7053: + return VUID_WRAP(VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07053); + case 7055: + return VUID_WRAP(VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07055); + case 7056: + return VUID_WRAP(VUID-PrimitiveTriangleIndicesEXT-PrimitiveTriangleIndicesEXT-07056); + case 7102: + return VUID_WRAP(VUID-StandaloneSpirv-MeshEXT-07102); + case 7320: + return VUID_WRAP(VUID-StandaloneSpirv-ExecutionModel-07320); + case 7290: + return VUID_WRAP(VUID-StandaloneSpirv-Input-07290); + case 7650: + return VUID_WRAP(VUID-StandaloneSpirv-Base-07650); + case 7651: + return VUID_WRAP(VUID-StandaloneSpirv-Base-07651); + case 7652: + return VUID_WRAP(VUID-StandaloneSpirv-Base-07652); + case 7703: + return VUID_WRAP(VUID-StandaloneSpirv-Component-07703); + case 7951: + return VUID_WRAP(VUID-StandaloneSpirv-SubgroupVoteKHR-07951); + case 8721: + return VUID_WRAP(VUID-StandaloneSpirv-OpEntryPoint-08721); + case 8722: + return VUID_WRAP(VUID-StandaloneSpirv-OpEntryPoint-08722); + case 8973: + return VUID_WRAP(VUID-StandaloneSpirv-Pointer-08973); + case 9638: + return VUID_WRAP(VUID-StandaloneSpirv-OpTypeImage-09638); default: return ""; // unknown id } diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.h b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.h index 2ddfa4a93..27acdcc2f 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.h +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/source/val/validation_state.h @@ -44,19 +44,20 @@ namespace val { /// of the SPIRV spec for additional details of the order. The enumerant values /// are in the same order as the vector returned by GetModuleOrder enum ModuleLayoutSection { - kLayoutCapabilities, /// < Section 2.4 #1 - kLayoutExtensions, /// < Section 2.4 #2 - kLayoutExtInstImport, /// < Section 2.4 #3 - kLayoutMemoryModel, /// < Section 2.4 #4 - kLayoutEntryPoint, /// < Section 2.4 #5 - kLayoutExecutionMode, /// < Section 2.4 #6 - kLayoutDebug1, /// < Section 2.4 #7 > 1 - kLayoutDebug2, /// < Section 2.4 #7 > 2 - kLayoutDebug3, /// < Section 2.4 #7 > 3 - kLayoutAnnotations, /// < Section 2.4 #8 - kLayoutTypes, /// < Section 2.4 #9 - kLayoutFunctionDeclarations, /// < Section 2.4 #10 - kLayoutFunctionDefinitions /// < Section 2.4 #11 + kLayoutCapabilities, /// < Section 2.4 #1 + kLayoutExtensions, /// < Section 2.4 #2 + kLayoutExtInstImport, /// < Section 2.4 #3 + kLayoutMemoryModel, /// < Section 2.4 #4 + kLayoutSamplerImageAddressMode, /// < Section 2.4 #5 + kLayoutEntryPoint, /// < Section 2.4 #6 + kLayoutExecutionMode, /// < Section 2.4 #7 + kLayoutDebug1, /// < Section 2.4 #8 > 1 + kLayoutDebug2, /// < Section 2.4 #8 > 2 + kLayoutDebug3, /// < Section 2.4 #8 > 3 + kLayoutAnnotations, /// < Section 2.4 #9 + kLayoutTypes, /// < Section 2.4 #10 + kLayoutFunctionDeclarations, /// < Section 2.4 #11 + kLayoutFunctionDefinitions /// < Section 2.4 #12 }; /// This class manages the state of the SPIR-V validation as it is being parsed. @@ -67,14 +68,12 @@ class ValidationState_t { bool declare_int16_type = false; // Allow OpTypeInt with 16 bit width? bool declare_float16_type = false; // Allow OpTypeFloat with 16 bit width? bool free_fp_rounding_mode = false; // Allow the FPRoundingMode decoration - // and its vaules to be used without + // and its values to be used without // requiring any capability - // Allow functionalities enabled by VariablePointers capability. + // Allow functionalities enabled by VariablePointers or + // VariablePointersStorageBuffer capability. bool variable_pointers = false; - // Allow functionalities enabled by VariablePointersStorageBuffer - // capability. - bool variable_pointers_storage_buffer = false; // Permit group oerations Reduce, InclusiveScan, ExclusiveScan bool group_ops_reduce_and_scans = false; @@ -186,10 +185,10 @@ class ValidationState_t { void ProgressToNextLayoutSectionOrder(); /// Determines if the op instruction is in a previous layout section - bool IsOpcodeInPreviousLayoutSection(SpvOp op); + bool IsOpcodeInPreviousLayoutSection(spv::Op op); /// Determines if the op instruction is part of the current section - bool IsOpcodeInCurrentLayoutSection(SpvOp op); + bool IsOpcodeInCurrentLayoutSection(spv::Op op); DiagnosticStream diag(spv_result_t error_code, const Instruction* inst); @@ -218,7 +217,8 @@ class ValidationState_t { }; /// Registers |id| as an entry point with |execution_model| and |interfaces|. - void RegisterEntryPoint(const uint32_t id, SpvExecutionModel execution_model, + void RegisterEntryPoint(const uint32_t id, + spv::ExecutionModel execution_model, EntryPointDescription&& desc) { entry_points_.push_back(id); entry_point_to_execution_models_[id].insert(execution_model); @@ -236,7 +236,7 @@ class ValidationState_t { /// Registers execution mode for the given entry point. void RegisterExecutionModeForEntryPoint(uint32_t entry_point, - SpvExecutionMode execution_mode) { + spv::ExecutionMode execution_mode) { entry_point_to_execution_modes_[entry_point].insert(execution_mode); } @@ -248,7 +248,7 @@ class ValidationState_t { /// Returns Execution Models for the given Entry Point. /// Returns nullptr if none found (would trigger assertion). - const std::set* GetExecutionModels( + const std::set* GetExecutionModels( uint32_t entry_point) const { const auto it = entry_point_to_execution_models_.find(entry_point); if (it == entry_point_to_execution_models_.end()) { @@ -260,7 +260,7 @@ class ValidationState_t { /// Returns Execution Modes for the given Entry Point. /// Returns nullptr if none found. - const std::set* GetExecutionModes( + const std::set* GetExecutionModes( uint32_t entry_point) const { const auto it = entry_point_to_execution_modes_.find(entry_point); if (it == entry_point_to_execution_modes_.end()) { @@ -301,7 +301,7 @@ class ValidationState_t { return (id_to_function_.find(id) != id_to_function_.end()); } /// Registers the capability and its dependent capabilities - void RegisterCapability(SpvCapability cap); + void RegisterCapability(spv::Capability cap); /// Registers the extension. void RegisterExtension(Extension ext); @@ -309,15 +309,15 @@ class ValidationState_t { /// Registers the function in the module. Subsequent instructions will be /// called against this function spv_result_t RegisterFunction(uint32_t id, uint32_t ret_type_id, - SpvFunctionControlMask function_control, + spv::FunctionControlMask function_control, uint32_t function_type_id); /// Register a function end instruction spv_result_t RegisterFunctionEnd(); /// Returns true if the capability is enabled in the module. - bool HasCapability(SpvCapability cap) const { - return module_capabilities_.Contains(cap); + bool HasCapability(spv::Capability cap) const { + return module_capabilities_.contains(cap); } /// Returns a reference to the set of capabilities in the module. @@ -328,7 +328,7 @@ class ValidationState_t { /// Returns true if the extension is enabled in the module. bool HasExtension(Extension ext) const { - return module_extensions_.Contains(ext); + return module_extensions_.contains(ext); } /// Returns true if any of the capabilities is enabled, or if |capabilities| @@ -340,16 +340,16 @@ class ValidationState_t { bool HasAnyOfExtensions(const ExtensionSet& extensions) const; /// Sets the addressing model of this module (logical/physical). - void set_addressing_model(SpvAddressingModel am); + void set_addressing_model(spv::AddressingModel am); /// Returns true if the OpMemoryModel was found. bool has_memory_model_specified() const { - return addressing_model_ != SpvAddressingModelMax && - memory_model_ != SpvMemoryModelMax; + return addressing_model_ != spv::AddressingModel::Max && + memory_model_ != spv::MemoryModel::Max; } /// Returns the addressing model of this module, or Logical if uninitialized. - SpvAddressingModel addressing_model() const; + spv::AddressingModel addressing_model() const; /// Returns the addressing model of this module, or Logical if uninitialized. uint32_t pointer_size_and_alignment() const { @@ -357,10 +357,24 @@ class ValidationState_t { } /// Sets the memory model of this module. - void set_memory_model(SpvMemoryModel mm); + void set_memory_model(spv::MemoryModel mm); /// Returns the memory model of this module, or Simple if uninitialized. - SpvMemoryModel memory_model() const; + spv::MemoryModel memory_model() const; + + /// Sets the bit width for sampler/image type variables. If not set, they are + /// considered opaque + void set_samplerimage_variable_address_mode(uint32_t bit_width); + + /// Get the addressing mode currently set. If 0, it means addressing mode is + /// invalid Sampler/Image type variables must be considered opaque This mode + /// is only valid after the instruction has been read + uint32_t samplerimage_variable_address_mode() const; + + /// Returns true if the OpSamplerImageAddressingModeNV was found. + bool has_samplerimage_variable_address_mode_specified() const { + return sampler_image_addressing_mode_ != 0; + } const AssemblyGrammar& grammar() const { return grammar_; } @@ -377,17 +391,14 @@ class ValidationState_t { /// Registers the decoration for the given void RegisterDecorationForId(uint32_t id, const Decoration& dec) { auto& dec_list = id_decorations_[id]; - auto lb = std::find(dec_list.begin(), dec_list.end(), dec); - if (lb == dec_list.end()) { - dec_list.push_back(dec); - } + dec_list.insert(dec); } /// Registers the list of decorations for the given template void RegisterDecorationsForId(uint32_t id, InputIt begin, InputIt end) { - std::vector& cur_decs = id_decorations_[id]; - cur_decs.insert(cur_decs.end(), begin, end); + std::set& cur_decs = id_decorations_[id]; + cur_decs.insert(begin, end); } /// Registers the list of decorations for the given member of the given @@ -396,27 +407,50 @@ class ValidationState_t { void RegisterDecorationsForStructMember(uint32_t struct_id, uint32_t member_index, InputIt begin, InputIt end) { - RegisterDecorationsForId(struct_id, begin, end); - for (auto& decoration : id_decorations_[struct_id]) { - decoration.set_struct_member_index(member_index); + std::set& cur_decs = id_decorations_[struct_id]; + for (InputIt iter = begin; iter != end; ++iter) { + Decoration dec = *iter; + dec.set_struct_member_index(member_index); + cur_decs.insert(dec); } } /// Returns all the decorations for the given . If no decorations exist - /// for the , it registers an empty vector for it in the map and - /// returns the empty vector. - std::vector& id_decorations(uint32_t id) { + /// for the , it registers an empty set for it in the map and + /// returns the empty set. + std::set& id_decorations(uint32_t id) { return id_decorations_[id]; } + /// Returns the range of decorations for the given field of the given . + struct FieldDecorationsIter { + std::set::const_iterator begin; + std::set::const_iterator end; + }; + FieldDecorationsIter id_member_decorations(uint32_t id, + uint32_t member_index) { + const auto& decorations = id_decorations_[id]; + + // The decorations are sorted by member_index, so this look up will give the + // exact range of decorations for this member index. + Decoration min_decoration((spv::Decoration)0, {}, member_index); + Decoration max_decoration(spv::Decoration::Max, {}, member_index); + + FieldDecorationsIter result; + result.begin = decorations.lower_bound(min_decoration); + result.end = decorations.upper_bound(max_decoration); + + return result; + } + // Returns const pointer to the internal decoration container. - const std::map>& id_decorations() const { + const std::map>& id_decorations() const { return id_decorations_; } /// Returns true if the given id has the given decoration , /// otherwise returns false. - bool HasDecoration(uint32_t id, SpvDecoration dec) { + bool HasDecoration(uint32_t id, spv::Decoration dec) { const auto& decorations = id_decorations_.find(id); if (decorations == id_decorations_.end()) return false; @@ -451,8 +485,15 @@ class ValidationState_t { void RegisterSampledImageConsumer(uint32_t sampled_image_id, Instruction* consumer); + // Record a cons_id as a consumer of texture_id + // if texture 'texture_id' has a QCOM image processing decoration + // and consumer is a load or a sampled image instruction + void RegisterQCOMImageProcessingTextureConsumer(uint32_t texture_id, + const Instruction* consumer0, + const Instruction* consumer1); + // Record a function's storage class consumer instruction - void RegisterStorageClassConsumer(SpvStorageClass storage_class, + void RegisterStorageClassConsumer(spv::StorageClass storage_class, Instruction* consumer); /// Returns the set of Global Variables. @@ -561,6 +602,7 @@ class ValidationState_t { bool IsVoidType(uint32_t id) const; bool IsFloatScalarType(uint32_t id) const; bool IsFloatVectorType(uint32_t id) const; + bool IsFloat16Vector2Or4Type(uint32_t id) const; bool IsFloatScalarOrVectorType(uint32_t id) const; bool IsFloatMatrixType(uint32_t id) const; bool IsIntScalarType(uint32_t id) const; @@ -568,20 +610,28 @@ class ValidationState_t { bool IsIntScalarOrVectorType(uint32_t id) const; bool IsUnsignedIntScalarType(uint32_t id) const; bool IsUnsignedIntVectorType(uint32_t id) const; + bool IsUnsignedIntScalarOrVectorType(uint32_t id) const; bool IsSignedIntScalarType(uint32_t id) const; bool IsSignedIntVectorType(uint32_t id) const; bool IsBoolScalarType(uint32_t id) const; bool IsBoolVectorType(uint32_t id) const; bool IsBoolScalarOrVectorType(uint32_t id) const; bool IsPointerType(uint32_t id) const; + bool IsAccelerationStructureType(uint32_t id) const; bool IsCooperativeMatrixType(uint32_t id) const; + bool IsCooperativeMatrixNVType(uint32_t id) const; + bool IsCooperativeMatrixKHRType(uint32_t id) const; + bool IsCooperativeMatrixAType(uint32_t id) const; + bool IsCooperativeMatrixBType(uint32_t id) const; + bool IsCooperativeMatrixAccType(uint32_t id) const; bool IsFloatCooperativeMatrixType(uint32_t id) const; bool IsIntCooperativeMatrixType(uint32_t id) const; bool IsUnsignedIntCooperativeMatrixType(uint32_t id) const; + bool IsUnsigned64BitHandle(uint32_t id) const; // Returns true if |id| is a type id that contains |type| (or integer or // floating point type) of |width| bits. - bool ContainsSizedIntOrFloatType(uint32_t id, SpvOp type, + bool ContainsSizedIntOrFloatType(uint32_t id, spv::Op type, uint32_t width) const; // Returns true if |id| is a type id that contains a 8- or 16-bit int or // 16-bit float that is not generally enabled for use. @@ -598,16 +648,12 @@ class ValidationState_t { const std::function& f, bool traverse_all_types = true) const; - // Gets value from OpConstant and OpSpecConstant as uint64. - // Returns false on failure (no instruction, wrong instruction, not int). - bool GetConstantValUint64(uint32_t id, uint64_t* val) const; - // Returns type_id if id has type or zero otherwise. uint32_t GetTypeId(uint32_t id) const; // Returns opcode of the instruction which issued the id or OpNop if the // instruction is not registered. - SpvOp GetIdOpcode(uint32_t id) const; + spv::Op GetIdOpcode(uint32_t id) const; // Returns type_id for given id operand if it has a type or zero otherwise. // |operand_index| is expected to be pointing towards an operand which is an @@ -617,7 +663,7 @@ class ValidationState_t { // Provides information on pointer type. Returns false iff not pointer type. bool GetPointerTypeInfo(uint32_t id, uint32_t* data_type, - uint32_t* storage_class) const; + spv::StorageClass* storage_class) const; // Is the ID the type of a pointer to a uniform block: Block-decorated struct // in uniform storage class? The result is only valid after internal method @@ -676,6 +722,14 @@ class ValidationState_t { pointer_to_storage_image_.insert(type_id); } + // Tries to evaluate a any scalar integer OpConstant as uint64. + // OpConstantNull is defined as zero for scalar int (will return true) + // OpSpecConstant* return false since their values cannot be relied upon + // during validation. + bool EvalConstantValUint64(uint32_t id, uint64_t* val) const; + // Same as EvalConstantValUint64 but returns a signed int + bool EvalConstantValInt64(uint32_t id, int64_t* val) const; + // Tries to evaluate a 32-bit signed or unsigned scalar integer constant. // Returns tuple . // OpSpecConstant* return |is_const_int32| as false since their values cannot @@ -688,6 +742,19 @@ class ValidationState_t { // Returns the disassembly string for the given instruction. std::string Disassemble(const uint32_t* words, uint16_t num_words) const; + // Returns the string name for |decoration|. + std::string SpvDecorationString(uint32_t decoration) { + spv_operand_desc desc = nullptr; + if (grammar_.lookupOperand(SPV_OPERAND_TYPE_DECORATION, decoration, + &desc) != SPV_SUCCESS) { + return std::string("Unknown"); + } + return std::string(desc->name); + } + std::string SpvDecorationString(spv::Decoration decoration) { + return SpvDecorationString(uint32_t(decoration)); + } + // Returns whether type m1 and type m2 are cooperative matrices with // the same "shape" (matching scope, rows, cols). If any are specialization // constants, we assume they can match because we can't prove they don't. @@ -719,7 +786,7 @@ class ValidationState_t { const Instruction* TracePointer(const Instruction* inst) const; // Validates the storage class for the target environment. - bool IsValidStorageClass(SpvStorageClass storage_class) const; + bool IsValidStorageClass(spv::StorageClass storage_class) const; // Takes a Vulkan Valid Usage ID (VUID) as |id| and optional |reference| and // will return a non-empty string only if ID is known and targeting Vulkan. @@ -737,6 +804,13 @@ class ValidationState_t { current_layout_section_ = section; } + // Check if instruction 'id' is a consumer of a texture decorated + // with a QCOM image processing decoration + bool IsQCOMImageProcessingTextureConsumer(uint32_t id) { + return qcom_image_processing_consumers_.find(id) != + qcom_image_processing_consumers_.end(); + } + private: ValidationState_t(const ValidationState_t&); @@ -771,6 +845,10 @@ class ValidationState_t { std::unordered_map> sampled_image_consumers_; + /// Stores load instructions that load textures used + // in QCOM image processing functions + std::unordered_set qcom_image_processing_consumers_; + /// A map of operand IDs and their names defined by the OpName instruction std::unordered_map operand_names_; @@ -797,7 +875,7 @@ class ValidationState_t { /// IDs that are entry points, ie, arguments to OpEntryPoint. std::vector entry_points_; - /// Maps an entry point id to its desciptions. + /// Maps an entry point id to its descriptions. std::unordered_map> entry_point_descriptions_; @@ -828,7 +906,7 @@ class ValidationState_t { struct_has_nested_blockorbufferblock_struct_; /// Stores the list of decorations for a given - std::map> id_decorations_; + std::map> id_decorations_; /// Stores type declarations which need to be unique (i.e. non-aggregates), /// in the form [opcode, operand words], result_id is not stored. @@ -838,12 +916,15 @@ class ValidationState_t { AssemblyGrammar grammar_; - SpvAddressingModel addressing_model_; - SpvMemoryModel memory_model_; + spv::AddressingModel addressing_model_; + spv::MemoryModel memory_model_; // pointer size derived from addressing model. Assumes all storage classes // have the same pointer size (for physical pointer types). uint32_t pointer_size_and_alignment_; + /// bit width of sampler/image type variables. Valid values are 32 and 64 + uint32_t sampler_image_addressing_mode_; + /// NOTE: See correspoding getter functions bool in_function_; @@ -857,11 +938,11 @@ class ValidationState_t { /// Mapping entry point -> execution models. It is presumed that the same /// function could theoretically be used as 'main' by multiple OpEntryPoint /// instructions. - std::unordered_map> + std::unordered_map> entry_point_to_execution_models_; /// Mapping entry point -> execution modes. - std::unordered_map> + std::unordered_map> entry_point_to_execution_modes_; /// Mapping function -> array of entry points inside this diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/upstream_version.txt b/prog/3rdPartyLibs/vulkan/spirv-tools/upstream_version.txt index d4fe8cd0b..99acf695c 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/upstream_version.txt +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/upstream_version.txt @@ -1 +1 @@ -b1877de5cd776117050bd42f08d04b52bce16099 \ No newline at end of file +dd4b663e13c07fea4fbb3f70c1c91c86731099f7 diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_code_format.sh b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_code_format.sh index 799474022..da5e01985 100755 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_code_format.sh +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_code_format.sh @@ -18,7 +18,7 @@ # # This script assumes to be invoked at the project root directory. -BASE_BRANCH=${1:-master} +BASE_BRANCH=${1:-main} FILES_TO_CHECK=$(git diff --name-only ${BASE_BRANCH} | grep -E ".*\.(cpp|cc|c\+\+|cxx|c|h|hpp)$") diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_copyright.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_copyright.py index b6dc933ee..a849d0467 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_copyright.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_copyright.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # coding=utf-8 # Copyright (c) 2016 Google Inc. # @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. """Checks for copyright notices in all the files that need them under the + current directory. Optionally insert them. When inserting, replaces an MIT or Khronos free use license with Apache 2. """ @@ -40,12 +41,30 @@ 'Alastair F. Donaldson', 'Mostafa Ashraf', 'Shiyu Liu', - 'ZHOU He'] -CURRENT_YEAR='2021' - -YEARS = '(2014-2016|2015-2016|2015-2020|2016|2016-2017|2017|2017-2019|2018|2019|2020|2021|2022)' -COPYRIGHT_RE = re.compile( - 'Copyright \(c\) {} ({})'.format(YEARS, '|'.join(AUTHORS))) + 'ZHOU He', + 'Nintendo'] +CURRENT_YEAR = 2023 + +FIRST_YEAR = 2014 +FINAL_YEAR = CURRENT_YEAR + 5 +# A regular expression to match the valid years in the copyright information. +YEAR_REGEX = '(' + '|'.join( + str(year) for year in range(FIRST_YEAR, FINAL_YEAR + 1)) + ')' + +# A regular expression to make a range of years in the form -. +YEAR_RANGE_REGEX = '(' +for year1 in range(FIRST_YEAR, FINAL_YEAR + 1): + for year2 in range(year1 + 1, FINAL_YEAR + 1): + YEAR_RANGE_REGEX += str(year1) + '-' + str(year2) + '|' +YEAR_RANGE_REGEX = YEAR_RANGE_REGEX[:-1] + ')' + +# In the copyright info, the year can be a single year or a range. This is a +# regex to make sure it matches one of them. +YEAR_OR_RANGE_REGEX = '(' + YEAR_REGEX + '|' + YEAR_RANGE_REGEX + ')' + +# The final regular expression to match a valid copyright line. +COPYRIGHT_RE = re.compile('Copyright \(c\) {} ({})'.format( + YEAR_OR_RANGE_REGEX, '|'.join(AUTHORS))) MIT_BEGIN_RE = re.compile('Permission is hereby granted, ' 'free of charge, to any person obtaining a') diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_symbol_exports.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_symbol_exports.py index 7795d72bc..e44294fe8 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_symbol_exports.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/check_symbol_exports.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -67,7 +67,7 @@ def check_library(library): # by the protobuf compiler: # - AddDescriptors_spvtoolsfuzz_2eproto() # - InitDefaults_spvtoolsfuzz_2eproto() - symbol_allowlist_pattern = re.compile(r'_Z[0-9]+(InitDefaults|AddDescriptors)_spvtoolsfuzz_2eprotov') + symbol_allowlist_pattern = re.compile(r'_Z[0-9]+.*spvtoolsfuzz_2eproto.*') symbol_is_new_or_delete = re.compile(r'^(_Zna|_Znw|_Zdl|_Zda)') # Compilaion for Arm has various thunks for constructors, destructors, vtables. diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/fixup_fuzz_result.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/fixup_fuzz_result.py index 9fe54a3cc..5b14a7db9 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/fixup_fuzz_result.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/fixup_fuzz_result.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_grammar_tables.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_grammar_tables.py index 9ccf410b9..88534ffed 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_grammar_tables.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_grammar_tables.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,7 +23,7 @@ PYGEN_VARIABLE_PREFIX = 'pygen_variable' # Extensions to recognize, but which don't necessarily come from the SPIR-V -# core or KHR grammar files. Get this list from the SPIR-V registery web page. +# core or KHR grammar files. Get this list from the SPIR-V registry web page. # NOTE: Only put things on this list if it is not in those grammar files. EXTENSIONS_FROM_SPIRV_REGISTRY_AND_NOT_FROM_GRAMMARS = """ SPV_AMD_gcn_shader @@ -33,6 +33,7 @@ SPV_KHR_non_semantic_info """ +OUTPUT_LANGUAGE = 'c' def make_path_to_file(f): """Makes all ancestor directories to the given file, if they don't yet @@ -76,9 +77,14 @@ def compose_capability_list(caps): - caps: a sequence of capability names Returns: - a string containing the braced list of SpvCapability* enums named by caps. + a string containing the braced list of SpvCapability* or spv::Capability:: enums named by caps. """ - return '{' + ', '.join(['SpvCapability{}'.format(c) for c in caps]) + '}' + base_string = 'SpvCapability' + global OUTPUT_LANGUAGE + if OUTPUT_LANGUAGE == 'c++': + base_string = 'spv::Capability::' + + return '{' + ', '.join([(base_string + '{}').format(c) for c in caps]) + '}' def get_capability_array_name(caps): @@ -99,8 +105,12 @@ def generate_capability_arrays(caps): - caps: a sequence of sequence of capability names """ caps = sorted(set([tuple(c) for c in caps if c])) + cap_str = 'SpvCapability' + global OUTPUT_LANGUAGE + if OUTPUT_LANGUAGE == 'c++': + cap_str = 'spv::Capability' arrays = [ - 'static const SpvCapability {}[] = {};'.format( + 'static const ' + cap_str + ' {}[] = {};'.format( get_capability_array_name(c), compose_capability_list(c)) for c in caps] return '\n'.join(arrays) @@ -255,7 +265,12 @@ def fix_syntax(self): self.operands.pop() def __str__(self): - template = ['{{"{opname}"', 'SpvOp{opname}', + global OUTPUT_LANGUAGE + base_str = 'SpvOp' + if OUTPUT_LANGUAGE == 'c++': + base_str = 'spv::Op::Op' + + template = ['{{"{opname}"', base_str + '{opname}', '{num_caps}', '{caps_mask}', '{num_operands}', '{{{operands}}}', '{def_result_id}', '{ref_type_id}', @@ -525,7 +540,7 @@ def generate_operand_kind_table(enums): # We have a few operand kinds that require their optional counterpart to # exist in the operand info table. - optional_enums = ['ImageOperands', 'AccessQualifier', 'MemoryAccess', 'PackedVectorFormat'] + optional_enums = ['ImageOperands', 'AccessQualifier', 'MemoryAccess', 'PackedVectorFormat', 'CooperativeMatrixOperands', 'RawAccessChainOperands'] optional_enums = [e for e in enums if e[0] in optional_enums] enums.extend(optional_enums) @@ -634,9 +649,16 @@ def generate_capability_to_string_mapping(operand_kinds): We take care to avoid emitting duplicate values. """ - function = 'const char* CapabilityToString(SpvCapability capability) {\n' + cap_str = 'SpvCapability' + cap_join = '' + global OUTPUT_LANGUAGE + if OUTPUT_LANGUAGE == 'c++': + cap_str = 'spv::Capability' + cap_join = '::' + + function = 'const char* CapabilityToString(' + cap_str + ' capability) {\n' function += ' switch (capability) {\n' - template = ' case SpvCapability{capability}:\n' \ + template = ' case ' + cap_str + cap_join + '{capability}:\n' \ ' return "{capability}";\n' emitted = set() # The values of capabilities we already have emitted for capability in get_capabilities(operand_kinds): @@ -644,8 +666,8 @@ def generate_capability_to_string_mapping(operand_kinds): if value not in emitted: emitted.add(value) function += template.format(capability=capability.get('enumerant')) - function += ' case SpvCapabilityMax:\n' \ - ' assert(0 && "Attempting to convert SpvCapabilityMax to string");\n' \ + function += ' case ' + cap_str + cap_join + 'Max:\n' \ + ' assert(0 && "Attempting to convert ' + cap_str + cap_join + 'Max to string");\n' \ ' return "";\n' function += ' }\n\n return "";\n}' return function @@ -734,6 +756,10 @@ def main(): type=str, required=False, default=None, help='input JSON grammar file for OpenCL extended ' 'instruction set') + parser.add_argument('--output-language', + type=str, required=False, default='c', + choices=['c','c++'], + help='specify output language type') parser.add_argument('--core-insts-output', metavar='', type=str, required=False, default=None, @@ -765,6 +791,9 @@ def main(): help='prefix for operand kinds (to disambiguate operand type enums)') args = parser.parse_args() + global OUTPUT_LANGUAGE + OUTPUT_LANGUAGE = args.output_language + # The GN build system needs this because it doesn't handle quoting # empty string arguments well. if args.vendor_operand_kind_prefix == "...nil...": diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_language_headers.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_language_headers.py index 83fa99e1f..18a8d5ea0 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_language_headers.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_language_headers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_registry_tables.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_registry_tables.py index 28152ef3e..69628faad 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_registry_tables.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_registry_tables.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,8 +15,9 @@ """Generates the vendor tool table from the SPIR-V XML registry.""" import errno +import io import os.path -import xml.etree.ElementTree +from xml.etree.ElementTree import XML, XMLParser, TreeBuilder def mkdir_p(directory): @@ -78,8 +79,9 @@ def main(): help='output file for SPIR-V generators table') args = parser.parse_args() - with open(args.xml) as xml_in: - registry = xml.etree.ElementTree.fromstring(xml_in.read()) + with io.open(args.xml, encoding='utf-8') as xml_in: + parser = XMLParser(target=TreeBuilder(), encoding='utf-8') + registry = XML(xml_in.read(), parser=parser) mkdir_p(os.path.dirname(args.generator_output)) with open(args.generator_output, 'w') as f: diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_vim_syntax.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_vim_syntax.py index da7e99ba7..5c9c6b21a 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_vim_syntax.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/generate_vim_syntax.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/git-sync-deps b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/git-sync-deps index eecfbe93b..6549afb1e 100755 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/git-sync-deps +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/git-sync-deps @@ -28,10 +28,9 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Parse a DEPS file and git checkout all of the dependencies. +""" -Args: - An optional list of deps_os values. - +EXTRA_HELP = """ Environment Variables: GIT_EXECUTABLE: path to "git" binary; if unset, will look for one of ['git', 'git.exe', 'git.bat'] in your default path. @@ -52,6 +51,7 @@ Git Config: """ +import argparse import os import re import subprocess @@ -59,12 +59,14 @@ import sys import threading from builtins import bytes - def git_executable(): """Find the git executable. Returns: - A string suitable for passing to subprocess functions, or None. + A triple: + A string suitable for passing to subprocess functions, or None. + The major version number + The minor version number """ envgit = os.environ.get('GIT_EXECUTABLE') searchlist = ['git', 'git.exe', 'git.bat'] @@ -72,30 +74,36 @@ def git_executable(): searchlist.insert(0, envgit) with open(os.devnull, 'w') as devnull: for git in searchlist: + major=None + minor=None try: - subprocess.call([git, '--version'], stdout=devnull) + version_info = subprocess.check_output([git, '--version']).decode('utf-8') + match = re.search("^git version (\d+)\.(\d+)",version_info) + print("Using {}".format(version_info)) + if match: + major = int(match.group(1)) + minor = int(match.group(2)) + else: + continue except (OSError,): continue - return git - return None + return (git,major,minor) + return (None,0,0) DEFAULT_DEPS_PATH = os.path.normpath( os.path.join(os.path.dirname(__file__), os.pardir, 'DEPS')) +def get_deps_os_str(deps_file): + parsed_deps = parse_file_to_dict(deps_file) + parts = [] + if 'deps_os' in parsed_deps: + for deps_os in parsed_deps['deps_os']: + parts.append(' [{}]]'.format(deps_os)) + return "\n".join(parts) -def usage(deps_file_path = None): - sys.stderr.write( - 'Usage: run to grab dependencies, with optional platform support:\n') - sys.stderr.write(' %s %s' % (sys.executable, __file__)) - if deps_file_path: - parsed_deps = parse_file_to_dict(deps_file_path) - if 'deps_os' in parsed_deps: - for deps_os in parsed_deps['deps_os']: - sys.stderr.write(' [%s]' % deps_os) - sys.stderr.write('\n\n') - sys.stderr.write(__doc__) - +def looks_like_raw_commit(commit): + return re.match('^[a-f0-9]{40}$', commit) is not None def git_repository_sync_is_disabled(git, directory): try: @@ -125,14 +133,14 @@ def is_git_toplevel(git, directory): def status(directory, checkoutable): def truncate(s, length): - return s if len(s) <= length else s[:(length - 3)] + '...' + return s if len(s) <= length else '...' + s[-(length - 3):] dlen = 36 directory = truncate(directory, dlen) checkoutable = truncate(checkoutable, 40) sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable)) -def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): +def git_checkout_to_directory(git, repo, checkoutable, directory, verbose, treeless): """Checkout (and clone if needed) a Git repository. Args: @@ -147,13 +155,22 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): directory (string) the path into which the repository should be checked out. - verbose (boolean) + verbose (boolean): emit status info to stdout + + treeless (boolean): when true, clone without any trees. Raises an exception if any calls to git fail. """ if not os.path.isdir(directory): + # Use blobless or treeless checkouts for faster downloads. + # This defers some work to checkout time. + # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ + filter = ['--filter=tree:0'] if treeless else ['--filter=blob:none'] + # If the thing to check out looks like a tag (and not like a commit), + # then limit the checkout to that branch. + branch = [] if looks_like_raw_commit(checkoutable) else ['--branch={}'.format(checkoutable)] subprocess.check_call( - [git, 'clone', '--quiet', repo, directory]) + [git, 'clone', '--quiet', '--single-branch'] + filter + branch + [repo, directory]) if not is_git_toplevel(git, directory): # if the directory exists, but isn't a git repo, you will modify @@ -168,7 +185,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): with open(os.devnull, 'w') as devnull: # If this fails, we will fetch before trying again. Don't spam user - # with error infomation. + # with error information. if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable], cwd=directory, stderr=devnull): # if this succeeds, skip slow `git fetch`. @@ -200,7 +217,7 @@ def parse_file_to_dict(path): return dictionary -def git_sync_deps(deps_file_path, command_line_os_requests, verbose): +def git_sync_deps(deps_file_path, command_line_os_requests, verbose, treeless): """Grab dependencies, with optional platform support. Args: @@ -210,11 +227,20 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose): List of strings that should each be a key in the deps_os dictionary in the DEPS file. + verbose (boolean): emit status info to stdout + + treeless (boolean): when true, clone as treeless instead of blobless + Raises git Exceptions. """ - git = git_executable() + (git,git_major,git_minor) = git_executable() assert git + # --filter=tree:0 is available in git 2.20 and later + if (git_major,git_minor) < (2,20): + print("disabling --treeless: git is older than v2.20") + treeless = False + deps_file_directory = os.path.dirname(deps_file_path) deps_file = parse_file_to_dict(deps_file_path) dependencies = deps_file['deps'].copy() @@ -241,7 +267,7 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose): relative_directory = os.path.join(deps_file_directory, directory) list_of_arg_lists.append( - (git, repo, checkoutable, relative_directory, verbose)) + (git, repo, checkoutable, relative_directory, verbose, treeless)) multithread(git_checkout_to_directory, list_of_arg_lists) @@ -264,17 +290,47 @@ def multithread(function, list_of_arg_lists): def main(argv): - deps_file_path = os.environ.get('GIT_SYNC_DEPS_PATH', DEFAULT_DEPS_PATH) - verbose = not bool(os.environ.get('GIT_SYNC_DEPS_QUIET', False)) - - if '--help' in argv or '-h' in argv: - usage(deps_file_path) - return 1 - - git_sync_deps(deps_file_path, argv, verbose) - # subprocess.check_call( - # [sys.executable, - # os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')]) + argparser = argparse.ArgumentParser( + prog = "git-sync-deps", + description = "Checkout git-based dependencies as specified by the DEPS file", + add_help=False # Because we want to print deps_os with -h option + ) + argparser.add_argument("--help", "-h", + action='store_true', + help="show this help message and exit") + argparser.add_argument("--deps", + default = os.environ.get('GIT_SYNC_DEPS_PATH', DEFAULT_DEPS_PATH), + help="location of the the DEPS file") + argparser.add_argument("--verbose", + default=not bool(os.environ.get('GIT_SYNC_DEPS_QUIET', False)), + action='store_true', + help="be verbose: print status messages") + argparser.add_argument("--treeless", + default=False, + action='store_true', + help=""" + Clone repos without trees (--filter=tree:0). + This is the fastest option for a build machine, + when you only need a single commit. + Defers getting objects until checking out a commit. + + The default is to clone with trees but without blobs. + + Only takes effect if using git 2.20 or later. + + See https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ + """) + argparser.add_argument("os_requests",nargs="*", + help="OS requests, as keys in the deps_os dictionariy in the DEPS file") + + args = argparser.parse_args() + if args.help: + print(argparser.format_help()) + print(EXTRA_HELP) + print(get_deps_os_str(args.deps)) + return 0 + + git_sync_deps(args.deps, args.os_requests, args.verbose, args.treeless) return 0 diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/roll_deps.sh b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/roll_deps.sh index cef8b526b..d19ee000e 100755 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/roll_deps.sh +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/roll_deps.sh @@ -20,14 +20,22 @@ set -eo pipefail -effcee_dir="external/effcee/" -effcee_trunk="origin/main" -googletest_dir="external/googletest/" -googletest_trunk="origin/main" -re2_dir="external/re2/" -re2_trunk="origin/main" -spirv_headers_dir="external/spirv-headers/" -spirv_headers_trunk="origin/master" +function ExitIfIsInterestingError() { + local return_code=$1 + if [[ ${return_code} -ne 0 && ${return_code} -ne 2 ]]; then + exit ${return_code} + fi + return 0 +} + + +dependencies=("external/effcee/" + "external/googletest/" + "external/re2/" + "external/spirv-headers/") + + +branch="origin/main" # This script assumes it's parent directory is the repo root. repo_path=$(dirname "$0")/.. @@ -39,13 +47,14 @@ if [[ $(git diff --stat) != '' ]]; then exit 1 fi +echo "*** Ignore messages about running 'git cl upload' ***" + old_head=$(git rev-parse HEAD) set +e -roll-dep --ignore-dirty-tree --roll-to="${effcee_trunk}" "${effcee_dir}" -roll-dep --ignore-dirty-tree --roll-to="${googletest_trunk}" "${googletest_dir}" -roll-dep --ignore-dirty-tree --roll-to="${re2_trunk}" "${re2_dir}" -roll-dep --ignore-dirty-tree --roll-to="${spirv_headers_trunk}" "${spirv_headers_dir}" - -git rebase --interactive "${old_head}" +for dep in ${dependencies[@]}; do + echo "Rolling $dep" + roll-dep --ignore-dirty-tree --roll-to="${branch}" "${dep}" + ExitIfIsInterestingError $? +done diff --git a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/update_build_version.py b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/update_build_version.py index 321de74bd..bb66e18a5 100644 --- a/prog/3rdPartyLibs/vulkan/spirv-tools/utils/update_build_version.py +++ b/prog/3rdPartyLibs/vulkan/spirv-tools/utils/update_build_version.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Google Inc. # @@ -17,16 +17,16 @@ # Updates an output file with version info unless the new content is the same # as the existing content. # -# Args: +# Args: # # The output file will contain a line of text consisting of two C source syntax # string literals separated by a comma: -# - The software version deduced from the CHANGES file in the given directory. +# - The software version deduced from the given CHANGES file. # - A longer string with the project name, the software version number, and -# git commit information for the directory. The commit information -# is the output of "git describe" if that succeeds, or "git rev-parse HEAD" -# if that succeeds, or otherwise a message containing the phrase -# "unknown hash". +# git commit information for the CHANGES file's directory. The commit +# information is the output of "git describe" if that succeeds, or "git +# rev-parse HEAD" if that succeeds, or otherwise a message containing the +# phrase "unknown hash". # The string contents are escaped as necessary. import datetime @@ -35,9 +35,13 @@ import os.path import re import subprocess +import logging import sys import time +# Format of the output generated by this script. Example: +# "v2023.1", "SPIRV-Tools v2023.1 0fc5526f2b01a0cc89192c10cf8bef77f1007a62, 2023-01-18T14:51:49" +OUTPUT_FORMAT = '"{version_tag}", "SPIRV-Tools {version_tag} {description}"\n' def mkdir_p(directory): """Make the directory, and all its ancestors as required. Any of the @@ -55,94 +59,111 @@ def mkdir_p(directory): else: raise - def command_output(cmd, directory): """Runs a command in a directory and returns its standard output stream. - Captures the standard error stream. - - Raises a RuntimeError if the command fails to launch or otherwise fails. + Returns (False, None) if the command fails to launch or otherwise fails. """ - p = subprocess.Popen(cmd, - cwd=directory, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - (stdout, _) = p.communicate() - if p.returncode != 0: - raise RuntimeError('Failed to run %s in %s' % (cmd, directory)) - return stdout - - -def deduce_software_version(directory): - """Returns a software version number parsed from the CHANGES file - in the given directory. - - The CHANGES file describes most recent versions first. + try: + # Set shell=True on Windows so that Chromium's git.bat can be found when + # 'git' is invoked. + p = subprocess.Popen(cmd, + cwd=directory, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=os.name == 'nt') + (stdout, _) = p.communicate() + if p.returncode != 0: + return False, None + except Exception as e: + return False, None + return p.returncode == 0, stdout + +def deduce_software_version(changes_file): + """Returns a tuple (success, software version number) parsed from the + given CHANGES file. + + Success is set to True if the software version could be deduced. + Software version is undefined if success if False. + Function expects the CHANGES file to describes most recent versions first. """ - # Match the first well-formed version-and-date line. + # Match the first well-formed version-and-date line # Allow trailing whitespace in the checked-out source code has # unexpected carriage returns on a linefeed-only system such as # Linux. pattern = re.compile(r'^(v\d+\.\d+(-dev)?) \d\d\d\d-\d\d-\d\d\s*$') - changes_file = os.path.join(directory, 'CHANGES') with open(changes_file, mode='r') as f: for line in f.readlines(): match = pattern.match(line) if match: - return match.group(1) - raise Exception('No version number found in {}'.format(changes_file)) + return True, match.group(1) + return False, None -def describe(directory): +def describe(repo_path): """Returns a string describing the current Git HEAD version as descriptively as possible. Runs 'git describe', or alternately 'git rev-parse HEAD', in directory. If successful, returns the output; otherwise returns 'unknown hash, '.""" - try: - # decode() is needed here for Python3 compatibility. In Python2, - # str and bytes are the same type, but not in Python3. - # Popen.communicate() returns a bytes instance, which needs to be - # decoded into text data first in Python3. And this decode() won't - # hurt Python2. - return command_output(['git', 'describe'], directory).rstrip().decode() - except: - try: - return command_output( - ['git', 'rev-parse', 'HEAD'], directory).rstrip().decode() - except: - # This is the fallback case where git gives us no information, - # e.g. because the source tree might not be in a git tree. - # In this case, usually use a timestamp. However, to ensure - # reproducible builds, allow the builder to override the wall - # clock time with environment variable SOURCE_DATE_EPOCH - # containing a (presumably) fixed timestamp. - timestamp = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) - formatted = datetime.datetime.utcfromtimestamp(timestamp).isoformat() - return 'unknown hash, {}'.format(formatted) + # if we're in a git repository, attempt to extract version info + success, output = command_output(["git", "rev-parse", "--show-toplevel"], repo_path) + if success: + success, output = command_output(["git", "describe", "--tags", "--match=v*", "--long"], repo_path) + if not success: + success, output = command_output(["git", "rev-parse", "HEAD"], repo_path) + + if success: + # decode() is needed here for Python3 compatibility. In Python2, + # str and bytes are the same type, but not in Python3. + # Popen.communicate() returns a bytes instance, which needs to be + # decoded into text data first in Python3. And this decode() won't + # hurt Python2. + return output.rstrip().decode() + + # This is the fallback case where git gives us no information, + # e.g. because the source tree might not be in a git tree or + # git is not available on the system. + # In this case, usually use a timestamp. However, to ensure + # reproducible builds, allow the builder to override the wall + # clock time with environment variable SOURCE_DATE_EPOCH + # containing a (presumably) fixed timestamp. + timestamp = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) + iso_date = datetime.datetime.fromtimestamp(timestamp, datetime.timezone.utc).isoformat() + return "unknown hash, {}".format(iso_date) def main(): + FORMAT = '%(asctime)s %(message)s' + logging.basicConfig(format="[%(asctime)s][%(levelname)-8s] %(message)s", datefmt="%H:%M:%S") if len(sys.argv) != 3: - print('usage: {} '.format(sys.argv[0])) + logging.error("usage: {} ".format(sys.argv[0])) sys.exit(1) - output_file = sys.argv[2] - mkdir_p(os.path.dirname(output_file)) + changes_file_path = os.path.realpath(sys.argv[1]) + output_file_path = sys.argv[2] + + success, version = deduce_software_version(changes_file_path) + if not success: + logging.error("Could not deduce latest release version from {}.".format(changes_file_path)) + sys.exit(1) + + repo_path = os.path.dirname(changes_file_path) + description = describe(repo_path) + content = OUTPUT_FORMAT.format(version_tag=version, description=description) - software_version = deduce_software_version(sys.argv[1]) - new_content = '"{}", "SPIRV-Tools {} {}"\n'.format( - software_version, software_version, - describe(sys.argv[1]).replace('"', '\\"')) + # Escape file content. + content.replace('"', '\\"') - if os.path.isfile(output_file): - with open(output_file, 'r') as f: - if new_content == f.read(): - return + if os.path.isfile(output_file_path): + with open(output_file_path, 'r') as f: + if content == f.read(): + return - with open(output_file, 'w') as f: - f.write(new_content) + mkdir_p(os.path.dirname(output_file_path)) + with open(output_file_path, 'w') as f: + f.write(content) if __name__ == '__main__': main() diff --git a/prog/commonFx/commonFxGame/modfx/modfx_bboard_render.hlsl b/prog/commonFx/commonFxGame/modfx/modfx_bboard_render.hlsl index c39b1e435..a37ba81df 100644 --- a/prog/commonFx/commonFxGame/modfx/modfx_bboard_render.hlsl +++ b/prog/commonFx/commonFxGame/modfx/modfx_bboard_render.hlsl @@ -440,6 +440,7 @@ } float placementNormalOffset = -1; + BRANCH if ( parent_data.mods_offsets[MODFX_RMOD_RENDER_PLACEMENT_PARAMS] ) { ModfxDeclRenderPlacementParams placementParams = ModfxDeclRenderPlacementParams_load(0, parent_data.mods_offsets[MODFX_RMOD_RENDER_PLACEMENT_PARAMS]); @@ -471,7 +472,7 @@ } #endif -#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT || MODFX_SHADER_VOLSHAPE_DEPTH) && !MODFX_SHADER_VOLFOG_INJECTION +#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT) && !MODFX_SHADER_VOLFOG_INJECTION if ( parent_data.mods_offsets[MODFX_RMOD_DEPTH_MASK] && !is_dead ) { ModfxDepthMask pp = ModfxDepthMask_load( 0, parent_data.mods_offsets[MODFX_RMOD_DEPTH_MASK] ); @@ -583,7 +584,7 @@ float3 up_vec = gdata.view_dir_y; float3 right_vec = gdata.view_dir_x; -#if (MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT || MODFX_SHADER_VOLSHAPE_DEPTH) +#if (MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT) float stable_rnd_offset = (ren_info.instance_id + ren_info.data_ofs % 20 ) * 0.001; rdata.pos += gdata.view_dir_z * stable_rnd_offset; @@ -700,7 +701,7 @@ rotated_right_vec = normalize( cross( view_dir_norm, rotated_up_vec ) ); } -#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT || MODFX_SHADER_VOLSHAPE_DEPTH) +#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT) if ( MOD_ENABLED( parent_data.mods, MODFX_RMOD_SHAPE_ADAPTIVE_ALIGNED ) ) { float3 r = normalize( cross( view_dir_norm, rotated_up_vec ) ); @@ -908,25 +909,11 @@ } #if MODFX_WBOIT_ENABLED - #if MODFX_WBOIT_PASS_COMBINED struct WboitData { float4 color : SV_Target0; float alpha : SV_Target1; }; - #define WBOIT_RET WboitData - #define WBOIT_TAR - #endif - - #if MODFX_WBOIT_PASS_COLOR - #define WBOIT_RET float4 - #define WBOIT_TAR : SV_Target0 - #endif - - #if MODFX_WBOIT_PASS_ALPHA - #define WBOIT_RET float - #define WBOIT_TAR : SV_Target0 - #endif float wboit_weight(float z, float a) { @@ -976,29 +963,54 @@ #else #define USE_EARLY_DEPTH_STENCIL #endif + +struct PsOutput +{ + float4 color : SV_Target0; +#if DAFXEX_USE_REACTIVE_MASK + float reactive : SV_Target1; +#endif +}; +PsOutput encode_output(float4 color) +{ + PsOutput output; + output.color = color; +#if DAFXEX_USE_REACTIVE_MASK + output.reactive = color.a; +#endif + return output; +} + +#if MODFX_SHADER_VOLFOG_INJECTION + #define fx_null +#elif MODFX_SHADER_FOM + #define fx_null fx_fom_null() +#elif MODFX_SHADER_VOLSHAPE_WBOIT + #define fx_null (WboitData)0 +#else + #define fx_null encode_output(0) +#endif + +bool color_discard_test(float4 src, uint flags) +{ + // default = premult + float src_alpha = src.a; + float src_color_sum = dot(src.rgb, 1.f); + if ( FLAG_ENABLED( flags, MODFX_RFLAG_BLEND_ADD ) ) + src_alpha = 0; + else if ( FLAG_ENABLED( flags, MODFX_RFLAG_BLEND_ABLEND ) ) + src_color_sum = 0; + + return (src_alpha + src_color_sum) < 1.f / 255.f; +} + #if MODFX_SHADER_VOLFOG_INJECTION USE_EARLY_DEPTH_STENCIL void dafx_bboard_ps(VsOutput input HW_USE_SCREEN_POS) #elif MODFX_SHADER_FOM USE_EARLY_DEPTH_STENCIL FOM_DATA dafx_bboard_ps( VsOutput input HW_USE_SCREEN_POS) #elif MODFX_WBOIT_ENABLED - USE_EARLY_DEPTH_STENCIL WBOIT_RET dafx_bboard_ps( VsOutput input HW_USE_SCREEN_POS) WBOIT_TAR + USE_EARLY_DEPTH_STENCIL WboitData dafx_bboard_ps( VsOutput input HW_USE_SCREEN_POS) #else - struct PsOutput - { - float4 color : SV_Target0; -#if DAFXEX_USE_REACTIVE_MASK - float reactive : SV_Target1; -#endif - }; - PsOutput encode_output(float4 color) - { - PsOutput output; - output.color = color; -#if DAFXEX_USE_REACTIVE_MASK - output.reactive = color.a; -#endif - return output; - } USE_EARLY_DEPTH_STENCIL PsOutput dafx_bboard_ps(VsOutput input HW_USE_SCREEN_POS) #endif { @@ -1011,11 +1023,6 @@ return output; #else // MODFX_DEBUG_RENDER_ENABLED - -#if MODFX_SHADER_VOLSHAPE_DEPTH - return encode_output(0); -#endif - GlobalData gdata = global_data_load(); DafxRenderData ren_info; dafx_get_render_info_patched( 0, input.draw_call_id, ren_info ); @@ -1095,27 +1102,36 @@ src_tex_0 = lerp( src_tex_0, tex2D( g_tex_0, input.tc.zw ), input.frame_blend ); #endif + uint any_color_remap = 0; + bool shouldDiscard = false; +#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT || MODFX_SHADER_VOLFOG_INJECTION) +#if MODFX_USE_COLOR_MATRIX + any_color_remap |= (parent_data.mods_offsets[MODFX_RMOD_TEX_COLOR_MATRIX] != 0) ? 1 : 0; +#endif +#if MODFX_USE_COLOR_REMAP + any_color_remap |= (parent_data.mods_offsets[MODFX_RMOD_TEX_COLOR_REMAP] != 0) ? 1 : 0; +#endif + + BRANCH + if (!any_color_remap) + shouldDiscard = color_discard_test(src_tex_0, flags); + +#endif + #if !MODFX_SHADER_VOLSHAPE_WBOIT_APPLY if ( FLAG_ENABLED( flags, MODFX_RFLAG_USE_UV_ROTATION ) ) { if ( dot( input.delta, input.delta ) > 1.f ) - { - discard; - #if MODFX_SHADER_VOLFOG_INJECTION - return; - #elif MODFX_SHADER_FOM - return fx_fom_null(); - #elif MODFX_WBOIT_PASS_COMBINED - WboitData wboit_res = (WboitData)0; - #elif MODFX_WBOIT_ENABLED - return 0; - #else - return encode_output(0); - #endif - } + shouldDiscard = true; } #endif + if (shouldDiscard) + { + discard; + return fx_null; + } + #endif #if MODFX_SHADER_DISTORTION @@ -1141,6 +1157,14 @@ float4 cloud_tc = viewport_tc; cloud_tc.xy = reproject_scattering(cloud_tc.xy, cloud_tc.z / cloud_tc.w); depth_mask = dafx_get_soft_depth_mask(viewport_tc, cloud_tc, pp.depth_softness_rcp, gdata); + + #if !MODFX_SHADER_VOLFOG_INJECTION + if (depth_mask < 1e-03) + { + discard; + return fx_null; + } + #endif } #endif @@ -1234,6 +1258,14 @@ lighting_part = c; } +#if !(MODFX_SHADER_VOLSHAPE || MODFX_SHADER_VOLSHAPE_WBOIT || MODFX_SHADER_VOLFOG_INJECTION) + if (color_discard_test(float4(lighting_part.xyz, alpha), flags)) + { + discard; + return fx_null; + } +#endif + #if MODFX_SHADER_VOLFOG_INJECTION float4 volfogInjection = float4(lighting_part, alpha); @@ -1283,20 +1315,21 @@ emissive_part *= vol_alpha; alpha *= vol_alpha; + if (alpha < 1e-03) + { + discard; + return fx_null; + } + #if MODFX_SHADER_VOLSHAPE_WBOIT_APPLY #ifdef DAFXEX_CLOUD_MASK_ENABLED alpha *= dafx_get_screen_cloud_volume_mask(viewport_tc.xy, viewport_tc.w); #endif - #if MODFX_WBOIT_PASS_COMBINED float4 wboit_accum = tex2D(wboit_color, viewport_tc.xy); float wboit_r = wboit_accum.w; wboit_accum.w = tex2D(wboit_alpha, viewport_tc.xy).r; - #else - float4 wboit_accum = tex2D(wboit_color, viewport_tc.xy); - float wboit_r = tex2D(wboit_alpha, viewport_tc.xy).r; - #endif float3 col = wboit_accum.xyz / clamp(wboit_accum.w, 0.0000001f, 1000.f); float a = 1.f - wboit_r; @@ -1307,6 +1340,7 @@ #if MODFX_USE_LIGHTING // TODO: optimize! + BRANCH if ( parent_data.mods_offsets[MODFX_RMOD_LIGHTING_INIT] ) { ModfxDeclLighting pp = ModfxDeclLighting_load( 0, parent_data.mods_offsets[MODFX_RMOD_LIGHTING_INIT] ); @@ -1351,6 +1385,7 @@ } else if ( pp.type == MODFX_LIGHTING_TYPE_NORMALMAP ) { + #if !MODFX_SHADER_VOLSHAPE && !MODFX_SHADER_VOLSHAPE_WBOIT float2 src_tex_1 = tex2D( g_tex_1, input.tc.xy ).rg; if ( FLAG_ENABLED( flags, MODFX_RFLAG_FRAME_ANIMATED_FLIPBOOK ) ) src_tex_1 = lerp( src_tex_1, tex2D( g_tex_1, input.tc.zw ).rg, input.frame_blend ); @@ -1362,6 +1397,7 @@ wnorm = fwd_dir * lnorm.z + input.right_dir * lnorm.x - input.up_dir * lnorm.y; nda = saturate( dot( sphere_normal, wnorm ) ); + #endif } #endif @@ -1536,21 +1572,14 @@ } #if MODFX_WBOIT_ENABLED - #if MODFX_WBOIT_PASS_COMBINED WboitData wboit_res; wboit_res.color.xyz = result.xyz * wboit_weight(cur_depth, result.w); wboit_res.color.w = result.w; wboit_res.alpha = result.w * wboit_weight(cur_depth, result.w); return wboit_res; - #elif MODFX_WBOIT_PASS_COLOR - return result * wboit_weight(cur_depth, result.w); - // return result * wboit_weight(cur_depth, result.w) * result.w; - #elif MODFX_WBOIT_PASS_ALPHA - return result.w; - #endif #else return encode_output(result); -#endif + #endif #endif #endif // MODFX_DEBUG_RENDER_ENABLED diff --git a/prog/commonFx/commonFxGame/modfx_bboard_render.dshl b/prog/commonFx/commonFxGame/modfx_bboard_render.dshl index 000a95adb..03242edc3 100644 --- a/prog/commonFx/commonFxGame/modfx_bboard_render.dshl +++ b/prog/commonFx/commonFxGame/modfx_bboard_render.dshl @@ -13,9 +13,6 @@ interval modfx_debug_render : off < 1, on; int modfx_wboit_enabled = 0; interval modfx_wboit_enabled : off < 1, on; -int modfx_wboit_pass = 2; -interval modfx_wboit_pass : color < 1, alpha < 2, combined; - int fx_apply_volfog_per_pixel = 0; interval fx_apply_volfog_per_pixel: no < 1, yes; // must be disabled explicitly for WT compat for lack of UAV @@ -133,10 +130,6 @@ shader dafx_modfx_bboard_render, dafx_modfx_ribbon_render, dafx_modfx_ribbon_ren wboit_color@smp2d = wboit_color; wboit_alpha@smp2d = wboit_alpha; } - if ( modfx_wboit_pass == combined ) - { - hlsl {#define MODFX_WBOIT_PASS_COMBINED 1 } - } } else { @@ -166,28 +159,10 @@ shader dafx_modfx_bboard_render, dafx_modfx_ribbon_render, dafx_modfx_ribbon_ren else if ( shader == dafx_modfx_volshape_wboit_render ) { z_write = false; - if ( modfx_wboit_pass == combined ) - { - blend_src=one; - blend_dst=one; - blend_asrc=zero; - blend_adst=isa; - hlsl {#define MODFX_WBOIT_PASS_COMBINED 1 } - } - else if ( modfx_wboit_pass == color ) - { - blend_src=one; - blend_dst=one; - blend_asrc=one; - blend_adst=one; - hlsl {#define MODFX_WBOIT_PASS_COLOR 1 } - } - else if ( modfx_wboit_pass == alpha ) - { - blend_src=zero; - blend_dst=isc; - hlsl {#define MODFX_WBOIT_PASS_ALPHA 1 } - } + blend_src=one; + blend_dst=one; + blend_asrc=zero; + blend_adst=isa; DAFX_USE_CLOUD_SHADOWS() hlsl diff --git a/prog/daNetGame/game.jam b/prog/daNetGame/game.jam index 6d70d238b..18804f3b1 100644 --- a/prog/daNetGame/game.jam +++ b/prog/daNetGame/game.jam @@ -1,5 +1,6 @@ # to be included from final Game Project's jamfile if ! $(Game) { Exit Game is not defined! ; } +if $(Game) != $(Game:L) { Exit Game=$(Game) contains uppercase letters; use only lowercase to avoid problems with vromfs ; } gameMain = \# include \"main/main.cpp\" ; gameVersion = \# include \"main/version.cpp\" ; diff --git a/prog/daNetGame/game/riDestrES.cpp.inl b/prog/daNetGame/game/riDestrES.cpp.inl index aed946d69..fe1b99f79 100644 --- a/prog/daNetGame/game/riDestrES.cpp.inl +++ b/prog/daNetGame/game/riDestrES.cpp.inl @@ -43,19 +43,20 @@ namespace ridestr { -static void net_rcv_ri_destr_info(const net::IMessage *msg); +static void net_rcv_ri_destr_snapshot(const net::IMessage *msg); static void net_rcv_ri_destr_update(const net::IMessage *msg); +static void net_rcv_ri_pools_update(const net::IMessage *msg); } // namespace ridestr -ECS_NET_DECL_MSG(RiDestrInfoMsg, danet::BitStream); -ECS_NET_IMPL_MSG(RiDestrInfoMsg, +ECS_NET_DECL_MSG(RiDestrSnapshotMsg, danet::BitStream); +ECS_NET_IMPL_MSG(RiDestrSnapshotMsg, net::ROUTING_SERVER_TO_CLIENT, &net::broadcast_rcptf, - RELIABLE_UNORDERED, + RELIABLE_ORDERED, NC_DEFAULT, net::MF_DEFAULT_FLAGS, ECS_NET_NO_DUP, - &ridestr::net_rcv_ri_destr_info); + &ridestr::net_rcv_ri_destr_snapshot); ECS_NET_DECL_MSG(RiDestrUpdateMsg, danet::BitStream); ECS_NET_IMPL_MSG(RiDestrUpdateMsg, net::ROUTING_SERVER_TO_CLIENT, @@ -65,6 +66,17 @@ ECS_NET_IMPL_MSG(RiDestrUpdateMsg, net::MF_DEFAULT_FLAGS, ECS_NET_NO_DUP, &ridestr::net_rcv_ri_destr_update); +// IMPORTANT: pool updates MUST be ordered, otherwise empty snapshot, that players usually receive during entering the match, +// might come later than pool updates and override them. RiPoolDataUpdateMsg can be unordered +ECS_NET_DECL_MSG(RiPoolDataUpdateMsg, danet::BitStream); +ECS_NET_IMPL_MSG(RiPoolDataUpdateMsg, + net::ROUTING_SERVER_TO_CLIENT, + &net::broadcast_rcptf, + RELIABLE_ORDERED, + 0, + net::MF_DEFAULT_FLAGS, + ECS_NET_NO_DUP, + &ridestr::net_rcv_ri_pools_update); template inline void destroyable_ents_ecs_query(Callable c); @@ -78,6 +90,20 @@ namespace ridestr static dag::Vector unsynced_destr_data; static uint16_t cur_ridestr_ver = 0, cached_ridestr_ver = 0, update_ridestr_ver = 0; static danet::BitStream cached_serialized_initial_ridestr; // Full ridestr update cached on server +static int prev_ri_extra_map_size = -1; +static bool is_pool_sync_sent = true; + +static void ensure_all_ri_extra_pools_are_synced() +{ + // check, if rend inst pool list has changed, and updates synced rendinsts, + // if nothing has changed (most cases) this call is free + if (rendinst::getRIExtraMapSize() != prev_ri_extra_map_size) + { + prev_ri_extra_map_size = rendinst::getRIExtraMapSize(); + is_pool_sync_sent = false; + rendinstdestr::sync_all_ri_extra_pools(); + } +} static void on_ridestr_changed_server( const rendinst::RendInstDesc &desc, const TMatrix &ri_tm, const Point3 &pos, const Point3 &impulse) @@ -329,12 +355,19 @@ static void on_riex_destruction_cb( rendinst::removeRIGenExtraFromGrid(handle); } -static void net_rcv_ri_destr_info(const net::IMessage *msg) +static void net_rcv_ri_destr_snapshot(const net::IMessage *msg) { - TIME_PROFILE(net_rcv_ri_destr_info); - auto ridestrMsg = msg->cast(); + TIME_PROFILE(net_rcv_ri_destr_snapshot); + auto ridestrMsg = msg->cast(); G_ASSERT(ridestrMsg); - rendinstdestr::deserialize_destr_data(ridestrMsg->get<0>(), 0, rendinstdestr::get_destr_settings().riMaxSimultaneousDestrs); + ensure_all_ri_extra_pools_are_synced(); + const danet::BitStream &bs = ridestrMsg->get<0>(); + bool done = rendinstdestr::deserialize_synced_ri_extra_pools(bs); + G_ASSERT(done); + bs.AlignReadToByteBoundary(); + done &= rendinstdestr::deserialize_destr_data(bs, 0, rendinstdestr::get_destr_settings().riMaxSimultaneousDestrs); + G_ASSERT(!done || bs.GetNumberOfUnreadBits() == 0); + G_UNUSED(done); } static void net_rcv_ri_destr_update(const net::IMessage *msg) @@ -342,11 +375,22 @@ static void net_rcv_ri_destr_update(const net::IMessage *msg) TIME_PROFILE(net_rcv_ri_destr_update); auto ridestrMsg = msg->cast(); G_ASSERT(ridestrMsg); + ensure_all_ri_extra_pools_are_synced(); bool done = rendinstdestr::deserialize_destr_update(ridestrMsg->get<0>()); G_ASSERT(!done || ridestrMsg->get<0>().GetNumberOfUnreadBits() == 0); G_UNUSED(done); } +static void net_rcv_ri_pools_update(const net::IMessage *msg) +{ + const RiPoolDataUpdateMsg *riMsg = msg->cast(); + G_ASSERT(riMsg); + ensure_all_ri_extra_pools_are_synced(); + const bool ok = rendinstdestr::deserialize_synced_ri_extra_pools(riMsg->get<0>()); + G_ASSERT(ok && riMsg->get<0>().GetNumberOfUnreadBits() == 0); + G_UNUSED(ok); +} + void init(bool have_render) { destructables::init(dgs_get_settings()); @@ -420,7 +464,11 @@ void send_initial_ridestr(net::IConnection &conn) if (!cached_serialized_initial_ridestr.GetNumberOfBitsUsed()) return; - RiDestrInfoMsg msg(cached_serialized_initial_ridestr); + ensure_all_ri_extra_pools_are_synced(); + RiDestrSnapshotMsg msg(danet::BitStream(1024, framemem_ptr())); + rendinstdestr::serialize_synced_ri_extra_pools(msg.get<0>(), /* full snapshot */ true, /* skip if empty */ false); + msg.get<0>().WriteAlignedBytes(cached_serialized_initial_ridestr.GetData(), + cached_serialized_initial_ridestr.GetNumberOfBytesUsed()); net::MessageNetDesc md = msg.getMsgClass(); md.rcptFilter = &net::direct_connection_rcptf; msg.connection = &conn; @@ -429,6 +477,15 @@ void send_initial_ridestr(net::IConnection &conn) static void flush_ridestr_update() { + ensure_all_ri_extra_pools_are_synced(); + if (!is_pool_sync_sent) + { + // do not reserve memory, there might be nothing to send + RiPoolDataUpdateMsg msg = RiPoolDataUpdateMsg(danet::BitStream(framemem_ptr())); + if (rendinstdestr::serialize_synced_ri_extra_pools(msg.get<0>(), /* full snapshot */ false, /* skip if empty */ true)) + send_net_msg(::net::get_msg_sink(), eastl::move(msg)); + is_pool_sync_sent = true; + } if (unsynced_destr_data.empty()) return; @@ -477,11 +534,12 @@ static void flush_dirty_ri_destr_msg() return; update_ridestr_ver = cur_ridestr_ver; - send_net_msg(net::get_msg_sink(), RiDestrInfoMsg(cached_serialized_initial_ridestr)); + send_net_msg(net::get_msg_sink(), RiDestrSnapshotMsg(cached_serialized_initial_ridestr)); } void update(float dt, const TMatrix4 &glob_tm) { + ensure_all_ri_extra_pools_are_synced(); if (dedicated::is_dedicated()) { rendinstdestr::update(dt, nullptr); @@ -505,6 +563,8 @@ void shutdown() cur_ridestr_ver = cached_ridestr_ver = 0; cached_serialized_initial_ridestr.Clear(); clear_and_shrink(unsynced_destr_data); + prev_ri_extra_map_size = -1; + is_pool_sync_sent = true; } } // namespace ridestr diff --git a/prog/daNetGame/main/levelES.cpp.inl b/prog/daNetGame/main/levelES.cpp.inl index 7dfa049e7..d7f648ae1 100644 --- a/prog/daNetGame/main/levelES.cpp.inl +++ b/prog/daNetGame/main/levelES.cpp.inl @@ -217,13 +217,13 @@ public: using BaseStreamingSceneHolder::mainBindump; ecs::EntityId eid; - bool waterHeightmapLoaded = false; eastl::unique_ptr rivers; eastl::unique_ptr lmeshMgr; Tab splines; eastl::unique_ptr roads; uint32_t dataNeeded = 0; bool needLmeshLoadedCall = false; + bool waterHeightmapLoaded = false; eastl::unique_ptr levelBlk; // Shall be accessed only during loading Tab objectsToPlace, efxToPlace; DataBlock riGenExtraConfig; @@ -441,12 +441,14 @@ public: if (tag == _MAKE4C('WHM')) { - FFTWater *water = dacoll::get_water(); - if (water) + if (FFTWater *water = dacoll::get_water()) { - waterHeightmapLoaded = true; fft_water::load_heightmap(crd, water); + waterHeightmapLoaded = true; } + else + logerr("Water heightmap exist in level but there is no water during level load. " + "Make sure that water entity resides before level's one in scene file"); } if (tag == _MAKE4C('lmap')) @@ -622,8 +624,7 @@ public: get_world_renderer()->onLandmeshLoaded(*levelBlk, levelBlk->getStr(LEVEL_BIN_NAME, "undefined"), lmeshMgr.get()); } #endif - FFTWater *water = dacoll::get_water(); - if (water && waterHeightmapLoaded) + if (FFTWater *water = dacoll::get_water(); waterHeightmapLoaded) { fft_water::reset_render(water); fft_water::reset_physics(water); diff --git a/prog/daNetGame/main/waterES.cpp.gen.es.cpp b/prog/daNetGame/main/waterES.cpp.gen.es.cpp index 3c71a062d..89f822b2c 100644 --- a/prog/daNetGame/main/waterES.cpp.gen.es.cpp +++ b/prog/daNetGame/main/waterES.cpp.gen.es.cpp @@ -174,7 +174,7 @@ static constexpr ecs::ComponentDesc water_flowmap_foam_es_event_handler_comps[] { //start of 1 rw components at [0] {ECS_HASH("water"), ecs::ComponentTypeInfo()}, -//start of 13 ro components at [1] +//start of 14 ro components at [1] {ECS_HASH("water__flowmap_foam_power"), ecs::ComponentTypeInfo()}, {ECS_HASH("water__flowmap_foam_scale"), ecs::ComponentTypeInfo()}, {ECS_HASH("water__flowmap_foam_threshold"), ecs::ComponentTypeInfo()}, @@ -187,6 +187,7 @@ static constexpr ecs::ComponentDesc water_flowmap_foam_es_event_handler_comps[] {ECS_HASH("water__flowmap_speed_depth_max"), ecs::ComponentTypeInfo()}, {ECS_HASH("water__flowmap_foam_depth_max"), ecs::ComponentTypeInfo()}, {ECS_HASH("water__flowmap_slope"), ecs::ComponentTypeInfo()}, + {ECS_HASH("water__has_slopes"), ecs::ComponentTypeInfo()}, {ECS_HASH("water__flowmap_detail"), ecs::ComponentTypeInfo()} }; static void water_flowmap_foam_es_event_handler_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) @@ -206,6 +207,7 @@ static void water_flowmap_foam_es_event_handler_all_events(const ecs::Event &__r , ECS_RO_COMP(water_flowmap_foam_es_event_handler_comps, "water__flowmap_speed_depth_max", float) , ECS_RO_COMP(water_flowmap_foam_es_event_handler_comps, "water__flowmap_foam_depth_max", float) , ECS_RO_COMP(water_flowmap_foam_es_event_handler_comps, "water__flowmap_slope", float) + , ECS_RO_COMP(water_flowmap_foam_es_event_handler_comps, "water__has_slopes", bool) , ECS_RO_COMP(water_flowmap_foam_es_event_handler_comps, "water__flowmap_detail", bool) ); while (++comp != compE); @@ -216,13 +218,13 @@ static ecs::EntitySystemDesc water_flowmap_foam_es_event_handler_es_desc "prog/daNetGame/main/waterES.cpp.inl", ecs::EntitySystemOps(nullptr, water_flowmap_foam_es_event_handler_all_events), make_span(water_flowmap_foam_es_event_handler_comps+0, 1)/*rw*/, - make_span(water_flowmap_foam_es_event_handler_comps+1, 13)/*ro*/, + make_span(water_flowmap_foam_es_event_handler_comps+1, 14)/*ro*/, empty_span(), empty_span(), ecs::EventSetBuilder::build(), 0 -,nullptr,"water__flowmap_detail,water__flowmap_foam_color,water__flowmap_foam_depth_max,water__flowmap_foam_power,water__flowmap_foam_reflectivity,water__flowmap_foam_reflectivity_min,water__flowmap_foam_scale,water__flowmap_foam_speed_scale,water__flowmap_foam_threshold,water__flowmap_foam_tiling,water__flowmap_slope,water__flowmap_speed_depth_max,water__flowmap_speed_depth_scale"); +,nullptr,"water__flowmap_detail,water__flowmap_foam_color,water__flowmap_foam_depth_max,water__flowmap_foam_power,water__flowmap_foam_reflectivity,water__flowmap_foam_reflectivity_min,water__flowmap_foam_scale,water__flowmap_foam_speed_scale,water__flowmap_foam_threshold,water__flowmap_foam_tiling,water__flowmap_slope,water__flowmap_speed_depth_max,water__flowmap_speed_depth_scale,water__has_slopes"); static constexpr ecs::ComponentDesc water_shore_setup_es_event_handler_comps[] = { //start of 5 ro components at [0] diff --git a/prog/daNetGame/main/waterES.cpp.inl b/prog/daNetGame/main/waterES.cpp.inl index d41e52fb2..3a3713f19 100644 --- a/prog/daNetGame/main/waterES.cpp.inl +++ b/prog/daNetGame/main/waterES.cpp.inl @@ -173,6 +173,7 @@ ECS_TRACK(water__flowmap_foam_power, water__flowmap_speed_depth_max, water__flowmap_foam_depth_max, water__flowmap_slope, + water__has_slopes, water__flowmap_detail) static void water_flowmap_foam_es_event_handler(const ecs::Event &, FFTWater &water, @@ -188,6 +189,7 @@ static void water_flowmap_foam_es_event_handler(const ecs::Event &, float water__flowmap_speed_depth_max, float water__flowmap_foam_depth_max, float water__flowmap_slope, + bool water__has_slopes, bool water__flowmap_detail) { fft_water::WaterFlowmap *waterFlowmap = fft_water::get_flowmap(&water); @@ -205,6 +207,7 @@ static void water_flowmap_foam_es_event_handler(const ecs::Event &, waterFlowmap->flowmapDepth = flowmap_depth; waterFlowmap->flowmapSlope = water__flowmap_slope; waterFlowmap->flowmapDetail = water__flowmap_detail; + waterFlowmap->hasSlopes = water__has_slopes; fft_water::set_flowmap_foam_params(&water); } diff --git a/prog/daNetGame/net/protoVersion.h b/prog/daNetGame/net/protoVersion.h index 87a12e409..2f21dad5e 100644 --- a/prog/daNetGame/net/protoVersion.h +++ b/prog/daNetGame/net/protoVersion.h @@ -1,5 +1,5 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -#define NET_PROTO_VERSION_VALUE 300 +#define NET_PROTO_VERSION_VALUE 301 constexpr uint16_t NET_PROTO_VERSION = NET_PROTO_VERSION_VALUE; diff --git a/prog/daNetGame/render/grass/grassRender.h b/prog/daNetGame/render/grass/grassRender.h index a32dc6240..feda7b153 100644 --- a/prog/daNetGame/render/grass/grassRender.h +++ b/prog/daNetGame/render/grass/grassRender.h @@ -7,4 +7,4 @@ void init_grass(const DataBlock *grass_settings_from_level); void erase_grass(const Point3 &world_pos, float radius); void grass_invalidate(); void grass_invalidate(const dag::ConstSpan &boxes); -void grass_prepare(const TMatrix &itm); \ No newline at end of file +void grass_prepare(const TMatrix &itm, const Driver3dPerspective &perspective); \ No newline at end of file diff --git a/prog/daNetGame/render/grass/grassRenderES.cpp.inl b/prog/daNetGame/render/grass/grassRenderES.cpp.inl index 86f69833b..74e220141 100644 --- a/prog/daNetGame/render/grass/grassRenderES.cpp.inl +++ b/prog/daNetGame/render/grass/grassRenderES.cpp.inl @@ -191,7 +191,7 @@ void GrassRenderer::renderGrass() grass.render(grass.GRASS_NO_PREPASS); } -void GrassRenderer::generateGrass(const TMatrix &itm) +void GrassRenderer::generateGrass(const TMatrix &itm, const Driver3dPerspective &perspective) { auto *lmeshRenderer = WRDispatcher::getLandMeshRenderer(); auto *lmeshManagerer = WRDispatcher::getLandMeshManager(); @@ -231,7 +231,7 @@ void GrassRenderer::generateGrass(const TMatrix &itm) if (grassify) { - grassify->generate(itm.getcol(3), itm, grass.getMaskTex(), rhlp, grass.base); + grassify->generate(itm.getcol(3), itm, perspective, grass.getMaskTex(), rhlp, grass.base); } if (::grs_draw_wire) @@ -276,6 +276,9 @@ void GrassRenderer::initGrass(const DataBlock &grass_settings) void GrassRenderer::initGrassRendinstClipmap() { + if (grassify) + grassify->initGrassifyRendinst(); + // Note: technically the scene can have dynamically created objects that generate heightmap (currently there isn't any) if (!RendInstHeightmap::has_heightmap_objects_on_scene()) return; @@ -362,9 +365,9 @@ ECS_TRACK(render_settings__anisotropy) ECS_REQUIRE(int render_settings__anisotropy) static void track_anisotropy_change_es(const ecs::Event &, GrassRenderer &grass_render) { grass_render.grass.applyAnisotropy(); } -void grass_prepare(const TMatrix &itm) +void grass_prepare(const TMatrix &itm, const Driver3dPerspective &perspective) { - get_grass_render_ecs_query([&](GrassRenderer &grass_render) { grass_render.generateGrass(itm); }); + get_grass_render_ecs_query([&](GrassRenderer &grass_render) { grass_render.generateGrass(itm, perspective); }); } void grass_invalidate() diff --git a/prog/daNetGame/render/grass/grassRenderer.h b/prog/daNetGame/render/grass/grassRenderer.h index 67549f160..57a2bb020 100644 --- a/prog/daNetGame/render/grass/grassRenderer.h +++ b/prog/daNetGame/render/grass/grassRenderer.h @@ -27,7 +27,7 @@ struct GrassRenderer void renderGrassPrepassInternal(); void renderGrassPrepass(); void renderGrass(); - void generateGrass(const TMatrix &itm); + void generateGrass(const TMatrix &itm, const Driver3dPerspective &perspective); void setGrassErasers(int count, const Point4 *erasers); void addGrassEraser(const Point3 &world_pos, float radius); void clearGrassErasers(); diff --git a/prog/daNetGame/render/skiesSettingsES.cpp.gen.es.cpp b/prog/daNetGame/render/skiesSettingsES.cpp.gen.es.cpp index 8b4be7715..a3ba5ecb5 100644 --- a/prog/daNetGame/render/skiesSettingsES.cpp.gen.es.cpp +++ b/prog/daNetGame/render/skiesSettingsES.cpp.gen.es.cpp @@ -190,6 +190,35 @@ static ecs::EntitySystemDesc strata_clouds_es_event_handler_es_desc ecs::EventComponentsAppear>::build(), 0 ,nullptr,"*"); +static constexpr ecs::ComponentDesc strata_clouds_tex_es_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("strata_clouds__tex"), ecs::ComponentTypeInfo()}, +//start of 1 rq components at [1] + {ECS_HASH("skies_settings_tag"), ecs::ComponentTypeInfo()} +}; +static void strata_clouds_tex_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + strata_clouds_tex_es(evt + , ECS_RO_COMP(strata_clouds_tex_es_comps, "strata_clouds__tex", ecs::string) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc strata_clouds_tex_es_es_desc +( + "strata_clouds_tex_es", + "prog/daNetGame/render/skiesSettingsES.cpp.inl", + ecs::EntitySystemOps(nullptr, strata_clouds_tex_es_all_events), + empty_span(), + make_span(strata_clouds_tex_es_comps+0, 1)/*ro*/, + make_span(strata_clouds_tex_es_comps+1, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,nullptr,"*"); static constexpr ecs::ComponentDesc clouds_form_es_event_handler_comps[] = { //start of 6 ro components at [0] diff --git a/prog/daNetGame/render/skiesSettingsES.cpp.inl b/prog/daNetGame/render/skiesSettingsES.cpp.inl index 53e23392c..c7d1601ef 100644 --- a/prog/daNetGame/render/skiesSettingsES.cpp.inl +++ b/prog/daNetGame/render/skiesSettingsES.cpp.inl @@ -137,6 +137,20 @@ static __forceinline void strata_clouds_es_event_handler( invalidate_skies(skies); } +// strata_clouds_texture +ECS_REQUIRE(ecs::Tag skies_settings_tag) +ECS_TRACK(*) +ECS_ON_EVENT(on_appear, SkiesLoaded) +static void strata_clouds_tex_es(const ecs::Event &, const ecs::string &strata_clouds__tex) +{ + DngSkies *skies = get_daskies(); + if (!skies) + return; + + skies->setStrataCloudsTexture(strata_clouds__tex.c_str()); + invalidate_skies(skies); +}; + // clouds_form ECS_REQUIRE(ecs::Tag skies_settings_tag) diff --git a/prog/daNetGame/render/world/bvhES.cpp.inl b/prog/daNetGame/render/world/bvhES.cpp.inl index 742c3dc61..a82d95398 100644 --- a/prog/daNetGame/render/world/bvhES.cpp.inl +++ b/prog/daNetGame/render/world/bvhES.cpp.inl @@ -26,6 +26,10 @@ #include #include #include +#include + +CONSOLE_BOOL_VAL("raytracing", rtr_shadow, false); +CONSOLE_BOOL_VAL("raytracing", rtr_use_csm, true); // Context ID with the same lifespan as WorldRenderer. // Can't be stored in ECS, because then it'd be reset on level change. @@ -351,7 +355,8 @@ static dabfg::NodeHandle makeRTRNode() registry.read("close_depth").texture().atStage(dabfg::Stage::PS_OR_CS).bindToShaderVar("downsampled_close_depth_tex").handle(); return [cameraHndl, closeDepthHndl]() { set_viewvecs_to_shader(cameraHndl.ref().viewTm, cameraHndl.ref().jitterProjTm); - rtr::render(bvhRenderingContextId, cameraHndl.ref().jitterProjTm, true, false, false, closeDepthHndl.view().getTexId()); + rtr::render(bvhRenderingContextId, cameraHndl.ref().jitterProjTm, rtr_shadow, rtr_use_csm, false, + closeDepthHndl.view().getTexId()); }; }); } diff --git a/prog/daNetGame/render/world/frameGraphNodes/ambientOcclusionNodes.cpp b/prog/daNetGame/render/world/frameGraphNodes/ambientOcclusionNodes.cpp index 382856d2e..e173ae123 100644 --- a/prog/daNetGame/render/world/frameGraphNodes/ambientOcclusionNodes.cpp +++ b/prog/daNetGame/render/world/frameGraphNodes/ambientOcclusionNodes.cpp @@ -113,6 +113,7 @@ static dabfg::NodeHandle gen_ssao_node(int w, int h, uint32_t ssao_flags) registry.read("close_depth_sampler").blob().bindToShaderVar("downsampled_close_depth_tex_samplerstate"); bindHistoryShaderVar("prev_downsampled_close_depth_tex", "close_depth"); + registry.read("close_depth_sampler").blob().bindToShaderVar("prev_downsampled_close_depth_tex_samplerstate"); // Only used on some presets bindShaderVar("downsampled_normals", "downsampled_normals").optional(); diff --git a/prog/daNetGame/render/world/frameGraphNodes/screenSpaceReflectionNode.cpp b/prog/daNetGame/render/world/frameGraphNodes/screenSpaceReflectionNode.cpp index e2c432184..0d62abc47 100644 --- a/prog/daNetGame/render/world/frameGraphNodes/screenSpaceReflectionNode.cpp +++ b/prog/daNetGame/render/world/frameGraphNodes/screenSpaceReflectionNode.cpp @@ -63,6 +63,8 @@ eastl::fixed_vector makeScreenSpaceReflectionNodes( bindShaderVar("downsampled_close_depth_tex", "close_depth"); bindHistoryShaderVar("prev_downsampled_close_depth_tex", "close_depth"); + registry.read("close_depth_sampler").blob().bindToShaderVar("prev_downsampled_close_depth_tex_samplerstate"); + registry.read("close_depth_sampler").blob().bindToShaderVar("downsampled_close_depth_tex_samplerstate"); bindShaderVar("downsampled_normals", "downsampled_normals"); registry.read("downsampled_normals_sampler").blob().bindToShaderVar("downsampled_normals_samplerstate"); @@ -156,6 +158,10 @@ eastl::fixed_vector makeScreenSpaceReflectionNodes( bindShaderVar("downsampled_close_depth_tex", "close_depth"); bindHistoryShaderVar("prev_downsampled_close_depth_tex", "close_depth"); + registry.read("close_depth_sampler") + .blob() + .bindToShaderVar("prev_downsampled_close_depth_tex_samplerstate"); + registry.read("close_depth_sampler").blob().bindToShaderVar("downsampled_close_depth_tex_samplerstate"); bindShaderVar("downsampled_normals", "downsampled_normals"); registry.read("downsampled_normals_sampler").blob().bindToShaderVar("downsampled_normals_samplerstate"); diff --git a/prog/daNetGame/render/world/global_vars.h b/prog/daNetGame/render/world/global_vars.h index f0337afe4..5b8414858 100644 --- a/prog/daNetGame/render/world/global_vars.h +++ b/prog/daNetGame/render/world/global_vars.h @@ -60,6 +60,7 @@ VAR(film_grain_params) #define GLOBAL_VARS_OPTIONAL_LIST \ + VAR(uv_temporal_jitter) \ VAR(glass_shadow_k) \ VAR(gi_hero_cockpit_distance) \ VAR(scratch_params) \ diff --git a/prog/daNetGame/render/world/worldRenderer.cpp b/prog/daNetGame/render/world/worldRenderer.cpp index dd18f78f0..c761b815d 100644 --- a/prog/daNetGame/render/world/worldRenderer.cpp +++ b/prog/daNetGame/render/world/worldRenderer.cpp @@ -567,6 +567,8 @@ void WorldRenderer::setWater(FFTWater *fftWater) ShaderGlobal::set_real(water_levelVarId, waterLevel = HeightmapHeightCulling::NO_WATER_ON_LEVEL); } + setupWaterQuality(); + fft_water::close_flowmap(water); } @@ -1941,24 +1943,27 @@ void WorldRenderer::setResolution() if (!hasFeature(FeatureRenderFlags::PREV_OPAQUE_TEX)) ShaderGlobal::set_texture(water_refraction_texVarId, BAD_TEXTUREID); - resetBackBufferTex(); + auto setRtControl = [this](RtControl nrt, bool force = false) { + if (eastl::exchange(rtControl, nrt) != nrt || force) + resetBackBufferTex(); + }; if (hdrrender::is_hdr_enabled()) { - rtControl = RtControl::RT; - hdrrender::set_resolution(displayResolution.x, displayResolution.y, isFsrEnabled()); + auto prevt = hdrrender::get_render_target_tex(); + hdrrender::set_resolution(displayResolution.x, displayResolution.y, isFsrEnabled()); // This might re-create tex + setRtControl(RtControl::RT, /*force*/ prevt != hdrrender::get_render_target_tex()); setFinalTargetTex(&hdrrender::get_render_target()); } else if (!d3d::get_backbuffer_tex() || overrideDisplayRes) { - rtControl = RtControl::OWNED_RT; + setRtControl(RtControl::OWNED_RT, /*force*/ true); ownedBackbufferTex = dag::create_tex(NULL, displayResolution.x, displayResolution.y, TEXCF_RTARGET | (isFsrEnabled() ? TEXCF_UNORDERED : 0), 1, "final_target_frame"); - setFinalTargetTex(&ownedBackbufferTex); } else { - rtControl = RtControl::BACKBUFFER; + setRtControl(RtControl::BACKBUFFER, /*force*/ !backbufferTex || backbufferTex.getBaseTex() != d3d::get_backbuffer_tex()); updateBackBufferTex(); } @@ -2964,6 +2969,12 @@ void WorldRenderer::createNodes() currentFrameCamera.jitterPersp = jitterPersp; currentFrameCamera.jitterGlobtm = TMatrix4(currentFrameCamera.viewTm) * currentFrameCamera.jitterProjTm; currentFrameCamera.jitterFrustum = currentFrameCamera.jitterGlobtm; + ShaderGlobal::set_color4(uv_temporal_jitterVarId, jitterPersp.ox * 0.5, jitterPersp.oy * -0.5, + prevFrameCamera.jitterPersp.ox * 0.5, prevFrameCamera.jitterPersp.oy * -0.5); + + TMatrix4D viewRotTm = currentFrameCamera.viewTm; + viewRotTm.setrow(3, 0.0f, 0.0f, 0.0f, 1.0f); + currentFrameCamera.viewRotJitterProjTm = TMatrix4(viewRotTm * currentFrameCamera.jitterProjTm); updateTransformations(jitterOffset); auto &camera = cameraHndl.ref(); @@ -4149,7 +4160,7 @@ void WorldRenderer::draw(float realDt) // stall the beginning of deform hmap calculation on the async pipeline, because it can't start until deforming // depth is rendered on the graphics pipeline. d3d::set_render_target(); - grass_prepare(itm); + grass_prepare(itm, persp); createDeforms(); @@ -6558,15 +6569,16 @@ bool WorldRenderer::getNeedShore() return false; if (!lmeshMgr || !water) - { return false; - } - float significantWave = fft_water::get_significant_wave_height(water); - if (significantWave < fft_water::get_shore_wave_threshold(water) && !isForcingWaterWaves) - return false; + fft_water::WaterFlowmap *waterFlowmap = fft_water::get_flowmap(water); + if (waterFlowmap && waterFlowmap->hasSlopes) + return true; - return true; + if (isForcingWaterWaves) + return true; + + return fft_water::get_significant_wave_height(water) >= fft_water::get_shore_wave_threshold(water); } void WorldRenderer::updateShore() @@ -6598,7 +6610,7 @@ void WorldRenderer::updateShore() fft_water::WaterFlowmap *waterFlowmap = fft_water::get_flowmap(water); if (waterFlowmap && waterFlowmap->enabled && (waterFlowmap->flowmapWaveFade.y > fft_water::get_max_wave(water))) { - if (water_quality >= 1) + if (waterFlowmap->hasSlopes || water_quality >= 1) { TIME_D3D_PROFILE(build_flowmap_1) fft_water::build_flowmap(water, shoreTextureSize / 2, shoreTextureSize, currentFrameCamera.cameraWorldPos, 0, true); diff --git a/prog/daNetGame/scripts/stubs/dng.behaviors b/prog/daNetGame/scripts/stubs/dng.behaviors index d1b3c2347..7493d1e55 100644 --- a/prog/daNetGame/scripts/stubs/dng.behaviors +++ b/prog/daNetGame/scripts/stubs/dng.behaviors @@ -13,6 +13,7 @@ return { TouchScreenStick = "TouchScreenStick" RotateRelativeToDir = "RotateRelativeToDir" RotateByComponent = "RotateByComponent" + OpacityByComponent = "OpacityByComponent" MenuCameraControl = "MenuCameraControl" ActivateActionSet = "ActivateActionSet" ReplayFreeCameraControl = "ReplayFreeCameraControl" diff --git a/prog/daNetGame/shaders/_build/common_assumes.blk b/prog/daNetGame/shaders/_build/common_assumes.blk index 7edf6fea3..0413e0201 100644 --- a/prog/daNetGame/shaders/_build/common_assumes.blk +++ b/prog/daNetGame/shaders/_build/common_assumes.blk @@ -31,7 +31,6 @@ bloom_tex:i=1 dof_linear_depth:i = 0 volumetric_light_assumed_off:i=0 use_directional_blood_on_screen:i=0 -blood_wound_high_quality:i=0 blood_puddles_has_separate_flowmap:i=0 small_sampled_buffers:i=0 clouds_close_layer_is_outside:i = 1 diff --git a/prog/daNetGame/shaders/_build/shaders_tools11.blk b/prog/daNetGame/shaders/_build/shaders_tools11.blk index 31484732f..e4055c2dd 100644 --- a/prog/daNetGame/shaders/_build/shaders_tools11.blk +++ b/prog/daNetGame/shaders/_build/shaders_tools11.blk @@ -71,7 +71,6 @@ Compile volumetric_light_assumed_off:i=1 froxel_fog_use_experimental_offscreen_reprojection:i = 0 use_directional_blood_on_screen:i=0 - blood_wound_high_quality:i=0 blood_puddles_has_separate_flowmap:i=0 small_sampled_buffers:i=0 assume_fom_shadows:i=1 diff --git a/prog/daNetGame/shaders/deferred_shadow_common.dshl b/prog/daNetGame/shaders/deferred_shadow_common.dshl index f8cc3e145..77ea20645 100644 --- a/prog/daNetGame/shaders/deferred_shadow_common.dshl +++ b/prog/daNetGame/shaders/deferred_shadow_common.dshl @@ -467,12 +467,12 @@ macro USE_DEFERRED_SHADOW_PER_SAMPLE(code) BRANCH if (shadow > 0) { - result = standardBRDF( NoV, NoL, gbuffer.diffuseColor, ggx_alpha, gbuffer.linearRoughness, gbuffer.specularColor, enviSSR*gbuffer.extracted_albedo_ao, lightDir, view, gbuffer.normal, sheenColor, sheenStrength)*(shadow)*lightColor*caustics.x; + result = standardBRDF( NoV, NoL, gbuffer.diffuseColor, ggx_alpha, gbuffer.linearRoughness, gbuffer.specularColor, gbuffer.extracted_albedo_ao, lightDir, view, gbuffer.normal, sheenColor, sheenStrength)*(shadow)*lightColor*caustics.x; float lightningNoL = dot(gbuffer.normal, lightning_dir); BRANCH if (lightning_scene_illumination && lightningNoL > 0) { - result += standardBRDF( NoV, lightningNoL, gbuffer.diffuseColor, ggx_alpha, gbuffer.linearRoughness, gbuffer.specularColor, enviSSR*gbuffer.extracted_albedo_ao, lightning_dir, view, gbuffer.normal, sheenColor, sheenStrength)*(shadow)*lightning_color; + result += standardBRDF( NoV, lightningNoL, gbuffer.diffuseColor, ggx_alpha, gbuffer.linearRoughness, gbuffer.specularColor, gbuffer.extracted_albedo_ao, lightning_dir, view, gbuffer.normal, sheenColor, sheenStrength)*(shadow)*lightning_color; } } result += get_dynamic_lighting(gbuffer, worldPos.xyz, -viewVect, w, screenpos, NoV, specularColor, curViewTc, enviAO); diff --git a/prog/daNetGame/shaders/deferred_shadow_simple.dshl b/prog/daNetGame/shaders/deferred_shadow_simple.dshl index a46da746b..a0bf3327e 100644 --- a/prog/daNetGame/shaders/deferred_shadow_simple.dshl +++ b/prog/daNetGame/shaders/deferred_shadow_simple.dshl @@ -253,6 +253,7 @@ shader deferred_simple, satellite_render_resolve //result.rgb = apply_fog(result.rgb, pointToEye); result.rgb = pack_hdr(result.rgb).rgb; ##if shader == satellite_render_resolve + result.rgb *= getExposureScale(); result.rgb = performLUTTonemap(result.rgb); ##endif return float4(result,1); diff --git a/prog/daNetGame/shaders/distortion_postfx.dshl b/prog/daNetGame/shaders/distortion_postfx.dshl index f897bef68..46546c56b 100644 --- a/prog/daNetGame/shaders/distortion_postfx.dshl +++ b/prog/daNetGame/shaders/distortion_postfx.dshl @@ -1,9 +1,8 @@ +include "distortion_postfx_inc.dshl" include "contrast_adaptive_sharpening.dshl" include "heatHazeOffset.dshl" include "postfx_common.dshl" -float4 chromatic_aberration_params = float4(0.01,0.007,1,0); - shader distortion_postfx { INIT_HEAT_HAZE_OFFSET() @@ -12,39 +11,7 @@ shader distortion_postfx { INIT_CONTRAST_ADAPTIVE_SHARPENING(ps) USE_CONTRAST_ADAPTIVE_SHARPENING(ps) - local float4 frame_tex_resolution = get_dimensions(frame_tex, 0); - - (ps) { - frame_tex@smp2d = frame_tex; - frame_tex_resolution@f4 = (frame_tex_resolution.xy, 1/frame_tex_resolution.xy); - chromatic_aberration_params@f3 = chromatic_aberration_params; - } - hlsl(ps) { - #include - #include - #include - - float4 blurred_source2(float2 tc, float2 offset, out float4 centerSample){ - //Can be changed to tex2Dlod with mipmap filter - float4 c0 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, -1) * offset, 0.0, 0.0)); - float4 c1 = h4tex2Dlod(frame_tex, half4(tc + float2(0, -1) * offset, 0.0, 0.0)); - float4 c2 = h4tex2Dlod(frame_tex, half4(tc + float2(1, -1) * offset, 0.0, 0.0)); - float4 c3 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, 0) * offset, 0.0, 0.0)); - float4 c4 = h4tex2Dlod(frame_tex, half4(tc, 0.0, 0.0)); - float4 c5 = h4tex2Dlod(frame_tex, half4(tc + float2(1, 0) * offset, 0.0, 0.0)); - float4 c6 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, 1) * offset, 0.0, 0.0)); - float4 c7 = h4tex2Dlod(frame_tex, half4(tc + float2(0, 1) * offset, 0.0, 0.0)); - float4 c8 = h4tex2Dlod(frame_tex, half4(tc + float2(1, 1) * offset, 0.0, 0.0)); - centerSample = c4; - return 0.0625f * (c0 + 2 * c1 + c2 + 2 * c3 + 4 * c4 + 2 * c5 + c6 + 2 * c7 + c8); - } - - float4 blurred_source(float2 tc, float offset){ - float4 centerSample; - return blurred_source2(tc, float2(offset,offset), centerSample); - } - half3 sampleSceneColor(float2 uv) { if(contrast_adaptive_sharpening < -0.125) @@ -52,74 +19,22 @@ shader distortion_postfx { else return tex2Dlod(frame_tex, float4(uv,0,0)).rgb; } + } - float4 distortion_postfx_ps(VsOutput input HW_USE_SCREEN_POS) : SV_Target0 - { - half2 distortionOffset; - half3 distortionOffsetMul; - half distortionBlur; - sample_heat_haze_offset_mul_blur(input.tc, distortionOffset, distortionOffsetMul, distortionBlur); - - float2 sceneUV = input.tc + distortionOffset; - float3 frame; + INIT_DISTORTION_POSTFX() + USE_DISTORTION_POSTFX() - BRANCH - if (all(distortionOffsetMul == 1)) - { - ##if (haze_offset_tex != NULL) - BRANCH - if (distortionBlur > distortionBlurThreshold) - frame = blurred_source(sceneUV, distortionBlur).rgb; - else - ##endif - frame = sampleSceneColor(sceneUV); - } - else - { - ##if (haze_offset_tex != NULL) - BRANCH - if (distortionBlur > distortionBlurThreshold) - { - frame.r = blurred_source(input.tc + distortionOffset * distortionOffsetMul.r, distortionBlur).r; - frame.g = blurred_source(input.tc + distortionOffset * distortionOffsetMul.g, distortionBlur).g; - frame.b = blurred_source(input.tc + distortionOffset * distortionOffsetMul.b, distortionBlur).b; - } - else - ##endif - { - frame.r = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.r).r; - frame.g = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.g).g; - frame.b = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.b).b; - } - } - - BRANCH - if (chromatic_aberration_params.z < 1) - { - float2 screenPosR = (input.tc + distortionOffset * distortionOffsetMul.r)*2-1; - float2 screenPosG = (input.tc + distortionOffset * distortionOffsetMul.g)*2-1; - float4 screenPos = float4(screenPosR, screenPosG); - float2 caRGScale = chromatic_aberration_params.xy; - float caStartOffset = chromatic_aberration_params.z; + local float4 frame_tex_resolution = get_dimensions(frame_tex, 0); - float4 uvRG; - uvRG = screenPos - sign(screenPos) * saturate(abs(screenPos) - caStartOffset) * caRGScale.xxyy; - uvRG = uvRG*0.5+0.5; - ##if (haze_offset_tex != NULL) - BRANCH - if (distortionBlur > distortionBlurThreshold) - { - frame.r = blurred_source(uvRG.xy, distortionBlur).r; - frame.g = blurred_source(uvRG.zw, distortionBlur).g; - } - else - ##endif - { - frame.r = sampleSceneColor(uvRG.xy).r; - frame.g = sampleSceneColor(uvRG.zw).g; - } - } + (ps) { + frame_tex@smp2d = frame_tex; + frame_tex_resolution@f4 = (frame_tex_resolution.xy, 1/frame_tex_resolution.xy); + } + hlsl(ps) { + float4 distortion_postfx_ps(VsOutput input HW_USE_SCREEN_POS) : SV_Target0 + { + float3 frame = apply_distortion_postfx(input); return float4(frame, 1.0); } } diff --git a/prog/daNetGame/shaders/distortion_postfx_inc.dshl b/prog/daNetGame/shaders/distortion_postfx_inc.dshl new file mode 100644 index 000000000..77662d31a --- /dev/null +++ b/prog/daNetGame/shaders/distortion_postfx_inc.dshl @@ -0,0 +1,108 @@ +include "contrast_adaptive_sharpening.dshl" +include "heatHazeOffset.dshl" + +float4 chromatic_aberration_params = float4(0.01,0.007,1,0); + +macro INIT_DISTORTION_POSTFX() + (ps) { + chromatic_aberration_params@f3 = chromatic_aberration_params; + } +endmacro + +macro USE_DISTORTION_POSTFX() + hlsl(ps) { + #include + #include + #include + + float4 blurred_source2(float2 tc, float2 offset, out float4 centerSample){ + //Can be changed to tex2Dlod with mipmap filter + float4 c0 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, -1) * offset, 0.0, 0.0)); + float4 c1 = h4tex2Dlod(frame_tex, half4(tc + float2(0, -1) * offset, 0.0, 0.0)); + float4 c2 = h4tex2Dlod(frame_tex, half4(tc + float2(1, -1) * offset, 0.0, 0.0)); + float4 c3 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, 0) * offset, 0.0, 0.0)); + float4 c4 = h4tex2Dlod(frame_tex, half4(tc, 0.0, 0.0)); + float4 c5 = h4tex2Dlod(frame_tex, half4(tc + float2(1, 0) * offset, 0.0, 0.0)); + float4 c6 = h4tex2Dlod(frame_tex, half4(tc + float2(-1, 1) * offset, 0.0, 0.0)); + float4 c7 = h4tex2Dlod(frame_tex, half4(tc + float2(0, 1) * offset, 0.0, 0.0)); + float4 c8 = h4tex2Dlod(frame_tex, half4(tc + float2(1, 1) * offset, 0.0, 0.0)); + centerSample = c4; + return 0.0625f * (c0 + 2 * c1 + c2 + 2 * c3 + 4 * c4 + 2 * c5 + c6 + 2 * c7 + c8); + } + + float4 blurred_source(float2 tc, float offset){ + float4 centerSample; + return blurred_source2(tc, float2(offset,offset), centerSample); + } + + float3 apply_distortion_postfx(VsOutput input HW_USE_SCREEN_POS) : SV_Target0 + { + half2 distortionOffset; + half3 distortionOffsetMul; + half distortionBlur; + sample_heat_haze_offset_mul_blur(input.tc, distortionOffset, distortionOffsetMul, distortionBlur); + + float2 sceneUV = input.tc + distortionOffset; + float3 frame; + + BRANCH + if (all(distortionOffsetMul == 1)) + { + ##if (haze_offset_tex != NULL) + BRANCH + if (distortionBlur > distortionBlurThreshold) + frame = blurred_source(sceneUV, distortionBlur).rgb; + else + ##endif + frame = sampleSceneColor(sceneUV); + } + else + { + ##if (haze_offset_tex != NULL) + BRANCH + if (distortionBlur > distortionBlurThreshold) + { + frame.r = blurred_source(input.tc + distortionOffset * distortionOffsetMul.r, distortionBlur).r; + frame.g = blurred_source(input.tc + distortionOffset * distortionOffsetMul.g, distortionBlur).g; + frame.b = blurred_source(input.tc + distortionOffset * distortionOffsetMul.b, distortionBlur).b; + } + else + ##endif + { + frame.r = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.r).r; + frame.g = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.g).g; + frame.b = sampleSceneColor(input.tc + distortionOffset * distortionOffsetMul.b).b; + } + } + + BRANCH + if (chromatic_aberration_params.z < 1) + { + float2 screenPosR = (input.tc + distortionOffset * distortionOffsetMul.r)*2-1; + float2 screenPosG = (input.tc + distortionOffset * distortionOffsetMul.g)*2-1; + float4 screenPos = float4(screenPosR, screenPosG); + float2 caRGScale = chromatic_aberration_params.xy; + float caStartOffset = chromatic_aberration_params.z; + + float4 uvRG; + uvRG = screenPos - sign(screenPos) * saturate(abs(screenPos) - caStartOffset) * caRGScale.xxyy; + uvRG = uvRG*0.5+0.5; + ##if (haze_offset_tex != NULL) + BRANCH + if (distortionBlur > distortionBlurThreshold) + { + frame.r = blurred_source(uvRG.xy, distortionBlur).r; + frame.g = blurred_source(uvRG.zw, distortionBlur).g; + } + else + ##endif + { + frame.r = sampleSceneColor(uvRG.xy).r; + frame.g = sampleSceneColor(uvRG.zw).g; + } + } + + return frame; + } + } +endmacro \ No newline at end of file diff --git a/prog/daNetGame/shaders/gbuffer.dshl b/prog/daNetGame/shaders/gbuffer.dshl index 4907c04b5..6b8ad2846 100644 --- a/prog/daNetGame/shaders/gbuffer.dshl +++ b/prog/daNetGame/shaders/gbuffer.dshl @@ -8,6 +8,7 @@ texture normal_gbuf; texture material_gbuf; texture depth_gbuf; texture motion_gbuf; +float4 uv_temporal_jitter = (0,0,0,0);//.xy - current, .zw - prev in uv texture bvh_gbuf; int4 gbuffer_view_size = (1, 1, 0, 0); diff --git a/prog/daNetGame/shaders/init_projective_wounds.dshl b/prog/daNetGame/shaders/init_projective_wounds.dshl index 74da54000..60cddb6e0 100644 --- a/prog/daNetGame/shaders/init_projective_wounds.dshl +++ b/prog/daNetGame/shaders/init_projective_wounds.dshl @@ -2,14 +2,20 @@ texture teared_wounds_decal; texture wounds_decal_array; texture burned_cloth; texture burned_flesh; -float4 high_intensity_blood = (0.04, 0.001, 0, 0.5); -float4 low_intensity_blood = (0.0, 0.00, 0, 0.3); -float4 wet_blood_color = (0.157, 0.012, 0.000, 1); -float4 dry_blood_color = (0.086, 0.024, 0.020, 1); -float blood_wound_high_wetness_thickness = 0.75; -float blood_wound_opaque_thickness = 0.8; -float blood_wound_max_thickness = 0.93; -float blood_wound_drying_time = 1.0 / 120.0; + +float blood_wound_meat_smoothness = 0.8; +float blood_wound_meat_reflectance = 0.21; +float blood_wound_meat_intensity_border = 0.2; +float blood_wound_meat_edge_scale = 0.3; +float4 blood_wound_meat_color_high_intensity = (0.007, 0, 0, 1); +float4 blood_wound_meat_color_low_intensity = (0.002, 0, 0, 1); + +float blood_wound_dark_albedo_compensation_factor = 0.04; +float blood_wound_low_porosity_reflectance = 0.3; +float blood_wound_dry_edge_scale = 0.5; +float4 blood_wound_color_high_intensity = (0.05, 0, 0, 1); +float4 blood_wound_color_low_intensity = (0.3, 0.02, 0, 1); + float bloody_time = 0.25; float blood_tex_discard_threshold = 0.85; float sample_tex_inside_of = 0.9; @@ -17,9 +23,6 @@ float blood_brightness = 2.0; int debug_torn_wounds = 0; interval debug_torn_wounds: off<1, on; -int blood_wound_high_quality = 0; -interval blood_wound_high_quality : no<1, yes; - macro INIT_BURNED_DIFFUSE_FUNCTION() (ps) { burned_cloth@tex2d = burned_cloth; @@ -36,22 +39,29 @@ macro INIT_PROJECTIVE_WOUNDS() sample_tex_inside_of@f1 = sample_tex_inside_of; blood_brightness@f1 = blood_brightness; } -if (blood_wound_high_quality == no) { - (ps) { - high_intensity_blood@f4 = high_intensity_blood; - low_intensity_blood@f4 = low_intensity_blood; - } -} else { - (ps) { - wet_blood_color@f3 = wet_blood_color; - dry_blood_color@f3 = dry_blood_color; - blood_wound_high_wetness_thickness@f1 = blood_wound_high_wetness_thickness; - blood_wound_opaque_thickness@f1 = blood_wound_opaque_thickness; - blood_wound_max_thickness@f1 = blood_wound_max_thickness; - blood_wound_max_thickness_minus_opaque_thickness@f1 = (blood_wound_max_thickness - blood_wound_opaque_thickness); - blood_wound_drying_time@f1 = blood_wound_drying_time; - } + +local float blood_wound_puddle_begin_thickness = 1.0 - blood_wound_meat_intensity_border; +local float blood_wound_puddle_edge_thickness_width = blood_wound_puddle_begin_thickness*blood_wound_meat_edge_scale; + +(ps) { + blood_wound_meat_smoothness@f1 = blood_wound_meat_smoothness; + blood_wound_meat_reflectance@f1 = blood_wound_meat_reflectance; + blood_wound_puddle_begin_thickness@f1 = blood_wound_puddle_begin_thickness; + blood_wound_meat_edge_scale@f1 = blood_wound_meat_edge_scale; + blood_wound_puddle_edge_thickness_width@f1 = blood_wound_puddle_edge_thickness_width; + blood_wound_puddle_edge_ending_thickness@f1 = (blood_wound_puddle_begin_thickness + blood_wound_puddle_edge_thickness_width); + blood_wound_meat_color_high_intensity@f3 = blood_wound_meat_color_high_intensity.xyz; + blood_wound_meat_color_low_intensity@f3 = blood_wound_meat_color_low_intensity.xyz; + one_minus_blood_puddle_begin_thickness@f1 = (1.0 - blood_wound_puddle_begin_thickness); + + blood_wound_dark_albedo_compensation_factor@f1 = blood_wound_dark_albedo_compensation_factor; + blood_wound_low_porosity_reflectance@f1 = blood_wound_low_porosity_reflectance; + blood_wound_dry_edge_scale@f1 = blood_wound_dry_edge_scale; + blood_wound_color_high_intensity@f3 = blood_wound_color_high_intensity.xyz; + blood_wound_color_low_intensity@f3 = blood_wound_color_low_intensity.xyz; + } + endmacro macro INIT_BURNED_DIFFUSE_FUNCTION_BLOCK() diff --git a/prog/daNetGame/shaders/postfx.dshl b/prog/daNetGame/shaders/postfx.dshl index 0b0bfe412..32cf0a669 100644 --- a/prog/daNetGame/shaders/postfx.dshl +++ b/prog/daNetGame/shaders/postfx.dshl @@ -1,5 +1,6 @@ include "postfx_common.dshl" include "dof/dof_composite.dshl" +include "distortion_postfx_inc.dshl" include "normaldetail.dshl" include "sky_shader_global.dshl" include "contact_shadows.dshl" @@ -216,6 +217,13 @@ shader postfx #endif //MOBILE_DEVICE } + if (in_editor_assume == yes) { + INIT_HEAT_HAZE_OFFSET() + USE_HEAT_HAZE_OFFSET() + INIT_DISTORTION_POSTFX() + USE_DISTORTION_POSTFX() + } + USE_POSTFX_MODIFIER() USE_POSTFX_POST_TONEMAP_EFFECTS_MODIFIER() USE_LOCAL_TONE_MAPPING(ps) @@ -435,7 +443,11 @@ shader postfx #if MOBILE_DEVICE sampleSceneColor(sceneUV, frame); #else - frame = sampleSceneColor(sceneUV); + ##if (in_editor_assume == yes) + frame = apply_distortion_postfx(input); + ##else + frame = sampleSceneColor(sceneUV); + ##endif #endif apply_dof_effect(input.tc, frame); diff --git a/prog/daNetGame/shaders/projective_wounds.dshl b/prog/daNetGame/shaders/projective_wounds.dshl index 306450e89..67e9fb142 100644 --- a/prog/daNetGame/shaders/projective_wounds.dshl +++ b/prog/daNetGame/shaders/projective_wounds.dshl @@ -246,19 +246,11 @@ hlsl (ps) { float alpha = saturate(bloodIntensity * blood_brightness); - ##if blood_wound_high_quality == no - float3 bloodColor = high_intensity_blood.rgb * distFactor; - diffuse_color = lerp(diffuse_color, bloodColor, alpha); - - float bloodSmoothness = high_intensity_blood.a; - smoothness = lerp(smoothness, bloodSmoothness, alpha); - ##else - float3 bloodColor = wet_blood_color * distFactor; + float3 bloodColor = blood_wound_color_high_intensity * distFactor; diffuse_color = lerp(diffuse_color, diffuse_color * bloodColor, alpha); float porosity = get_porosity_by_microdetail_base(micro_detail_layer); smoothness = lerp(smoothness, 0.9, (1.0 - porosity) * alpha); - ##endif float3 bloodNorm = lerp(detailed_normal_map, original_normalmap, 0.5); detailed_normal_map = lerp(detailed_normal_map, bloodNorm, alpha); @@ -340,43 +332,48 @@ hlsl(ps) { return abs (floor(f + eps) - f) <= eps; } -##if blood_wound_high_quality == yes - void apply_blood_material(float thickness, float edge_closeness, float drying_time, float porosity, + void apply_blood_material(float thickness, float edge_closeness, float porosity, float3 blood_normal, inout float3 normal, inout float3 albedo, inout float smoothness, inout float reflectance) { - thickness = min(thickness, blood_wound_max_thickness); - - float3 bloodColor = lerp(wet_blood_color, dry_blood_color, drying_time) - * (1.0 - thickness); - - bool isPuddleHole = thickness >= blood_wound_opaque_thickness; - - float thicknessDrying = max(0.5, 1.0 - drying_time); - thickness *= thicknessDrying; + bool isPuddleHole = thickness >= blood_wound_puddle_begin_thickness; + float materialReflectance = lerp(blood_wound_low_porosity_reflectance, min(reflectance, blood_wound_low_porosity_reflectance), porosity); + float3 materialNormal = lerp(blood_normal, normal, porosity); + float materialSmoothness = lerp(1.0, smoothness, porosity); - float3 opacityColor = lerp(bloodColor.rrr, 1.0.xxx, edge_closeness); - float3 bloodAlbedo = lerp(bloodColor, opacityColor, edge_closeness * drying_time) - * albedo; - float3 opaqueColor = float3(0.0007,0,0); - - float bloodOpacity = saturate((thickness - edge_closeness - blood_wound_opaque_thickness) / blood_wound_max_thickness_minus_opaque_thickness); - albedo = lerp(bloodAlbedo, opaqueColor, bloodOpacity); + BRANCH + if (isPuddleHole) + { + float colorT = (thickness - blood_wound_puddle_begin_thickness) / one_minus_blood_puddle_begin_thickness; + float3 bloodColor = lerp(blood_wound_meat_color_high_intensity, blood_wound_meat_color_low_intensity, colorT); + + float edgeT = saturate((blood_wound_puddle_edge_ending_thickness - thickness) / (blood_wound_puddle_edge_thickness_width + 0.0001)); + edgeT = pow3(edgeT); + float3 bloodOnMaterialColor = albedo * blood_wound_color_low_intensity; + float3 bloodAlbedo = lerp(bloodColor, bloodOnMaterialColor, edgeT); + + albedo = bloodAlbedo; + smoothness = lerp(blood_wound_meat_smoothness, materialSmoothness, edgeT); + reflectance = lerp(blood_wound_meat_reflectance, materialReflectance, edgeT); + normal = lerp(blood_normal, materialNormal, edgeT); + } + else + { + float edgeClosenessWithPorosity = edge_closeness * porosity; + float colorT = thickness / blood_wound_puddle_begin_thickness; - float invPorosity = 1.0-porosity; - float lowWetnessBlend = invPorosity * lerp(1.0, 0.05, drying_time); - smoothness = thickness < blood_wound_high_wetness_thickness - ? lerp(smoothness, 0.9, lowWetnessBlend) - : 0.9; + float3 bloodColor = lerp(blood_wound_color_high_intensity, blood_wound_color_low_intensity, colorT); + float3 opacityColor = lerp(bloodColor.rrr, 1.0.xxx, edgeClosenessWithPorosity); + float3 bloodAlbedo = lerp(bloodColor, opacityColor, edgeClosenessWithPorosity); - reflectance = lerp(reflectance, 0.19, lowWetnessBlend); + float darkAlbedoCompensationT = blood_wound_dark_albedo_compensation_factor * (1.0 - porosity); + albedo = lerp(bloodAlbedo * albedo, bloodAlbedo, darkAlbedoCompensationT); - float normalBlend = isPuddleHole - ? 1.0 - : max(edge_closeness, thickness) * invPorosity; - normal = lerp(normal, blood_normal, normalBlend); + reflectance = materialReflectance; + smoothness = materialSmoothness; + normal = materialNormal; + } } -##endif void apply_blood_decal(float4 decal_tc, float start_time, uint tex_index, float3 frag_norm, int micro_detail_layer, @@ -395,24 +392,6 @@ hlsl(ps) { float time = current_time - start_time; float bloody_time = time_wetness_bloody_time.y; -##if blood_wound_high_quality == no - time = saturate(bloody_time * time); - float time_func = 1 - (1 - blood.r) / (time + eps); - const float brightnessDepthFactor = 2.5; - const float brightnessTimeFactor = 2.0; - float depth_factor = saturate(brightnessDepthFactor * (1 - length(decal_tc.xyz))); - float time_factor = saturate(brightnessTimeFactor * time_func); - - float alpha = depth_factor * time_factor; - float bloodIntensive = blood.b; - float4 bloodColorSmoothness = lerp(low_intensity_blood, high_intensity_blood, bloodIntensive); - bloodColorSmoothness = lerp(float4(diffuse_color, smoothness), bloodColorSmoothness, alpha); - - diffuse_color = bloodColorSmoothness.rgb; - smoothness = bloodColorSmoothness.a; - float3 bloodNorm = unpack_ag_normal(blood); - detailed_normal_map = lerp(detailed_normal_map, bloodNorm, alpha); -##else float linearTime = saturate(bloody_time * time); float flowValue = blood.r; @@ -420,8 +399,7 @@ hlsl(ps) { if ((1.0 - linearTime) >= flowValue - 0.1) return; - float dryingTime = saturate(time * blood_wound_drying_time); - float borderScale = 4.0; + float borderScale = 4.0 * blood_wound_dry_edge_scale; float edgeCloseness = 1.0 - saturate((flowValue - (1.0 - linearTime))*borderScale); float intensity = blood.b; @@ -429,9 +407,8 @@ hlsl(ps) { float porosity = get_porosity_by_microdetail_base(micro_detail_layer); float3 bloodNormal = unpack_ag_normal(blood); - apply_blood_material(thickness, edgeCloseness, dryingTime, porosity, bloodNormal, + apply_blood_material(thickness, edgeCloseness, porosity, bloodNormal, detailed_normal_map, diffuse_color, smoothness, reflectance); -##endif } } } diff --git a/prog/daNetGame/shaders/rendinst_inc.dshl b/prog/daNetGame/shaders/rendinst_inc.dshl index 95e6dfa38..fbbf21b19 100644 --- a/prog/daNetGame/shaders/rendinst_inc.dshl +++ b/prog/daNetGame/shaders/rendinst_inc.dshl @@ -185,15 +185,17 @@ macro RENDINST_INSTANCING() float4 rendinst_color_to; \ float4 rendinst_interaction_params; \ BRANCH if (!useCbufferParams)\ - {\ perDrawOffset = GET_PER_DRAW_OFFSET; \ - useCbufferParams = perDrawOffset == 0; \ - }\ + useCbufferParams = useCbufferParams || (perDrawOffset == 0); \ + useCbufferInstanceOffset = useCbufferInstanceOffset || (perDrawOffset == 0); \ + BRANCH if (useCbufferInstanceOffset) \ + inst_offset = cb_inst_offset.xyz; \ + else \ + inst_offset = asuint(perDrawInstanceData[perDrawOffset + 1].xyz); \ BRANCH if (useCbufferParams) \ { \ cellxyz_min = cb_cellxyz_min; \ cellxyz_size = cb_cellxyz_size; \ - inst_offset = cb_inst_offset.xyz; \ impostor_data_offset = cb_impostor_data_offset; \ rendinst_opacity = cb_rendinst_opacity; \ bounding_sphere = cb_bounding_sphere; \ @@ -212,7 +214,6 @@ macro RENDINST_INSTANCING() { \ cellxyz_min = perDrawInstanceData[perDrawOffset - 1]; \ cellxyz_size = perDrawInstanceData[perDrawOffset + 0]; \ - inst_offset = asuint(perDrawInstanceData[perDrawOffset + 1].xyz); \ impostor_data_offset = asuint(perDrawInstanceData[perDrawOffset + 1].w); \ rendinst_opacity = perDrawInstanceData[perDrawOffset + 2]; \ bounding_sphere = perDrawInstanceData[perDrawOffset + 3]; \ @@ -261,6 +262,7 @@ macro RENDINST_INSTANCING() uint instNo = uint(instance_id)/INSTANCE_ID_DIVISOR;\ uint voxelize_axis = uint(instance_id)%INSTANCE_ID_DIVISOR;\ bool useCbufferParams = (cb_inst_offset.z & 1) == 0; \ + bool useCbufferInstanceOffset = (cb_inst_offset.z & 4) == 0; \ int perDrawOffset = 0; \ FILL_PER_DRAW_DATA \ uint3 inst_offset2 = inst_offset;\ @@ -274,6 +276,7 @@ macro RENDINST_INSTANCING() uint instNo = uint(instance_id)/INSTANCE_ID_DIVISOR;\ uint voxelize_axis = uint(instance_id)%INSTANCE_ID_DIVISOR;\ bool useCbufferParams = (cb_inst_offset.z & 1) == 0; \ + bool useCbufferInstanceOffset = (cb_inst_offset.z & 4) == 0; \ int perDrawOffset = 0; \ FILL_PER_DRAW_DATA \ uint3 inst_offset2 = inst_offset;\ @@ -291,6 +294,7 @@ macro RENDINST_INSTANCING() uint voxelize_axis = uint(instance_id)%INSTANCE_ID_DIVISOR;\ int perDrawOffset = 0; \ bool useCbufferParams = (cb_inst_offset.z & 1) == 0; \ + bool useCbufferInstanceOffset = (cb_inst_offset.z & 4) == 0; \ FILL_PER_DRAW_DATA \ uint3 inst_offset2 = inst_offset;\ HW_INSTANCE_OFFSET(inst_offset2);\ diff --git a/prog/daNetGame/shaders/rendinst_projective_decal.dshl b/prog/daNetGame/shaders/rendinst_projective_decal.dshl index 0d6774d5a..2d571bcd6 100644 --- a/prog/daNetGame/shaders/rendinst_projective_decal.dshl +++ b/prog/daNetGame/shaders/rendinst_projective_decal.dshl @@ -2,7 +2,7 @@ include "rendinst_opaque_inc.dshl" include "normaldetail.dshl" include "projectiveDecals/projective_decals_common.dshl" -shader rendinst_projective_decal // blood +shader rendinst_projective_decal { if (instancing_type != tm_vb) { @@ -19,6 +19,9 @@ shader rendinst_projective_decal // blood static float4 decal_tc = (0, 0, 1, 1); static float4 box_scale = (1, 1, 1, 0); + static int mapping_mode = 0; + interval mapping_mode: cone_mapping < 1, planar_mapping_fade; + texture tex = material.texture.diffuse; texture normal = material.texture[2]; (ps) { @@ -126,7 +129,10 @@ shader rendinst_projective_decal // blood half3 worldPos = world_view_pos - pointToEye; half3 decalTC = get_decal_tex_coord_from_world_pos(worldPos, input.center, input.normal, input.tangent); decalTC *= input.invBoxSize.xzy; - decalTC.xy /= saturate(1 - abs(decalTC.z) * 2); + half depthScale = saturate(1 - abs(decalTC.z) * 2); + ##if mapping_mode == cone_mapping + decalTC.xy /= depthScale; + ##endif if (max(abs(decalTC.x), abs(decalTC.y)) > 0.5) discard; decalTC.xy = decalTC.xy + 0.5; @@ -134,6 +140,9 @@ shader rendinst_projective_decal // blood half4 diffuse = tex2DBindless(get_diffuse_tex(), decalTC.xy); half alpha = diffuse.a; + ##if mapping_mode == planar_mapping_fade + alpha *= depthScale; + ##endif half3 surfaceNormal = normalize(cross(ddx(pointToEye), ddy(pointToEye))); half dotNormal = dot(surfaceNormal, input.normal); // Hide decal on opposite side of wall/floor diff --git a/prog/daNetGame/shaders/rendinst_translucent.dshl b/prog/daNetGame/shaders/rendinst_translucent.dshl index ddc7b94f2..3a2372fac 100644 --- a/prog/daNetGame/shaders/rendinst_translucent.dshl +++ b/prog/daNetGame/shaders/rendinst_translucent.dshl @@ -9,6 +9,8 @@ include "character_micro_detail.dshl" shader rendinst_translucent { + ENABLE_ASSERT(ps) + VERTEX_DENSITY_INIT_VS() VERTEX_DENSITY_WRITE() diff --git a/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl b/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl index 1c3994877..b7675e071 100644 --- a/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl +++ b/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl @@ -150,6 +150,8 @@ shader rendinst_tree_perlin_layered USE_SPECULAR_FROM_COLOR() } + INIT_VEGETATION_INTERACTIONS() + macro FILL_CURRENT_GBUFFER_LAYERED() (ps){ diffuse_tex@static = tex; @@ -346,6 +348,8 @@ shader rendinst_tree_perlin_layered }; } + USE_AND_APPLY_VEGETATION_INTERACTIONS(is_pivoted == yes && (interactions == interactionsTrees)) + hlsl(vs) { #if PN_TESSELATION #define VS_OUTPUT HsInput @@ -396,6 +400,7 @@ shader rendinst_tree_perlin_layered float3 prevWorldPos; applyWindAnimationOffset(worldPos, worldNormal, Data, tree_wind_params.x, AnimWindScale, worldPos, prevWorldPos, maxMovement); ##endif + APPLY_INTERACTIONS float3 pointToEye = world_view_pos-worldPos; @@ -524,6 +529,8 @@ shader rendinst_tree_perlin_layered DEFINE_PIVOT_POINT_WIND_SCALE() } + USE_AND_APPLY_VEGETATION_INTERACTIONS(is_pivoted == yes && (interactions == interactionsTrees)) + hlsl(vs) { struct VsOutput { @@ -562,6 +569,7 @@ shader rendinst_tree_perlin_layered float3 unusedPrevPos; applyWindAnimationOffset(worldPos, worldNormal, Data, tree_wind_params.x, AnimWindScale, worldPos, unusedPrevPos); ##endif + APPLY_INTERACTIONS output.pos = mulPointTm(worldPos + camera_base_offset, globtm); diff --git a/prog/daNetGame/shaders/rendinst_vegetation.dshl b/prog/daNetGame/shaders/rendinst_vegetation.dshl index d50a5df14..f9f19ebb8 100644 --- a/prog/daNetGame/shaders/rendinst_vegetation.dshl +++ b/prog/daNetGame/shaders/rendinst_vegetation.dshl @@ -125,12 +125,7 @@ shader rendinst_tree_colored, rendinst_tree_colored_alpha_split if (use_cross_dissolve == off) { - static int interactions = 0; - interval interactions: interactionsOff < 1, interactionsTrees < 2, interactionsBushes; - if (interactions == interactionsTrees || interactions == interactionsBushes) - { - static float interaction_strength = 1.0; - } + INIT_VEGETATION_INTERACTIONS() } static int is_colored = 1; interval is_colored : no < 1, yes; @@ -305,201 +300,8 @@ shader rendinst_tree_colored, rendinst_tree_colored_alpha_split } endmacro - - macro VEGETATION_INTERACTIONS() - if (interactions == interactionsTrees || interactions == interactionsBushes) - { - (vs) { interaction_strength@f1 = (interaction_strength); } - } - - if (interactions == interactionsTrees || interactions == interactionsBushes) { - hlsl(vs){ - float4 sdBoxNorm(float3 localPos, float3 boxExt) - { - float3 dist = abs(localPos) - boxExt; - float insideDist = min(max(max(dist.x, dist.y), dist.z), 0); - float3 ptOnBox = max(dist, 0); - float outsideDist = length(ptOnBox); - float signedDist = outsideDist + insideDist; - float3 norm; - FLATTEN - if (signedDist <= 0) - norm = (float3(insideDist == dist.x, insideDist == dist.y, insideDist == dist.z)); - else - norm = ptOnBox / (outsideDist + 1e-6); - norm = (localPos < 0 ? -norm : norm); - return float4(signedDist, norm); - } - - void calculate_obstacles_interaction_force( - float3 worldPivot, float height, inout float2 affect_direction, inout float affect_force, - uint obstIndStart, uint obstIndEnd, uint index) - { - float inverse_height = 1.0 / height; - - // Getting resultant force from all obstacles - for (uint i = obstIndStart; i < obstIndEnd; ++i) - { - uint index = obstacle_indices[i]; - float3 center = float3(obstacles.obstacles[index].dir_x.w, obstacles.obstacles[index].dir_y.w, obstacles.obstacles[index].dir_z.w); - float3 delta = center - worldPivot; - - float3x3 dir_mat = float3x3(obstacles.obstacles[index].dir_x.xyz, - obstacles.obstacles[index].dir_y.xyz, - obstacles.obstacles[index].dir_z.xyz); - float3 local_pos = mul(dir_mat, delta); - float4 distToBoxNorm = sdBoxNorm(local_pos, 0.5 * (obstacles.obstacles[index].box.xyz + height)); - if (distToBoxNorm.x < 0) - { - float radDist = (-distToBoxNorm.x * inverse_height * 2); - affect_direction += lerp(-obstacles.obstacles[index].dir_x.xz, delta.xz, length(delta.xz)); - affect_force += (radDist); - } - } - affect_force *= get_interaction_strength(); - } - - ##if (is_pivoted == yes) - float3 apply_obstacles_joints(float3 worldPivot, float3 worldPos, float3 localPos, float height, HierarchyData input) - { - if (obstacles.indirection_wd == 0) - return float3(0, 0, 0); - - float2 pos = worldPivot.xz - obstacles.indirection_lt; - pos.xy /= obstacles.indirection_cell; - - uint2 coord = clamp(uint2(pos.xy), 0U, obstacles.indirection_wd - 1); - uint index = coord.x + coord.y * obstacles.indirection_wd; - - float3 totalOfs = 0; - uint obstIndCount = obstacle_indices[index]; - uint obstIndStart = obstIndCount >> OBSTACLE_OFFSET_BIT_SHIFT; - uint obstIndEnd = (obstIndCount & ((1U << OBSTACLE_OFFSET_BIT_SHIFT) - 1)) + obstIndStart; - - float2 affect_direction = float2(0,0); - float affect_force = 0; - - calculate_obstacles_interaction_force(worldPivot, height, affect_direction, affect_force, obstIndStart, obstIndEnd, index); - BRANCH - if (affect_force <= 0.0001) - return float3(0, 0, 0); - - affect_direction = -normalize(affect_direction); - - float parentAngleAnimation = 0.0; - float3 offset = 0.0; - float rotationAngleAnimation = 0.0; - float4 unusedRotQuat = float4(0, 0, 0, 1); - float3 direction = float3(affect_direction.x, 0, affect_direction.y); - - // Iterate starting from trunk at 0 - for(int idx=0; idx <= input.maxHierarchyLevel; ++idx) - { - // Because HierarchyData and this loop have reversed ordering, we need reversed index - int revIdx = max(input.maxHierarchyLevel - idx, 0); - - float3 branchPivotPos = input.branchPivotPos[revIdx]; - float3 branchDir = input.branchDirExtent[revIdx].xyz; - float branchExtent = input.branchDirExtent[revIdx].w; - - float3 branchTipPos = branchPivotPos + branchDir*branchExtent; - - offset += evaluate_wind_animation(direction, affect_force, idx, branchPivotPos, - branchDir, branchExtent, worldPos, parentAngleAnimation, - rotationAngleAnimation, unusedRotQuat); - - parentAngleAnimation += rotationAngleAnimation; - } - - return offset; - } - ##endif - - float3 apply_obstacles(float3 worldPivot, float3 worldPos, float3 localPos, float height) - { - if (obstacles.indirection_wd == 0) - return float3(0, 0, 0); - float2 pos = worldPivot.xz - obstacles.indirection_lt; - pos.xy /= obstacles.indirection_cell; - - uint2 coord = clamp(uint2(pos.xy), 0U, obstacles.indirection_wd - 1); - uint index = coord.x + coord.y * obstacles.indirection_wd; - - float3 totalOfs = 0; - uint obstIndCount = obstacle_indices[index]; - uint obstIndStart = obstIndCount >> OBSTACLE_OFFSET_BIT_SHIFT; - uint obstIndEnd = (obstIndCount & ((1U << OBSTACLE_OFFSET_BIT_SHIFT) - 1)) + obstIndStart; - - ##if (interactions == interactionsTrees) - float2 affect_direction = float2(0.001, 0); - float affect_force = 0; - calculate_obstacles_interaction_force(worldPivot, height, affect_direction, affect_force, obstIndStart, obstIndEnd, index); - if (affect_force <= 0.0001) - return float3(0, 0, 0); - - float curve_k = max(affect_force * 3.14 * .5 * .7 / height, 0.0001); - half2 basis_d = -normalize(affect_direction); - float x = dot(localPos.xz, basis_d); - float y = localPos.y * height; - float sinky, cosky; - sincos(curve_k * y, sinky, cosky); - float dx = (1 - cosky) / curve_k + x * cosky - x; - float dy = sinky / curve_k - x * sinky - y; - return float3(basis_d.x * dx, dy, basis_d.y * dx); - ##elif (interactions == interactionsBushes) - float3 result_delta = float3(0, 0, 0); - for (uint i = obstIndStart; i < obstIndEnd; ++i) - { - uint index = obstacle_indices[i]; - float3 center = float3(obstacles.obstacles[index].dir_x.w, obstacles.obstacles[index].dir_y.w, obstacles.obstacles[index].dir_z.w); - float radius_sq = dot(obstacles.obstacles[index].dir_x.xyz, obstacles.obstacles[index].dir_x.xyz) + - dot(obstacles.obstacles[index].dir_z.xyz, obstacles.obstacles[index].dir_z.xyz); - float obst_height_sq = dot(obstacles.obstacles[index].dir_y.xyz, obstacles.obstacles[index].dir_y.xyz); - - float3 initial = worldPos + result_delta; - float3 delta = initial - center; - //below is the same as (delta.y /= (obst_h/radius)) ** 2 - float delta_sq = dot(delta * float3(1, radius_sq / obst_height_sq, 1), delta); - if (delta_sq > radius_sq) - continue; - - float obst_height = sqrt(obst_height_sq); - float radius = sqrt(radius_sq); - float delta_len = sqrt(delta_sq); - float init_len = length(initial - worldPivot); - float diff = radius - delta_len; - delta.y *= obst_height / radius; - // the same as (normalize(delta) * radius + center) but quadratically smoothed - result_delta = (delta * (1 + diff * diff / (delta_len * radius))) + center; - result_delta = normalize(result_delta - worldPivot) * init_len + worldPivot - worldPos; - } - return get_interaction_strength() * result_delta; - ##endif - } - } - } - endmacro - if (use_cross_dissolve == off && (interactions == interactionsTrees || interactions == interactionsBushes) - && rendinst_render_pass != rendinst_render_pass_impostor_color) { - if (is_pivoted == yes) - { - hlsl(vs) { - #define APPLY_INTERACTIONS\ - worldPos += apply_obstacles_joints(worldLocalPos, worldPos, localPos, physBbox.y * length(worldLocalY), Data); - } - } - else - { - hlsl(vs) { - #define APPLY_INTERACTIONS\ - worldPos += apply_obstacles(worldLocalPos, worldPos, localPos, physBbox.y * length(worldLocalY)); - } - } - } else { - hlsl(vs) { - #define APPLY_INTERACTIONS /*Interactions disabled*/ - } - } + APPLY_VEGETATION_INTERACTIONS(use_cross_dissolve == off && (interactions == interactionsTrees || interactions == interactionsBushes) + && rendinst_render_pass != rendinst_render_pass_impostor_color) if (rendinst_render_pass == rendinst_render_pass_impostor_color) { @@ -604,7 +406,7 @@ shader rendinst_tree_colored, rendinst_tree_colored_alpha_split } if (use_cross_dissolve == off) { - VEGETATION_INTERACTIONS() + USE_VEGETATION_INTERACTIONS() } hlsl { @@ -720,7 +522,7 @@ shader rendinst_tree_colored, rendinst_tree_colored_alpha_split } if (use_cross_dissolve == off) { - VEGETATION_INTERACTIONS() + USE_VEGETATION_INTERACTIONS() } DEFAULT_VERTEX_SHADER() USE_WEIGHT_FOR_AO() @@ -734,7 +536,7 @@ shader rendinst_tree_colored, rendinst_tree_colored_alpha_split } if (use_cross_dissolve == off) { - VEGETATION_INTERACTIONS() + USE_VEGETATION_INTERACTIONS() } DEFAULT_VERTEX_SHADER() NO_DYNSTCODE() diff --git a/prog/daNetGame/shaders/rendinst_vegetation_inc.dshl b/prog/daNetGame/shaders/rendinst_vegetation_inc.dshl index 08749bb62..4d15989e3 100644 --- a/prog/daNetGame/shaders/rendinst_vegetation_inc.dshl +++ b/prog/daNetGame/shaders/rendinst_vegetation_inc.dshl @@ -274,4 +274,215 @@ macro USE_GROUND_ALIGN() return worldPos; } } +endmacro + +macro INIT_VEGETATION_INTERACTIONS() + static int interactions = 0; + interval interactions: interactionsOff < 1, interactionsTrees < 2, interactionsBushes; + if (interactions == interactionsTrees || interactions == interactionsBushes) + { + static float interaction_strength = 1.0; + } +endmacro + +macro USE_VEGETATION_INTERACTIONS() + if (interactions == interactionsTrees || interactions == interactionsBushes) + { + (vs) { interaction_strength@f1 = (interaction_strength); } + } + + if (interactions == interactionsTrees || interactions == interactionsBushes) { + hlsl(vs){ + float4 sdBoxNorm(float3 localPos, float3 boxExt) + { + float3 dist = abs(localPos) - boxExt; + float insideDist = min(max(max(dist.x, dist.y), dist.z), 0); + float3 ptOnBox = max(dist, 0); + float outsideDist = length(ptOnBox); + float signedDist = outsideDist + insideDist; + float3 norm; + FLATTEN + if (signedDist <= 0) + norm = (float3(insideDist == dist.x, insideDist == dist.y, insideDist == dist.z)); + else + norm = ptOnBox / (outsideDist + 1e-6); + norm = (localPos < 0 ? -norm : norm); + return float4(signedDist, norm); + } + + void calculate_obstacles_interaction_force( + float3 worldPivot, float height, inout float2 affect_direction, inout float affect_force, + uint obstIndStart, uint obstIndEnd, uint index) + { + float inverse_height = 1.0 / height; + + // Getting resultant force from all obstacles + for (uint i = obstIndStart; i < obstIndEnd; ++i) + { + uint index = obstacle_indices[i]; + float3 center = float3(obstacles.obstacles[index].dir_x.w, obstacles.obstacles[index].dir_y.w, obstacles.obstacles[index].dir_z.w); + float3 delta = center - worldPivot; + + float3x3 dir_mat = float3x3(obstacles.obstacles[index].dir_x.xyz, + obstacles.obstacles[index].dir_y.xyz, + obstacles.obstacles[index].dir_z.xyz); + float3 local_pos = mul(dir_mat, delta); + float4 distToBoxNorm = sdBoxNorm(local_pos, 0.5 * (obstacles.obstacles[index].box.xyz + height)); + if (distToBoxNorm.x < 0) + { + float radDist = (-distToBoxNorm.x * inverse_height * 2); + affect_direction += lerp(-obstacles.obstacles[index].dir_x.xz, delta.xz, length(delta.xz)); + affect_force += (radDist); + } + } + affect_force *= get_interaction_strength(); + } + + ##if (is_pivoted == yes) + float3 apply_obstacles_joints(float3 worldPivot, float3 worldPos, float3 localPos, float height, HierarchyData input) + { + if (obstacles.indirection_wd == 0) + return float3(0, 0, 0); + + float2 pos = worldPivot.xz - obstacles.indirection_lt; + pos.xy /= obstacles.indirection_cell; + + uint2 coord = clamp(uint2(pos.xy), 0U, obstacles.indirection_wd - 1); + uint index = coord.x + coord.y * obstacles.indirection_wd; + + float3 totalOfs = 0; + uint obstIndCount = obstacle_indices[index]; + uint obstIndStart = obstIndCount >> OBSTACLE_OFFSET_BIT_SHIFT; + uint obstIndEnd = (obstIndCount & ((1U << OBSTACLE_OFFSET_BIT_SHIFT) - 1)) + obstIndStart; + + float2 affect_direction = float2(0,0); + float affect_force = 0; + + calculate_obstacles_interaction_force(worldPivot, height, affect_direction, affect_force, obstIndStart, obstIndEnd, index); + BRANCH + if (affect_force <= 0.0001) + return float3(0, 0, 0); + + affect_direction = -normalize(affect_direction); + + float parentAngleAnimation = 0.0; + float3 offset = 0.0; + float rotationAngleAnimation = 0.0; + float4 unusedRotQuat = float4(0, 0, 0, 1); + float3 direction = float3(affect_direction.x, 0, affect_direction.y); + + // Iterate starting from trunk at 0 + for(int idx=0; idx <= input.maxHierarchyLevel; ++idx) + { + // Because HierarchyData and this loop have reversed ordering, we need reversed index + int revIdx = max(input.maxHierarchyLevel - idx, 0); + + float3 branchPivotPos = input.branchPivotPos[revIdx]; + float3 branchDir = input.branchDirExtent[revIdx].xyz; + float branchExtent = input.branchDirExtent[revIdx].w; + + float3 branchTipPos = branchPivotPos + branchDir*branchExtent; + + offset += evaluate_wind_animation(direction, affect_force, idx, branchPivotPos, + branchDir, branchExtent, worldPos, parentAngleAnimation, + rotationAngleAnimation, unusedRotQuat); + + parentAngleAnimation += rotationAngleAnimation; + } + + return offset; + } + ##endif + + float3 apply_obstacles(float3 worldPivot, float3 worldPos, float3 localPos, float height) + { + if (obstacles.indirection_wd == 0) + return float3(0, 0, 0); + float2 pos = worldPivot.xz - obstacles.indirection_lt; + pos.xy /= obstacles.indirection_cell; + + uint2 coord = clamp(uint2(pos.xy), 0U, obstacles.indirection_wd - 1); + uint index = coord.x + coord.y * obstacles.indirection_wd; + + float3 totalOfs = 0; + uint obstIndCount = obstacle_indices[index]; + uint obstIndStart = obstIndCount >> OBSTACLE_OFFSET_BIT_SHIFT; + uint obstIndEnd = (obstIndCount & ((1U << OBSTACLE_OFFSET_BIT_SHIFT) - 1)) + obstIndStart; + + ##if (interactions == interactionsTrees) + float2 affect_direction = float2(0.001, 0); + float affect_force = 0; + calculate_obstacles_interaction_force(worldPivot, height, affect_direction, affect_force, obstIndStart, obstIndEnd, index); + if (affect_force <= 0.0001) + return float3(0, 0, 0); + + float curve_k = max(affect_force * 3.14 * .5 * .7 / height, 0.0001); + half2 basis_d = -normalize(affect_direction); + float x = dot(localPos.xz, basis_d); + float y = localPos.y * height; + float sinky, cosky; + sincos(curve_k * y, sinky, cosky); + float dx = (1 - cosky) / curve_k + x * cosky - x; + float dy = sinky / curve_k - x * sinky - y; + return float3(basis_d.x * dx, dy, basis_d.y * dx); + ##elif (interactions == interactionsBushes) + float3 result_delta = float3(0, 0, 0); + for (uint i = obstIndStart; i < obstIndEnd; ++i) + { + uint index = obstacle_indices[i]; + float3 center = float3(obstacles.obstacles[index].dir_x.w, obstacles.obstacles[index].dir_y.w, obstacles.obstacles[index].dir_z.w); + float radius_sq = dot(obstacles.obstacles[index].dir_x.xyz, obstacles.obstacles[index].dir_x.xyz) + + dot(obstacles.obstacles[index].dir_z.xyz, obstacles.obstacles[index].dir_z.xyz); + float obst_height_sq = dot(obstacles.obstacles[index].dir_y.xyz, obstacles.obstacles[index].dir_y.xyz); + + float3 initial = worldPos + result_delta; + float3 delta = initial - center; + //below is the same as (delta.y /= (obst_h/radius)) ** 2 + float delta_sq = dot(delta * float3(1, radius_sq / obst_height_sq, 1), delta); + if (delta_sq > radius_sq) + continue; + + float obst_height = sqrt(obst_height_sq); + float radius = sqrt(radius_sq); + float delta_len = sqrt(delta_sq); + float init_len = length(initial - worldPivot); + float diff = radius - delta_len; + delta.y *= obst_height / radius; + // the same as (normalize(delta) * radius + center) but quadratically smoothed + result_delta = (delta * (1 + diff * diff / (delta_len * radius))) + center; + result_delta = normalize(result_delta - worldPivot) * init_len + worldPivot - worldPos; + } + return get_interaction_strength() * result_delta; + ##endif + } + } + } +endmacro + +macro APPLY_VEGETATION_INTERACTIONS(conditions) + if (conditions) { + if (is_pivoted == yes) + { + hlsl(vs) { + #define APPLY_INTERACTIONS\ + worldPos += apply_obstacles_joints(worldLocalPos, worldPos, localPos, physBbox.y * length(worldLocalY), Data); + } + } + else + { + hlsl(vs) { + #define APPLY_INTERACTIONS\ + worldPos += apply_obstacles(worldLocalPos, worldPos, localPos, physBbox.y * length(worldLocalY)); + } + } + } else { + hlsl(vs) { + #define APPLY_INTERACTIONS /*Interactions disabled*/ + } + } +endmacro + +macro USE_AND_APPLY_VEGETATION_INTERACTIONS(conditions) + USE_VEGETATION_INTERACTIONS() + APPLY_VEGETATION_INTERACTIONS(conditions) endmacro \ No newline at end of file diff --git a/prog/daNetGame/shaders/rt/rt_lighting.dshl b/prog/daNetGame/shaders/rt/rt_lighting.dshl index e1bbb7cad..5c4635bf4 100644 --- a/prog/daNetGame/shaders/rt/rt_lighting.dshl +++ b/prog/daNetGame/shaders/rt/rt_lighting.dshl @@ -3,6 +3,8 @@ include "clipmap.dshl" include "shader_global.dshl" include "skyLight.dshl" include "gbuffer.dshl" +include "static_shadow.dshl" +include "csm.dshl" texture paint_details_tex; int bvh_paint_details_tex_slot; @@ -11,6 +13,11 @@ int bvh_paint_details_smp_slot; texture bvh_atmosphere_texture; float bvh_atmosphere_texture_distance = 10000; +int rtr_shadow = 1; +interval rtr_shadow: off < 1, on; +int rtr_use_csm = 0; +interval rtr_use_csm: no < 1, yes; + // use_cockpit_lights is Skyquake specific macro INIT_RT_LIGHTING(stage, use_cockpit_lights, use_sampler_for_cloud_shadows) INIT_CLIPMAP_NORMAL_BASE(stage) @@ -64,6 +71,20 @@ macro USE_RT_LIGHTING(stage, use_cockpit_lights) } USE_COSINE_SAMPLING(stage) + if (rtr_shadow == off) + { + hlsl(stage) { + #define HAS_STATIC_SHADOW 1 + } + INIT_STATIC_SHADOW_BASE(stage) + USE_STATIC_SHADOW_BASE(stage) + if (rtr_use_csm == yes) + { + INIT_CSM_SHADOW(stage) + BASE_USE_CSM_SHADOW_DEF_NUM(stage) + } + } + hlsl(stage) { // copy pasted from shader_global, that only had a ps version @@ -241,8 +262,15 @@ macro USE_RT_LIGHTING(stage, use_cockpit_lights) half3 reflectionVec = 2 * NdotV * normalh - view; half NoV = abs(NdotV) + 1e-5h; - // TODO: Have two sided in model meta and set bias accordingly - half shadow = is_obstructed(bvhMain, hitInfo.position, toSun, 0, ray_max, w + hitInfo.t, bvhGroupAll & ~bvhGroupGrass) ? 0 : 1; + ##if rtr_shadow == on + // TODO: Have two sided in model meta and set bias accordingly + half shadow = is_obstructed(bvhMain, hitInfo.position, toSun, 0, ray_max, w + hitInfo.t, bvhGroupAll & ~bvhGroupGrass) ? 0 : 1; + ##else + half shadow = getStaticShadow(worldPos.xyz); + ##if rtr_use_csm == yes + shadow *= get_csm_shadow(-hitInfo.position).x; + ##endif + ##endif half extractedAlbedoAo = decode_albedo_ao(albedo); half3 diffuseColor = albedo - metalness * albedo; diff --git a/prog/daNetGame/shaders/shader_global.dshl b/prog/daNetGame/shaders/shader_global.dshl index fac79a0e5..657f230e4 100644 --- a/prog/daNetGame/shaders/shader_global.dshl +++ b/prog/daNetGame/shaders/shader_global.dshl @@ -668,10 +668,13 @@ INIT_BRUNETON_FOG(ps) endmacro hlsl { - //float linearSmoothnessToGGXRoughness(float smoothness) {return max(1e-4, pow2(pow3(1-0.7*smoothness)));}//oldbuggy - float linearSmoothnessToLinearRoughness(float smoothness) {return 1-smoothness;}//dice - float linearSmoothnessToGGXRoughness(float smoothness) {return max(1e-4, pow2(linearSmoothnessToLinearRoughness(smoothness)));}//remove me! - //float linearSmoothnessToGGXRoughness(float smoothness) {return max(1e-4, pow3(1-0.7*smoothness));}//crytek + float linearSmoothnessToLinearRoughness(float smoothness) {return 1-smoothness;} + #if SHADER_COMPILER_FP16_ENABLED + half linearSmoothnessToLinearRoughness(half linearSmoothness) + { + return saturate(1.h-linearSmoothness); + } + #endif } hlsl { diff --git a/prog/daNetGame/shaders/skinning_inc2.dshl b/prog/daNetGame/shaders/skinning_inc2.dshl index 2cc8de414..a6855ac80 100644 --- a/prog/daNetGame/shaders/skinning_inc2.dshl +++ b/prog/daNetGame/shaders/skinning_inc2.dshl @@ -66,8 +66,11 @@ macro USE_BONE_MATRIX_BLENDING_GEN(blend_bone_mtx_name_t, fetch_bone_mtx_name_t, { bone_t blend_bone_mtx_name_t(uint offset, uint4 bi, float4 bw) { + ##if in_editor_assume == no + offset += additional_offset; + ##endif bone_t skinnedTm; - bi = bi * bone_mtx_stride + offset + additional_offset; + bi = bi * bone_mtx_stride + offset; skinnedTm.r0 = bone_mtx_row_getter(bi.x+0) * bw.x + bone_mtx_row_getter(bi.y+0) * bw.y + bone_mtx_row_getter(bi.z+0) * bw.z + bone_mtx_row_getter(bi.w+0) * bw.w; skinnedTm.r1 = bone_mtx_row_getter(bi.x+1) * bw.x + bone_mtx_row_getter(bi.y+1) * bw.y + bone_mtx_row_getter(bi.z+1) * bw.z + bone_mtx_row_getter(bi.w+1) * bw.w; skinnedTm.r2 = bone_mtx_row_getter(bi.x+2) * bw.x + bone_mtx_row_getter(bi.y+2) * bw.y + bone_mtx_row_getter(bi.z+2) * bw.z + bone_mtx_row_getter(bi.w+2) * bw.w; @@ -75,8 +78,11 @@ macro USE_BONE_MATRIX_BLENDING_GEN(blend_bone_mtx_name_t, fetch_bone_mtx_name_t, } bone_t fetch_bone_mtx_name_t(uint offset, uint bi) { + ##if in_editor_assume == no + offset += additional_offset; + ##endif bone_t skinnedTm; - bi = bi * bone_mtx_stride + offset + additional_offset; + bi = bi * bone_mtx_stride + offset; skinnedTm.r0 = bone_mtx_row_getter(bi.x+0); skinnedTm.r1 = bone_mtx_row_getter(bi.x+1); skinnedTm.r2 = bone_mtx_row_getter(bi.x+2); @@ -207,6 +213,7 @@ hlsl(vs) float3 mul_bone3m(float3 p3, float3x3 m3) { return mul(m3, p3); } +##if in_editor_assume == no void get_node_collapser_bits(out uint4 node_collapser_bits[2]) { // bone rows start from ADDITIONAL_BONE_MTX_OFFSET, these rows are used for node collapser @@ -235,6 +242,7 @@ hlsl(vs) get_node_collapser_bits(nodeCollapserBits); return checkBoneToCollapse(bi, 1, nodeCollapserBits); } +##endif bone_t blend_skinning_matrix(uint4 bi, float4 bw, uint in_matrix_offset) { diff --git a/prog/daNetGame/shaders/ssr_common.dshl b/prog/daNetGame/shaders/ssr_common.dshl index aa6d13897..63ce44889 100644 --- a/prog/daNetGame/shaders/ssr_common.dshl +++ b/prog/daNetGame/shaders/ssr_common.dshl @@ -19,9 +19,12 @@ macro SETUP_SSR(code) { (code) { downsampled_motion_vectors_tex@smp2d = downsampled_motion_vectors_tex; + uv_temporal_jitter@f4 = uv_temporal_jitter; + current_jittered_pos_to_prev_jittered_pos_ofs@f2 = (uv_temporal_jitter.z - uv_temporal_jitter.x, uv_temporal_jitter.w - uv_temporal_jitter.y,0,0); } hlsl(code) { #define SSR_MOTIONREPROJ 1 + #define MOTION_TO_PREV_JITTERED_UV_OFS (current_jittered_pos_to_prev_jittered_pos_ofs) #define CHECK_VALID_MOTION_VECTOR(a) true #define MOTION_VECTORS_TEXTURE downsampled_motion_vectors_tex } diff --git a/prog/daNetGame/shaders/water_3d_ssr.dshl b/prog/daNetGame/shaders/water_3d_ssr.dshl index c24cc1b23..dc9abf98a 100644 --- a/prog/daNetGame/shaders/water_3d_ssr.dshl +++ b/prog/daNetGame/shaders/water_3d_ssr.dshl @@ -453,34 +453,6 @@ shader water_ssr_nv2, water_ssr_nv2_heightmap half4 oldTarget = half4(oldColor.rgb, oldAlphaStrength.r); half oldStrength = oldAlphaStrength.g; - BRANCH - if (offscreen && !hasData) - { - // travelling 10% screen width pixel towards the middle of the screen, during each - float2 dir = float2(-sign(oldUv.x - 0.5) * 0.1, 0); - float4 nearTarget1 = half4( - tex2Dlod(water_reflection_tex, float4(oldUv + dir * 1, 0,0)).rgb, - tex2Dlod(water_reflection_strenght_tex, float4(oldUv + dir * 1, 0,0)).r - ); - float4 nearTarget2 = half4( - tex2Dlod(water_reflection_tex, float4(oldUv + dir * 2, 0,0)).rgb, - tex2Dlod(water_reflection_strenght_tex, float4(oldUv + dir * 2, 0,0)).r - ); - float4 nearTarget3 = half4( - tex2Dlod(water_reflection_tex, float4(oldUv + dir * 3, 0,0)).rgb, - tex2Dlod(water_reflection_strenght_tex, float4(oldUv + dir * 3, 0,0)).r - ); - float4 nearTarget4 = half4( - tex2Dlod(water_reflection_tex, float4(oldUv + dir * 4, 0,0)).rgb, - tex2Dlod(water_reflection_strenght_tex, float4(oldUv + dir * 4, 0,0)).r - ); - - newTarget = nearTarget4; - newTarget = nearTarget3.a > 0 ? nearTarget3 : newTarget; - newTarget = nearTarget2.a > 0 ? nearTarget2 : newTarget; - newTarget = nearTarget1.a > 0 ? nearTarget1 : newTarget; - } - BRANCH if (water_quality == water_quality_high && !hitSky && newTarget.a == 0) { diff --git a/prog/daNetGame/ui/bhv/BhvRotateByComponent.cpp b/prog/daNetGame/ui/bhv/BhvRotateByComponent.cpp index 039131c2e..20c5ab499 100644 --- a/prog/daNetGame/ui/bhv/BhvRotateByComponent.cpp +++ b/prog/daNetGame/ui/bhv/BhvRotateByComponent.cpp @@ -20,7 +20,7 @@ SQ_PRECACHED_STRINGS_REGISTER_WITH_BHV(BhvRotateByComponent, bhv_rotate_by_compo using namespace darg; -BhvRotateByComponent::BhvRotateByComponent() : Behavior(darg::Behavior::STAGE_BEFORE_RENDER, 0), componentNameHash() {} +BhvRotateByComponent::BhvRotateByComponent() : Behavior(darg::Behavior::STAGE_BEFORE_RENDER, 0) {} void BhvRotateByComponent::onAttach(Element *elem) { @@ -30,10 +30,10 @@ void BhvRotateByComponent::onAttach(Element *elem) if (elem->isHidden()) return; - const Sqrat::Table &scriptDesc = elem->props.scriptDesc; eastl::string rotationComponentName = - scriptDesc.RawGetSlotValue(strings->rotationComponentName, "ui__rotateElementByAngle"); - componentNameHash = ECS_HASH_SLOW(rotationComponentName.c_str()); + elem->props.scriptDesc.RawGetSlotValue(strings->rotationComponentName, "ui__rotateElementByAngle"); + ecs::hash_str_t rotationComponentHash = ecs_str_hash(rotationComponentName.c_str()); + elem->props.storage.SetValue(strings->rotationComponentHash, rotationComponentHash); } int BhvRotateByComponent::update(UpdateStage /*stage*/, darg::Element *elem, float /*dt*/) @@ -44,9 +44,17 @@ int BhvRotateByComponent::update(UpdateStage /*stage*/, darg::Element *elem, flo if (elem->isHidden()) return 0; - const Sqrat::Table &scriptDesc = elem->props.scriptDesc; - const ecs::EntityId entity = scriptDesc.RawGetSlotValue(strings->rotationComponentEntity, ecs::INVALID_ENTITY_ID); - const float angle = g_entity_mgr->getOr(entity, componentNameHash, 0.0f); + const ecs::EntityId entity = + elem->props.scriptDesc.RawGetSlotValue(strings->rotationComponentEntity, ecs::INVALID_ENTITY_ID); + if (entity == ecs::INVALID_ENTITY_ID) + return 0; + + eastl::string rotationComponentName = + elem->props.scriptDesc.RawGetSlotValue(strings->rotationComponentName, "ui__rotateElementByAngle"); + ecs::hash_str_t rotationComponentHash = elem->props.storage.RawGetSlotValue(strings->rotationComponentHash, 0); + ecs::HashedConstString rotationComponentNameHashed{rotationComponentName.c_str(), rotationComponentHash}; + const float angle = g_entity_mgr->getOr(entity, rotationComponentNameHashed, 0.0f); + elem->transform->rotate = angle; return 0; } diff --git a/prog/daNetGame/ui/bhv/BhvRotateByComponent.h b/prog/daNetGame/ui/bhv/BhvRotateByComponent.h index e96c94740..2c1d4747e 100644 --- a/prog/daNetGame/ui/bhv/BhvRotateByComponent.h +++ b/prog/daNetGame/ui/bhv/BhvRotateByComponent.h @@ -11,13 +11,12 @@ class BhvRotateByComponent : public darg::Behavior SQ_PRECACHED_STRINGS_DECLARE(CachedStrings, cstr, // rotationComponentEntity, - rotationComponentName); + rotationComponentName, + rotationComponentHash); BhvRotateByComponent(); virtual void onAttach(darg::Element *) override; virtual int update(UpdateStage stage, darg::Element *elem, float dt) override final; - - ecs::HashedConstString componentNameHash; }; extern BhvRotateByComponent bhv_rotate_by_component; diff --git a/prog/daNetGame/ui/bhv/bhvOpacityByComponent.cpp b/prog/daNetGame/ui/bhv/bhvOpacityByComponent.cpp new file mode 100644 index 000000000..84e0d3644 --- /dev/null +++ b/prog/daNetGame/ui/bhv/bhvOpacityByComponent.cpp @@ -0,0 +1,53 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include "bhvOpacityByComponent.h" + +#include +#include +#include + + +SQ_PRECACHED_STRINGS_REGISTER_WITH_BHV(BhvOpacityByComponent, bhv_opacity_by_component, cstr); + +using namespace darg; + +BhvOpacityByComponent::BhvOpacityByComponent() : Behavior(darg::Behavior::STAGE_BEFORE_RENDER, 0) {} + +void BhvOpacityByComponent::onAttach(Element *elem) +{ + const auto strings = cstr.resolveVm(elem->getVM()); + G_ASSERT_RETURN(strings, ); + + if (elem->isHidden()) + return; + + eastl::string opacityComponentName = + elem->props.scriptDesc.RawGetSlotValue(strings->opacityComponentName, "ui__opacityComponent"); + ecs::hash_str_t opacityComponentHash = ecs_str_hash(opacityComponentName.c_str()); + elem->props.storage.SetValue(strings->opacityComponentHash, opacityComponentHash); +} + +int BhvOpacityByComponent::update(UpdateStage /*stage*/, darg::Element *elem, float /*dt*/) +{ + const auto strings = cstr.resolveVm(elem->getVM()); + G_ASSERT_RETURN(strings, 0); + + if (elem->isHidden()) + return 0; + + const ecs::EntityId entity = + elem->props.scriptDesc.RawGetSlotValue(strings->opacityComponentEntity, ecs::INVALID_ENTITY_ID); + if (entity == ecs::INVALID_ENTITY_ID) + return 0; + + eastl::string opacityComponentName = + elem->props.scriptDesc.RawGetSlotValue(strings->opacityComponentName, "ui__opacityComponent"); + ecs::hash_str_t opacityComponentHash = elem->props.storage.RawGetSlotValue(strings->opacityComponentHash, 0); + ecs::HashedConstString opacityComponentNameHashed{opacityComponentName.c_str(), opacityComponentHash}; + float opacity = g_entity_mgr->getOr(entity, opacityComponentNameHashed, -1.0f); + if (opacity < 0.0) + return 0; + + elem->props.setCurrentOpacity(opacity); + return 0; +} diff --git a/prog/daNetGame/ui/bhv/bhvOpacityByComponent.h b/prog/daNetGame/ui/bhv/bhvOpacityByComponent.h new file mode 100644 index 000000000..1b9bce13f --- /dev/null +++ b/prog/daNetGame/ui/bhv/bhvOpacityByComponent.h @@ -0,0 +1,22 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. +#pragma once + +#include +#include "ui/scriptStrings.h" +#include + +class BhvOpacityByComponent : public darg::Behavior +{ +public: + SQ_PRECACHED_STRINGS_DECLARE(CachedStrings, + cstr, // + opacityComponentEntity, + opacityComponentName, + opacityComponentHash); + + BhvOpacityByComponent(); + virtual void onAttach(darg::Element *) override; + virtual int update(UpdateStage stage, darg::Element *elem, float dt) override final; +}; + +extern BhvOpacityByComponent bhv_opacity_by_component; diff --git a/prog/daNetGame/ui/uiBindings.cpp b/prog/daNetGame/ui/uiBindings.cpp index 1d9429ac1..b1e45cc2b 100644 --- a/prog/daNetGame/ui/uiBindings.cpp +++ b/prog/daNetGame/ui/uiBindings.cpp @@ -16,6 +16,7 @@ #include "bhv/bhvTouchScreenStick.h" #include "bhv/BhvRotateRelativeToDir.h" #include "bhv/BhvRotateByComponent.h" +#include "bhv/bhvOpacityByComponent.h" #include "bhv/bhvMenuCameraControl.h" #include "bhv/bhvActivateActionSet.h" #include "bhv/bhvReplayFreeCameraControl.h" @@ -60,6 +61,7 @@ void bind_ui_behaviors(SqModules *module_mgr) .SetValue("TouchScreenStick", (darg::Behavior *)&bhv_touch_screen_stick) .SetValue("RotateRelativeToDir", (darg::Behavior *)&bhv_rotate_relative_to_dir) .SetValue("RotateByComponent", (darg::Behavior *)&bhv_rotate_by_component) + .SetValue("OpacityByComponent", (darg::Behavior *)&bhv_opacity_by_component) .SetValue("MenuCameraControl", (darg::Behavior *)&bhv_menu_camera_control) .SetValue("ActivateActionSet", (darg::Behavior *)&bhv_activate_action_set) .SetValue("ReplayFreeCameraControl", (darg::Behavior *)&bhv_replay_free_camera_control) diff --git a/prog/daNetGameLibs/blood_decals/render/blood_decals_render.das b/prog/daNetGameLibs/blood_decals/render/blood_decals_render.das index 8dbc4c955..4dbecd5ec 100644 --- a/prog/daNetGameLibs/blood_decals/render/blood_decals_render.das +++ b/prog/daNetGameLibs/blood_decals/render/blood_decals_render.das @@ -59,7 +59,7 @@ def blood_decals_prepare_render(stg : UpdateStageInfoBeforeRender; if !blood_decals_traces_queue |> empty - d3d_set_render_target(null, 0) + d3d_set_render_target(null, uint8(0)) d3d_set_depth(blood_decals_depth_atlas.getTex2D, DepthAccess RW) exec_with_shader_blocks_scope_reset() <| $() blood_decals_depth_shader |> setStates() diff --git a/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl b/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl index 9fa4a312a..3853b2c37 100644 --- a/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl +++ b/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl @@ -191,7 +191,7 @@ macro BLOOD_PUDDLES_COMMON_PS() decal_type__is_landscape = input.decal_type_and_landscape__frame__rndIndex.x; uint decalType = decal_type__is_landscape >> 1; bool isLandscape = (decal_type__is_landscape & 0x1) == 1; - bool isPuddle = decalType == 0; + bool isPuddle = decalType == DecalGroup::BLOOD_DECAL_GROUP_PUDDLE; uint frameNo = input.decal_type_and_landscape__frame__rndIndex.y; uint rndIndex = input.decal_type_and_landscape__frame__rndIndex.z; float3 worldNormal = normalize(input.normal_fadetime.xyz); diff --git a/prog/daNetGameLibs/console_commands/main/das_debug.das b/prog/daNetGameLibs/console_commands/main/das_debug.das index 78f6e6c00..53dd9981e 100644 --- a/prog/daNetGameLibs/console_commands/main/das_debug.das +++ b/prog/daNetGameLibs/console_commands/main/das_debug.das @@ -1,7 +1,6 @@ options no_aot require ecs require DagorConsole -require vehicle require DagorSystem require danetlibs.console_commands.main.das_debug_common require ecs.ecs_template diff --git a/prog/daNetGameLibs/daGdp/render/objects/riex.cpp b/prog/daNetGameLibs/daGdp/render/objects/riex.cpp index 5be0facfa..963ca85b0 100644 --- a/prog/daNetGameLibs/daGdp/render/objects/riex.cpp +++ b/prog/daNetGameLibs/daGdp/render/objects/riex.cpp @@ -548,7 +548,7 @@ static void render(SubPass sub_pass, // It works without this cb as well but it might be better to leave it here as a fallback. // (in case perDrawOffset is 0) rendinst::render::RiShaderConstBuffers cb; - cb.setInstancing(0, 4, 1, 0); + cb.setInstancing(0, 4, 0x1, 0); cb.setOpacity(0, 1); const E3DCOLOR defaultColors[] = {E3DCOLOR(0x80808080), E3DCOLOR(0x80808080)}; cb.setRandomColors(defaultColors); diff --git a/prog/daNetGameLibs/daGdp/shaders/dagdp_heightmap.dshl b/prog/daNetGameLibs/daGdp/shaders/dagdp_heightmap.dshl index 60de40cc4..6fa73f463 100644 --- a/prog/daNetGameLibs/daGdp/shaders/dagdp_heightmap.dshl +++ b/prog/daNetGameLibs/daGdp/shaders/dagdp_heightmap.dshl @@ -103,7 +103,7 @@ shader dagdp_heightmap_cull_tiles int2 tileIntPos = structuredBufferAt(tile_positions, dtId.x); float2 tilePosXZ = base_tile_pos_xz + tile_pos_delta * tileIntPos; float3 tilePos = float3(tilePosXZ.x, getWorldHeight(tilePosXZ), tilePosXZ.y) - max_placeable_bounding_radius; - float3 tileSize = float3(tile_pos_delta, 0, tile_pos_delta) + max_placeable_bounding_radius; + float3 tileSize = float3(tile_pos_delta, 0, tile_pos_delta) + 2*max_placeable_bounding_radius; // For full correctness, the height of the bbox tile should probably be tied to the y view position. if (testBoxB(tilePos, tilePos + tileSize)) diff --git a/prog/daNetGameLibs/imgui_daeditor/daEditor/physobj/daEditor_wake_up_physobj_debug.das b/prog/daNetGameLibs/imgui_daeditor/daEditor/physobj/daEditor_wake_up_physobj_debug.das new file mode 100644 index 000000000..7d185c0fe --- /dev/null +++ b/prog/daNetGameLibs/imgui_daeditor/daEditor/physobj/daEditor_wake_up_physobj_debug.das @@ -0,0 +1,9 @@ +options no_aot +require ecs +require DngPhysObj +require PhysObj + +[es(no_order, REQUIRE=daeditor__selected)] +def animchar_update_phys_obj_wake_up_es(info : UpdateStageInfoAct; + var phys_obj_net_phys : PhysObjActor) + phys_obj_net_phys.phys |> wakeUp() diff --git a/prog/daNetGameLibs/imgui_daeditor/daEditor/wake_up_phys_daeditor_debug.das b/prog/daNetGameLibs/imgui_daeditor/daEditor/wake_up_phys_daeditor_debug.das deleted file mode 100644 index 3795c63f8..000000000 --- a/prog/daNetGameLibs/imgui_daeditor/daEditor/wake_up_phys_daeditor_debug.das +++ /dev/null @@ -1,23 +0,0 @@ -options no_aot -require ecs -require vehicle -require DngPhysObj -require PhysObj -require Ship -require DngShip -require DngActor - -[es(no_order, REQUIRE=daeditor__selected)] -def animchar_update_phys_obj_wake_up_es(info : UpdateStageInfoAct; - var phys_obj_net_phys : PhysObjActor) - phys_obj_net_phys.phys |> wakeUp() - -[es(no_order, REQUIRE=daeditor__selected)] -def animchar_update_vehicle_wake_up_es(info : UpdateStageInfoAct; - var vehicle_net_phys : VehiclePhysActor) - vehicle_net_phys.phys |> wakeUp() - -[es(no_order, REQUIRE=daeditor__selected)] -def animchar_update_ship_wake_up_es(info : UpdateStageInfoAct; - var ship_net_phys : ShipActor) - ship_net_phys.phys |> ship_phys_wake_up() diff --git a/prog/daNetGameLibs/imgui_daeditor/imgui_daeditor_init.das b/prog/daNetGameLibs/imgui_daeditor/imgui_daeditor_init.das index 0fac288ab..ef879041c 100644 --- a/prog/daNetGameLibs/imgui_daeditor/imgui_daeditor_init.das +++ b/prog/daNetGameLibs/imgui_daeditor/imgui_daeditor_init.das @@ -20,6 +20,12 @@ def load_imgui_daeditor(base_path : string) : bool if typeinfo(builtin_module_exists DagorEditor) ok = load_sub_folder(base_path, "daEditor") && ok + if typeinfo(builtin_module_exists DngPhysObj) + ok = load_sub_folder(base_path, "daEditor/physobj") && ok + if typeinfo(builtin_module_exists vehicle) + ok = load_sub_folder(base_path, "daEditor/vehicle") && ok + if typeinfo(builtin_module_exists DngShip) + ok = load_sub_folder(base_path, "daEditor/ship") && ok ok = ok // workaround for "variable ... can be made const" in case if both DagorImgui & DagorImgui are absent return ok diff --git a/prog/daNetGameLibs/lens_flare/README.md b/prog/daNetGameLibs/lens_flare/README.md new file mode 100644 index 000000000..758350df8 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/README.md @@ -0,0 +1,94 @@ +# Lens Flare + +## What this lib does + +This lib adds lens flares really similar to what Unity3D is capable of. Features in a nutshell: +* Configure lens flares in ECS (configuration is documented here: lens_flare/templates/lens_flare.template.blk) +* Add lens flare provider light sources in ECS (reference the lens flare config by name) + * This can be added to the sun + * Planned: And omni- and spotlights +* Draw the lens flare components: + * Draw regular shapes with optional rounding on the vertices + * Apply gradient and texture to the shapes + * Use the light source's brightness and color +* Occlusion is calculated from + * Solid objects (using gbuf depth) + * Volumetric fog + * Sun only: Transparent effects (based on fom shadows) + +## How it works (Overview) + +The logic is implemented inside a single renderer class: LensFlareRenderer + +This is a singleton, managed by an entity (template: 'lens_flare_renderer') + +The renderer is marked dirty whenever the lens flare configuration entities are modified. This normally doesn't happen during the game, but this allows real-time editing of the configs. + +When the renderer is marked dirty, it queries all lens flare configurations and fully recreates the necessary resources. + +### Rendering + +The rendering happens in two phases: prepare and render. Both are done from FG nodes. + +The preparation phase queries lens flare providers (light sources), and computes their visibility, position on the screen and current intensity. + +The rendering phase issues the draws calls. All flare components (shapes) are applied to the render target additively. + +Currently, the RT is a separate texture at half resolution. It is later applied in the postfx shader. The shader uses pre-exposure and outputs linear values. It could be directly applied to the frame between the TAA/TSR resolution and the postfx shader (but that's used as a history for the TAA/TSR). + +## Implementation details + +### Vertex buffers + +The flare components (shapes) are grouped by a few parameters: +* Texture +* Roundness: Sharp, rounded, circle + +All groups are rendered with a separate draw call. This is because, on one hand the texture is problematic if I need to specify an array of differently sized textures in a single draw call, on the other hand the different shapes can be optimized separately using shader variants. The rounded shape is the slowest, and the sharp is the fastest. + +When the renderer initializes, it creates vertex and index buffers for the flares. There is a single vb and a single ib in the renderer, but all flare configs get their separate regions inside the buffers. Within a flare config, each flare component group (based on texture and roundness) gets its own region too. + +Every flare component (shape) has its own region inside the vb and ib, because that's how the shader knows the flare component's id => retrieves the data based on it. + +Each shape uses a triangle fan as geometry: apart from the outer vertices, there is a central vertex and all triangle are formed between the central and two neighbouring outer vertices. The triangles go around, but the first/last vertex is not the same vertex! It's created two times in the same location. These construction details are important, since they enable some optimizations: +* Linear distance from edges is calculated by the interpolator +* Closest outer vertex to a pixel is calculated by interpolating the vertex id (interpolation would fail between the 0 and sideCount-1, that's why first vertex != last vertex) + +### Roundness + +I give this feature a separate section here, because it's not trivial to do efficiently. + +This logic doesn't apply to sharp shapes and circles. Those are optimized. + +The roundness parameter in the config defines what percentage of the length of the sides of the shape is rounded down. + +Based on the side count and the roundness parameter, we can calculate a **rounding circle** for each vertex. The position of this circle can be expressed as a normalized distance: where it is between the central and the outer vertex (*rounding circle pos = lerp(center, outerVertex, normalizedDistance)*). + +The pixel shader needs to be able to: +* Discard pixels outside the rounding circle, but only at the vertices +* Calculate the distance from the edge of the shape + +#### Identifying the rounding circle close to a pixel + +All outer vertices store their vertexId. This value goes from \[0\.\.sideCount\]. Pos\[sideCount\] = pos\[0\]. This is the repeated vertex. These are all outer vertices. The central vertex must use 0 as vertexId. + +The vertexId is passed to the pixel shader, and it's linearly interpolated. If we treat the interpolated vertexId together with the normalized distance from the edge (1-distance), we get an 1D homogeneous coordinate. Dividing by the distance, we get the interpolated vertexId between the two outer vertices, ignoring the center: we are projecting the vertexId to the edge. + +At this point: +* round(projected vertexId) = id of the closest vertex +* abs(round(projected vertexId) - projected vertexId) = distance from the closest outer vertex projected to the edge of the shape => can be compared with the roundness + +#### Early exit logic + +1) If the normalized distance from the edge is too great, rounding circle won't affect the pixel +2) Comparing the projected vertexId (the above calculation) with the roundness, we can skip further pixels + +As a result, the pixels that are not skipped are confined into a shape bounded by: +* the rounding circle's center +* the points, where the rounding circle touches the edges of the shape + +#### Rounding + +The vertex positions are stored in a separate buffer. These allow the calculation of the closest rounding circle without relying on expensive trigonometric operations. The buffers are small and the shader reads them in a very cache-efficient way. + +The rest of the logic is quite simple. \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/_lib.jam b/prog/daNetGameLibs/lens_flare/_lib.jam new file mode 100644 index 000000000..5e7db980d --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/_lib.jam @@ -0,0 +1,4 @@ +if $(HaveRenderer) = yes { + gamePulls += framework_lens_flare_pull ; + UseProgLibs += daNetGameLibs/lens_flare ; +} diff --git a/prog/daNetGameLibs/lens_flare/_shaders.blk b/prog/daNetGameLibs/lens_flare/_shaders.blk new file mode 100644 index 000000000..e7d6f6011 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/_shaders.blk @@ -0,0 +1 @@ +file:t = "lens_flare/shaders/lens_flare.dshl" \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/jamfile b/prog/daNetGameLibs/lens_flare/jamfile new file mode 100644 index 000000000..19d23438e --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/jamfile @@ -0,0 +1,24 @@ +ModuleDependsOnVars = HaveRenderer ; +HaveRenderer ?= yes ; + +Root ?= ../../.. ; +Module = lens_flare ; +Location = prog/daNetGameLibs/$(Module) ; + + +AddIncludes = + $(Root)/prog/daNetGameLibs + $(Root)/prog/gameLibs/publicInclude + $(Root)/prog/daNetGame +; + +local AllSrcFolder_CPP = ; +local AllSrcFolder_ES = ; +local AllSrcFolder_DAS = ; + +if $(HaveRenderer) = yes { + AllSrcFolder_ES += render ; + AllSrcFolder_CPP += render ; +} + +include $(Root)/prog/daNetGameLibs/build_module.jam ; \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.gen.es.cpp b/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.gen.es.cpp new file mode 100644 index 000000000..7c40821e1 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.gen.es.cpp @@ -0,0 +1,242 @@ +#include "lensFlareES.cpp.inl" +ECS_DEF_PULL_VAR(lensFlare); +//built with ECS codegen version 1.0 +#include +static constexpr ecs::ComponentDesc lens_flare_renderer_on_appear_es_comps[] = +{ +//start of 3 rw components at [0] + {ECS_HASH("lens_flare_renderer"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_renderer__render_node"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_renderer__prepare_lights_node"), ecs::ComponentTypeInfo()} +}; +static void lens_flare_renderer_on_appear_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + lens_flare_renderer_on_appear_es(evt + , ECS_RW_COMP(lens_flare_renderer_on_appear_es_comps, "lens_flare_renderer", LensFlareRenderer) + , ECS_RW_COMP(lens_flare_renderer_on_appear_es_comps, "lens_flare_renderer__render_node", dabfg::NodeHandle) + , ECS_RW_COMP(lens_flare_renderer_on_appear_es_comps, "lens_flare_renderer__prepare_lights_node", dabfg::NodeHandle) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc lens_flare_renderer_on_appear_es_es_desc +( + "lens_flare_renderer_on_appear_es", + "prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl", + ecs::EntitySystemOps(nullptr, lens_flare_renderer_on_appear_es_all_events), + make_span(lens_flare_renderer_on_appear_es_comps+0, 3)/*rw*/, + empty_span(), + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +); +static constexpr ecs::ComponentDesc sun_flare_provider_invalidate_es_comps[] = +{ +//start of 2 rw components at [0] + {ECS_HASH("sun_flare_provider__cached_id"), ecs::ComponentTypeInfo()}, + {ECS_HASH("sun_flare_provider__cached_flare_config_id"), ecs::ComponentTypeInfo()}, +//start of 1 rq components at [2] + {ECS_HASH("sun_flare_provider__flare_config"), ecs::ComponentTypeInfo()} +}; +static void sun_flare_provider_invalidate_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + sun_flare_provider_invalidate_es(evt + , ECS_RW_COMP(sun_flare_provider_invalidate_es_comps, "sun_flare_provider__cached_id", int) + , ECS_RW_COMP(sun_flare_provider_invalidate_es_comps, "sun_flare_provider__cached_flare_config_id", int) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc sun_flare_provider_invalidate_es_es_desc +( + "sun_flare_provider_invalidate_es", + "prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl", + ecs::EntitySystemOps(nullptr, sun_flare_provider_invalidate_es_all_events), + make_span(sun_flare_provider_invalidate_es_comps+0, 2)/*rw*/, + empty_span(), + make_span(sun_flare_provider_invalidate_es_comps+2, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,nullptr,"sun_flare_provider__flare_config"); +static constexpr ecs::ComponentDesc lens_flare_config_on_appear_es_comps[] = +{ +//start of 6 rq components at [0] + {ECS_HASH("lens_flare_config__use_occlusion"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__scale"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__elements"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__name"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__intensity"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__smooth_screen_fadeout_distance"), ecs::ComponentTypeInfo()} +}; +static void lens_flare_config_on_appear_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + lens_flare_config_on_appear_es(evt + ); +} +static ecs::EntitySystemDesc lens_flare_config_on_appear_es_es_desc +( + "lens_flare_config_on_appear_es", + "prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl", + ecs::EntitySystemOps(nullptr, lens_flare_config_on_appear_es_all_events), + empty_span(), + empty_span(), + make_span(lens_flare_config_on_appear_es_comps+0, 6)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,nullptr,"lens_flare_config__elements,lens_flare_config__intensity,lens_flare_config__name,lens_flare_config__scale,lens_flare_config__smooth_screen_fadeout_distance,lens_flare_config__use_occlusion"); +static constexpr ecs::ComponentDesc lens_flare_config_on_disappear_es_comps[] = +{ +//start of 1 rq components at [0] + {ECS_HASH("lens_flare_config__name"), ecs::ComponentTypeInfo()} +}; +static void lens_flare_config_on_disappear_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + lens_flare_config_on_disappear_es(evt + ); +} +static ecs::EntitySystemDesc lens_flare_config_on_disappear_es_es_desc +( + "lens_flare_config_on_disappear_es", + "prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl", + ecs::EntitySystemOps(nullptr, lens_flare_config_on_disappear_es_all_events), + empty_span(), + empty_span(), + make_span(lens_flare_config_on_disappear_es_comps+0, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +); +static constexpr ecs::ComponentDesc register_lens_flare_for_postfx_es_comps[] = +{ +//start of 1 rq components at [0] + {ECS_HASH("lens_flare_renderer"), ecs::ComponentTypeInfo()} +}; +static void register_lens_flare_for_postfx_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + G_FAST_ASSERT(evt.is()); + register_lens_flare_for_postfx_es(static_cast(evt) + ); +} +static ecs::EntitySystemDesc register_lens_flare_for_postfx_es_es_desc +( + "register_lens_flare_for_postfx_es", + "prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl", + ecs::EntitySystemOps(nullptr, register_lens_flare_for_postfx_es_all_events), + empty_span(), + empty_span(), + make_span(register_lens_flare_for_postfx_es_comps+0, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc prepare_sun_flares_ecs_query_comps[] = +{ +//start of 2 rw components at [0] + {ECS_HASH("sun_flare_provider__cached_id"), ecs::ComponentTypeInfo()}, + {ECS_HASH("sun_flare_provider__cached_flare_config_id"), ecs::ComponentTypeInfo()}, +//start of 2 ro components at [2] + {ECS_HASH("enabled"), ecs::ComponentTypeInfo()}, + {ECS_HASH("sun_flare_provider__flare_config"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc prepare_sun_flares_ecs_query_desc +( + "prepare_sun_flares_ecs_query", + make_span(prepare_sun_flares_ecs_query_comps+0, 2)/*rw*/, + make_span(prepare_sun_flares_ecs_query_comps+2, 2)/*ro*/, + empty_span(), + empty_span()); +template +inline void prepare_sun_flares_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, prepare_sun_flares_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(prepare_sun_flares_ecs_query_comps, "enabled", bool) + , ECS_RO_COMP(prepare_sun_flares_ecs_query_comps, "sun_flare_provider__flare_config", ecs::string) + , ECS_RW_COMP(prepare_sun_flares_ecs_query_comps, "sun_flare_provider__cached_id", int) + , ECS_RW_COMP(prepare_sun_flares_ecs_query_comps, "sun_flare_provider__cached_flare_config_id", int) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc gather_flare_configs_ecs_query_comps[] = +{ +//start of 6 ro components at [0] + {ECS_HASH("lens_flare_config__name"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__smooth_screen_fadeout_distance"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__scale"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__intensity"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__use_occlusion"), ecs::ComponentTypeInfo()}, + {ECS_HASH("lens_flare_config__elements"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc gather_flare_configs_ecs_query_desc +( + "gather_flare_configs_ecs_query", + empty_span(), + make_span(gather_flare_configs_ecs_query_comps+0, 6)/*ro*/, + empty_span(), + empty_span()); +template +inline void gather_flare_configs_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, gather_flare_configs_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__name", ecs::string) + , ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__smooth_screen_fadeout_distance", float) + , ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__scale", Point2) + , ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__intensity", float) + , ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__use_occlusion", bool) + , ECS_RO_COMP(gather_flare_configs_ecs_query_comps, "lens_flare_config__elements", ecs::Array) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc schedule_update_flares_renderer_ecs_query_comps[] = +{ +//start of 1 rw components at [0] + {ECS_HASH("lens_flare_renderer"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc schedule_update_flares_renderer_ecs_query_desc +( + "schedule_update_flares_renderer_ecs_query", + make_span(schedule_update_flares_renderer_ecs_query_comps+0, 1)/*rw*/, + empty_span(), + empty_span(), + empty_span()); +template +inline void schedule_update_flares_renderer_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, schedule_update_flares_renderer_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RW_COMP(schedule_update_flares_renderer_ecs_query_comps, "lens_flare_renderer", LensFlareRenderer) + ); + + }while (++comp != compE); + } + ); +} diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl b/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl new file mode 100644 index 000000000..a13aca071 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareES.cpp.inl @@ -0,0 +1,200 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#define INSIDE_RENDERER 1 + +#include "lensFlareRenderer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lensFlareNodes.h" + +ECS_REGISTER_BOXED_TYPE(LensFlareRenderer, nullptr); + +ECS_ON_EVENT(on_appear) +static void lens_flare_renderer_on_appear_es(const ecs::Event &, + LensFlareRenderer &lens_flare_renderer, + dabfg::NodeHandle &lens_flare_renderer__render_node, + dabfg::NodeHandle &lens_flare_renderer__prepare_lights_node) +{ + lens_flare_renderer.init(); + LensFlareQualityParameters quality = {0.5f}; + lens_flare_renderer__render_node = create_lens_flare_render_node(&lens_flare_renderer, quality); + lens_flare_renderer__prepare_lights_node = create_lens_flare_prepare_lights_node(&lens_flare_renderer); +} + +ECS_ON_EVENT(on_appear) +ECS_TRACK(sun_flare_provider__flare_config) +ECS_REQUIRE(const ecs::string &sun_flare_provider__flare_config) +static void sun_flare_provider_invalidate_es( + const ecs::Event &, int &sun_flare_provider__cached_id, int &sun_flare_provider__cached_flare_config_id) +{ + // Invalidate flare config id cache if the config name changes + LensFlareRenderer::CachedFlareId invalidId = {}; + sun_flare_provider__cached_id = invalidId.cacheId; + sun_flare_provider__cached_flare_config_id = invalidId.flareConfigId; +} + + +template +static void prepare_sun_flares_ecs_query(Callable); + +void LensFlareRenderer::collectAndPrepareECSSunFlares( + const TMatrix4 &view_proj, const Point3 &camera_pos, const Point3 &camera_dir, const Point3 &sun_dir, const Point3 &color) +{ + prepare_sun_flares_ecs_query([&, this](bool enabled, const ecs::string &sun_flare_provider__flare_config, + int &sun_flare_provider__cached_id, int &sun_flare_provider__cached_flare_config_id) { + if (!enabled) + return; + CachedFlareId cachedFlareId = {sun_flare_provider__cached_id, sun_flare_provider__cached_flare_config_id}; + if (!isCachedFlareIdValid(cachedFlareId)) + { + cachedFlareId = cacheFlareId(sun_flare_provider__flare_config.c_str()); + sun_flare_provider__cached_id = cachedFlareId.cacheId; + sun_flare_provider__cached_flare_config_id = cachedFlareId.flareConfigId; + } + if (cachedFlareId.isValid()) + prepareFlare(view_proj, camera_pos, camera_dir, cachedFlareId, Point4::xyz0(sun_dir), color, true); + }); +} + +template +static void gather_flare_configs_ecs_query(Callable); + +static const eastl::vector_set ACCEPTED_FLARE_COMPONENT_PROPS = {"flare_component__enabled", + "flare_component__gradient__falloff", "flare_component__gradient__gradient", "flare_component__gradient__inverted", + "flare_component__radial_distortion__enabled", "flare_component__radial_distortion__relative_to_center", + "flare_component__radial_distortion__distortion_curve_pow", "flare_component__radial_distortion__radial_edge_size", + "flare_component__scale", "flare_component__offset", "flare_component__axis_offset", "flare_component__auto_rotation", + "flare_component__intensity", "flare_component__roundness", "flare_component__side_count", "flare_component__tint", + "flare_component__use_light_color", "flare_component__texture", "flare_component__rotation_offset", + "flare_component__pre_rotation_offset"}; + +void LensFlareRenderer::updateConfigsFromECS() +{ + eastl::vector configs; + gather_flare_configs_ecs_query( + [&configs](const ecs::string &lens_flare_config__name, const float &lens_flare_config__smooth_screen_fadeout_distance, + const Point2 &lens_flare_config__scale, const float &lens_flare_config__intensity, bool lens_flare_config__use_occlusion, + const ecs::Array &lens_flare_config__elements) { + LensFlareConfig config; + config.name = lens_flare_config__name; + config.useOcclusion = lens_flare_config__use_occlusion; + config.intensity = lens_flare_config__intensity; + config.smoothScreenFadeoutDistance = lens_flare_config__smooth_screen_fadeout_distance; + config.scale = lens_flare_config__scale; + config.elements.reserve(lens_flare_config__elements.size()); + for (const auto &[elementInd, element] : enumerate(lens_flare_config__elements)) + { + ecs::Object configObj = element.get(); + int numComponents = configObj.size(); + int componentsHandled = 0; + +#define SET_ELEMENT_CONFIG_PROP(name, T, prop) \ + if (auto value = configObj.getNullable(ECS_HASH(name))) \ + { \ + componentsHandled++; \ + prop = *value; \ + } \ + else if (configObj.hasMember(ECS_HASH(name))) \ + { \ + logerr("Wrong type for lens flare component (flare config / component index / component property): %s / %d / %s", \ + lens_flare_config__name, elementInd, name); \ + } + + bool componentEnabled = true; + SET_ELEMENT_CONFIG_PROP("flare_component__enabled", bool, componentEnabled) + if (!componentEnabled) + continue; + + LensFlareConfig::Element elementConfig; + SET_ELEMENT_CONFIG_PROP("flare_component__gradient__falloff", float, elementConfig.gradient.falloff) + SET_ELEMENT_CONFIG_PROP("flare_component__gradient__gradient", float, elementConfig.gradient.gradient) + SET_ELEMENT_CONFIG_PROP("flare_component__gradient__inverted", bool, elementConfig.gradient.inverted) + SET_ELEMENT_CONFIG_PROP("flare_component__radial_distortion__enabled", bool, elementConfig.radialDistortion.enabled) + SET_ELEMENT_CONFIG_PROP("flare_component__radial_distortion__relative_to_center", bool, + elementConfig.radialDistortion.relativeToCenter) + SET_ELEMENT_CONFIG_PROP("flare_component__radial_distortion__distortion_curve_pow", float, + elementConfig.radialDistortion.distortionCurvePow) + SET_ELEMENT_CONFIG_PROP("flare_component__radial_distortion__radial_edge_size", Point2, + elementConfig.radialDistortion.radialEdgeSize) + SET_ELEMENT_CONFIG_PROP("flare_component__scale", Point2, elementConfig.scale) + SET_ELEMENT_CONFIG_PROP("flare_component__offset", Point2, elementConfig.offset) + SET_ELEMENT_CONFIG_PROP("flare_component__axis_offset", float, elementConfig.axisOffset) + SET_ELEMENT_CONFIG_PROP("flare_component__auto_rotation", bool, elementConfig.autoRotation) + SET_ELEMENT_CONFIG_PROP("flare_component__intensity", float, elementConfig.intensity) + SET_ELEMENT_CONFIG_PROP("flare_component__roundness", float, elementConfig.roundness) + SET_ELEMENT_CONFIG_PROP("flare_component__side_count", int, elementConfig.sideCount) + SET_ELEMENT_CONFIG_PROP("flare_component__tint", Point3, elementConfig.tint) + SET_ELEMENT_CONFIG_PROP("flare_component__use_light_color", bool, elementConfig.useLightColor) + SET_ELEMENT_CONFIG_PROP("flare_component__texture", ecs::string, elementConfig.texture) + float rotationOffsetDeg = RAD_TO_DEG * elementConfig.rotationOffset; + SET_ELEMENT_CONFIG_PROP("flare_component__rotation_offset", float, rotationOffsetDeg) + elementConfig.rotationOffset = DEG_TO_RAD * rotationOffsetDeg; + float preRotationOffsetDeg = RAD_TO_DEG * elementConfig.preRotationOffset; + SET_ELEMENT_CONFIG_PROP("flare_component__pre_rotation_offset", float, preRotationOffsetDeg) + elementConfig.preRotationOffset = DEG_TO_RAD * preRotationOffsetDeg; + +#undef SET_ELEMENT_CONFIG_PROP + + if (componentsHandled != numComponents) + { + for (const auto &property : configObj) + if (ACCEPTED_FLARE_COMPONENT_PROPS.count(property.first) == 0) + logerr("Unknown lens flare component (flare config / component index / component property): %s / %d / %s", + lens_flare_config__name, elementInd, property.first); + } + + config.elements.push_back(eastl::move(elementConfig)); + } + configs.push_back(eastl::move(config)); + }); + prepareConfigBuffers(eastl::move(configs)); +} + +template +static void schedule_update_flares_renderer_ecs_query(Callable); + +static void schedule_flares_update() +{ + schedule_update_flares_renderer_ecs_query([](LensFlareRenderer &lens_flare_renderer) { lens_flare_renderer.markConfigsDirty(); }); +} + +ECS_ON_EVENT(on_appear) +ECS_REQUIRE(const ecs::string &lens_flare_config__name, + const float &lens_flare_config__smooth_screen_fadeout_distance, + const Point2 &lens_flare_config__scale, + const float &lens_flare_config__intensity, + bool lens_flare_config__use_occlusion, + const ecs::Array &lens_flare_config__elements) +ECS_TRACK(lens_flare_config__name, + lens_flare_config__smooth_screen_fadeout_distance, + lens_flare_config__scale, + lens_flare_config__intensity, + lens_flare_config__use_occlusion, + lens_flare_config__elements) +static void lens_flare_config_on_appear_es(const ecs::Event &) { schedule_flares_update(); } + +ECS_ON_EVENT(on_disappear) +ECS_REQUIRE(const ecs::string &lens_flare_config__name) +static void lens_flare_config_on_disappear_es(const ecs::Event &) { schedule_flares_update(); } + +ECS_TAG(render) +ECS_REQUIRE(const LensFlareRenderer &lens_flare_renderer) +static void register_lens_flare_for_postfx_es(const RegisterPostfxResources &evt) +{ + (evt.get<0>().root() / "lens_flare") + .readTexture("lens_flares") + .atStage(dabfg::Stage::PS) + .bindToShaderVar("lens_flare_tex") + .optional(); + (evt.get<0>().root() / "lens_flare").readBlob("has_lens_flares").optional().bindToShaderVar("lens_flares_enabled"); +} diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareNodes.h b/prog/daNetGameLibs/lens_flare/render/lensFlareNodes.h new file mode 100644 index 000000000..02a7a595f --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareNodes.h @@ -0,0 +1,18 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#pragma once + +#include +#include + +class LensFlareRenderer; + +inline auto get_lens_flare_namespace() { return dabfg::root() / "lens_flare"; } + +struct LensFlareQualityParameters +{ + float resolutionScaling = 1; // multiplier of post_fx resolution +}; + +dabfg::NodeHandle create_lens_flare_render_node(const LensFlareRenderer *renderer, const LensFlareQualityParameters &quality); +dabfg::NodeHandle create_lens_flare_prepare_lights_node(LensFlareRenderer *renderer); diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlarePrepareLightsNode.cpp b/prog/daNetGameLibs/lens_flare/render/lensFlarePrepareLightsNode.cpp new file mode 100644 index 000000000..e5d6a46be --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlarePrepareLightsNode.cpp @@ -0,0 +1,44 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include "lensFlareNodes.h" +#include "lensFlareRenderer.h" + +#include +#include +#include +#include + +dabfg::NodeHandle create_lens_flare_prepare_lights_node(LensFlareRenderer *renderer) +{ + return get_lens_flare_namespace().registerNode("prepare_lights", DABFG_PP_NODE_SRC, [renderer](dabfg::Registry registry) { + auto bindShaderVar = [®istry](const char *shader_var_name, const char *tex_name) { + return registry.read(tex_name).texture().atStage(dabfg::Stage::PS).bindToShaderVar(shader_var_name); + }; + + auto hasLensFlaresHndl = registry.createBlob("has_lens_flares", dabfg::History::No).handle(); + + auto cameraHndl = registry.readBlob("current_camera").handle(); + auto sunParamsHndl = registry.readBlob("current_sun").handle(); + + auto fomShadowsHndl = bindShaderVar("fom_shadows_sin", "fom_shadows_sin").optional().handle(); + bindShaderVar("fom_shadows_cos", "fom_shadows_cos").optional(); + + auto volfogHndl = registry.readBlob("volfog_token").optional().handle(); + + read_gbuffer_depth(registry, dabfg::Stage::CS); + + return [renderer, cameraHndl, sunParamsHndl, hasLensFlaresHndl, fomShadowsHndl, volfogHndl]() { + const auto &camera = cameraHndl.ref(); + const auto &sun = sunParamsHndl.ref(); + + ShaderGlobal::set_int(lens_flare_has_volfogVarId, volfogHndl.get() != nullptr ? 1 : 0); + ShaderGlobal::set_int(lens_flare_has_fom_shadowsVarId, fomShadowsHndl.get() != nullptr ? 1 : 0); + + renderer->startPreparingLights(); + renderer->collectAndPrepareECSSunFlares(camera.noJitterGlobtm, camera.cameraWorldPos, camera.viewItm.getcol(2), sun.dirToSun, + Point3::rgb(sun.sunColor)); + bool hasFlaresToRender = renderer->endPreparingLights(camera.cameraWorldPos); + hasLensFlaresHndl.ref() = hasFlaresToRender ? 1 : 0; + }; + }); +} \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareRenderNode.cpp b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderNode.cpp new file mode 100644 index 000000000..521878bb4 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderNode.cpp @@ -0,0 +1,30 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include "lensFlareNodes.h" +#include "lensFlareRenderer.h" + +#include +#include + +dabfg::NodeHandle create_lens_flare_render_node(const LensFlareRenderer *renderer, const LensFlareQualityParameters &quality) +{ + return get_lens_flare_namespace().registerNode("render", DABFG_PP_NODE_SRC, [renderer, quality](dabfg::Registry registry) { + auto hasLensFlaresHndl = registry.readBlob("has_lens_flares").handle(); + + const auto resolution = registry.getResolution<2>("post_fx", quality.resolutionScaling); + uint32_t rtFmt = TEXFMT_R11G11B10F; + if (!(d3d::get_texformat_usage(rtFmt) & d3d::USAGE_RTARGET)) + rtFmt = TEXFMT_A16B16G16R16F; + const uint32_t texFmt = rtFmt | TEXCF_RTARGET; + auto lensFlareTexture = registry.createTexture2d("lens_flares", dabfg::History::No, {texFmt, resolution}); + registry.requestRenderPass().color({lensFlareTexture}).clear(lensFlareTexture, make_clear_value(0.f, 0.f, 0.f, 0.f)); + + registry.requestState().setFrameBlock("global_frame"); + + return [renderer, resolution, hasLensFlaresHndl]() { + if (!hasLensFlaresHndl.ref()) + return; + renderer->render(resolution.get()); + }; + }); +} diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.cpp b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.cpp new file mode 100644 index 000000000..85cf4ea20 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.cpp @@ -0,0 +1,398 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include "lensFlareRenderer.h" + +#include +#include <3d/dag_resPtr.h> +#include <3d/dag_lockSbuffer.h> +#include +#include +#include +#include +#include + +#include +#include + + +#define VAR(a) ShaderVariableInfo a##VarId(#a); +LENS_FLARE_VARS_LIST +#undef VAR + +#pragma pack(push) +#pragma pack(1) +struct LensFlareVertex +{ + Point2 pos; + Point2 tc; + Point2 flareId__vertexId; +}; +#pragma pack(pop) + +LensFlareRenderer::LensFlareData::LensFlareData(const eastl::string config_name, const Params &_params) : + configName(eastl::move(config_name)), params(_params) +{} + +struct RenderBlockKey +{ + eastl::string texture; + int roundingType; + + bool operator==(const RenderBlockKey &other) const { return roundingType == other.roundingType && texture == other.texture; } +}; + +template <> +struct eastl::hash +{ + size_t operator()(const RenderBlockKey &k) const { return hash()(k.texture) ^ hash()(k.roundingType); } +}; + +template +using HashMapWithFrameMem = ska::flat_hash_map, eastl::equal_to, framemem_allocator>; + +LensFlareRenderer::LensFlareData LensFlareRenderer::LensFlareData::parse_lens_flare_config(const LensFlareConfig &config, + eastl::vector &ib, + eastl::vector &vb, + eastl::vector &flares, + eastl::vector &vpos) +{ + FRAMEMEM_REGION; + + LensFlareData result = LensFlareData(config.name, {config.smoothScreenFadeoutDistance, config.useOcclusion}); + HashMapWithFrameMem renderBlockIds; + eastl::vector, framemem_allocator> elementsPerRenderBlock; + HashMapWithFrameMem sideCountToVPosOffset; + HashMapWithFrameMem elementIdToVPosOffset; + + for (auto [elementId, element] : enumerate(config.elements)) + { + if (element.sideCount <= 2) + continue; + + const bool canShareVPosBuf = fabsf(element.preRotationOffset) < 0.000001f; + if (!canShareVPosBuf || sideCountToVPosOffset.count(element.sideCount) == 0) + { + if (canShareVPosBuf) + sideCountToVPosOffset[element.sideCount] = vpos.size(); + else + elementIdToVPosOffset[elementId] = vpos.size(); + for (int i = 0; i <= element.sideCount; ++i) + { + // modulo is used to avoid different vertex positions due to floating point precision issues + double angle = (double(i % element.sideCount) + 0.5) / element.sideCount * M_PI * 2 + element.preRotationOffset; + vpos.push_back(Point2(sin(angle), cos(angle))); + } + } + + RoundingType roundingType = RoundingType::ROUNDED; + if (element.roundness < 0.0000001f) + roundingType = RoundingType::SHARP; + else if (element.roundness > 0.9999999f) + roundingType = RoundingType::CIRCLE; + RenderBlockKey key = {eastl::string{element.texture.c_str()}, static_cast(roundingType)}; + auto renderBlockItr = renderBlockIds.find(key); + int renderBlockId = -1; + if (renderBlockItr != renderBlockIds.end()) + renderBlockId = renderBlockItr->second; + else + { + renderBlockId = result.renderBlocks.size(); + SharedTex tex; + if (!element.texture.empty()) + { + tex = dag::get_tex_gameres(element.texture.c_str()); + G_ASSERTF(tex.getBaseTex() != nullptr, "Couldn't find texture: <%s>", element.texture); + } + + result.renderBlocks.push_back({0, 0, eastl::move(tex), roundingType}); + elementsPerRenderBlock.emplace_back(); + renderBlockIds.insert_or_assign(key, renderBlockId); + } + elementsPerRenderBlock[renderBlockId].push_back(elementId); + } + + for (auto [renderBlockId, renderBlock] : enumerate(result.renderBlocks)) + { + renderBlock.indexOffset = ib.size(); + for (const auto &elementId : elementsPerRenderBlock[renderBlockId]) + { + const auto &element = config.elements[elementId]; + if (element.sideCount <= 2) + continue; + + // Precompute rounding parameters + float triangleAngle = M_PI * 2 / element.sideCount; + float sideLength = sin(triangleAngle / 2); + float roundedSideLength = sideLength * element.roundness; + float vertexToCircleCenterDist = roundedSideLength / sin(triangleAngle / 2); + float circleRadius = vertexToCircleCenterDist * cos(triangleAngle / 2); + float circleOffset = 1 - vertexToCircleCenterDist; + float roundnessClippingConeCos = cos(triangleAngle / 2); + + // Rounding would otherwise shrink the shape + float roundnessScaling = 1.0f / (circleOffset + circleRadius); + + float invMaxDist = 1.0f / cos(M_PI / element.sideCount); + + int vertexPosBufferOffset = + elementIdToVPosOffset.count(elementId) > 0 ? elementIdToVPosOffset[elementId] : sideCountToVPosOffset[element.sideCount]; + + uint16_t flags = 0; + if (element.autoRotation) + flags |= LENS_FLARE_DATA_FLAGS__AUTO_ROTATION; + if (element.useLightColor) + flags |= LENS_FLARE_DATA_FLAGS__USE_LIGHT_COLOR; + if (element.gradient.inverted) + flags |= LENS_FLARE_DATA_FLAGS__INVERTED_GRADIENT; + if (element.radialDistortion.enabled) + flags |= LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION; + if (element.radialDistortion.enabled && element.radialDistortion.relativeToCenter) + flags |= LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION_REL_TO_CENTER; + LensFlareInfo flareData; + flareData.tintRGB_invMaxDist = Point4::xyzV(element.tint, invMaxDist); + flareData.offset = element.offset; + flareData.scale = mul(element.scale, config.scale) * roundnessScaling; + flareData.invGradient = safediv(1.f, element.gradient.gradient); + flareData.invFalloff = safediv(1.f, element.gradient.falloff); + flareData.intensity = element.intensity * config.intensity; + flareData.axisOffset2 = element.axisOffset * 2; + flareData.flags = flags; + flareData.rotationOffsetSinCos = Point2(sinf(element.rotationOffset), cosf(element.rotationOffset)); + flareData.distortionScale = mul(element.radialDistortion.radialEdgeSize, config.scale) * roundnessScaling; + flareData.roundness = element.roundness; + flareData.roundingCircleRadius = circleRadius; + flareData.roundingCircleOffset = circleOffset; + flareData.roundingCircleCos = roundnessClippingConeCos; + flareData.distortionPow = element.radialDistortion.distortionCurvePow; + flareData.vertexPosBufOffset = vertexPosBufferOffset; + int globalFlareId = flares.size(); + flares.push_back(flareData); + + renderBlock.numTriangles += element.sideCount; + int startingVertexId = vb.size(); + + const Point2 *positions = &vpos[vertexPosBufferOffset]; + BBox2 shapeBbox; + for (int i = 0; i <= element.sideCount; ++i) + shapeBbox += positions[i]; + // Tc: normalized pos in bounding box + const Point2 tcTmMul = Point2(1.0f / shapeBbox.size().x, 1.0f / shapeBbox.size().y); + const Point2 tcTmAdd = Point2(-shapeBbox.getMin().x / shapeBbox.size().x, -shapeBbox.getMin().y / shapeBbox.size().y); + + vb.push_back({Point2(0, 0), tcTmAdd, Point2(globalFlareId, -1)}); + // the first/last vertex appears two times on purpose: pixel shader needs to know the closest vertex's id + for (int i = 0; i <= element.sideCount; ++i) + { + const Point2 pos = positions[i]; + const Point2 tc = mul(pos, tcTmMul) + tcTmAdd; + vb.push_back({pos, tc, Point2(globalFlareId, i)}); + + if (i < element.sideCount) + { + ib.push_back(startingVertexId); // center + ib.push_back(startingVertexId + i + 1); + ib.push_back(startingVertexId + i + 2); + } + } + } + } + return result; +} + + +const eastl::vector &LensFlareRenderer::LensFlareData::getRenderBlocks() const +{ + return renderBlocks; +} + +LensFlareRenderer::LensFlareRenderer() {} + +void LensFlareRenderer::init() +{ + prepareFlaresShader = new_compute_shader("prepare_lens_flare"); + + lensShaderMaterial = new_shader_material_by_name("lens_flare"); + if (lensShaderMaterial.get()) + { + static CompiledShaderChannelId channels[] = { + {SCTYPE_FLOAT2, SCUSAGE_POS, 0, 0}, + {SCTYPE_FLOAT2, SCUSAGE_TC, 0, 0}, + {SCTYPE_FLOAT2, SCUSAGE_TC, 1, 0}, + }; + G_ASSERT(lensShaderMaterial->checkChannels(channels, countof(channels))); + + lensShaderElement.shElem = lensShaderMaterial->make_elem(); + if (lensShaderElement.shElem != nullptr) + { + lensShaderElement.vDecl = dynrender::addShaderVdecl(channels, countof(channels)); + G_ASSERT(lensShaderElement.vDecl != BAD_VDECL); + lensShaderElement.stride = dynrender::getStride(channels, countof(channels)); + } + } + G_ASSERT_RETURN(lensShaderElement.shElem != nullptr, ); + G_ASSERT_RETURN(sizeof(LensFlareVertex) == lensShaderElement.stride, ); +} + +void LensFlareRenderer::markConfigsDirty() { isDirty = true; } + +void LensFlareRenderer::prepareConfigBuffers(const eastl::vector &configs) +{ + lensFlareBuf.close(); + vertexPositionsBuf.close(); + flareIB.close(); + flareVB.close(); + lensFlares.clear(); + currentConfigCacheId++; + + if (configs.empty()) + return; + + eastl::vector indexBufferContent; + eastl::vector vertexBufferContent; + eastl::vector flaresBufferContent; + eastl::vector vertexPositionsBufferContent; + lensFlares.reserve(configs.size()); + for (const auto &config : configs) + lensFlares.emplace_back(LensFlareData::parse_lens_flare_config(config, indexBufferContent, vertexBufferContent, + flaresBufferContent, vertexPositionsBufferContent)); + + numTotalVertices = vertexBufferContent.size(); + + lensFlareBuf = + dag::buffers::create_persistent_sr_structured(sizeof(flaresBufferContent[0]), flaresBufferContent.size(), "lens_flare_info_buf"); + preparedLightsBuf = dag::buffers::create_ua_sr_structured(sizeof(LensFLarePreparedLightSource), maxNumPreparedLights, + "lens_flare_prepared_lights_buf"); + vertexPositionsBuf = dag::buffers::create_persistent_sr_structured(sizeof(Point2), vertexPositionsBufferContent.size(), + "lens_flare_vertex_positions_buf"); + flareVB = dag::create_vb(data_size(vertexBufferContent), SBCF_BIND_VERTEX, "LensFlareVertices"); + flareIB = dag::create_ib(lensShaderElement.stride * indexBufferContent.size(), SBCF_BIND_INDEX, "LensFlareIndices"); + lensFlareBuf->updateData(0, flaresBufferContent.size() * sizeof(flaresBufferContent[0]), flaresBufferContent.data(), + VBLOCK_WRITEONLY); + vertexPositionsBuf->updateData(0, sizeof(float) * 2 * vertexPositionsBufferContent.size(), vertexPositionsBufferContent.data(), + VBLOCK_WRITEONLY); + flareIB->updateData(0, data_size(indexBufferContent), indexBufferContent.data(), VBLOCK_WRITEONLY); + flareVB->updateData(0, data_size(vertexBufferContent), vertexBufferContent.data(), VBLOCK_WRITEONLY); +} + +LensFlareRenderer::~LensFlareRenderer() {} + +bool LensFlareRenderer::isCachedFlareIdValid(const CachedFlareId &id) const +{ + return id.isValid() && id.cacheId == currentConfigCacheId; +} + +LensFlareRenderer::CachedFlareId LensFlareRenderer::cacheFlareId(const char *flare_config_name) const +{ + for (auto [i, lensFlare] : enumerate(lensFlares)) + if (lensFlare.getConfigName() == flare_config_name) + return {currentConfigCacheId, int(i)}; + return {}; +} + +void LensFlareRenderer::startPreparingLights() +{ + if (isDirty) + { + isDirty = false; + updateConfigsFromECS(); + } + preparedLights.clear(); +} + +void LensFlareRenderer::prepareFlare(const TMatrix4 &view_proj, + const Point3 &camera_pos, + const Point3 &camera_dir, + const CachedFlareId &cached_flare_config_id, + const Point4 &light_pos, + const Point3 &color, + bool is_sun) +{ + G_ASSERT_RETURN(cached_flare_config_id.cacheId == currentConfigCacheId, ); + G_ASSERT_RETURN(cached_flare_config_id.flareConfigId < lensFlares.size(), ); + + if (preparedLights.size() >= maxNumPreparedLights) + { + LOGERR_ONCE("There are too many lens flares visible at once. Increase the limit to allow this. Current limit: %d", + maxNumPreparedLights); + return; + } + + // TODO this logic should be moved to the compute shader later when multiple light sources are used; use with indirect rendering + const Point4 cameraToLight = light_pos - Point4::xyz1(camera_pos) * light_pos.w; + if (dot(camera_dir, Point3::xyz(cameraToLight)) <= 0) + return; + Point4 projectedLightPos = light_pos * view_proj; + if (fabsf(projectedLightPos.w) < 0.0000001f) + return; + projectedLightPos /= projectedLightPos.w; + float screenEdgeSignedDistance = 1.f - max(fabsf(projectedLightPos.x), fabsf(projectedLightPos.y)); + if (screenEdgeSignedDistance <= 0) + return; + + preparedLights.push_back( + PreparedLight{color, Point2(projectedLightPos.x, projectedLightPos.y), cached_flare_config_id.flareConfigId, is_sun}); +} + +bool LensFlareRenderer::endPreparingLights(const Point3 &camera_pos) +{ + if (preparedLights.empty()) + return false; + + // TODO: + // Improve/refactor this when flares are added to multiple light sources. + // For now only the sun can have flares. This for loop is fine for now. + for (auto [i, preparedLight] : enumerate(preparedLights)) + { + const auto &flareData = lensFlares[preparedLight.flareConfigId]; + + ShaderGlobal::set_int(lens_flare_prepare_flares_offsetVarId, i); + ShaderGlobal::set_int(lens_flare_prepare_num_flaresVarId, 1); + ShaderGlobal::set_int(lens_flare_prepare_is_sunVarId, preparedLight.isSun ? 1 : 0); + ShaderGlobal::set_int(lens_flare_prepare_use_occlusionVarId, flareData.getParams().useOcclusion ? 1 : 0); + ShaderGlobal::set_color4(lens_flare_prepare_sun_colorVarId, preparedLight.lightColor, 0); + ShaderGlobal::set_real(lens_flare_prepare_fadeout_distanceVarId, flareData.getParams().smoothScreenFadeoutDistance); + ShaderGlobal::set_color4(lens_flare_prepare_sun_screen_tcVarId, preparedLight.lightPos); + ShaderGlobal::set_color4(lens_flare_prepare_camera_posVarId, camera_pos, 0); + prepareFlaresShader->dispatch(1, 1, 1); + } + d3d::resource_barrier({preparedLightsBuf.getBuf(), RB_RO_SRV | RB_STAGE_VERTEX}); + + return true; +} + +void LensFlareRenderer::render(const Point2 &resolution) const +{ + if (preparedLights.empty()) + return; + const auto vb = flareVB.getBuf(); + const auto ib = flareIB.getBuf(); + + if (vb == nullptr || ib == nullptr || lensShaderElement.shElem == nullptr) + return; + + const Point2 globalScale = + resolution.x >= resolution.y ? Point2(float(resolution.y) / resolution.x, 1) : Point2(1, float(resolution.x) / resolution.y); + ShaderGlobal::set_color4(lens_flare_resolutionVarId, resolution); + ShaderGlobal::set_color4(lens_flare_global_scaleVarId, globalScale); + + d3d::setvsrc(0, vb, lensShaderElement.stride); + d3d::setind(ib); + + for (auto [preparedLightId, preparedLight] : enumerate(preparedLights)) + { + const auto &flareData = lensFlares[preparedLight.flareConfigId]; + const auto &renderBlocks = flareData.getRenderBlocks(); + if (renderBlocks.empty()) + continue; + + ShaderGlobal::set_int(lens_flare_light_source_idVarId, preparedLightId); + + for (const auto &renderBlock : renderBlocks) + { + ShaderGlobal::set_texture(lens_flare_textureVarId, renderBlock.texture.getTexId()); + ShaderGlobal::set_int(lens_flare_rounding_typeVarId, static_cast(renderBlock.roundingType)); + lensShaderElement.shElem->setStates(); + lensShaderElement.shElem->render(0, numTotalVertices, renderBlock.indexOffset, renderBlock.numTriangles, 0, PRIM_TRILIST); + } + } +} diff --git a/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.h b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.h new file mode 100644 index 000000000..51223f5f5 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/render/lensFlareRenderer.h @@ -0,0 +1,187 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#pragma once + +#include +#include +#include +#include <3d/dag_resPtr.h> +#include +#include + +#define LENS_FLARE_VARS_LIST \ + VAR(lens_flare_texture) \ + VAR(lens_flare_prepare_num_flares) \ + VAR(lens_flare_prepare_flares_offset) \ + VAR(lens_flare_light_source_id) \ + VAR(lens_flare_prepare_camera_pos) \ + VAR(lens_flare_prepare_is_sun) \ + VAR(lens_flare_rounding_type) \ + VAR(lens_flare_prepare_use_occlusion) \ + VAR(lens_flare_has_fom_shadows) \ + VAR(lens_flare_has_volfog) \ + VAR(lens_flare_prepare_sun_color) \ + VAR(lens_flare_prepare_fadeout_distance) \ + VAR(lens_flare_prepare_sun_screen_tc) \ + VAR(lens_flare_resolution) \ + VAR(lens_flare_global_scale) + +#define VAR(a) extern ShaderVariableInfo a##VarId; +LENS_FLARE_VARS_LIST +#undef VAR + +class ComputeShaderElement; +struct LensFlareVertex; +struct LensFlareInfo; + +struct LensFlareConfig +{ + struct Gradient + { + float falloff = 1; // curve of the fadeout effect: intensity = pow(saturate(edgeDistance/gradient), 1/falloff) + float gradient = 0.1f; // distance of the fadeout effect (1=radius of the shape) + bool inverted = false; + }; + struct RadialDistortion + { + bool enabled = false; + bool relativeToCenter = false; // if not, it's relative to the light's source + float distortionCurvePow = 1; // distortion magnitude = pow(distance, distortionCurvePow) + Point2 radialEdgeSize = Point2(1, 1); // size of the flare as it reaches the screen's edge = most extreme size (smallest or + // largest) that it gets due to the distortion + }; + struct Element + { + Gradient gradient; + RadialDistortion radialDistortion; + Point2 scale = Point2(1, 1); + Point2 offset = Point2(0, 0); + float preRotationOffset = 0; // applied before scaling + float rotationOffset = 0; + float axisOffset = 0; // 0 = light source; 0.5 = screen center + bool autoRotation = false; + float intensity = 1; + eastl::string texture; + float roundness = 0; + int sideCount = 4; + Point3 tint = Point3(1, 1, 1); + bool useLightColor = true; + }; + + eastl::string name; + float smoothScreenFadeoutDistance = 0; + Point2 scale = Point2(1, 1); + float intensity = 1; + bool useOcclusion = true; + eastl::vector elements; +}; + +class LensFlareRenderer +{ +public: + struct CachedFlareId + { + int cacheId = -1; + int flareConfigId = -1; + + [[nodiscard]] bool isValid() const { return flareConfigId >= 0; } + operator bool() const { return isValid(); } + }; + + LensFlareRenderer(); + ~LensFlareRenderer(); + + void init(); + void markConfigsDirty(); + void startPreparingLights(); + void prepareFlare(const TMatrix4 &view_proj, + const Point3 &camera_pos, + const Point3 &camera_dir, + const CachedFlareId &cached_flare_config_id, + const Point4 &light_pos, + const Point3 &color, + bool is_sun); + void collectAndPrepareECSSunFlares( + const TMatrix4 &view_proj, const Point3 &camera_pos, const Point3 &camera_dir, const Point3 &sun_dir, const Point3 &color); + bool endPreparingLights(const Point3 &camera_pos); + void render(const Point2 &resolution) const; + + [[nodiscard]] bool isCachedFlareIdValid(const CachedFlareId &id) const; + CachedFlareId cacheFlareId(const char *flare_config_name) const; + +private: + enum class RoundingType : int + { + SHARP = 0, + ROUNDED = 1, + CIRCLE = 2 + }; + + struct LensFlareRenderBlock + { + int indexOffset = 0; + int numTriangles = 0; + SharedTex texture; + RoundingType roundingType = RoundingType::SHARP; + }; + + class LensFlareData + { + public: + struct Params + { + float smoothScreenFadeoutDistance; + bool useOcclusion; + }; + + explicit LensFlareData(eastl::string config_name, const Params ¶ms); + LensFlareData(LensFlareData &&) = default; + LensFlareData &operator=(LensFlareData &&) = default; + + static LensFlareData parse_lens_flare_config(const LensFlareConfig &config, + eastl::vector &ib, + eastl::vector &vb, + eastl::vector &flares, + eastl::vector &vpos); + + [[nodiscard]] const eastl::vector &getRenderBlocks() const; + [[nodiscard]] const eastl::string &getConfigName() const { return configName; } + [[nodiscard]] const Params &getParams() const { return params; } + + private: + eastl::string configName; + Params params; + eastl::vector renderBlocks; + }; + + struct PreparedLight + { + Point3 lightColor; + Point2 lightPos; + int flareConfigId; + bool isSun; + }; + + Ptr prepareFlaresShader; + Ptr lensShaderMaterial; + dynrender::RElem lensShaderElement; + // TODO increase this later to allow many point lights later + int maxNumPreparedLights = 2; + + eastl::vector lensFlares; + UniqueBufHolder lensFlareBuf; + UniqueBufHolder preparedLightsBuf; + UniqueBufHolder vertexPositionsBuf; + UniqueBuf flareVB; + UniqueBuf flareIB; + int numTotalVertices = 0; + int currentConfigCacheId = 0; + bool isDirty = true; + + eastl::vector preparedLights; + + void prepareConfigBuffers(const eastl::vector &configs); + void updateConfigsFromECS(); +}; + +ECS_DECLARE_BOXED_TYPE(LensFlareRenderer); diff --git a/prog/daNetGameLibs/lens_flare/shaders/lens_flare.dshl b/prog/daNetGameLibs/lens_flare/shaders/lens_flare.dshl new file mode 100644 index 000000000..ed1135a54 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/shaders/lens_flare.dshl @@ -0,0 +1,406 @@ +include "shader_global.dshl" +include "gbuffer.dshl" +include "use_volfog.dshl" +include "fom_shadows.dshl" + +texture lens_flare_texture; +buffer lens_flare_info_buf; +buffer lens_flare_vertex_positions_buf; +buffer lens_flare_prepared_lights_buf; +float4 lens_flare_resolution; +float4 lens_flare_global_scale; +int lens_flare_light_source_id; +int lens_flare_rounding_type; +interval lens_flare_rounding_type : sharp < 1, rounded < 2, circle; + + +int lens_flare_prepare_flares_offset = 0; +int lens_flare_prepare_num_flares = 0; +int lens_flare_prepare_use_occlusion = 0; +int lens_flare_prepare_is_sun = 0; +float4 lens_flare_prepare_sun_color; +float lens_flare_prepare_fadeout_distance; +float4 lens_flare_prepare_sun_screen_tc; +float4 lens_flare_prepare_camera_pos; +int lens_flare_has_fom_shadows = 0; +interval lens_flare_has_fom_shadows : no<1, yes; +int lens_flare_has_volfog = 0; +interval lens_flare_has_volfog : no<1, yes; + +shader prepare_lens_flare +{ + ENABLE_ASSERT(cs) + + INIT_ZNZFAR_STAGE(cs) + INIT_LOAD_DEPTH_GBUFFER_BASE(cs) + USE_LOAD_DEPTH_GBUFFER_BASE(cs) + + if (lens_flare_has_volfog == yes) { + INIT_VOLUMETRIC_LIGHT(cs) + USE_VOLUMETRIC_LIGHT(cs) + } + + if (lens_flare_has_fom_shadows == yes) { + INIT_FOM_SHADOWS(cs) + USE_FOM_SHADOWS(cs) + } + + (cs) { + num_flares@i1 = (lens_flare_prepare_num_flares); + flares_offset@i1 = (lens_flare_prepare_flares_offset); + use_occlusion@i1 = (lens_flare_prepare_use_occlusion); + is_sun@i1 = (lens_flare_prepare_is_sun); + sun_color@f3 = (lens_flare_prepare_sun_color); + fadeout_distance@f1 = (lens_flare_prepare_fadeout_distance); + sun_tc@f2 = (lens_flare_prepare_sun_screen_tc); + depth_resolution@f2 = get_dimensions(depth_gbuf, 0); + camera_pos@f3 = lens_flare_prepare_camera_pos; + + preparedLights@uav = lens_flare_prepared_lights_buf hlsl { + #include + RWStructuredBuffer preparedLights@uav; + } + } + + hlsl(cs) { + #include + + [numthreads(LENS_FLARE_THREADS, 1, 1)] + void main(uint3 dtId : SV_DispatchThreadID) + { + uint id = dtId.x; + if (id >= num_flares) + return; + uint preparedLightId = id + flares_offset; + + float2 screenTc = (sun_tc*float2(1, -1)*0.5+0.5); + + float2 lightScreenPos = sun_tc; + float radialCenterDistance = max(abs(lightScreenPos.x), abs(lightScreenPos.y)); + float screenEdgeSignedDistance = 1.f-radialCenterDistance; + + float2 angleSinCos = lengthSq(lightScreenPos) > 0.000001f + ? normalize(lightScreenPos) + : float2(0, 1); + + float intensity = 1; + if (fadeout_distance > 0 && screenEdgeSignedDistance < fadeout_distance) + intensity = saturate(screenEdgeSignedDistance / fadeout_distance); + + + BRANCH + if (use_occlusion > 0 && intensity > 0) { + float rawDepth = loadGbufferDepth(screenTc * depth_resolution); + float depth = linearize_z(rawDepth, zn_zfar.zw); + if (depth < zn_zfar.y) + intensity = 0; + + BRANCH + if (intensity > 0) + { + ##if lens_flare_has_volfog == yes + // TODO: implement this for point lights. (intensity *= get_volfog_with_scattering_loss(screenTc, screenTc, view, dist, w);) + intensity *= get_volumetric_light_sky(screenTc, screenTc).a; + ##endif + + ##if lens_flare_has_fom_shadows == yes + if (is_sun) { + // The shadow is rendered from the sun's direction, so it only makes sense to apply to the sun. + intensity *= getFOMShadow(camera_pos); + } + ##endif + } + } + + structuredBufferAt(preparedLights, preparedLightId).color_intensity = float4(sun_color, intensity); + structuredBufferAt(preparedLights, preparedLightId).light_screen_pos = lightScreenPos; + structuredBufferAt(preparedLights, preparedLightId).rotation_sin_cos = angleSinCos; + structuredBufferAt(preparedLights, preparedLightId).radial_distances = float2(radialCenterDistance, 1-screenEdgeSignedDistance); + } + } + compile("target_cs", "main"); +} + +shader lens_flare +{ + ENABLE_ASSERT(ps) + + supports global_frame; + z_write = false; + z_test = false; + cull_mode = none; + + blend_src = sa; blend_dst = 1; + blend_asrc = sa; blend_adst = 1; + + (vs) { + lens_flare_info@buf = lens_flare_info_buf hlsl { + #include + StructuredBuffer lens_flare_info@buf; + }; + lens_flare_prepared_lights@buf = lens_flare_prepared_lights_buf hlsl { + #include + StructuredBuffer lens_flare_prepared_lights@buf; + } + resolution@f2 = (lens_flare_resolution); + global_scale@f2 = (lens_flare_global_scale); + light_source_id@i1 = (lens_flare_light_source_id); + } + + (ps) { + lens_flare_texture@smp2d = lens_flare_texture; + + vertex_positions@buf = lens_flare_vertex_positions_buf hlsl { + StructuredBuffer vertex_positions@buf; + } + } + + channel float2 pos = pos; + channel float2 tc[0] = tc[0]; + channel float2 tc[1] = tc[1]; + + hlsl { + struct VsInput + { + float2 pos : POSITION; + float2 tc: TEXCOORD0; + float2 flareId__vertexId: TEXCOORD1; + }; + + struct VsOutput + { + VS_OUT_POSITION(pos) + nointerpolation float4 color_intensity : TEXCOORD0; + + ##if lens_flare_rounding_type == sharp + noperspective float4 tc_gradientIntensity_invFalloff : TEXCOORD1; + noperspective float edgeGradientIntensity : TEXCOORD2; + ##elif lens_flare_rounding_type == rounded + noperspective float4 tc_pos : TEXCOORD1; + noperspective float3 edgeDistance_vertexId_invMaxDist : TEXCOORD2; + nointerpolation float4 roundness_radius_offset_cos : TEXCOORD3; + nointerpolation float4 invGradient_invFalloff_invEdgeGradient_vposOffset : TEXCOORD4; + ##elif lens_flare_rounding_type == circle + noperspective float4 tc_normalizedPos : TEXCOORD1; + nointerpolation float3 invGradient_invFalloff_invEdgeGradient : TEXCOORD2; + ##endif + }; + + #ifndef M_PI + #define M_PI (3.14159265358979323846) + #endif + } + + INIT_HDR(vs) + USE_HDR(vs) + + hlsl(vs) { + VsOutput lens_flare_vs(VsInput input) + { + VsOutput output; + + + // --- Reading parameters --- + + + uint flareId = uint(input.flareId__vertexId.x); + bool isCenter = input.flareId__vertexId.y < 0; + + LensFlareInfo info = structuredBufferAt(lens_flare_info, flareId); + float3 tint = info.tintRGB_invMaxDist.rgb; + float invMaxDist = info.tintRGB_invMaxDist.w; + float2 offset = info.offset; + float2 scale = info.scale; + float2 distortionScale = info.distortionScale; + float invGradient = info.invGradient;; + float invFalloff = info.invFalloff; + float componentIntensity = info.intensity;; + float axisOffset2 = info.axisOffset2; + uint flags = info.flags; + float distortionPow = info.distortionPow; + float roundness = info.roundness; + float roundingCircleRadius = info.roundingCircleRadius; + float roundingCircleOffset = info.roundingCircleOffset; + float roundingCircleCos = info.roundingCircleCos; + uint vposOffset = info.vertexPosBufOffset; + float2 rotationOffsetSinCos = info.rotationOffsetSinCos; + bool invertedGradient = flags & LENS_FLARE_DATA_FLAGS__INVERTED_GRADIENT; + bool useLightColor = flags & LENS_FLARE_DATA_FLAGS__USE_LIGHT_COLOR; + bool autoRotation = flags & LENS_FLARE_DATA_FLAGS__AUTO_ROTATION; + + LensFLarePreparedLightSource lightSource = structuredBufferAt(lens_flare_prepared_lights, light_source_id); + + + // --- These depend on the flare component, but not the specific vertex --- + + + float distortionFactor = 0; + if (flags & LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION) + { + float distortionDistance = flags & LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION_REL_TO_CENTER + ? lightSource.radial_distances.x + : lightSource.radial_distances.y; + distortionFactor = pow(distortionDistance, distortionPow); + } + float2x2 rotation = float2x2( + float2( rotationOffsetSinCos.y, rotationOffsetSinCos.x), + float2(-rotationOffsetSinCos.x, rotationOffsetSinCos.y) + ); + float intensity = componentIntensity * lightSource.color_intensity.w; + float2 flarePos = lerp(lightSource.light_screen_pos, float2(0, 0), axisOffset2) + offset; + + float3 lightColor = lightSource.color_intensity.rgb; + if (!useLightColor) + lightColor.xyz = max3(lightColor.x, lightColor.y, lightColor.z); + float3 preExposedColor = pack_hdr(lightColor*tint); // it will be modulated by texture rgb in ps + + + // --- Calculations specific to this vertex --- + + + float2 currentScale = lerp(scale, distortionScale, distortionFactor); + const float invEdgeGradientMul = 0.5; // 1/2: fadeout over 2 pixels + float invEdgeGradient = min(currentScale.x, currentScale.y) * max(resolution.x, resolution.y) * invEdgeGradientMul; + + float2 localPos = input.pos * currentScale; + localPos = mul(rotation, localPos); + BRANCH + if (autoRotation) + { + float2x2 autoRotationTm = float2x2( + float2( lightSource.rotation_sin_cos.y, lightSource.rotation_sin_cos.x), + float2(-lightSource.rotation_sin_cos.x, lightSource.rotation_sin_cos.y) + ); + localPos = mul(autoRotationTm, localPos); + } + localPos *= global_scale.xy; + + + // --- Writing vertex output --- + + + output.pos = float4(flarePos + localPos, 0, 1); + output.color_intensity.rgb = preExposedColor; + output.color_intensity.w = intensity; + + ##if lens_flare_rounding_type == sharp + float edgeDistance = isCenter ? 1 : 0; + float gradientIntensity = edgeDistance * invGradient; + if (invertedGradient) + gradientIntensity = 1 - gradientIntensity; + output.tc_gradientIntensity_invFalloff.xy = input.tc; + output.tc_gradientIntensity_invFalloff.z = gradientIntensity; + output.tc_gradientIntensity_invFalloff.w = invFalloff; + output.edgeGradientIntensity = edgeDistance * invEdgeGradient; + ##elif lens_flare_rounding_type == rounded + output.tc_pos.xy = input.tc; + output.tc_pos.zw = input.pos; + output.edgeDistance_vertexId_invMaxDist.x = isCenter ? 1 : 0; + output.edgeDistance_vertexId_invMaxDist.y = isCenter ? 0 : input.flareId__vertexId.y; + output.edgeDistance_vertexId_invMaxDist.z = invMaxDist; + output.roundness_radius_offset_cos.x = roundness; + output.roundness_radius_offset_cos.y = roundingCircleRadius; + output.roundness_radius_offset_cos.z = roundingCircleOffset; + output.roundness_radius_offset_cos.w = roundingCircleCos; + output.invGradient_invFalloff_invEdgeGradient_vposOffset.x = invGradient; + output.invGradient_invFalloff_invEdgeGradient_vposOffset.y = invFalloff; + output.invGradient_invFalloff_invEdgeGradient_vposOffset.z = invertedGradient ? invEdgeGradient : 0; + output.invGradient_invFalloff_invEdgeGradient_vposOffset.w = vposOffset; + ##elif lens_flare_rounding_type == circle + output.tc_normalizedPos.xy = input.tc; + output.tc_normalizedPos.zw = input.pos * invMaxDist; + output.invGradient_invFalloff_invEdgeGradient.x = invGradient; + output.invGradient_invFalloff_invEdgeGradient.y = invFalloff; + output.invGradient_invFalloff_invEdgeGradient.z = invertedGradient ? invEdgeGradient : 0; + ##endif + return output; + } + } + + hlsl(ps) { + #include + + half4 lens_flare_ps(VsOutput input) : SV_Target + { + + ##if lens_flare_rounding_type == sharp + float2 tc = input.tc_gradientIntensity_invFalloff.xy; + float invFalloff = input.tc_gradientIntensity_invFalloff.w; + ##elif lens_flare_rounding_type == rounded + + float2 tc = input.tc_pos.xy; + float sharpEdgeDistance = input.edgeDistance_vertexId_invMaxDist.x; + float vertexId = input.edgeDistance_vertexId_invMaxDist.y; + float invMaxDist = input.edgeDistance_vertexId_invMaxDist.z; + float invGradient = input.invGradient_invFalloff_invEdgeGradient_vposOffset.x; + float invFalloff = input.invGradient_invFalloff_invEdgeGradient_vposOffset.y; + float invEdgeGradient = input.invGradient_invFalloff_invEdgeGradient_vposOffset.z; + uint vposOffset = uint(input.invGradient_invFalloff_invEdgeGradient_vposOffset.w); + float roundness = input.roundness_radius_offset_cos.x; + float circleRadius = input.roundness_radius_offset_cos.y; + float circleOffset = input.roundness_radius_offset_cos.z; + float roundnessClippingConeCos = input.roundness_radius_offset_cos.w; + float roundDistance = 1; + + ##elif lens_flare_rounding_type == circle + float2 tc = input.tc_normalizedPos.xy; + float invGradient = input.invGradient_invFalloff_invEdgeGradient.x; + float invFalloff = input.invGradient_invFalloff_invEdgeGradient.y; + float invEdgeGradient = input.invGradient_invFalloff_invEdgeGradient.z; + ##endif + + ##if lens_flare_texture != NULL + half4 texModifier = h4tex2D(lens_flare_texture, tc); + ##else + half4 texModifier = half4(1,1,1,1); + ##endif + + float3 color = input.color_intensity.rgb * texModifier.rgb; + float intensity = input.color_intensity.w * texModifier.a; + + ##if lens_flare_rounding_type == sharp + float gradientIntensity = saturate(min(input.tc_gradientIntensity_invFalloff.z, input.edgeGradientIntensity)); + ##else + ##if lens_flare_rounding_type == rounded + // Project the vertexId to the edges -> avgVertexId is the interpolated value between the outer vertices only (influence of the central vertex is removed) + float avgVertexId = vertexId / (1 - sharpEdgeDistance); + float closestVertexId = round(avgVertexId); + BRANCH + if (roundness > 0 && sharpEdgeDistance < 1 - circleOffset && abs(avgVertexId - closestVertexId) < roundness*0.5) + { + float2 localPos = input.tc_pos.zw; + float2 closestVertexPos = structuredBufferAt(vertex_positions, vposOffset + closestVertexId); + float2 closestCirclePos = closestVertexPos * circleOffset; + + float2 circleToLocalPos = localPos - closestCirclePos; + float circleToLocalPosDist = length(circleToLocalPos); + float angularDiviationCos = dot(closestVertexPos, circleToLocalPos / circleToLocalPosDist); + // edge distance is only effected by the roundness in this area + if (angularDiviationCos > roundnessClippingConeCos && circleToLocalPosDist > 0.000001) + { + if (circleToLocalPosDist > circleRadius) + discard; + roundDistance = (circleRadius - circleToLocalPosDist) * invMaxDist; + } + } + float edgeDistance = min(roundDistance, sharpEdgeDistance); + ##elif lens_flare_rounding_type == circle + float edgeDistance = 1-length(input.tc_normalizedPos.zw); + if (edgeDistance < 0) + discard; + ##endif + float gradientIntensity = saturate(edgeDistance * invGradient); + if (invEdgeGradient > 0) + gradientIntensity = min(1 - gradientIntensity, saturate(edgeDistance * invEdgeGradient)); + ##endif + + BRANCH + if (invFalloff > 1 && gradientIntensity > 0 && gradientIntensity < 1) + gradientIntensity = pow(gradientIntensity, invFalloff); + return half4(color, gradientIntensity * intensity); + } + } + + compile("target_vs", "lens_flare_vs"); + compile("target_ps", "lens_flare_ps"); +} \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/shaders/lens_flare_info.hlsli b/prog/daNetGameLibs/lens_flare/shaders/lens_flare_info.hlsli new file mode 100644 index 000000000..e28bb9d84 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/shaders/lens_flare_info.hlsli @@ -0,0 +1,51 @@ +#ifndef LENS_FLARE_INFO_HLSLI_INCLUDED +#define LENS_FLARE_INFO_HLSLI_INCLUDED + +struct LensFlareInfo +{ + float4 tintRGB_invMaxDist; + + float2 offset; + float2 scale; + + float invGradient; + float invFalloff; + float intensity; + uint vertexPosBufOffset; + + float2 rotationOffsetSinCos; + float axisOffset2; + uint flags; + + float roundness; + float roundingCircleRadius; + float roundingCircleOffset; + float roundingCircleCos; + + float2 distortionScale; + float distortionPow; + uint padding; +}; + +struct LensFLarePreparedLightSource +{ + float4 color_intensity; + + float2 light_screen_pos; + float2 rotation_sin_cos; + + float2 radial_distances; + float2 padding; +}; + + +#define LENS_FLARE_DATA_FLAGS__INVERTED_GRADIENT (1<<0) +#define LENS_FLARE_DATA_FLAGS__USE_LIGHT_COLOR (1<<1) +#define LENS_FLARE_DATA_FLAGS__AUTO_ROTATION (1<<2) +#define LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION (1<<3) +#define LENS_FLARE_DATA_FLAGS__RADIAL_DISTORTION_REL_TO_CENTER (1<<4) + +// TODO increase when multiple flares are supported +#define LENS_FLARE_THREADS 1 + +#endif \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/shaders/use_flares.dshl b/prog/daNetGameLibs/lens_flare/shaders/use_flares.dshl new file mode 100644 index 000000000..b70370253 --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/shaders/use_flares.dshl @@ -0,0 +1,21 @@ +texture lens_flare_tex; +int lens_flares_enabled = 0; + +macro INIT_FLARES() + (ps) { + lens_flare_tex@tex2d = lens_flare_tex; + lens_flares_enabled@i1 = (lens_flares_enabled); + lens_flare_tex_exists@i1 = (exists_tex(lens_flare_tex)); + } +endmacro + +macro USE_FLARES() + hlsl(ps) { + void apply_lens_flare(inout half3 color, float2 screen_uv) + { + BRANCH + if (lens_flares_enabled > 0 && lens_flare_tex_exists > 0) + color += lens_flare_tex.SampleLevel(frame_tex_samplerstate, screen_uv, 0).rgb; + } + } +endmacro \ No newline at end of file diff --git a/prog/daNetGameLibs/lens_flare/templates/lens_flare.template.blk b/prog/daNetGameLibs/lens_flare/templates/lens_flare.template.blk new file mode 100644 index 000000000..360a620fc --- /dev/null +++ b/prog/daNetGameLibs/lens_flare/templates/lens_flare.template.blk @@ -0,0 +1,109 @@ +lens_flare_renderer { + _singleton:b=yes + "lens_flare_renderer__render_node:dabfg::NodeHandle"{} + "lens_flare_renderer__prepare_lights_node:dabfg::NodeHandle"{} + "lens_flare_renderer:LensFlareRenderer"{} + _tags:t="render" +} + +lens_flare_config { + _tags:t="render" + _track:b=yes + + // Use this in light sources to reference the flare config + lens_flare_config__name:t="" + + // Distance from the screen edge, where the flare starts to fade out. Values between [0, 1) + lens_flare_config__smooth_screen_fadeout_distance:r=0 + + // Global scale, applied to all flare elements + lens_flare_config__scale:p2=1,1 + + // Global intensity, applied to all flare elements + lens_flare_config__intensity:r=1 + + // If true => flare intensity is affected by occlusion, volfog and transparent effects, like smoke + lens_flare_config__use_occlusion:b=yes + + // List of flare components + "lens_flare_config__elements:array"{ + // "flare_component:object" { + // // Enable/disable this component for debugging + // flare_component__enabled:b=yes + + // // Curve of the fadeout effect: intensity = pow(saturate(edgeDistance/gradient), 1/falloff) + // flare_component__gradient__falloff:r=1 + + // // Distance (between (0, 1]) for the gradient to reach full intensity from 0 intensity + // flare_component__gradient__gradient:r=0.1 + + // // Invert intensity resulting from the gradient + // flare_component__gradient__inverted:b=no + + + // // Use radial distortion effects: + // // flare component changes its size depending in the distance between the light source and screen edge / screen center + // flare_component__radial_distortion__enabled:b=no + + // // yes => Distortion strength increases based on distance from center + // // no => Distortion strength increases based on distance from screen edge + // flare_component__radial_distortion__relative_to_center:b=no + + // // Distortion strength = pow(distance, distortion_curve_pow) + // flare_component__radial_distortion__distortion_curve_pow:r=1 + + // // Size that the flare element reaches at the screen edge (original size is overwritten) + // flare_component__radial_distortion__radial_edge_size:p2=1,1 + + + // // Size of the element, relative to the screen size (minimum of width and height of screen) + // flare_component__scale:p2=1,1 + + // // Offset flare element left/right, up/down. Relative to screen size + // flare_component__offset:p2=0,0 + + // // Rotate the flare element by this amount (after scaling), in degrees + // flare_component__rotation_offset:r=0 + + // // Rotate the flare element by this amount (before scaling), in degrees + // flare_component__pre_rotation_offset:r=0 + + // // Flare component will turn towards the light source + // flare_component__auto_rotation:b=no + + // // Position of the element along the axis between the light source and the screen center + // // 0 => light source; 0.5 => screen center; 1 => mirror of light source around screen center + // flare_component__axis_offset:r=0 + + // // Intensity multiplier of this flare element. Final intensity is calculated from light brightness + // flare_component__intensity:r=1 + + // // Round corners: 0 => sharp shape; 1 => circle; any other => roundness is the fraction of the sides that's rounded + // flare_component__roundness:r=0 + + // // Sides of the shape + // flare_component__side_count:i=4 + + // // Multiplier on the light color / white color at the original brightness + // flare_component__tint:p3=1,1,1 + + // // yes => original light color is used; no => white light is used with the original brightness + // flare_component__use_light_color:b=yes + + // // Flare texture: rgb is used as tint, alpha is used as intensity multiplier + // flare_component__texture:t="" + // } + } +} + +sun_lens_flare { + _tags:t="render" + + _tracked:t="sun_flare_provider__flare_config" + + enabled:b=yes + sun_flare_provider__flare_config:t="" + + sun_flare_provider__cached_id:i=-1 + sun_flare_provider__cached_flare_config_id:i=-1 +} \ No newline at end of file diff --git a/prog/daNetGameLibs/light_flicker/render/light_flicker.das b/prog/daNetGameLibs/light_flicker/render/light_flicker.das index 210adf99a..7e05592e3 100644 --- a/prog/daNetGameLibs/light_flicker/render/light_flicker.das +++ b/prog/daNetGameLibs/light_flicker/render/light_flicker.das @@ -6,7 +6,6 @@ require AnimV20 require DagorMaterials require math.base require app -require danetlibs.weaponry_hit_fx.main.weaponry_fx_common require danetlibs.light_flicker.render.light_flicker_common require daSkies @@ -18,6 +17,14 @@ def is_night_time() return skies.sunDir.y < NIGHT_SUN_COS +def calc_effect_tm(pos : float3; norm : float3) + var tm = IDENT_TM + tm[1] = normalize(norm) + tm[2] = normalize(cross(float3(1, 0, 0), tm[1])) + tm[0] = normalize(cross(tm[1], tm[2])) + tm[3] = pos + return tm + def smoothstep(edge0 : float; edge1 : float; x : float) // Scale, and clamp x to 0..1 range let c = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0) diff --git a/prog/daNetGameLibs/local_tone_mapping/shaders/downsample.dshl b/prog/daNetGameLibs/local_tone_mapping/shaders/downsample.dshl index 3bc30a048..5f80e3a50 100644 --- a/prog/daNetGameLibs/local_tone_mapping/shaders/downsample.dshl +++ b/prog/daNetGameLibs/local_tone_mapping/shaders/downsample.dshl @@ -22,8 +22,6 @@ interval mips_cnt : one < 2, two < 3, three < 4, four; shader local_tone_mapping_downsample { ENABLE_ASSERT(cs) - INIT_EXPOSURE(cs) - USE_EXPOSURE(cs) INIT_BLOOM(cs) USE_BLOOM(cs) INIT_ZNZFAR_STAGE(cs) @@ -68,7 +66,7 @@ shader local_tone_mapping_downsample float3 compute_weights(float3 exposures) { - float3 weights = float3(exp(-0.5 * pow2(exposures - linear_to_log(middle_luminance * getPrevExposureRatio())) * sigma_sq)); + float3 weights = float3(exp(-0.5 * pow2(exposures - linear_to_log(middle_luminance)) * sigma_sq)); return weights / (dot(weights, float3(1, 1, 1)) + 0.00001); } @@ -76,7 +74,6 @@ shader local_tone_mapping_downsample { apply_dof(uv, color); apply_bloom(uv, color); - color *= getPrevExposureRatio(); float highlights = linear_to_log(luminance(color * highlights_multiplier)); float midtones = linear_to_log(luminance(color)); float shadows = linear_to_log(luminance(color * shadows_multiplier)); diff --git a/prog/daNetGameLibs/local_tone_mapping/shaders/filter.dshl b/prog/daNetGameLibs/local_tone_mapping/shaders/filter.dshl index d9ba565b8..9307865dd 100644 --- a/prog/daNetGameLibs/local_tone_mapping/shaders/filter.dshl +++ b/prog/daNetGameLibs/local_tone_mapping/shaders/filter.dshl @@ -12,8 +12,6 @@ shader local_tone_mapping_filter z_test=false; color_write = rgb; POSTFX_VS_TEXCOORD(0, tc) - INIT_EXPOSURE(ps) - USE_EXPOSURE(ps) local float4 tex_resolution = get_dimensions(exposure_tex, 0); (ps) { exposure_tex@tex2d = exposure_tex; @@ -28,7 +26,7 @@ shader local_tone_mapping_filter float3 local_tone_mapping_filter_ps(VsOutput input HW_USE_SCREEN_POS) : SV_Target { - float targetLum = linear_to_log(luminance(tex2D(frame_tex, input.tc).xyz * getPrevExposureRatio())); + float targetLum = linear_to_log(luminance(tex2D(frame_tex, input.tc).xyz)); float lum = 0; float weightSum = 0.00001; int windowHalfSize = 1; @@ -36,7 +34,7 @@ shader local_tone_mapping_filter for (int dy = -windowHalfSize; dy <= windowHalfSize; dy += 1) { UNROLL for (int dx = -windowHalfSize; dx <= windowHalfSize; dx += 1) { - float3 color = tex2D(frame_tex, input.tc + float2(dx, dy) * tex_resolution.zw).xyz * getPrevExposureRatio(); + float3 color = tex2D(frame_tex, input.tc + float2(dx, dy) * tex_resolution.zw).xyz; float currentLum = linear_to_log(luminance(color)); float w = exp(sigma_d_scale * float(dx*dx + dy*dy) + sigma_r_scale * (currentLum - targetLum) * (currentLum - targetLum)); lum += tex2D(exposure_tex, input.tc + float2(dx, dy) * tex_resolution.zw).x * w; diff --git a/prog/daNetGameLibs/motion_matching/animation/animation_clip.h b/prog/daNetGameLibs/motion_matching/animation/animation_clip.h index 55aeedfa1..a12d98cf9 100644 --- a/prog/daNetGameLibs/motion_matching/animation/animation_clip.h +++ b/prog/daNetGameLibs/motion_matching/animation/animation_clip.h @@ -45,6 +45,7 @@ struct AnimationClip eastl::string name; float duration; int tickDuration; + int featuresNormalizationGroup; dag::Vector intervals; diff --git a/prog/daNetGameLibs/motion_matching/animation/animation_data_base.h b/prog/daNetGameLibs/motion_matching/animation/animation_data_base.h index fee5d7b96..45bff2b0f 100644 --- a/prog/daNetGameLibs/motion_matching/animation/animation_data_base.h +++ b/prog/daNetGameLibs/motion_matching/animation/animation_data_base.h @@ -48,6 +48,7 @@ struct AnimationDataBase int featuresSize = 0; TagPresetVector tagsPresets; dag::Vector featuresAvg, featuresStd; + int normalizationGroupsCount = 0; dag::Index16 rootNode; // Prefer this node if it exists in a2d, otherwise fallback to root motion calculation based on skeleton nodes diff --git a/prog/daNetGameLibs/motion_matching/animation/feature_normalization.cpp b/prog/daNetGameLibs/motion_matching/animation/feature_normalization.cpp index 7fb02fec5..0ab25e229 100644 --- a/prog/daNetGameLibs/motion_matching/animation/feature_normalization.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/feature_normalization.cpp @@ -2,36 +2,49 @@ #include "animation_clip.h" #include "feature_normalization.h" +#include -void calculate_normalization(dag::Vector &clips, dag::Vector &avg, dag::Vector &std, int features) +void calculate_normalization( + dag::Vector &clips, dag::Vector &avg, dag::Vector &std, int features, int normalization_groups) { - avg.assign(features, v_zero()); - std.assign(features, v_zero()); - int totalCount = 0; + avg.assign(features * normalization_groups, v_zero()); + std.assign(features * normalization_groups, v_zero()); + dag::Vector totalCountPerGroup(normalization_groups, 0); + dag::Vector nInvArray(normalization_groups, v_zero()); + for (const AnimationClip &clip : clips) - totalCount += clip.tickDuration; - if (totalCount == 0) - return; - vec3f nInv = v_splats(1.f / totalCount); + totalCountPerGroup[clip.featuresNormalizationGroup] += clip.tickDuration; + + for (int i = 0; i < normalization_groups; ++i) + if (totalCountPerGroup[i] > 0) + nInvArray[i] = v_splats(1.f / totalCountPerGroup[i]); for (const AnimationClip &clip : clips) + { + int featuresOffset = clip.featuresNormalizationGroup * features; + vec3f nInv = nInvArray[clip.featuresNormalizationGroup]; for (auto from = clip.features.data.begin(), to = clip.features.data.end(); from < to; from += features) for (int i = 0; i < features; i++) { // divide feature on totalCount in cycle to reduce float error - avg[i] = v_add(avg[i], v_mul(from[i], nInv)); + avg[featuresOffset + i] = v_add(avg[featuresOffset + i], v_mul(from[i], nInv)); } + } for (const AnimationClip &clip : clips) + { + int featuresOffset = clip.featuresNormalizationGroup * features; + vec3f nInv = nInvArray[clip.featuresNormalizationGroup]; for (auto from = clip.features.data.begin(), to = clip.features.data.end(); from < to; from += features) for (int i = 0; i < features; i++) { // divide feature on totalCount in cycle to reduce float error - vec3f dif = v_sub(from[i], avg[i]); - std[i] = v_add(std[i], v_mul(v_mul(dif, dif), nInv)); + vec3f dif = v_sub(from[i], avg[featuresOffset + i]); + std[featuresOffset + i] = v_add(std[featuresOffset + i], v_mul(v_mul(dif, dif), nInv)); } + } - for (int i = 0; i < features; i++) + for (int i = 0, n = std.size(); i < n; i++) std[i] = v_sel(v_sqrt(std[i]), V_C_ONE, v_sub(std[i], V_C_EPS_VAL)); G_ASSERT(!clips.empty()); @@ -41,33 +54,36 @@ void calculate_normalization(dag::Vector &clips, dag::Vector &clips, dag::Vector features, const dag::Vector &avg, const dag::Vector &std) +void normalize_feature(dag::Span dst_features, const vec4f *src_features, const vec4f *avg, const vec4f *std) { - for (int i = 0, n = features.size(); i < n; i++) - features[i] = v_safediv(v_sub(features[i], avg[i]), std[i]); + for (int i = 0, n = dst_features.size(); i < n; i++) + dst_features[i] = v_safediv(v_sub(src_features[i], avg[i]), std[i]); } -void denormalize_feature(dag::Span features, const dag::Vector &avg, const dag::Vector &std) +void denormalize_feature(dag::Span features, const vec4f *avg, const vec4f *std) { for (int i = 0, n = features.size(); i < n; i++) features[i] = v_add(v_mul(features[i], std[i]), avg[i]); diff --git a/prog/daNetGameLibs/motion_matching/animation/feature_normalization.h b/prog/daNetGameLibs/motion_matching/animation/feature_normalization.h index 75eeda417..cb8c20fb4 100644 --- a/prog/daNetGameLibs/motion_matching/animation/feature_normalization.h +++ b/prog/daNetGameLibs/motion_matching/animation/feature_normalization.h @@ -1,7 +1,12 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -void calculate_normalization(dag::Vector &clips, dag::Vector &avg, dag::Vector &std, int features); +void calculate_normalization( + dag::Vector &clips, dag::Vector &avg, dag::Vector &std, int features, int normalization_groups); -void normalize_feature(dag::Span features, const dag::Vector &avg, const dag::Vector &std); -void denormalize_feature(dag::Span features, const dag::Vector &avg, const dag::Vector &std); +void normalize_feature(dag::Span dst_features, const vec4f *src_features, const vec4f *avg, const vec4f *std); +inline void normalize_feature(dag::Span features, const vec4f *avg, const vec4f *std) +{ + normalize_feature(features, features.data(), avg, std); +} +void denormalize_feature(dag::Span features, const vec4f *avg, const vec4f *std); diff --git a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp index 430584f6c..bd1caa3c7 100644 --- a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp @@ -6,25 +6,19 @@ #include "animation_sampling.h" #include "inertial_blending.h" -void inertialize_pose_transition(BoneInertialInfo &offset, - const BoneInertialInfo ¤t, - const BoneInertialInfo &goal, - const eastl::bitvector &position_dirty, - const eastl::bitvector &rotation_dirty) +void inertialize_pose_transition( + BoneInertialInfo &offset, const BoneInertialInfo ¤t, const BoneInertialInfo &goal, const dag::Vector &node_weights) { // Transition all the inertializers for each other bone for (int i = 0, n = offset.position.size(); i < n; i++) { - if (position_dirty[i]) + if (node_weights[i] > 0.0f) { vec3f goalVelocity = goal.velocity[i]; inertialize_transition_v3(offset.position[i], offset.velocity[i], current.position[i], current.velocity[i], goal.position[i], goalVelocity); - } - if (rotation_dirty[i]) - { vec3f goalAngularVelocity = goal.angular_velocity[i]; inertialize_transition_q(offset.rotation[i], offset.angular_velocity[i], current.rotation[i], current.angular_velocity[i], goal.rotation[i], goalAngularVelocity); @@ -54,12 +48,7 @@ void inertialize_pose_update(BoneInertialInfo &result, } } -void apply_root_motion_correction(float t, - const AnimationClip &clip, - dag::Index16 root_idx, - BoneInertialInfo &info, - const eastl::bitvector &position_dirty, - const eastl::bitvector &rotation_dirty) +void apply_root_motion_correction(float t, const AnimationClip &clip, dag::Index16 root_idx, BoneInertialInfo &info) { if (clip.inPlaceAnimation) return; @@ -67,22 +56,13 @@ void apply_root_motion_correction(float t, RootMotion rootTm = lerp_root_motion(clip, t); quat4f invRot = v_quat_conjugate(rootTm.rotation); - if (position_dirty[rootId]) - { - vec3f pos = v_quat_mul_vec3(invRot, v_sub(info.position[rootId], rootTm.translation)); - info.position[rootId] = pos; - info.velocity[rootId] = v_quat_mul_vec3(invRot, info.velocity[rootId]); - } - - if (rotation_dirty[rootId]) - info.rotation[rootId] = v_norm4(v_quat_mul_quat(invRot, info.rotation[rootId])); + vec3f pos = v_quat_mul_vec3(invRot, v_sub(info.position[rootId], rootTm.translation)); + info.position[rootId] = pos; + info.velocity[rootId] = v_quat_mul_vec3(invRot, info.velocity[rootId]); + info.rotation[rootId] = v_norm4(v_quat_mul_quat(invRot, info.rotation[rootId])); } -void extract_frame_info(float t, - const AnimationClip &clip, - BoneInertialInfo &info, - eastl::bitvector &position_dirty, - eastl::bitvector &rotation_dirty) +void extract_frame_info(float t, const AnimationClip &clip, BoneInertialInfo &info) { constexpr int TIME_FramesPerSec = AnimV20::TIME_TicksPerSec >> AnimV20::TIME_SubdivExp; @@ -103,7 +83,6 @@ void extract_frame_info(float t, int nodeIdx = channel.second.index(); info.position[nodeIdx] = p1; info.velocity[nodeIdx] = v_mul(v_sub(p2, p1), dtInv); - position_dirty.set(nodeIdx, true); } for (const AnimationClip::QuaternionChannel &channel : clip.channelRotation) @@ -117,6 +96,5 @@ void extract_frame_info(float t, info.rotation[nodeIdx] = r1; vec3f w = quat_log(v_quat_mul_quat(r1, v_quat_conjugate(r2))); info.angular_velocity[nodeIdx] = v_mul(w, dtInv); - rotation_dirty.set(nodeIdx, true); } } \ No newline at end of file diff --git a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.h b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.h index 263cc9a61..6cd4d6765 100644 --- a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.h +++ b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.h @@ -45,11 +45,8 @@ struct BoneInertialInfo // for the pose being transitioned from (src) as well // as the pose being transitioned to (dst) in their // own animation spaces. -void inertialize_pose_transition(BoneInertialInfo &offset, - const BoneInertialInfo ¤t, - const BoneInertialInfo &goal, - const eastl::bitvector &position_dirty, - const eastl::bitvector &rotation_dirty); +void inertialize_pose_transition( + BoneInertialInfo &offset, const BoneInertialInfo ¤t, const BoneInertialInfo &goal, const dag::Vector &node_weights); // This function updates the inertializer states. Here // it outputs the smoothed animation (input plus offset) @@ -65,18 +62,9 @@ void inertialize_pose_update(BoneInertialInfo &result, struct AnimationClip; -void extract_frame_info(float t, - const AnimationClip &clip, - BoneInertialInfo &info, - eastl::bitvector &position_dirty, - eastl::bitvector &rotation_dirty); +void extract_frame_info(float t, const AnimationClip &clip, BoneInertialInfo &info); // We need this correction because current mocap animations are not centered. Root node // will be transformed to local model space and animation become in-place. Most likely we // can perform this transformation during a2d export in future. -void apply_root_motion_correction(float t, - const AnimationClip &clip, - dag::Index16 root_idx, - BoneInertialInfo &info, - const eastl::bitvector &position_dirty, - const eastl::bitvector &rotation_dirty); +void apply_root_motion_correction(float t, const AnimationClip &clip, dag::Index16 root_idx, BoneInertialInfo &info); diff --git a/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp b/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp index d1c0794dc..636034660 100644 --- a/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp @@ -513,6 +513,12 @@ static void load_animations( } const char *defaultMaskName = clipsBlock->getStr("default_animation_mask", nullptr); const char *defaultTags = clipsBlock->getStr("default_tags", nullptr); + int featuresNormalizationGroup = 0; + if (clipsBlock->getBool("separate_features_normalization", false)) + { + featuresNormalizationGroup = dataBase.normalizationGroupsCount; + dataBase.normalizationGroupsCount++; + } auto &clips = dataBase.clips; clips.reserve(clips.size() + clipsBlock->blockCount()); @@ -539,6 +545,7 @@ static void load_animations( clip.nextClipName = clipBlock->getStr("nextClip", ""); clip.looped = clip.name == clip.nextClipName; clip.playSpeedMultiplierRange = clipBlock->getPoint2("play_speed_multiplier_range", Point2::ONE); + clip.featuresNormalizationGroup = featuresNormalizationGroup; const char *maskName = clipBlock->getStr("animation_mask", defaultMaskName); const DataBlock *nodeMask = node_masks.getBlockByName(maskName); @@ -699,11 +706,13 @@ void load_animations(AnimationDataBase &dataBase, load_animation_root_motion_bones(rootMotionConfig, dataBase); dataBase.defaultCenterOfMass = extract_center_of_mass(dataBase, *dataBase.getReferenceSkeleton()); + dataBase.normalizationGroupsCount = 1; for (const ecs::string &path : clips_path) load_animations(dataBase, data_base_eid, node_masks, path); dataBase.playOnlyFromStartTag = dataBase.tags.getNameId("play_only_from_start"); resolve_next_clips(dataBase.clips, dataBase); - calculate_normalization(dataBase.clips, dataBase.featuresAvg, dataBase.featuresStd, dataBase.featuresSize); + calculate_normalization(dataBase.clips, dataBase.featuresAvg, dataBase.featuresStd, dataBase.featuresSize, + dataBase.normalizationGroupsCount); calculate_acceleration_struct(dataBase.clips, dataBase.featuresSize); debug("[MM] loading motion matching data base in %d ms", get_time_usec(refTime) / 1000); diff --git a/prog/daNetGameLibs/motion_matching/animation/motion_matching.cpp b/prog/daNetGameLibs/motion_matching/animation/motion_matching.cpp index 04a146619..fbffbf928 100644 --- a/prog/daNetGameLibs/motion_matching/animation/motion_matching.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/motion_matching.cpp @@ -20,13 +20,12 @@ MatchingResult motion_matching(const AnimationDataBase &dataBase, bool use_brute_force, const AnimationFilterTags ¤t_tags, const FeatureWeights &weights, - const FrameFeaturesData ¤t_feature) + dag::ConstSpan current_feature) { int featureSize = dataBase.featuresSize; G_ASSERT(featureSize == weights.featureWeights.size()); - G_ASSERT(featureSize == current_feature.size()); - const vec3f *goalFeaturePtr = current_feature.data(); + G_ASSERT(featureSize * dataBase.normalizationGroupsCount == current_feature.size()); const vec4f *featureWeightsPtr = weights.featureWeights.data(); int cur_clip = current_state.clip; @@ -43,6 +42,8 @@ MatchingResult motion_matching(const AnimationDataBase &dataBase, const auto &smallBoundsMax = nextClip.boundsSmallMax; const auto &largeBoundsMin = nextClip.boundsLargeMin; const auto &largeBoundsMax = nextClip.boundsLargeMax; + int featuresOffset = nextClip.featuresNormalizationGroup * featureSize; + const vec3f *goalFeaturePtr = current_feature.data() + featuresOffset; G_ASSERT(nextClip.features.data.size() == nextClip.tickDuration * featureSize); diff --git a/prog/daNetGameLibs/motion_matching/animation/motion_matching.h b/prog/daNetGameLibs/motion_matching/animation/motion_matching.h index 40fc31672..2088e3ee8 100644 --- a/prog/daNetGameLibs/motion_matching/animation/motion_matching.h +++ b/prog/daNetGameLibs/motion_matching/animation/motion_matching.h @@ -17,4 +17,4 @@ MatchingResult motion_matching(const AnimationDataBase &dataBase, bool use_brute_force, const AnimationFilterTags ¤t_tags, const FeatureWeights &weights, - const FrameFeaturesData ¤t_feature); + dag::ConstSpan current_feature); diff --git a/prog/daNetGameLibs/motion_matching/animation/motion_matching_features.h b/prog/daNetGameLibs/motion_matching/animation/motion_matching_features.h index cb17c3d57..b72efc6a2 100644 --- a/prog/daNetGameLibs/motion_matching/animation/motion_matching_features.h +++ b/prog/daNetGameLibs/motion_matching/animation/motion_matching_features.h @@ -120,6 +120,11 @@ struct FrameFeatures validateFrameOOB(frame); return make_span(data.data() + frame * featuresSizeInVec4f, trajectorySizeInVec4f); } + dag::Span get_node_features_raw(int frame) + { + validateFrameOOB(frame); + return make_span(data.data() + frame * featuresSizeInVec4f + trajectorySizeInVec4f, featuresSizeInVec4f - trajectorySizeInVec4f); + } dag::Span get_root_positions(int frame) { validateFrameOOB(frame); diff --git a/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl b/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl index 5e268440f..983ae84bd 100644 --- a/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl +++ b/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl @@ -172,13 +172,13 @@ static void debug_motion_matching_es(const ecs::UpdateStageInfoRenderDebug &, auto clipBegin = dataBase.clips[cur_clip].features.data.data() + cur_frame * dataBase.featuresSize; // need to create copy for denormalization - FrameFeatures goalCopy = motion_matching__goalFeature; FrameFeatures clipCopy = motion_matching__goalFeature; clipCopy.data.assign(clipBegin, clipBegin + dataBase.featuresSize); - denormalize_feature(make_span(goalCopy.data), dataBase.featuresAvg, dataBase.featuresStd); - denormalize_feature(make_span(clipCopy.data), dataBase.featuresAvg, dataBase.featuresStd); + int clipFeaturesOffset = dataBase.clips[cur_clip].featuresNormalizationGroup * dataBase.featuresSize; + denormalize_feature(make_span(clipCopy.data), dataBase.featuresAvg.data() + clipFeaturesOffset, + dataBase.featuresStd.data() + clipFeaturesOffset); FrameFeature clipFeature = clipCopy.get_feature(0); - FrameFeature goalFeature = goalCopy.get_feature(0); + ConstFrameFeature goalFeature = motion_matching__goalFeature.get_feature(0); // It is next frame tm because physics and animchars are updated after MM update but before debug // rendering. Not sure that it is a real issue because it affects only debug visualization @@ -281,7 +281,13 @@ static void motion_matching_weights() if (!motion_matching__controller.hasActiveAnimation()) return; const AnimationDataBase &dataBase = *motion_matching__controller.dataBase; - const FrameFeatures ¤tFeature = motion_matching__goalFeature; + dag::Vector normalizedFeatures(dataBase.featuresSize * dataBase.normalizationGroupsCount); + for (int i = 0; i < dataBase.normalizationGroupsCount; ++i) + { + int offset = i * dataBase.featuresSize; + normalize_feature(make_span(normalizedFeatures.data() + offset, dataBase.featuresSize), + motion_matching__goalFeature.data.data(), dataBase.featuresAvg.data() + offset, dataBase.featuresStd.data() + offset); + } if (dataBase.tagsPresets.size() <= (uint32_t)motion_matching__presetIdx) return; @@ -296,14 +302,15 @@ static void motion_matching_weights() cur_frame = motion_matching__controller.getCurrentFrame(); int featureSize = dataBase.featuresSize; const vec4f *frameFeature = dataBase.clips[cur_clip].features.data.data() + cur_frame * featureSize; - curMetric = - feature_distance_metric(currentFeature.data.data(), frameFeature, currentWeights.featureWeights.data(), featureSize); + int featuresOffset = dataBase.clips[cur_clip].featuresNormalizationGroup * featureSize; + curMetric = feature_distance_metric(normalizedFeatures.data() + featuresOffset, frameFeature, + currentWeights.featureWeights.data(), featureSize); } MatchingResult currentState = {cur_clip, cur_frame, FLT_MAX}; MatchingResult result = - motion_matching(dataBase, currentState, false, motion_matching__controller.currentTags, currentWeights, currentFeature.data); + motion_matching(dataBase, currentState, false, motion_matching__controller.currentTags, currentWeights, normalizedFeatures); String tags; for (int tag_idx = 0, num_tags = dataBase.getTagsCount(); tag_idx < num_tags; ++tag_idx) @@ -369,7 +376,6 @@ static void motion_matching_weights() int trajectorySize = dataBase.trajectorySize; - const vec3f *goalFeaturePtr = motion_matching__goalFeature.data.data(); const vec4f *featureWeightsPtr = currentWeights.featureWeights.data(); @@ -424,6 +430,8 @@ static void motion_matching_weights() ImGui::Text("%s (%d)", nextClip.name.c_str(), nextClip.tickDuration); + int featuresOffset = nextClip.featuresNormalizationGroup * featureSize; + const vec4f *goalFeaturePtr = normalizedFeatures.data() + featuresOffset; const vec3f *nextFeaturePtr = nextClip.features.data.data(); for (int frame = 0, frameOffset = 0; frame < nextClip.tickDuration; frame++, frameOffset++) { @@ -452,7 +460,9 @@ static void motion_matching_weights() "cost: %f\n" "- trajectory: %f\n", frame, result, trajectory); - ConstTrajectoryFeature goalTrajectory = motion_matching__goalFeature.get_trajectory_feature(0); + FrameFeatures goalFeaturesCopy = motion_matching__goalFeature; + goalFeaturesCopy.data.assign(goalFeaturePtr, goalFeaturePtr + featureSize); + TrajectoryFeature goalTrajectory = goalFeaturesCopy.get_trajectory_feature(0); ConstTrajectoryFeature clipTrajectory = nextClip.features.get_trajectory_feature(frame); for (int i = 0, ie = goalTrajectory.rootPositions.size(); i < ie; ++i) { @@ -463,7 +473,7 @@ static void motion_matching_weights() tooltipMessage.aprintf(0, " - pt%d pos: %f, dir: %f\n", i, posCost, dirCost); } tooltipMessage.aprintf(0, "- pose: %f\n", pose); - ConstNodeFeature goalNodeFeatures = motion_matching__goalFeature.get_node_feature(0); + NodeFeature goalNodeFeatures = goalFeaturesCopy.get_node_feature(0); ConstNodeFeature clipNodeFeatures = nextClip.features.get_node_feature(frame); for (int i = 0, ie = goalNodeFeatures.nodePositions.size(); i < ie; ++i) { diff --git a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl index 2fe7378a8..9a17b92ad 100644 --- a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl +++ b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl @@ -87,14 +87,7 @@ static void mm_update_goal_features_es(const ParallelUpdateFrameDelayed &act, trajectoryFeature.rootPositions[i] = Point2::xz(mm_trajectory__featurePositions[i]); trajectoryFeature.rootDirections[i] = Point2::xz(mm_trajectory__featureDirections[i]); } - const AnimationDataBase &dataBase = *motion_matching__controller.dataBase; - if (motion_matching__controller.hasActiveAnimation()) - { - // normalize only trajectory, node features will be copied from current animation - dag::Span packedTrajectory = motion_matching__goalFeature.get_trajectory_features(0); - normalize_feature(packedTrajectory, dataBase.featuresAvg, dataBase.featuresStd); - } - else + if (!motion_matching__controller.hasActiveAnimation()) { NodeFeature nodeFeature = motion_matching__goalFeature.get_node_feature(0); mat44f invRoot; @@ -106,7 +99,6 @@ static void mm_update_goal_features_es(const ParallelUpdateFrameDelayed &act, v_stu_p3(&nodeFeature.nodeVelocities[i].x, v_mat44_mul_vec3v(invRoot, v_safediv(deltaPos, v_splats(act.dt)))); v_stu_p3(&nodeFeature.nodePositions[i].x, v_mat44_mul_vec3p(invRoot, tree.getNodeWposRel(nodeId))); } - normalize_feature(make_span(motion_matching__goalFeature.data), dataBase.featuresAvg, dataBase.featuresStd); } } @@ -127,6 +119,10 @@ static void copy_pose_features(FrameFeatures &goal_feature, const MotionMatching dstFeature.nodePositions[i] = srcFeature.nodePositions[i]; dstFeature.nodeVelocities[i] = srcFeature.nodeVelocities[i]; } + int nodeFeaturesOffset = + dataBase.clips[clip].featuresNormalizationGroup * dataBase.featuresSize + goal_feature.trajectorySizeInVec4f; + denormalize_feature(goal_feature.get_node_features_raw(0), dataBase.featuresAvg.data() + nodeFeaturesOffset, + dataBase.featuresStd.data() + nodeFeaturesOffset); } } @@ -238,10 +234,6 @@ public: const bool animFinished = motion_matching__controller.updateAnimationProgress(dt); motion_matching__controller.lastTransitionTime += dt; - // we need this masks, because around 90% of bones hasn't animation and no need to update them - eastl::bitvector positionDirty(motion_matching__controller.nodeCount, false); - eastl::bitvector rotationDirty(motion_matching__controller.nodeCount, false); - const AnimationDataBase &dataBase = *motion_matching__controller.dataBase; const TagPreset ¤tPreset = dataBase.tagsPresets[motion_matching__presetIdx]; if (motion_matching__presetBlendTimeLeft > 0) @@ -255,7 +247,15 @@ public: motion_matching__updateProgress += dt * TICKS_PER_SECOND; if (motion_matching__updateProgress >= motion_matching__distanceFactor || animFinished) { - const FrameFeaturesData ¤tFeature = motion_matching__goalFeature.data; + copy_pose_features(motion_matching__goalFeature, motion_matching__controller); + dag::Span currentFeature; + dag::Vector normalizedFeatures(dataBase.featuresSize * dataBase.normalizationGroupsCount); + for (int i = 0; i < dataBase.normalizationGroupsCount; ++i) + { + int offset = i * dataBase.featuresSize; + normalize_feature(make_span(normalizedFeatures.data() + offset, dataBase.featuresSize), + motion_matching__goalFeature.data.data(), dataBase.featuresAvg.data() + offset, dataBase.featuresStd.data() + offset); + } const FeatureWeights ¤tWeights = currentPreset.weights; @@ -266,12 +266,13 @@ public: bool sameTags = false; const vec3f *frameFeature = nullptr; bool performSearch = true; - copy_pose_features(motion_matching__goalFeature, motion_matching__controller); if (motion_matching__controller.hasActiveAnimation()) { cur_clip = motion_matching__controller.getCurrentClip(); cur_frame = motion_matching__controller.getCurrentFrame(); frameFeature = clips[cur_clip].features.data.data() + cur_frame * featuresSizeof; + int featuresOffset = clips[cur_clip].featuresNormalizationGroup * dataBase.featuresSize; + currentFeature = make_span(normalizedFeatures.data() + featuresOffset, dataBase.featuresSize); int curInterval = clips[cur_clip].getInterval(cur_frame); float pathErrorTolerance = motion_matching__trajectoryTolerance * motion_matching__distanceFactor; @@ -309,8 +310,8 @@ public: ? feature_distance_metric(currentFeature.data(), frameFeature, currentWeights.featureWeights.data(), featuresSizeof) : FLT_MAX; MatchingResult currentState = {cur_clip, cur_frame, currentMetric}; - MatchingResult bestIndex = - motion_matching(dataBase, currentState, false, motion_matching__controller.currentTags, currentWeights, currentFeature); + MatchingResult bestIndex = motion_matching(dataBase, currentState, false, motion_matching__controller.currentTags, + currentWeights, normalizedFeatures); #if BRUTE_FORCE_COMPARISON MatchingResult bestIndex2 = motion_matching(dataBase, cur_clip, cur_frame, currentMetric, true, @@ -333,26 +334,14 @@ public: BoneInertialInfo &nextAnimation = motion_matching__controller.resultAnimation; float timeInSeconds = motion_matching__controller.getFrameTimeInSeconds(bestIndex.clip, bestIndex.frame, 0.f); // sample new animation in nextAnimation - extract_frame_info(timeInSeconds, clips[bestIndex.clip], nextAnimation, positionDirty, rotationDirty); - - apply_root_motion_correction(timeInSeconds, clips[bestIndex.clip], dataBase.rootNode, nextAnimation, positionDirty, - rotationDirty); - - // Do not calculate `offset` for nodes with zero weights - // because we don't have valid currentAnimation for them - const dag::Vector &nodeWeights = motion_matching__controller.perNodeWeights; - for (int i = 0, n = nodeWeights.size(); i < n; ++i) - { - if (positionDirty[i] && nodeWeights[i] < 0.001) - positionDirty[i] = false; - if (rotationDirty[i] && nodeWeights[i] < 0.001) - rotationDirty[i] = false; - } + extract_frame_info(timeInSeconds, clips[bestIndex.clip], nextAnimation); + + apply_root_motion_correction(timeInSeconds, clips[bestIndex.clip], dataBase.rootNode, nextAnimation); // caclulate offset between currentAnimation and nextAnimation // we will decay offset for smooth transition inertialize_pose_transition(motion_matching__controller.offset, motion_matching__controller.currentAnimation, - nextAnimation, positionDirty, rotationDirty); + nextAnimation, motion_matching__controller.perNodeWeights); } } } @@ -363,10 +352,9 @@ public: const MotionMatchingController::CurrentClipInfo ¶m = motion_matching__controller.currentClipInfo; float timeInSeconds = motion_matching__controller.getFrameTimeInSeconds(param.clip, param.frame, param.linearBlendProgress); // update currentAnimation - extract_frame_info(timeInSeconds, clips[param.clip], motion_matching__controller.currentAnimation, positionDirty, - rotationDirty); + extract_frame_info(timeInSeconds, clips[param.clip], motion_matching__controller.currentAnimation); apply_root_motion_correction(timeInSeconds, clips[param.clip], dataBase.rootNode, - motion_matching__controller.currentAnimation, positionDirty, rotationDirty); + motion_matching__controller.currentAnimation); // decay offset here. Result animation it is offset + currentAnimation inertialize_pose_update(motion_matching__controller.resultAnimation, motion_matching__controller.offset, motion_matching__controller.currentAnimation, motion_matching__controller.perNodeWeights, diff --git a/prog/daNetGameLibs/object_motion_blur/_lib.jam b/prog/daNetGameLibs/object_motion_blur/_lib.jam new file mode 100644 index 000000000..2f1c86a20 --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/_lib.jam @@ -0,0 +1,4 @@ +if $(HaveRenderer) = yes { + gamePulls += framework_object_motion_blur_pull ; + UseProgLibs += daNetGameLibs/object_motion_blur ; +} diff --git a/prog/daNetGameLibs/object_motion_blur/_shaders.blk b/prog/daNetGameLibs/object_motion_blur/_shaders.blk new file mode 100644 index 000000000..67c18c4fc --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/_shaders.blk @@ -0,0 +1 @@ +file:t = "objectMotionBlur.dshl" diff --git a/prog/daNetGameLibs/object_motion_blur/jamfile b/prog/daNetGameLibs/object_motion_blur/jamfile new file mode 100644 index 000000000..8f74326fb --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/jamfile @@ -0,0 +1,23 @@ +ModuleDependsOnVars = HaveRenderer ; +HaveRenderer ?= yes ; + +Root ?= ../../.. ; +Module = object_motion_blur ; +Location = prog/daNetGameLibs/$(Module) ; + +AddIncludes = + $(Root)/prog/gameLibs/publicInclude + $(Root)/prog/daNetGame +; + +local AllSrcFolder_CPP = ; +local AllSrcFolder_ES = ; +local AllSrcFolder_DAS = ; + +if $(HaveRenderer) = yes { + AllSrcFolder_ES += + render + ; +} + +include $(Root)/prog/daNetGameLibs/build_module.jam ; \ No newline at end of file diff --git a/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.gen.es.cpp b/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.gen.es.cpp new file mode 100644 index 000000000..270bc49ee --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.gen.es.cpp @@ -0,0 +1,188 @@ +#include "objectMotionBlurNodeES.cpp.inl" +ECS_DEF_PULL_VAR(objectMotionBlurNode); +//built with ECS codegen version 1.0 +#include +//static constexpr ecs::ComponentDesc calc_resolution_for_motion_blur_es_comps[] ={}; +static void calc_resolution_for_motion_blur_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + G_FAST_ASSERT(evt.is()); + calc_resolution_for_motion_blur_es(static_cast(evt) + ); +} +static ecs::EntitySystemDesc calc_resolution_for_motion_blur_es_es_desc +( + "calc_resolution_for_motion_blur_es", + "prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl", + ecs::EntitySystemOps(nullptr, calc_resolution_for_motion_blur_es_all_events), + empty_span(), + empty_span(), + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc init_object_motion_blur_es_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("render_settings__motionBlur"), ecs::ComponentTypeInfo()} +}; +static void init_object_motion_blur_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + init_object_motion_blur_es(evt + , ECS_RO_COMP(init_object_motion_blur_es_comps, "render_settings__motionBlur", bool) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc init_object_motion_blur_es_es_desc +( + "init_object_motion_blur_es", + "prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl", + ecs::EntitySystemOps(nullptr, init_object_motion_blur_es_all_events), + empty_span(), + make_span(init_object_motion_blur_es_comps+0, 1)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render","render_settings__motionBlur"); +static constexpr ecs::ComponentDesc close_object_motion_blur_es_comps[] = +{ +//start of 1 rq components at [0] + {ECS_HASH("object_motion_blur__render_node"), ecs::ComponentTypeInfo()} +}; +static void close_object_motion_blur_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + close_object_motion_blur_es(evt + ); +} +static ecs::EntitySystemDesc close_object_motion_blur_es_es_desc +( + "close_object_motion_blur_es", + "prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl", + ecs::EntitySystemOps(nullptr, close_object_motion_blur_es_all_events), + empty_span(), + empty_span(), + make_span(close_object_motion_blur_es_comps+0, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc object_motion_blur_settings_appear_es_comps[] = +{ +//start of 6 ro components at [0] + {ECS_HASH("object_motion_blur_settings__max_blur_px"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur_settings__max_samples"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur_settings__strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur_settings__vignette_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur_settings__ramp_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur_settings__ramp_cutoff"), ecs::ComponentTypeInfo()} +}; +static void object_motion_blur_settings_appear_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + object_motion_blur_settings_appear_es(evt + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__max_blur_px", int) + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__max_samples", int) + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__strength", float) + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__vignette_strength", float) + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__ramp_strength", float) + , ECS_RO_COMP(object_motion_blur_settings_appear_es_comps, "object_motion_blur_settings__ramp_cutoff", float) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc object_motion_blur_settings_appear_es_es_desc +( + "object_motion_blur_settings_appear_es", + "prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl", + ecs::EntitySystemOps(nullptr, object_motion_blur_settings_appear_es_all_events), + empty_span(), + make_span(object_motion_blur_settings_appear_es_comps+0, 6)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc object_motion_blur_node_init_ecs_query_comps[] = +{ +//start of 1 rw components at [0] + {ECS_HASH("object_motion_blur__render_node"), ecs::ComponentTypeInfo()}, +//start of 6 ro components at [1] + {ECS_HASH("object_motion_blur__max_blur_px"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__max_samples"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__vignette_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__ramp_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__ramp_cutoff"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc object_motion_blur_node_init_ecs_query_desc +( + "object_motion_blur_node_init_ecs_query", + make_span(object_motion_blur_node_init_ecs_query_comps+0, 1)/*rw*/, + make_span(object_motion_blur_node_init_ecs_query_comps+1, 6)/*ro*/, + empty_span(), + empty_span()); +template +inline void object_motion_blur_node_init_ecs_query(ecs::EntityId eid, Callable function) +{ + perform_query(g_entity_mgr, eid, object_motion_blur_node_init_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + constexpr size_t comp = 0; + { + function( + ECS_RW_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__render_node", dabfg::NodeHandle) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__max_blur_px", int) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__max_samples", int) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__strength", float) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__vignette_strength", float) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__ramp_strength", float) + , ECS_RO_COMP(object_motion_blur_node_init_ecs_query_comps, "object_motion_blur__ramp_cutoff", float) + ); + + } + } + ); +} +static constexpr ecs::ComponentDesc object_motion_blur_init_settings_ecs_query_comps[] = +{ +//start of 6 rw components at [0] + {ECS_HASH("object_motion_blur__max_blur_px"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__max_samples"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__vignette_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__ramp_strength"), ecs::ComponentTypeInfo()}, + {ECS_HASH("object_motion_blur__ramp_cutoff"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc object_motion_blur_init_settings_ecs_query_desc +( + "object_motion_blur_init_settings_ecs_query", + make_span(object_motion_blur_init_settings_ecs_query_comps+0, 6)/*rw*/, + empty_span(), + empty_span(), + empty_span()); +template +inline void object_motion_blur_init_settings_ecs_query(ecs::EntityId eid, Callable function) +{ + perform_query(g_entity_mgr, eid, object_motion_blur_init_settings_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + constexpr size_t comp = 0; + { + function( + ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__max_blur_px", int) + , ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__max_samples", int) + , ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__strength", float) + , ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__vignette_strength", float) + , ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__ramp_strength", float) + , ECS_RW_COMP(object_motion_blur_init_settings_ecs_query_comps, "object_motion_blur__ramp_cutoff", float) + ); + + } + } + ); +} diff --git a/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl b/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl new file mode 100644 index 000000000..774f9bca6 --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/render/objectMotionBlurNodeES.cpp.inl @@ -0,0 +1,154 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +ECS_TAG(render) +static void calc_resolution_for_motion_blur_es(const SetResolutionEvent &evt) +{ + int tileCountX = ceilf((float)evt.renderingResolution.x / objectmotionblur::TILE_SIZE); + int tileCountY = ceilf((float)evt.renderingResolution.y / objectmotionblur::TILE_SIZE); + + if (evt.type == SetResolutionEvent::Type::DYNAMIC_RESOLUTION) + { + dabfg::set_dynamic_resolution("object_motionblur_tilesize", IPoint2{tileCountX, tileCountY}); + } + else + { + dabfg::set_resolution("object_motionblur_tilesize", IPoint2{tileCountX, tileCountY}); + } +} + +dabfg::NodeHandle makeObjectMotionBlurNode(objectmotionblur::MotionBlurSettings &settings) +{ + auto motionBlurNs = dabfg::root() / "motion_blur" / "object_motion_blur"; + return motionBlurNs.registerNode("object_motion_blur_node", DABFG_PP_NODE_SRC, [settings](dabfg::Registry registry) { + objectmotionblur::on_settings_changed(settings); + + registry.readTexture("depth_for_transparency").atStage(dabfg::Stage::CS).bindToShaderVar("depth_gbuf"); + registry.readTexture("motion_vecs").atStage(dabfg::Stage::CS).bindToShaderVar("resolved_motion_vectors").optional(); + + auto sourceTargetHndl = registry.readTexture("color_target").atStage(dabfg::Stage::POST_RASTER).useAs(dabfg::Usage::BLIT).handle(); + + d3d::SamplerInfo smpInfo; + smpInfo.address_mode_u = smpInfo.address_mode_v = smpInfo.address_mode_w = d3d::AddressMode::Clamp; + registry.create("motion_blur_clamp_sampler", dabfg::History::No) + .blob(d3d::request_sampler(smpInfo)) + .bindToShaderVar("object_motion_blur_in_tex_samplerstate"); + + registry + .createTexture2d("object_motion_blur_tile_max_tex", dabfg::History::No, + {TEXCF_UNORDERED | TEXFMT_G16R16F, registry.getResolution<2>("object_motionblur_tilesize")}) + .atStage(dabfg::Stage::CS) + .bindToShaderVar("object_motion_blur_tile_max_tex"); + + registry + .createTexture2d("object_motion_blur_neighbor_max", dabfg::History::No, + {TEXCF_UNORDERED | TEXFMT_G16R16F, registry.getResolution<2>("object_motionblur_tilesize")}) + .atStage(dabfg::Stage::CS) + .bindToShaderVar("object_motion_blur_neighbor_max"); + + registry + .createTexture2d("object_motion_blur_flattened_vel_tex", dabfg::History::No, + {TEXCF_UNORDERED | TEXFMT_R11G11B10F, registry.getResolution<2>("main_view")}) + .atStage(dabfg::Stage::CS) + .bindToShaderVar("object_motion_blur_flattened_vel_tex"); + { + d3d::SamplerInfo smpInfo; + smpInfo.filter_mode = d3d::FilterMode::Point; + registry.create("object_motion_blur_flattened_vel_sampler", dabfg::History::No) + .blob(d3d::request_sampler(smpInfo)) + .bindToShaderVar("object_motion_blur_flattened_vel_tex_samplerstate"); + } + + uint32_t targetFormat = get_frame_render_target_format(); + auto resultTexHndl = registry + .createTexture2d("color_target_done", dabfg::History::No, + {TEXCF_UNORDERED | targetFormat, registry.getResolution<2>("main_view")}) + .atStage(dabfg::Stage::CS) + .bindToShaderVar("object_motion_blur_out_tex") + .handle(); + + auto frameTimeHndl = registry.readBlob("frame_delta_time").handle(); + registry.readBlob("motion_vec_reproject_tm").bindToShaderVar("motion_vec_reproject_tm"); + + return [sourceTargetHndl, resultTexHndl, frameTimeHndl]() { + objectmotionblur::apply(nullptr, sourceTargetHndl.d3dResId(), resultTexHndl.view(), safediv(1.0f, frameTimeHndl.ref())); + }; + }); +} + +dabfg::NodeHandle makeDummyObjectMotionBlurNode() +{ + auto motionBlurNs = dabfg::root() / "motion_blur" / "object_motion_blur"; + return motionBlurNs.registerNode("dummy", DABFG_PP_NODE_SRC, [](dabfg::Registry registry) { + registry.requestRenderPass().color({registry.rename("color_target", "color_target_done", dabfg::History::No).texture()}); + }); +} + +template +inline void object_motion_blur_node_init_ecs_query(ecs::EntityId eid, Callable c); + +ECS_TAG(render) +ECS_ON_EVENT(OnRenderSettingsReady) +ECS_TRACK(render_settings__motionBlur) +ECS_REQUIRE(bool render_settings__motionBlur) +static void init_object_motion_blur_es(const ecs::Event &, bool render_settings__motionBlur) +{ + object_motion_blur_node_init_ecs_query(g_entity_mgr->getSingletonEntity(ECS_HASH("object_motion_blur")), + [render_settings__motionBlur](dabfg::NodeHandle &object_motion_blur__render_node, int object_motion_blur__max_blur_px, + int object_motion_blur__max_samples, float object_motion_blur__strength, float object_motion_blur__vignette_strength, + float object_motion_blur__ramp_strength, float object_motion_blur__ramp_cutoff) { + objectmotionblur::MotionBlurSettings settings; + settings.externalTextures = true; + + settings.maxBlurPx = object_motion_blur__max_blur_px; + settings.maxSamples = object_motion_blur__max_samples; + settings.strength = object_motion_blur__strength; + settings.vignetteStrength = object_motion_blur__vignette_strength; + settings.rampStrength = object_motion_blur__ramp_strength; + settings.rampCutoff = object_motion_blur__ramp_cutoff; + + const bool isEnabled = (render_settings__motionBlur && object_motion_blur__vignette_strength > 0); + object_motion_blur__render_node = isEnabled ? makeObjectMotionBlurNode(settings) : makeDummyObjectMotionBlurNode(); + }); +} + +ECS_TAG(render) +ECS_ON_EVENT(on_disappear) +ECS_REQUIRE(dabfg::NodeHandle object_motion_blur__render_node) +static void close_object_motion_blur_es(const ecs::Event &) { objectmotionblur::on_settings_changed({}); } + +template +inline void object_motion_blur_init_settings_ecs_query(ecs::EntityId eid, Callable c); + +ECS_TAG(render) +ECS_ON_EVENT(on_appear) +static void object_motion_blur_settings_appear_es(const ecs::Event &, + int object_motion_blur_settings__max_blur_px, + int object_motion_blur_settings__max_samples, + float object_motion_blur_settings__strength, + float object_motion_blur_settings__vignette_strength, + float object_motion_blur_settings__ramp_strength, + float object_motion_blur_settings__ramp_cutoff) +{ + object_motion_blur_init_settings_ecs_query(g_entity_mgr->getSingletonEntity(ECS_HASH("object_motion_blur")), + [&](int &object_motion_blur__max_blur_px, int &object_motion_blur__max_samples, float &object_motion_blur__strength, + float &object_motion_blur__vignette_strength, float &object_motion_blur__ramp_strength, float &object_motion_blur__ramp_cutoff) { + object_motion_blur__max_blur_px = object_motion_blur_settings__max_blur_px; + object_motion_blur__max_samples = object_motion_blur_settings__max_samples; + object_motion_blur__strength = object_motion_blur_settings__strength; + object_motion_blur__vignette_strength = object_motion_blur_settings__vignette_strength; + object_motion_blur__ramp_strength = object_motion_blur_settings__ramp_strength; + object_motion_blur__ramp_cutoff = object_motion_blur_settings__ramp_cutoff; + }); +} diff --git a/prog/daNetGameLibs/object_motion_blur/templates/object_motion_blur.blk b/prog/daNetGameLibs/object_motion_blur/templates/object_motion_blur.blk new file mode 100644 index 000000000..701a951db --- /dev/null +++ b/prog/daNetGameLibs/object_motion_blur/templates/object_motion_blur.blk @@ -0,0 +1,22 @@ +object_motion_blur { + _singleton:b=true + _tags:t="render" + "object_motion_blur__render_node:dabfg::NodeHandle"{} + object_motion_blur__max_blur_px:i=32 + object_motion_blur__max_samples:i=16 + object_motion_blur__strength:r=1 + object_motion_blur__vignette_strength:r=0.6 + object_motion_blur__ramp_strength:r=1 + object_motion_blur__ramp_cutoff:r=1 +} + +object_motion_blur_settings { + _singleton:b=yes + _tags:t="render" + object_motion_blur_settings__max_blur_px:i=32 // Only pixels reaching this velocity this will use all samples + object_motion_blur_settings__max_samples:i=16 // Maximum samples used for one pixel. + object_motion_blur_settings__strength:r=1 + object_motion_blur_settings__vignette_strength:r=0.6 + object_motion_blur_settings__ramp_strength:r=1 // how much to increase or decrease the velocity + object_motion_blur_settings__ramp_cutoff:r=1 // velocities greater than this will be increased, smaller will be decreased +} \ No newline at end of file diff --git a/prog/daNetGameLibs/paint_color/_lib.jam b/prog/daNetGameLibs/paint_color/_lib.jam new file mode 100644 index 000000000..8cea8be7a --- /dev/null +++ b/prog/daNetGameLibs/paint_color/_lib.jam @@ -0,0 +1,4 @@ +if $(HaveRenderer) = yes { + gamePulls += daNetGameLibs_paint_color_DAS_pull_AOT ; + UseProgLibs += daNetGameLibs/paint_color ; +} diff --git a/prog/daNetGameLibs/paint_color/jamfile b/prog/daNetGameLibs/paint_color/jamfile new file mode 100644 index 000000000..cf7842879 --- /dev/null +++ b/prog/daNetGameLibs/paint_color/jamfile @@ -0,0 +1,30 @@ +ModuleDependsOnVars = HaveRenderer PhysName ; +HaveRenderer ?= yes ; + +Root ?= ../../.. ; +Module = paint_color ; +Location = prog/daNetGameLibs/$(Module) ; +local DasModule = daNetGameLibs_paint_color_DAS_pull_AOT ; + + +AddIncludes = + $(Root)/prog/gameLibs/publicInclude + $(Root)/prog/daNetGame + $(Root)/prog/daNetGameLibs + $(Root)/prog/1stPartyLibs/daScript/include +; + +UseProgLibs = +; + +local AllSrcFolder_DAS = +; + +if $(HaveRenderer) = yes { + AllSrcFolder_DAS += + render + ; +} + + +include $(Root)/prog/daNetGameLibs/build_module.jam ; diff --git a/prog/daNetGameLibs/paint_color/paint_color_init.das b/prog/daNetGameLibs/paint_color/paint_color_init.das new file mode 100644 index 000000000..07dd33045 --- /dev/null +++ b/prog/daNetGameLibs/paint_color/paint_color_init.das @@ -0,0 +1,16 @@ +options no_aot + +require app +require ecs.fs +require ECSGlobalTags + + +[export] +def load_paint_color(base_path : string) : bool + var ok = true + if ecs_has_tag("render") || app::get_game_name() == "aot" + ok = load_sub_folder(base_path, "render") && ok + + return ok + + diff --git a/prog/daNetGameLibs/paint_color/render/paint_color.das b/prog/daNetGameLibs/paint_color/render/paint_color.das new file mode 100644 index 000000000..f4232d44a --- /dev/null +++ b/prog/daNetGameLibs/paint_color/render/paint_color.das @@ -0,0 +1,68 @@ +require ecs +require AnimV20 +require DagorMaterials +require DagorShaders +require DagorMath +require DagorSystem +require danetlibs.renderer.includes.render_events + +let paintColorVarId = get_shader_variable_id("paint_color", true) +def set_paint_color(paintColor : float4; var animchar_render : AnimcharRendComponent&) + if paintColorVarId < 0 + error("if") + return + + let gamma = 2.2f + let color = Color4(float4(pow(paintColor.x, gamma), pow(paintColor.y, gamma), pow(paintColor.z, gamma), paintColor.w)) + + recreate_material(animchar_render) <| $(mat) + mat |> set_color4_param(paintColorVarId, color) + +[es(on_appear, tag=render, track=paintColor)] +def set_paint_color_es(evt : Event; + paintColor : float4; + var animchar_render : AnimcharRendComponent&) + set_paint_color(paintColor, animchar_render) + +struct ShaderColorInfo + color : Color4 + varId : int + +def ShaderColorInfo(color : Color4 = Color4(float4(0, 0, 0, 0)); varId : int = -1) + return [[ShaderColorInfo color = color, varId = varId]] + +[es(on_appear, tag=render, track=shader_color__colors)] +def shader_color_es(evt : Event; + eid : EntityId; + shader_color__shaderVarNames : StringList; + shader_color__colors : Point4List; + var animchar_render : AnimcharRendComponent&) + if shader_color__shaderVarNames |> length() != shader_color__colors |> length() + logerr("shader_color.shaderVarNames size should match shader_color.colors size in '{getEntityTemplateName(eid)}'") + return + var colors : array + for i in range(0, length(shader_color__shaderVarNames)) + let varId = get_shader_variable_id(string(shader_color__shaderVarNames[i]), true) + if varId < 0 + continue + colors |> emplace(ShaderColorInfo(Color4(shader_color__colors[i]), varId)) + + if colors |> empty() + return + recreate_material(animchar_render) <| $(mat) + for color in colors + mat |> set_color4_param(color.varId, color.color) + +[es(tag=render)] +def shader_color_emission_es(info : UpdateStageInfoBeforeRender; + shader_color__emissionStregth : float; + animchar__visible : bool; + var dynamic_material_channels_arr : Array) + if !animchar__visible + return + + var matParams = getRW_ecs_object(dynamic_material_channels_arr[0]) + if matParams != null + let color = float4(1, 1, 1, shader_color__emissionStregth) + set(*matParams, "dynmat_param__emissive_color", color) + diff --git a/prog/daNetGameLibs/renderer/templates/render_settings.template.blk b/prog/daNetGameLibs/renderer/templates/render_settings.template.blk index bcfeb554c..e7d274f4a 100644 --- a/prog/daNetGameLibs/renderer/templates/render_settings.template.blk +++ b/prog/daNetGameLibs/renderer/templates/render_settings.template.blk @@ -24,6 +24,7 @@ render_settings { render_settings__dropletsOnScreen:b=true // graphics render_settings__snowflakesOnScreen:b=false // graphics render_settings__mudOnScreen:b=false // graphics + render_settings__ambientBloodOnScreen:b=false // graphics render_settings__forwardRendering:b=true // render feature render_settings__upscaleSamplingTex:b=true // render feature diff --git a/prog/daNetGameLibs/screen_snowflakes/_lib.jam b/prog/daNetGameLibs/screen_snowflakes/_lib.jam new file mode 100644 index 000000000..5e80918ba --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/_lib.jam @@ -0,0 +1,4 @@ +if $(HaveRenderer) = yes { + gamePulls += framework_screen_snowflakes_pull ; + UseProgLibs += daNetGameLibs/screen_snowflakes ; +} diff --git a/prog/daNetGameLibs/screen_snowflakes/_shaders.blk b/prog/daNetGameLibs/screen_snowflakes/_shaders.blk new file mode 100644 index 000000000..7673ce621 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/_shaders.blk @@ -0,0 +1 @@ +file:t = "screen_snowflakes/shaders/screen_snowflakes.dshl" diff --git a/prog/daNetGameLibs/screen_snowflakes/jamfile b/prog/daNetGameLibs/screen_snowflakes/jamfile new file mode 100644 index 000000000..378ca1904 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/jamfile @@ -0,0 +1,24 @@ +ModuleDependsOnVars = HaveRenderer PhysName ; +HaveRenderer ?= yes ; + +Root ?= ../../.. ; +Module = screen_snowflakes ; +Location = prog/daNetGameLibs/$(Module) ; + +AddIncludes = + $(Root)/prog/gameLibs/publicInclude + $(Root)/prog/daNetGameLibs + $(Root)/prog/daNetGame +; + +local AllSrcFolder_CPP = ; +local AllSrcFolder_ES = ; +local AllSrcFolder_DAS = ; + +if $(HaveRenderer) = yes { + AllSrcFolder_ES += + render + ; +} + +include $(Root)/prog/daNetGameLibs/build_module.jam ; diff --git a/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.gen.es.cpp b/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.gen.es.cpp new file mode 100644 index 000000000..f5df4e3f1 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.gen.es.cpp @@ -0,0 +1,384 @@ +#include "screenSnowflakesES.cpp.inl" +ECS_DEF_PULL_VAR(screenSnowflakes); +//built with ECS codegen version 1.0 +#include +static constexpr ecs::ComponentDesc create_screen_snowflakes_renderer_entity_on_settings_changed_es_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("render_settings__snowflakesOnScreen"), ecs::ComponentTypeInfo()} +}; +static void create_screen_snowflakes_renderer_entity_on_settings_changed_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + create_screen_snowflakes_renderer_entity_on_settings_changed_es(evt + , ECS_RO_COMP(create_screen_snowflakes_renderer_entity_on_settings_changed_es_comps, "render_settings__snowflakesOnScreen", bool) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc create_screen_snowflakes_renderer_entity_on_settings_changed_es_es_desc +( + "create_screen_snowflakes_renderer_entity_on_settings_changed_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, create_screen_snowflakes_renderer_entity_on_settings_changed_es_all_events), + empty_span(), + make_span(create_screen_snowflakes_renderer_entity_on_settings_changed_es_comps+0, 1)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render","render_settings__snowflakesOnScreen"); +static constexpr ecs::ComponentDesc create_screen_snowflakes_renderer_entity_on_snow_appearance_es_comps[] = +{ +//start of 1 rq components at [0] + {ECS_HASH("snow_tag"), ecs::ComponentTypeInfo()} +}; +static void create_screen_snowflakes_renderer_entity_on_snow_appearance_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + create_screen_snowflakes_renderer_entity_on_snow_appearance_es(evt + ); +} +static ecs::EntitySystemDesc create_screen_snowflakes_renderer_entity_on_snow_appearance_es_es_desc +( + "create_screen_snowflakes_renderer_entity_on_snow_appearance_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, create_screen_snowflakes_renderer_entity_on_snow_appearance_es_all_events), + empty_span(), + empty_span(), + make_span(create_screen_snowflakes_renderer_entity_on_snow_appearance_es_comps+0, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc destroy_screen_snowflakes_renderer_entity_es_comps[] = +{ +//start of 1 rq components at [0] + {ECS_HASH("snow_tag"), ecs::ComponentTypeInfo()} +}; +static void destroy_screen_snowflakes_renderer_entity_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + destroy_screen_snowflakes_renderer_entity_es(evt + ); +} +static ecs::EntitySystemDesc destroy_screen_snowflakes_renderer_entity_es_es_desc +( + "destroy_screen_snowflakes_renderer_entity_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, destroy_screen_snowflakes_renderer_entity_es_all_events), + empty_span(), + empty_span(), + make_span(destroy_screen_snowflakes_renderer_entity_es_comps+0, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc init_screen_snowflakes_es_comps[] = +{ +//start of 4 rw components at [0] + {ECS_HASH("screen_snowflakes__enabled_on_level"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__camera_inside_vehicle"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__instances_buf"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__node"), ecs::ComponentTypeInfo()}, +//start of 1 ro components at [4] + {ECS_HASH("screen_snowflakes__max_count"), ecs::ComponentTypeInfo()} +}; +static void init_screen_snowflakes_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + init_screen_snowflakes_es(evt + , ECS_RW_COMP(init_screen_snowflakes_es_comps, "screen_snowflakes__enabled_on_level", bool) + , ECS_RW_COMP(init_screen_snowflakes_es_comps, "screen_snowflakes__camera_inside_vehicle", bool) + , ECS_RO_COMP(init_screen_snowflakes_es_comps, "screen_snowflakes__max_count", int) + , ECS_RW_COMP(init_screen_snowflakes_es_comps, "screen_snowflakes__instances_buf", UniqueBufHolder) + , ECS_RW_COMP(init_screen_snowflakes_es_comps, "screen_snowflakes__node", dabfg::NodeHandle) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc init_screen_snowflakes_es_es_desc +( + "init_screen_snowflakes_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, init_screen_snowflakes_es_all_events), + make_span(init_screen_snowflakes_es_comps+0, 4)/*rw*/, + make_span(init_screen_snowflakes_es_comps+4, 1)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc destroy_screen_snowflakes_es_comps[] = +{ +//start of 3 rw components at [0] + {ECS_HASH("screen_snowflakes__instances_buf"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__node"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__enabled_on_level"), ecs::ComponentTypeInfo()} +}; +static void destroy_screen_snowflakes_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + destroy_screen_snowflakes_es(evt + , ECS_RW_COMP(destroy_screen_snowflakes_es_comps, "screen_snowflakes__instances_buf", UniqueBufHolder) + , ECS_RW_COMP(destroy_screen_snowflakes_es_comps, "screen_snowflakes__node", dabfg::NodeHandle) + , ECS_RW_COMP(destroy_screen_snowflakes_es_comps, "screen_snowflakes__enabled_on_level", bool) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc destroy_screen_snowflakes_es_es_desc +( + "destroy_screen_snowflakes_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, destroy_screen_snowflakes_es_all_events), + make_span(destroy_screen_snowflakes_es_comps+0, 3)/*rw*/, + empty_span(), + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc screen_snowflakes_on_vehicle_camera_change_es_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("isInVehicle"), ecs::ComponentTypeInfo()}, +//start of 1 rq components at [1] + {ECS_HASH("bindedCamera"), ecs::ComponentTypeInfo()} +}; +static void screen_snowflakes_on_vehicle_camera_change_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + screen_snowflakes_on_vehicle_camera_change_es(evt + , ECS_RO_COMP(screen_snowflakes_on_vehicle_camera_change_es_comps, "isInVehicle", bool) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc screen_snowflakes_on_vehicle_camera_change_es_es_desc +( + "screen_snowflakes_on_vehicle_camera_change_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, screen_snowflakes_on_vehicle_camera_change_es_all_events), + empty_span(), + make_span(screen_snowflakes_on_vehicle_camera_change_es_comps+0, 1)/*ro*/, + make_span(screen_snowflakes_on_vehicle_camera_change_es_comps+1, 1)/*rq*/, + empty_span(), + ecs::EventSetBuilder<>::build(), + 0 +,nullptr,"bindedCamera,isInVehicle"); +static constexpr ecs::ComponentDesc screen_snowflakes_before_render_es_comps[] = +{ +//start of 3 rw components at [0] + {ECS_HASH("screen_snowflakes__instances_buf"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__time_until_next_spawn"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__instances"), ecs::ComponentTypeInfo()}, +//start of 7 ro components at [3] + {ECS_HASH("screen_snowflakes__spawn_rate"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__min_size"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__max_size"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__restricted_radius"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__lifetime"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__camera_inside_vehicle"), ecs::ComponentTypeInfo()}, + {ECS_HASH("screen_snowflakes__enabled_on_level"), ecs::ComponentTypeInfo()} +}; +static void screen_snowflakes_before_render_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_FAST_ASSERT(evt.is()); + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + { + if ( !(ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__enabled_on_level", bool)) ) + continue; + screen_snowflakes_before_render_es(static_cast(evt) + , ECS_RW_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__instances_buf", UniqueBufHolder) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__spawn_rate", float) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__min_size", float) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__max_size", float) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__restricted_radius", float) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__lifetime", float) + , ECS_RW_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__time_until_next_spawn", float) + , ECS_RW_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__instances", SnowflakeInstances) + , ECS_RO_COMP(screen_snowflakes_before_render_es_comps, "screen_snowflakes__camera_inside_vehicle", bool) + ); + } while (++comp != compE); +} +static ecs::EntitySystemDesc screen_snowflakes_before_render_es_es_desc +( + "screen_snowflakes_before_render_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, screen_snowflakes_before_render_es_all_events), + make_span(screen_snowflakes_before_render_es_comps+0, 3)/*rw*/, + make_span(screen_snowflakes_before_render_es_comps+3, 7)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +//static constexpr ecs::ComponentDesc register_screen_snowflakes_for_postfx_es_comps[] ={}; +static void register_screen_snowflakes_for_postfx_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + G_UNUSED(components); + G_FAST_ASSERT(evt.is()); + register_screen_snowflakes_for_postfx_es(static_cast(evt) + ); +} +static ecs::EntitySystemDesc register_screen_snowflakes_for_postfx_es_es_desc +( + "register_screen_snowflakes_for_postfx_es", + "prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl", + ecs::EntitySystemOps(nullptr, register_screen_snowflakes_for_postfx_es_all_events), + empty_span(), + empty_span(), + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,"render"); +static constexpr ecs::ComponentDesc snow_enabled_on_level_ecs_query_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("snow_tag"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc snow_enabled_on_level_ecs_query_desc +( + "snow_enabled_on_level_ecs_query", + empty_span(), + make_span(snow_enabled_on_level_ecs_query_comps+0, 1)/*ro*/, + empty_span(), + empty_span()); +template +inline void snow_enabled_on_level_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, snow_enabled_on_level_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(snow_enabled_on_level_ecs_query_comps, "snow_tag", ecs::Tag) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc snowflakes_enabled_global_setting_ecs_query_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("render_settings__snowflakesOnScreen"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc snowflakes_enabled_global_setting_ecs_query_desc +( + "snowflakes_enabled_global_setting_ecs_query", + empty_span(), + make_span(snowflakes_enabled_global_setting_ecs_query_comps+0, 1)/*ro*/, + empty_span(), + empty_span()); +template +inline void snowflakes_enabled_global_setting_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, snowflakes_enabled_global_setting_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(snowflakes_enabled_global_setting_ecs_query_comps, "render_settings__snowflakesOnScreen", bool) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc vehicle_camera_on_screen_snowflakes_init_ecs_query_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("isInVehicle"), ecs::ComponentTypeInfo()}, +//start of 1 rq components at [1] + {ECS_HASH("bindedCamera"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc vehicle_camera_on_screen_snowflakes_init_ecs_query_desc +( + "vehicle_camera_on_screen_snowflakes_init_ecs_query", + empty_span(), + make_span(vehicle_camera_on_screen_snowflakes_init_ecs_query_comps+0, 1)/*ro*/, + make_span(vehicle_camera_on_screen_snowflakes_init_ecs_query_comps+1, 1)/*rq*/, + empty_span()); +template +inline void vehicle_camera_on_screen_snowflakes_init_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, vehicle_camera_on_screen_snowflakes_init_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(vehicle_camera_on_screen_snowflakes_init_ecs_query_comps, "isInVehicle", bool) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc render_screen_snowflakes_ecs_query_comps[] = +{ +//start of 1 ro components at [0] + {ECS_HASH("screen_snowflakes__instances"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc render_screen_snowflakes_ecs_query_desc +( + "render_screen_snowflakes_ecs_query", + empty_span(), + make_span(render_screen_snowflakes_ecs_query_comps+0, 1)/*ro*/, + empty_span(), + empty_span()); +template +inline void render_screen_snowflakes_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, render_screen_snowflakes_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + function( + ECS_RO_COMP(render_screen_snowflakes_ecs_query_comps, "screen_snowflakes__instances", SnowflakeInstances) + ); + + }while (++comp != compE); + } + ); +} +static constexpr ecs::ComponentDesc screen_snowflakes_on_vehicle_camera_change_ecs_query_comps[] = +{ +//start of 1 rw components at [0] + {ECS_HASH("screen_snowflakes__camera_inside_vehicle"), ecs::ComponentTypeInfo()}, +//start of 1 ro components at [1] + {ECS_HASH("screen_snowflakes__enabled_on_level"), ecs::ComponentTypeInfo()} +}; +static ecs::CompileTimeQueryDesc screen_snowflakes_on_vehicle_camera_change_ecs_query_desc +( + "screen_snowflakes_on_vehicle_camera_change_ecs_query", + make_span(screen_snowflakes_on_vehicle_camera_change_ecs_query_comps+0, 1)/*rw*/, + make_span(screen_snowflakes_on_vehicle_camera_change_ecs_query_comps+1, 1)/*ro*/, + empty_span(), + empty_span()); +template +inline void screen_snowflakes_on_vehicle_camera_change_ecs_query(Callable function) +{ + perform_query(g_entity_mgr, screen_snowflakes_on_vehicle_camera_change_ecs_query_desc.getHandle(), + [&function](const ecs::QueryView& __restrict components) + { + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp != compE); do + { + if ( !(ECS_RO_COMP(screen_snowflakes_on_vehicle_camera_change_ecs_query_comps, "screen_snowflakes__enabled_on_level", bool)) ) + continue; + function( + ECS_RW_COMP(screen_snowflakes_on_vehicle_camera_change_ecs_query_comps, "screen_snowflakes__camera_inside_vehicle", bool) + ); + + }while (++comp != compE); + } + ); +} diff --git a/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl b/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl new file mode 100644 index 000000000..d77bcc646 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/render/screenSnowflakesES.cpp.inl @@ -0,0 +1,215 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + +#include <3d/dag_quadIndexBuffer.h> +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +using SnowflakeInstances = dag::Vector; + +ECS_DECLARE_RELOCATABLE_TYPE(SnowflakeInstances); +ECS_REGISTER_RELOCATABLE_TYPE(SnowflakeInstances, nullptr); + +#define SCREEN_SNOWFLAKES_VARS VAR(screen_snowflakes_rendered) + +#define VAR(a) static ShaderVariableInfo a##VarId(#a, true); +SCREEN_SNOWFLAKES_VARS +#undef VAR + +static void create_or_destroy_screen_snowflakes_renderer_entity(bool render_snowflakes) +{ + if (render_snowflakes && renderer_has_feature(FeatureRenderFlags::POSTFX) && + g_entity_mgr->getTemplateDB().getTemplateByName("screen_snowflakes_renderer")) + g_entity_mgr->getOrCreateSingletonEntity(ECS_HASH("screen_snowflakes_renderer")); + else + g_entity_mgr->destroyEntity(g_entity_mgr->getSingletonEntity(ECS_HASH("screen_snowflakes_renderer"))); +} + +template +static void snow_enabled_on_level_ecs_query(Callable c); + +template +static void snowflakes_enabled_global_setting_ecs_query(Callable c); + +ECS_TAG(render) +ECS_ON_EVENT(OnRenderSettingsReady, SetResolutionEvent, ChangeRenderFeatures) +ECS_TRACK(render_settings__snowflakesOnScreen) +static void create_screen_snowflakes_renderer_entity_on_settings_changed_es(const ecs::Event &, + bool render_settings__snowflakesOnScreen) +{ + bool renderSnowflakes = false; + snow_enabled_on_level_ecs_query([&renderSnowflakes, render_settings__snowflakesOnScreen](ecs::Tag snow_tag) { + G_UNUSED(snow_tag); + renderSnowflakes = render_settings__snowflakesOnScreen; + }); + create_or_destroy_screen_snowflakes_renderer_entity(renderSnowflakes); +} + +ECS_TAG(render) +ECS_REQUIRE(ecs::Tag snow_tag) +ECS_ON_EVENT(on_appear) +static void create_screen_snowflakes_renderer_entity_on_snow_appearance_es(const ecs::Event &) +{ + bool renderSnowflakes = false; + snowflakes_enabled_global_setting_ecs_query( + [&renderSnowflakes](bool render_settings__snowflakesOnScreen) { renderSnowflakes = render_settings__snowflakesOnScreen; }); + create_or_destroy_screen_snowflakes_renderer_entity(renderSnowflakes); +} + +ECS_TAG(render) +ECS_REQUIRE(ecs::Tag snow_tag) +ECS_ON_EVENT(on_disappear) +static void destroy_screen_snowflakes_renderer_entity_es(const ecs::Event &) +{ + create_or_destroy_screen_snowflakes_renderer_entity(false); +} + +template +static void render_screen_snowflakes_ecs_query(Callable c); + +template +static void vehicle_camera_on_screen_snowflakes_init_ecs_query(Callable c); + +ECS_TAG(render) +ECS_ON_EVENT(on_appear) +static void init_screen_snowflakes_es(const ecs::Event &, + bool &screen_snowflakes__enabled_on_level, + bool &screen_snowflakes__camera_inside_vehicle, + int screen_snowflakes__max_count, + UniqueBufHolder &screen_snowflakes__instances_buf, + dabfg::NodeHandle &screen_snowflakes__node) +{ + screen_snowflakes__enabled_on_level = true; + + vehicle_camera_on_screen_snowflakes_init_ecs_query( + [&screen_snowflakes__camera_inside_vehicle](ECS_REQUIRE(ecs::EntityId bindedCamera) bool isInVehicle) { + screen_snowflakes__camera_inside_vehicle = isInVehicle; + }); + + screen_snowflakes__instances_buf = dag::create_sbuffer(sizeof(Snowflake), screen_snowflakes__max_count, + SBCF_MISC_STRUCTURED | SBCF_BIND_SHADER_RES, 0, "screen_snowflakes_buf"); + + screen_snowflakes__node = dabfg::register_node("screen_snowflakes_node", DABFG_PP_NODE_SRC, [](dabfg::Registry registry) { + auto screenSnowflakesTexHndl = registry.createTexture2d("screen_snowflakes_tex", dabfg::History::No, + {TEXFMT_R16F | TEXCF_RTARGET, registry.getResolution<2>("post_fx", 0.5f)}); + registry.requestRenderPass().clear(screenSnowflakesTexHndl, make_clear_value(0, 0, 0, 0)).color({screenSnowflakesTexHndl}); + + return [renderer = DynamicShaderHelper("screen_snowflakes")]() { + render_screen_snowflakes_ecs_query([&renderer](const SnowflakeInstances &screen_snowflakes__instances) { + if (screen_snowflakes__instances.empty()) + return; + d3d::setvsrc_ex(0, NULL, 0, 0); + index_buffer::use_quads_16bit(); + if (!renderer.shader->setStates()) + return; + d3d::drawind_instanced(PRIM_TRILIST, 0, 2, 0, screen_snowflakes__instances.size(), 0); + }); + }; + }); +} + +ECS_TAG(render) +ECS_ON_EVENT(on_disappear) +static void destroy_screen_snowflakes_es(const ecs::Event &, + UniqueBufHolder &screen_snowflakes__instances_buf, + dabfg::NodeHandle &screen_snowflakes__node, + bool &screen_snowflakes__enabled_on_level) +{ + screen_snowflakes__enabled_on_level = false; + screen_snowflakes__instances_buf.close(); + screen_snowflakes__node = {}; + ShaderGlobal::set_int(screen_snowflakes_renderedVarId, 0); +} + +template +static void screen_snowflakes_on_vehicle_camera_change_ecs_query(Callable c); + +ECS_TRACK(isInVehicle, bindedCamera) +ECS_REQUIRE(ecs::EntityId bindedCamera) +static void screen_snowflakes_on_vehicle_camera_change_es(const ecs::Event &, bool isInVehicle) +{ + screen_snowflakes_on_vehicle_camera_change_ecs_query( + [isInVehicle](ECS_REQUIRE(eastl::true_type screen_snowflakes__enabled_on_level) bool &screen_snowflakes__camera_inside_vehicle) { + screen_snowflakes__camera_inside_vehicle = isInVehicle; + }); +} + +static float exponential_distribution(float u, float rate) { return -log(u + 1.e-3f) / rate; } + +ECS_TAG(render) +ECS_REQUIRE(eastl::true_type screen_snowflakes__enabled_on_level) +static void screen_snowflakes_before_render_es(const UpdateStageInfoBeforeRender &info, + UniqueBufHolder &screen_snowflakes__instances_buf, + float screen_snowflakes__spawn_rate, + float screen_snowflakes__min_size, + float screen_snowflakes__max_size, + float screen_snowflakes__restricted_radius, + float screen_snowflakes__lifetime, + float &screen_snowflakes__time_until_next_spawn, + SnowflakeInstances &screen_snowflakes__instances, + bool screen_snowflakes__camera_inside_vehicle) +{ + const Point3 SNOWFALL_DIRECTION(0, -1, 0); + const Point3 &cameraPos = info.viewItm.getcol(3); + float t = 25.0f; + + bool spawnSnowlakes = !screen_snowflakes__camera_inside_vehicle && !dacoll::rayhit_normalized_ri(cameraPos, -SNOWFALL_DIRECTION, t); + screen_snowflakes__time_until_next_spawn -= info.dt; + if (spawnSnowlakes && screen_snowflakes__time_until_next_spawn < 0.f) + { + float phi = rnd_float(0.f, 2 * M_PI); + float cosPhi = cosf(phi); + float sinPhi = sinf(phi); + // R-coordinate of a square in polar coordinates + float maxR = 1.f / max(abs(cosPhi), abs(sinPhi)); + // A random variable with the probability distribution function rising with the rising argument, which would guarantee a higher + // probability of snowflake spawning near the edges of the screen rather than near the center: + float rv = powf(rnd_float(0.f, 1.f), 0.33f); + float r = screen_snowflakes__restricted_radius + + (maxR - screen_snowflakes__max_size / sqrtf(2.f) - screen_snowflakes__restricted_radius) * rv; + Point2 snowflakeCenter = Point2(r * cosPhi, r * sinPhi); + // The closer to the edge, the bigger the snowflake: + float sizeX = screen_snowflakes__min_size + (screen_snowflakes__max_size - screen_snowflakes__min_size) * rv; + sizeX *= 2.f; // due to screen space coordinates being from -1 to 1 + float sizeY = sizeX * rnd_float(0.8f, 1.f); // prefer horizontal snowflakes + float opacity = rnd_float(0.6f, 1.f); + screen_snowflakes__instances.push_back(Snowflake{snowflakeCenter, Point2(sizeX, sizeY), opacity, rnd_float(0.f, 1.e5f)}); + + screen_snowflakes__time_until_next_spawn = exponential_distribution(rnd_float(0.f, 1.f), screen_snowflakes__spawn_rate); + } + + for (auto &snowflake : screen_snowflakes__instances) + snowflake.opacity -= info.dt / screen_snowflakes__lifetime; + + screen_snowflakes__instances.erase(eastl::remove_if(begin(screen_snowflakes__instances), end(screen_snowflakes__instances), + [](const Snowflake &snowflake) { return snowflake.opacity < 0.f; }), + end(screen_snowflakes__instances)); + + if (!screen_snowflakes__instances.empty()) + { + screen_snowflakes__instances_buf.getBuf()->updateData(0, + screen_snowflakes__instances.size() * sizeof(screen_snowflakes__instances[0]), screen_snowflakes__instances.data(), + VBLOCK_DISCARD); + ShaderGlobal::set_int(screen_snowflakes_renderedVarId, 1); + } + else + ShaderGlobal::set_int(screen_snowflakes_renderedVarId, 0); +} + +ECS_TAG(render) +static void register_screen_snowflakes_for_postfx_es(const RegisterPostfxResources &evt) +{ + evt.get<0>().readTexture("screen_snowflakes_tex").atStage(dabfg::Stage::PS).bindToShaderVar().optional(); +} \ No newline at end of file diff --git a/prog/daNetGameLibs/screen_snowflakes/shaders/apply.dshl b/prog/daNetGameLibs/screen_snowflakes/shaders/apply.dshl new file mode 100644 index 000000000..1310d3796 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/shaders/apply.dshl @@ -0,0 +1,28 @@ +texture screen_snowflakes_tex; +int screen_snowflakes_rendered = 0; + +macro INIT_SCREEN_SNOWFLAKES() + (ps) { + screen_snowflakes_tex@tex2d = screen_snowflakes_tex; + screen_snowflakes_rendered@i1 = screen_snowflakes_rendered; + } +endmacro + +macro USE_SCREEN_SNOWFLAKES() +hlsl(ps) { + void apply_screen_snowflakes(inout float3 frame, float2 tc) + { + BRANCH + if (screen_snowflakes_rendered) + { + float snowAlpha = saturate(screen_snowflakes_tex.SampleLevel(frame_tex_samplerstate, tc, 0).r); + // Squaring is needed to get rid of optical illusion of a border between snowflake and background. This also works as a cheap blur: + snowAlpha *= snowAlpha; + // Since snowflakes are applied in linear color space still, we need to mitigate a way too high jump in brightness + // when snowflake is in the dark area of the frame (obviously not mathematically correct, but good enough): + float frameGrayscale = (frame.r + frame.g + frame.b) / 3.f; + frame += sqrt(frameGrayscale + 0.01f) * snowAlpha; + } + } +} +endmacro \ No newline at end of file diff --git a/prog/daNetGameLibs/screen_snowflakes/shaders/screen_snowflakes.dshl b/prog/daNetGameLibs/screen_snowflakes/shaders/screen_snowflakes.dshl new file mode 100644 index 000000000..73d36c880 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/shaders/screen_snowflakes.dshl @@ -0,0 +1,97 @@ +include "shader_global.dshl" + +buffer screen_snowflakes_buf; + +shader screen_snowflakes +{ + cull_mode = none; + z_write = false; + z_test = false; + + blend_src = one; blend_dst = one; + blend_op = max; + + hlsl { + struct VsOutput + { + VS_OUT_POSITION(pos) + float2 localPos : TEXCOORD0; + float opacity : TEXCOORD1; + float seed : TEXCOORD2; + float size : TEXCOORD3; + }; + } + + (vs) { + screen_aspect_ratio@f1 = rendering_res.x / rendering_res.y; + screen_snowflakes_buf@buf = screen_snowflakes_buf hlsl { + #include + StructuredBuffer screen_snowflakes_buf@buf; + }; + } + + hlsl(vs) { + VsOutput screen_snowflakes_vs(uint vertex_id : SV_VertexID, uint inst_id : SV_InstanceID) { + VsOutput OUT; + + float2 vpos = float2(vertex_id < 2 ? -0.5 : 0.5, + vertex_id % 3 == 0 ? 0.5 : -0.5); + + Snowflake snowflake = screen_snowflakes_buf[inst_id]; + OUT.pos = float4(snowflake.pos.x + vpos.x * snowflake.size.x, + snowflake.pos.y + vpos.y * snowflake.size.y * screen_aspect_ratio, + 0, 1); + OUT.localPos = OUT.pos.xy - snowflake.pos; + OUT.opacity = snowflake.opacity; + OUT.seed = snowflake.seed; + OUT.size = snowflake.size.x; + + return OUT; + } + } + + (ps) { + screen_aspect_ratio@f1 = rendering_res.x / rendering_res.y; + } + + hlsl(ps) { + #include "noise/Perlin2D.hlsl" + + #define BASE_PERLIN_STRENGTH 45. + #define JAGGEDNESS 3. + #define DETAIL_STRENGTH 0.5 + #define DETAIL_INVERSE_SCALE 2. + + float perlin_scaled(float2 p) // to [0.5, 1] range + { + return noise_Perlin2D(p) * 0.25 + 0.75; + } + + float relu_pow2(float x) + { + x = max(0.0, x); + return x * x; + } + + float screen_snowflakes_ps(VsOutput input): SV_Target + { + float dist = length(float2(input.localPos.x, input.localPos.y / screen_aspect_ratio)) / input.size; + input.localPos *= JAGGEDNESS / input.size; + float value = BASE_PERLIN_STRENGTH * perlin_scaled(input.localPos + input.seed); + + // Fade with distance from the center: + value *= relu_pow2(1.0 - dist); + + value = smoothstep(15., 30., value) * input.opacity; + float detail = noise_Perlin2D(DETAIL_INVERSE_SCALE * input.localPos + input.seed); + value *= (1. + DETAIL_STRENGTH * detail); + // Adding irregurality to snowflake melting: + value -= 0.5 * (1. - input.opacity) * (detail * 0.5 + 0.5); + + return saturate(value); + } + } + + compile("target_vs", "screen_snowflakes_vs"); + compile("target_ps", "screen_snowflakes_ps"); +} diff --git a/prog/daNetGameLibs/screen_snowflakes/shaders/snowflake.hlsli b/prog/daNetGameLibs/screen_snowflakes/shaders/snowflake.hlsli new file mode 100644 index 000000000..68db1bb27 --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/shaders/snowflake.hlsli @@ -0,0 +1,19 @@ +#ifndef SNOWFLAKE_HLSL +#define SNOWFLAKE_HLSL 1 + +struct Snowflake +{ + float2 pos; + float2 size; + float opacity; + float seed; + +#ifdef __cplusplus + bool operator==(const Snowflake&other) const + { + return this == &other; + } +#endif +}; + +#endif // SNOWFLAKE_HLSL \ No newline at end of file diff --git a/prog/daNetGameLibs/screen_snowflakes/templates/screen_snowflakes.template.blk b/prog/daNetGameLibs/screen_snowflakes/templates/screen_snowflakes.template.blk new file mode 100644 index 000000000..233c7732a --- /dev/null +++ b/prog/daNetGameLibs/screen_snowflakes/templates/screen_snowflakes.template.blk @@ -0,0 +1,21 @@ +screen_snowflakes_renderer{ + _singleton:b=yes + _tags:t="render" + + screen_snowflakes__max_count:i=32 + // Proportion of the height of the frame: + screen_snowflakes__min_size:r=0.1 + screen_snowflakes__max_size:r=0.2 + + screen_snowflakes__enabled_on_level:b=false + screen_snowflakes__camera_inside_vehicle:b=false + + screen_snowflakes__spawn_rate:r=2.0 + screen_snowflakes__restricted_radius:r=0.5 + screen_snowflakes__lifetime:r=5.0 + screen_snowflakes__time_until_next_spawn:r=0.0 + + "screen_snowflakes__instances_buf:UniqueBufHolder"{} + "screen_snowflakes__instances:SnowflakeInstances"{} + "screen_snowflakes__node:dabfg::NodeHandle"{} +} \ No newline at end of file diff --git a/prog/daNetGameLibs/setup_package.py b/prog/daNetGameLibs/setup_package.py index 818bcf317..7e5140e1f 100644 --- a/prog/daNetGameLibs/setup_package.py +++ b/prog/daNetGameLibs/setup_package.py @@ -10,7 +10,7 @@ sys.exit(1) def setup_package(libsListOrPath=None, basePath=None, dngLibsPath=None, - vromfsOutputPath=None, templateOutputPath=None, dasInitPath=None, jamPath=None, jamPathAot=None, shadersPath=None): + vromfsOutputPath=None, vromfsName=None, templateOutputPath=None, dasInitPath=None, jamPath=None, jamPathAot=None, shadersPath=None): if libsListOrPath is None or basePath is None or dngLibsPath is None: print("libsListOrPath, basePath and dngLibsPath is required. \n Usage: setup_package(libsListOrPath=, basePath=, dngLibsPath=)") @@ -29,10 +29,11 @@ def setup_package(libsListOrPath=None, basePath=None, dngLibsPath=None, jamPathAot = jamPathAot or os.path.join(basePath, "aot", "dng_libs.jam") print("path to jam aot output file", jamPathAot) shadersPath = shadersPath or os.path.join(basePath, "shaders", "dng_libs_shaders.blk") + shadersPathDir = os.path.dirname(shadersPath) print("path to shader list output file", shadersPath) - C_LIKE_CODEGEN_COMMENT = "\n//THIS FILE CREATED BY CODEGEN, DON'T CHANGE THIS!!! USE setup_dng_libs.bat INSTEAD!!!\n\n" - PYTHON_LIKE_CODEGEN_COMMENT = "\n#THIS FILE CREATED BY CODEGEN, DON'T CHANGE THIS!!! USE setup_dng_libs.bat INSTEAD!!!\n\n" + C_LIKE_CODEGEN_COMMENT = "\n//THIS FILE CREATED BY CODEGEN, DON'T CHANGE THIS!!! USE setup_dng_libs.py INSTEAD!!!\n\n" + PYTHON_LIKE_CODEGEN_COMMENT = "\n#THIS FILE CREATED BY CODEGEN, DON'T CHANGE THIS!!! USE setup_dng_libs.py INSTEAD!!!\n\n" vromfsOutput = open(vromfsOutputPath, 'w') vromfsOutput.write(C_LIKE_CODEGEN_COMMENT) @@ -56,7 +57,7 @@ def setup_package(libsListOrPath=None, basePath=None, dngLibsPath=None, shaders = open(shadersPath, 'w') shaders.write(C_LIKE_CODEGEN_COMMENT) - vromfsName = "danetlibs.vromfs.bin" + vromfsName = vromfsName or "danetlibs.vromfs.bin" extForVromfs = ['.blk', '.das', '.das_project'] @@ -84,7 +85,8 @@ def setup_package(libsListOrPath=None, basePath=None, dngLibsPath=None, shaderBlockFile = os.path.join(libDirectory, '_shaders.blk').replace('\\', '/') if os.path.exists(shaderBlockFile): - shaders.write(f'include \"{shaderBlockFile}\"\n') + relToShadersPath = os.path.join(os.path.relpath(libDirectory, start = shadersPathDir), '_shaders.blk').replace('\\', '/') + shaders.write(f"include \"{relToShadersPath}\"\n") templateFolder = os.path.join(libDirectory, 'templates') if os.path.isdir(templateFolder): diff --git a/prog/daNetGameLibs/sound/sound_utils/es/managed_sound_control.das b/prog/daNetGameLibs/sound/sound_utils/es/managed_sound_control.das index d9108c1fa..482169cb4 100644 --- a/prog/daNetGameLibs/sound/sound_utils/es/managed_sound_control.das +++ b/prog/daNetGameLibs/sound/sound_utils/es/managed_sound_control.das @@ -1,66 +1,85 @@ -require app require ecs -require soundSystem require sound_utils.modules.managed_sound_control_common -[es(tag=sound, on_event=ParallelUpdateFrameDelayed, REQUIRE=vehicleManageSoundControl, after=(animchar_before_render_es, sound_begin_update_es, sound_control_update), before=sound_end_update_es)] -def vehicle_managed_sound_control(evt : Event; - managed_sound_control__maxInstances : int; - managed_sound_control__cooldown : float; - var managed_sound_control__entities : EidList&; - var managed_sound_control__positions : Point3List&) - - let listener = get_listener_pos() - let curTime = get_sync_time() - - query() <| $ [es(REQUIRE=vehicleManageSoundControl)] (eid : EntityId; - sound_control__inRange : bool; - var sound_control__allowSound : bool&; - managed_sound__nextTimeToAllow : float; - transform : float3x4) - managed_sound_control_impl(sound_control__inRange, - managed_sound_control__maxInstances, - managed_sound_control__cooldown, - managed_sound_control__entities, - managed_sound_control__positions, - listener, - curTime, - eid, - sound_control__allowSound, - managed_sound__nextTimeToAllow, - transform) - - - -[es(tag=sound, on_event=ParallelUpdateFrameDelayed, REQUIRE=sfxManageSoundControl, after=(animchar_before_render_es, sound_begin_update_es, sound_control_update), before=sound_end_update_es)] -def sfx_managed_sound_control(evt : Event; - managed_sound_control__maxInstances : int; - managed_sound_control__cooldown : float; - var managed_sound_control__entities : EidList&; - var managed_sound_control__positions : Point3List&) - - let listener = get_listener_pos() - let curTime = get_sync_time() - - query() <| $ [es(REQUIRE=sfxManageSoundControl)] (eid : EntityId; - sound_control__inRange : bool; - var sound_control__allowSound : bool&; - managed_sound__nextTimeToAllow : float; - transform : float3x4) - managed_sound_control_impl(sound_control__inRange, - managed_sound_control__maxInstances, - managed_sound_control__cooldown, +[es(tag=sound, on_appear)] +def managed_sound_on_appear(evt : Event; + managed_sound__maxInstances : int; + managed_sound__type : string; + var managed_sound__idx : int&) + + managed_sound__idx = -1 + query() <| $ [es] (var managed_sound_control__types : StringList&; + var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) + + append_managed_sound(managed_sound__maxInstances, + managed_sound__type, + managed_sound__idx, + + managed_sound_control__types, + managed_sound_control__beginPosEnd, + managed_sound_control__entities, + managed_sound_control__positions) + + + +[es(tag=sound, on_appear)] +def managed_sound_control_on_appear(evt : Event; + var managed_sound_control__types : StringList&; + var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) + + clear(managed_sound_control__types) + clear(managed_sound_control__beginPosEnd) + clear(managed_sound_control__entities) + clear(managed_sound_control__positions) + + query() <| $ [es] (managed_sound__maxInstances : int; + managed_sound__type : string; + var managed_sound__idx : int&) + + managed_sound__idx = -1 + + append_managed_sound(managed_sound__maxInstances, + managed_sound__type, + managed_sound__idx, + + managed_sound_control__types, + managed_sound_control__beginPosEnd, + managed_sound_control__entities, + managed_sound_control__positions) + + + +[es(tag=sound, on_event=ParallelUpdateFrameDelayed, after=(animchar_before_render_es, sound_begin_update_es, sound_control_update), before=sound_end_update_es)] +def managed_sound_control_update(evt : Event; + managed_sound_control__cooldown : float; + var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) + + update_managed_sound_control(managed_sound_control__cooldown, + managed_sound_control__beginPosEnd, managed_sound_control__entities, - managed_sound_control__positions, - listener, - curTime, - eid, - sound_control__allowSound, - managed_sound__nextTimeToAllow, - transform) - - -[es(tag=sound, on_disappear, REQUIRE=managedSound)] -def managed_sound_disappear(evt : Event; eid : EntityId) - remove_managed_sound(eid) + managed_sound_control__positions) + + +[es(tag=sound, track=isAlive)] +def managed_sound_track_is_alive(evt : Event; + eid : EntityId; + isAlive : bool; + managed_sound__idx : int; + var sound_control__allowSound : bool&) + if !isAlive + remove_managed_sound(eid, managed_sound__idx) + sound_control__allowSound = false + + +[es(tag=sound, on_disappear)] +def managed_sound_disappear(evt : Event; + eid : EntityId; + managed_sound__idx : int) + remove_managed_sound(eid, managed_sound__idx) diff --git a/prog/daNetGameLibs/sound/sound_utils/es/play_net_sound_impl.das b/prog/daNetGameLibs/sound/sound_utils/es/play_net_sound_impl.das index a40ce615c..ac6da6472 100644 --- a/prog/daNetGameLibs/sound/sound_utils/es/play_net_sound_impl.das +++ b/prog/daNetGameLibs/sound/sound_utils/es/play_net_sound_impl.das @@ -72,8 +72,8 @@ def play_net_sound_impl_client_simple(cmd : CmdPlaySoundSimple; eid : EntityId; // ------------------------------------------------------------- [es(tag=sound)] -def play_net_sound_impl_from_any_source(cmd : CmdPlayNetSoundFromAnySource; eid : EntityId; var sound_event_group : SoundEventGroup?; transform : float3x4) - find_query() <| $ [es(REQUIRE=anySourceNetSounds)] ([[shared_comp]] net_sound__descs : Object) +def play_scene_net_sound_impl(cmd : CmdPlaySceneNetSound; eid : EntityId; var sound_event_group : SoundEventGroup?; transform : float3x4) + find_query() <| $ [es(REQUIRE=sceneNetSounds)] ([[shared_comp]] net_sound__descs : Object) if has_net_sound_desc(cmd.hash, net_sound__descs) play_impl(cmd.hash, transform[3], 0., net_sound__descs, has(eid, "hero"), sound_event_group) return true diff --git a/prog/daNetGameLibs/sound/sound_utils/modules/managed_sound_control_common.das b/prog/daNetGameLibs/sound/sound_utils/modules/managed_sound_control_common.das index b4d72fb78..f824c2183 100644 --- a/prog/daNetGameLibs/sound/sound_utils/modules/managed_sound_control_common.das +++ b/prog/daNetGameLibs/sound/sound_utils/modules/managed_sound_control_common.das @@ -2,74 +2,137 @@ module managed_sound_control_common shared require ecs require ecs.common +require soundSystem +require app +require DagorSystem -def managed_sound_control_impl(is_in_range : bool; - managed_sound_control__maxInstances : int; - managed_sound_control__cooldown : float; - var managed_sound_control__entities : EidList&; - var managed_sound_control__positions : Point3List&; +def find_index(eid : EntityId; entities : EidList; begin, end : int) + for i in range(begin, end) + if entities[i] == eid + return i + return -1 - listener : float3; - curTime : float; - eid : EntityId; - var sound_control__allowSound : bool&; - managed_sound__nextTimeToAllow : float; - transform : float3x4) - if !is_in_range - sound_control__allowSound = false - return +def remove_managed_sound(eid : EntityId; + managed_sound__idx : int) + if managed_sound__idx != -1 + query() <| $ [es] (var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) - let pos = transform[3] - let idx = find_index(managed_sound_control__entities, eid) + let beginPosEnd = managed_sound_control__beginPosEnd[managed_sound__idx] + assume begin = beginPosEnd.x + assume pos = beginPosEnd.y + assume end = beginPosEnd.z + let idx = find_index(eid, managed_sound_control__entities, begin, pos) + if idx >= 0 + assert(pos > begin) + managed_sound_control__entities[idx] = managed_sound_control__entities[pos - 1] + managed_sound_control__positions[idx] = managed_sound_control__positions[pos - 1] + --managed_sound_control__beginPosEnd[managed_sound__idx].y - if idx >= 0 - sound_control__allowSound = true - managed_sound_control__positions[idx] = pos - return - if curTime < managed_sound__nextTimeToAllow - return +def append_managed_sound(managed_sound__maxInstances : int; + managed_sound__type : string; + var managed_sound__idx : int&; - if length(managed_sound_control__entities) < managed_sound_control__maxInstances - sound_control__allowSound = true - managed_sound_control__entities |> push(eid) - managed_sound_control__positions |> push(pos) - return + var managed_sound_control__types : StringList&; + var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) - let raceAvoidTemporalDesyncFixDistMul = 1.1 - let distSq = length_sq((pos - listener) * raceAvoidTemporalDesyncFixDistMul) + assert(length(managed_sound_control__types) == length(managed_sound_control__beginPosEnd)) + assert(length(managed_sound_control__entities) == length(managed_sound_control__positions)) - var furthestIdx = -1 - var furthestDistSq = 0. + managed_sound__idx = find_index(managed_sound_control__types, managed_sound__type) + if managed_sound__idx == -1 + managed_sound__idx = length(managed_sound_control__types) - for i in range(length(managed_sound_control__entities)) - let otherPos = managed_sound_control__positions[i] - let otherDistSq = distance_sq(otherPos, listener) + let begin = length(managed_sound_control__entities) + let pos = begin + let end = begin + managed_sound__maxInstances - if otherDistSq > furthestDistSq && distSq < otherDistSq - furthestDistSq = otherDistSq; - furthestIdx = i + assert(managed_sound__maxInstances > 0) - if furthestIdx >= 0 - query(managed_sound_control__entities[furthestIdx]) <| $ [es] (var sound_control__allowSound : bool&; - var managed_sound__nextTimeToAllow : float&) - sound_control__allowSound = false - managed_sound__nextTimeToAllow = curTime + managed_sound_control__cooldown + push(managed_sound_control__beginPosEnd, int3(begin, pos, end)) + push(managed_sound_control__types, managed_sound__type) - sound_control__allowSound = true - managed_sound_control__entities[furthestIdx] = eid - managed_sound_control__positions[furthestIdx] = pos + resize(managed_sound_control__entities, end) + resize(managed_sound_control__positions, end) else - sound_control__allowSound = false + let maxInstances = managed_sound_control__beginPosEnd[managed_sound__idx].z - managed_sound_control__beginPosEnd[managed_sound__idx].x + if managed_sound__maxInstances != maxInstances + logerr("different new maxInstances({managed_sound__maxInstances} vs existing {maxInstances}) for same managed_sound__type='{managed_sound__type}'") + + +def update_managed_sound_control(managed_sound_control__cooldown : float; + var managed_sound_control__beginPosEnd : IPoint3List&; + var managed_sound_control__entities : EidList&; + var managed_sound_control__positions : Point3List&) -def remove_managed_sound(eid : EntityId) - query() <| $ [es] (var managed_sound_control__entities : EidList&; - var managed_sound_control__positions : Point3List&) - let idx = find_index(managed_sound_control__entities, eid) + let listener = get_listener_pos() + let curTime = get_sync_time() + + query() <| $ [es] (eid : EntityId; + managed_sound__idx : int; + managed_sound__nextTimeToAllow : float; + sound_control__inRange : bool; + var sound_control__allowSound : bool&; + transform : float3x4; + isAlive : bool = true) + if managed_sound__idx == -1 + sound_control__allowSound = false + return + if !sound_control__inRange || !isAlive + remove_managed_sound(eid, managed_sound__idx) + sound_control__allowSound = false + return + + let beginPosEnd = managed_sound_control__beginPosEnd[managed_sound__idx] + assume begin = beginPosEnd.x + assume pos = beginPosEnd.y + assume end = beginPosEnd.z + + let idx = find_index(eid, managed_sound_control__entities, begin, end) if idx >= 0 - managed_sound_control__entities |> erase(idx) - managed_sound_control__positions |> erase(idx) + managed_sound_control__positions[idx] = transform[3] + sound_control__allowSound = true + return + + if curTime < managed_sound__nextTimeToAllow + return + + if pos < end + sound_control__allowSound = true + managed_sound_control__entities[pos] = eid + managed_sound_control__positions[pos] = transform[3] + ++managed_sound_control__beginPosEnd[managed_sound__idx].y + return + + let raceAvoidTemporalDesyncFixDistMul = 1.1 + let distSq = length_sq((transform[3] - listener) * raceAvoidTemporalDesyncFixDistMul) + + var furthestIdx = -1 + var furthestDistSq = 0. + + for i in range(begin, pos) + let otherPos = managed_sound_control__positions[i] + let otherDistSq = distance_sq(otherPos, listener) + if otherDistSq > furthestDistSq && distSq < otherDistSq + furthestDistSq = otherDistSq; + furthestIdx = i + + if furthestIdx >= 0 + query(managed_sound_control__entities[furthestIdx]) <| $ [es] (var sound_control__allowSound : bool&; + var managed_sound__nextTimeToAllow : float&) + managed_sound__nextTimeToAllow = curTime + managed_sound_control__cooldown + sound_control__allowSound = false + + managed_sound_control__entities[furthestIdx] = eid + managed_sound_control__positions[furthestIdx] = transform[3] + sound_control__allowSound = true + else + sound_control__allowSound = false diff --git a/prog/daNetGameLibs/sound/sound_utils/templates/sound_utils.template.blk b/prog/daNetGameLibs/sound/sound_utils/templates/sound_utils.template.blk index b39175f42..f2fb1f305 100644 --- a/prog/daNetGameLibs/sound/sound_utils/templates/sound_utils.template.blk +++ b/prog/daNetGameLibs/sound/sound_utils/templates/sound_utils.template.blk @@ -92,60 +92,59 @@ sound_control_disable_timer{ } } -base_managed_sound_control{ +managed_sound_control{ _use:t="replicating" + _singleton:b=yes _group{ _tags:t="sound" + "managed_sound_control__beginPosEnd:list"{} + "managed_sound_control__types:list"{} + "managed_sound_control__entities:list"{} "managed_sound_control__positions:list"{} + + // setup + managed_sound_control__cooldown:r=1 } - // setup - managed_sound_control__maxInstances:i=3 - managed_sound_control__cooldown:r=1 } base_managed_sound{ _group{ _tags:t="sound" + managed_sound__idx:i=-1 managed_sound__nextTimeToAllow:r=0 + // setup + managed_sound__maxInstances:i=4 + managed_sound__type:t="" } _group{ _tags:t="sound" sound_control__allowSound:b=no // disabled on appeared - "managedSound:tag"{} } } -vehicle_managed_sound_control{ - _use:t="base_managed_sound_control" - "vehicleManageSoundControl:tag"{_tags:t="sound";} - _singleton:b=yes -} -sfx_managed_sound_control{ - _use:t="base_managed_sound_control" - "sfxManageSoundControl:tag"{_tags:t="sound";} - _singleton:b=yes -} - -vehicle_managed_sound{ - _use:t="base_managed_sound" - "vehicleManageSoundControl:tag"{_tags:t="sound";} -} sfx_managed_sound{ _use:t="base_managed_sound" - "sfxManageSoundControl:tag"{_tags:t="sound";} + _group{ + _tags:t="sound" + managed_sound__type:t="sfx" + } } test_managed_sound{ _use:t="sound_effect" _use:t="moveable_sound_effect" - _use:t="sfx_managed_sound" + _use:t="base_managed_sound" transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [0, 0, 0]] _group{ _tags:t="sound" sound_effect__path:t="env_effects/fire/fire_mid" } + _group{ + _tags:t="sound" + managed_sound__type:t="test" + } } sound_destroy_timer{ diff --git a/prog/daNetGameLibs/sound/sound_utils_net/modules/sound_utils_net_events.das b/prog/daNetGameLibs/sound/sound_utils_net/modules/sound_utils_net_events.das index 8c2396f38..7bb51aa90 100644 --- a/prog/daNetGameLibs/sound/sound_utils_net/modules/sound_utils_net_events.das +++ b/prog/daNetGameLibs/sound/sound_utils_net/modules/sound_utils_net_events.das @@ -14,7 +14,7 @@ struct CmdPlayNetSoundPos time : float [event(unicast, routing=ROUTING_SERVER_TO_CLIENT)] -struct CmdPlayNetSoundFromAnySource +struct CmdPlaySceneNetSound hash : uint time : float diff --git a/prog/daNetGameLibs/sound/sound_utils_net/templates/sound_utils_net.template.blk b/prog/daNetGameLibs/sound/sound_utils_net/templates/sound_utils_net.template.blk index 5bc84dd1d..6d37a4958 100644 --- a/prog/daNetGameLibs/sound/sound_utils_net/templates/sound_utils_net.template.blk +++ b/prog/daNetGameLibs/sound/sound_utils_net/templates/sound_utils_net.template.blk @@ -2,12 +2,12 @@ net_sound_descs{ "net_sound__descs:shared:object"{} } -any_source_net_sound_descs{ +scene_net_sound_descs{ _use:t="net_sound_descs" - "anySourceNetSounds:tag" {} + "sceneNetSounds:tag" {} } -any_source_net_sounds{ - _use:t="any_source_net_sound_descs" +scene_net_sounds{ + _use:t="scene_net_sound_descs" _use:t="replicating" } diff --git a/prog/dagorInclude/3d/dag_multidrawInfo.h b/prog/dagorInclude/3d/dag_multidrawInfo.h index 7dda8f172..0c3d6148e 100644 --- a/prog/dagorInclude/3d/dag_multidrawInfo.h +++ b/prog/dagorInclude/3d/dag_multidrawInfo.h @@ -5,6 +5,7 @@ #pragma once #include +#include /** * @brief Extended draw call arguments structure. diff --git a/prog/dagorInclude/3d/dag_picMgr.h b/prog/dagorInclude/3d/dag_picMgr.h index 4c55f2ff2..d27bf1de3 100644 --- a/prog/dagorInclude/3d/dag_picMgr.h +++ b/prog/dagorInclude/3d/dag_picMgr.h @@ -46,8 +46,9 @@ void after_d3d_reset(); // load completion from cpujobs::release_done_jobs()) // return true if request was synchronously done (or picture already loaded) // and false otherwise (i.e. it was successfully sheduled) -bool get_picture_ex(const char *file_name, PICTUREID &out_pic_id, TEXTUREID &out_tex_id, Point2 *out_tc_lefttop = NULL, - Point2 *out_tc_rightbottom = NULL, Point2 *picture_size = NULL, async_load_done_cb_t load_done_cb = NULL, void *cb_arg = NULL); +bool get_picture_ex(const char *file_name, PICTUREID &out_pic_id, TEXTUREID &out_tex_id, d3d::SamplerHandle &out_smp_id, + Point2 *out_tc_lefttop = NULL, Point2 *out_tc_rightbottom = NULL, Point2 *picture_size = NULL, + async_load_done_cb_t load_done_cb = NULL, void *cb_arg = NULL); // add ref, fill picture description void get_picture(const char *file_name, PicDesc &out_pic); @@ -108,11 +109,12 @@ struct PictureManager::PicDesc // Picture and texture IDs PICTUREID pic; TEXTUREID tex; + d3d::SamplerHandle smp; // left-top and right-bottom texture coords Point2 tcLt, tcRb; - PicDesc() : pic(BAD_PICTUREID), tex(BAD_TEXTUREID), tcLt(0, 0), tcRb(0, 0) {} - PicDesc(const PicDesc &picture) : pic(picture.pic), tex(picture.tex), tcLt(picture.tcLt), tcRb(picture.tcRb) + PicDesc() : pic(BAD_PICTUREID), tex(BAD_TEXTUREID), smp(d3d::INVALID_SAMPLER_HANDLE), tcLt(0, 0), tcRb(0, 0) {} + PicDesc(const PicDesc &picture) : pic(picture.pic), tex(picture.tex), smp(picture.smp), tcLt(picture.tcLt), tcRb(picture.tcRb) { if (pic > BAD_PICTUREID) PictureManager::add_ref_picture(pic); @@ -125,6 +127,7 @@ struct PictureManager::PicDesc release(); pic = picture.pic; tex = picture.tex; + smp = picture.smp; tcLt = picture.tcLt; tcRb = picture.tcRb; if (pic > BAD_PICTUREID) @@ -144,6 +147,7 @@ struct PictureManager::PicDesc PictureManager::free_picture(pic); pic = BAD_PICTUREID; tex = BAD_TEXTUREID; + smp = d3d::INVALID_SAMPLER_HANDLE; } inline Point2 getSize() const { return get_picture_pix_size(pic); } diff --git a/prog/dagorInclude/anim/dag_animBlendCtrl.h b/prog/dagorInclude/anim/dag_animBlendCtrl.h index d8a1c8a9f..b01bb3729 100644 --- a/prog/dagorInclude/anim/dag_animBlendCtrl.h +++ b/prog/dagorInclude/anim/dag_animBlendCtrl.h @@ -222,7 +222,7 @@ class AnimBlendCtrl_ParametricSwitcher : public IAnimBlendNode } // creation-time routines - void addBlendNode(IAnimBlendNode *n, real range0, real range1, real bval, AnimationGraph &graph, const char *param_name); + void addBlendNode(IAnimBlendNode *n, real range0, real range1, real bval, AnimationGraph &graph, const char *ctrl_name); // run-time routines int getAnimForRange(real range); @@ -418,7 +418,7 @@ class AnimBlendCtrl_LinearPoly : public IAnimBlendNode virtual int getTimeScaleParamId(IPureAnimStateHolder &st) { return poly.size() ? poly[0].node->getTimeScaleParamId(st) : -1; } // creation-time routines - void addBlendNode(IAnimBlendNode *n, real p0, AnimationGraph &graph, const char *ctrl_name, const char *param_name); + void addBlendNode(IAnimBlendNode *n, real p0, AnimationGraph &graph, const char *ctrl_name); const char *class_name() const override { return "AnimBlendCtrl_LinearPoly"; } virtual bool isSubOf(DClassID id) { return id == AnimBlendCtrl_LinearPolyCID || IAnimBlendNode::isSubOf(id); } diff --git a/prog/dagorInclude/drv/3d/dag_interface_table.h b/prog/dagorInclude/drv/3d/dag_interface_table.h index 0c6ba027b..e850af530 100644 --- a/prog/dagorInclude/drv/3d/dag_interface_table.h +++ b/prog/dagorInclude/drv/3d/dag_interface_table.h @@ -180,12 +180,12 @@ struct D3dInterfaceTable bool (*set_depth_0)(BaseTexture *, DepthAccess); bool (*set_depth_1)(BaseTexture *tex, int layer, DepthAccess); bool (*set_render_target_0)(); - bool (*set_render_target_1)(int rt_index, BaseTexture *, int level); - bool (*set_render_target_2)(int rt_index, BaseTexture *, int fc, int level); + bool (*set_render_target_1)(int rt_index, BaseTexture *, uint8_t level); + bool (*set_render_target_2)(int rt_index, BaseTexture *, int fc, uint8_t level); bool (*set_render_target_3)(const Driver3dRenderTarget &rt); void (*get_render_target)(Driver3dRenderTarget &out_rt); bool (*get_target_size)(int &w, int &h); - bool (*get_render_target_size)(int &w, int &h, BaseTexture *rt_tex, int lev); + bool (*get_render_target_size)(int &w, int &h, BaseTexture *rt_tex, uint8_t level); void (*set_variable_rate_shading)(unsigned rate_x, unsigned rate_y, VariableRateShadingCombiner vertex_combiner, VariableRateShadingCombiner pixel_combiner); void (*set_variable_rate_shading_texture)(BaseTexture *rate_texture); diff --git a/prog/dagorInclude/drv/3d/dag_renderTarget.h b/prog/dagorInclude/drv/3d/dag_renderTarget.h index 4008aaef7..fa45d4094 100644 --- a/prog/dagorInclude/drv/3d/dag_renderTarget.h +++ b/prog/dagorInclude/drv/3d/dag_renderTarget.h @@ -99,7 +99,7 @@ bool set_depth(BaseTexture *tex, int layer, DepthAccess access); * @param level The level of the render target. * @return True if the render target was set successfully, false otherwise. */ -bool set_render_target(int rt_index, BaseTexture *, int fc, int level); +bool set_render_target(int rt_index, BaseTexture *, int fc, uint8_t level); /** * @brief Sets the render target for rendering. @@ -112,7 +112,7 @@ bool set_render_target(int rt_index, BaseTexture *, int fc, int level); * @param level The level of the render target. * @return True if the render target was set successfully, false otherwise. */ -bool set_render_target(int rt_index, BaseTexture *, int level); +bool set_render_target(int rt_index, BaseTexture *, uint8_t level); /** * @brief Sets the render target for rendering. All other render targets will be set to nullptr. @@ -124,7 +124,7 @@ bool set_render_target(int rt_index, BaseTexture *, int level); * @param level The level of the render target. * @return True if the render target was set successfully, false otherwise. */ -inline bool set_render_target(BaseTexture *t, int level) { return set_render_target() && set_render_target(0, t, level); } +inline bool set_render_target(BaseTexture *t, uint8_t level) { return set_render_target() && set_render_target(0, t, level); } /** * @brief Sets the render target for rendering. All other render targets will be set to nullptr. @@ -138,7 +138,10 @@ inline bool set_render_target(BaseTexture *t, int level) { return set_render_tar * @param level The level of the render target. * @return True if the render target was set successfully, false otherwise. */ -inline bool set_render_target(BaseTexture *t, int fc, int level) { return set_render_target() && set_render_target(0, t, fc, level); } +inline bool set_render_target(BaseTexture *t, int fc, uint8_t level) +{ + return set_render_target() && set_render_target(0, t, fc, level); +} /** * @brief Sets the render target for rendering. All other render targets will be set to nullptr. @@ -208,10 +211,10 @@ bool get_target_size(int &w, int &h); * @param w The width of the render target texture. * @param h The height of the render target texture. * @param rt_tex The render target texture. If nullptr, the size of the backbuffer will be written to w and h. - * @param lev The level of the render target texture. + * @param level The level of the render target texture. * @return true if the operation was successful, false otherwise. */ -bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev = 0); +bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level = 0); /// clear all view /** @@ -265,17 +268,17 @@ inline bool clear_rt(const RenderTarget &rt, const ResourceClearValue &clear_val inline bool set_render_target() { return d3di.set_render_target(); } inline bool set_depth(BaseTexture *tex, DepthAccess access) { return d3di.set_depth(tex, access); } inline bool set_depth(BaseTexture *tex, int layer, DepthAccess access) { return d3di.set_depth(tex, layer, access); } -inline bool set_render_target(int rt_index, BaseTexture *t, int fc, int level) +inline bool set_render_target(int rt_index, BaseTexture *t, int fc, uint8_t level) { return d3di.set_render_target(rt_index, t, fc, level); } -inline bool set_render_target(int rt_index, BaseTexture *t, int level) { return d3di.set_render_target(rt_index, t, level); } +inline bool set_render_target(int rt_index, BaseTexture *t, uint8_t level) { return d3di.set_render_target(rt_index, t, level); } inline void get_render_target(Driver3dRenderTarget &out_rt) { return d3di.get_render_target(out_rt); } inline bool set_render_target(const Driver3dRenderTarget &rt) { return d3di.set_render_target(rt); } inline bool get_target_size(int &w, int &h) { return d3di.get_target_size(w, h); } -inline bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +inline bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { - return d3di.get_render_target_size(w, h, rt_tex, lev); + return d3di.get_render_target_size(w, h, rt_tex, level); } inline bool clearview(int what, E3DCOLOR c, float z, uint32_t stencil) { return d3di.clearview(what, c, z, stencil); } inline void get_screen_size(int &w, int &h) { d3di.get_screen_size(w, h); } diff --git a/prog/dagorInclude/gui/dag_imguiUtil.h b/prog/dagorInclude/gui/dag_imguiUtil.h index 34466ca3c..42f3974ea 100644 --- a/prog/dagorInclude/gui/dag_imguiUtil.h +++ b/prog/dagorInclude/gui/dag_imguiUtil.h @@ -9,6 +9,7 @@ #include #include #include +#include class DataBlock; class BaseTexture; @@ -72,5 +73,6 @@ inline void EnumCombo(const char *name, T first, T last, T &value, const char *( void Image(const TEXTUREID &id, Texture *texture, const ImVec2 &uv0 = ImVec2(0, 0), const ImVec2 &uv1 = ImVec2(1, 1)); void Image(const TEXTUREID &id, float aspect, const ImVec2 &uv0 = ImVec2(0, 0), const ImVec2 &uv1 = ImVec2(1, 1)); +void Sampler(d3d::SamplerHandle smp); } // namespace ImGuiDagor \ No newline at end of file diff --git a/prog/dagorInclude/gui/dag_stdGuiRender.h b/prog/dagorInclude/gui/dag_stdGuiRender.h index 73987a6bc..8633e1d82 100644 --- a/prog/dagorInclude/gui/dag_stdGuiRender.h +++ b/prog/dagorInclude/gui/dag_stdGuiRender.h @@ -942,12 +942,13 @@ class GuiContext // separate prepare/render text as quads // //! render scaled text to buffer (fill quad vertices and tex/quad count pairs); returns false if some glyphs to be yet rasterized - bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const wchar_t *str, int len = -1); - bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const char *str, int len = -1); + bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const wchar_t *str, int len = -1); + bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const char *str, int len = -1); //! render buffer (previously filled with draw_str_scaled_u_buf) - void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, unsigned dsb_flags); + void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, dag::ConstSpan smp, + unsigned dsb_flags); //! render text string with scale=1 @@ -1384,17 +1385,18 @@ inline void purge_inscription(uint32_t inscr_handle) { GuiContext::purge_inscrip inline bool is_inscription_ready(uint32_t inscr_handle) { return GuiContext::is_inscription_ready(inscr_handle); } //! render scaled text to buffer (fill quad vertices and tex/quad count pairs); returns false if some glyphs shall be yet rasterized -bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const wchar_t *str, int len = -1); -bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const char *str, int len = -1); +bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const wchar_t *str, int len = -1); +bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const char *str, int len = -1); //! checks whether quad cache buffers (previously filled with draw_str_scaled_u_buf) is valid and up-to-date inline bool check_str_buf_ready(dag::ConstSpan tex_qcnt) { return tex_qcnt.size() > 0 && tex_qcnt[0] == dyn_font_atlas_reset_generation; } //! render buffer (previously filled with draw_str_scaled_u_buf) -void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, unsigned dsb_flags); +void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, dag::ConstSpan smp, + unsigned dsb_flags); //! render text string with scale=1 static inline void draw_str(const char *str, int len = -1) { draw_str_scaled(1.0f, str, len); } diff --git a/prog/dagorInclude/ioSys/dag_dataBlock.h b/prog/dagorInclude/ioSys/dag_dataBlock.h index f7e087f7e..5ae370030 100644 --- a/prog/dagorInclude/ioSys/dag_dataBlock.h +++ b/prog/dagorInclude/ioSys/dag_dataBlock.h @@ -857,6 +857,11 @@ KRNLIMP int discard_unused_blk_ddict(); //! returns ZSTD encoder dictionary for specified vromfs created with zstd_create_cdict (to be released with zstd_destroy_cdict) KRNLIMP ZSTD_CDict_s *create_vromfs_blk_cdict(const VirtualRomFsData *fs, int compr_level); +//! ZSTD-packs a binary stream as if it contained a datablock dump +KRNLIMP void pack_shared_nm_dump_to_stream(IGenSave &cwr, IGenLoad &crd, int sz, int compr_level, const ZSTD_CDict_s *cdict); +//! same but with the default (internally defined) compression level +KRNLIMP void pack_shared_nm_dump_to_stream(IGenSave &cwr, IGenLoad &crd, int sz, const ZSTD_CDict_s *cdict); + template static inline void iterate_child_blocks(const DataBlock &db, Cb cb); template diff --git a/prog/dagorInclude/osApiWrappers/dag_lockProfiler.h b/prog/dagorInclude/osApiWrappers/dag_lockProfiler.h index 2096a5c08..65063e41c 100644 --- a/prog/dagorInclude/osApiWrappers/dag_lockProfiler.h +++ b/prog/dagorInclude/osApiWrappers/dag_lockProfiler.h @@ -10,7 +10,6 @@ typedef uint64_t lock_start_t; #if DA_PROFILER_ENABLED && DAGOR_DBGLEVEL > 0 // for performance reasons, none of wait profiling is enabled in release builds #define LOCK_PROFILER_ENABLED 1 - #if _TARGET_ANDROID | _TARGET_IOS static constexpr unsigned DEFAULT_LOCK_PROFILER_USEC_THRESHOLD = 4; #else @@ -56,13 +55,14 @@ struct ScopeLockProfiler }; #else #define LOCK_PROFILER_ENABLED 0 -template +static constexpr unsigned DEFAULT_LOCK_PROFILER_USEC_THRESHOLD = 0; +template struct ScopeLockProfiler { ScopeLockProfiler() = default; ScopeLockProfiler(da_profiler::desc_id_t) {} }; -__forceinline lock_start_t dagor_lock_profiler_start() { return 0; } -__forceinline void dagor_lock_profiler_interval(lock_start_t, da_profiler::desc_id_t, uint32_t = 1) {} -__forceinline void dagor_lock_profiler_stop(lock_start_t, da_profiler::desc_id_t, uint32_t = 1) {} +inline lock_start_t dagor_lock_profiler_start() { return 0; } +inline void dagor_lock_profiler_interval(lock_start_t, da_profiler::desc_id_t, uint32_t = DEFAULT_LOCK_PROFILER_USEC_THRESHOLD) {} +inline void dagor_lock_profiler_stop(lock_start_t, da_profiler::desc_id_t, uint32_t = DEFAULT_LOCK_PROFILER_USEC_THRESHOLD) {} #endif diff --git a/prog/dagorInclude/osApiWrappers/dag_miscApi.h b/prog/dagorInclude/osApiWrappers/dag_miscApi.h index 1faf030cb..344dd78ee 100644 --- a/prog/dagorInclude/osApiWrappers/dag_miscApi.h +++ b/prog/dagorInclude/osApiWrappers/dag_miscApi.h @@ -191,14 +191,14 @@ KRNLIMP ConsoleModel get_console_model(); KRNLIMP const char *get_console_model_revision(ConsoleModel model); template -__forceinline void spin_wait_no_profile(F keep_waiting_cb) +__forceinline void spin_wait_no_profile(F keep_waiting_cb, int init_spins = SPINS_BEFORE_SLEEP) { - int spinsLeftBeforeSleep = SPINS_BEFORE_SLEEP; + int spinsLeftBeforeSleep = init_spins; while (keep_waiting_cb()) { if (--spinsLeftBeforeSleep > 0) cpu_yield(); - else if (spinsLeftBeforeSleep > -SPINS_BEFORE_SLEEP / 8) + else if (spinsLeftBeforeSleep > -(init_spins / 8)) sleep_usec(0); else { @@ -209,11 +209,15 @@ __forceinline void spin_wait_no_profile(F keep_waiting_cb) } template -inline void spin_wait(F keep_waiting_cb, uint32_t token = da_profiler::DescSleep, uint32_t threshold_us = 1) +inline void spin_wait(F keep_waiting_cb, int spins = SPINS_BEFORE_SLEEP, uint32_t token = da_profiler::DescSleep, + uint32_t threshold_us = DEFAULT_LOCK_PROFILER_USEC_THRESHOLD) { - lock_start_t reft = dagor_lock_profiler_start(); - spin_wait_no_profile(keep_waiting_cb); - dagor_lock_profiler_stop(reft, token, threshold_us); + if (!LOCK_PROFILER_ENABLED || keep_waiting_cb()) //-V547 + { + lock_start_t reft = dagor_lock_profiler_start(); + spin_wait_no_profile(keep_waiting_cb, spins); + dagor_lock_profiler_stop(reft, token, threshold_us); + } } #include diff --git a/prog/dagorInclude/osApiWrappers/dag_vromfs.h b/prog/dagorInclude/osApiWrappers/dag_vromfs.h index c28fd7b9d..20f0011d2 100644 --- a/prog/dagorInclude/osApiWrappers/dag_vromfs.h +++ b/prog/dagorInclude/osApiWrappers/dag_vromfs.h @@ -34,6 +34,20 @@ struct VirtualRomFsDataHdr bool signedContents() const { return (hw32 & 0x80000000U) != 0; } }; +enum EVirtualRomFsExtFlags : uint16_t +{ + EVFSEF_SIGN_PLAIN_DATA = 0x0001, + EVFSEF_HAVE_FILE_ATTRIBUTES = 0x0002 +}; + +enum EVirtualRomFsFileAttributes : uint8_t +{ + EVFSFA_TYPE_PLAIN = 0x00, + EVFSFA_TYPE_BLK = 0x01, + EVFSFA_TYPE_SHARED_NM = 0x02, + EVFSFA_TYPE_MASK = 0x03 +}; + struct VirtualRomFsExtHdr { uint16_t size = 0, flags = 0; diff --git a/prog/dagorInclude/scene/dag_tiledScene.h b/prog/dagorInclude/scene/dag_tiledScene.h index 4bea04270..4684bef24 100644 --- a/prog/dagorInclude/scene/dag_tiledScene.h +++ b/prog/dagorInclude/scene/dag_tiledScene.h @@ -844,23 +844,29 @@ struct scene::TiledSceneCullContext vec3f plane47X, plane47Y, plane47Z, plane47W; uint32_t test_flags; uint32_t equal_flags; - std::atomic tilesPassDone; // flag, set to 1 when code finishes pushing to tiles - std::atomic nextIdxToProcess; // index in tiles to be processed + std::atomic tilesPassDone{0u}; // flag, set to 1 when code finishes pushing to tiles int *tilesPtr = nullptr; - std::atomic tilesCount{0}; - uint32_t tilesMax : 30, use_dist : 1, needToUnlock : 1; - - TiledSceneCullContext() //-V730 - { - tilesPassDone.store(0); - nextIdxToProcess.store(0); - needToUnlock = 0; - } + uint32_t &totalTilesCount; + std::atomic tilesCount{0u}; + uint32_t tilesMax = 0; + bool use_dist = false; + bool needToUnlock = false; + uint16_t wakeUpOnNTiles = USHRT_MAX; + void *wake_up_ctx = nullptr; + void (*wake_up_cb)(void *) = [](void *) {}; + mutable std::atomic nextIdxToProcess{0u}; // index in tiles to be processed + + TiledSceneCullContext(uint32_t &ttc) : totalTilesCount(ttc) {} //-V730 ~TiledSceneCullContext() { - tilesMax = tilesCount = 0; - framemem_ptr()->free(tilesPtr); G_ASSERT(!needToUnlock); + framemem_ptr()->free(tilesPtr); + } + + void done() + { + G_ASSERTF(tilesCount <= tilesMax, "max=%d count=%d", tilesMax, tilesCount.load()); + tilesPassDone.store(1); } }; @@ -873,22 +879,26 @@ void scene::TiledScene::frustumCullTilesPass(mat44f_cref globtm, vec4f pos_dists G_ASSERT_RETURN(occlusion, ); } if (!getNodesAliveCount()) - { - octx.tilesPassDone.store(1); - return; - } + return octx.done(); G_ASSERT(debugIsReadingAllowed()); octx.test_flags = test_flags << 16; octx.equal_flags = equal_flags << 16; + const auto wakeOn = octx.wakeUpOnNTiles; + uint32_t &totalTilesCount = octx.totalTilesCount; + auto addTile = [&](int ti) { + octx.tilesPtr[octx.tilesCount.load(std::memory_order_relaxed)] = ti; + octx.tilesCount++; + if (DAGOR_UNLIKELY(++totalTilesCount == wakeOn)) + octx.wake_up_cb(octx.wake_up_ctx); + }; if (tileCull.size() <= 1) { octx.tilesPtr = (int *)framemem_ptr()->alloc(sizeof(int)); octx.tilesMax = 1; - octx.tilesPtr[0] = OUTER_TILE_INDEX - 1; - octx.tilesCount = 1; - octx.tilesPassDone.store(1); + addTile(OUTER_TILE_INDEX - 1); + octx.done(); return; } @@ -925,8 +935,7 @@ void scene::TiledScene::frustumCullTilesPass(mat44f_cref globtm, vec4f pos_dists { if (isEmptyTileMemory(tileBox.data()[i])) continue; - octx.tilesPtr[octx.tilesCount] = i; - octx.tilesCount++; + addTile(i); } } else @@ -939,17 +948,12 @@ void scene::TiledScene::frustumCullTilesPass(mat44f_cref globtm, vec4f pos_dists continue; G_FAST_ASSERT(tileIndex < tileCull.size()); G_FAST_ASSERT(!isEmptyTileMemory(tileBox.data()[tileIndex])); - octx.tilesPtr[octx.tilesCount] = tileIndex; - octx.tilesCount++; + addTile(tileIndex); } if (!isEmptyTileMemory(tileBox.data()[OUTER_TILE_INDEX])) - { - octx.tilesPtr[octx.tilesCount] = OUTER_TILE_INDEX; - octx.tilesCount++; - } + addTile(OUTER_TILE_INDEX); } - G_ASSERTF(octx.tilesCount <= octx.tilesMax, "max=%d count=%d", octx.tilesMax, octx.tilesCount.load()); - octx.tilesPassDone.store(1); + octx.done(); } template diff --git a/prog/dagorInclude/shaders/dag_shaders.h b/prog/dagorInclude/shaders/dag_shaders.h index f3ba3ba1f..aab1eed44 100644 --- a/prog/dagorInclude/shaders/dag_shaders.h +++ b/prog/dagorInclude/shaders/dag_shaders.h @@ -160,6 +160,7 @@ class ShaderElement : public DObject virtual bool setReqTexLevel(int req_level = 15) const = 0; + virtual bool checkAndPrefetchMissingTextures() const = 0; //! invalidates internal cached state block (to force block re-apply and d3d program update) static void invalidate_cached_state_block(); }; diff --git a/prog/engine/anim/animBlendCtrl.cpp b/prog/engine/anim/animBlendCtrl.cpp index 10cc8d32e..ddd4fbdb0 100644 --- a/prog/engine/anim/animBlendCtrl.cpp +++ b/prog/engine/anim/animBlendCtrl.cpp @@ -967,8 +967,7 @@ void AnimBlendCtrl_LinearPoly::buildBlendingList(BlendCtx &bctx, real w) else poly[wishPt].applyWt(bctx, 1.0f, w); } -void AnimBlendCtrl_LinearPoly::addBlendNode(IAnimBlendNode *n, real p0, AnimationGraph &graph, const char *ctrl_name, - const char *param_name) +void AnimBlendCtrl_LinearPoly::addBlendNode(IAnimBlendNode *n, real p0, AnimationGraph &graph, const char *ctrl_name) { int l = append_items(poly, 1); if (l < 0) @@ -979,7 +978,7 @@ void AnimBlendCtrl_LinearPoly::addBlendNode(IAnimBlendNode *n, real p0, Animatio poly[l].wtPid = graph.addParamId(String(128, ":lp_wt_%s%d", ctrl_name, l), IPureAnimStateHolder::PT_ScalarParam); if (l % 32 == 0) // We just exceeded our 32 bit limit in the last bitmap - add_rewind_bitmap(rewindBitmapParamsIds, graph, param_name); + add_rewind_bitmap(rewindBitmapParamsIds, graph, ctrl_name); } @@ -1638,7 +1637,7 @@ bool AnimBlendCtrl_ParametricSwitcher::isAliasOf(IPureAnimStateHolder &st, IAnim // creation-time routines void AnimBlendCtrl_ParametricSwitcher::addBlendNode(IAnimBlendNode *n, real range0, real range1, real bval, AnimationGraph &graph, - const char *param_name) + const char *ctrl_name) { int l = append_items(list, 1); list[l].node = n; @@ -1647,7 +1646,7 @@ void AnimBlendCtrl_ParametricSwitcher::addBlendNode(IAnimBlendNode *n, real rang list[l].baseVal = bval; if (l % 32 == 0) // We just exceeded our 32 bit limit in the last bitmap - add_rewind_bitmap(rewindBitmapParamsIds, graph, param_name); + add_rewind_bitmap(rewindBitmapParamsIds, graph, ctrl_name); } int AnimBlendCtrl_ParametricSwitcher::getAnimForRange(real range) diff --git a/prog/engine/anim/animGraph.cpp b/prog/engine/anim/animGraph.cpp index 02f9db90f..c62172365 100644 --- a/prog/engine/anim/animGraph.cpp +++ b/prog/engine/anim/animGraph.cpp @@ -2316,7 +2316,7 @@ void AnimBlendCtrl_LinearPoly::createNode(AnimationGraph &graph, const DataBlock ANIM_ERR("blend node <%s> (suffix=%s) not found!", nm, nm_suffix); return; } - node->addBlendNode(n, cblk->getReal("val", 0), graph, name, var_name); + node->addBlendNode(n, cblk->getReal("val", 0), graph, name); } graph.registerBlendNode(node, name, nm_suffix); } @@ -2436,7 +2436,7 @@ void AnimBlendCtrl_ParametricSwitcher::createNode(AnimationGraph &graph, const D r1 = eval + 0.1f; } } - node->addBlendNode(n, min(r0, r1), max(r1, r0), bv, graph, var_name); + node->addBlendNode(n, min(r0, r1), max(r1, r0), bv, graph, name); if (n->isSubOf(AnimBlendNodeSingleLeafCID)) has_single = true; } diff --git a/prog/engine/drv/drv3d_DX11/basetex.cpp b/prog/engine/drv/drv3d_DX11/basetex.cpp index 2ad209fbb..f6adeabe7 100644 --- a/prog/engine/drv/drv3d_DX11/basetex.cpp +++ b/prog/engine/drv/drv3d_DX11/basetex.cpp @@ -1000,6 +1000,7 @@ BaseTexture *BaseTex::makeTmpTexResCopy(int w, int h, int d, int l, bool staging if (!staging_tex) clonedTex->tidXored = tidXored, clonedTex->stubTexIdx = stubTexIdx; + clonedTex->key = key; set_tex_params(clonedTex, w, h, d, clonedTex->cflg, l, String::mk_str_cat(staging_tex ? "stg:" : "tmp:", getTexName())); clonedTex->preallocBeforeLoad = clonedTex->delayedCreate = true; @@ -1026,16 +1027,8 @@ void BaseTex::replaceTexResObject(BaseTexture *&other_tex) eastl::swap(width, other->width); eastl::swap(height, other->height); eastl::swap(depth, other->depth); - - uint32_t tmp32; // bitfields -#define SWAP_UINT32(X) \ - tmp32 = other->X; \ - other->X = X; \ - X = tmp32 - SWAP_UINT32(mipLevels); - SWAP_UINT32(minMipLevel); - SWAP_UINT32(maxMipLevel); -#undef SWAP_UINT32 + eastl::swap(mipLevels, other->mipLevels); + eastl::swap(key, other->key); // swap wasUsed flag wasUsed = other->wasUsed; diff --git a/prog/engine/drv/drv3d_DX11/driver.h b/prog/engine/drv/drv3d_DX11/driver.h index 272c5f26e..600169814 100644 --- a/prog/engine/drv/drv3d_DX11/driver.h +++ b/prog/engine/drv/drv3d_DX11/driver.h @@ -538,20 +538,6 @@ static void reset_frame_all() flush_states(rs); // depends on rendertargets } - -static void close_all() -{ - close_rendertargets(); - close_buffers(); - close_shaders(); - close_states(); - close_samplers(); - close_predicates(); - close_textures(); - close_frame_callbacks(); - reset_all_queries(); -} - DXGI_FORMAT dxgi_format_from_flags(uint32_t cflg); int dxgi_format_to_bpp(DXGI_FORMAT fmt); const char *dx11_error(HRESULT hr); diff --git a/prog/engine/drv/drv3d_DX11/drvmain.cpp b/prog/engine/drv/drv3d_DX11/drvmain.cpp index b49de3e53..69db552d1 100644 --- a/prog/engine/drv/drv3d_DX11/drvmain.cpp +++ b/prog/engine/drv/drv3d_DX11/drvmain.cpp @@ -189,7 +189,7 @@ void reset_all_queries() void print_memory_stat() { ComPtr adapter3; - if (SUCCEEDED(get_active_adapter(dx_device)->QueryInterface(COM_ARGS(&adapter3)))) + if (auto adptr = get_active_adapter(dx_device); adptr && SUCCEEDED(adptr->QueryInterface(COM_ARGS(&adapter3)))) { DXGI_QUERY_VIDEO_MEMORY_INFO info; if ((SUCCEEDED(adapter3->QueryVideoMemoryInfo(0, DXGI_MEMORY_SEGMENT_GROUP_LOCAL, &info)) && info.Budget > 0) || diff --git a/prog/engine/drv/drv3d_DX11/helpers.cpp b/prog/engine/drv/drv3d_DX11/helpers.cpp index eef5dd77e..3b2968357 100644 --- a/prog/engine/drv/drv3d_DX11/helpers.cpp +++ b/prog/engine/drv/drv3d_DX11/helpers.cpp @@ -5,6 +5,7 @@ IDXGIAdapter *get_active_adapter(ID3D11Device *dx_device) { + G_ASSERT_RETURN(dx_device, nullptr); IDXGIDevice *dxgiDevice = nullptr; IDXGIAdapter *dxgiAdapter = nullptr; HRESULT hr = dx_device->QueryInterface(__uuidof(IDXGIDevice), (void **)&dxgiDevice); diff --git a/prog/engine/drv/drv3d_DX11/init.cpp b/prog/engine/drv/drv3d_DX11/init.cpp index 426bd0775..44d66e0c1 100644 --- a/prog/engine/drv/drv3d_DX11/init.cpp +++ b/prog/engine/drv/drv3d_DX11/init.cpp @@ -1920,7 +1920,25 @@ bool init_device(Driver3dInitCallback *cb, HWND window_hwnd, int screen_wdt, int return SUCCEEDED(last_hres); } -void close_device(bool is_reset) +static void close_all(bool is_reset) +{ + close_rendertargets(); + close_buffers(); + close_shaders(); + close_states(); + close_samplers(); + close_predicates(); + close_textures(); + close_frame_callbacks(); + reset_all_queries(); + + if (is_reset) + print_memory_stat(); + + debug("%s", __FUNCTION__); +} + +static void close_device(bool is_reset) { nvlowlatency::close(); close_perf_analysis(); @@ -1930,7 +1948,7 @@ void close_device(bool is_reset) DEBUG_CTX("deleted backbuffer %p", ds.backBufferColorTex); del_d3dres(ds.backBufferColorTex); - debug("close_device"); + debug("%s", __FUNCTION__); if (!dx11_dllh) return; @@ -1939,10 +1957,7 @@ void close_device(bool is_reset) dx11_DXGIFactory->Release(); dx11_DXGIFactory = NULL; - close_all(); - print_memory_stat(); - - debug("closed_all"); + close_all(is_reset); if (amdDepthBoundsExtension != nullptr) { @@ -2104,7 +2119,9 @@ HRESULT drv3d_dx11::set_fullscreen_state(bool fullscreen) DEBUG_CTX("deleted backbuffer %p", g_driver_state.backBufferColorTex); // DXGI_SWAP_EFFECT_FLIP_DISCARD or DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL // MSDN: Before you call ResizeBuffers, ensure that the application releases all references. - del_d3dres(g_driver_state.backBufferColorTex); + // Note: Destroy via DA to reduce chances that some other render (perhaps splash) thread refs it + add_delayed_callback_buffered([](void *t) { destroy_d3dres((Texture *)t); }, g_driver_state.backBufferColorTex); + g_driver_state.backBufferColorTex = nullptr; { ContextAutoLock contextLock; diff --git a/prog/engine/drv/drv3d_DX11/rtarget.cpp b/prog/engine/drv/drv3d_DX11/rtarget.cpp index c80d1f418..125d39812 100644 --- a/prog/engine/drv/drv3d_DX11/rtarget.cpp +++ b/prog/engine/drv/drv3d_DX11/rtarget.cpp @@ -431,7 +431,7 @@ bool d3d::set_depth(BaseTexture *tex, int face, DepthAccess access) return true; } -bool d3d::set_render_target(int rt_index, BaseTexture *tex, int level) +bool d3d::set_render_target(int rt_index, BaseTexture *tex, uint8_t level) { if (tex) CHECK_MAIN_THREAD(); @@ -479,7 +479,7 @@ bool d3d::set_render_target(int rt_index, BaseTexture *tex, int level) return true; } -bool d3d::set_render_target(int rt_index, BaseTexture *tex, int fc, int level) +bool d3d::set_render_target(int rt_index, BaseTexture *tex, int fc, uint8_t level) { CHECK_MAIN_THREAD(); RenderState &rs = g_render_state; @@ -530,7 +530,7 @@ bool d3d::get_target_size(int &w, int &h) return get_render_state_target_size(w, h); } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { w = h = 0; @@ -553,9 +553,9 @@ bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) return false; } - G_ASSERT(lev < bt->mipLevels); - w = max(1, bt->width >> lev); - h = max(1, bt->height >> lev); + G_ASSERT(level < bt->mipLevels); + w = max(1, bt->width >> level); + h = max(1, bt->height >> level); return true; } diff --git a/prog/engine/drv/drv3d_DX11/states.cpp b/prog/engine/drv/drv3d_DX11/states.cpp index 850e44ba2..617cf326d 100644 --- a/prog/engine/drv/drv3d_DX11/states.cpp +++ b/prog/engine/drv/drv3d_DX11/states.cpp @@ -163,7 +163,7 @@ void flush_states(RenderState &rs) #if DAGOR_DBGLEVEL > 0 if (currentState->sourceShaderRenderState.forcedSampleCount > 0 && rs.nextRtState.isDepthUsed()) { - D3D_ERROR("Forced sample count is used when depth RT is set! FSC will be disabled"); + DAG_FATAL("Forced sample count is used when depth RT is set! FSC will be disabled"); shaders::RenderState fixedState = currentState->sourceShaderRenderState; fixedState.forcedSampleCount = 0; s = render_states.get(render_states.emplaceOne(shader_render_state_to_driver_render_state(fixedState)))->rasterState; diff --git a/prog/engine/drv/drv3d_DX12/bindless.cpp b/prog/engine/drv/drv3d_DX12/bindless.cpp index 778709506..5303fca79 100644 --- a/prog/engine/drv/drv3d_DX12/bindless.cpp +++ b/prog/engine/drv/drv3d_DX12/bindless.cpp @@ -14,7 +14,8 @@ using namespace drv3d_dx12; #define BINDLESS_REPORT(...) #endif -void frontend::BindlessManager::init(DeviceContext &ctx, SamplerDescriptorAndState default_bindless_sampler) +void frontend::BindlessManager::init(DeviceContext &ctx, SamplerDescriptorAndState default_bindless_sampler, + const NullResourceTable *null_resource_table) { // need to take the lock here to keep consistent ordering ScopedCommitLock ctxLock{ctx}; @@ -25,6 +26,8 @@ void frontend::BindlessManager::init(DeviceContext &ctx, SamplerDescriptorAndSta const uint32_t defaultSamplerBindlessIdx = 0; ctx.bindlessSetSamplerDescriptorNoLock(defaultSamplerBindlessIdx, default_bindless_sampler.sampler); + + nullResourceTable = null_resource_table; } uint32_t frontend::BindlessManager::registerSampler(Device &device, DeviceContext &ctx, BaseTex *texture) @@ -67,10 +70,9 @@ uint32_t frontend::BindlessManager::registerSampler(DeviceContext &ctx, SamplerD return newIndex; } -void frontend::BindlessManager::resetBufferReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE descriptor, - const NullResourceTable &null_table) +void frontend::BindlessManager::resetBufferReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE descriptor) { - const auto nullDescriptor = null_table.table[NullResourceTable::SRV_BUFFER]; + const auto nullDescriptor = nullResourceTable->table[NullResourceTable::SRV_BUFFER]; resetReferences(ctx, nullDescriptor, [descriptor](const BufferSlotUsage &info) { return info.descriptor == descriptor; }); } @@ -220,8 +222,7 @@ uint32_t res_type_to_null_resource_table_entry(int res_type) } } // namespace -void frontend::BindlessManager::updateBindlessTexture(DeviceContext &ctx, uint32_t index, BaseTex *texture, - const NullResourceTable &null_table) +void frontend::BindlessManager::updateBindlessTexture(DeviceContext &ctx, uint32_t index, BaseTex *texture) { // need to take the lock here to keep consistent ordering ScopedCommitLock ctxLock{ctx}; @@ -229,23 +230,25 @@ void frontend::BindlessManager::updateBindlessTexture(DeviceContext &ctx, uint32 checkBindlessRangeAllocatedNoLock(index, 1); - if (texture->isStub()) - texture = texture->getStubTex(); + auto textureRes = texture; + if (textureRes->isStub()) + textureRes = textureRes->getStubTex(); - if (!texture->getDeviceImage()) + if (!textureRes->getDeviceImage()) { state.resourceSlotInfo[index] = eastl::monostate{}; - ctx.bindlessSetResourceDescriptorNoLock(index, null_table.table[res_type_to_null_resource_table_entry(texture->restype())]); + ctx.bindlessSetResourceDescriptorNoLock(index, + nullResourceTable->table[res_type_to_null_resource_table_entry(textureRes->restype())]); logwarn("DX12: frontend::BindlessManager::updateBindlessTexture slot %u was updated to null descriptor (texture is not valid)", index); return; } - auto view = texture->getViewInfo(); - auto image = texture->getDeviceImage(); + auto view = textureRes->getViewInfo(); + auto image = textureRes->getDeviceImage(); TextureSlotUsage info; - info.texture = texture; + info.texture = texture; // I think, we need to keep reference to the resource from args here to have oportunity to update it later. info.image = image; info.view = view; @@ -304,13 +307,13 @@ frontend::BindlessManager::CheckTextureImagePairResultType frontend::BindlessMan return result; } -void frontend::BindlessManager::updateTextureReferencesNoLock(DeviceContext &ctx, BaseTex *tex, Image *old_image, Image *new_image, +void frontend::BindlessManager::updateTextureReferencesNoLock(DeviceContext &ctx, BaseTex *tex, Image *old_image, uint32_t search_offset, uint32_t change_max_count, bool ignore_previous_view) { const auto bot = state.resourceSlotInfo.beginOfStartingAt(search_offset); const auto eot = state.resourceSlotInfo.endOf(); - auto at = bot; - for (; change_max_count; --change_max_count, ++at) + const auto newImage = tex->getDeviceImage(); + for (auto at = bot; change_max_count; --change_max_count, ++at) { at = eastl::find_if(at, eot, [tex, old_image](const auto &info) { return tex == info.texture && old_image == info.image; }); if (eot == at) @@ -321,11 +324,11 @@ void frontend::BindlessManager::updateTextureReferencesNoLock(DeviceContext &ctx const auto index = eastl::distance(state.resourceSlotInfo.begin(), at.asUntyped()); const auto adjustedPreviousView = - adjust_previous_view(previousView, old_image->getMipLevelRange().count(), new_image->getMipLevelRange().count()); + adjust_previous_view(previousView, old_image->getMipLevelRange().count(), newImage->getMipLevelRange().count()); const auto newView = ignore_previous_view ? tex->getViewInfo() : adjustedPreviousView; - ctx.bindlessSetResourceDescriptorNoLock(index, new_image, newView); + ctx.bindlessSetResourceDescriptorNoLock(index, newImage, newView); - at->image = new_image; + at->image = newImage; at->view = newView; } } @@ -351,15 +354,19 @@ void frontend::BindlessManager::updateBufferReferencesNoLock(DeviceContext &ctx, } } -bool frontend::BindlessManager::hasTextureReference(BaseTex *tex) +bool frontend::BindlessManager::hasTextureReferenceNoLock(BaseTex *tex) { - OSSpinlockScopedLock stateLock{get_state_guard()}; - const auto bot = state.resourceSlotInfo.beginOf(); const auto eot = state.resourceSlotInfo.endOf(); return eot != eastl::find_if(bot, eot, [tex](const auto &info) { return info.texture == tex; }); } +bool frontend::BindlessManager::hasTextureReference(BaseTex *tex) +{ + OSSpinlockScopedLock stateLock{get_state_guard()}; + return hasTextureReferenceNoLock(tex); +} + bool frontend::BindlessManager::hasTextureImageReference(BaseTex *tex, Image *image) { OSSpinlockScopedLock stateLock{get_state_guard()}; @@ -424,14 +431,20 @@ bool frontend::BindlessManager::hasBufferViewReference(D3D12_CPU_DESCRIPTOR_HAND return eot != eastl::find_if(bot, eot, [view](const auto &info) { return info.descriptor == view; }); } -void frontend::BindlessManager::resetTextureReferences(DeviceContext &ctx, BaseTex *texture, const NullResourceTable &null_table) +void frontend::BindlessManager::resetTextureReferences(DeviceContext &ctx, BaseTex *texture) { - const auto nullDescriptor = null_table.table[res_type_to_null_resource_table_entry(texture->restype())]; + const auto nullDescriptor = nullResourceTable->table[res_type_to_null_resource_table_entry(texture->restype())]; resetReferences(ctx, nullDescriptor, [texture](const auto &info) { return texture == info.texture; }); } -void frontend::BindlessManager::updateBindlessNull(DeviceContext &ctx, uint32_t resource_type, uint32_t index, uint32_t count, - const NullResourceTable &null_table) +void frontend::BindlessManager::resetTextureImagePairReferencesNoLock(DeviceContext &ctx, BaseTex *texture, Image *image) +{ + const auto nullDescriptor = nullResourceTable->table[res_type_to_null_resource_table_entry(texture->restype())]; + resetReferencesNoLock(ctx, nullDescriptor, + [texture, image](const auto &info) { return texture == info.texture && image == info.image; }); +} + +void frontend::BindlessManager::updateBindlessNull(DeviceContext &ctx, uint32_t resource_type, uint32_t index, uint32_t count) { // need to take the lock here to keep consistent ordering ScopedCommitLock ctxLock{ctx}; @@ -442,7 +455,7 @@ void frontend::BindlessManager::updateBindlessNull(DeviceContext &ctx, uint32_t eastl::fill_n(state.resourceSlotInfo.begin() + index, count, eastl::monostate{}); for (uint32_t i = index; i < index + count; ++i) { - ctx.bindlessSetResourceDescriptorNoLock(i, null_table.table[res_type_to_null_resource_table_entry(resource_type)]); + ctx.bindlessSetResourceDescriptorNoLock(i, nullResourceTable->table[res_type_to_null_resource_table_entry(resource_type)]); } } @@ -465,13 +478,9 @@ ImageViewState frontend::BindlessManager::adjust_previous_view(ImageViewState pr } template -void frontend::BindlessManager::resetReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE nullDescriptor, +void frontend::BindlessManager::resetReferencesNoLock(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE nullDescriptor, const CheckerType &checker) { - // need to take the lock here to keep consistent ordering - ScopedCommitLock ctxLock{ctx}; - OSSpinlockScopedLock stateLock{get_state_guard()}; - auto at = state.resourceSlotInfo.beginOf(); const auto typedEnd = state.resourceSlotInfo.endOf(); for (;; ++at) @@ -494,6 +503,16 @@ void frontend::BindlessManager::resetReferences(DeviceContext &ctx, D3D12_CPU_DE } } +template +void frontend::BindlessManager::resetReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE nullDescriptor, + const CheckerType &checker) +{ + // need to take the lock here to keep consistent ordering + ScopedCommitLock ctxLock{ctx}; + OSSpinlockScopedLock stateLock{get_state_guard()}; + resetReferencesNoLock(ctx, nullDescriptor, checker); +} + void backend::BindlessSetManager::init(ID3D12Device *device) { D3D12_DESCRIPTOR_HEAP_DESC heapDesc{}; diff --git a/prog/engine/drv/drv3d_DX12/bindless.h b/prog/engine/drv/drv3d_DX12/bindless.h index bd56c63b2..d73121304 100644 --- a/prog/engine/drv/drv3d_DX12/bindless.h +++ b/prog/engine/drv/drv3d_DX12/bindless.h @@ -49,9 +49,10 @@ class BindlessManager }; State state; + const NullResourceTable *nullResourceTable = nullptr; public: - void init(DeviceContext &ctx, SamplerDescriptorAndState default_bindless_sampler); + void init(DeviceContext &ctx, SamplerDescriptorAndState default_bindless_sampler, const NullResourceTable *null_resource_table); uint32_t registerSampler(Device &device, DeviceContext &ctx, BaseTex *texture); uint32_t registerSampler(DeviceContext &ctx, SamplerDescriptorAndState sampler); @@ -61,7 +62,7 @@ class BindlessManager void freeBindlessResourceRange(uint32_t index, uint32_t count); void updateBindlessBuffer(DeviceContext &ctx, uint32_t index, Sbuffer *buffer); - void updateBindlessTexture(DeviceContext &ctx, uint32_t index, BaseTex *res, const NullResourceTable &null_table); + void updateBindlessTexture(DeviceContext &ctx, uint32_t index, BaseTex *res); struct CheckTextureImagePairResultType { @@ -80,12 +81,13 @@ class BindlessManager // Default values can be 0 for search_offset and ~0 for change_count, the method will still // function as expected by searching the whole set and replacing all found matches. // Requires front guard and binding guard locked. - void updateTextureReferencesNoLock(DeviceContext &ctx, BaseTex *tex, Image *old_image, Image *new_image, uint32_t search_offset, + void updateTextureReferencesNoLock(DeviceContext &ctx, BaseTex *tex, Image *old_image, uint32_t search_offset, uint32_t change_max_count, bool ignore_previous_view); void updateBufferReferencesNoLock(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE old_descriptor, D3D12_CPU_DESCRIPTOR_HANDLE new_descriptor); bool hasTextureReference(BaseTex *tex); + bool hasTextureReferenceNoLock(BaseTex *tex); bool hasTextureImageReference(BaseTex *tex, Image *image); bool hasTextureImageViewReference(BaseTex *tex, Image *image, ImageViewState view); bool hasImageReference(Image *image); @@ -94,11 +96,11 @@ class BindlessManager bool hasBufferViewReference(Sbuffer *buf, D3D12_CPU_DESCRIPTOR_HANDLE view); bool hasBufferViewReference(D3D12_CPU_DESCRIPTOR_HANDLE view); - void resetTextureReferences(DeviceContext &ctx, BaseTex *texture, const NullResourceTable &null_table); - void resetBufferReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE descriptor, const NullResourceTable &null_table); + void resetTextureReferences(DeviceContext &ctx, BaseTex *texture); + void resetTextureImagePairReferencesNoLock(DeviceContext &ctx, BaseTex *texture, Image *image); + void resetBufferReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE descriptor); - void updateBindlessNull(DeviceContext &ctx, uint32_t resource_type, uint32_t index, uint32_t count, - const NullResourceTable &null_table); + void updateBindlessNull(DeviceContext &ctx, uint32_t resource_type, uint32_t index, uint32_t count); void preRecovery(); template @@ -116,6 +118,8 @@ class BindlessManager static ImageViewState adjust_previous_view(ImageViewState previous_view, int old_count, int new_count); template void resetReferences(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE nullDescriptor, const CheckerType &checker); + template + void resetReferencesNoLock(DeviceContext &ctx, D3D12_CPU_DESCRIPTOR_HANDLE nullDescriptor, const CheckerType &checker); uint32_t allocateBindlessResourceRangeNoLock(uint32_t count); void freeBindlessResourceRangeNoLock(uint32_t index, uint32_t count); diff --git a/prog/engine/drv/drv3d_DX12/device.cpp b/prog/engine/drv/drv3d_DX12/device.cpp index 1bb734f03..b62a536c0 100644 --- a/prog/engine/drv/drv3d_DX12/device.cpp +++ b/prog/engine/drv/drv3d_DX12/device.cpp @@ -813,7 +813,8 @@ void Device::shutdown(const DeviceCapsAndShaderModel &features) void Device::initializeBindlessManager() { - bindlessManager.init(context, {nullResourceTable.table[NullResourceTable::SAMPLER], SamplerState::make_default()}); + bindlessManager.init(context, {nullResourceTable.table[NullResourceTable::SAMPLER], SamplerState::make_default()}, + &nullResourceTable); } namespace gpu @@ -1400,6 +1401,10 @@ HRESULT Device::findClosestMatchingMode(DXGI_MODE_DESC *out_desc) D3D12_FEATURE_DATA_FORMAT_SUPPORT Device::getFormatFeatures(FormatStore fmt) { D3D12_FEATURE_DATA_FORMAT_SUPPORT query = {}; + if (!waitForHealthyState()) + { + return query; + } query.Format = fmt.asDxGiFormat(); device->CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT, &query, sizeof(query)); // If this is true we also need to check the linear variant to accurately represent possible uses when in linear mode @@ -1609,9 +1614,16 @@ void Device::unregisterDeviceResetEventHandler(DeviceResetEventHandler *handler) G_ASSERTF(false, "Could not find device reset event handler to unregister."); } -void Device::updateTextureBindlessReferencesNoLock(BaseTex *tex, Image *old_image, Image *new_image, bool ignore_previous_view) +void Device::updateTextureBindlessReferencesNoLock(BaseTex *tex, Image *old_image, bool ignore_previous_view) { - bindlessManager.updateTextureReferencesNoLock(context, tex, old_image, new_image, 0, eastl::numeric_limits::max(), + if (tex->image == nullptr) + { + logwarn("DX12: Texture (%s) has no image, resetting all bindless references...", tex->getResName()); + bindlessManager.resetTextureImagePairReferencesNoLock(context, tex, old_image); + G_ASSERT(!bindlessManager.hasTextureReferenceNoLock(tex)); + return; + } + bindlessManager.updateTextureReferencesNoLock(context, tex, old_image, 0, eastl::numeric_limits::max(), ignore_previous_view); } diff --git a/prog/engine/drv/drv3d_DX12/device.h b/prog/engine/drv/drv3d_DX12/device.h index 315ad9fdf..f3f17ca2d 100644 --- a/prog/engine/drv/drv3d_DX12/device.h +++ b/prog/engine/drv/drv3d_DX12/device.h @@ -155,6 +155,22 @@ class DeviceErrorState } } + /// will return true when the device is in Health::HEALTHY state + /// will return false when the device is in Health::DEAD state + /// for any other state, this will block and wait for any of the states that would return true or false + bool waitForHealthyState() + { + auto v = contextHealth.load(std::memory_order_relaxed); + + while ((Health::HEALTHY != v) && (Health::DEAD != v)) + { + wait(contextHealth, v); + v = contextHealth.load(std::memory_order_relaxed); + } + + return Health::HEALTHY == v; + } + public: bool isHealthyOrRecovering() const { @@ -282,6 +298,7 @@ class DeviceErrorState void enterRecoveringState() {} bool enterHealthyState() { return true; } + bool waitForHealthyState() { return true; } public: constexpr bool isHealthyOrRecovering() const { return true; } @@ -727,17 +744,14 @@ class Device : public DeviceErrorState, public DeviceErrorObserver, prot bindlessManager.updateBindlessBuffer(context, index, buffer); } - void updateBindlessTexture(uint32_t index, BaseTex *res) - { - bindlessManager.updateBindlessTexture(context, index, res, nullResourceTable); - } + void updateBindlessTexture(uint32_t index, BaseTex *res) { bindlessManager.updateBindlessTexture(context, index, res); } void updateBindlessNull(uint32_t resource_type, uint32_t index, uint32_t count) { - bindlessManager.updateBindlessNull(context, resource_type, index, count, nullResourceTable); + bindlessManager.updateBindlessNull(context, resource_type, index, count); } - void updateTextureBindlessReferencesNoLock(BaseTex *tex, Image *old_image, Image *new_image, bool ignore_previous_view); + void updateTextureBindlessReferencesNoLock(BaseTex *tex, Image *old_image, bool ignore_previous_view); #if _TARGET_PC_WIN DriverVersion getDriverVersion() const { return driverVersion; } diff --git a/prog/engine/drv/drv3d_DX12/device_context.cpp b/prog/engine/drv/drv3d_DX12/device_context.cpp index 828e8d180..d4e94dd9f 100644 --- a/prog/engine/drv/drv3d_DX12/device_context.cpp +++ b/prog/engine/drv/drv3d_DX12/device_context.cpp @@ -2497,16 +2497,13 @@ void DeviceContext::deleteTexture(BaseTex *tex) device.resources.deleteTextureObjectOnFrameCompletion(tex); } -void DeviceContext::resetBindlessReferences(BaseTex *tex) -{ - device.bindlessManager.resetTextureReferences(*this, tex, device.nullResourceTable); -} +void DeviceContext::resetBindlessReferences(BaseTex *tex) { device.bindlessManager.resetTextureReferences(*this, tex); } void DeviceContext::resetBindlessReferences(BufferState &buffer) { if (!buffer.srvs) return; - device.bindlessManager.resetBufferReferences(*this, buffer.currentSRV(), device.nullResourceTable); + device.bindlessManager.resetBufferReferences(*this, buffer.currentSRV()); } void DeviceContext::updateBindlessReferences(D3D12_CPU_DESCRIPTOR_HANDLE old_descriptor, D3D12_CPU_DESCRIPTOR_HANDLE new_descriptor) diff --git a/prog/engine/drv/drv3d_DX12/dx12.cpp b/prog/engine/drv/drv3d_DX12/dx12.cpp index 977b7e896..ceac2e081 100644 --- a/prog/engine/drv/drv3d_DX12/dx12.cpp +++ b/prog/engine/drv/drv3d_DX12/dx12.cpp @@ -2696,7 +2696,7 @@ bool d3d::set_depth(BaseTexture *tex, int layer, DepthAccess access) return true; } -bool d3d::set_render_target(int ri, Texture *tex, int level) +bool d3d::set_render_target(int ri, Texture *tex, uint8_t level) { G_ASSERTF_RETURN(ri < Driver3dRenderTarget::MAX_SIMRT, false, "DX12: in set_render_target, 'ri' is %d, while MAX_SIMRT is %d", ri, Driver3dRenderTarget::MAX_SIMRT); @@ -2736,7 +2736,7 @@ bool d3d::set_render_target(int ri, Texture *tex, int level) return true; } -bool d3d::set_render_target(int ri, BaseTexture *tex, int layer, int level) +bool d3d::set_render_target(int ri, BaseTexture *tex, int layer, uint8_t level) { G_ASSERTF_RETURN(ri < Driver3dRenderTarget::MAX_SIMRT, false, "DX12: in set_render_target, 'ri' is %d, while MAX_SIMRT is %d", ri, Driver3dRenderTarget::MAX_SIMRT); @@ -2805,7 +2805,7 @@ bool d3d::get_target_size(int &w, int &h) return true; } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { // NOTE: no thread check needed, this function should be removed as it can be implemented in a different (more clearer) way. if (!rt_tex) @@ -2816,7 +2816,7 @@ bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) } else { - auto size = cast_to_texture_base(*rt_tex).getMipmapExtent(lev); + auto size = cast_to_texture_base(*rt_tex).getMipmapExtent(level); w = size.width; h = size.height; } diff --git a/prog/engine/drv/drv3d_DX12/resource_manager/image.h b/prog/engine/drv/drv3d_DX12/resource_manager/image.h index 006d36eeb..75625cc92 100644 --- a/prog/engine/drv/drv3d_DX12/resource_manager/image.h +++ b/prog/engine/drv/drv3d_DX12/resource_manager/image.h @@ -26,6 +26,21 @@ namespace drv3d_dx12 { +inline void printDesc(const D3D12_RESOURCE_DESC &desc) +{ + logdbg("DX12: desc.Dimension = %s", to_string(desc.Dimension)); + logdbg("DX12: desc.Alignment = %llu", desc.Alignment); + logdbg("DX12: desc.Width = %llu", desc.Width); + logdbg("DX12: desc.Height = %u", desc.Height); + logdbg("DX12: desc.DepthOrArraySize = %u", desc.DepthOrArraySize); + logdbg("DX12: desc.MipLevels = %u", desc.MipLevels); + logdbg("DX12: desc.Format = %u", dxgi_format_name(desc.Format)); + logdbg("DX12: desc.SampleDesc.Count = %u", desc.SampleDesc.Count); + logdbg("DX12: desc.SampleDesc.Quality = %u", desc.SampleDesc.Quality); + logdbg("DX12: desc.Layout = %u", desc.Layout); + logdbg("DX12: desc.Flags = %08X", desc.Flags); +} + class Image { public: @@ -60,14 +75,46 @@ class Image uint64_t lastFrameAccess = 0; public: +#if DAGOR_DBGLEVEL > 0 + void dbgOnImageValidationFailed(ImageViewState image_view_state, const D3D12_RESOURCE_DESC &desc) + { + logdbg("DX12: image.debugName = %s", *debugName.access()); + logdbg("DX12: image.mipLevels = %d", mipLevels.count()); + logdbg("DX12: image.layerCount = %d", layerCount); + logdbg("DX12: image.dimension = %d", imageType); + logdbg("DX12: image.extent = (%d, %d, %d)", extent.width, extent.height, extent.depth); + logdbg("DX12: view.mipBase = %d", image_view_state.getMipBase()); + logdbg("DX12: view.mipCount = %d", image_view_state.getMipCount()); + logdbg("DX12: view.arrayBase = %d", image_view_state.getArrayBase()); + logdbg("DX12: view.arrayCount = %d", image_view_state.getArrayCount()); + printDesc(desc); + G_ASSERT_FAIL("DX12: Image validation failed, please attach logs and dump to report"); + } + + void dbgCheckImageValidationCondition(bool condition, const char *str, ImageViewState image_view_state, + const D3D12_RESOURCE_DESC &desc) + { + if (condition) + return; + logerr("DX12: Image validation info failed (%s). Logging debug info...", str); + dbgOnImageValidationFailed(image_view_state, desc); + } +#endif + void dbgValidateImageViewStateCompatibility([[maybe_unused]] ImageViewState image_view_state) { - G_ASSERTF(image_view_state.getMipBase() + image_view_state.getMipCount() <= mipLevels, - "DX12: Image view validation failed, wrong mip range (tex: %s, view.mipBase: %d, view.mipCount: %d, img.mipCount: %d)", - *debugName.access(), image_view_state.getMipBase(), image_view_state.getMipCount(), mipLevels.count()); - G_ASSERTF(image_view_state.getArrayBase() + image_view_state.getArrayCount() <= layerCount, - "DX12: Image view validation failed, wrong layers range (tex: %s, view.mipBase: %d, view.mipCount: %d, img.mipCount: %d)", - *debugName.access(), image_view_state.getMipBase(), image_view_state.getMipCount(), mipLevels.count()); +#if DAGOR_DBGLEVEL > 0 + G_ASSERTF(image, "DX12: Image view validation failed, image is not presented (tex: %s)", *debugName.access()); + const auto desc = image->GetDesc(); + dbgCheckImageValidationCondition(image_view_state.getMipBase() + image_view_state.getMipCount() <= mipLevels, "wrong mip range", + image_view_state, desc); + dbgCheckImageValidationCondition(image_view_state.getArrayBase() + image_view_state.getArrayCount() <= layerCount, + "wrong layers range", image_view_state, desc); + dbgCheckImageValidationCondition(desc.DepthOrArraySize == max((uint32_t)layerCount.count(), extent.depth), + "wrong layers count in desc", image_view_state, desc); + dbgCheckImageValidationCondition(desc.MipLevels == mipLevels.count(), "wrong mips count in desc", image_view_state, desc); + dbgCheckImageValidationCondition(desc.Dimension == imageType, "wrong dimension", image_view_state, desc); +#endif } void updateLastFrameAccess(uint64_t index) { lastFrameAccess = index; } bool wasAccessedPreviousFrames(uint64_t index) const diff --git a/prog/engine/drv/drv3d_DX12/resource_memory_heap.cpp b/prog/engine/drv/drv3d_DX12/resource_memory_heap.cpp index 003fcafa8..98140c985 100644 --- a/prog/engine/drv/drv3d_DX12/resource_memory_heap.cpp +++ b/prog/engine/drv/drv3d_DX12/resource_memory_heap.cpp @@ -6544,8 +6544,7 @@ HeapFragmentationManager::ResourceMoveResolution HeapFragmentationManager::moveR } if (bindlessInfo.matchCount > 0) { - bindless_manager.updateTextureReferencesNoLock(ctx, baseTex, texture, newTexture, bindlessInfo.firstFound, bindlessInfo.matchCount, - false); + bindless_manager.updateTextureReferencesNoLock(ctx, baseTex, texture, bindlessInfo.firstFound, bindlessInfo.matchCount, false); } ctx.moveTextureNoLock(texture, newTexture); diff --git a/prog/engine/drv/drv3d_DX12/resource_state_tracker.h b/prog/engine/drv/drv3d_DX12/resource_state_tracker.h index 74d0cd5d4..db1e39147 100644 --- a/prog/engine/drv/drv3d_DX12/resource_state_tracker.h +++ b/prog/engine/drv/drv3d_DX12/resource_state_tracker.h @@ -282,21 +282,6 @@ inline bool validate_resource_state(D3D12_RESOURCE_STATES state, uint32_t resour return errors.none(); } -inline void print(const D3D12_RESOURCE_DESC &desc) -{ - logdbg("DX12: desc.Dimension = %s", to_string(desc.Dimension)); - logdbg("DX12: desc.Alignment = %llu", desc.Alignment); - logdbg("DX12: desc.Width = %llu", desc.Width); - logdbg("DX12: desc.Height = %u", desc.Height); - logdbg("DX12: desc.DepthOrArraySize = %u", desc.DepthOrArraySize); - logdbg("DX12: desc.MipLevels = %u", desc.MipLevels); - logdbg("DX12: desc.Format = %u", dxgi_format_name(desc.Format)); - logdbg("DX12: desc.SampleDesc.Count = %u", desc.SampleDesc.Count); - logdbg("DX12: desc.SampleDesc.Quality = %u", desc.SampleDesc.Quality); - logdbg("DX12: desc.Layout = %u", desc.Layout); - logdbg("DX12: desc.Flags = %08X", desc.Flags); -} - // Extensive transition barrier validation, validates the following rules: // - If write state are set, no read states can be set // - Can not combine multiple write states together @@ -335,7 +320,7 @@ inline bool validate_transition_barrier(const D3D12_RESOURCE_TRANSITION_BARRIER if (beforeErrors.any() || afterErrors.any() || (barrier.StateBefore == barrier.StateAfter) || !subResourceIndexIsValid) { logdbg("DX12: validate_transition_barrier found an error, reporting resource properties:"); - print(desc); + printDesc(desc); char resnameBuffer[MAX_OBJECT_NAME_LENGTH]; get_resource_name(barrier.pResource, resnameBuffer); diff --git a/prog/engine/drv/drv3d_DX12/texture.cpp b/prog/engine/drv/drv3d_DX12/texture.cpp index 3781248fd..fdf67f85a 100644 --- a/prog/engine/drv/drv3d_DX12/texture.cpp +++ b/prog/engine/drv/drv3d_DX12/texture.cpp @@ -314,6 +314,8 @@ bool create_tex2d(BaseTex &tex, uint32_t w, uint32_t h, uint32_t levels, bool cu #endif if (!tex.image) { + if (device.isIll()) + return true; if (tex.stagingMemory) free_and_reset_staging_memory(tex.stagingMemory); return false; @@ -938,7 +940,7 @@ void BaseTex::replaceTexResObject(BaseTexture *&other_tex) other->setWasUsed(); #endif - get_device().updateTextureBindlessReferencesNoLock(this, other->image, image, isStubUsed); + get_device().updateTextureBindlessReferencesNoLock(this, other->image, isStubUsed); } del_d3dres(other_tex); } diff --git a/prog/engine/drv/drv3d_Metal/buffers.mm b/prog/engine/drv/drv3d_Metal/buffers.mm index 521919503..6adad1659 100644 --- a/prog/engine/drv/drv3d_Metal/buffers.mm +++ b/prog/engine/drv/drv3d_Metal/buffers.mm @@ -277,18 +277,19 @@ int get_ib_vb_mem_used(String *stat, int &sysmem) } else #endif - dynamic_buffer = render.AllocateConstants(locked_size, dynamic_offset, bufSize); + { + String name; +#if DAGOR_DBGLEVEL > 0 + name.printf(0, "upload for %s %llu", getResName(), render.frame); +#endif + dynamic_buffer = render.AllocateConstants(locked_size, dynamic_offset, bufSize, name); + } G_ASSERT(dynamic_buffer); dynamic_frame = render.frame; cur_render_buffer = cur_buffer; uint8_t *ret = (uint8_t*)dynamic_buffer.contents + dynamic_offset + offset_bytes; -#if _TARGET_IOS - G_ASSERT(offset_bytes == 0); - if (size_bytes != locked_size) - memset(ret + size_bytes, 0, locked_size - size_bytes); -#endif return ret; } @@ -359,16 +360,19 @@ int get_ib_vb_mem_used(String *stat, int &sysmem) uint64_t cur_thread = 0; pthread_threadid_np(NULL, &cur_thread); + String name; +#if DAGOR_DBGLEVEL > 0 + name.printf(0, "upload for %s %llu", getResName(), render.frame); +#endif + bool from_thread = render.acquire_depth == 0 || cur_thread != render.cur_thread; if (from_thread || locked_size > 256 * 1024) { - String name; - name.printf(0, "upload for %s %llu", getResName(), render.frame); upload_buffer = render.createBuffer(locked_size, MTLResourceCPUCacheModeWriteCombined | MTLResourceStorageModeShared, name); upload_buffer_offset = 0; } else - upload_buffer = [render.AllocateConstants(locked_size, upload_buffer_offset, locked_size) retain]; + upload_buffer = [render.AllocateConstants(locked_size, upload_buffer_offset, locked_size, name) retain]; } G_ASSERT((upload_buffer_offset & 3) == 0); G_ASSERT((offset_bytes & 3) == 0); @@ -430,14 +434,14 @@ int get_ib_vb_mem_used(String *stat, int &sysmem) int tempOffset = 0; @autoreleasepool { + String name; +#if DAGOR_DBGLEVEL > 0 + name.printf(0, "upload for %s %llu", getResName(), render.frame); +#endif if (size_bytes > 128 * 1024) - { - String name; - name.printf(0, "upload for %s %llu", getResName(), render.frame); tempBuffer = render.createBuffer(size_bytes, MTLResourceCPUCacheModeWriteCombined | MTLResourceStorageModeShared, name); - } else - tempBuffer = [render.AllocateConstants(size_bytes, tempOffset) retain]; + tempBuffer = [render.AllocateConstants(size_bytes, tempOffset, size_bytes, name) retain]; } G_ASSERT(tempBuffer); diff --git a/prog/engine/drv/drv3d_Metal/d3d_rtarget.mm b/prog/engine/drv/drv3d_Metal/d3d_rtarget.mm index 4d97c0281..c4631bc08 100644 --- a/prog/engine/drv/drv3d_Metal/d3d_rtarget.mm +++ b/prog/engine/drv/drv3d_Metal/d3d_rtarget.mm @@ -345,12 +345,12 @@ bool set_render_target_impl(int rt_index, ::BaseTexture* rt, int level, int laye return true; } -bool d3d::set_render_target(int rt_index, BaseTexture* rt, int level) +bool d3d::set_render_target(int rt_index, BaseTexture* rt, uint8_t level) { return set_render_target_impl(rt_index, rt, level, 0); } -bool d3d::set_render_target(int rt_index, BaseTexture* rt, int fc, int level) +bool d3d::set_render_target(int rt_index, BaseTexture* rt, int fc, uint8_t level) { return set_render_target_impl(rt_index, rt, level, fc); } @@ -402,7 +402,7 @@ bool set_render_target_impl(int rt_index, ::BaseTexture* rt, int level, int laye return false; } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { w = h = 0; @@ -421,10 +421,10 @@ bool set_render_target_impl(int rt_index, ::BaseTexture* rt, int level, int laye return false; } - G_ASSERT(lev < tex->mipLevels); + G_ASSERT(level < tex->mipLevels); - w = max(1, tex->width >> lev); - h = max(1, tex->height >> lev); + w = max(1, tex->width >> level); + h = max(1, tex->height >> level); return true; } diff --git a/prog/engine/drv/drv3d_Metal/d3d_states.mm b/prog/engine/drv/drv3d_Metal/d3d_states.mm index 9a1d45cbc..824857eb3 100644 --- a/prog/engine/drv/drv3d_Metal/d3d_states.mm +++ b/prog/engine/drv/drv3d_Metal/d3d_states.mm @@ -167,7 +167,7 @@ static int sizeofAccelerationStruct() g_device_desc.caps.hasBindless = [render.device supportsFamily:MTLGPUFamilyMetal3]; } - g_device_desc.caps.hasUAVOnlyForcedSampleCount = false; + g_device_desc.caps.hasUAVOnlyForcedSampleCount = true; g_device_desc.shaderModel = 5.0_sm; #else //_TARGET_IOS | _TARGET_TVOS diff --git a/prog/engine/drv/drv3d_Metal/render.h b/prog/engine/drv/drv3d_Metal/render.h index 9d56c9e82..cb0a30182 100644 --- a/prog/engine/drv/drv3d_Metal/render.h +++ b/prog/engine/drv/drv3d_Metal/render.h @@ -205,6 +205,7 @@ class Render uint32_t stencil_ref = 0; uint32_t cull = 0; uint32_t depth_clip = 0; + uint32_t forcedSampleCount = 1; }; static MTLDepthStencilDescriptor *depthStateDesc; @@ -312,7 +313,7 @@ class Render id createBuffer(uint32_t size, uint32_t flags, const char *name = ""); - id AllocateConstants(uint32_t size, int &offset, int sizeLeft = 0) + id AllocateConstants(uint32_t size, int &offset, int sizeLeft, const char *name) { G_ASSERT(size <= RingBufferItem::max_size); @@ -333,6 +334,9 @@ class Render { constant_buffer = constant_buffers_free.back(); constant_buffers_free.pop_back(); +#if DAGOR_DBGLEVEL > 0 + [constant_buffer.buf removeAllDebugMarkers]; +#endif } constant_buffer.offset = 0; } @@ -340,6 +344,11 @@ class Render offset = constant_buffer.offset; constant_buffer.offset += size; +#if DAGOR_DBGLEVEL > 0 + G_ASSERT(name); + [constant_buffer.buf addDebugMarker:[NSString stringWithUTF8String:name] range:NSMakeRange(offset, size)]; +#endif + return constant_buffer.buf; } @@ -590,6 +599,7 @@ class Render Program::RenderState cur_rstate; id cur_state; Program::RenderState last_rstate; + uint32_t forcedSampleCount = 1; Program *cur_prog; id current_cs_pipeline = nil; diff --git a/prog/engine/drv/drv3d_Metal/render.mm b/prog/engine/drv/drv3d_Metal/render.mm index 17bb4b824..2db30dbb1 100644 --- a/prog/engine/drv/drv3d_Metal/render.mm +++ b/prog/engine/drv/drv3d_Metal/render.mm @@ -421,7 +421,12 @@ __forceinline static void bindMetalBuffer(id buffer, id& b num_reg = num_strored; } - id buf = render.AllocateConstants(num_reg, device_buffer_offset); + String name; +#if DAGOR_DBGLEVEL > 0 + name.printf(0, "Default cb for stage %d, frame %llu", stage, render.frame); +#endif + + id buf = render.AllocateConstants(num_reg, device_buffer_offset, num_reg, name); uint8_t* ptr = (uint8_t*)buf.contents + device_buffer_offset; G_ASSERT(device_buffer_offset + num_reg <= RingBufferItem::max_size); @@ -456,8 +461,13 @@ __forceinline static void bindMetalBuffer(id buffer, id& b { G_ASSERTF(immediate_dword_count > 0, "Shader name and variant: %s", getShaderName(shader->src == nil ? "" : [shader->src cStringUsingEncoding:[NSString defaultCStringEncoding]]).c_str()); - int buf_imm_offset = 0; - id buf_imm = render.AllocateConstants(immediate_dword_count*sizeof(uint32_t), buf_imm_offset); + String name; + #if DAGOR_DBGLEVEL > 0 + name.printf(0, "Immediate cb for stage %d, frame %llu", stage, render.frame); + #endif + + int buf_imm_offset = 0, imm_size = immediate_dword_count*sizeof(uint32_t); + id buf_imm = render.AllocateConstants(imm_size, buf_imm_offset, imm_size, name); memcpy((uint8_t *)buf_imm.contents + buf_imm_offset, immediate_dwords, immediate_dword_count*sizeof(uint32_t)); int target = shader->immediate_slot; @@ -1314,8 +1324,13 @@ static void PatchShader(int shader, int num_reg, int num_tex) auto& rc = buffers2copy[i]; G_ASSERT((rc.size & 3) == 0); + String name; +#if DAGOR_DBGLEVEL > 0 + name.printf(0, "Copy cb for buffer %s, frame %llu", [rc.dst.label UTF8String], render.frame); +#endif + int buf_size_offset = 0; - id buf_size = AllocateConstants(16, buf_size_offset); + id buf_size = AllocateConstants(16, buf_size_offset, 16, name); uint32_t * data = (uint32_t *)((uint8_t *)buf_size.contents + buf_size_offset); data[0] = rc.size / 4; data[1] = rc.src_offset / 4; @@ -1824,8 +1839,14 @@ static void PatchShader(int shader, int num_reg, int num_tex) }; BufferUP tempBufferVB, tempBufferIB; + String name_vb, name_ib; +#if DAGOR_DBGLEVEL > 0 + name_vb.printf(0, "immediate vb, frame %llu", render.frame); + name_ib.printf(0, "immediate ib, frame %llu", render.frame); +#endif + int vbuf_offset = 0; - tempBufferVB.dynamic_buffer = AllocateConstants(numvert*stride_bytes, vbuf_offset); + tempBufferVB.dynamic_buffer = AllocateConstants(numvert*stride_bytes, vbuf_offset, numvert*stride_bytes, name_vb); tempBufferVB.dynamic_frame = frame; tempBufferVB.dynamic_offset = 0; @@ -1835,7 +1856,7 @@ static void PatchShader(int shader, int num_reg, int num_tex) if (ind) { int ibuf_offset = 0; - tempBufferIB.dynamic_buffer = AllocateConstants(prim_count * 2, ibuf_offset); + tempBufferIB.dynamic_buffer = AllocateConstants(prim_count * 2, ibuf_offset, prim_count * 2, name_ib); tempBufferIB.dynamic_frame = frame; tempBufferIB.dynamic_offset = 0; @@ -2055,8 +2076,13 @@ static void PatchShader(int shader, int num_reg, int num_tex) [computeEncoder setComputePipelineState:clear_cs_pipeline]; current_cs_pipeline = clear_cs_pipeline; + String name; + #if DAGOR_DBGLEVEL > 0 + name.printf(0, "clear rwbuffer %s frame %llu", buff->getResName(), render.frame); + #endif + int buf_size_offset = 0; - id buf_size = AllocateConstants(32, buf_size_offset); + id buf_size = AllocateConstants(32, buf_size_offset, 32, name); *(uint32_t *)((uint8_t *)buf_size.contents + buf_size_offset) = val[0]; *(uint32_t *)((uint8_t *)buf_size.contents + buf_size_offset + 16) = buf->bufSize / 4; @@ -2742,7 +2768,8 @@ static void fillAttachment(MTLRenderPassAttachmentDescriptor* desc, const Render G_ASSERT(rt.vp.w > 0); G_ASSERT(rt.vp.h > 0); - samples = 1; + // apple hardware only supports 4 so lets use 4 if any msaa is set + samples = forcedSampleCount < 2 ? 1 : 4; render_desc.renderTargetWidth = rt.vp.x + rt.vp.w; render_desc.renderTargetHeight = rt.vp.y + rt.vp.h; render_desc.defaultRasterSampleCount = samples; @@ -3287,6 +3314,7 @@ static void fillAttachment(MTLRenderPassAttachmentDescriptor* desc, const Render rstate.depth_clip = state.zClip; rstate.stencil_ref = state.stencilRef; rstate.cull = state.cull-1; + rstate.forcedSampleCount = state.forcedSampleCount; rstate.raster_state.a2c = state.alphaToCoverage; rstate.raster_state.writeMask = state.colorWr; @@ -3340,6 +3368,7 @@ static void fillAttachment(MTLRenderPassAttachmentDescriptor* desc, const Render if (cur_cull != state.cull) setCull(state.cull); cur_rstate.raster_state = state.raster_state; + forcedSampleCount = state.forcedSampleCount; return true; } diff --git a/prog/engine/drv/drv3d_commonCode/amdFsr.cpp b/prog/engine/drv/drv3d_commonCode/amdFsr.cpp index 095f8c2b6..1d50db574 100644 --- a/prog/engine/drv/drv3d_commonCode/amdFsr.cpp +++ b/prog/engine/drv/drv3d_commonCode/amdFsr.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace amd @@ -31,10 +32,25 @@ FSR::UpscalingMode FSR::getUpscalingMode(const DataBlock &video) return UpscalingMode::Off; } +using FormatTypeID = uint32_t; + +static bool is_uav_load_supported(std::initializer_list formats) +{ + for (auto format : formats) + { + if (!(d3d::get_texformat_usage(format) & d3d::USAGE_UNORDERED_LOAD)) + return false; + } + return true; +} + bool FSR::isSupported() { #if _TARGET_PC_WIN - if (d3d::get_driver_desc().shaderModel >= 6.2_sm && (d3d::get_driver_code().is(d3d::dx12) || d3d::get_driver_code().is(d3d::vulkan))) + if (d3d::get_driver_desc().shaderModel >= 6.2_sm && + (d3d::get_driver_code().is(d3d::dx12) || d3d::get_driver_code().is(d3d::vulkan)) && + is_uav_load_supported( + {TEXFMT_R8, TEXFMT_A16B16G16R16F, TEXFMT_R11G11B10F, TEXFMT_R16F, TEXFMT_G16R16F, TEXFMT_R32UI, TEXFMT_R8G8B8A8})) return true; #elif _TARGET_XBOX return true; diff --git a/prog/engine/drv/drv3d_commonCode/basetexture.h b/prog/engine/drv/drv3d_commonCode/basetexture.h index d1f8b5baa..7ce50a91c 100644 --- a/prog/engine/drv/drv3d_commonCode/basetexture.h +++ b/prog/engine/drv/drv3d_commonCode/basetexture.h @@ -22,9 +22,9 @@ class BaseTextureImpl : public BaseTexture uint32_t texFilter : 3; uint32_t mipFilter : 3; + uint32_t _res : 4; uint32_t minMipLevel : 4; uint32_t maxMipLevel : 4; - uint32_t mipLevels : 4; }; uint32_t key; }; @@ -34,6 +34,7 @@ class BaseTextureImpl : public BaseTexture uint32_t cflg; uint32_t lockFlags = 0; uint16_t width = 1, height = 1, depth = 1; + uint8_t mipLevels; uint8_t type; uint8_t lockedLevel = 0; diff --git a/prog/engine/drv/drv3d_null/d3d_stub.cpp b/prog/engine/drv/drv3d_null/d3d_stub.cpp index 5db38b29c..1a849fdff 100644 --- a/prog/engine/drv/drv3d_null/d3d_stub.cpp +++ b/prog/engine/drv/drv3d_null/d3d_stub.cpp @@ -212,13 +212,13 @@ void d3d::insert_wait_on_fence(GPUFENCEHANDLE & /*fence*/, GpuPipeline /*gpu_pip bool d3d::set_depth(Texture *tex, DepthAccess) { return false; } bool d3d::set_depth(BaseTexture *tex, int, DepthAccess) { return false; } bool d3d::set_render_target() { return false; } -bool d3d::set_render_target(int, Texture *, int level) { return false; } -bool d3d::set_render_target(int, BaseTexture *, int fc, int level) { return false; } +bool d3d::set_render_target(int, Texture *, uint8_t level) { return false; } +bool d3d::set_render_target(int, BaseTexture *, int fc, uint8_t level) { return false; } void d3d::get_render_target(Driver3dRenderTarget &out_rt) {} bool d3d::set_render_target(const Driver3dRenderTarget &rt) { return false; } bool d3d::get_target_size(int &w, int &h) { return false; } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) { return false; } +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { return false; } bool d3d::settm(int which, const Matrix44 *tm) { return false; } bool d3d::settm(int which, const TMatrix &tm) { return false; } diff --git a/prog/engine/drv/drv3d_stub/d3d_stub.cpp b/prog/engine/drv/drv3d_stub/d3d_stub.cpp index af18485b7..9e5996f47 100644 --- a/prog/engine/drv/drv3d_stub/d3d_stub.cpp +++ b/prog/engine/drv/drv3d_stub/d3d_stub.cpp @@ -1156,7 +1156,7 @@ bool d3d::set_depth(BaseTexture *tex, int face, DepthAccess access) return true; } -bool d3d::set_render_target(int ri, Texture *tex, int level) +bool d3d::set_render_target(int ri, Texture *tex, uint8_t level) { if (!tex) currentRtState.removeColor(ri); @@ -1165,7 +1165,7 @@ bool d3d::set_render_target(int ri, Texture *tex, int level) return true; } -bool d3d::set_render_target(int ri, BaseTexture *ctex, int fc, int level) +bool d3d::set_render_target(int ri, BaseTexture *ctex, int fc, uint8_t level) { if (!ctex) currentRtState.removeColor(ri); @@ -1193,7 +1193,7 @@ bool d3d::get_target_size(int &w, int &h) return false; } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { w = h = 0; if (!rt_tex) @@ -1201,7 +1201,7 @@ bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) else if (rt_tex->restype() == RES3D_TEX || rt_tex->restype() == RES3D_CUBETEX || rt_tex->restype() == RES3D_ARRTEX) { TextureInfo i; - rt_tex->getinfo(i, lev); + rt_tex->getinfo(i, level); w = i.w; h = i.h; return true; diff --git a/prog/engine/drv/drv3d_use_d3di/d3d_wrap.cpp b/prog/engine/drv/drv3d_use_d3di/d3d_wrap.cpp index 2e05113ce..c4d49bc45 100644 --- a/prog/engine/drv/drv3d_use_d3di/d3d_wrap.cpp +++ b/prog/engine/drv/drv3d_use_d3di/d3d_wrap.cpp @@ -191,14 +191,17 @@ bool set_render_target() { return d3di.set_render_target(); } bool set_depth(BaseTexture *tex, DepthAccess access) { return d3di.set_depth(tex, access); } bool set_depth(BaseTexture *tex, int layer, DepthAccess access) { return d3di.set_depth(tex, layer, access); } -bool set_render_target(int rt_index, BaseTexture *t, int fc, int level) { return d3di.set_render_target(rt_index, t, fc, level); } -bool set_render_target(int rt_index, BaseTexture *t, int level) { return d3di.set_render_target(rt_index, t, level); } +bool set_render_target(int rt_index, BaseTexture *t, int fc, uint8_t level) { return d3di.set_render_target(rt_index, t, fc, level); } +bool set_render_target(int rt_index, BaseTexture *t, uint8_t level) { return d3di.set_render_target(rt_index, t, level); } void get_render_target(Driver3dRenderTarget &out_rt) { return d3di.get_render_target(out_rt); } bool set_render_target(const Driver3dRenderTarget &rt) { return d3di.set_render_target(rt); } bool get_target_size(int &w, int &h) { return d3di.get_target_size(w, h); } -bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) { return d3di.get_render_target_size(w, h, rt_tex, lev); } +bool get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) +{ + return d3di.get_render_target_size(w, h, rt_tex, level); +} bool settm(int which, const Matrix44 *tm) { return d3di.settm(which, tm); } bool settm(int which, const TMatrix &tm) { return d3di.settm(which, tm); } diff --git a/prog/engine/drv/drv3d_vulkan/d3d/command.cpp b/prog/engine/drv/drv3d_vulkan/d3d/command.cpp index de58912a9..49f3811e8 100644 --- a/prog/engine/drv/drv3d_vulkan/d3d/command.cpp +++ b/prog/engine/drv/drv3d_vulkan/d3d/command.cpp @@ -28,6 +28,11 @@ #include "device_context.h" #include "timeline_latency.h" +#if DAGOR_DBGLEVEL > 0 +#include "3d/dag_resourceDump.h" +#include "external_resource_pools.h" +#endif + namespace { uint64_t lastGpuTimeStamp = 0; @@ -380,6 +385,74 @@ int d3d::driver_command(Drv3dCommand command, void *par1, void *par2, [[maybe_un } case Drv3dCommand::DELAY_SYNC: Globals::ctx.dispatchCommand({true}); return 0; case Drv3dCommand::CONTINUE_SYNC: Globals::ctx.dispatchCommand({false}); return 0; + case Drv3dCommand::GET_RESOURCE_STATISTICS: + { +#if DAGOR_DBGLEVEL > 0 + Tab &dumpInfo = *static_cast *>(par1); + + // Textures + Globals::Res::tex.iterateAllocated([&](TextureInterfaceBase *tex) { + resource_dump_types::TextureTypes type = resource_dump_types::TextureTypes::TEX2D; + switch (tex->resType) + { + case RES3D_TEX: type = resource_dump_types::TextureTypes::TEX2D; break; + case RES3D_CUBETEX: type = resource_dump_types::TextureTypes::CUBETEX; break; + case RES3D_VOLTEX: type = resource_dump_types::TextureTypes::VOLTEX; break; + case RES3D_ARRTEX: type = resource_dump_types::TextureTypes::ARRTEX; break; + case RES3D_CUBEARRTEX: type = resource_dump_types::TextureTypes::CUBEARRTEX; break; + } + + bool color = true; + switch (tex->getFormat().asTexFlags()) + { + case TEXFMT_DEPTH16: + case TEXFMT_DEPTH24: + case TEXFMT_DEPTH32: + case TEXFMT_DEPTH32_S8: color = false; break; + default: break; + } + dumpInfo.emplace_back(resource_dump_types::ResourceType::Texture, tex->getResName(), tex->ressize(), type, tex->width, + tex->height, (tex->resType == RES3D_VOLTEX || tex->resType == RES3D_CUBEARRTEX) ? tex->depth : -1, + !(type == resource_dump_types::TextureTypes::ARRTEX) + ? ((type == resource_dump_types::TextureTypes::CUBETEX || type == resource_dump_types::TextureTypes::CUBEARRTEX) ? 6 : 1) + : tex->depth, + tex->level_count(), tex->getFormat().asTexFlags(), color, tex->cflg, -1); + }); + + // Buffers + Globals::Res::buf.iterateAllocated([&](GenericBufferInterface *buff) { + const BufferRef &buffRef = buff->getBufferRef(); + const Buffer *bufferPtr = buffRef.buffer; + uint64_t gpuAddress = -1; + if (bufferPtr && !bufferPtr->isFrameMem() && + (bufferPtr->getDescription().memoryClass == DeviceMemoryClass::DEVICE_RESIDENT_BUFFER)) + { + gpuAddress = bufferPtr->devOffsetLoc(0); + } + uint64_t cpuAddress = -1; + if (bufferPtr && !bufferPtr->isFrameMem() && (int)bufferPtr->getDescription().memoryClass > 1 && + (int)bufferPtr->getDescription().memoryClass < 6) + { + cpuAddress = bufferPtr->memOffsetLoc(0); + } + dumpInfo.emplace_back(resource_dump_types::ResourceType::Buffer, buff->getResName(), buff->ressize(), -1, buff->getFlags(), -1, + -1, -1, -1, cpuAddress, gpuAddress); + }); + + // Ray Acceleration Structures +#if D3D_HAS_RAY_TRACING + WinAutoLock lk(Globals::Mem::mutex); + + Globals::Mem::res.iterateAllocated([&](RaytraceAccelerationStructure *rayAS) { + dumpInfo.emplace_back(resource_dump_types::ResourceType::RtAccel, rayAS->getDescription().size, -1, + rayAS->getDescription().isTopLevel); + }); +#endif + return 1; +#else + return 0; +#endif + } default: break; }; diff --git a/prog/engine/drv/drv3d_vulkan/d3d/framebuffer.cpp b/prog/engine/drv/drv3d_vulkan/d3d/framebuffer.cpp index eb6e1c5a6..4570cf104 100644 --- a/prog/engine/drv/drv3d_vulkan/d3d/framebuffer.cpp +++ b/prog/engine/drv/drv3d_vulkan/d3d/framebuffer.cpp @@ -151,9 +151,9 @@ bool d3d::set_depth(BaseTexture *tex, int layer, DepthAccess access) return true; } -bool d3d::set_render_target(int ri, Texture *tex, int level) { return d3d::set_render_target(ri, tex, 0, level); } +bool d3d::set_render_target(int ri, Texture *tex, uint8_t level) { return d3d::set_render_target(ri, tex, 0, level); } -bool d3d::set_render_target(int ri, BaseTexture *tex, int layer, int level) +bool d3d::set_render_target(int ri, BaseTexture *tex, int layer, uint8_t level) { G_ASSERTF(ri >= 0, "vulkan: no meaning of negative render target index is present"); @@ -242,7 +242,7 @@ bool d3d::get_target_size(int &w, int &h) return d3d::get_render_target_size(w, h, nullptr, 0); } -bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) +bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, uint8_t level) { if (!rt_tex) { @@ -252,7 +252,7 @@ bool d3d::get_render_target_size(int &w, int &h, BaseTexture *rt_tex, int lev) } else { - const VkExtent3D &size = cast_to_texture_base(*rt_tex).getMipmapExtent(lev); + const VkExtent3D &size = cast_to_texture_base(*rt_tex).getMipmapExtent(level); w = size.width; h = size.height; } diff --git a/prog/engine/guiBase/stdGuiRender.cpp b/prog/engine/guiBase/stdGuiRender.cpp index ff54099fe..b08f77729 100644 --- a/prog/engine/guiBase/stdGuiRender.cpp +++ b/prog/engine/guiBase/stdGuiRender.cpp @@ -1043,12 +1043,15 @@ struct RecorderCallback { SmallTab &qv; SmallTab &texQCnt; + SmallTab &texSamplers; int missingGlyphs = 0; bool checkVis = false; - RecorderCallback(SmallTab &_qv, SmallTab &_tex_qcnt, bool cv) : qv(_qv), texQCnt(_tex_qcnt), checkVis(cv) + RecorderCallback(SmallTab &_qv, SmallTab &_tex_qcnt, SmallTab &smp, bool cv) : + qv(_qv), texQCnt(_tex_qcnt), texSamplers(smp), checkVis(cv) { qv.resize(0); texQCnt.resize(0); + smp.resize(0); } void *qAlloc(int num) @@ -1059,13 +1062,14 @@ struct RecorderCallback texQCnt.back()++; return &qv[idx]; } - void setTex(TEXTUREID tex_id) + void setTex(TEXTUREID tex_id, d3d::SamplerHandle smp) { if (texQCnt.size() < 2 || texQCnt[texQCnt.size() - 2] != tex_id.index()) { G_ASSERTF(tex_id != BAD_TEXTUREID && tex_id.index() < 0x10000, "tex_idx=0x%x", tex_id); texQCnt.push_back(tex_id.index()); texQCnt.push_back(0); + texSamplers.push_back(smp); } } }; @@ -1730,7 +1734,7 @@ void GuiContext::set_textures(TEXTUREID tex_id, d3d::SamplerHandle smp_id, TEXTU bool tex_in_linear) { if (recCb) - return recCb->setTex(tex_id); + return recCb->setTex(tex_id, smp_id); curQuadMask = font_l8 ? 0x00000001 : (tex_id == BAD_TEXTUREID ? 0x00010001 : 0x00010000); bool update = false; @@ -3705,14 +3709,14 @@ void GuiContext::draw_str_scaled(real scale, const char *str, int len) return draw_str_scaled_u(scale, tmpU16, len); } -bool GuiContext::draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, float scale, - const char *str, int len) +bool GuiContext::draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, + SmallTab &out_smp, unsigned dsb_flags, float scale, const char *str, int len) { CVT_TO_UTF16_ON_STACK(tmpU16, str, len); - return draw_str_scaled_u_buf(out_qv, out_tex_qcnt, dsb_flags, scale, tmpU16); + return draw_str_scaled_u_buf(out_qv, out_tex_qcnt, out_smp, dsb_flags, scale, tmpU16); } -bool GuiContext::draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, float scale, - const wchar_t *str, int len) +bool GuiContext::draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, + SmallTab &out_smp, unsigned dsb_flags, float scale, const wchar_t *str, int len) { if (!str || !len || !*str) { @@ -3722,7 +3726,7 @@ bool GuiContext::draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_qv, SmallTab buf_qv, dag::ConstSpan tex_qcnt, unsigned dsb_flags) +void GuiContext::render_str_buf(dag::ConstSpan buf_qv, dag::ConstSpan tex_qcnt, + dag::ConstSpan samplers, unsigned dsb_flags) { if (tex_qcnt.size() < 3 || tex_qcnt[0] != dyn_font_atlas_reset_generation) return; @@ -3776,15 +3781,16 @@ void GuiContext::render_str_buf(dag::ConstSpan buf_qv, dag::ConstSpan } const GuiVertex *cur_qv = buf_qv.data(); - for (const uint16_t *tq = &tex_qcnt[1], *tq_end = tex_qcnt.data() + tex_qcnt.size(); tq < tq_end; tq += 2) + const d3d::SamplerHandle *cur_smp = samplers.data(); + for (const uint16_t *tq = &tex_qcnt[1], *tq_end = tex_qcnt.data() + tex_qcnt.size(); tq < tq_end; tq += 2, cur_smp++) { int full_qnum = tq[1]; if (!full_qnum) continue; TEXTUREID font_tid = D3DRESID::fromIndex(tq[0]); - update_font_fx_tex(*this, font_tid, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs - // TODO: Use actual sampler IDs - set_textures(font_tid, d3d::INVALID_SAMPLER_HANDLE, BAD_TEXTUREID, d3d::INVALID_SAMPLER_HANDLE, true); + d3d::SamplerHandle font_smp = *cur_smp; + update_font_fx_tex(*this, font_tid, font_smp); + set_textures(font_tid, font_smp, BAD_TEXTUREID, d3d::INVALID_SAMPLER_HANDLE, true); while (full_qnum > 0) { int qnum = full_qnum < qCacheCapacity() ? full_qnum : qCacheCapacity(), qunused = 0; @@ -4356,19 +4362,20 @@ void draw_str_scaled(real scale, const char *str, int len) { stdgui_context.draw void draw_str_scaled_u(real scale, const wchar_t *str, int len) { stdgui_context.draw_str_scaled_u(scale, str, len); } void draw_inscription_scaled(real scale, const char *str, int len) { stdgui_context.draw_inscription_scaled(scale, str, len); } void draw_inscription(uint32_t inscr_handle, float over_scale) { stdgui_context.draw_inscription(inscr_handle, over_scale); } -bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const wchar_t *str, int len) +bool draw_str_scaled_u_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const wchar_t *str, int len) { - return stdgui_context.draw_str_scaled_u_buf(out_qv, out_tex_qcnt, dsb_flags, scale, str, len); + return stdgui_context.draw_str_scaled_u_buf(out_qv, out_tex_qcnt, out_smp, dsb_flags, scale, str, len); } -bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, unsigned dsb_flags, real scale, - const char *str, int len) +bool draw_str_scaled_buf(SmallTab &out_qv, SmallTab &out_tex_qcnt, SmallTab &out_smp, + unsigned dsb_flags, real scale, const char *str, int len) { - return stdgui_context.draw_str_scaled_buf(out_qv, out_tex_qcnt, dsb_flags, scale, str, len); + return stdgui_context.draw_str_scaled_buf(out_qv, out_tex_qcnt, out_smp, dsb_flags, scale, str, len); } -void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, unsigned dsb_flags) +void render_str_buf(dag::ConstSpan qv, dag::ConstSpan tex_qcnt, dag::ConstSpan smp, + unsigned dsb_flags) { - stdgui_context.render_str_buf(qv, tex_qcnt, dsb_flags); + stdgui_context.render_str_buf(qv, tex_qcnt, smp, dsb_flags); } //*********************************************************************** @@ -4378,10 +4385,9 @@ void draw_inscription_v(float scale, const char *fmt, const DagorSafeArg *arg, i stdgui_context.draw_inscription_v(scale, fmt, arg, anum); } void draw_timestr(unsigned int ms) { stdgui_context.draw_timestr(ms); } -void set_textures(TEXTUREID tex_id, TEXTUREID tex_id2, bool font_l8) +void set_textures(TEXTUREID tex_id, d3d::SamplerHandle smp_id, TEXTUREID tex_id2, d3d::SamplerHandle smp_id2, bool font_l8) { - // TODO: Use actual sampler IDs - stdgui_context.set_textures(tex_id, d3d::INVALID_SAMPLER_HANDLE, tex_id2, d3d::INVALID_SAMPLER_HANDLE, font_l8); + stdgui_context.set_textures(tex_id, smp_id, tex_id2, smp_id2, font_l8); } }; // namespace StdGuiRender diff --git a/prog/engine/imgui/imguiImpl.cpp b/prog/engine/imgui/imguiImpl.cpp index c8d01bd83..93f399aa1 100644 --- a/prog/engine/imgui/imguiImpl.cpp +++ b/prog/engine/imgui/imguiImpl.cpp @@ -720,7 +720,7 @@ void imgui_perform_registered(bool with_menu_bar) q->opened = load_window_opened(q->name); if (q->opened) { - G_ASSERTF_CONTINUE("Registered ImGui window function is null: %s/%s", q->group, q->name); + G_ASSERTF_CONTINUE(q->function, "Registered ImGui window function is null: %s/%s", q->group, q->name); bool oldOpened = true; // q->opened == true here ImGui::Begin(q->name, &q->opened, q->flags); if (q->opened != oldOpened) diff --git a/prog/engine/imgui/util/imguiImage.cpp b/prog/engine/imgui/util/imguiImage.cpp index ef5ebec53..b533b6e28 100644 --- a/prog/engine/imgui/util/imguiImage.cpp +++ b/prog/engine/imgui/util/imguiImage.cpp @@ -2,6 +2,16 @@ #include #include +#include + +static void set_sampler_cb(const ImDrawList *, const ImDrawCmd *cmd) +{ + d3d::SamplerHandle smp = (d3d::SamplerHandle)(uintptr_t)cmd->UserCallbackData; + static int imgui_tex_samplerstateVarId = ::get_shader_variable_id("imgui_tex_samplerstate", true); + ShaderGlobal::set_sampler(imgui_tex_samplerstateVarId, smp); +} + +void ImGuiDagor::Sampler(d3d::SamplerHandle smp) { ImGui::GetWindowDrawList()->AddCallback(set_sampler_cb, (void *)smp); } void ImGuiDagor::Image(const TEXTUREID &id, float aspect, const ImVec2 &uv0, const ImVec2 &uv1) { diff --git a/prog/engine/ioSys/dataBlock/blk_parser.cpp b/prog/engine/ioSys/dataBlock/blk_parser.cpp index a9539a55b..2e3076852 100644 --- a/prog/engine/ioSys/dataBlock/blk_parser.cpp +++ b/prog/engine/ioSys/dataBlock/blk_parser.cpp @@ -62,6 +62,7 @@ class DataBlockParser int curLine; const char *curLineP; Tab includeStack; + Tab includeStackPrevCurLine; DataBlock *blkRef = nullptr; bool robustParsing; bool wasNewlineAfterStatement = false; @@ -96,10 +97,12 @@ class DataBlockParser void updatePointers() { int pos = curp - text; + int pos_ln = curLineP - text; text = &buffer[0]; textend = text + buffer.size() - 1; curp = text + pos; + curLineP = text + pos_ln; } void syntaxError(const char *msg) @@ -166,6 +169,8 @@ bool DataBlockParser::skipWhite(bool allow_crlf, bool track_newline_after_param) { includeStack.pop_back(); fileName = includeStack.back(); + curLine = includeStackPrevCurLine.back(); + includeStackPrevCurLine.pop_back(); } continue; } @@ -235,6 +240,19 @@ bool DataBlockParser::skipWhite(bool allow_crlf, bool track_newline_after_param) if (--cnt <= 0) break; } + else if (*curp == '\r') + { + if (*(curp + 1) == '\n') + { + curp += 2; + INC_CURLINE; + } + } + else if (*curp == '\n') + { + curp++; + INC_CURLINE; + } else ++curp; } @@ -1420,6 +1438,7 @@ bool DataBlockParser::parse(DataBlock &blk, bool isTop) // We have to cache 'filename' here because 'getValue()' might incorrectly change it // in case when this include is last one in file (which breaks relative pathes) String cachedFileName(fileName); + int include_curLine = curLine; value.clear(); if (!getValue(value)) return false; @@ -1435,8 +1454,6 @@ bool DataBlockParser::parse(DataBlock &blk, bool isTop) if (*valueStr.str() != '%') makeFullPathFromRelative(valueStr, cachedFileName.str()); - const char *baseFileName = cachedFileName.str(); - if (fnotify) fnotify->onFileLoaded(valueStr); @@ -1446,20 +1463,27 @@ bool DataBlockParser::parse(DataBlock &blk, bool isTop) file_ptr_t h = df_open(valueStr, DF_READ | (robustParsing ? DF_IGNORE_MISSING : 0)); if (!h) { - logerr("can't open include file '%s' for '%s'", valueStr.str(), baseFileName); - SYNTAX_ERROR("can't open include file"); + includeStack.pop_back(); + fileName = includeStack.back(); + blkRef->issue_error_parsing(cachedFileName, include_curLine, String(0, "can't open include file '%s'", valueStr), " "); + return false; } - (void)baseFileName; int len = df_length(h); if (len < 0) { df_close(h); - SYNTAX_ERROR("error loading include file"); + includeStack.pop_back(); + fileName = includeStack.back(); + blkRef->issue_error_parsing(cachedFileName, include_curLine, String(0, "error loading include file '%s'", valueStr), " "); + return false; } + includeStackPrevCurLine.push_back(curLine); + curLine = 1; + erase_items(buffer, start - text, curp - start - 1); - curp = start; + curLineP = curp = start; *(char *)curp = EOF_CHAR; int pos = curp - text; @@ -1472,11 +1496,9 @@ bool DataBlockParser::parse(DataBlock &blk, bool isTop) SYNTAX_ERROR("error loading include file"); } - if ( - (len > 1 && buffer[pos] >= dblk::BBF_full_binary_in_stream && buffer[pos] <= dblk::BBF_binary_with_shared_nm_zd) || // new - // binary - // formats - (len >= 4 && *(int *)&buffer[pos] == _MAKE4C('BBF'))) // old BBF3 format + if ((/*new binaryformats*/ len > 1 && buffer[pos] >= dblk::BBF_full_binary_in_stream && + buffer[pos] <= dblk::BBF_binary_with_shared_nm_zd) || + (/* old BBF3 format */ len >= 4 && *(int *)&buffer[pos] == _MAKE4C('BBF'))) { logwarn("including binary file '%s', not fastest codepath", valueStr.str()); diff --git a/prog/engine/ioSys/dataBlock/blk_zstd.cpp b/prog/engine/ioSys/dataBlock/blk_zstd.cpp index ba9057e97..4e835d191 100644 --- a/prog/engine/ioSys/dataBlock/blk_zstd.cpp +++ b/prog/engine/ioSys/dataBlock/blk_zstd.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,9 @@ enum { SNM_HSZ = 8, DICT_HSZ = 32, - SNM_RAW_HDR_SZ = SNM_HSZ + DICT_HSZ + SNM_RAW_HDR_SZ = SNM_HSZ + DICT_HSZ, + DEFAULT_COMPRESSION_LEVEL = 18, + MIN_SIZE_TO_COMPRESS_UNCONDITIONALLY = 128 }; struct SharedNameMapRec @@ -224,6 +227,48 @@ ZSTD_CDict_s *dblk::create_vromfs_blk_cdict(const VirtualRomFsData *fs, int comp return zstd_create_cdict(dag::ConstSpan(fs->data[idx].data(), data_size(fs->data[idx])), compr_level); } +void dblk::pack_shared_nm_dump_to_stream(IGenSave &cwr, IGenLoad &crd, int sz, int compr_level, const ZSTD_CDict_s *cdict) +{ + if (sz >= MIN_SIZE_TO_COMPRESS_UNCONDITIONALLY) + { + if (cdict) + { + cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm_zd); + zstd_stream_compress_data_with_dict(cwr, crd, sz, compr_level, cdict); + } + else + { + cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm_z); + zstd_stream_compress_data(cwr, crd, sz, compr_level); + } + return; + } + + MemorySaveCB mcwr(256); + const int posOnStart = crd.tell(); + if (cdict) + zstd_stream_compress_data_with_dict(mcwr, crd, sz, compr_level, cdict); + else + zstd_stream_compress_data(mcwr, crd, sz, compr_level); + + const int plainSize = crd.tell() - posOnStart; // can't use sz, it can be negative to autodetect size + if (mcwr.getSize() > plainSize) + { + cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm); + crd.seekto(posOnStart); + copy_stream_to_stream(crd, cwr, plainSize); + return; + } + + cwr.writeIntP<1>(cdict ? dblk::BBF_binary_with_shared_nm_zd : dblk::BBF_binary_with_shared_nm_z); + mcwr.copyDataTo(cwr); +} + +void dblk::pack_shared_nm_dump_to_stream(IGenSave &cwr, IGenLoad &crd, int sz, const ZSTD_CDict_s *cdict) +{ + dblk::pack_shared_nm_dump_to_stream(cwr, crd, sz, DEFAULT_COMPRESSION_LEVEL, cdict); +} + bool DataBlock::saveBinDumpWithSharedNamemap(IGenSave &cwr, const DBNameMap *shared_nm, bool pack, const ZSTD_CDict_s *dict) const { if (!pack) @@ -236,34 +281,10 @@ bool DataBlock::saveBinDumpWithSharedNamemap(IGenSave &cwr, const DBNameMap *sha if (!saveDumpToBinStream(mcwr, shared_nm)) return false; MemoryLoadCB mcrd(mcwr.getMem(), false); - - if (dict) - { - if (mcrd.getTargetDataSize() >= 128) - { - cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm_zd); - zstd_stream_compress_data_with_dict(cwr, mcrd, mcrd.getTargetDataSize(), 18, dict); - return true; - } - - MemorySaveCB mcwr2(256); - zstd_stream_compress_data_with_dict(mcwr2, mcrd, mcrd.getTargetDataSize(), 18, dict); - if (mcwr2.getSize() > mcrd.getTargetDataSize()) - { - cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm); - mcwr.copyDataTo(cwr); - return true; - } - - cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm_zd); - mcwr2.copyDataTo(cwr); - return true; - } - - cwr.writeIntP<1>(dblk::BBF_binary_with_shared_nm_z); - zstd_stream_compress_data(cwr, mcrd, 18); + dblk::pack_shared_nm_dump_to_stream(cwr, mcrd, mcrd.getTargetDataSize(), dict); return true; } + bool DataBlock::loadBinDumpWithSharedNamemap(IGenLoad &crd, const DBNameMap *shared_nm, const ZSTD_DDict_s *dict) { unsigned label = crd.readIntP<1>(); @@ -293,7 +314,7 @@ void dblk::pack_to_stream(const DataBlock &blk, IGenSave &cwr, int approx_sz) cwr.writeInt(0); MemoryLoadCB mcrd(mcwr.getMem(), false); - zstd_stream_compress_data(cwr, mcrd, mcrd.getTargetDataSize(), 18); + zstd_stream_compress_data(cwr, mcrd, mcrd.getTargetDataSize(), DEFAULT_COMPRESSION_LEVEL); unsigned sz = cwr.tell() - pos - 4; cwr.seekto(pos); diff --git a/prog/engine/lib3d/picMgr.cpp b/prog/engine/lib3d/picMgr.cpp index 2be76c97a..fbb83ef80 100644 --- a/prog/engine/lib3d/picMgr.cpp +++ b/prog/engine/lib3d/picMgr.cpp @@ -157,13 +157,23 @@ struct AtlasData struct TexRec { TEXTUREID texId; + d3d::SamplerHandle smpId; int nameId : 24; unsigned ownedTex : 1, flags : 7; int refCount; AtlasData *ad; Point2 size; - TexRec(int name_id) : texId(BAD_TEXTUREID), nameId(name_id), ownedTex(0), flags(0), refCount(-1), ad(NULL), size(0, 0) {} + TexRec(int name_id) : + texId(BAD_TEXTUREID), + smpId(d3d::INVALID_SAMPLER_HANDLE), + nameId(name_id), + ownedTex(0), + flags(0), + refCount(-1), + ad(NULL), + size(0, 0) + {} ~TexRec() { G_ASSERT_LOG(refCount <= 1, "refCount(%s)=%d{%d}", getName(), refCount, get_managed_texture_refcount(texId)); @@ -266,6 +276,7 @@ struct AsyncPicLoadJob : public cpujobs::IJob Point2 *outTc0, *outTc1, *outSz, tc0S, tc1S, szS; PICTUREID picId; TEXTUREID outTexId; + d3d::SamplerHandle smpId; bool premulAlpha = false; bool jobDone; JobType jtype; @@ -284,6 +295,7 @@ struct AsyncPicLoadJob : public cpujobs::IJob done_arg(arg), jobDone(false), outTexId(BAD_TEXTUREID), + smpId(d3d::INVALID_SAMPLER_HANDLE), outTc0(out_tc0 ? out_tc0 : &tc0S), outTc1(out_tc1 ? out_tc1 : &tc1S), outSz(out_sz ? out_sz : &szS) @@ -309,12 +321,12 @@ struct AsyncPicLoadJob : public cpujobs::IJob } virtual unsigned getJobTag() { return _MAKE4C('PICM'); }; - TEXTUREID doJobSync() + eastl::pair doJobSync() { done_cb = NULL; doJob(); finalizeJob(); - return outTexId; + return {outTexId, smpId}; } protected: @@ -336,12 +348,13 @@ struct AsyncPicLoadJob : public cpujobs::IJob return; } outTexId = texRec[getTexRecIdx(picId)]->texId; + smpId = texRec[getTexRecIdx(picId)]->smpId; if (outTexId != BAD_TEXTUREID) reportErr = 101; // we can report texture as done and then try reload it later on demand } if (jobDone || reportErr == 101) - (*done_cb)(picId, outTexId, d3d::INVALID_SAMPLER_HANDLE, outTc0, outTc1, outSz, done_arg); // TODO: Use actual sampler IDs + (*done_cb)(picId, outTexId, smpId, outTc0, outTc1, outSz, done_arg); else (*done_cb)(reportErr == 100 ? picId : BAD_PICTUREID, BAD_TEXTUREID, d3d::INVALID_SAMPLER_HANDLE, NULL, NULL, NULL, done_arg); // report abort/error @@ -408,6 +421,7 @@ static bool searchBlkBeforeTaBin = true; static bool dynAtlasLazyAllocDef = false; static Texture *texTransp[AtlasData::FMT_none * 2] = {NULL}; static TEXTUREID substOnePixelTexId = BAD_TEXTUREID; +static d3d::SamplerHandle substOnePixelSmpId = d3d::INVALID_SAMPLER_HANDLE; } // namespace PictureManager namespace PictureManager @@ -955,6 +969,7 @@ void PictureManager::init(const DataBlock *params) Texture *onePixelTex = d3d::create_tex(image, 1, 1, TEXCF_RGB | TEXCF_LOADONCE | TEXCF_SYSTEXCOPY, 1, "picMgr$stub"); d3d_err(onePixelTex); substOnePixelTexId = register_managed_tex("picMgr$stub", onePixelTex); + substOnePixelSmpId = d3d::request_sampler({}); create_critical_section(critSec); for (PictureRenderFactory *f = PictureRenderFactory::tail; f; f = f->next) @@ -1122,6 +1137,7 @@ PICTUREID PictureManager::add_picture(BaseTexture *tex, const char *as_name, boo return BAD_PICTUREID; tr.refCount = 1; tr.texId = register_managed_tex(as_name, tex); + tr.smpId = d3d::request_sampler({}); tr.ownedTex = 1; G_ASSERTF(tr.texId != BAD_TEXTUREID, "tex=%p as_name=%s", tex, as_name); @@ -1133,11 +1149,12 @@ PICTUREID PictureManager::add_picture(BaseTexture *tex, const char *as_name, boo return makePicId(tex_rec_idx, 0); } -bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id, TEXTUREID &out_tex_id, Point2 *out_tc0, - Point2 *out_tc1, Point2 *out_sz, async_load_done_cb_t done_cb, void *cb_arg) +bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id, TEXTUREID &out_tex_id, + d3d::SamplerHandle &out_smp_id, Point2 *out_tc0, Point2 *out_tc1, Point2 *out_sz, async_load_done_cb_t done_cb, void *cb_arg) { out_pic_id = BAD_PICTUREID; out_tex_id = BAD_TEXTUREID; + out_smp_id = d3d::INVALID_SAMPLER_HANDLE; if (!file_name || !*file_name) return true; @@ -1166,6 +1183,7 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id { out_pic_id = makePicId(tex_rec_idx, tr.ad->atlas.getItemIdx(d), tr.ad->dynamic); out_tex_id = tr.texId; + out_smp_id = tr.smpId; if (out_tc0) out_tc0->set(d->u0, d->v0); if (out_tc1) @@ -1207,6 +1225,7 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id } out_pic_id = makePicId(tex_rec_idx, tr.ad->atlas.getItemIdx(d), true); out_tex_id = BAD_TEXTUREID; + out_smp_id = d3d::INVALID_SAMPLER_HANDLE; j = new AsyncPicLoadJob(AsyncPicLoadJob::JT_picInAtlas, out_pic_id, tr.ad->makeAbsFn(fn), out_tc0, out_tc1, out_sz, done_cb, cb_arg); @@ -1215,7 +1234,9 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id if (!done_cb || asyncLoadJobMgr < 0) { lock.unlockFinal(); - out_tex_id = j->doJobSync(); + const auto res = j->doJobSync(); + out_tex_id = res.first; + out_smp_id = res.second; delete j; return true; } @@ -1236,6 +1257,7 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id } out_pic_id = makePicId(tex_rec_idx, 0); out_tex_id = tr.texId; + out_smp_id = tr.smpId; if (tr.refCount != -1 && (tr.texId != BAD_TEXTUREID || tr.size.y > 0)) { tr.addRef(); @@ -1276,7 +1298,9 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id if (!done_cb || asyncLoadJobMgr < 0 || tr.texId != BAD_TEXTUREID) { lock.unlockFinal(); - out_tex_id = j->doJobSync(); + const auto res = j->doJobSync(); + out_tex_id = res.first; + out_smp_id = res.second; delete j; if (add_quard_ref) release_managed_tex(tex_id); @@ -1289,6 +1313,7 @@ bool PictureManager::get_picture_ex(const char *file_name, PICTUREID &out_pic_id G_VERIFY(cpujobs::add_job(asyncLoadJobMgr, j)); out_pic_id = BAD_PICTUREID; acquire_managed_tex(out_tex_id = substOnePixelTexId); + out_smp_id = substOnePixelSmpId; return false; } @@ -1439,11 +1464,12 @@ void PictureManager::add_ref_picture(PICTUREID pid) } void PictureManager::get_picture(const char *file_name, PicDesc &out_pic) { - if (!PictureManager::get_picture_ex(file_name, out_pic.pic, out_pic.tex, &out_pic.tcLt, &out_pic.tcRb)) + if (!PictureManager::get_picture_ex(file_name, out_pic.pic, out_pic.tex, out_pic.smp, &out_pic.tcLt, &out_pic.tcRb)) { PICMGR_DEBUG("PM: get_picture(%s) failed", file_name); out_pic.pic = BAD_PICTUREID; out_pic.tex = BAD_TEXTUREID; + out_pic.smp = d3d::INVALID_SAMPLER_HANDLE; } } @@ -1598,6 +1624,7 @@ bool PictureManager::TexRec::initAtlas() G_ASSERT(!bc_format || ad->atlas.getCornerResvSz() == 4); G_ASSERT(!bc_format || ad->atlas.getMarginLtOfs() == 0); texId = ad->atlas.tex.first.getId(); + smpId = ad->atlas.tex.second; if (ad->maxAllowedPicSz.x > sz.x - ad->atlas.getMargin()) ad->maxAllowedPicSz.x = sz.x - ad->atlas.getMargin(); if (ad->maxAllowedPicSz.y > sz.y - ad->atlas.getMargin()) @@ -1634,6 +1661,7 @@ bool PictureManager::TexRec::initAtlas() texId = get_managed_texture_id(validTexName); // already exist? if (texId == BAD_TEXTUREID) texId = add_managed_texture(validTexName); + smpId = get_texture_separate_sampler(texId); refCount = 0; G_ASSERTF(texId != BAD_TEXTUREID, "'%s'", validTexName); @@ -1944,6 +1972,7 @@ void PictureManager::AsyncPicLoadJob::loadTexPic() outTexId = add_managed_texture(name); BaseTexture *tex = acquire_managed_tex(outTexId); + smpId = get_texture_separate_sampler(outTexId); TextureInfo ti; if (!tex || tex->restype() != RES3D_TEX || !tex->getinfo(ti)) ti.w = ti.h = 0; @@ -2052,6 +2081,7 @@ void PictureManager::AsyncPicLoadJob::loadTexPic() outTc1->set(1, 1); outSz->set(ti.w, ti.h); tr.texId = outTexId; + tr.smpId = smpId; tr.addRef(); jobDone = true; interlocked_decrement(numJobsInFlight); @@ -2068,6 +2098,7 @@ void PictureManager::AsyncPicLoadJob::discardUndonePic() void PictureManager::AsyncPicLoadJob::finalizePic(DynamicPicAtlas::ItemData *d, TexRec &tr) { outTexId = tr.texId; + smpId = tr.smpId; if (d->valid()) { outTc0->set(d->u0, d->v0); diff --git a/prog/engine/lib3d/texMgrMem.cpp b/prog/engine/lib3d/texMgrMem.cpp index 1281b3c0a..029526590 100644 --- a/prog/engine/lib3d/texMgrMem.cpp +++ b/prog/engine/lib3d/texMgrMem.cpp @@ -542,7 +542,8 @@ static void free_up_gpu_mem(int mem_to_free_kb, int actual_quota_kb) if (RMGR.downgradeTexQuality(i, *t, RMGR.resQS[i].getMaxLev())) { downgraded++; - RMGR.dumpTexState(i); + if (mgr_log_level >= 2) + RMGR.dumpTexState(i); if (RMGR.getTotalUsedTexSzKB() < target_tex_size) break; } diff --git a/prog/engine/math/mathAng.cpp b/prog/engine/math/mathAng.cpp index c9f94e9c0..98d306f1e 100644 --- a/prog/engine/math/mathAng.cpp +++ b/prog/engine/math/mathAng.cpp @@ -9,8 +9,8 @@ //============================================================================== void euler_to_quat(real heading, real attitude, real bank, Quat &quat) { - vec4f angles = v_make_vec4f(heading, attitude, bank, bank); - v_stu(&quat.x, v_quat_from_euler(angles)); + vec3f angles = v_make_vec3f(bank, heading, attitude); + v_stu(&quat.x, v_quat_from_euler_yzx(angles)); } void euler_heading_to_quat(real heading, Quat &quat) diff --git a/prog/engine/osApiWrappers/namedMounts.cpp b/prog/engine/osApiWrappers/namedMounts.cpp index 3b0f38489..a3358ede4 100644 --- a/prog/engine/osApiWrappers/namedMounts.cpp +++ b/prog/engine/osApiWrappers/namedMounts.cpp @@ -87,7 +87,7 @@ const char *dd_resolve_named_mount_in_path(const char *fpath, const char *&mnt_p { if ((mnt_path = dd_get_named_mount_path(fpath + 1)) != nullptr) return ""; - logerr("named mount <%.*s> not set", fpath + 1); + logerr("named mount <%s> not set", fpath + 1); } } mnt_path = ""; diff --git a/prog/engine/shaders/concurrentElementPool.h b/prog/engine/shaders/concurrentElementPool.h new file mode 100644 index 000000000..33b34db38 --- /dev/null +++ b/prog/engine/shaders/concurrentElementPool.h @@ -0,0 +1,311 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. +#pragma once + +#include +#include +#include +#include +#include + + +namespace concurrent_element_pool_detail +{ +// Strong typedef required to specialize dag::is_type_relocatable without any issues. +template +struct FixedArray : eastl::unique_ptr +{}; +} // namespace concurrent_element_pool_detail + +template +struct dag::is_type_relocatable> : eastl::true_type +{}; + +/// @brief This is a pool of `T`s. Elements of it are guaranteed to be stable in memory +/// after allocation, which allows for concurrent indexing and allocation. It is also possible to +/// iterate it, but not concurrently with allocate. +/// +/// @tparam I A strong typedef (enum class) to use as an index into this pool. +/// @tparam T The type of the elements in the pool. +/// @tparam INITIAL_CAPACITY_LOG2 Log2 of the initial capacity of the pool. +/// @tparam BUCKET_COUNT Amount of buckets we are going to use. +template +class ConcurrentElementPool +{ + static_assert(eastl::is_enum_v, "I must be an enum class!"); + static constexpr uint32_t INITIAL_CAPACITY = 1u << INITIAL_CAPACITY_LOG2; + static constexpr uint32_t OFFSET_BITS_FOR_FIRST_BUCKET = INITIAL_CAPACITY_LOG2; + static constexpr uint32_t BUCKET_AND_OFFSET_BITS = sizeof(eastl::underlying_type_t) * CHAR_BIT; + static constexpr uint32_t MAX_BUCKET_COUNT = BUCKET_AND_OFFSET_BITS - OFFSET_BITS_FOR_FIRST_BUCKET - 1; + static_assert(BUCKET_COUNT > 0, "BUCKET_COUNT must be non-zero!"); + static_assert(BUCKET_COUNT <= MAX_BUCKET_COUNT, "BUCKET_COUNT must be less than MAX_BUCKET_COUNT"); + static_assert(MAX_BUCKET_COUNT <= 255, "MAX_BUCKET_COUNT must fit into a byte!"); + static_assert(eastl::to_underlying(I::Invalid) == 0, "Invalid ID must be represented as 0!"); + static_assert(sizeof(I) <= sizeof(uint32_t), "I must fit into a uint32_t!"); + static_assert(eastl::is_unsigned_v>, "I must be represented via an unsigned type!"); + + template + class Iterator; + +public: + using iterator = Iterator; + using const_iterator = Iterator; + + /// Identifier for elements of this pool. + /// @warning the identifiers are NOT sequential, use toIndex and + /// fromIndex to convert to/from sequential indices. + using Id = I; + + ConcurrentElementPool() + { + buckets.reserve(BUCKET_COUNT); + buckets.emplace_back().reset(new T[INITIAL_CAPACITY]{}); + } + + ConcurrentElementPool(const ConcurrentElementPool &) = delete; + ConcurrentElementPool &operator=(const ConcurrentElementPool &) = delete; + + ConcurrentElementPool(ConcurrentElementPool &&other) : + buckets{eastl::move(other.buckets)}, + firstFreeInLastBucket{eastl::exchange(other.firstFreeInLastBucket, 0)}, + totalElems{eastl::exchange(other.totalElems, 0)} + {} + + ConcurrentElementPool &operator=(ConcurrentElementPool &&other) + { + if (this == &other) + return *this; + + buckets = eastl::move(other.buckets); + firstFreeInLastBucket = eastl::exchange(other.firstFreeInLastBucket, 0); + totalElems = eastl::exchange(other.totalElems, 0); + + return *this; + } + + + /// @brief Allocates an element in the pool + /// @warning If the amount of elements exceeds 2^INITIAL_CPACITY + ... + 2^(INITIAL_CAPACITY + BUCKET_COUNT - 1), + /// you will get a logerr, a data race, and possibly a crash. + /// @return The index of the allocated element. + Id allocate() + { + if (DAGOR_UNLIKELY(firstFreeInLastBucket >= capacity(buckets.size() - 1))) + { + T *newBucket = new T[capacity(buckets.size())]{}; + buckets.emplace_back().reset(newBucket); + if (DAGOR_UNLIKELY(buckets.size() > BUCKET_COUNT)) + logerr("Too many allocations in ElementPool! This is a data race! Expect crashes!"); + firstFreeInLastBucket = 0; + } + + const auto result = make_index(buckets.size() - 1, firstFreeInLastBucket); + + ++firstFreeInLastBucket; + ++totalElems; + + return result; + } + + /// @brief Pre-allocates elements such that indices up to and including \p id are valid. + /// @param id The index to pre-allocate up to. + void ensureSpace(Id id) + { + const auto [bucket, offset] = break_index(id); + while (buckets.size() <= bucket || firstFreeInLastBucket <= offset) + allocate(); + } + + /// @brief returns the total number of elements allocated. + /// @warning Cannot be called concurrently with allocate. + /// @return The total number of elements allocated. + uint32_t totalElements() const { return totalElems; } + + /// @brief accesses an element. + /// @param id The index of an element. + /// @return A reference to the element. + const T &operator[](Id id) const + { + const auto [bucket, offset] = break_index(id); + return buckets[bucket][offset]; + } + + /// @brief accesses an element. + /// @param id The index of an element. + /// @return A reference to the element. + T &operator[](Id id) + { + const auto [bucket, offset] = break_index(id); + return buckets[bucket][offset]; + } + + /// @brief returns a sequential index corresponding to the given Id + /// @param id The Id to convert to an index + /// @return The index corresponding to the Id + static eastl::underlying_type_t to_index(Id id) + { + const auto [bucket, offset] = break_index(id); + return INITIAL_CAPACITY * ((1 << bucket) - 1) + offset; + } + + /// @brief Constructs an Id back from an index + /// @param idx The index to convert to an Id + /// @return The Id corresponding to the index + static Id from_index(eastl::underlying_type_t idx) + { + const uint32_t bucket = get_log2i(idx / INITIAL_CAPACITY + 1); + const uint32_t offset = idx - ((1 << bucket) - 1) * INITIAL_CAPACITY; + return make_index(bucket, offset); + } + + iterator begin() { return iterator{this, 0, 0}; } + iterator end() { return iterator{this, buckets.size() - 1, firstFreeInLastBucket}; } + const_iterator begin() const { return const_iterator{this, 0, 0}; } + const_iterator end() const { return const_iterator{this, buckets.size() - 1, firstFreeInLastBucket}; } + const_iterator cbegin() const { return const_iterator{this, 0, 0}; } + const_iterator cend() const { return const_iterator{this, buckets.size() - 1, firstFreeInLastBucket}; } + + /// @brief Clears the pool. + void clear() + { + buckets.clear(); + buckets.emplace_back().reset(new T[INITIAL_CAPACITY]{}); + totalElems = 0; + firstFreeInLastBucket = 0; + } + + /// @brief Iterates over all (id, element) pairs in the pool. + /// @tparam F A callable type that takes an Id and a reference to a T. + /// @param f The callable object to call for each element. + template + void iterateWithIds(const F &f) + { + for (uint32_t i = 0, ie = buckets.size(); i < ie; ++i) + for (uint32_t j = 0, je = size(i); j < je; ++j) + f(make_index(i, j), buckets[i][j]); + } + + /// @brief Finds an element in the pool by a predicate. + /// @tparam P A callable type that takes a const reference to a T and returns a bool. + /// @param p The predicate to use for finding the element. + template + Id findIf(const P &p) const + { + for (uint32_t i = 0, ie = buckets.size(); i < ie; ++i) + for (uint32_t j = 0, je = size(i); j < je; ++j) + if (p(buckets[i][j])) + return make_index(i, j); + return Id::Invalid; + } + +private: + static uint32_t capacity(uint32_t bucket) { return INITIAL_CAPACITY << bucket; } + uint32_t size(uint32_t bucket) const { return bucket == buckets.size() - 1 ? firstFreeInLastBucket : capacity(bucket); } + + static Id make_index(uint8_t bucket, uint16_t offset) + { + G_FAST_ASSERT(bucket < MAX_BUCKET_COUNT && offset < capacity(bucket)); + // NOTE: see break_index for the encoding + return static_cast((uint32_t{1} << (OFFSET_BITS_FOR_FIRST_BUCKET + bucket)) | offset); + } + + static eastl::tuple break_index(Id id) + { + // Format of IDs is as follows: + // 1) Some amount of 0s which encodes the bucket. + // The less we 0s we have, the higher bucket index we mean + // and hence the more bits we have to store the offset into the bucket. + // 2) A single 1 as a separator. + // 3) Offset into the bucket. The amount of bits here is always capacity(bucket). + // + // bucket no. + // ______________ + // | | offset into bkt + // 00000000 0000001y yyyyyyyy yyyyyyyy + G_FAST_ASSERT(id != Id::Invalid); + const uint32_t raw = eastl::to_underlying(id); + const uint32_t zeroBitsCount = __clz_unsafe(raw) - CHAR_BIT * (sizeof(uint32_t) - sizeof(Id)); + const uint8_t bucket = static_cast(MAX_BUCKET_COUNT - zeroBitsCount); + const uint32_t offsetBitsCount = BUCKET_AND_OFFSET_BITS - zeroBitsCount - 1; + const uint16_t offset = static_cast(raw & ((1 << offsetBitsCount) - 1)); + // sanity checks against memory corruption + G_FAST_ASSERT(bucket < MAX_BUCKET_COUNT && offset < capacity(bucket)); + return {bucket, offset}; + } + +private: + dag::RelocatableFixedVector, BUCKET_COUNT> buckets; + uint32_t totalElems = 0; + uint32_t firstFreeInLastBucket = 0; +}; + + +template +template +class ConcurrentElementPool::Iterator +{ + using OwnerPtr = eastl::conditional_t; + + Iterator(OwnerPtr pool, uint32_t bucket_, uint32_t offset_) : pool{pool}, bucket{bucket_}, offset{offset_} {} + + friend class ConcurrentElementPool; + +public: + using difference_type = ptrdiff_t; + using iterator_category = eastl::bidirectional_iterator_tag; + using value_type = T; + using pointer = eastl::conditional_t; + using reference = eastl::conditional_t; + + Iterator() = default; + + Iterator &operator++() + { + if (DAGOR_UNLIKELY(offset + 1 >= ConcurrentElementPool::capacity(bucket))) + { + ++bucket; + offset = 0; + } + else + ++offset; + + return *this; + } + + Iterator operator++(int) + { + Iterator copy = *this; + ++*this; + return copy; + } + + Iterator &operator--() + { + if (DAGOR_UNLIKELY(offset == 0)) + { + --bucket; + offset = ConcurrentElementPool::capacity(bucket) - 1; + } + else + --offset; + + return *this; + } + + Iterator operator--(int) + { + Iterator copy = *this; + --*this; + return copy; + } + + friend bool operator==(const Iterator &fst, const Iterator &snd) { return fst.bucket == snd.bucket && fst.offset == snd.offset; } + friend bool operator!=(const Iterator &fst, const Iterator &snd) { return !(fst == snd); } + + reference operator*() const { return pool->buckets[bucket][offset]; } + pointer operator->() const { return &pool->buckets[bucket][offset]; } + +protected: + OwnerPtr pool; + uint32_t bucket = 0; + uint32_t offset = 0; +}; diff --git a/prog/engine/shaders/concurrentRangePool.h b/prog/engine/shaders/concurrentRangePool.h new file mode 100644 index 000000000..04fa8fe8e --- /dev/null +++ b/prog/engine/shaders/concurrentRangePool.h @@ -0,0 +1,214 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. +#pragma once + +#include +#include +#include +#include +#include + + +namespace concurrent_range_pool_detail +{ +// Strong typedef required to specialize dag::is_type_relocatable without any issues. +template +struct FixedArray : eastl::unique_ptr +{}; +} // namespace concurrent_range_pool_detail + +template +struct dag::is_type_relocatable> : eastl::true_type +{}; + +/// @brief This is a pool for ranges of `T`s. Each range allocated is guaranteed to be contiguous +/// in memory and to NEVER be relocated. This allows one to use it in concurrent code safely in the +/// following manner: one thread always allocates new ranges and "sends" them somehow to other threads. +/// These other threads can then independently work with distinct ranges without any synchronization. +/// +/// @tparam T The type of the elements in the pool. +/// @tparam INITIAL_CAPACITY_LOG2 Log2 of initial capacity of the pool. +/// @tparam BUCKET_COUNT Amount of buckets we are going to use. +/// @tparam ALIGN_TO_CHUNKS If true, ranges will be grouped into chunks of +/// size 2 ^ \p INITIAL_CAPACITY_LOG2 and no range will cross a chunk boundary. +/// This allows for batch-processing of several ranges within a single chunk, +/// e.g., to upload them to a GPU. +template +class ConcurrentRangePool +{ + static constexpr uint32_t INITIAL_CAPACITY = 1u << INITIAL_CAPACITY_LOG2; + static_assert(INITIAL_CAPACITY >= 256, "INITIAL_CAPACITY must be at least 256"); + static constexpr uint32_t OFFSET_BITS_FOR_FIRST_BUCKET = INITIAL_CAPACITY_LOG2; + static constexpr uint32_t BUCKET_AND_OFFSET_BITS = 24; + static constexpr uint32_t MAX_BUCKET_COUNT = BUCKET_AND_OFFSET_BITS - OFFSET_BITS_FOR_FIRST_BUCKET - 1; + static_assert(BUCKET_COUNT > 0, "BUCKET_COUNT must be non-zero!"); + static_assert(BUCKET_COUNT <= MAX_BUCKET_COUNT, "BUCKET_COUNT must be less than MAX_BUCKET_COUNT"); + +public: + /// Compact representation for a range of elements of the pool. + enum class Range : uint32_t + { + /// Invalid range, will cause asserts. + Invalid = 0, + /// Empty range, can be viewed without any problems. + Empty = 1 << OFFSET_BITS_FOR_FIRST_BUCKET, + }; + /// Compact representation for a chunk of INITIAL_CAPACITY elements of this pool, + /// which are comprised of several ranges laid out contiguously in memory. + /// A "tail" of the chunk might not be allocated yet but is guaranteed to contain + /// default-initialized elements (zeros for trivial types). + enum class ChunkIdx : uint32_t + { + }; + + ConcurrentRangePool() + { + buckets.reserve(BUCKET_COUNT); + buckets.emplace_back().reset(new T[INITIAL_CAPACITY]{}); + } + + ConcurrentRangePool(const ConcurrentRangePool &) = delete; + ConcurrentRangePool &operator=(const ConcurrentRangePool &) = delete; + + ConcurrentRangePool(ConcurrentRangePool &&other) : + buckets{eastl::move(other.buckets)}, + firstFreeInLastBucket{eastl::exchange(other.firstFreeInLastBucket, 0)}, + totalElems{eastl::exchange(other.totalElems, 0)} + {} + + ConcurrentRangePool &operator=(ConcurrentRangePool &&other) + { + if (this == &other) + return *this; + + buckets = eastl::move(other.buckets); + firstFreeInLastBucket = eastl::exchange(other.firstFreeInLastBucket, 0); + totalElems = eastl::exchange(other.totalElems, 0); + + return *this; + } + + + /// @brief Allocates a new range of the given size. + /// @warning If the amount of elements exceeds 2^INITIAL_CPACITY + ... + 2^(INITIAL_CAPACITY + BUCKET_COUNT - 1), + /// you will get a logerr, a data race, and possibly a crash. + /// @param size The size of the range to allocate. + Range allocate(uint8_t size) + { + if constexpr (ALIGN_TO_CHUNKS) // Align if we cross chunk boundary + if (firstFreeInLastBucket / INITIAL_CAPACITY != (firstFreeInLastBucket + size) / INITIAL_CAPACITY) + firstFreeInLastBucket = ((firstFreeInLastBucket + INITIAL_CAPACITY - 1) / INITIAL_CAPACITY) * INITIAL_CAPACITY; + + if (DAGOR_UNLIKELY(firstFreeInLastBucket + size >= capacity(buckets.size() - 1))) + { + T *newBucket = new T[capacity(buckets.size())]{}; + buckets.emplace_back().reset(newBucket); + if (DAGOR_UNLIKELY(buckets.size() > BUCKET_COUNT)) + logerr("Too many allocations in RangePool! This is a data race! Expect crashes!"); + firstFreeInLastBucket = 0; + } + + const auto result = make_range(size, buckets.size() - 1, firstFreeInLastBucket); + + firstFreeInLastBucket += size; + totalElems += size; + + return result; + } + + /// @brief returns the size of the range. + /// @param r The range to get the size of. + /// @return The size of the range. + static uint32_t range_size(Range r) { return eastl::get<0>(break_range(r)); } + + /// @brief returns the total number of elements allocated (sum of all range sizes). + /// @warning Cannot be called concurrently with allocate. + /// @warning This is not the same as the total amount of allocated T elements, + /// some of them might be unused. + /// @return The total number of elements allocated. + uint32_t totalElements() const { return totalElems; } + + /// @brief returns a view of the range previously allocated. + /// @param r The range to view. + /// @return A span to the memory of the range. + eastl::span view(Range r) + { + const auto [size, bucket, offset] = break_range(r); + return {buckets[bucket].get() + offset, size}; + } + + /// @brief returns a view of the range previously allocated. + /// @param r The range to view. + /// @return A span to the memory of the range. + eastl::span view(Range r) const + { + const auto [size, bucket, offset] = break_range(r); + return {buckets[bucket].get() + offset, size}; + } + + /// @brief returns an index of the chunk that contains the given range. + /// @note This is only available if ALIGN_TO_CHUNKS is true, and the chunk + /// indices are **sequential**. + /// @param r The range to get the chunk of. + /// @return The chunk that contains \p r. + ChunkIdx chunkOf(Range r) const /* requires ALIGN_TO_CHUNK */ + { + G_FAST_ASSERT(ALIGN_TO_CHUNKS); + const auto [size, bucket, offset] = break_range(r); + G_FAST_ASSERT(size > 0); + return ChunkIdx{(1 << bucket) - 1 + offset / INITIAL_CAPACITY}; + } + + /// @brief returns a view of the chunk. Elements in the chunk which were not + /// allocated yet are guaranteed to be default-initialized (zeroed out in case of trivial types). + /// @param c The chunk to view. + /// @return A span to the memory of the chunk. + eastl::span viewChunk(ChunkIdx c) const /* requires ALIGN_TO_CHUNK */ + { + const uint32_t raw = eastl::to_underlying(c); + const uint32_t bucket = get_log2i(raw + 1); + const uint32_t offset = (raw + 1 - (1 << bucket)) * INITIAL_CAPACITY; + return {buckets[bucket].get() + offset, INITIAL_CAPACITY}; + } + + void clear() + { + buckets.clear(); + buckets.emplace_back().reset(new T[INITIAL_CAPACITY]{}); + totalElems = 0; + firstFreeInLastBucket = 0; + } + +private: + static uint32_t capacity(uint32_t bucket) { return INITIAL_CAPACITY << bucket; } + static Range make_range(uint8_t size, uint8_t bucket, uint16_t offset) + { + G_FAST_ASSERT(bucket < MAX_BUCKET_COUNT && offset + size <= capacity(bucket)); + return static_cast( + (static_cast(size) << BUCKET_AND_OFFSET_BITS) | (uint32_t{1} << (OFFSET_BITS_FOR_FIRST_BUCKET + bucket)) | offset); + } + static eastl::tuple break_range(Range r) + { + // Encoding schema (see concurrentElementPool for an explanation): + // count of zeros encodes bucket no. + // _____ + // size | | offset into bkt + // xxxxxxxx 0000001y yyyyyyyy yyyyyyyy + G_FAST_ASSERT(r != Range::Invalid); + const uint32_t raw = eastl::to_underlying(r); + const uint8_t size = static_cast(raw >> BUCKET_AND_OFFSET_BITS); + const uint32_t rest = raw & ((1 << BUCKET_AND_OFFSET_BITS) - 1); + const uint32_t zeroBitsCount = __clz_unsafe(rest) - CHAR_BIT * sizeof(uint8_t); + const uint8_t bucket = static_cast(MAX_BUCKET_COUNT - zeroBitsCount); + const uint32_t offsetBitsCount = BUCKET_AND_OFFSET_BITS - zeroBitsCount - 1; + const uint16_t offset = static_cast(rest & ((1 << offsetBitsCount) - 1)); + G_FAST_ASSERT(bucket < MAX_BUCKET_COUNT && offset + size <= capacity(bucket)); + return {size, bucket, offset}; + } + +private: + // NOTE: ranges are stored SPARSELY inside of here, and we don't keep track of + // where the uninitialized gaps are, so it is impossible to iterate this! + dag::RelocatableFixedVector, BUCKET_COUNT> buckets; + uint32_t totalElems = 0; + uint32_t firstFreeInLastBucket = 0; +}; diff --git a/prog/engine/shaders/scriptSElem.cpp b/prog/engine/shaders/scriptSElem.cpp index 3d4e53693..c8c954c15 100644 --- a/prog/engine/shaders/scriptSElem.cpp +++ b/prog/engine/shaders/scriptSElem.cpp @@ -1672,6 +1672,23 @@ TEXTUREID ScriptedShaderElement::getTexture(int index) const return ((const Tex *)&vars[texVarOfs[index]])->texId; } +bool ScriptedShaderElement::checkAndPrefetchMissingTextures() const +{ + if (texturesLoaded) + return true; + const uint8_t *vars = getVars(); + for (int i = 0; i < texVarOfs.size(); i++) + { + const Tex &t = *(const Tex *)&vars[texVarOfs[i]]; + if (t.texId != BAD_TEXTUREID && !check_managed_texture_loaded(t.texId)) + { + prefetch_managed_texture(t.texId); + return false; + } + } + return texturesLoaded = true; +} + void ScriptedShaderElement::gatherUsedTex(TextureIdSet &tex_id_list) const { const uint8_t *vars = getVars(); diff --git a/prog/engine/shaders/scriptSElem.h b/prog/engine/shaders/scriptSElem.h index 3b087629f..63a0c7c9e 100644 --- a/prog/engine/shaders/scriptSElem.h +++ b/prog/engine/shaders/scriptSElem.h @@ -80,6 +80,8 @@ class ScriptedShaderElement final : public ShaderElement mutable int tex_level = 15; + mutable bool texturesLoaded = false; + public: ScriptedShaderElement(ScriptedShaderElement &&) = default; @@ -121,6 +123,7 @@ class ScriptedShaderElement final : public ShaderElement SNC_LIKELY_TARGET void gatherUsedTex(TextureIdSet &tex_id_list) const override; SNC_LIKELY_TARGET bool replaceTexture(TEXTUREID tex_id_old, TEXTUREID tex_id_new) override; SNC_LIKELY_TARGET bool hasTexture(TEXTUREID tex_id) const override; + SNC_LIKELY_TARGET bool checkAndPrefetchMissingTextures() const override; // Return vertex size on shader input. SNC_LIKELY_TARGET unsigned int getVertexStride() const override { return code.vertexStride; } diff --git a/prog/engine/shaders/scriptSMat.cpp b/prog/engine/shaders/scriptSMat.cpp index f4bb68fb7..27bd6d467 100644 --- a/prog/engine/shaders/scriptSMat.cpp +++ b/prog/engine/shaders/scriptSMat.cpp @@ -304,18 +304,18 @@ void ScriptedShaderMaterial::updateStVar(int prop_stvar_id) varElem->update_stvar(*this, prop_stvar_id); } -#define SET_VARIABLE(var_type, param) \ - if (uint32_t(variable_id) >= uint32_t(ScriptedShadersBinDump::MAX_VARS)) \ - return false; \ - int vid = props.shBinDump().varIdx[variable_id]; \ - if (vid >= ScriptedShadersBinDump::VARIDX_ABSENT) \ - return false; \ - int id = props.sclass->localVars.findVar(vid); \ - if (id < 0) \ - return false; \ - if (props.sclass->localVars.v[id].type != var_type) \ - return false; \ - props.stvar[id].param = v; \ +#define SET_VARIABLE(var_type, param) \ + if (uint32_t(variable_id) >= uint32_t(MAX_BINDUMP_SHADERVARS)) \ + return false; \ + int vid = props.shBinDumpOwner().varIndexMap[variable_id]; \ + if (vid >= SHADERVAR_IDX_ABSENT) \ + return false; \ + int id = props.sclass->localVars.findVar(vid); \ + if (id < 0) \ + return false; \ + if (props.sclass->localVars.v[id].type != var_type) \ + return false; \ + props.stvar[id].param = v; \ updateStVar(id); bool ScriptedShaderMaterial::set_int_param(const int variable_id, const int v) @@ -348,24 +348,24 @@ bool ScriptedShaderMaterial::set_texture_param(const int variable_id, const TEXT #undef SET_VARIABLE -#define GET_VARIABLE(GET_FUNC) \ - if (uint32_t(variable_id) >= uint32_t(ScriptedShadersBinDump::MAX_VARS)) \ - return false; \ - int vid = props.shBinDump().varIdx[variable_id]; \ - if (vid >= ScriptedShadersBinDump::VARIDX_ABSENT) \ - return false; \ - int id = props.sclass->localVars.findVar(vid); \ - if (id < 0) \ - return false; \ - value = GET_FUNC(id); \ +#define GET_VARIABLE(GET_FUNC) \ + if (uint32_t(variable_id) >= uint32_t(MAX_BINDUMP_SHADERVARS)) \ + return false; \ + int vid = props.shBinDumpOwner().varIndexMap[variable_id]; \ + if (vid >= SHADERVAR_IDX_ABSENT) \ + return false; \ + int id = props.sclass->localVars.findVar(vid); \ + if (id < 0) \ + return false; \ + value = GET_FUNC(id); \ return true; bool ScriptedShaderMaterial::hasVariable(const int variable_id) const { - if (variable_id < 0 || variable_id >= ScriptedShadersBinDump::MAX_VARS) + if (variable_id < 0 || variable_id >= MAX_BINDUMP_SHADERVARS) return false; - int vid = props.shBinDump().varIdx[variable_id]; - return (vid < ScriptedShadersBinDump::VARIDX_ABSENT) ? props.sclass->localVars.findVar(vid) >= 0 : false; + int vid = props.shBinDumpOwner().varIndexMap[variable_id]; + return (vid < SHADERVAR_IDX_ABSENT) ? props.sclass->localVars.findVar(vid) >= 0 : false; } bool ScriptedShaderMaterial::getColor4Variable(const int variable_id, Color4 &value) const { GET_VARIABLE(get_color4_stvar); } diff --git a/prog/engine/shaders/scriptSMat.h b/prog/engine/shaders/scriptSMat.h index 70b34bf4e..8c5b5720d 100644 --- a/prog/engine/shaders/scriptSMat.h +++ b/prog/engine/shaders/scriptSMat.h @@ -54,6 +54,7 @@ struct ShaderMaterialProperties int execInitCode(); __forceinline const ScriptedShadersBinDump &shBinDump() const { return ::shBinDumpEx(!secondDump); } + __forceinline const ScriptedShadersBinDumpOwner &shBinDumpOwner() const { return ::shBinDumpExOwner(!secondDump); } protected: ShaderMaterialProperties(const shaderbindump::ShaderClass *sc, const MaterialData &m, bool sec_dump_for_exp); diff --git a/prog/engine/shaders/shStateBlk.cpp b/prog/engine/shaders/shStateBlk.cpp index b77c27a2a..a287e232a 100644 --- a/prog/engine/shaders/shStateBlk.cpp +++ b/prog/engine/shaders/shStateBlk.cpp @@ -99,8 +99,8 @@ bool shaders_internal::reload_shaders_materials(ScriptedShadersBinDumpOwner &pre } // copy global intervals - int id = shBinDump().globvarIdx[varId]; - if (id == ScriptedShadersBinDump::VARIDX_ABSENT) + int id = shBinDumpOwner().globvarIndexMap[varId]; + if (id == SHADERVAR_IDX_ABSENT) continue; int iid = shBinDumpOwner().globVarIntervalIdx[id]; int prevIid = prev_sh_owner.globVarIntervalIdx[prevGId]; diff --git a/prog/engine/shaders/shStateBlockBindless.cpp b/prog/engine/shaders/shStateBlockBindless.cpp index bd739275e..01ab6d06f 100644 --- a/prog/engine/shaders/shStateBlockBindless.cpp +++ b/prog/engine/shaders/shStateBlockBindless.cpp @@ -25,10 +25,14 @@ struct BindlessTexRecord struct BindlessState; -const uint32_t REGS_IN_CONST_BUF = 4096; -const uint32_t MAX_CONST_BUFFER_SIZE = REGS_IN_CONST_BUF; +static constexpr uint32_t REGS_IN_CONST_BUF = 4096; +static constexpr uint32_t MAX_CONST_BUFFER_SIZE = REGS_IN_CONST_BUF; static_assert(MAX_CONST_BUFFER_SIZE <= REGS_IN_CONST_BUF, "Const buffer should be less than max value available by graphics APIs."); -const int32_t DEFAULT_SAMPLER_ID = 0; +static constexpr int32_t DEFAULT_SAMPLER_ID = 0; + +static constexpr uint32_t PACKED_STCODE_BITS = 12; +static constexpr uint32_t BUFFER_BITS = 7; +static constexpr uint32_t GLOBAL_STATE_BITS = 13; // TODO: generalize this to custom container that verifies invariant of non relocation on insertion using ConstantsContainer = NonRelocatableCont; @@ -45,13 +49,6 @@ static OSSpinlock mutex; constexpr uint8_t INVALID_MAT_ID = UCHAR_MAX; static eastl::deque, EASTLAllocatorType, 2048> stcodeIdToPacked; -enum PackedConstsStateBits -{ - PACKED_STCODE_BITS = 12, - BUFFER_BITS = 7, - LOCAL_STATE_BITS = 13 -}; - template using PackedCont = eastl::deque; static PackedCont packedAll; @@ -115,34 +112,34 @@ static Sbuffer *create_static_cb(uint32_t register_count, const char *name) class PackedConstsState { - static_assert(PACKED_STCODE_BITS + BUFFER_BITS + LOCAL_STATE_BITS == 32, "We want to use the whole uint32_t for state id."); + static_assert(PACKED_STCODE_BITS + BUFFER_BITS + GLOBAL_STATE_BITS == 32, "We want to use the whole uint32_t for state id."); eastl::underlying_type_t stateId; public: - PackedConstsState(int packed_stcode_id, uint32_t buffer_id, uint32_t local_state_id) + PackedConstsState(int packed_stcode_id, uint32_t buffer_id, uint32_t global_state_id) { G_ASSERTF(packed_stcode_id < (1 << PACKED_STCODE_BITS), "PackedConstsState: packed_stcode_id=%d", packed_stcode_id); G_ASSERTF(buffer_id < (1 << BUFFER_BITS), "PackedConstsState: buffer_id=%" PRIu32, buffer_id); - G_ASSERTF(local_state_id < (1 << LOCAL_STATE_BITS), - "PackedConstsState: local_state_id=%" PRIu32 ". (Hint: check if too many materials are created!)", local_state_id); + G_ASSERTF(global_state_id < (1 << GLOBAL_STATE_BITS), + "PackedConstsState: global_state_id=%" PRIu32 ". (Hint: check if too many materials are created!)", global_state_id); stateId = (packed_stcode_id < 0) - ? local_state_id - : (((((uint32_t)(packed_stcode_id + 1) << BUFFER_BITS) | buffer_id) << LOCAL_STATE_BITS) | local_state_id); + ? global_state_id + : (((((uint32_t)(packed_stcode_id + 1) << BUFFER_BITS) | buffer_id) << GLOBAL_STATE_BITS) | global_state_id); } PackedConstsState(ConstStateIdx state) : stateId(eastl::to_underlying(state)) {} - int getPackedStcodeId() const { return (int)(stateId >> (LOCAL_STATE_BITS + BUFFER_BITS)) - 1; } + int getPackedStcodeId() const { return (int)(stateId >> (GLOBAL_STATE_BITS + BUFFER_BITS)) - 1; } - uint32_t getGlobalStateId() const { return stateId & ((1 << LOCAL_STATE_BITS) - 1); } + uint32_t getGlobalStateId() const { return stateId & ((1 << GLOBAL_STATE_BITS) - 1); } - uint32_t getLocalStateId() const; + uint32_t getLocalStateOffset() const; - uint32_t getBufferId() const { return (stateId >> LOCAL_STATE_BITS) & ((1 << BUFFER_BITS) - 1); } + uint32_t getBufferId() const { return (stateId >> GLOBAL_STATE_BITS) & ((1 << BUFFER_BITS) - 1); } - uint32_t getMaterialId() const { return (stateId >> LOCAL_STATE_BITS) & ((1 << (PACKED_STCODE_BITS + BUFFER_BITS)) - 1); } + uint32_t getMaterialId() const { return (stateId >> GLOBAL_STATE_BITS) & ((1 << (PACKED_STCODE_BITS + BUFFER_BITS)) - 1); } operator ConstStateIdx() const { return static_cast(stateId); } }; @@ -342,11 +339,11 @@ struct BindlessState }); if (foundIt != end(states)) { - const uint32_t localStateId = eastl::distance(begin(states), foundIt); - const uint32_t bufferId = consts_count == 0 ? 0 : (localStateId / (MAX_CONST_BUFFER_SIZE / consts_count)); + const uint32_t globalStateId = eastl::distance(begin(states), foundIt); + const uint32_t bufferId = consts_count == 0 ? 0 : (globalStateId / (MAX_CONST_BUFFER_SIZE / consts_count)); if (consts_count != 0 && stcode_id >= 0) bufferNeedsUpdate[packedId].set(bufferId); - return PackedConstsState(stcode_id < 0 ? -1 : packedId, bufferId, localStateId); + return PackedConstsState(stcode_id < 0 ? -1 : packedId, bufferId, globalStateId); } uint32_t bid = bindlessConstParams.size(); @@ -565,11 +562,17 @@ void update_bindless_state(ConstStateIdx const_state_idx, int tex_level) packedAll[state.getPackedStcodeId()][state.getGlobalStateId()].updateTexForPackedMaterial(const_state_idx, tex_level); } -uint32_t PackedConstsState::getLocalStateId() const +uint32_t PackedConstsState::getLocalStateOffset() const { const uint32_t constsCount = packedAll[getPackedStcodeId()][getGlobalStateId()].constsCount; if (!constsCount) return 0; + // NOTE: the secret knowledge here is that for each packedStcodeId we have a set of materials with + // different const params which all share the same stcode and hence constsCount (although the contents of + // the consts are different), so we pack them all into a set of buffers, each of which is MAX_CONST_BUFFER_SIZE, + // and then interpret these buffers as a T[MAX_CONST_BUFFER_SIZE/constsCount] inside of shaders, where + // sizeof(T) = constsCount. A "local offset" is the offset into this structured buffer that should be used + // by shaders, and it is calculated as follows. return getGlobalStateId() - (MAX_CONST_BUFFER_SIZE / constsCount) * getBufferId(); } @@ -577,7 +580,7 @@ uint32_t get_material_offset(ConstStateIdx const_state_idx) { const PackedConstsState state(const_state_idx); G_ASSERT(state.getPackedStcodeId() >= 0); - return state.getLocalStateId(); + return state.getLocalStateOffset(); } uint32_t get_material_id(ConstStateIdx const_state_idx) diff --git a/prog/engine/shaders/shaders.cpp b/prog/engine/shaders/shaders.cpp index da05c077d..353d90aa9 100644 --- a/prog/engine/shaders/shaders.cpp +++ b/prog/engine/shaders/shaders.cpp @@ -727,15 +727,16 @@ class ShadersRestartProc : public SRestartProc shaders_internal::shader_mats.clear(); shaders_internal::shader_mat_elems.clear(); ShaderStateBlock::clear(); - auto &dump = shBinDump(); + auto &dumpOwner = shBinDumpOwner(); + const auto &dump = shBinDump(); if (dump.varMap.size()) { unsigned vars_resolved = 0, glob_vars_resolved = 0; for (int i = 0, ie = VariableMap::getVariablesCount(); i < ie; i++) - if (dump.varIdx[i] < dump.VARIDX_ABSENT) + if (dumpOwner.varIndexMap[i] < SHADERVAR_IDX_ABSENT) { vars_resolved++; - if (dump.globvarIdx[i] < dump.VARIDX_ABSENT) + if (dumpOwner.globvarIndexMap[i] < SHADERVAR_IDX_ABSENT) glob_vars_resolved++; } diff --git a/prog/engine/shaders/shadersBinaryData.h b/prog/engine/shaders/shadersBinaryData.h index 89fa99e1d..326070bec 100644 --- a/prog/engine/shaders/shadersBinaryData.h +++ b/prog/engine/shaders/shadersBinaryData.h @@ -19,6 +19,7 @@ #include #include #include +#include struct Color4; struct ShaderChannelId; @@ -45,6 +46,10 @@ using ScriptedShadersBinDumpV2 = bindump::Mapper; using StrHolder = bindump::Mapper; +static constexpr size_t MAX_BINDUMP_SHADERVARS = 4096; +static constexpr uint32_t SHADERVAR_IDX_ABSENT = 0xFFFE; +static constexpr uint32_t SHADERVAR_IDX_INVALID = 0xFFFF; + enum class ShaderCodeType { VERTEX, @@ -76,6 +81,9 @@ struct ScriptedShadersBinDumpOwner Tab globVarIntervalIdx; Tab globIntervalNormValues; + // Runtime map name id -> internal dump id + eastl::array varIndexMap, globvarIndexMap; + auto getDecompressionDict() { return mDictionary.get(); } private: @@ -99,6 +107,8 @@ struct ScriptedShadersBinDumpOwner void loadDecompressedShader(uint16_t group_id, uint16_t index_in_group, ShaderBytecode &tmpbuf); void storeDecompressedGroup(uint16_t group_id, DecompressedGroup &&decompressed_group); + void initVarIndexMaps(); + struct ZstdDictionaryDeleter { void operator()(struct ZSTD_DDict_s *dict) const { zstd_destroy_ddict(dict); } diff --git a/prog/engine/shaders/shadersBinaryDataLoad.cpp b/prog/engine/shaders/shadersBinaryDataLoad.cpp index c6c1eb098..504c2aebe 100644 --- a/prog/engine/shaders/shadersBinaryDataLoad.cpp +++ b/prog/engine/shaders/shadersBinaryDataLoad.cpp @@ -134,12 +134,12 @@ bool ScriptedShadersBinDumpOwner::load(IGenLoad &crd, int size, bool full_file_l if (!read_shdump_file(crd, size, full_file_load, [&](const uint8_t *data, int size_) { return loadData(data, size_); })) return false; - G_ASSERTF(mShaderDump->varMap.size() <= ScriptedShadersBinDump::MAX_VARS, - "Total number of shadervars (%d) exceeds the max allowed for mapping (%d). Remove redundant shadervars, or increase " - "ScriptedShadersBinDump::MAX_VARS and the shader compiler cache version.", - mShaderDump->varMap.size(), ScriptedShadersBinDump::MAX_VARS); + G_ASSERTF(mShaderDump->varMap.size() <= MAX_BINDUMP_SHADERVARS, + "Total number of shadervars (%d) exceeds the max allowed for mapping (%d). " + "Remove redundant shadervars, or increase MAX_BINDUMP_SHADERVARS", + mShaderDump->varMap.size(), MAX_BINDUMP_SHADERVARS); - mShaderDump->reinitVarTables(); + initVarIndexMaps(); shadervars::resolve_shadervars(); ShaderVariableInfo::resolveAll(); if (mShaderDump == &shBinDump()) diff --git a/prog/engine/shaders/shadersBinaryDataVars.cpp b/prog/engine/shaders/shadersBinaryDataVars.cpp index 4de4c7afe..c3e8c4ee7 100644 --- a/prog/engine/shaders/shadersBinaryDataVars.cpp +++ b/prog/engine/shaders/shadersBinaryDataVars.cpp @@ -20,11 +20,24 @@ #include <3d/dag_resPtr.h> static FastNameMapTS shvarNameMap; + +void ScriptedShadersBinDumpOwner::initVarIndexMaps() +{ + int nameCount = shvarNameMap.iterate([&](int nid, const char *name) { + varIndexMap[nid] = mapbinarysearch::bfindStrId(mShaderDump->varMap, name); + globvarIndexMap[nid] = (varIndexMap[nid] == SHADERVAR_IDX_INVALID) ? SHADERVAR_IDX_ABSENT + : bfind_packed_uint16_x2(mShaderDump->gvMap, varIndexMap[nid]); + }); + for (int nid = nameCount; nid < MAX_BINDUMP_SHADERVARS; nid++) + varIndexMap[nid] = globvarIndexMap[nid] = SHADERVAR_IDX_ABSENT; +} + #if DAGOR_DBGLEVEL > 0 namespace shaderbindump { void dump_shader_var_names(); } + static bool is_name_cident(const char *name, char delimiter = '\0') { if (*name && !(*name == '_' || isalpha(*name))) @@ -99,23 +112,25 @@ int VariableMap::getVariableId(const char *var_name, bool sec_dump) { int nid = shvarNameMap.addNameId(var_name); #if DAGOR_DBGLEVEL - if (DAGOR_UNLIKELY(nid >= ScriptedShadersBinDump::MAX_VARS)) + if (DAGOR_UNLIKELY(nid >= MAX_BINDUMP_SHADERVARS)) shaderbindump::dump_shader_var_names(); #endif - G_ASSERTF_RETURN(nid < ScriptedShadersBinDump::MAX_VARS, -1, "var_name=%s shvarNameMap.nameCount=%d", var_name, + G_ASSERTF_RETURN(nid < MAX_BINDUMP_SHADERVARS, -1, "var_name=%s shvarNameMap.nameCount=%d", var_name, shvarNameMap.nameCountRelaxed()); // it is unsafe to add variable and access in differnt thread without sync. That means, that // relaxed load is sufficient. - auto &dump = shBinDumpExRW(!sec_dump); - if (dump.varIdx[nid] == dump.VARIDX_ABSENT) + auto &dumpOwner = shBinDumpExOwner(!sec_dump); + const auto &dump = *dumpOwner.getDump(); + if (dumpOwner.varIndexMap[nid] == SHADERVAR_IDX_ABSENT) { uint16_t var_id = mapbinarysearch::bfindStrId(dump.varMap, var_name); #if DAGOR_DBGLEVEL - if (var_id == dump.VARIDX_INVALID && !shadervar_name_is_valid(var_name)) + if (var_id == SHADERVAR_IDX_INVALID && !shadervar_name_is_valid(var_name)) logerr("bad var_name=%s for %s", var_name, __FUNCTION__); #endif - dump.varIdx[nid] = var_id; - dump.globvarIdx[nid] = - (dump.varIdx[nid] == dump.VARIDX_INVALID) ? dump.VARIDX_ABSENT : bfind_packed_uint16_x2(dump.gvMap, dump.varIdx[nid]); + dumpOwner.varIndexMap[nid] = var_id; + dumpOwner.globvarIndexMap[nid] = (dumpOwner.varIndexMap[nid] == SHADERVAR_IDX_INVALID) + ? SHADERVAR_IDX_ABSENT + : bfind_packed_uint16_x2(dump.gvMap, dumpOwner.varIndexMap[nid]); } return nid; } @@ -137,7 +152,7 @@ bool VariableMap::isVariablePresent(int var_id) if (uint32_t(var_id) >= shvarNameMap.nameCountRelaxed()) // it is unsafe to add variable and access in differnt thread without sync. // That means, that relaxed load is sufficient. return false; - return shBinDump().varIdx[var_id] < ScriptedShadersBinDump::VARIDX_ABSENT; + return shBinDumpOwner().varIndexMap[var_id] < SHADERVAR_IDX_ABSENT; } bool VariableMap::isGlobVariablePresent(int var_id) @@ -145,7 +160,7 @@ bool VariableMap::isGlobVariablePresent(int var_id) if (uint32_t(var_id) >= shvarNameMap.nameCountRelaxed()) // it is unsafe to add variable and access in differnt thread without sync. // That means, that relaxed load is sufficient. return false; - return shBinDump().globvarIdx[var_id] < ScriptedShadersBinDump::VARIDX_ABSENT; + return shBinDumpOwner().globvarIndexMap[var_id] < SHADERVAR_IDX_ABSENT; } bool VariableMap::isVariablePresent(const ShaderVariableInfo &v) { return isVariablePresent(v.get_var_id()); } @@ -165,17 +180,6 @@ dag::Vector VariableMap::getPresentedGlobalVariableNames() return varNames; } -template <> -void ScriptedShadersBinDump::reinitVarTables() -{ - int nameCount = shvarNameMap.iterate([&](int nid, const char *name) { - varIdx[nid] = mapbinarysearch::bfindStrId(varMap, name); - globvarIdx[nid] = (varIdx[nid] == VARIDX_INVALID) ? VARIDX_ABSENT : bfind_packed_uint16_x2(gvMap, varIdx[nid]); - }); - for (int nid = nameCount; nid < MAX_VARS; nid++) - varIdx[nid] = globvarIdx[nid] = ScriptedShadersBinDump::VARIDX_ABSENT; -} - #define CHECK_VAR_ID(TYPE) \ if (var_id == -1) \ return false; \ @@ -184,14 +188,15 @@ void ScriptedShadersBinDump::reinitVarTables() G_ASSERTF(0, "%s invalid var_id %d", __FUNCTION__, var_id); \ return false; \ } \ + auto &dumpOwner = shBinDumpOwner(); \ auto &dump = shBinDumpRW(); \ if (!dump.globVars.size()) \ { \ logerr("shaders not loaded while setting var_id=%d (%s)", var_id, shvarNameMap.getName(var_id)); \ return false; \ } \ - int id = dump.globvarIdx[var_id]; \ - if (id == ScriptedShadersBinDump::VARIDX_ABSENT) \ + int id = dumpOwner.globvarIndexMap[var_id]; \ + if (id == SHADERVAR_IDX_ABSENT) \ return false; \ G_ASSERTF_RETURN(id < dump.globVars.size(), false, "%s invalid var_id %d (to glob var %d)", __FUNCTION__, var_id, id); \ G_ASSERTF_RETURN(dump.globVars.getType(id) == TYPE, false, "var_id=%d (%s) glob_var_id=%d", var_id, shvarNameMap.getName(var_id), \ @@ -320,16 +325,17 @@ void ShaderVariableInfo::resolve() G_ASSERTF(0, "%s invalid var_id %d", __FUNCTION__, var_id); return; } + auto &dumpOwner = shBinDumpOwner(); auto &dump = shBinDumpRW(); if (!dump.globVars.size()) { logerr("shaders not loaded while setting var_id=%d (%s)", var_id, shvarNameMap.getName(var_id)); return; } - int id = dump.globvarIdx[var_id]; - if (id == ScriptedShadersBinDump::VARIDX_ABSENT) + int id = dumpOwner.globvarIndexMap[var_id]; + if (id == SHADERVAR_IDX_ABSENT) return; - if (id == dump.VARIDX_INVALID) + if (id == SHADERVAR_IDX_INVALID) { #if DAGOR_DBGLEVEL if (!shadervar_name_is_valid(shvarNameMap.getName(var_id))) @@ -339,7 +345,7 @@ void ShaderVariableInfo::resolve() } data = &dump.globVars.get(id); varType = dump.globVars.getType(id); - iid = shBinDumpOwner().globVarIntervalIdx[id]; + iid = dumpOwner.globVarIntervalIdx[id]; } void ShaderVariableInfo::nanError() const { logerr("setting <%s> variable to nan", VariableMap::getVariableName(var_id)); } @@ -414,11 +420,10 @@ int ShaderGlobal::get_var_type(int var_id) if (uint32_t(var_id) >= shvarNameMap.nameCountRelaxed()) // it is unsafe to add variable and access in differnt thread without sync. // That means, that relaxed load is sufficient. return -1; - auto &dump = shBinDump(); - int id = dump.globvarIdx[var_id]; - if (id >= ScriptedShadersBinDump::VARIDX_ABSENT) + int id = shBinDumpOwner().globvarIndexMap[var_id]; + if (id >= SHADERVAR_IDX_ABSENT) return -1; - return dump.globVars.getType(id); + return shBinDump().globVars.getType(id); } static const shaderbindump::Interval *get_interval(int var_id) @@ -426,9 +431,9 @@ static const shaderbindump::Interval *get_interval(int var_id) if (uint32_t(var_id) >= shvarNameMap.nameCountRelaxed()) return nullptr; - auto &dump = shBinDump(); - int id = dump.globvarIdx[var_id]; - return id != ScriptedShadersBinDump::VARIDX_ABSENT ? &dump.intervals[shBinDumpOwner().globVarIntervalIdx[id]] : nullptr; + const auto &dumpOwner = shBinDumpOwner(); + int id = dumpOwner.globvarIndexMap[var_id]; + return id != SHADERVAR_IDX_ABSENT ? &shBinDump().intervals[dumpOwner.globVarIntervalIdx[id]] : nullptr; } bool ShaderGlobal::is_var_assumed(int var_id) @@ -462,18 +467,19 @@ bool ShaderGlobal::has_associated_interval(int var_id) { if (uint32_t(var_id) >= shvarNameMap.nameCountRelaxed()) return false; - auto &dump = shBinDump(); - int id = dump.globvarIdx[var_id]; - return id != ScriptedShadersBinDump::VARIDX_ABSENT ? shBinDumpOwner().globVarIntervalIdx[id] >= 0 : false; + const auto &dumpOwner = shBinDumpOwner(); + int id = dumpOwner.globvarIndexMap[var_id]; + return id != SHADERVAR_IDX_ABSENT ? dumpOwner.globVarIntervalIdx[id] >= 0 : false; } dag::ConstSpan ShaderGlobal::get_interval_ranges(int var_id) { G_ASSERT(uint32_t(var_id) < shvarNameMap.nameCountRelaxed()); - auto &dump = shBinDump(); - int id = dump.globvarIdx[var_id]; - G_ASSERT_RETURN(id != ScriptedShadersBinDump::VARIDX_ABSENT, {}); - int iid = shBinDumpOwner().globVarIntervalIdx[id]; + const auto &dumpOwner = shBinDumpOwner(); + const auto &dump = shBinDump(); + int id = dumpOwner.globvarIndexMap[var_id]; + G_ASSERT_RETURN(id != SHADERVAR_IDX_ABSENT, {}); + int iid = dumpOwner.globVarIntervalIdx[id]; G_ASSERT_RETURN(iid >= 0 && iid < dump.intervals.size(), {}); return dump.intervals[iid].maxVal; } @@ -559,7 +565,7 @@ bool ShaderGlobal::set_texture(int var_id, TEXTUREID tex_id) G_ASSERTF(tex_id == BAD_TEXTUREID || get_managed_texture_refcount(tex_id) > 0, "set_tex(%d) %d->%d rc=%d", var_id, old_id, tex_id, get_managed_texture_refcount(tex_id)); - G_ASSERT_RETURN(id != ScriptedShadersBinDump::VARIDX_ABSENT, false); + G_ASSERT_RETURN(id != SHADERVAR_IDX_ABSENT, false); int iid = shBinDumpOwner().globVarIntervalIdx[id]; if (iid >= 0) shBinDumpOwner().globIntervalNormValues[iid] = (tex_id != BAD_TEXTUREID && tex.tex); @@ -596,7 +602,7 @@ bool ShaderGlobal::set_buffer(int var_id, D3DRESID buf_id) G_ASSERTF(buf_id == BAD_D3DRESID || get_managed_res_refcount(buf_id) > 0, "set_tex(%d) %d->%d rc=%d", var_id, old_id, buf_id, get_managed_res_refcount(buf_id)); - G_ASSERT_RETURN(id != ScriptedShadersBinDump::VARIDX_ABSENT, false); + G_ASSERT_RETURN(id != SHADERVAR_IDX_ABSENT, false); int iid = shBinDumpOwner().globVarIntervalIdx[id]; if (iid >= 0) shBinDumpOwner().globIntervalNormValues[iid] = (buf_id != BAD_D3DRESID && buf.buf); @@ -661,14 +667,14 @@ bool ShaderGlobal::set_float4x4(int var_id, FXMMATRIX mat) #define CHECK_VAR_ID(TYPE, DEF_VAL) \ if (var_id < 0) \ return DEF_VAL; \ - auto &dump = shBinDump(); \ + const auto &dump = shBinDump(); \ if (!dump.globVars.size()) \ { \ logerr("shaders not loaded while getting var_id=%d (%s)", var_id, shvarNameMap.getName(var_id)); \ return DEF_VAL; \ } \ - int glob_var_id = dump.globvarIdx[var_id]; \ - if (glob_var_id == ScriptedShadersBinDump::VARIDX_ABSENT) \ + int glob_var_id = shBinDumpOwner().globvarIndexMap[var_id]; \ + if (glob_var_id == SHADERVAR_IDX_ABSENT) \ return DEF_VAL; \ G_ASSERTF_RETURN(glob_var_id < dump.globVars.size(), DEF_VAL, "var_id=%d (%s) glob_var_id=%d", var_id, \ shvarNameMap.getName(var_id), glob_var_id); \ @@ -761,9 +767,12 @@ void shaderbindump::dump_shader_var_names() uint32_t cnt = shvarNameMap.nameCountAcquire(); debug("shvarNameMap.nameCount()=%d:", cnt); int wd = cnt >= 1000 ? 4 : (cnt >= 100 ? 3 : (cnt >= 10 ? 2 : 1)); - auto &dump = ::shBinDump(); + const auto &dumpOwner = ::shBinDumpOwner(); for (int i = 0; i < cnt; i++) - debug(" %*d [%c] %s", wd, i, dump.globvarIdx[i] < dump.VARIDX_ABSENT ? 'G' : (dump.varIdx[i] < dump.VARIDX_ABSENT ? 'v' : '?'), + { + debug(" %*d [%c] %s", wd, i, + dumpOwner.globvarIndexMap[i] < SHADERVAR_IDX_ABSENT ? 'G' : (dumpOwner.varIndexMap[i] < SHADERVAR_IDX_ABSENT ? 'v' : '?'), shvarNameMap.getName(i)); + } } #endif diff --git a/prog/engine/shaders/stateBlockStCode.h b/prog/engine/shaders/stateBlockStCode.h index 2d995746f..9a992a291 100644 --- a/prog/engine/shaders/stateBlockStCode.h +++ b/prog/engine/shaders/stateBlockStCode.h @@ -4,6 +4,12 @@ #include #include #include +#include +#include +#include + +#include "shStateBlock.h" +#include "shRegs.h" #if !_TARGET_STATIC_LIB #define SHOW_ERROR(fmt, ...) G_ASSERTF(0, fmt, ##__VA_ARGS__); diff --git a/prog/engine/sharedInclude/shaders/shader_layout.h b/prog/engine/sharedInclude/shaders/shader_layout.h index c93af103d..54a5dca6f 100644 --- a/prog/engine/sharedInclude/shaders/shader_layout.h +++ b/prog/engine/sharedInclude/shaders/shader_layout.h @@ -393,16 +393,12 @@ BINDUMP_BEGIN_LAYOUT(ScriptedShadersBinDump) VecHolder>> shGroups; VecHolder dictionary; - // shader context/work data + // @TODO: remove from layout (this is pure runtime stuff) enum { - MAX_VARS = 3584, - VARIDX_ABSENT = 0xFFFEu, - VARIDX_INVALID = 0xFFFFu + MAX_VARS_DEPRECATED_ = 3584, }; - uint16_t varIdx[MAX_VARS] = {}, globvarIdx[MAX_VARS] = {}; - - void reinitVarTables(); + uint16_t varIdx_deprecated_[MAX_VARS_DEPRECATED_] = {}, globvarIdx_deprecated_[MAX_VARS_DEPRECATED_] = {}; const Field *findShaderClass(const char *name) const; BINDUMP_END_LAYOUT() diff --git a/prog/gameLibs/bvh/bvh.cpp b/prog/gameLibs/bvh/bvh.cpp index 14905cdbd..819bc1e41 100644 --- a/prog/gameLibs/bvh/bvh.cpp +++ b/prog/gameLibs/bvh/bvh.cpp @@ -1657,10 +1657,12 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con for (auto &instances : context_id->riExtraInstances) uploadCount += instances.size(); - auto upload = lock_sbuffer(context_id->tlasUploadMain.getBuf(), 0, uploadCount, VBLOCK_WRITEONLY); { - auto cursor = upload.get(); + auto upload = lock_sbuffer(context_id->tlasUploadMain.getBuf(), 0, uploadCount, VBLOCK_WRITEONLY); + HANDLE_LOST_DEVICE_STATE(upload, ); + TIME_PROFILE(memcpy); + auto cursor = upload.get(); memcpy(cursor, instanceDescs.data(), instanceDescs.size() * sizeof(HWInstance)); cursor += instanceDescs.size(); for (auto &instances : context_id->impostorInstances) @@ -1676,7 +1678,6 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con cpuInstanceCount = cursor - upload.get(); } - upload.close(); G_ASSERT(cpuInstanceCount <= instanceCount); diff --git a/prog/gameLibs/bvh/bvh_context.cpp b/prog/gameLibs/bvh/bvh_context.cpp index 250d26aab..831b690fd 100644 --- a/prog/gameLibs/bvh/bvh_context.cpp +++ b/prog/gameLibs/bvh/bvh_context.cpp @@ -265,9 +265,7 @@ void TerrainPatch::teardown(ContextId context_id) G_VERIFY(context_id->releaseBuffer(vertices.get())); vertices.reset(); - context_id->releaseBuffer(indices); context_id->freeMetaRegion(metaAllocId); - indices = nullptr; } } // namespace bvh \ No newline at end of file diff --git a/prog/gameLibs/bvh/bvh_context.h b/prog/gameLibs/bvh/bvh_context.h index 1269bec02..27f3cd19a 100644 --- a/prog/gameLibs/bvh/bvh_context.h +++ b/prog/gameLibs/bvh/bvh_context.h @@ -434,41 +434,32 @@ struct Mesh struct TerrainPatch { Point2 position; - Sbuffer *indices = nullptr; UniqueBVHBuffer vertices; UniqueBLAS blas; MeshMetaAllocator::AllocId metaAllocId = -1; TerrainPatch() = default; - TerrainPatch(const Point2 &position, Sbuffer *indices, UniqueBVHBuffer &&vertices, UniqueBLAS &&blas) : - position(position), indices(indices), vertices(eastl::move(vertices)), blas(eastl::move(blas)) + TerrainPatch(const Point2 &position, UniqueBVHBuffer &&vertices, UniqueBLAS &&blas) : + position(position), vertices(eastl::move(vertices)), blas(eastl::move(blas)) {} - TerrainPatch(const Point2 &position, Sbuffer *indices, UniqueBVHBuffer &&vertices, UniqueBLAS &&blas, - MeshMetaAllocator::AllocId meta_alloc_id) : - position(position), indices(indices), vertices(eastl::move(vertices)), blas(eastl::move(blas)), metaAllocId(meta_alloc_id) + TerrainPatch(const Point2 &position, UniqueBVHBuffer &&vertices, UniqueBLAS &&blas, MeshMetaAllocator::AllocId meta_alloc_id) : + position(position), vertices(eastl::move(vertices)), blas(eastl::move(blas)), metaAllocId(meta_alloc_id) {} TerrainPatch(TerrainPatch &&other) : - position(other.position), - indices(other.indices), - vertices(eastl::move(other.vertices)), - blas(eastl::move(other.blas)), - metaAllocId(other.metaAllocId) + position(other.position), vertices(eastl::move(other.vertices)), blas(eastl::move(other.blas)), metaAllocId(other.metaAllocId) { other.metaAllocId = -1; - other.indices = nullptr; } TerrainPatch &operator=(TerrainPatch &&other) { position = other.position; - indices = other.indices; vertices = eastl::move(other.vertices); blas = eastl::move(other.blas); metaAllocId = other.metaAllocId; other.metaAllocId = -1; - other.indices = nullptr; return *this; } - ~TerrainPatch() { G_ASSERT(metaAllocId < 0 && !indices); } + ~TerrainPatch() { G_ASSERT(metaAllocId < 0); } void teardown(ContextId context_id); }; diff --git a/prog/gameLibs/bvh/bvh_dyn.cpp b/prog/gameLibs/bvh/bvh_dyn.cpp index 43b726af2..256227630 100644 --- a/prog/gameLibs/bvh/bvh_dyn.cpp +++ b/prog/gameLibs/bvh/bvh_dyn.cpp @@ -129,11 +129,7 @@ static void on_relem_changed_all(const DynamicRenderableSceneLodsResource *resou void init() { relem_changed_token = unitedvdata::dmUnitedVdata.on_mesh_relems_updated.subscribe(on_relem_changed_all); } -void teardown() -{ - relem_changed_token.~CallbackToken(); - relem_changed_token = CallbackToken(); -} +void teardown() { relem_changed_token = CallbackToken(); } void init(ContextId context_id) { diff --git a/prog/gameLibs/bvh/bvh_ri.cpp b/prog/gameLibs/bvh/bvh_ri.cpp index 164470e9f..d4f397c55 100644 --- a/prog/gameLibs/bvh/bvh_ri.cpp +++ b/prog/gameLibs/bvh/bvh_ri.cpp @@ -99,7 +99,6 @@ void teardown_ri_gen(); void teardown() { - relem_changed_token.~CallbackToken(); relem_changed_token = CallbackToken(); RenderableInstanceLodsResource::setImpostorTextureCallback(nullptr); diff --git a/prog/gameLibs/bvh/bvh_terrain.cpp b/prog/gameLibs/bvh/bvh_terrain.cpp index 99a40c6d6..9bf2a3ed5 100644 --- a/prog/gameLibs/bvh/bvh_terrain.cpp +++ b/prog/gameLibs/bvh/bvh_terrain.cpp @@ -23,6 +23,7 @@ namespace bvh::terrain { static UniqueBuf indices; +static uint32_t indices_bindless_slot = -1; static constexpr int terrain_cell_size = 100; static constexpr int terrain_cell_vertex_count = (terrain_cell_size + 1) * (terrain_cell_size + 1); @@ -167,7 +168,6 @@ template static bool generate_patch_template(int cell_size, TerrainPatch &patch, TerrainVertex *scratch) { patch.position = Point2::ZERO; - patch.indices = indices.getBuf(); if (!generate_patch_buffer(nullptr, patch.vertices, scratch, Point2::ZERO, cell_size, false)) return false; @@ -198,7 +198,6 @@ static bool instantiate_patch(ContextId context_id, TerrainPatch &patch, void *s CHECK_LOST_DEVICE_STATE_RET(false); patch.position = origin; - patch.indices = indices.getBuf(); if (!generate_patch_buffer(context_id, patch.vertices, scratch, origin, cell_size, true)) return false; @@ -224,17 +223,18 @@ static bool instantiate_patch(ContextId context_id, TerrainPatch &patch, void *s if (patch.metaAllocId < 0) { + G_ASSERT(indices_bindless_slot != -1); + patch.metaAllocId = context_id->allocateMetaRegion(); auto &meta = context_id->meshMetaAllocator.get(patch.metaAllocId); meta.markInitialized(); - uint32_t bindlessIndicesIndex, bindlessVerticesIndex; - context_id->holdBuffer(indices.getBuf(), bindlessIndicesIndex); + uint32_t bindlessVerticesIndex; context_id->holdBuffer(patch.vertices.get(), bindlessVerticesIndex); meta.materialType = MeshMeta::bvhMaterialTerrain; - meta.indexAndVertexBufferIndex = (bindlessIndicesIndex << 16) | bindlessVerticesIndex; + meta.indexAndVertexBufferIndex = (indices_bindless_slot << 16) | bindlessVerticesIndex; } return true; @@ -437,7 +437,11 @@ void init() { generate_indices(); } void init(ContextId context_id) { if (context_id->has(Features::Terrain)) + { + G_ASSERT(indices && indices_bindless_slot == -1); context_id->terrainLods.resize(bvh_terrain_lod_count); + context_id->holdBuffer(indices.getBuf(), indices_bindless_slot); + } } void teardown() { indices.close(); } @@ -445,8 +449,11 @@ void teardown() { indices.close(); } void teardown(ContextId context_id) { remove_patches(context_id); - context_id->terrainPatchTemplate.indices = nullptr; context_id->terrainPatchTemplate.~TerrainPatch(); + + G_ASSERT(indices_bindless_slot != -1); + G_VERIFY(context_id->releaseBuffer(indices.getBuf())); + indices_bindless_slot = -1; } dag::Vector> get_blases(ContextId context_id) diff --git a/prog/gameLibs/daRg/guiScene.h b/prog/gameLibs/daRg/guiScene.h index f1071e507..0dbac7883 100644 --- a/prog/gameLibs/daRg/guiScene.h +++ b/prog/gameLibs/daRg/guiScene.h @@ -213,6 +213,15 @@ class GuiScene : public IGuiScene, public IEventList, public IWndProcComponent const eastl::vector_map> &getPanels() const { return panels; } + + const darg::PanelSpatialInfo *getPanelSpatialInfo(int id) const override + { + if (const auto &found = panels.find(id); found != panels.end()) + return &found->second->panel->spatialInfo; + return nullptr; + } + + bool haveActiveCursorOnPanels() const override; bool isAnyPanelPointedAtWithHand(int hand) const override { return spatialInteractionState.wasPanelHit(hand); } bool isAnyPanelTouchedWithHand(int hand) const override { return spatialInteractionState.isHandTouchingPanel[hand]; } diff --git a/prog/gameLibs/daRg/picAsyncLoad.cpp b/prog/gameLibs/daRg/picAsyncLoad.cpp index c1f4c0d1d..84da39e65 100644 --- a/prog/gameLibs/daRg/picAsyncLoad.cpp +++ b/prog/gameLibs/daRg/picAsyncLoad.cpp @@ -48,11 +48,10 @@ void PicAsyncLoad::on_scene_shutdown(IGuiScene *gui_scene) void PicAsyncLoad::pic_mgr_async_load_cb(PICTUREID pid, TEXTUREID tid, d3d::SamplerHandle smp, const Point2 *tcLt, const Point2 *tcRb, const Point2 *picture_sz, void *arg) { - G_UNUSED(smp); AsyncLoadRequest *req = (AsyncLoadRequest *)arg; G_ASSERT(req->isActive() == (req->pic != nullptr)); if (req->isActive()) - req->pic->onLoaded(pid, tid, *tcLt, *tcRb, *picture_sz); + req->pic->onLoaded(pid, tid, smp, *tcLt, *tcRb, *picture_sz); else if (tid != BAD_TEXTUREID) // when load aborted we receive proper pid and bad tid darg::free_texture(tid, pid); requests.erase(req); diff --git a/prog/gameLibs/daRg/picture.cpp b/prog/gameLibs/daRg/picture.cpp index 3a14e0f07..440dea7cd 100644 --- a/prog/gameLibs/daRg/picture.cpp +++ b/prog/gameLibs/daRg/picture.cpp @@ -96,14 +96,16 @@ bool Picture::load(const char *name) TEXTUREID prevTexId = pic.tex; PICTUREID picId = BAD_PICTUREID; TEXTUREID texId = BAD_TEXTUREID; + d3d::SamplerHandle smpId = d3d::INVALID_SAMPLER_HANDLE; AsyncLoadRequest *req = PicAsyncLoad::make_request(this); - bool sync = PictureManager::get_picture_ex(name, picId, texId, &req->tcLt, &req->tcRb, /*picSize*/ nullptr, + bool sync = PictureManager::get_picture_ex(name, picId, texId, smpId, &req->tcLt, &req->tcRb, /*picSize*/ nullptr, PicAsyncLoad::pic_mgr_async_load_cb, req); pic.pic = picId; pic.tex = texId; + pic.smp = smpId; darg::free_texture(prevTexId, prevPicId); if (sync) @@ -130,7 +132,8 @@ void Picture::onAsyncLoadStopped(AsyncLoadRequest *req) } -void Picture::onLoaded(PICTUREID pid, TEXTUREID tid, const Point2 &tcLt, const Point2 &tcRb, const Point2 &picture_sz) +void Picture::onLoaded(PICTUREID pid, TEXTUREID tid, d3d::SamplerHandle smp, const Point2 &tcLt, const Point2 &tcRb, + const Point2 &picture_sz) { G_UNUSED(picture_sz); @@ -142,6 +145,7 @@ void Picture::onLoaded(PICTUREID pid, TEXTUREID tid, const Point2 &tcLt, const P G_ASSERTF(pid != pic.pic, "pid: %X | %X", pid, pic.pic); pic.pic = pid; pic.tex = tid; + pic.smp = smp; pic.tcLt = tcLt; pic.tcRb = tcRb; } @@ -149,6 +153,7 @@ void Picture::onLoaded(PICTUREID pid, TEXTUREID tid, const Point2 &tcLt, const P { pic.pic = BAD_PICTUREID; pic.tex = BAD_TEXTUREID; + pic.smp = d3d::INVALID_SAMPLER_HANDLE; pic.tcLt.zero(); pic.tcRb.zero(); } diff --git a/prog/gameLibs/daRg/robjMask.cpp b/prog/gameLibs/daRg/robjMask.cpp index 06f3dc36d..d2f338d35 100644 --- a/prog/gameLibs/daRg/robjMask.cpp +++ b/prog/gameLibs/daRg/robjMask.cpp @@ -42,9 +42,8 @@ void RobjMask::render(StdGuiRender::GuiContext &ctx, const Element *elem, const const PictureManager::PicDesc &pic = params->image->getPic(); pic.updateTc(); - darg::uishader::set_mask(ctx, pic.tex, d3d::INVALID_SAMPLER_HANDLE, rdata->pos + rdata->size / 2, 0, - Point2(2 * rdata->size.x / StdGuiRender::screen_width(), 2 * rdata->size.y / StdGuiRender::screen_height()), pic.tcLt, - pic.tcRb); // TODO: Use actual sampler IDs + darg::uishader::set_mask(ctx, pic.tex, pic.smp, rdata->pos + rdata->size / 2, 0, + Point2(2 * rdata->size.x / StdGuiRender::screen_width(), 2 * rdata->size.y / StdGuiRender::screen_height()), pic.tcLt, pic.tcRb); } void RobjMask::postRender(StdGuiRender::GuiContext &ctx, const Element *elem) diff --git a/prog/gameLibs/daRg/stdRendObj.cpp b/prog/gameLibs/daRg/stdRendObj.cpp index bc73e5973..c1035efc8 100644 --- a/prog/gameLibs/daRg/stdRendObj.cpp +++ b/prog/gameLibs/daRg/stdRendObj.cpp @@ -251,9 +251,8 @@ void RenderObjectText::render(StdGuiRender::GuiContext &ctx, const Element *elem ctx.set_draw_str_attr(params->fontFx, params->fxOffsX, params->fxOffsY, color_apply_mods(params->fxColor, render_state.opacity, params->brightness), params->fxFactor); - // TODO: Use actual sampler IDs if (params->fontTex && params->fontTex->getPic().tex != BAD_TEXTUREID) - ctx.set_draw_str_texture(params->fontTex->getPic().tex, d3d::INVALID_SAMPLER_HANDLE, params->fontTexSu, params->fontTexSv, + ctx.set_draw_str_texture(params->fontTex->getPic().tex, params->fontTex->getPic().smp, params->fontTexSu, params->fontTexSv, params->fontTexBov); float strHeight = (ascent + descent); @@ -308,8 +307,8 @@ void RenderObjectText::render(StdGuiRender::GuiContext &ctx, const Element *elem } strWidth += ellipsisWidth; } - all_glyphs_ready = ctx.draw_str_scaled_u_buf(params->guiText.v, params->guiText.c, StdGuiRender::DSBFLAG_rel, SCALE, - textU16 + start_char_idx, char_count); + all_glyphs_ready = ctx.draw_str_scaled_u_buf(params->guiText.v, params->guiText.c, params->guiText.samplers, + StdGuiRender::DSBFLAG_rel, SCALE, textU16 + start_char_idx, char_count); params->strWidth = strWidth; if (has_focus) @@ -347,7 +346,7 @@ void RenderObjectText::render(StdGuiRender::GuiContext &ctx, const Element *elem { ctx.goto_xy(startPosX, startPosY); ctx.start_font_str(SCALE); - ctx.render_str_buf(params->guiText.v, params->guiText.c, + ctx.render_str_buf(params->guiText.v, params->guiText.c, params->guiText.samplers, StdGuiRender::DSBFLAG_rel | StdGuiRender::DSBFLAG_curColor | StdGuiRender::DSBFLAG_checkVis); } else @@ -498,9 +497,8 @@ void RenderObjectInscription::render(StdGuiRender::GuiContext &ctx, const Elemen ctx.set_draw_str_attr(params->fontFx, params->fxOffsX, params->fxOffsY, color_apply_mods(params->fxColor, render_state.opacity, params->brightness), params->fxFactor); - // TODO: Use actual sampler IDs if (params->fontTex && params->fontTex->getPic().tex != BAD_TEXTUREID) - ctx.set_draw_str_texture(params->fontTex->getPic().tex, d3d::INVALID_SAMPLER_HANDLE, params->fontTexSu, params->fontTexSv, + ctx.set_draw_str_texture(params->fontTex->getPic().tex, params->fontTex->getPic().smp, params->fontTexSu, params->fontTexSv, params->fontTexBov); ctx.goto_xy(startPos); @@ -674,7 +672,7 @@ void RenderObjectImage::render(StdGuiRender::GuiContext &ctx, const Element *ele if (params->saturateFactor != 1.0f) ctx.set_picquad_color_matrix_saturate(params->saturateFactor); - ctx.set_texture(pic.tex, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + ctx.set_texture(pic.tex, pic.smp); ctx.set_alpha_blend(image->getBlendMode()); pic.updateTc(); @@ -1056,7 +1054,7 @@ void RenderObject9rect::render(StdGuiRender::GuiContext &ctx, const Element *ele const PictureManager::PicDesc &pic = params->image->getPic(); - ctx.set_texture(pic.tex, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + ctx.set_texture(pic.tex, pic.smp); ctx.set_alpha_blend(params->image->getBlendMode()); const float *texOffs = params->texOffs; @@ -1350,6 +1348,7 @@ void RenderObjectProgressCircular::renderProgress(StdGuiRender::GuiContext &ctx, const float d = sqrtf(2.0); TEXTUREID texId = BAD_TEXTUREID; + d3d::SamplerHandle smpId = d3d::INVALID_SAMPLER_HANDLE; Point2 tcLt(0, 0), tcRb(0, 0); BlendMode blendMode = NONPREMULTIPLIED; @@ -1358,13 +1357,14 @@ void RenderObjectProgressCircular::renderProgress(StdGuiRender::GuiContext &ctx, const PictureManager::PicDesc &pic = image->getPic(); pic.updateTc(); texId = pic.tex; + smpId = pic.smp; tcLt = pic.tcLt; tcRb = pic.tcRb; blendMode = image->getBlendMode(); } ctx.set_color(255, 255, 255); - ctx.set_texture(texId, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + ctx.set_texture(texId, smpId); ctx.set_alpha_blend(blendMode); ctx.start_raw_layer(); @@ -1611,15 +1611,15 @@ void RenderObjectTextArea::render(StdGuiRender::GuiContext &ctx, const Element * { tmpU16.resize(block->text.length() + 1); tmpU16.resize(utf8_to_wcs_ex(block->text.c_str(), tmpU16.size() - 1, tmpU16.data(), tmpU16.size())); - all_glyphs_ready = - ctx.draw_str_scaled_u_buf(guiText.v, guiText.c, StdGuiRender::DSBFLAG_rel, 1.0f, tmpU16.data(), tmpU16.size()); + all_glyphs_ready = ctx.draw_str_scaled_u_buf(guiText.v, guiText.c, guiText.samplers, StdGuiRender::DSBFLAG_rel, 1.0f, + tmpU16.data(), tmpU16.size()); } nowHaveAllSymbols &= all_glyphs_ready; if (all_glyphs_ready && hadAllSymbols) { ctx.goto_xy(sc.screenPos.x - sc.scrollOffs.x + x, sc.screenPos.y - sc.scrollOffs.y + y); ctx.start_font_str(1.0f); - ctx.render_str_buf(guiText.v, guiText.c, + ctx.render_str_buf(guiText.v, guiText.c, guiText.samplers, StdGuiRender::DSBFLAG_rel | StdGuiRender::DSBFLAG_curColor | StdGuiRender::DSBFLAG_checkVis); } if (!all_glyphs_ready) @@ -1956,7 +1956,7 @@ void RenderObjectBox::renderNoRadius(StdGuiRender::GuiContext &ctx, const Elemen image = params->fallbackImage; const PictureManager::PicDesc &pic = image->getPic(); pic.updateTc(); - ctx.set_texture(pic.tex, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + ctx.set_texture(pic.tex, pic.smp); ctx.set_alpha_blend(image->getBlendMode()); if (params->saturateFactor != 1.0f) ctx.set_picquad_color_matrix_saturate(params->saturateFactor); @@ -2038,7 +2038,7 @@ void RenderObjectBox::render(StdGuiRender::GuiContext &ctx, const Element *elem, const PictureManager::PicDesc &pic = image->getPic(); pic.updateTc(); - ctx.set_texture(pic.tex, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + ctx.set_texture(pic.tex, pic.smp); ctx.set_alpha_blend(image->getBlendMode() == NO_BLEND ? PREMULTIPLIED : image->getBlendMode()); Point2 picLt = lt, picRb = rb, picLtTc = pic.tcLt, picRbTc = pic.tcRb; diff --git a/prog/gameLibs/daRg/stdRendObj.h b/prog/gameLibs/daRg/stdRendObj.h index 13e0142e0..94fd9599a 100644 --- a/prog/gameLibs/daRg/stdRendObj.h +++ b/prog/gameLibs/daRg/stdRendObj.h @@ -26,11 +26,13 @@ struct GuiTextCache { SmallTab v; SmallTab c; + SmallTab samplers; void discard() { v.resize(0); c.resize(0); + samplers.resize(0); } bool isReady() const { return StdGuiRender::check_str_buf_ready(c); } }; diff --git a/prog/gameLibs/dasModules/render/dagorDriver3d.cpp b/prog/gameLibs/dasModules/render/dagorDriver3d.cpp index 057c7e372..a0a534194 100644 --- a/prog/gameLibs/dasModules/render/dagorDriver3d.cpp +++ b/prog/gameLibs/dasModules/render/dagorDriver3d.cpp @@ -105,10 +105,11 @@ class DagorDriver3DModule final : public das::Module BIND_FUNC_SIGNATURE(d3d::set_depth, "d3d_set_depth", modifyArgumentAndExternal, bool (*)(BaseTexture *, DepthAccess)); BIND_FUNC_SIGNATURE(d3d::set_depth, "d3d_set_depth", modifyArgumentAndExternal, bool (*)(BaseTexture *, int, DepthAccess)); BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, bool (*)()); - BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, bool (*)(BaseTexture *, int)); - BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, bool (*)(int, BaseTexture *, int)); + BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, bool (*)(BaseTexture *, uint8_t)); BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, - bool (*)(int, BaseTexture *, int, int)); + bool (*)(int, BaseTexture *, uint8_t)); + BIND_FUNC_SIGNATURE(d3d::set_render_target, "d3d_set_render_target", modifyArgumentAndExternal, + bool (*)(int, BaseTexture *, int, uint8_t)); BIND_FUNC(d3d::set_rwtex, "d3d_set_rwtex", modifyArgumentAndExternal); BIND_FUNC(d3d::get_screen_size, "d3d_get_screen_size", modifyArgument); BIND_FUNC(d3d::setwire, "d3d_setwire", modifyExternal); diff --git a/prog/gameLibs/digitalSignature/digitalSignatureCheck.cpp b/prog/gameLibs/digitalSignature/digitalSignatureCheck.cpp index ed8ae93a2..a57364b4f 100644 --- a/prog/gameLibs/digitalSignature/digitalSignatureCheck.cpp +++ b/prog/gameLibs/digitalSignature/digitalSignatureCheck.cpp @@ -3,38 +3,108 @@ #include #include #include +#include -bool verify_digital_signature_with_key_and_algo(const char *hash_algorithm, const void **buffers, const unsigned *buf_sizes, - const unsigned char *signature, int signature_size, const unsigned char *public_key, int public_key_len) +namespace digital_signature { - if (!buffers || !buf_sizes || !signature) - return false; + +enum +{ + PKEY = 0, + CTX = 1 +}; + +Checker::Checker(Checker &&other) { *this = std::move(other); } + +Checker &Checker::operator=(Checker &&other) +{ + opaque[PKEY] = other.opaque[PKEY]; + opaque[CTX] = other.opaque[CTX]; + failed = other.failed; + done = other.done; + + other.opaque[PKEY] = nullptr; + other.opaque[CTX] = nullptr; + other.failed = true; + other.done = true; + + return *this; +} + +Checker::~Checker() +{ + EVP_PKEY *pkey = (EVP_PKEY *)opaque[PKEY]; + EVP_MD_CTX *ctx = (EVP_MD_CTX *)opaque[CTX]; + + if (pkey) + EVP_PKEY_free(pkey); + if (ctx) + EVP_MD_CTX_destroy(ctx); +} + +Checker::Checker(const char *hash_algorithm, const unsigned char *public_key, int public_key_len) +{ + failed = true; const unsigned char *p = public_key; EVP_PKEY *pkey = d2i_PUBKEY(NULL, &p, public_key_len); + opaque[PKEY] = pkey; if (!pkey) - return false; + return; + + const EVP_MD *md = (hash_algorithm && *hash_algorithm) ? EVP_get_digestbyname(hash_algorithm) : EVP_sha256(); + if (!md) + return; - bool verified = true; EVP_MD_CTX *ctx = EVP_MD_CTX_create(); + opaque[CTX] = ctx; + if (!ctx) + return; - const EVP_MD *md = (hash_algorithm && *hash_algorithm) ? EVP_get_digestbyname(hash_algorithm) : EVP_sha256(); + if (!EVP_VerifyInit(ctx, md)) + return; + + failed = false; +} + +bool Checker::append(const void *buffer, unsigned buf_size) +{ + if (failed || done) + return false; + + EVP_MD_CTX *ctx = (EVP_MD_CTX *)opaque[CTX]; + if (!EVP_VerifyUpdate(ctx, buffer, buf_size)) + failed = true; + + return !failed; +} + +bool Checker::check(const unsigned char *signature, unsigned signature_size) +{ + if (failed || done) + return false; + + EVP_PKEY *pkey = (EVP_PKEY *)opaque[PKEY]; + EVP_MD_CTX *ctx = (EVP_MD_CTX *)opaque[CTX]; + done = true; + return EVP_VerifyFinal(ctx, signature, signature_size, pkey) == 1; +} + +} // namespace digital_signature - if (md && EVP_VerifyInit(ctx, md)) - { - for (int i = 0; buffers[i] && verified; ++i) - verified = EVP_VerifyUpdate(ctx, buffers[i], buf_sizes[i]) != 0; - if (verified) - verified = EVP_VerifyFinal(ctx, signature, signature_size, pkey) == 1; - } - else - verified = false; - EVP_PKEY_free(pkey); - EVP_MD_CTX_destroy(ctx); +bool verify_digital_signature_with_key_and_algo(const char *hash_algorithm, const void **buffers, const unsigned *buf_sizes, + const unsigned char *signature, int signature_size, const unsigned char *public_key, int public_key_len) +{ + if (!buffers || !buf_sizes || !signature) + return false; - return verified; + digital_signature::Checker checker(hash_algorithm, public_key, public_key_len); + for (int i = 0; buffers[i]; ++i) + if (!checker.append(buffers[i], buf_sizes[i])) + return false; + return checker.check(signature, signature_size); } diff --git a/prog/gameLibs/ecs/game/generic/gridES.cpp.inl b/prog/gameLibs/ecs/game/generic/gridES.cpp.inl index 4ba379098..f10de93ac 100644 --- a/prog/gameLibs/ecs/game/generic/gridES.cpp.inl +++ b/prog/gameLibs/ecs/game/generic/gridES.cpp.inl @@ -282,8 +282,12 @@ void grid_obj_update_es_event_handler(const ecs::Event &, GridObjComponent &grid #if DAGOR_DBGLEVEL > 0 if (DAGOR_UNLIKELY(isnan(boundingRad) || boundingRad > MAX_VALID_BOUNDING_RADIUS)) { - grid_logerr("Grid entity %i (%s) update error: bounding radius %f is too big or NaN", ecs::entity_id_t(grid_obj.eid), - g_entity_mgr->getEntityTemplateName(grid_obj.eid), boundingRad); + const char *resName = nullptr; + if (ri_extra) + resName = rendinst::getRIGenExtraName(rendinst::handle_to_ri_type(ri_extra->handle)); + + grid_logerr("Grid entity %i (%s) update error: bounding radius %f is too big or NaN (resName=%s)", + ecs::entity_id_t(grid_obj.eid), g_entity_mgr->getEntityTemplateName(grid_obj.eid), boundingRad, resName ? resName : "n/a"); boundingRad = FLT_EPSILON; } #endif diff --git a/prog/gameLibs/gamePhys/phys/destructableObject.cpp b/prog/gameLibs/gamePhys/phys/destructableObject.cpp index 2cada0578..b35352fb2 100644 --- a/prog/gameLibs/gamePhys/phys/destructableObject.cpp +++ b/prog/gameLibs/gamePhys/phys/destructableObject.cpp @@ -52,6 +52,21 @@ DestructableObject::DestructableObject(const destructables::DestructableCreation defaultTimeToLive = params.defaultTimeToLive; if (params.timeToKinematic >= 0.0f) timeToKinematic = params.timeToKinematic; + if (params.timeToSinkUnderground > 0.0f) + timeToSinkUnderground = params.timeToSinkUnderground; + + BBox3 bbox; + for (int i = 0; i < physObj->getPhysSys()->getBodyCount(); i++) + { + Point3 bodyMin, bodyMax; + TMatrix bodyTm; + auto *body = physObj->getPhysSys()->getBody(i); + body->getTm(bodyTm); + body->getShapeAabb(bodyMin, bodyMax); + bbox += bodyTm * bodyMin; + bbox += bodyTm * bodyMax; + } + bboxHeight = bbox.width().y; clear_and_resize(ttlBodies, physObj->getPhysSys()->getBodyCount()); for (int i = 0; i < ttlBodies.size(); ++i) @@ -172,12 +187,12 @@ void DestructableObject::keepFloatable(float dt, float at_time) } } -bool DestructableObject::update(float dt, bool force_update_ttl) +bool DestructableObject::update(float dt, float dt_scale, bool force_update_ttl) { TIME_PROFILE(DestructableObject__update); float updateDt = dt * scaleDt; - bool forceUpdateTtl = force_update_ttl && scaleDt > 1.f; + bool forceUpdateTtl = force_update_ttl && scaleDt > 1.f || ttl < defaultTimeToLive + timeToSinkUnderground; for (int i = 0; i < physObj->getPhysSys()->getBodyCount(); ++i) { PhysBody *body = physObj->getPhysSys()->getBody(i); @@ -191,9 +206,12 @@ bool DestructableObject::update(float dt, bool force_update_ttl) { if (updateDt > ttlBodies[i] && ttlBodies[i] >= 0.f) { + // calculate acceleration, required to fully sink object bounding box + const float sinkUndergroundGravity = + eastl::max(0.1f, bboxHeight / sqr(timeToSinkUnderground / (scaleDt * dt_scale)) * 2.0f / /* adjust for damping */ 0.8f); // Disable physics, just play animation body->setGroupAndLayerMask(0, 0); - body->setGravity(Point3(0.f, -0.1f, 0.f)); + body->setGravity(Point3(0.f, -sinkUndergroundGravity, 0.f)); } if (ttlBodies[i] < 0.f) body->activateBody(true); @@ -357,7 +375,8 @@ void update(float dt) { TIME_PROFILE(destructables_update); - float dtUpdate = dt * cvt(numActiveBodies, numOfDestrBodiesForScaleDt, maxNumberOfDestructableBodies, 1.f, maxScaleDt); + const float dtUpdateScale = cvt(numActiveBodies, numOfDestrBodiesForScaleDt, maxNumberOfDestructableBodies, 1.f, maxScaleDt); + const float dtUpdate = dt * dtUpdateScale; bool forceUpdateTtl = numOfDestrBodiesForScaleDt > 0 && numActiveBodies > numOfDestrBodiesForScaleDt; numActiveBodies = 0; int deleteLimit = DESTRUCTABLES_DELETE_MAX_PER_FRAME; @@ -369,7 +388,7 @@ void update(float dt) if (deleteLimit-- > 0) return true; // ~18 deletions at 1 msec on AMD 5800H. Move to thread? } - else if (object->update(dtUpdate, forceUpdateTtl)) + else if (object->update(dtUpdate, dtUpdateScale, forceUpdateTtl)) numActiveBodies += object->getNumActiveBodies(); // else it already considered marked for deletion return false; diff --git a/prog/gameLibs/hudprim/hudPrimitives.cpp b/prog/gameLibs/hudprim/hudPrimitives.cpp index 4b0c15681..2d2ec432d 100644 --- a/prog/gameLibs/hudprim/hudPrimitives.cpp +++ b/prog/gameLibs/hudprim/hudPrimitives.cpp @@ -488,12 +488,13 @@ void HudPrimitives::renderQuadScreenSpaceDeprecated(TEXTUREID texture_id, d3d::S #undef FILL_GUIVTX42 } -void HudPrimitives::renderQuadScreenSpace3d(TEXTUREID texture_id, E3DCOLOR color, const Point4 &p0, const Point4 &p1, const Point4 &p2, - const Point4 &p3, const Point2 &tc0, const Point2 &tc1, const Point2 &tc2, const Point2 &tc3, const E3DCOLOR *vertex_colors) +void HudPrimitives::renderQuadScreenSpace3d(TEXTUREID texture_id, d3d::SamplerHandle smp, E3DCOLOR color, const Point4 &p0, + const Point4 &p1, const Point4 &p2, const Point4 &p3, const Point2 &tc0, const Point2 &tc1, const Point2 &tc2, const Point2 &tc3, + const E3DCOLOR *vertex_colors) { G_ASSERT(isInHudRender); - updateState(texture_id, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + updateState(texture_id, smp); HudVertex *vtx = guiContext->qCacheAllocT(1); #define FILL_GUIVTX42(data, idx, p, t, cc) \ @@ -658,12 +659,13 @@ static void triangulate(dag::ConstSpan p, Tab &indices) { static void triangulate(dag::ConstSpan p, Tab &indices) { triangulateT(p, indices); } -void HudPrimitives::renderPoly(TEXTUREID texture_id, E3DCOLOR color, dag::ConstSpan p, dag::ConstSpan tc) +void HudPrimitives::renderPoly(TEXTUREID texture_id, d3d::SamplerHandle smp, E3DCOLOR color, dag::ConstSpan p, + dag::ConstSpan tc) { G_ASSERT(isInHudRender); G_ASSERT(p.size() == tc.size()); - updateState(texture_id, d3d::INVALID_SAMPLER_HANDLE); // TODO: Use actual sampler IDs + updateState(texture_id, smp); flush(); Tab vtx(framemem_ptr()); @@ -871,24 +873,28 @@ void HudPrimitives::renderText(int x, int y, int font_no, E3DCOLOR color, const Point2 posOffset = Point2(x, y); StdGuiRender::set_font(font_no); - buffer->isReady = StdGuiRender::draw_str_scaled_u_buf(buffer->qv, buffer->tex_qcnt, DSBFLAG_rel, 1.f, text_u, textLen); + buffer->isReady = + StdGuiRender::draw_str_scaled_u_buf(buffer->qv, buffer->tex_qcnt, buffer->samplers, DSBFLAG_rel, 1.f, text_u, textLen); } if (!buffer->isReady || buffer->tex_qcnt.size() < 2) return; const GuiVertex *cur_qv = buffer->qv.data(); - for (const uint16_t *tq = &buffer->tex_qcnt[1], *tq_end = buffer->tex_qcnt.data() + buffer->tex_qcnt.size(); tq < tq_end; tq += 2) + const d3d::SamplerHandle *cur_smp = buffer->samplers.data(); + for (const uint16_t *tq = &buffer->tex_qcnt[1], *tq_end = buffer->tex_qcnt.data() + buffer->tex_qcnt.size(); tq < tq_end; + tq += 2, cur_smp++) { int full_qnum = tq[1]; if (!full_qnum) continue; TEXTUREID texture_id = D3DRESID::fromIndex(tq[0]); + d3d::SamplerHandle smp = *cur_smp; if (texture_id != state().currentTexture) { state().currentTexture = texture_id; - state().currentSampler = d3d::INVALID_SAMPLER_HANDLE; // TODO: Use actual sampler IDs + state().currentSampler = smp; state().currentBlueToAlpha = Color4(1.f, 0.f, 0.f, 0.f); setState(); } @@ -1012,7 +1018,8 @@ void HudPrimitives::renderTextFx(float x, float y, int font_no, E3DCOLOR color, G_ASSERT(guiContext->curRenderFont.font); float locScale = (scale <= 0) ? 1 : scale; - buffer->isReady = guiContext->draw_str_scaled_u_buf(buffer->qv, buffer->tex_qcnt, DSBFLAG_rel, locScale, text_u, len); + buffer->isReady = + guiContext->draw_str_scaled_u_buf(buffer->qv, buffer->tex_qcnt, buffer->samplers, DSBFLAG_rel, locScale, text_u, len); } if (align == 0 || align == 1 || valign == 0 || valign == 1) @@ -1036,7 +1043,7 @@ void HudPrimitives::renderTextFx(float x, float y, int font_no, E3DCOLOR color, guiContext->set_color(color); guiContext->goto_xy(x - viewX, y - viewY); guiContext->setRotViewTm(pivot.origin.x - viewX, pivot.origin.y - viewY, pivot.angleRadians, 0); - guiContext->render_str_buf(buffer->qv, buffer->tex_qcnt, DSBFLAG_rel | DSBFLAG_allQuads | DSBFLAG_curColor); + guiContext->render_str_buf(buffer->qv, buffer->tex_qcnt, buffer->samplers, DSBFLAG_rel | DSBFLAG_allQuads | DSBFLAG_curColor); } guiContext->setBuffer(1); @@ -1044,11 +1051,11 @@ void HudPrimitives::renderTextFx(float x, float y, int font_no, E3DCOLOR color, guiContext->reset_draw_str_texture(); } -void HudPrimitives::setMask(TEXTUREID texture_id, const Point3 &matrix_line_0, const Point3 &matrix_line_1, const Point2 &tc0, - const Point2 &tc1) +void HudPrimitives::setMask(TEXTUREID texture_id, d3d::SamplerHandle smp_id, const Point3 &matrix_line_0, const Point3 &matrix_line_1, + const Point2 &tc0, const Point2 &tc1) { state().maskTexId = texture_id; - state().maskSampler = d3d::INVALID_SAMPLER_HANDLE; // TODO: Use actual sampler IDs + state().maskSampler = smp_id; Point3 matrixLine0 = matrix_line_0 * (tc1.x - tc0.x); Point3 matrixLine1 = matrix_line_1 * (tc1.y - tc0.y); @@ -1061,11 +1068,11 @@ void HudPrimitives::setMask(TEXTUREID texture_id, const Point3 &matrix_line_0, c setState(); } -void HudPrimitives::setMask(TEXTUREID texture_id, const Point2 ¢er_pos, float angle, const Point2 &scale, const Point2 &tc0, - const Point2 &tc1) +void HudPrimitives::setMask(TEXTUREID texture_id, d3d::SamplerHandle smp_id, const Point2 ¢er_pos, float angle, + const Point2 &scale, const Point2 &tc0, const Point2 &tc1) { state().maskTexId = texture_id; - state().maskSampler = d3d::INVALID_SAMPLER_HANDLE; // TODO: Use actual sampler IDs + state().maskSampler = smp_id; Point2 centerPos((center_pos.x - viewX) * viewWidthRcp2 - 1.f, 1.f - (center_pos.y - viewY) * viewHeightRcp2); @@ -1086,7 +1093,8 @@ void HudPrimitives::setMask(TEXTUREID texture_id, const Point2 ¢er_pos, floa Matrix3 matrix = texCenter * rotation * sacaleAndOffset; - setMask(texture_id, Point3(matrix[0][0], matrix[1][0], matrix[2][0]), Point3(matrix[0][1], matrix[1][1], matrix[2][1]), tc0, tc1); + setMask(texture_id, smp_id, Point3(matrix[0][0], matrix[1][0], matrix[2][0]), Point3(matrix[0][1], matrix[1][1], matrix[2][1]), tc0, + tc1); } void HudPrimitives::clearMask() diff --git a/prog/gameLibs/landMesh/lmeshHoles.cpp b/prog/gameLibs/landMesh/lmeshHoles.cpp index 7f024f4b2..1675bb84c 100644 --- a/prog/gameLibs/landMesh/lmeshHoles.cpp +++ b/prog/gameLibs/landMesh/lmeshHoles.cpp @@ -92,16 +92,18 @@ BBox2 LandMeshHolesManager::HoleArgs::getBBox2() const LandMeshHolesManager::LandMeshHolesManager(const HeightmapHandler *hmap_handler, int cells_count) { + ScopedLockWrite lock(&rwLock); holeCellsCount = cells_count; cells.resize(holeCellsCount * holeCellsCount); hmapHandler = hmap_handler; - clearHoles(); + clearHolesInternal(); } void LandMeshHolesManager::clearAndAddHoles(const eastl::vector &holes) { - clearHoles(); + ScopedLockWrite lock(&rwLock); + clearHolesInternal(); if (holes.empty()) return; @@ -125,7 +127,14 @@ void LandMeshHolesManager::clearAndAddHoles(const eastl::vector &holes } } } + void LandMeshHolesManager::clearHoles() +{ + ScopedLockWrite lock(&rwLock); + clearHolesInternal(); +} + +void LandMeshHolesManager::clearHolesInternal() { for (int i = 0; i < holeCellsCount * holeCellsCount; i++) cells[i].clear(); @@ -145,12 +154,14 @@ size_t LandMeshHolesManager::getCellIndex(const Point2 &point) const } bool LandMeshHolesManager::check(const Point2 &posXZ) const { + ScopedLockRead lock(&rwLock); if (!hmapHandler || !(holesRegion & posXZ)) return false; return cells[getCellIndex(posXZ)].check(posXZ, hmapHandler); } bool LandMeshHolesManager::check(const Point2 &posXZ, float hmap_height) const { + ScopedLockRead lock(&rwLock); if (!hmapHandler || !(holesRegion & posXZ)) return false; return cells[getCellIndex(posXZ)].check(Point3(posXZ.x, hmap_height, posXZ.y)); diff --git a/prog/gameLibs/pathFinder/tileCache/tileCache.cpp b/prog/gameLibs/pathFinder/tileCache/tileCache.cpp index 93134294b..ec1a98720 100644 --- a/prog/gameLibs/pathFinder/tileCache/tileCache.cpp +++ b/prog/gameLibs/pathFinder/tileCache/tileCache.cpp @@ -299,7 +299,14 @@ obstacle_handle_t tilecache_obstacle_add(const Point3 &c, const Point3 &ext, flo int ntouched = 0; tileCache->queryTiles(bmin, bmax, ob->touched, &ntouched, DT_MAX_TOUCHED_TILES); if (ntouched == DT_MAX_TOUCHED_TILES) - logerr("Maximum number of touched tiles (%d) has been reached? pos(%@) ext(%@)", DT_MAX_TOUCHED_TILES, c, ext); + { +#if _TARGET_PC || DAGOR_DBGLEVEL <= 0 + constexpr int ll = LOGLEVEL_ERR; +#else + constexpr int ll = LOGLEVEL_WARN; // Dev run of PC server mission/scene? +#endif + logmessage(ll, "Maximum number of touched tiles (%d) has been reached? pos(%@) ext(%@)", DT_MAX_TOUCHED_TILES, c, ext); + } ob->ntouched = (unsigned char)ntouched; } else diff --git a/prog/gameLibs/publicInclude/daRg/dag_guiScene.h b/prog/gameLibs/publicInclude/daRg/dag_guiScene.h index 1c6df2dc8..742f23e8e 100644 --- a/prog/gameLibs/publicInclude/daRg/dag_guiScene.h +++ b/prog/gameLibs/publicInclude/daRg/dag_guiScene.h @@ -42,6 +42,7 @@ class IEventList; class Element; class BaseScriptHandler; struct IGuiScene; +struct PanelSpatialInfo; enum SceneErrorRenderMode { @@ -204,6 +205,7 @@ struct IGuiScene virtual void updateSpatialElements(const VrSceneData &vr_scene) = 0; virtual void refreshVrCursorProjections() = 0; virtual bool hasAnyPanels() = 0; + virtual const darg::PanelSpatialInfo *getPanelSpatialInfo(int id) const = 0; // Returns true iff panel was hit. // TODO: it is awkward tha GUI has to know about the game world... diff --git a/prog/gameLibs/publicInclude/daRg/dag_picture.h b/prog/gameLibs/publicInclude/daRg/dag_picture.h index 5bea7232c..8a9d1937d 100644 --- a/prog/gameLibs/publicInclude/daRg/dag_picture.h +++ b/prog/gameLibs/publicInclude/daRg/dag_picture.h @@ -31,7 +31,8 @@ class Picture ~Picture(); void init(const char *name); - void onLoaded(PICTUREID pid, TEXTUREID tid, const Point2 &tcLt, const Point2 &tcRb, const Point2 &picture_sz); + void onLoaded(PICTUREID pid, TEXTUREID tid, d3d::SamplerHandle smp, const Point2 &tcLt, const Point2 &tcRb, + const Point2 &picture_sz); void onAsyncLoadStopped(AsyncLoadRequest *req); IGuiScene *getScene() const; diff --git a/prog/gameLibs/publicInclude/digitalSignature/digitalSignatureCheck.h b/prog/gameLibs/publicInclude/digitalSignature/digitalSignatureCheck.h index 40781fe94..a55e035c2 100644 --- a/prog/gameLibs/publicInclude/digitalSignature/digitalSignatureCheck.h +++ b/prog/gameLibs/publicInclude/digitalSignature/digitalSignatureCheck.h @@ -9,3 +9,30 @@ bool verify_digital_signature_with_key(const void **buffers, const unsigned *buf bool verify_digital_signature_with_key_and_algo(const char *hash_algorithm, const void **buffers, const unsigned *buf_sizes, const unsigned char *signature, int signature_size, const unsigned char *public_key, int public_key_len); + + +namespace digital_signature +{ + +class Checker +{ +public: + Checker(const char *hash_algorithm, const unsigned char *public_key, int public_key_len); + ~Checker(); + + Checker(Checker &&other); + Checker &operator=(Checker &&other); + + Checker(const Checker &) = delete; + Checker &operator=(const Checker &) = delete; + + bool append(const void *buffer, unsigned buf_size); + bool check(const unsigned char *signature, unsigned signature_size); + +private: + void *opaque[2] = {nullptr}; + bool failed = false; + bool done = false; +}; + +} // namespace digital_signature diff --git a/prog/gameLibs/publicInclude/fftWater/fftWater.h b/prog/gameLibs/publicInclude/fftWater/fftWater.h index 496954279..10aacc3c2 100644 --- a/prog/gameLibs/publicInclude/fftWater/fftWater.h +++ b/prog/gameLibs/publicInclude/fftWater/fftWater.h @@ -172,6 +172,7 @@ struct WaterFlowmap Point2 flowmapWaveFade = Point2(1, 5); bool flowmapDetail = true; bool usingFoamFx = false; + bool hasSlopes = false; SharedTexHolder tex; PostFxRenderer builder; diff --git a/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h b/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h index cdd8b9159..0ca3fa59a 100644 --- a/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h +++ b/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h @@ -40,6 +40,7 @@ struct DestructableCreationParams float timeToLive = -1.0f; float defaultTimeToLive = -1.0f; float timeToKinematic = -1.0f; + float timeToSinkUnderground = -1.0f; bool isDestroyedByExplosion = false; }; } // namespace destructables @@ -60,6 +61,8 @@ class DestructableObject friend struct gamephys::DestructableObjectAddImpulse; float timeToKinematic = 2; float defaultTimeToLive = 3; + float timeToSinkUnderground = 3; + float bboxHeight = 0.0f; float scaleDt; void doAddImpulse(const Point3 &pos, const Point3 &impulse, float speedLimit, float omegaLimit); @@ -71,7 +74,7 @@ class DestructableObject Point4 intialTmAndHash[4]; // row0-1 - initialTm(43), row3 = hash DestructableObject(const destructables::DestructableCreationParams ¶ms, PhysWorld *phys_world, float scale_dt); - bool update(float dt, bool force_update_ttl); // return false if it need to be destroyed + bool update(float dt, float cur_dt_scale, bool force_update_ttl); // return false if it need to be destroyed destructables::id_t getId() const { return (destructables::id_t)this; } diff --git a/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h b/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h index 161359288..4724db9ee 100644 --- a/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h +++ b/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h @@ -69,6 +69,7 @@ struct DestrSettings bool hasStaticShadowsInvalidationCallback = false; float rendInstMaxLifeTime = 25.f; + float maxTreeImpulseDamage = 1000.0f; float hitPointsToDestrImpulseMult = 3000.f; float destrImpulseHitPointsMult = 1.f / 3000.f; float destrImpulseSendDist = 128.f; diff --git a/prog/gameLibs/publicInclude/hudprim/dag_hudPrimitives.h b/prog/gameLibs/publicInclude/hudprim/dag_hudPrimitives.h index 01bda1940..9df56d5ca 100644 --- a/prog/gameLibs/publicInclude/hudprim/dag_hudPrimitives.h +++ b/prog/gameLibs/publicInclude/hudprim/dag_hudPrimitives.h @@ -303,14 +303,14 @@ class HudPrimitives vertex_colors); } - void renderQuadScreenSpace3d(TEXTUREID texture_id, E3DCOLOR color, const Point4 &p0, const Point4 &p1, const Point4 &p2, - const Point4 &p3, const Point2 &tc0 = Point2(0.f, 0.f), const Point2 &tc1 = Point2(0.f, 1.f), const Point2 &tc2 = Point2(1.f, 1.f), - const Point2 &tc3 = Point2(1.f, 0.f), const E3DCOLOR *vertex_colors = NULL); + void renderQuadScreenSpace3d(TEXTUREID texture_id, d3d::SamplerHandle smp, E3DCOLOR color, const Point4 &p0, const Point4 &p1, + const Point4 &p2, const Point4 &p3, const Point2 &tc0 = Point2(0.f, 0.f), const Point2 &tc1 = Point2(0.f, 1.f), + const Point2 &tc2 = Point2(1.f, 1.f), const Point2 &tc3 = Point2(1.f, 0.f), const E3DCOLOR *vertex_colors = NULL); void renderQuad(const HudTexElem &elem, const E3DCOLOR color, dag::ConstSpan pos, dag::ConstSpan col, const Coords coords, const float depth_2d = 0.0f); - void renderPoly(TEXTUREID texture_id, E3DCOLOR color, dag::ConstSpan p, dag::ConstSpan tc); + void renderPoly(TEXTUREID texture_id, d3d::SamplerHandle smp, E3DCOLOR color, dag::ConstSpan p, dag::ConstSpan tc); void renderTriFan(TEXTUREID texture_id, d3d::SamplerHandle smp, E3DCOLOR color, dag::ConstSpan p, dag::ConstSpan tc); @@ -339,11 +339,11 @@ class HudPrimitives Point2 getColoredTextBBox(const char *text, int font_no); - void setMask(TEXTUREID texture_id, const Point3 &matrix_line_0, const Point3 &matrix_line_1, const Point2 &tc0 = Point2(0.f, 0.f), - const Point2 &tc1 = Point2(1.f, 1.f)); + void setMask(TEXTUREID texture_id, d3d::SamplerHandle smp_id, const Point3 &matrix_line_0, const Point3 &matrix_line_1, + const Point2 &tc0 = Point2(0.f, 0.f), const Point2 &tc1 = Point2(1.f, 1.f)); - void setMask(TEXTUREID texture_id, const Point2 ¢er_pos, float angle, const Point2 &scale, const Point2 &tc0 = Point2(0.f, 0.f), - const Point2 &tc1 = Point2(1.f, 1.f)); + void setMask(TEXTUREID texture_id, d3d::SamplerHandle smp_id, const Point2 ¢er_pos, float angle, const Point2 &scale, + const Point2 &tc0 = Point2(0.f, 0.f), const Point2 &tc1 = Point2(1.f, 1.f)); void clearMask(); @@ -412,6 +412,7 @@ class HudPrimitives bool isReady = false; SmallTab qv; SmallTab tex_qcnt; + SmallTab samplers; }; ska::flat_hash_map textBuffers; diff --git a/prog/gameLibs/publicInclude/landMesh/lmeshHoles.h b/prog/gameLibs/publicInclude/landMesh/lmeshHoles.h index 74e0cd64e..19b8d89df 100644 --- a/prog/gameLibs/publicInclude/landMesh/lmeshHoles.h +++ b/prog/gameLibs/publicInclude/landMesh/lmeshHoles.h @@ -8,6 +8,7 @@ #include #include #include +#include class HeightmapHandler; class LandMeshHolesCell @@ -55,6 +56,7 @@ class LandMeshHolesManager private: size_t getCellIndex(const Point2 &p) const; + void clearHolesInternal(); int holeCellsCount; BBox2 holesRegion; @@ -62,4 +64,5 @@ class LandMeshHolesManager Point2 cellSizeInv; eastl::vector cells; const HeightmapHandler *hmapHandler; + mutable SmartReadWriteFifoLock rwLock; }; diff --git a/prog/gameLibs/publicInclude/quirrel/frp/dag_frp.h b/prog/gameLibs/publicInclude/quirrel/frp/dag_frp.h index ff05c417d..f60ac5a66 100644 --- a/prog/gameLibs/publicInclude/quirrel/frp/dag_frp.h +++ b/prog/gameLibs/publicInclude/quirrel/frp/dag_frp.h @@ -142,6 +142,7 @@ class ObservablesGraph ComputedValue *inRecalc = nullptr; + int slowUpdateThresholdUsec = 1500; int generation = 0; bool checkNestedObservable = false; bool forceImmutable = false; @@ -157,6 +158,7 @@ class ObservablesGraph int curTriggerSubscribersCounter = 0; int triggerNestDepth = 0; int recalcNestDepth = 0; + int slowUpdateFrames = 0; eastl::vector stubObservableClases; }; diff --git a/prog/gameLibs/publicInclude/rendInst/rendInstAccess.h b/prog/gameLibs/publicInclude/rendInst/rendInstAccess.h index cff93dca8..21be576d7 100644 --- a/prog/gameLibs/publicInclude/rendInst/rendInstAccess.h +++ b/prog/gameLibs/publicInclude/rendInst/rendInstAccess.h @@ -20,8 +20,15 @@ struct RiGenVisibility; namespace rendinst { +struct AutoLockReadPrimary +{ + AutoLockReadPrimary(); + ~AutoLockReadPrimary(); +}; + struct AutoLockReadPrimaryAndExtra { + AutoLockReadPrimary primaryLock; AutoLockReadPrimaryAndExtra(); ~AutoLockReadPrimaryAndExtra(); }; diff --git a/prog/gameLibs/publicInclude/rendInst/visibility.h b/prog/gameLibs/publicInclude/rendInst/visibility.h index 2f5579a76..1ecdf1a19 100644 --- a/prog/gameLibs/publicInclude/rendInst/visibility.h +++ b/prog/gameLibs/publicInclude/rendInst/visibility.h @@ -67,6 +67,11 @@ bool prepareRIGenExtraVisibility(mat44f_cref gtm, const Point3 &viewPos, RiGenVi const VisibilityExternalFilter &external_filter = {}, bool filter_precise_bbox = false); bool prepareRIGenExtraVisibilityBox(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, RiGenVisibility &vbase, bbox3f *result_box = nullptr); +bool prepareRIGenExtraVisibilityForGrassifyBox(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, + RiGenVisibility &vbase, bbox3f *result_box = nullptr); +bool prepareRIGenExtraVisibilityBoxInternal(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, bool filter_grassify, + RiGenVisibility &vbase, bbox3f *result_box); +void filterVisibility(RiGenVisibility &from, RiGenVisibility &to, const VisibilityExternalFilter &external_filter); void requestLodsByDistance(const Point3 &view_pos); diff --git a/prog/gameLibs/publicInclude/render/denoiser.h b/prog/gameLibs/publicInclude/render/denoiser.h index 41348ffdc..9e73cbc3c 100644 --- a/prog/gameLibs/publicInclude/render/denoiser.h +++ b/prog/gameLibs/publicInclude/render/denoiser.h @@ -73,6 +73,7 @@ struct ReflectionDenoiser Texture *denoisedReflection = nullptr; Texture *reflectionValue = nullptr; Texture *validationTexture = nullptr; + bool antiFirefly = false; bool performanceMode = true; bool checkerboard = true; bool highSpeedMode = false; diff --git a/prog/gameLibs/publicInclude/render/dynmodelRenderer.h b/prog/gameLibs/publicInclude/render/dynmodelRenderer.h index 3eb865012..acf10462c 100644 --- a/prog/gameLibs/publicInclude/render/dynmodelRenderer.h +++ b/prog/gameLibs/publicInclude/render/dynmodelRenderer.h @@ -145,19 +145,31 @@ void get_prev_view_proj(TMatrix4_vec4 &prev_view, TMatrix4_vec4 &prev_proj); void set_local_offset_hint(const Point3 &hint); void enable_separate_atest_pass(bool enable); +ShaderElement *get_replaced_shader(); void replace_shader(ShaderElement *element); struct ReplacedShaderScope { - ReplacedShaderScope(ShaderElement *element) { replace_shader(element); } + ReplacedShaderScope(ShaderElement *element) + { + G_ASSERTF(get_replaced_shader() == nullptr, "ReplacedShaderScope reentry not allowed!"); + replace_shader(element); + } + ~ReplacedShaderScope() { replace_shader(nullptr); } }; // scoped material filtering +const Tab &get_filtered_material_names(); void set_material_filters_by_name(Tab &&material_names); struct MaterialFilterScope { - MaterialFilterScope(Tab &&material_names) { set_material_filters_by_name(std::move(material_names)); } + MaterialFilterScope(Tab &&material_names) + { + G_ASSERTF(get_filtered_material_names().size() == 0, "MaterialFilterScope reentry not allowed!"); + set_material_filters_by_name(std::move(material_names)); + } + ~MaterialFilterScope() { set_material_filters_by_name({}); } }; diff --git a/prog/gameLibs/publicInclude/render/grassify.h b/prog/gameLibs/publicInclude/render/grassify.h index 4a73a74df..9a6ebc25c 100644 --- a/prog/gameLibs/publicInclude/render/grassify.h +++ b/prog/gameLibs/publicInclude/render/grassify.h @@ -24,9 +24,10 @@ class Grassify Grassify(const DataBlock &settings, int grassMaskResolution, float grassDistance); ~Grassify(); - void generate(const Point3 &pos, const TMatrix &view_itm, BaseTexture *grass_mask, IRandomGrassRenderHelper &grassRenderHelper, - const GPUGrassBase &gpuGrassBase); + void generate(const Point3 &pos, const TMatrix &view_tm, const Driver3dPerspective &perspective, BaseTexture *grass_mask, + IRandomGrassRenderHelper &grassRenderHelper, const GPUGrassBase &gpuGrassBase); void generateGrassMask(IRandomGrassRenderHelper &grassRenderHelper); + void initGrassifyRendinst(); private: eastl::unique_ptr grassMaskHelper; diff --git a/prog/gameLibs/publicInclude/render/mobile_ssao.h b/prog/gameLibs/publicInclude/render/mobile_ssao.h index 2408d3d77..0d987708e 100644 --- a/prog/gameLibs/publicInclude/render/mobile_ssao.h +++ b/prog/gameLibs/publicInclude/render/mobile_ssao.h @@ -25,8 +25,10 @@ class MobileSSAORenderer : public ISSAORenderer Texture *getSSAOTex() override; TEXTUREID getSSAOTexId() override; + void setReprojection(const TMatrix &view_tm, const TMatrix4 &proj_tm); + private: - void render(const TMatrix &, const TMatrix4 &, BaseTexture *depth_tex_to_use, const ManagedTex *ssaoTex, + void render(const TMatrix &view_tm, const TMatrix4 &proj_tm, BaseTexture *depth_tex_to_use, const ManagedTex *ssaoTex, const ManagedTex *prevSsaoTex, const ManagedTex *tmpTex, const DPoint3 *, SubFrameSample sub_sample = SubFrameSample::Single) override; @@ -47,4 +49,10 @@ class MobileSSAORenderer : public ISSAORenderer eastl::array ssaoTex; eastl::unique_ptr ssaoBlurRenderer{nullptr}; + + struct + { + TMatrix4 prevGlobTm; + DPoint3 prevWorldPos; + } reprojectionData; }; diff --git a/prog/gameLibs/publicInclude/spirv/module_builder.h b/prog/gameLibs/publicInclude/spirv/module_builder.h index 42297a418..e47a425b3 100644 --- a/prog/gameLibs/publicInclude/spirv/module_builder.h +++ b/prog/gameLibs/publicInclude/spirv/module_builder.h @@ -510,6 +510,13 @@ struct WordWriter words.reserve(words.size() + wordsToWrite); writeWord(static_cast(opcode) | static_cast(wordsToWrite << WordCountShift)); } + void writeWord(LiteralExtInstInteger w) + { + if (hadError) + return; + words.push_back(w.value); + ++wordsWritten; + } void writeWord(unsigned w) { if (hadError) diff --git a/prog/gameLibs/publicInclude/spirv/traits_table.h b/prog/gameLibs/publicInclude/spirv/traits_table.h index 2cc90c527..b8f3e6110 100644 --- a/prog/gameLibs/publicInclude/spirv/traits_table.h +++ b/prog/gameLibs/publicInclude/spirv/traits_table.h @@ -14,100 +14,137 @@ namespace spirv { enum class Extension { - KHR_ray_query = 0, - KHR_multiview = 1, + KHR_multiview = 0, + KHR_ray_query = 1, INTEL_optnone = 2, - AMD_gcn_shader = 3, - INTEL_fpga_reg = 4, - NV_mesh_shader = 5, - NV_ray_tracing = 6, - INTEL_io_pipes = 7, - INTEL_loop_fuse = 8, + NV_mesh_shader = 3, + NV_ray_tracing = 4, + INTEL_io_pipes = 5, + INTEL_fpga_reg = 6, + AMD_gcn_shader = 7, + EXT_mesh_shader = 8, KHR_ray_tracing = 9, - INTEL_subgroups = 10, - NV_shading_rate = 11, - KHR_linkonce_odr = 12, - KHR_device_group = 13, + NV_shading_rate = 10, + INTEL_subgroups = 11, + INTEL_loop_fuse = 12, + KHR_linkonce_odr = 13, GOOGLE_user_type = 14, - KHR_8bit_storage = 15, - KHR_shader_clock = 16, - KHR_subgroup_vote = 17, - AMD_shader_ballot = 18, - KHR_expect_assume = 19, - KHR_16bit_storage = 20, - KHR_shader_ballot = 21, - NV_viewport_array2 = 22, - INTEL_debug_module = 23, - KHR_float_controls = 24, - NV_bindless_texture = 25, - INTEL_media_block_io = 26, - INTEL_vector_compute = 27, - KHR_bit_instructions = 28, - INTEL_blocking_pipes = 29, - INTEL_float_controls2 = 30, - INTEL_inline_assembly = 31, - NV_shader_sm_builtins = 32, - NV_cooperative_matrix = 33, - KHR_variable_pointers = 34, - EXT_shader_image_int64 = 35, - GOOGLE_decorate_string = 36, - EXT_descriptor_indexing = 37, - KHR_integer_dot_product = 38, - INTEL_function_pointers = 39, - KHR_vulkan_memory_model = 40, - INTEL_kernel_attributes = 41, - KHR_post_depth_coverage = 42, - INTEL_fp_fast_math_mode = 43, - NV_stereo_view_rendering = 44, - AMD_shader_fragment_mask = 45, - KHR_terminate_invocation = 46, - INTEL_fpga_loop_controls = 47, - KHR_fragment_shading_rate = 48, - AMD_shader_trinary_minmax = 49, - EXT_shader_stencil_export = 50, - INTEL_usm_storage_classes = 51, - NV_shader_image_footprint = 52, - NV_ray_tracing_motion_blur = 53, - INTEL_fpga_memory_accesses = 54, - INTEL_fpga_buffer_location = 55, - KHR_shader_draw_parameters = 56, - GOOGLE_hlsl_functionality1 = 57, - EXT_fragment_fully_covered = 58, - EXT_shader_atomic_float_add = 59, - AMD_texture_gather_bias_lod = 60, - INTEL_variable_length_array = 61, - KHR_physical_storage_buffer = 62, - EXT_physical_storage_buffer = 63, - INTEL_fpga_memory_attributes = 64, - INTEL_long_constant_composite = 65, - INTEL_fpga_cluster_attributes = 66, - EXT_shader_atomic_float16_add = 67, - NV_compute_shader_derivatives = 68, - EXT_fragment_shader_interlock = 69, - KHR_shader_atomic_counter_ops = 70, - KHR_no_integer_wrap_decoration = 71, - NV_geometry_shader_passthrough = 72, - NV_shader_subgroup_partitioned = 73, - NV_fragment_shader_barycentric = 74, - AMD_shader_image_load_store_lod = 75, - AMD_gpu_shader_half_float_fetch = 76, - EXT_demote_to_helper_invocation = 77, - KHR_fragment_shader_barycentric = 78, - EXT_fragment_invocation_density = 79, - INTEL_shader_integer_functions2 = 80, - EXT_shader_viewport_index_layer = 81, - EXT_shader_atomic_float_min_max = 82, - NV_sample_mask_override_coverage = 83, - KHR_storage_buffer_storage_class = 84, - INTEL_unstructured_loop_controls = 85, - NVX_multiview_per_view_attributes = 86, - KHR_subgroup_uniform_control_flow = 87, - INTEL_arbitrary_precision_integers = 88, - KHR_workgroup_memory_explicit_layout = 89, - AMD_shader_explicit_vertex_parameter = 90, - INTEL_arbitrary_precision_fixed_point = 91, - INTEL_device_side_avc_motion_estimation = 92, - INTEL_arbitrary_precision_floating_point = 93, + KHR_device_group = 15, + KHR_8bit_storage = 16, + KHR_shader_clock = 17, + KHR_quad_control = 18, + KHR_shader_ballot = 19, + KHR_ray_cull_mask = 20, + AMD_shader_ballot = 21, + ARM_core_builtins = 22, + KHR_subgroup_vote = 23, + KHR_16bit_storage = 24, + KHR_expect_assume = 25, + KHR_float_controls = 26, + NV_viewport_array2 = 27, + INTEL_debug_module = 28, + INTEL_fp_max_error = 29, + AMDX_shader_enqueue = 30, + NV_bindless_texture = 31, + KHR_subgroup_rotate = 32, + KHR_float_controls2 = 33, + INTEL_split_barrier = 34, + EXT_opacity_micromap = 35, + NV_raw_access_chains = 36, + INTEL_media_block_io = 37, + INTEL_vector_compute = 38, + INTEL_blocking_pipes = 39, + KHR_bit_instructions = 40, + INTEL_cache_controls = 41, + KHR_variable_pointers = 42, + QCOM_image_processing = 43, + NV_shader_sm_builtins = 44, + EXT_shader_tile_image = 45, + NV_cooperative_matrix = 46, + INTEL_float_controls2 = 47, + INTEL_inline_assembly = 48, + INTEL_runtime_aligned = 49, + INTEL_long_composites = 50, + QCOM_image_processing2 = 51, + EXT_shader_image_int64 = 52, + INTEL_fpga_dsp_control = 53, + KHR_cooperative_matrix = 54, + GOOGLE_decorate_string = 55, + KHR_vulkan_memory_model = 56, + KHR_post_depth_coverage = 57, + INTEL_kernel_attributes = 58, + INTEL_function_pointers = 59, + EXT_descriptor_indexing = 60, + INTEL_fp_fast_math_mode = 61, + KHR_integer_dot_product = 62, + INTEL_maximum_registers = 63, + NV_stereo_view_rendering = 64, + AMD_shader_fragment_mask = 65, + NV_displacement_micromap = 66, + INTEL_fpga_loop_controls = 67, + KHR_terminate_invocation = 68, + EXT_shader_stencil_export = 69, + KHR_maximal_reconvergence = 70, + INTEL_usm_storage_classes = 71, + KHR_fragment_shading_rate = 72, + NV_shader_image_footprint = 73, + EXT_replicated_composites = 74, + INTEL_bfloat16_conversion = 75, + AMD_shader_trinary_minmax = 76, + GOOGLE_hlsl_functionality1 = 77, + KHR_shader_draw_parameters = 78, + EXT_fragment_fully_covered = 79, + NV_ray_tracing_motion_blur = 80, + INTEL_fpga_memory_accesses = 81, + INTEL_fpga_buffer_location = 82, + INTEL_fpga_latency_control = 83, + EXT_physical_storage_buffer = 84, + KHR_physical_storage_buffer = 85, + AMD_texture_gather_bias_lod = 86, + INTEL_variable_length_array = 87, + EXT_shader_atomic_float_add = 88, + INTEL_masked_gather_scatter = 89, + INTEL_memory_access_aliasing = 90, + INTEL_fpga_memory_attributes = 91, + NV_shader_invocation_reorder = 92, + NV_shader_atomic_fp16_vector = 93, + NV_compute_shader_derivatives = 94, + EXT_fragment_shader_interlock = 95, + KHR_shader_atomic_counter_ops = 96, + INTEL_fpga_cluster_attributes = 97, + EXT_shader_atomic_float16_add = 98, + KHR_no_integer_wrap_decoration = 99, + NV_geometry_shader_passthrough = 100, + NV_fragment_shader_barycentric = 101, + NV_shader_subgroup_partitioned = 102, + ARM_cooperative_matrix_layouts = 103, + KHR_ray_tracing_position_fetch = 104, + INTEL_fpga_argument_interfaces = 105, + KHR_uniform_group_instructions = 106, + KHR_fragment_shader_barycentric = 107, + EXT_fragment_invocation_density = 108, + AMD_gpu_shader_half_float_fetch = 109, + AMD_shader_image_load_store_lod = 110, + EXT_shader_viewport_index_layer = 111, + EXT_demote_to_helper_invocation = 112, + INTEL_shader_integer_functions2 = 113, + EXT_shader_atomic_float_min_max = 114, + KHR_storage_buffer_storage_class = 115, + NV_sample_mask_override_coverage = 116, + INTEL_unstructured_loop_controls = 117, + KHR_relaxed_extended_instruction = 118, + KHR_subgroup_uniform_control_flow = 119, + NVX_multiview_per_view_attributes = 120, + INTEL_global_variable_host_access = 121, + INTEL_arbitrary_precision_integers = 122, + AMD_shader_explicit_vertex_parameter = 123, + KHR_workgroup_memory_explicit_layout = 124, + INTEL_arbitrary_precision_fixed_point = 125, + INTEL_global_variable_fpga_decorations = 126, + INTEL_device_side_avc_motion_estimation = 127, + AMD_shader_early_and_late_fragment_tests = 128, + INTEL_arbitrary_precision_floating_point = 129, + INTEL_fpga_invocation_pipelining_attributes = 130, Count }; enum class ExtendedGrammar @@ -222,6 +259,10 @@ enum class AMDShaderBallot : unsigned WriteInvocationAMD = 3, MbcntAMD = 4 }; +enum class AMDShaderExplicitVertexParameter : unsigned +{ + InterpolateAtVertexAMD = 1 +}; enum class AMDShaderTrinaryMinmax : unsigned { FMin3AMD = 1, @@ -234,125 +275,34 @@ enum class AMDShaderTrinaryMinmax : unsigned UMid3AMD = 8, SMid3AMD = 9 }; -enum class AMDShaderExplicitVertexParameter : unsigned -{ - InterpolateAtVertexAMD = 1 -}; // extended grammar enum types -inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) -{ - return MemorySemanticsMask(unsigned(a) & unsigned(b)); -} -inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) -{ - return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); -} -inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) -{ - return SelectionControlMask(unsigned(a) & unsigned(b)); -} -inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) -{ - return SelectionControlMask(unsigned(a) ^ unsigned(b)); -} -inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } -inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } -inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } -inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } -inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) -{ - return FragmentShadingRateMask(unsigned(a) & unsigned(b)); -} -inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) -{ - return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); -} -inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) -{ - return FunctionControlMask(unsigned(a) & unsigned(b)); -} -inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) -{ - return FunctionControlMask(unsigned(a) ^ unsigned(b)); -} -inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } -inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } -inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } -inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } -inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) -{ - return FPFastMathModeMask(unsigned(a) & unsigned(b)); -} -inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) -{ - return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); -} -inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) -{ - return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); -} -inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) -{ - return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); -} // type traits +struct IdResultTypeTag; +typedef detail::TaggedType IdResultType; template <> -struct TypeTraits -{ - static const char *doc() - { - return "An opcode indicating the operation to be performed and determining the layout of following operands (for " - "OpSpecConstantOp)"; - } - static const char *name() { return "LiteralSpecConstantOpInteger"; } - typedef LiteralSpecConstantOpInteger ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{*from++}; - return result; - }; -}; -template <> -struct TypeTraits +struct TypeTraits : detail::BasicIdTypeTraits { - static const char *doc() - { - return "A 32-bit unsigned integer indicating which instruction to use and determining the layout of following operands (for " - "OpExtInst)"; - } - static const char *name() { return "LiteralExtInstInteger"; } - typedef LiteralExtInstInteger ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{*from++}; - return result; - }; + static const char *doc() { return "Reference to an representing the result's type of the enclosing instruction"; } + static const char *name() { return "IdResultType"; } }; -struct IdRefTag; -typedef detail::TaggedType IdRef; +struct IdResultTag; +typedef detail::TaggedType IdResult; template <> -struct TypeTraits : detail::BasicIdTypeTraits +struct TypeTraits : detail::BasicIdTypeTraits { - static const char *doc() { return "Reference to an "; } - static const char *name() { return "IdRef"; } + static const char *doc() { return "Definition of an representing the result of the enclosing instruction"; } + static const char *name() { return "IdResult"; } }; -struct IdResultTypeTag; -typedef detail::TaggedType IdResultType; +struct IdMemorySemanticsTag; +typedef detail::TaggedType IdMemorySemantics; template <> -struct TypeTraits : detail::BasicIdTypeTraits +struct TypeTraits : detail::BasicIdTypeTraits { - static const char *doc() { return "Reference to an representing the result's type of the enclosing instruction"; } - static const char *name() { return "IdResultType"; } + static const char *doc() + { + return "Reference to an representing a 32-bit integer that is a mask from the MemorySemantics operand kind"; + } + static const char *name() { return "IdMemorySemantics"; } }; struct IdScopeTag; typedef detail::TaggedType IdScope; @@ -362,13 +312,30 @@ struct TypeTraits : detail::BasicIdTypeTraits static const char *doc() { return "Reference to an representing a 32-bit integer that is a mask from the Scope operand kind"; } static const char *name() { return "IdScope"; } }; -struct IdResultTag; -typedef detail::TaggedType IdResult; +struct IdRefTag; +typedef detail::TaggedType IdRef; template <> -struct TypeTraits : detail::BasicIdTypeTraits +struct TypeTraits : detail::BasicIdTypeTraits { - static const char *doc() { return "Definition of an representing the result of the enclosing instruction"; } - static const char *name() { return "IdResult"; } + static const char *doc() { return "Reference to an "; } + static const char *name() { return "IdRef"; } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return "An integer consuming one or more words"; } + static const char *name() { return "LiteralInteger"; } + typedef LiteralInteger ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{*from++}; + return result; + }; }; template <> struct TypeTraits @@ -388,16 +355,22 @@ struct TypeTraits return result; }; }; -struct IdMemorySemanticsTag; -typedef detail::TaggedType IdMemorySemantics; template <> -struct TypeTraits : detail::BasicIdTypeTraits +struct TypeTraits { - static const char *doc() + static const char *doc() { return "A float consuming one word"; } + static const char *name() { return "LiteralFloat"; } + typedef LiteralFloat ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { - return "Reference to an representing a 32-bit integer that is a mask from the MemorySemantics operand kind"; - } - static const char *name() { return "IdMemorySemantics"; } + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{*from++}; + return result; + }; }; template <> struct TypeTraits @@ -425,11 +398,36 @@ struct TypeTraits }; }; template <> -struct TypeTraits +struct TypeTraits { - static const char *doc() { return "An integer consuming one or more words"; } - static const char *name() { return "LiteralInteger"; } - typedef LiteralInteger ReadType; + static const char *doc() + { + return "A 32-bit unsigned integer indicating which instruction to use and determining the layout of following operands (for " + "OpExtInst)"; + } + static const char *name() { return "LiteralExtInstInteger"; } + typedef LiteralExtInstInteger ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{*from++}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() + { + return "An opcode indicating the operation to be performed and determining the layout of following operands (for " + "OpSpecConstantOp)"; + } + static const char *name() { return "LiteralSpecConstantOpInteger"; } + typedef LiteralSpecConstantOpInteger ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -442,6 +440,7 @@ struct TypeTraits }; }; // reordered type traits defenitions +// NamedMaximumNumberOfRegisters // BuiltIn // FunctionParameterAttribute // FPRoundingMode @@ -449,6 +448,28 @@ struct TypeTraits // LinkageType // FPDenormMode // FPOperationMode +// AccessQualifier +// HostAccessQualifier +// InitializationModeQualifier +// LoadCacheControl +// StoreCacheControl +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "NamedMaximumNumberOfRegisters"; } + typedef NamedMaximumNumberOfRegisters ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; template <> struct TypeTraits { @@ -569,28 +590,11 @@ struct TypeTraits } }; template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "SamplerFilterMode"; } - typedef SamplerFilterMode ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "ImageChannelOrder"; } - typedef ImageChannelOrder ReadType; + static const char *name() { return "AccessQualifier"; } + typedef AccessQualifier ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -603,11 +607,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "KernelEnqueueFlags"; } - typedef KernelEnqueueFlags ReadType; + static const char *name() { return "HostAccessQualifier"; } + typedef HostAccessQualifier ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -620,45 +624,11 @@ struct TypeTraits } }; template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "MemorySemantics"; } - typedef MemorySemanticsMask ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - }; -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "SelectionControl"; } - typedef SelectionControlMask ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - }; -}; -template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "RayQueryIntersection"; } - typedef RayQueryIntersection ReadType; + static const char *name() { return "InitializationModeQualifier"; } + typedef InitializationModeQualifier ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -671,11 +641,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "ImageFormat"; } - typedef ImageFormat ReadType; + static const char *name() { return "LoadCacheControl"; } + typedef LoadCacheControl ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -688,11 +658,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "Scope"; } - typedef Scope ReadType; + static const char *name() { return "StoreCacheControl"; } + typedef StoreCacheControl ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -705,27 +675,222 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "LoopControl"; } + static const char *name() { return "ImageOperands"; } struct ReadType { - LoopControlMask value; + ImageOperandsMask value; struct DataTag { - struct DependencyLengthTag + struct BiasTag { - LiteralInteger first; - } DependencyLength; - struct MinIterationsTag + IdRef first; + } Bias; + struct LodTag { - LiteralInteger first; - } MinIterations; - struct MaxIterationsTag + IdRef first; + } Lod; + struct GradTag { - LiteralInteger first; - } MaxIterations; + IdRef first; + IdRef second; + } Grad; + struct ConstOffsetTag + { + IdRef first; + } ConstOffset; + struct OffsetTag + { + IdRef first; + } Offset; + struct ConstOffsetsTag + { + IdRef first; + } ConstOffsets; + struct SampleTag + { + IdRef first; + } Sample; + struct MinLodTag + { + IdRef first; + } MinLod; + struct MakeTexelAvailableTag + { + IdScope first; + } MakeTexelAvailable; + struct MakeTexelAvailableKHRTag + { + IdScope first; + } MakeTexelAvailableKHR; + struct MakeTexelVisibleTag + { + IdScope first; + } MakeTexelVisible; + struct MakeTexelVisibleKHRTag + { + IdScope first; + } MakeTexelVisibleKHR; + struct OffsetsTag + { + IdRef first; + } Offsets; + } data; + }; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result; + result.value = static_cast(*from++); + auto compareValue = result.value; + if (ImageOperandsMask::Bias == (compareValue & ImageOperandsMask::Bias)) + { + result.data.Bias.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Bias; + } + if (ImageOperandsMask::Lod == (compareValue & ImageOperandsMask::Lod)) + { + result.data.Lod.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Lod; + } + if (ImageOperandsMask::Grad == (compareValue & ImageOperandsMask::Grad)) + { + result.data.Grad.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.Grad.second = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Grad; + } + if (ImageOperandsMask::ConstOffset == (compareValue & ImageOperandsMask::ConstOffset)) + { + result.data.ConstOffset.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::ConstOffset; + } + if (ImageOperandsMask::Offset == (compareValue & ImageOperandsMask::Offset)) + { + result.data.Offset.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Offset; + } + if (ImageOperandsMask::ConstOffsets == (compareValue & ImageOperandsMask::ConstOffsets)) + { + result.data.ConstOffsets.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::ConstOffsets; + } + if (ImageOperandsMask::Sample == (compareValue & ImageOperandsMask::Sample)) + { + result.data.Sample.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Sample; + } + if (ImageOperandsMask::MinLod == (compareValue & ImageOperandsMask::MinLod)) + { + result.data.MinLod.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::MinLod; + } + if (ImageOperandsMask::MakeTexelAvailable == (compareValue & ImageOperandsMask::MakeTexelAvailable)) + { + result.data.MakeTexelAvailable.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::MakeTexelAvailable; + } + if (ImageOperandsMask::MakeTexelVisible == (compareValue & ImageOperandsMask::MakeTexelVisible)) + { + result.data.MakeTexelVisible.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::MakeTexelVisible; + } + if (ImageOperandsMask::NonPrivateTexel == (compareValue & ImageOperandsMask::NonPrivateTexel)) + { + compareValue = compareValue ^ ImageOperandsMask::NonPrivateTexel; + } + if (ImageOperandsMask::VolatileTexel == (compareValue & ImageOperandsMask::VolatileTexel)) + { + compareValue = compareValue ^ ImageOperandsMask::VolatileTexel; + } + if (ImageOperandsMask::SignExtend == (compareValue & ImageOperandsMask::SignExtend)) + { + compareValue = compareValue ^ ImageOperandsMask::SignExtend; + } + if (ImageOperandsMask::ZeroExtend == (compareValue & ImageOperandsMask::ZeroExtend)) + { + compareValue = compareValue ^ ImageOperandsMask::ZeroExtend; + } + if (ImageOperandsMask::Nontemporal == (compareValue & ImageOperandsMask::Nontemporal)) + { + compareValue = compareValue ^ ImageOperandsMask::Nontemporal; + } + if (ImageOperandsMask::Offsets == (compareValue & ImageOperandsMask::Offsets)) + { + result.data.Offsets.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ ImageOperandsMask::Offsets; + } + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "SelectionControl"; } + typedef SelectionControlMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "LoopControl"; } + struct ReadType + { + LoopControlMask value; + struct DataTag + { + struct DependencyLengthTag + { + LiteralInteger first; + } DependencyLength; + struct MinIterationsTag + { + LiteralInteger first; + } MinIterations; + struct MaxIterationsTag + { + LiteralInteger first; + } MaxIterations; struct IterationMultipleTag { LiteralInteger first; @@ -766,10 +931,14 @@ struct TypeTraits { LiteralInteger first; } SpeculatedIterationsINTEL; - struct NoFusionINTELTag + struct LoopCountINTELTag + { + LiteralInteger first; + } LoopCountINTEL; + struct MaxReinvocationDelayINTELTag { LiteralInteger first; - } NoFusionINTEL; + } MaxReinvocationDelayINTEL; } data; }; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) @@ -859,9 +1028,15 @@ struct TypeTraits if (error) return {}; } - if (LoopControlMask::NoFusionINTEL == (result.value & LoopControlMask::NoFusionINTEL)) + if (LoopControlMask::LoopCountINTEL == (result.value & LoopControlMask::LoopCountINTEL)) + { + result.data.LoopCountINTEL.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + } + if (LoopControlMask::MaxReinvocationDelayINTEL == (result.value & LoopControlMask::MaxReinvocationDelayINTEL)) { - result.data.NoFusionINTEL.first = TypeTraits::read(from, to, cds, error); + result.data.MaxReinvocationDelayINTEL.first = TypeTraits::read(from, to, cds, error); if (error) return {}; } @@ -869,11 +1044,11 @@ struct TypeTraits }; }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "ImageChannelDataType"; } - typedef ImageChannelDataType ReadType; + static const char *name() { return "FunctionControl"; } + typedef FunctionControlMask ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -883,215 +1058,63 @@ struct TypeTraits } ReadType result{static_cast(*from++)}; return result; - } + }; }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "Decoration"; } + static const char *name() { return "MemorySemantics"; } + typedef MemorySemanticsMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "MemoryAccess"; } struct ReadType { - Decoration value; - union DataTag + MemoryAccessMask value; + struct DataTag { - struct SpecIdTag + struct AlignedTag { - LiteralInteger specializationConstantId; - } SpecId; - struct ArrayStrideTag + LiteralInteger first; + } Aligned; + struct MakePointerAvailableTag { - LiteralInteger arrayStride; - } ArrayStride; - struct MatrixStrideTag + IdScope first; + } MakePointerAvailable; + struct MakePointerAvailableKHRTag { - LiteralInteger matrixStride; - } MatrixStride; - struct BuiltInTag + IdScope first; + } MakePointerAvailableKHR; + struct MakePointerVisibleTag { - BuiltIn first; - } BuiltInData; - struct UniformIdTag - { - IdScope execution; - } UniformId; - struct StreamTag - { - LiteralInteger streamNumber; - } Stream; - struct LocationTag - { - LiteralInteger location; - } Location; - struct ComponentTag - { - LiteralInteger component; - } Component; - struct IndexTag - { - LiteralInteger index; - } Index; - struct BindingTag - { - LiteralInteger bindingPoint; - } Binding; - struct DescriptorSetTag - { - LiteralInteger descriptorSet; - } DescriptorSet; - struct OffsetTag - { - LiteralInteger byteOffset; - } Offset; - struct XfbBufferTag - { - LiteralInteger xfbBufferNumber; - } XfbBuffer; - struct XfbStrideTag - { - LiteralInteger xfbStride; - } XfbStride; - struct FuncParamAttrTag - { - FunctionParameterAttribute functionParameterAttribute; - } FuncParamAttr; - struct FPRoundingModeTag - { - FPRoundingModeValue floatingPointRoundingMode; - } FPRoundingMode; - struct FPFastMathModeTag - { - FPFastMathModeMask fastMathMode; - } FPFastMathMode; - struct LinkageAttributesTag - { - LiteralString name; - LinkageType linkageType; - } LinkageAttributes; - struct InputAttachmentIndexTag - { - LiteralInteger attachmentIndex; - } InputAttachmentIndex; - struct AlignmentTag - { - LiteralInteger alignment; - } Alignment; - struct MaxByteOffsetTag - { - LiteralInteger maxByteOffset; - } MaxByteOffset; - struct AlignmentIdTag - { - IdRef alignment; - } AlignmentId; - struct MaxByteOffsetIdTag - { - IdRef maxByteOffset; - } MaxByteOffsetId; - struct SecondaryViewportRelativeNVTag - { - LiteralInteger offset; - } SecondaryViewportRelativeNV; - struct SIMTCallINTELTag - { - LiteralInteger n; - } SIMTCallINTEL; - struct ClobberINTELTag - { - LiteralString _register; - } ClobberINTEL; - struct FuncParamIOKindINTELTag - { - LiteralInteger kind; - } FuncParamIOKindINTEL; - struct GlobalVariableOffsetINTELTag - { - LiteralInteger offset; - } GlobalVariableOffsetINTEL; - struct CounterBufferTag - { - IdRef counterBuffer; - } CounterBuffer; - struct HlslCounterBufferGOOGLETag - { - IdRef counterBuffer; - } HlslCounterBufferGOOGLE; - struct UserSemanticTag - { - LiteralString semantic; - } UserSemantic; - struct HlslSemanticGOOGLETag - { - LiteralString semantic; - } HlslSemanticGOOGLE; - struct UserTypeGOOGLETag - { - LiteralString userType; - } UserTypeGOOGLE; - struct FunctionRoundingModeINTELTag - { - LiteralInteger targetWidth; - FPRoundingModeValue fpRoundingMode; - } FunctionRoundingModeINTEL; - struct FunctionDenormModeINTELTag - { - LiteralInteger targetWidth; - FPDenormMode fpDenormMode; - } FunctionDenormModeINTEL; - struct MemoryINTELTag - { - LiteralString memoryType; - } MemoryINTEL; - struct NumbanksINTELTag - { - LiteralInteger banks; - } NumbanksINTEL; - struct BankwidthINTELTag - { - LiteralInteger bankWidth; - } BankwidthINTEL; - struct MaxPrivateCopiesINTELTag - { - LiteralInteger maximumCopies; - } MaxPrivateCopiesINTEL; - struct MaxReplicatesINTELTag - { - LiteralInteger maximumReplicates; - } MaxReplicatesINTEL; - struct MergeINTELTag - { - LiteralString mergeKey; - LiteralString mergeType; - } MergeINTEL; - struct BankBitsINTELTag - { - LiteralInteger bankBits; - } BankBitsINTEL; - struct ForcePow2DepthINTELTag - { - LiteralInteger forceKey; - } ForcePow2DepthINTEL; - struct CacheSizeINTELTag - { - LiteralInteger cacheSizeInBytes; - } CacheSizeINTEL; - struct PrefetchINTELTag - { - LiteralInteger prefetcherSizeInBytes; - } PrefetchINTEL; - struct BufferLocationINTELTag + IdScope first; + } MakePointerVisible; + struct MakePointerVisibleKHRTag { - LiteralInteger bufferLocationId; - } BufferLocationINTEL; - struct IOPipeStorageINTELTag + IdScope first; + } MakePointerVisibleKHR; + struct AliasScopeINTELMaskTag { - LiteralInteger ioPipeId; - } IOPipeStorageINTEL; - struct FunctionFloatingPointModeINTELTag + IdRef first; + } AliasScopeINTELMask; + struct NoAliasINTELMaskTag { - LiteralInteger targetWidth; - FPOperationMode fpOperationMode; - } FunctionFloatingPointModeINTEL; + IdRef first; + } NoAliasINTELMask; } data; }; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) @@ -1102,609 +1125,745 @@ struct TypeTraits return {}; } ReadType result; - result.value = static_cast(*from++); - switch (result.value) + result.value = static_cast(*from++); + auto compareValue = result.value; + if (MemoryAccessMask::Volatile == (compareValue & MemoryAccessMask::Volatile)) { - default: error = true; return {}; - case Decoration::RelaxedPrecision: - case Decoration::Block: - case Decoration::BufferBlock: - case Decoration::RowMajor: - case Decoration::ColMajor: - case Decoration::GLSLShared: - case Decoration::GLSLPacked: - case Decoration::CPacked: - case Decoration::NoPerspective: - case Decoration::Flat: - case Decoration::Patch: - case Decoration::Centroid: - case Decoration::Sample: - case Decoration::Invariant: - case Decoration::Restrict: - case Decoration::Aliased: - case Decoration::Volatile: - case Decoration::Constant: - case Decoration::Coherent: - case Decoration::NonWritable: - case Decoration::NonReadable: - case Decoration::Uniform: - case Decoration::SaturatedConversion: - case Decoration::NoContraction: - case Decoration::NoSignedWrap: - case Decoration::NoUnsignedWrap: - case Decoration::ExplicitInterpAMD: - case Decoration::OverrideCoverageNV: - case Decoration::PassthroughNV: - case Decoration::ViewportRelativeNV: - case Decoration::PerPrimitiveNV: - case Decoration::PerViewNV: - case Decoration::PerTaskNV: - case Decoration::PerVertexKHR: - case Decoration::NonUniform: - case Decoration::RestrictPointer: - case Decoration::AliasedPointer: - case Decoration::BindlessSamplerNV: - case Decoration::BindlessImageNV: - case Decoration::BoundSamplerNV: - case Decoration::BoundImageNV: - case Decoration::ReferencedIndirectlyINTEL: - case Decoration::SideEffectsINTEL: - case Decoration::VectorComputeVariableINTEL: - case Decoration::VectorComputeFunctionINTEL: - case Decoration::StackCallINTEL: - case Decoration::RegisterINTEL: - case Decoration::SinglepumpINTEL: - case Decoration::DoublepumpINTEL: - case Decoration::SimpleDualPortINTEL: - case Decoration::BurstCoalesceINTEL: - case Decoration::DontStaticallyCoalesceINTEL: - case Decoration::StallEnableINTEL: - case Decoration::FuseLoopsInFunctionINTEL: - case Decoration::SingleElementVectorINTEL: - case Decoration::VectorComputeCallableFunctionINTEL: - case Decoration::MediaBlockIOINTEL: break; - case Decoration::SpecId: - { - result.data.SpecId.specializationConstantId = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - break; - }; - case Decoration::ArrayStride: + compareValue = compareValue ^ MemoryAccessMask::Volatile; + } + if (MemoryAccessMask::Aligned == (compareValue & MemoryAccessMask::Aligned)) + { + result.data.Aligned.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ MemoryAccessMask::Aligned; + } + if (MemoryAccessMask::Nontemporal == (compareValue & MemoryAccessMask::Nontemporal)) + { + compareValue = compareValue ^ MemoryAccessMask::Nontemporal; + } + if (MemoryAccessMask::MakePointerAvailable == (compareValue & MemoryAccessMask::MakePointerAvailable)) + { + result.data.MakePointerAvailable.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ MemoryAccessMask::MakePointerAvailable; + } + if (MemoryAccessMask::MakePointerVisible == (compareValue & MemoryAccessMask::MakePointerVisible)) + { + result.data.MakePointerVisible.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ MemoryAccessMask::MakePointerVisible; + } + if (MemoryAccessMask::NonPrivatePointer == (compareValue & MemoryAccessMask::NonPrivatePointer)) + { + compareValue = compareValue ^ MemoryAccessMask::NonPrivatePointer; + } + if (MemoryAccessMask::AliasScopeINTELMask == (compareValue & MemoryAccessMask::AliasScopeINTELMask)) + { + result.data.AliasScopeINTELMask.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ MemoryAccessMask::AliasScopeINTELMask; + } + if (MemoryAccessMask::NoAliasINTELMask == (compareValue & MemoryAccessMask::NoAliasINTELMask)) + { + result.data.NoAliasINTELMask.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + compareValue = compareValue ^ MemoryAccessMask::NoAliasINTELMask; + } + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "KernelProfilingInfo"; } + typedef KernelProfilingInfoMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "RayFlags"; } + typedef RayFlagsMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "FragmentShadingRate"; } + typedef FragmentShadingRateMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "RawAccessChainOperands"; } + typedef RawAccessChainOperandsMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "SourceLanguage"; } + typedef SourceLanguage ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "ExecutionModel"; } + typedef ExecutionModel ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "AddressingModel"; } + typedef AddressingModel ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "MemoryModel"; } + typedef MemoryModel ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "ExecutionMode"; } + struct ReadType + { + ExecutionMode value; + union DataTag + { + struct InvocationsTag { - result.data.ArrayStride.arrayStride = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - break; - }; - case Decoration::MatrixStride: + LiteralInteger numberOfInvocationInvocations; + } Invocations; + struct LocalSizeTag { - result.data.MatrixStride.matrixStride = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - break; - }; - case Decoration::BuiltIn: + LiteralInteger xSize; + LiteralInteger ySize; + LiteralInteger zSize; + } LocalSize; + struct LocalSizeHintTag { - result.data.BuiltInData.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - break; - }; - case Decoration::UniformId: + LiteralInteger xSize; + LiteralInteger ySize; + LiteralInteger zSize; + } LocalSizeHint; + struct OutputVerticesTag { - result.data.UniformId.execution = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - break; - }; - case Decoration::Stream: + LiteralInteger vertexCount; + } OutputVertices; + struct VecTypeHintTag { - result.data.Stream.streamNumber = TypeTraits::read(from, to, cds, error); + LiteralInteger vectorType; + } VecTypeHint; + struct SubgroupSizeTag + { + LiteralInteger subgroupSize; + } SubgroupSize; + struct SubgroupsPerWorkgroupTag + { + LiteralInteger subgroupsPerWorkgroup; + } SubgroupsPerWorkgroup; + struct SubgroupsPerWorkgroupIdTag + { + IdRef subgroupsPerWorkgroup; + } SubgroupsPerWorkgroupId; + struct LocalSizeIdTag + { + IdRef xSize; + IdRef ySize; + IdRef zSize; + } LocalSizeId; + struct LocalSizeHintIdTag + { + IdRef xSizeHint; + IdRef ySizeHint; + IdRef zSizeHint; + } LocalSizeHintId; + struct DenormPreserveTag + { + LiteralInteger targetWidth; + } DenormPreserve; + struct DenormFlushToZeroTag + { + LiteralInteger targetWidth; + } DenormFlushToZero; + struct SignedZeroInfNanPreserveTag + { + LiteralInteger targetWidth; + } SignedZeroInfNanPreserve; + struct RoundingModeRTETag + { + LiteralInteger targetWidth; + } RoundingModeRTE; + struct RoundingModeRTZTag + { + LiteralInteger targetWidth; + } RoundingModeRTZ; + struct MaxNodeRecursionAMDXTag + { + IdRef numberOfRecursions; + } MaxNodeRecursionAMDX; + struct StaticNumWorkgroupsAMDXTag + { + IdRef xSize; + IdRef ySize; + IdRef zSize; + } StaticNumWorkgroupsAMDX; + struct ShaderIndexAMDXTag + { + IdRef shaderIndex; + } ShaderIndexAMDX; + struct MaxNumWorkgroupsAMDXTag + { + IdRef xSize; + IdRef ySize; + IdRef zSize; + } MaxNumWorkgroupsAMDX; + struct OutputPrimitivesEXTTag + { + LiteralInteger primitiveCount; + } OutputPrimitivesEXT; + struct OutputPrimitivesNVTag + { + LiteralInteger primitiveCount; + } OutputPrimitivesNV; + struct SharedLocalMemorySizeINTELTag + { + LiteralInteger size; + } SharedLocalMemorySizeINTEL; + struct RoundingModeRTPINTELTag + { + LiteralInteger targetWidth; + } RoundingModeRTPINTEL; + struct RoundingModeRTNINTELTag + { + LiteralInteger targetWidth; + } RoundingModeRTNINTEL; + struct FloatingPointModeALTINTELTag + { + LiteralInteger targetWidth; + } FloatingPointModeALTINTEL; + struct FloatingPointModeIEEEINTELTag + { + LiteralInteger targetWidth; + } FloatingPointModeIEEEINTEL; + struct MaxWorkgroupSizeINTELTag + { + LiteralInteger max_x_size; + LiteralInteger max_y_size; + LiteralInteger max_z_size; + } MaxWorkgroupSizeINTEL; + struct MaxWorkDimINTELTag + { + LiteralInteger max_dimensions; + } MaxWorkDimINTEL; + struct NumSIMDWorkitemsINTELTag + { + LiteralInteger vector_width; + } NumSIMDWorkitemsINTEL; + struct SchedulerTargetFmaxMhzINTELTag + { + LiteralInteger target_fmax; + } SchedulerTargetFmaxMhzINTEL; + struct FPFastMathDefaultTag + { + IdRef targetType; + IdRef fastMathMode; + } FPFastMathDefault; + struct StreamingInterfaceINTELTag + { + LiteralInteger stallFreeReturn; + } StreamingInterfaceINTEL; + struct RegisterMapInterfaceINTELTag + { + LiteralInteger waitForDoneWrite; + } RegisterMapInterfaceINTEL; + struct NamedBarrierCountINTELTag + { + LiteralInteger barrierCount; + } NamedBarrierCountINTEL; + struct MaximumRegistersINTELTag + { + LiteralInteger numberOfRegisters; + } MaximumRegistersINTEL; + struct MaximumRegistersIdINTELTag + { + IdRef numberOfRegisters; + } MaximumRegistersIdINTEL; + struct NamedMaximumRegistersINTELTag + { + NamedMaximumNumberOfRegisters namedMaximumNumberOfRegisters; + } NamedMaximumRegistersINTEL; + } data; + }; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result; + result.value = static_cast(*from++); + switch (result.value) + { + default: error = true; return {}; + case ExecutionMode::SpacingEqual: + case ExecutionMode::SpacingFractionalEven: + case ExecutionMode::SpacingFractionalOdd: + case ExecutionMode::VertexOrderCw: + case ExecutionMode::VertexOrderCcw: + case ExecutionMode::PixelCenterInteger: + case ExecutionMode::OriginUpperLeft: + case ExecutionMode::OriginLowerLeft: + case ExecutionMode::EarlyFragmentTests: + case ExecutionMode::PointMode: + case ExecutionMode::Xfb: + case ExecutionMode::DepthReplacing: + case ExecutionMode::DepthGreater: + case ExecutionMode::DepthLess: + case ExecutionMode::DepthUnchanged: + case ExecutionMode::InputPoints: + case ExecutionMode::InputLines: + case ExecutionMode::InputLinesAdjacency: + case ExecutionMode::Triangles: + case ExecutionMode::InputTrianglesAdjacency: + case ExecutionMode::Quads: + case ExecutionMode::Isolines: + case ExecutionMode::OutputPoints: + case ExecutionMode::OutputLineStrip: + case ExecutionMode::OutputTriangleStrip: + case ExecutionMode::ContractionOff: + case ExecutionMode::Initializer: + case ExecutionMode::Finalizer: + case ExecutionMode::NonCoherentColorAttachmentReadEXT: + case ExecutionMode::NonCoherentDepthAttachmentReadEXT: + case ExecutionMode::NonCoherentStencilAttachmentReadEXT: + case ExecutionMode::SubgroupUniformControlFlowKHR: + case ExecutionMode::PostDepthCoverage: + case ExecutionMode::EarlyAndLateFragmentTestsAMD: + case ExecutionMode::StencilRefReplacingEXT: + case ExecutionMode::CoalescingAMDX: + case ExecutionMode::StencilRefUnchangedFrontAMD: + case ExecutionMode::StencilRefGreaterFrontAMD: + case ExecutionMode::StencilRefLessFrontAMD: + case ExecutionMode::StencilRefUnchangedBackAMD: + case ExecutionMode::StencilRefGreaterBackAMD: + case ExecutionMode::StencilRefLessBackAMD: + case ExecutionMode::QuadDerivativesKHR: + case ExecutionMode::RequireFullQuadsKHR: + case ExecutionMode::OutputLinesEXT: + case ExecutionMode::DerivativeGroupQuadsNV: + case ExecutionMode::DerivativeGroupLinearNV: + case ExecutionMode::OutputTrianglesEXT: + case ExecutionMode::PixelInterlockOrderedEXT: + case ExecutionMode::PixelInterlockUnorderedEXT: + case ExecutionMode::SampleInterlockOrderedEXT: + case ExecutionMode::SampleInterlockUnorderedEXT: + case ExecutionMode::ShadingRateInterlockOrderedEXT: + case ExecutionMode::ShadingRateInterlockUnorderedEXT: + case ExecutionMode::NoGlobalOffsetINTEL: + case ExecutionMode::MaximallyReconvergesKHR: break; + case ExecutionMode::Invocations: + { + result.data.Invocations.numberOfInvocationInvocations = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::Location: + case ExecutionMode::LocalSize: { - result.data.Location.location = TypeTraits::read(from, to, cds, error); + result.data.LocalSize.xSize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::Component: - { - result.data.Component.component = TypeTraits::read(from, to, cds, error); + result.data.LocalSize.ySize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::Index: - { - result.data.Index.index = TypeTraits::read(from, to, cds, error); + result.data.LocalSize.zSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::Binding: + case ExecutionMode::LocalSizeHint: { - result.data.Binding.bindingPoint = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHint.xSize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::DescriptorSet: - { - result.data.DescriptorSet.descriptorSet = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHint.ySize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::Offset: - { - result.data.Offset.byteOffset = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHint.zSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::XfbBuffer: + case ExecutionMode::OutputVertices: { - result.data.XfbBuffer.xfbBufferNumber = TypeTraits::read(from, to, cds, error); + result.data.OutputVertices.vertexCount = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::XfbStride: + case ExecutionMode::VecTypeHint: { - result.data.XfbStride.xfbStride = TypeTraits::read(from, to, cds, error); + result.data.VecTypeHint.vectorType = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FuncParamAttr: + case ExecutionMode::SubgroupSize: { - result.data.FuncParamAttr.functionParameterAttribute = TypeTraits::read(from, to, cds, error); + result.data.SubgroupSize.subgroupSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FPRoundingMode: + case ExecutionMode::SubgroupsPerWorkgroup: { - result.data.FPRoundingMode.floatingPointRoundingMode = TypeTraits::read(from, to, cds, error); + result.data.SubgroupsPerWorkgroup.subgroupsPerWorkgroup = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FPFastMathMode: + case ExecutionMode::SubgroupsPerWorkgroupId: { - result.data.FPFastMathMode.fastMathMode = TypeTraits::read(from, to, cds, error); + result.data.SubgroupsPerWorkgroupId.subgroupsPerWorkgroup = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::LinkageAttributes: + case ExecutionMode::LocalSizeId: { - result.data.LinkageAttributes.name = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeId.xSize = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LinkageAttributes.linkageType = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeId.ySize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::InputAttachmentIndex: - { - result.data.InputAttachmentIndex.attachmentIndex = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeId.zSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::Alignment: + case ExecutionMode::LocalSizeHintId: { - result.data.Alignment.alignment = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHintId.xSizeHint = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::MaxByteOffset: - { - result.data.MaxByteOffset.maxByteOffset = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHintId.ySizeHint = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::AlignmentId: - { - result.data.AlignmentId.alignment = TypeTraits::read(from, to, cds, error); + result.data.LocalSizeHintId.zSizeHint = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::MaxByteOffsetId: + case ExecutionMode::DenormPreserve: { - result.data.MaxByteOffsetId.maxByteOffset = TypeTraits::read(from, to, cds, error); + result.data.DenormPreserve.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::SecondaryViewportRelativeNV: + case ExecutionMode::DenormFlushToZero: { - result.data.SecondaryViewportRelativeNV.offset = TypeTraits::read(from, to, cds, error); + result.data.DenormFlushToZero.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::SIMTCallINTEL: + case ExecutionMode::SignedZeroInfNanPreserve: { - result.data.SIMTCallINTEL.n = TypeTraits::read(from, to, cds, error); + result.data.SignedZeroInfNanPreserve.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::ClobberINTEL: + case ExecutionMode::RoundingModeRTE: { - result.data.ClobberINTEL._register = TypeTraits::read(from, to, cds, error); + result.data.RoundingModeRTE.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FuncParamIOKindINTEL: + case ExecutionMode::RoundingModeRTZ: { - result.data.FuncParamIOKindINTEL.kind = TypeTraits::read(from, to, cds, error); + result.data.RoundingModeRTZ.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::GlobalVariableOffsetINTEL: + case ExecutionMode::MaxNodeRecursionAMDX: { - result.data.GlobalVariableOffsetINTEL.offset = TypeTraits::read(from, to, cds, error); + result.data.MaxNodeRecursionAMDX.numberOfRecursions = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::CounterBuffer: + case ExecutionMode::StaticNumWorkgroupsAMDX: { - result.data.CounterBuffer.counterBuffer = TypeTraits::read(from, to, cds, error); + result.data.StaticNumWorkgroupsAMDX.xSize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::UserSemantic: - { - result.data.UserSemantic.semantic = TypeTraits::read(from, to, cds, error); + result.data.StaticNumWorkgroupsAMDX.ySize = TypeTraits::read(from, to, cds, error); if (error) return {}; - break; - }; - case Decoration::UserTypeGOOGLE: - { - result.data.UserTypeGOOGLE.userType = TypeTraits::read(from, to, cds, error); + result.data.StaticNumWorkgroupsAMDX.zSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FunctionRoundingModeINTEL: - { - result.data.FunctionRoundingModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - result.data.FunctionRoundingModeINTEL.fpRoundingMode = TypeTraits::read(from, to, cds, error); + case ExecutionMode::ShaderIndexAMDX: + { + result.data.ShaderIndexAMDX.shaderIndex = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FunctionDenormModeINTEL: + case ExecutionMode::MaxNumWorkgroupsAMDX: { - result.data.FunctionDenormModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.MaxNumWorkgroupsAMDX.xSize = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.FunctionDenormModeINTEL.fpDenormMode = TypeTraits::read(from, to, cds, error); + result.data.MaxNumWorkgroupsAMDX.ySize = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.MaxNumWorkgroupsAMDX.zSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::MemoryINTEL: + case ExecutionMode::OutputPrimitivesEXT: { - result.data.MemoryINTEL.memoryType = TypeTraits::read(from, to, cds, error); + result.data.OutputPrimitivesEXT.primitiveCount = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::NumbanksINTEL: + case ExecutionMode::SharedLocalMemorySizeINTEL: { - result.data.NumbanksINTEL.banks = TypeTraits::read(from, to, cds, error); + result.data.SharedLocalMemorySizeINTEL.size = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::BankwidthINTEL: + case ExecutionMode::RoundingModeRTPINTEL: { - result.data.BankwidthINTEL.bankWidth = TypeTraits::read(from, to, cds, error); + result.data.RoundingModeRTPINTEL.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::MaxPrivateCopiesINTEL: + case ExecutionMode::RoundingModeRTNINTEL: { - result.data.MaxPrivateCopiesINTEL.maximumCopies = TypeTraits::read(from, to, cds, error); + result.data.RoundingModeRTNINTEL.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::MaxReplicatesINTEL: + case ExecutionMode::FloatingPointModeALTINTEL: { - result.data.MaxReplicatesINTEL.maximumReplicates = TypeTraits::read(from, to, cds, error); + result.data.FloatingPointModeALTINTEL.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::MergeINTEL: + case ExecutionMode::FloatingPointModeIEEEINTEL: { - result.data.MergeINTEL.mergeKey = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - result.data.MergeINTEL.mergeType = TypeTraits::read(from, to, cds, error); + result.data.FloatingPointModeIEEEINTEL.targetWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::BankBitsINTEL: + case ExecutionMode::MaxWorkgroupSizeINTEL: { - result.data.BankBitsINTEL.bankBits = TypeTraits::read(from, to, cds, error); + result.data.MaxWorkgroupSizeINTEL.max_x_size = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.MaxWorkgroupSizeINTEL.max_y_size = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.MaxWorkgroupSizeINTEL.max_z_size = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::ForcePow2DepthINTEL: + case ExecutionMode::MaxWorkDimINTEL: { - result.data.ForcePow2DepthINTEL.forceKey = TypeTraits::read(from, to, cds, error); + result.data.MaxWorkDimINTEL.max_dimensions = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::CacheSizeINTEL: + case ExecutionMode::NumSIMDWorkitemsINTEL: { - result.data.CacheSizeINTEL.cacheSizeInBytes = TypeTraits::read(from, to, cds, error); + result.data.NumSIMDWorkitemsINTEL.vector_width = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::PrefetchINTEL: + case ExecutionMode::SchedulerTargetFmaxMhzINTEL: { - result.data.PrefetchINTEL.prefetcherSizeInBytes = TypeTraits::read(from, to, cds, error); + result.data.SchedulerTargetFmaxMhzINTEL.target_fmax = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::BufferLocationINTEL: + case ExecutionMode::FPFastMathDefault: { - result.data.BufferLocationINTEL.bufferLocationId = TypeTraits::read(from, to, cds, error); + result.data.FPFastMathDefault.targetType = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.FPFastMathDefault.fastMathMode = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::IOPipeStorageINTEL: + case ExecutionMode::StreamingInterfaceINTEL: { - result.data.IOPipeStorageINTEL.ioPipeId = TypeTraits::read(from, to, cds, error); + result.data.StreamingInterfaceINTEL.stallFreeReturn = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case Decoration::FunctionFloatingPointModeINTEL: + case ExecutionMode::RegisterMapInterfaceINTEL: { - result.data.FunctionFloatingPointModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - result.data.FunctionFloatingPointModeINTEL.fpOperationMode = TypeTraits::read(from, to, cds, error); + result.data.RegisterMapInterfaceINTEL.waitForDoneWrite = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - }; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "QuantizationModes"; } - typedef QuantizationModes ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "RayFlags"; } - typedef RayFlagsMask ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - }; -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "FragmentShadingRate"; } - typedef FragmentShadingRateMask ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - }; -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "FunctionControl"; } - typedef FunctionControlMask ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - }; -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "AddressingModel"; } - typedef AddressingModel ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "PackedVectorFormat"; } - typedef PackedVectorFormat ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "Dim"; } - typedef Dim ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "OverflowModes"; } - typedef OverflowModes ReadType; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result{static_cast(*from++)}; - return result; - } -}; -template <> -struct TypeTraits -{ - static const char *doc() { return ""; } - static const char *name() { return "ImageOperands"; } - struct ReadType - { - ImageOperandsMask value; - struct DataTag - { - struct BiasTag - { - IdRef first; - } Bias; - struct LodTag - { - IdRef first; - } Lod; - struct GradTag - { - IdRef first; - IdRef second; - } Grad; - struct ConstOffsetTag - { - IdRef first; - } ConstOffset; - struct OffsetTag - { - IdRef first; - } Offset; - struct ConstOffsetsTag - { - IdRef first; - } ConstOffsets; - struct SampleTag - { - IdRef first; - } Sample; - struct MinLodTag - { - IdRef first; - } MinLod; - struct MakeTexelAvailableTag - { - IdScope first; - } MakeTexelAvailable; - struct MakeTexelAvailableKHRTag - { - IdScope first; - } MakeTexelAvailableKHR; - struct MakeTexelVisibleTag + case ExecutionMode::NamedBarrierCountINTEL: { - IdScope first; - } MakeTexelVisible; - struct MakeTexelVisibleKHRTag + result.data.NamedBarrierCountINTEL.barrierCount = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case ExecutionMode::MaximumRegistersINTEL: { - IdScope first; - } MakeTexelVisibleKHR; - struct OffsetsTag + result.data.MaximumRegistersINTEL.numberOfRegisters = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case ExecutionMode::MaximumRegistersIdINTEL: { - IdRef first; - } Offsets; - } data; - }; + result.data.MaximumRegistersIdINTEL.numberOfRegisters = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case ExecutionMode::NamedMaximumRegistersINTEL: + { + result.data.NamedMaximumRegistersINTEL.namedMaximumNumberOfRegisters = + TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + }; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "StorageClass"; } + typedef StorageClass ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1712,118 +1871,16 @@ struct TypeTraits error = true; return {}; } - ReadType result; - result.value = static_cast(*from++); - auto compareValue = result.value; - if (ImageOperandsMask::Bias == (compareValue & ImageOperandsMask::Bias)) - { - result.data.Bias.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Bias; - } - if (ImageOperandsMask::Lod == (compareValue & ImageOperandsMask::Lod)) - { - result.data.Lod.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Lod; - } - if (ImageOperandsMask::Grad == (compareValue & ImageOperandsMask::Grad)) - { - result.data.Grad.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - result.data.Grad.second = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Grad; - } - if (ImageOperandsMask::ConstOffset == (compareValue & ImageOperandsMask::ConstOffset)) - { - result.data.ConstOffset.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::ConstOffset; - } - if (ImageOperandsMask::Offset == (compareValue & ImageOperandsMask::Offset)) - { - result.data.Offset.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Offset; - } - if (ImageOperandsMask::ConstOffsets == (compareValue & ImageOperandsMask::ConstOffsets)) - { - result.data.ConstOffsets.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::ConstOffsets; - } - if (ImageOperandsMask::Sample == (compareValue & ImageOperandsMask::Sample)) - { - result.data.Sample.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Sample; - } - if (ImageOperandsMask::MinLod == (compareValue & ImageOperandsMask::MinLod)) - { - result.data.MinLod.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::MinLod; - } - if (ImageOperandsMask::MakeTexelAvailable == (compareValue & ImageOperandsMask::MakeTexelAvailable)) - { - result.data.MakeTexelAvailable.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::MakeTexelAvailable; - } - if (ImageOperandsMask::MakeTexelVisible == (compareValue & ImageOperandsMask::MakeTexelVisible)) - { - result.data.MakeTexelVisible.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::MakeTexelVisible; - } - if (ImageOperandsMask::NonPrivateTexel == (compareValue & ImageOperandsMask::NonPrivateTexel)) - { - compareValue = compareValue ^ ImageOperandsMask::NonPrivateTexel; - } - if (ImageOperandsMask::VolatileTexel == (compareValue & ImageOperandsMask::VolatileTexel)) - { - compareValue = compareValue ^ ImageOperandsMask::VolatileTexel; - } - if (ImageOperandsMask::SignExtend == (compareValue & ImageOperandsMask::SignExtend)) - { - compareValue = compareValue ^ ImageOperandsMask::SignExtend; - } - if (ImageOperandsMask::ZeroExtend == (compareValue & ImageOperandsMask::ZeroExtend)) - { - compareValue = compareValue ^ ImageOperandsMask::ZeroExtend; - } - if (ImageOperandsMask::Nontemporal == (compareValue & ImageOperandsMask::Nontemporal)) - { - compareValue = compareValue ^ ImageOperandsMask::Nontemporal; - } - if (ImageOperandsMask::Offsets == (compareValue & ImageOperandsMask::Offsets)) - { - result.data.Offsets.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ ImageOperandsMask::Offsets; - } + ReadType result{static_cast(*from++)}; return result; - }; + } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "Capability"; } - typedef Capability ReadType; + static const char *name() { return "Dim"; } + typedef Dim ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1836,37 +1893,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "MemoryAccess"; } - struct ReadType - { - MemoryAccessMask value; - struct DataTag - { - struct AlignedTag - { - LiteralInteger first; - } Aligned; - struct MakePointerAvailableTag - { - IdScope first; - } MakePointerAvailable; - struct MakePointerAvailableKHRTag - { - IdScope first; - } MakePointerAvailableKHR; - struct MakePointerVisibleTag - { - IdScope first; - } MakePointerVisible; - struct MakePointerVisibleKHRTag - { - IdScope first; - } MakePointerVisibleKHR; - } data; - }; + static const char *name() { return "SamplerAddressingMode"; } + typedef SamplerAddressingMode ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1874,51 +1905,16 @@ struct TypeTraits error = true; return {}; } - ReadType result; - result.value = static_cast(*from++); - auto compareValue = result.value; - if (MemoryAccessMask::Volatile == (compareValue & MemoryAccessMask::Volatile)) - { - compareValue = compareValue ^ MemoryAccessMask::Volatile; - } - if (MemoryAccessMask::Aligned == (compareValue & MemoryAccessMask::Aligned)) - { - result.data.Aligned.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ MemoryAccessMask::Aligned; - } - if (MemoryAccessMask::Nontemporal == (compareValue & MemoryAccessMask::Nontemporal)) - { - compareValue = compareValue ^ MemoryAccessMask::Nontemporal; - } - if (MemoryAccessMask::MakePointerAvailable == (compareValue & MemoryAccessMask::MakePointerAvailable)) - { - result.data.MakePointerAvailable.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ MemoryAccessMask::MakePointerAvailable; - } - if (MemoryAccessMask::MakePointerVisible == (compareValue & MemoryAccessMask::MakePointerVisible)) - { - result.data.MakePointerVisible.first = TypeTraits::read(from, to, cds, error); - if (error) - return {}; - compareValue = compareValue ^ MemoryAccessMask::MakePointerVisible; - } - if (MemoryAccessMask::NonPrivatePointer == (compareValue & MemoryAccessMask::NonPrivatePointer)) - { - compareValue = compareValue ^ MemoryAccessMask::NonPrivatePointer; - } + ReadType result{static_cast(*from++)}; return result; - }; + } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "GroupOperation"; } - typedef GroupOperation ReadType; + static const char *name() { return "SamplerFilterMode"; } + typedef SamplerFilterMode ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1931,11 +1927,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "ExecutionModel"; } - typedef ExecutionModel ReadType; + static const char *name() { return "ImageFormat"; } + typedef ImageFormat ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1948,11 +1944,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "AccessQualifier"; } - typedef AccessQualifier ReadType; + static const char *name() { return "ImageChannelOrder"; } + typedef ImageChannelOrder ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1965,11 +1961,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "RayQueryCommittedIntersectionType"; } - typedef RayQueryCommittedIntersectionType ReadType; + static const char *name() { return "ImageChannelDataType"; } + typedef ImageChannelDataType ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1982,11 +1978,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "SourceLanguage"; } - typedef SourceLanguage ReadType; + static const char *name() { return "QuantizationModes"; } + typedef QuantizationModes ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -1999,11 +1995,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "KernelProfilingInfo"; } - typedef KernelProfilingInfoMask ReadType; + static const char *name() { return "OverflowModes"; } + typedef OverflowModes ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -2013,385 +2009,928 @@ struct TypeTraits } ReadType result{static_cast(*from++)}; return result; - }; + } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "ExecutionMode"; } + static const char *name() { return "Decoration"; } struct ReadType { - ExecutionMode value; + Decoration value; union DataTag { - struct InvocationsTag + struct SpecIdTag + { + LiteralInteger specializationConstantId; + } SpecId; + struct ArrayStrideTag + { + LiteralInteger arrayStride; + } ArrayStride; + struct MatrixStrideTag + { + LiteralInteger matrixStride; + } MatrixStride; + struct BuiltInTag + { + BuiltIn first; + } BuiltInData; + struct UniformIdTag + { + IdScope execution; + } UniformId; + struct StreamTag + { + LiteralInteger streamNumber; + } Stream; + struct LocationTag + { + LiteralInteger location; + } Location; + struct ComponentTag + { + LiteralInteger component; + } Component; + struct IndexTag + { + LiteralInteger index; + } Index; + struct BindingTag + { + LiteralInteger bindingPoint; + } Binding; + struct DescriptorSetTag + { + LiteralInteger descriptorSet; + } DescriptorSet; + struct OffsetTag + { + LiteralInteger byteOffset; + } Offset; + struct XfbBufferTag + { + LiteralInteger xfbBufferNumber; + } XfbBuffer; + struct XfbStrideTag + { + LiteralInteger xfbStride; + } XfbStride; + struct FuncParamAttrTag + { + FunctionParameterAttribute functionParameterAttribute; + } FuncParamAttr; + struct FPRoundingModeTag + { + FPRoundingModeValue floatingPointRoundingMode; + } FPRoundingMode; + struct FPFastMathModeTag + { + FPFastMathModeMask fastMathMode; + } FPFastMathMode; + struct LinkageAttributesTag + { + LiteralString name; + LinkageType linkageType; + } LinkageAttributes; + struct InputAttachmentIndexTag + { + LiteralInteger attachmentIndex; + } InputAttachmentIndex; + struct AlignmentTag + { + LiteralInteger alignment; + } Alignment; + struct MaxByteOffsetTag + { + LiteralInteger maxByteOffset; + } MaxByteOffset; + struct AlignmentIdTag + { + IdRef alignment; + } AlignmentId; + struct MaxByteOffsetIdTag + { + IdRef maxByteOffset; + } MaxByteOffsetId; + struct NodeSharesPayloadLimitsWithAMDXTag + { + IdRef payloadArray; + } NodeSharesPayloadLimitsWithAMDX; + struct NodeMaxPayloadsAMDXTag + { + IdRef maxNumberOfPayloads; + } NodeMaxPayloadsAMDX; + struct PayloadNodeNameAMDXTag + { + LiteralString nodeName; + } PayloadNodeNameAMDX; + struct SecondaryViewportRelativeNVTag + { + LiteralInteger offset; + } SecondaryViewportRelativeNV; + struct SIMTCallINTELTag + { + LiteralInteger n; + } SIMTCallINTEL; + struct ClobberINTELTag + { + LiteralString _register; + } ClobberINTEL; + struct FuncParamIOKindINTELTag + { + LiteralInteger kind; + } FuncParamIOKindINTEL; + struct GlobalVariableOffsetINTELTag + { + LiteralInteger offset; + } GlobalVariableOffsetINTEL; + struct CounterBufferTag + { + IdRef counterBuffer; + } CounterBuffer; + struct HlslCounterBufferGOOGLETag + { + IdRef counterBuffer; + } HlslCounterBufferGOOGLE; + struct UserSemanticTag + { + LiteralString semantic; + } UserSemantic; + struct HlslSemanticGOOGLETag + { + LiteralString semantic; + } HlslSemanticGOOGLE; + struct UserTypeGOOGLETag + { + LiteralString userType; + } UserTypeGOOGLE; + struct FunctionRoundingModeINTELTag + { + LiteralInteger targetWidth; + FPRoundingModeValue fpRoundingMode; + } FunctionRoundingModeINTEL; + struct FunctionDenormModeINTELTag + { + LiteralInteger targetWidth; + FPDenormMode fpDenormMode; + } FunctionDenormModeINTEL; + struct MemoryINTELTag + { + LiteralString memoryType; + } MemoryINTEL; + struct NumbanksINTELTag + { + LiteralInteger banks; + } NumbanksINTEL; + struct BankwidthINTELTag + { + LiteralInteger bankWidth; + } BankwidthINTEL; + struct MaxPrivateCopiesINTELTag + { + LiteralInteger maximumCopies; + } MaxPrivateCopiesINTEL; + struct MaxReplicatesINTELTag + { + LiteralInteger maximumReplicates; + } MaxReplicatesINTEL; + struct MergeINTELTag + { + LiteralString mergeKey; + LiteralString mergeType; + } MergeINTEL; + struct BankBitsINTELTag + { + LiteralInteger bankBits; + } BankBitsINTEL; + struct ForcePow2DepthINTELTag + { + LiteralInteger forceKey; + } ForcePow2DepthINTEL; + struct StridesizeINTELTag + { + LiteralInteger strideSize; + } StridesizeINTEL; + struct WordsizeINTELTag + { + LiteralInteger wordSize; + } WordsizeINTEL; + struct CacheSizeINTELTag + { + LiteralInteger cacheSizeInBytes; + } CacheSizeINTEL; + struct PrefetchINTELTag + { + LiteralInteger prefetcherSizeInBytes; + } PrefetchINTEL; + struct MathOpDSPModeINTELTag + { + LiteralInteger mode; + LiteralInteger propagate; + } MathOpDSPModeINTEL; + struct AliasScopeINTELTag + { + IdRef aliasingScopesList; + } AliasScopeINTEL; + struct NoAliasINTELTag + { + IdRef aliasingScopesList; + } NoAliasINTEL; + struct InitiationIntervalINTELTag + { + LiteralInteger cycles; + } InitiationIntervalINTEL; + struct MaxConcurrencyINTELTag + { + LiteralInteger invocations; + } MaxConcurrencyINTEL; + struct PipelineEnableINTELTag + { + LiteralInteger enable; + } PipelineEnableINTEL; + struct BufferLocationINTELTag + { + LiteralInteger bufferLocationId; + } BufferLocationINTEL; + struct IOPipeStorageINTELTag + { + LiteralInteger ioPipeId; + } IOPipeStorageINTEL; + struct FunctionFloatingPointModeINTELTag + { + LiteralInteger targetWidth; + FPOperationMode fpOperationMode; + } FunctionFloatingPointModeINTEL; + struct FPMaxErrorDecorationINTELTag + { + LiteralFloat maxError; + } FPMaxErrorDecorationINTEL; + struct LatencyControlLabelINTELTag + { + LiteralInteger latencyLabel; + } LatencyControlLabelINTEL; + struct LatencyControlConstraintINTELTag + { + LiteralInteger relativeTo; + LiteralInteger controlType; + LiteralInteger relativeCycle; + } LatencyControlConstraintINTEL; + struct MMHostInterfaceAddressWidthINTELTag + { + LiteralInteger addressWidth; + } MMHostInterfaceAddressWidthINTEL; + struct MMHostInterfaceDataWidthINTELTag + { + LiteralInteger dataWidth; + } MMHostInterfaceDataWidthINTEL; + struct MMHostInterfaceLatencyINTELTag + { + LiteralInteger latency; + } MMHostInterfaceLatencyINTEL; + struct MMHostInterfaceReadWriteModeINTELTag + { + AccessQualifier readWriteMode; + } MMHostInterfaceReadWriteModeINTEL; + struct MMHostInterfaceMaxBurstINTELTag + { + LiteralInteger maxBurstCount; + } MMHostInterfaceMaxBurstINTEL; + struct MMHostInterfaceWaitRequestINTELTag + { + LiteralInteger waitrequest; + } MMHostInterfaceWaitRequestINTEL; + struct HostAccessINTELTag + { + HostAccessQualifier access; + LiteralString name; + } HostAccessINTEL; + struct InitModeINTELTag + { + InitializationModeQualifier trigger; + } InitModeINTEL; + struct ImplementInRegisterMapINTELTag + { + LiteralInteger value; + } ImplementInRegisterMapINTEL; + struct CacheControlLoadINTELTag + { + LiteralInteger cacheLevel; + LoadCacheControl cacheControl; + } CacheControlLoadINTEL; + struct CacheControlStoreINTELTag + { + LiteralInteger cacheLevel; + StoreCacheControl cacheControl; + } CacheControlStoreINTEL; + } data; + }; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result; + result.value = static_cast(*from++); + switch (result.value) + { + default: error = true; return {}; + case Decoration::RelaxedPrecision: + case Decoration::Block: + case Decoration::BufferBlock: + case Decoration::RowMajor: + case Decoration::ColMajor: + case Decoration::GLSLShared: + case Decoration::GLSLPacked: + case Decoration::CPacked: + case Decoration::NoPerspective: + case Decoration::Flat: + case Decoration::Patch: + case Decoration::Centroid: + case Decoration::Sample: + case Decoration::Invariant: + case Decoration::Restrict: + case Decoration::Aliased: + case Decoration::Volatile: + case Decoration::Constant: + case Decoration::Coherent: + case Decoration::NonWritable: + case Decoration::NonReadable: + case Decoration::Uniform: + case Decoration::SaturatedConversion: + case Decoration::NoContraction: + case Decoration::NoSignedWrap: + case Decoration::NoUnsignedWrap: + case Decoration::WeightTextureQCOM: + case Decoration::BlockMatchTextureQCOM: + case Decoration::BlockMatchSamplerQCOM: + case Decoration::ExplicitInterpAMD: + case Decoration::TrackFinishWritingAMDX: + case Decoration::OverrideCoverageNV: + case Decoration::PassthroughNV: + case Decoration::ViewportRelativeNV: + case Decoration::PerPrimitiveEXT: + case Decoration::PerViewNV: + case Decoration::PerTaskNV: + case Decoration::PerVertexKHR: + case Decoration::NonUniform: + case Decoration::RestrictPointer: + case Decoration::AliasedPointer: + case Decoration::HitObjectShaderRecordBufferNV: + case Decoration::BindlessSamplerNV: + case Decoration::BindlessImageNV: + case Decoration::BoundSamplerNV: + case Decoration::BoundImageNV: + case Decoration::ReferencedIndirectlyINTEL: + case Decoration::SideEffectsINTEL: + case Decoration::VectorComputeVariableINTEL: + case Decoration::VectorComputeFunctionINTEL: + case Decoration::StackCallINTEL: + case Decoration::RegisterINTEL: + case Decoration::SinglepumpINTEL: + case Decoration::DoublepumpINTEL: + case Decoration::SimpleDualPortINTEL: + case Decoration::TrueDualPortINTEL: + case Decoration::BurstCoalesceINTEL: + case Decoration::DontStaticallyCoalesceINTEL: + case Decoration::StallEnableINTEL: + case Decoration::FuseLoopsInFunctionINTEL: + case Decoration::SingleElementVectorINTEL: + case Decoration::VectorComputeCallableFunctionINTEL: + case Decoration::MediaBlockIOINTEL: + case Decoration::StallFreeINTEL: + case Decoration::ConduitKernelArgumentINTEL: + case Decoration::RegisterMapKernelArgumentINTEL: + case Decoration::StableKernelArgumentINTEL: break; + case Decoration::SpecId: { - LiteralInteger numberOfInvocationInvocations; - } Invocations; - struct LocalSizeTag + result.data.SpecId.specializationConstantId = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::ArrayStride: { - LiteralInteger xSize; - LiteralInteger ySize; - LiteralInteger zSize; - } LocalSize; - struct LocalSizeHintTag + result.data.ArrayStride.arrayStride = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::MatrixStride: { - LiteralInteger xSize; - LiteralInteger ySize; - LiteralInteger zSize; - } LocalSizeHint; - struct OutputVerticesTag + result.data.MatrixStride.matrixStride = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::BuiltIn: { - LiteralInteger vertexCount; - } OutputVertices; - struct VecTypeHintTag + result.data.BuiltInData.first = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::UniformId: { - LiteralInteger vectorType; - } VecTypeHint; - struct SubgroupSizeTag + result.data.UniformId.execution = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Stream: { - LiteralInteger subgroupSize; - } SubgroupSize; - struct SubgroupsPerWorkgroupTag + result.data.Stream.streamNumber = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Location: { - LiteralInteger subgroupsPerWorkgroup; - } SubgroupsPerWorkgroup; - struct SubgroupsPerWorkgroupIdTag + result.data.Location.location = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Component: { - IdRef subgroupsPerWorkgroup; - } SubgroupsPerWorkgroupId; - struct LocalSizeIdTag + result.data.Component.component = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Index: { - IdRef xSize; - IdRef ySize; - IdRef zSize; - } LocalSizeId; - struct LocalSizeHintIdTag + result.data.Index.index = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Binding: { - IdRef xSizeHint; - IdRef ySizeHint; - IdRef zSizeHint; - } LocalSizeHintId; - struct DenormPreserveTag + result.data.Binding.bindingPoint = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::DescriptorSet: { - LiteralInteger targetWidth; - } DenormPreserve; - struct DenormFlushToZeroTag + result.data.DescriptorSet.descriptorSet = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Offset: { - LiteralInteger targetWidth; - } DenormFlushToZero; - struct SignedZeroInfNanPreserveTag + result.data.Offset.byteOffset = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::XfbBuffer: { - LiteralInteger targetWidth; - } SignedZeroInfNanPreserve; - struct RoundingModeRTETag + result.data.XfbBuffer.xfbBufferNumber = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::XfbStride: + { + result.data.XfbStride.xfbStride = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FuncParamAttr: + { + result.data.FuncParamAttr.functionParameterAttribute = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FPRoundingMode: + { + result.data.FPRoundingMode.floatingPointRoundingMode = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FPFastMathMode: + { + result.data.FPFastMathMode.fastMathMode = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::LinkageAttributes: + { + result.data.LinkageAttributes.name = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.LinkageAttributes.linkageType = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::InputAttachmentIndex: + { + result.data.InputAttachmentIndex.attachmentIndex = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::Alignment: + { + result.data.Alignment.alignment = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::MaxByteOffset: + { + result.data.MaxByteOffset.maxByteOffset = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::AlignmentId: + { + result.data.AlignmentId.alignment = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::MaxByteOffsetId: + { + result.data.MaxByteOffsetId.maxByteOffset = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + result.data.NodeSharesPayloadLimitsWithAMDX.payloadArray = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::NodeMaxPayloadsAMDX: + { + result.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::PayloadNodeNameAMDX: { - LiteralInteger targetWidth; - } RoundingModeRTE; - struct RoundingModeRTZTag + result.data.PayloadNodeNameAMDX.nodeName = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::SecondaryViewportRelativeNV: { - LiteralInteger targetWidth; - } RoundingModeRTZ; - struct OutputPrimitivesNVTag + result.data.SecondaryViewportRelativeNV.offset = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::SIMTCallINTEL: { - LiteralInteger primitiveCount; - } OutputPrimitivesNV; - struct SharedLocalMemorySizeINTELTag + result.data.SIMTCallINTEL.n = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::ClobberINTEL: { - LiteralInteger size; - } SharedLocalMemorySizeINTEL; - struct RoundingModeRTPINTELTag + result.data.ClobberINTEL._register = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FuncParamIOKindINTEL: { - LiteralInteger targetWidth; - } RoundingModeRTPINTEL; - struct RoundingModeRTNINTELTag + result.data.FuncParamIOKindINTEL.kind = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::GlobalVariableOffsetINTEL: { - LiteralInteger targetWidth; - } RoundingModeRTNINTEL; - struct FloatingPointModeALTINTELTag + result.data.GlobalVariableOffsetINTEL.offset = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::CounterBuffer: { - LiteralInteger targetWidth; - } FloatingPointModeALTINTEL; - struct FloatingPointModeIEEEINTELTag + result.data.CounterBuffer.counterBuffer = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::UserSemantic: { - LiteralInteger targetWidth; - } FloatingPointModeIEEEINTEL; - struct MaxWorkgroupSizeINTELTag + result.data.UserSemantic.semantic = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::UserTypeGOOGLE: { - LiteralInteger max_x_size; - LiteralInteger max_y_size; - LiteralInteger max_z_size; - } MaxWorkgroupSizeINTEL; - struct MaxWorkDimINTELTag + result.data.UserTypeGOOGLE.userType = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FunctionRoundingModeINTEL: { - LiteralInteger max_dimensions; - } MaxWorkDimINTEL; - struct NumSIMDWorkitemsINTELTag + result.data.FunctionRoundingModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.FunctionRoundingModeINTEL.fpRoundingMode = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FunctionDenormModeINTEL: { - LiteralInteger vector_width; - } NumSIMDWorkitemsINTEL; - struct SchedulerTargetFmaxMhzINTELTag + result.data.FunctionDenormModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.FunctionDenormModeINTEL.fpDenormMode = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::MemoryINTEL: { - LiteralInteger target_fmax; - } SchedulerTargetFmaxMhzINTEL; - } data; - }; - static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) - { - if (to - from < 1) - { - error = true; - return {}; - } - ReadType result; - result.value = static_cast(*from++); - switch (result.value) - { - default: error = true; return {}; - case ExecutionMode::SpacingEqual: - case ExecutionMode::SpacingFractionalEven: - case ExecutionMode::SpacingFractionalOdd: - case ExecutionMode::VertexOrderCw: - case ExecutionMode::VertexOrderCcw: - case ExecutionMode::PixelCenterInteger: - case ExecutionMode::OriginUpperLeft: - case ExecutionMode::OriginLowerLeft: - case ExecutionMode::EarlyFragmentTests: - case ExecutionMode::PointMode: - case ExecutionMode::Xfb: - case ExecutionMode::DepthReplacing: - case ExecutionMode::DepthGreater: - case ExecutionMode::DepthLess: - case ExecutionMode::DepthUnchanged: - case ExecutionMode::InputPoints: - case ExecutionMode::InputLines: - case ExecutionMode::InputLinesAdjacency: - case ExecutionMode::Triangles: - case ExecutionMode::InputTrianglesAdjacency: - case ExecutionMode::Quads: - case ExecutionMode::Isolines: - case ExecutionMode::OutputPoints: - case ExecutionMode::OutputLineStrip: - case ExecutionMode::OutputTriangleStrip: - case ExecutionMode::ContractionOff: - case ExecutionMode::Initializer: - case ExecutionMode::Finalizer: - case ExecutionMode::SubgroupUniformControlFlowKHR: - case ExecutionMode::PostDepthCoverage: - case ExecutionMode::StencilRefReplacingEXT: - case ExecutionMode::OutputLinesNV: - case ExecutionMode::DerivativeGroupQuadsNV: - case ExecutionMode::DerivativeGroupLinearNV: - case ExecutionMode::OutputTrianglesNV: - case ExecutionMode::PixelInterlockOrderedEXT: - case ExecutionMode::PixelInterlockUnorderedEXT: - case ExecutionMode::SampleInterlockOrderedEXT: - case ExecutionMode::SampleInterlockUnorderedEXT: - case ExecutionMode::ShadingRateInterlockOrderedEXT: - case ExecutionMode::ShadingRateInterlockUnorderedEXT: - case ExecutionMode::NoGlobalOffsetINTEL: break; - case ExecutionMode::Invocations: + result.data.MemoryINTEL.memoryType = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::NumbanksINTEL: { - result.data.Invocations.numberOfInvocationInvocations = TypeTraits::read(from, to, cds, error); + result.data.NumbanksINTEL.banks = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::LocalSize: + case Decoration::BankwidthINTEL: { - result.data.LocalSize.xSize = TypeTraits::read(from, to, cds, error); + result.data.BankwidthINTEL.bankWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSize.ySize = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::MaxPrivateCopiesINTEL: + { + result.data.MaxPrivateCopiesINTEL.maximumCopies = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSize.zSize = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::MaxReplicatesINTEL: + { + result.data.MaxReplicatesINTEL.maximumReplicates = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::LocalSizeHint: + case Decoration::MergeINTEL: { - result.data.LocalSizeHint.xSize = TypeTraits::read(from, to, cds, error); + result.data.MergeINTEL.mergeKey = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeHint.ySize = TypeTraits::read(from, to, cds, error); + result.data.MergeINTEL.mergeType = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeHint.zSize = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::BankBitsINTEL: + { + result.data.BankBitsINTEL.bankBits = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::OutputVertices: + case Decoration::ForcePow2DepthINTEL: { - result.data.OutputVertices.vertexCount = TypeTraits::read(from, to, cds, error); + result.data.ForcePow2DepthINTEL.forceKey = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::VecTypeHint: + case Decoration::StridesizeINTEL: { - result.data.VecTypeHint.vectorType = TypeTraits::read(from, to, cds, error); + result.data.StridesizeINTEL.strideSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SubgroupSize: + case Decoration::WordsizeINTEL: { - result.data.SubgroupSize.subgroupSize = TypeTraits::read(from, to, cds, error); + result.data.WordsizeINTEL.wordSize = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SubgroupsPerWorkgroup: + case Decoration::CacheSizeINTEL: { - result.data.SubgroupsPerWorkgroup.subgroupsPerWorkgroup = TypeTraits::read(from, to, cds, error); + result.data.CacheSizeINTEL.cacheSizeInBytes = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SubgroupsPerWorkgroupId: + case Decoration::PrefetchINTEL: { - result.data.SubgroupsPerWorkgroupId.subgroupsPerWorkgroup = TypeTraits::read(from, to, cds, error); + result.data.PrefetchINTEL.prefetcherSizeInBytes = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::LocalSizeId: + case Decoration::MathOpDSPModeINTEL: { - result.data.LocalSizeId.xSize = TypeTraits::read(from, to, cds, error); + result.data.MathOpDSPModeINTEL.mode = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeId.ySize = TypeTraits::read(from, to, cds, error); + result.data.MathOpDSPModeINTEL.propagate = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeId.zSize = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::AliasScopeINTEL: + { + result.data.AliasScopeINTEL.aliasingScopesList = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::LocalSizeHintId: + case Decoration::NoAliasINTEL: { - result.data.LocalSizeHintId.xSizeHint = TypeTraits::read(from, to, cds, error); + result.data.NoAliasINTEL.aliasingScopesList = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeHintId.ySizeHint = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::InitiationIntervalINTEL: + { + result.data.InitiationIntervalINTEL.cycles = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.LocalSizeHintId.zSizeHint = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::MaxConcurrencyINTEL: + { + result.data.MaxConcurrencyINTEL.invocations = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::DenormPreserve: + case Decoration::PipelineEnableINTEL: { - result.data.DenormPreserve.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.PipelineEnableINTEL.enable = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::DenormFlushToZero: + case Decoration::BufferLocationINTEL: { - result.data.DenormFlushToZero.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.BufferLocationINTEL.bufferLocationId = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::IOPipeStorageINTEL: + { + result.data.IOPipeStorageINTEL.ioPipeId = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + break; + }; + case Decoration::FunctionFloatingPointModeINTEL: + { + result.data.FunctionFloatingPointModeINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.FunctionFloatingPointModeINTEL.fpOperationMode = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SignedZeroInfNanPreserve: + case Decoration::FPMaxErrorDecorationINTEL: { - result.data.SignedZeroInfNanPreserve.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.FPMaxErrorDecorationINTEL.maxError = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::RoundingModeRTE: + case Decoration::LatencyControlLabelINTEL: { - result.data.RoundingModeRTE.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.LatencyControlLabelINTEL.latencyLabel = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::RoundingModeRTZ: + case Decoration::LatencyControlConstraintINTEL: { - result.data.RoundingModeRTZ.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.LatencyControlConstraintINTEL.relativeTo = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.LatencyControlConstraintINTEL.controlType = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.LatencyControlConstraintINTEL.relativeCycle = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::OutputPrimitivesNV: + case Decoration::MMHostInterfaceAddressWidthINTEL: { - result.data.OutputPrimitivesNV.primitiveCount = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceAddressWidthINTEL.addressWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SharedLocalMemorySizeINTEL: + case Decoration::MMHostInterfaceDataWidthINTEL: { - result.data.SharedLocalMemorySizeINTEL.size = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceDataWidthINTEL.dataWidth = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::RoundingModeRTPINTEL: + case Decoration::MMHostInterfaceLatencyINTEL: { - result.data.RoundingModeRTPINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceLatencyINTEL.latency = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::RoundingModeRTNINTEL: + case Decoration::MMHostInterfaceReadWriteModeINTEL: { - result.data.RoundingModeRTNINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::FloatingPointModeALTINTEL: + case Decoration::MMHostInterfaceMaxBurstINTEL: { - result.data.FloatingPointModeALTINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::FloatingPointModeIEEEINTEL: + case Decoration::MMHostInterfaceWaitRequestINTEL: { - result.data.FloatingPointModeIEEEINTEL.targetWidth = TypeTraits::read(from, to, cds, error); + result.data.MMHostInterfaceWaitRequestINTEL.waitrequest = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::MaxWorkgroupSizeINTEL: + case Decoration::HostAccessINTEL: { - result.data.MaxWorkgroupSizeINTEL.max_x_size = TypeTraits::read(from, to, cds, error); + result.data.HostAccessINTEL.access = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.MaxWorkgroupSizeINTEL.max_y_size = TypeTraits::read(from, to, cds, error); + result.data.HostAccessINTEL.name = TypeTraits::read(from, to, cds, error); if (error) return {}; - result.data.MaxWorkgroupSizeINTEL.max_z_size = TypeTraits::read(from, to, cds, error); + break; + }; + case Decoration::InitModeINTEL: + { + result.data.InitModeINTEL.trigger = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::MaxWorkDimINTEL: + case Decoration::ImplementInRegisterMapINTEL: { - result.data.MaxWorkDimINTEL.max_dimensions = TypeTraits::read(from, to, cds, error); + result.data.ImplementInRegisterMapINTEL.value = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::NumSIMDWorkitemsINTEL: + case Decoration::CacheControlLoadINTEL: { - result.data.NumSIMDWorkitemsINTEL.vector_width = TypeTraits::read(from, to, cds, error); + result.data.CacheControlLoadINTEL.cacheLevel = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.CacheControlLoadINTEL.cacheControl = TypeTraits::read(from, to, cds, error); if (error) return {}; break; }; - case ExecutionMode::SchedulerTargetFmaxMhzINTEL: + case Decoration::CacheControlStoreINTEL: { - result.data.SchedulerTargetFmaxMhzINTEL.target_fmax = TypeTraits::read(from, to, cds, error); + result.data.CacheControlStoreINTEL.cacheLevel = TypeTraits::read(from, to, cds, error); + if (error) + return {}; + result.data.CacheControlStoreINTEL.cacheControl = TypeTraits::read(from, to, cds, error); if (error) return {}; break; @@ -2401,6 +2940,108 @@ struct TypeTraits } }; template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "Scope"; } + typedef Scope ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "GroupOperation"; } + typedef GroupOperation ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "KernelEnqueueFlags"; } + typedef KernelEnqueueFlags ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "Capability"; } + typedef Capability ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "RayQueryIntersection"; } + typedef RayQueryIntersection ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "RayQueryCommittedIntersectionType"; } + typedef RayQueryCommittedIntersectionType ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + } +}; +template <> struct TypeTraits { static const char *doc() { return ""; } @@ -2418,11 +3059,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "MemoryModel"; } - typedef MemoryModel ReadType; + static const char *name() { return "PackedVectorFormat"; } + typedef PackedVectorFormat ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -2435,11 +3076,28 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "SamplerAddressingMode"; } - typedef SamplerAddressingMode ReadType; + static const char *name() { return "CooperativeMatrixOperands"; } + typedef CooperativeMatrixOperandsMask ReadType; + static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) + { + if (to - from < 1) + { + error = true; + return {}; + } + ReadType result{static_cast(*from++)}; + return result; + }; +}; +template <> +struct TypeTraits +{ + static const char *doc() { return ""; } + static const char *name() { return "CooperativeMatrixLayout"; } + typedef CooperativeMatrixLayout ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -2452,11 +3110,11 @@ struct TypeTraits } }; template <> -struct TypeTraits +struct TypeTraits { static const char *doc() { return ""; } - static const char *name() { return "StorageClass"; } - typedef StorageClass ReadType; + static const char *name() { return "CooperativeMatrixUse"; } + typedef CooperativeMatrixUse ReadType; static ReadType read(const Id *&from, const Id *to, Id cds, bool &error) { if (to - from < 1) @@ -2468,75 +3126,75 @@ struct TypeTraits return result; } }; -struct PairIdRefLiteralInteger +struct PairLiteralIntegerIdRef { - IdRef first; - LiteralInteger second; + LiteralInteger first; + IdRef second; }; template <> -struct TypeTraits +struct TypeTraits { - static const char *name() { return "PairIdRefLiteralInteger"; } - static PairIdRefLiteralInteger read(const Id *&from, const Id *to, Id cds, bool &error) + static const char *name() { return "PairLiteralIntegerIdRef"; } + static PairLiteralIntegerIdRef read(const Id *&from, const Id *to, Id cds, bool &error) { auto localFrom = from; - auto c0 = TypeTraits::read(localFrom, to, cds, error); + auto c0 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; - auto c1 = TypeTraits::read(localFrom, to, cds, error); + auto c1 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; - PairIdRefLiteralInteger result; + PairLiteralIntegerIdRef result; result.first = c0; result.second = c1; from = localFrom; return result; } }; -struct PairIdRefIdRef +struct PairIdRefLiteralInteger { IdRef first; - IdRef second; + LiteralInteger second; }; template <> -struct TypeTraits +struct TypeTraits { - static const char *name() { return "PairIdRefIdRef"; } - static PairIdRefIdRef read(const Id *&from, const Id *to, Id cds, bool &error) + static const char *name() { return "PairIdRefLiteralInteger"; } + static PairIdRefLiteralInteger read(const Id *&from, const Id *to, Id cds, bool &error) { auto localFrom = from; auto c0 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; - auto c1 = TypeTraits::read(localFrom, to, cds, error); + auto c1 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; - PairIdRefIdRef result; + PairIdRefLiteralInteger result; result.first = c0; result.second = c1; from = localFrom; return result; } }; -struct PairLiteralIntegerIdRef +struct PairIdRefIdRef { - LiteralInteger first; + IdRef first; IdRef second; }; template <> -struct TypeTraits +struct TypeTraits { - static const char *name() { return "PairLiteralIntegerIdRef"; } - static PairLiteralIntegerIdRef read(const Id *&from, const Id *to, Id cds, bool &error) + static const char *name() { return "PairIdRefIdRef"; } + static PairIdRefIdRef read(const Id *&from, const Id *to, Id cds, bool &error) { auto localFrom = from; - auto c0 = TypeTraits::read(localFrom, to, cds, error); + auto c0 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; auto c1 = TypeTraits::read(localFrom, to, cds, error); if (error) return {}; - PairLiteralIntegerIdRef result; + PairIdRefIdRef result; result.first = c0; result.second = c1; from = localFrom; @@ -2544,34 +3202,41 @@ struct TypeTraits } }; // enumerant name lookups +const char *name_of(SourceLanguage value); +const char *name_of(ExecutionModel value); +const char *name_of(AddressingModel value); +const char *name_of(MemoryModel value); +const char *name_of(ExecutionMode value); +const char *name_of(StorageClass value); +const char *name_of(Dim value); +const char *name_of(SamplerAddressingMode value); const char *name_of(SamplerFilterMode value); -const char *name_of(FunctionParameterAttribute value); -const char *name_of(ImageChannelOrder value); -const char *name_of(KernelEnqueueFlags value); -const char *name_of(RayQueryIntersection value); const char *name_of(ImageFormat value); -const char *name_of(Scope value); -const char *name_of(LinkageType value); +const char *name_of(ImageChannelOrder value); const char *name_of(ImageChannelDataType value); -const char *name_of(Decoration value); +const char *name_of(FPRoundingMode value); +const char *name_of(FPDenormMode value); const char *name_of(QuantizationModes value); -const char *name_of(BuiltIn value); -const char *name_of(AddressingModel value); -const char *name_of(PackedVectorFormat value); -const char *name_of(Dim value); +const char *name_of(FPOperationMode value); const char *name_of(OverflowModes value); -const char *name_of(FPRoundingMode value); -const char *name_of(Capability value); -const char *name_of(GroupOperation value); -const char *name_of(ExecutionModel value); +const char *name_of(LinkageType value); const char *name_of(AccessQualifier value); +const char *name_of(HostAccessQualifier value); +const char *name_of(FunctionParameterAttribute value); +const char *name_of(Decoration value); +const char *name_of(BuiltIn value); +const char *name_of(Scope value); +const char *name_of(GroupOperation value); +const char *name_of(KernelEnqueueFlags value); +const char *name_of(Capability value); +const char *name_of(RayQueryIntersection value); const char *name_of(RayQueryCommittedIntersectionType value); -const char *name_of(SourceLanguage value); -const char *name_of(FPDenormMode value); -const char *name_of(ExecutionMode value); -const char *name_of(FPOperationMode value); const char *name_of(RayQueryCandidateIntersectionType value); -const char *name_of(MemoryModel value); -const char *name_of(SamplerAddressingMode value); -const char *name_of(StorageClass value); +const char *name_of(PackedVectorFormat value); +const char *name_of(CooperativeMatrixLayout value); +const char *name_of(CooperativeMatrixUse value); +const char *name_of(InitializationModeQualifier value); +const char *name_of(LoadCacheControl value); +const char *name_of(StoreCacheControl value); +const char *name_of(NamedMaximumNumberOfRegisters value); } // namespace spirv diff --git a/prog/gameLibs/publicInclude/spirv/traits_table_base.h b/prog/gameLibs/publicInclude/spirv/traits_table_base.h index 3d9296221..34e0da535 100644 --- a/prog/gameLibs/publicInclude/spirv/traits_table_base.h +++ b/prog/gameLibs/publicInclude/spirv/traits_table_base.h @@ -135,6 +135,19 @@ struct LiteralInteger LiteralInteger &operator=(LiteralInteger &&) = default; LiteralInteger(const Id &v) : value{v} {} }; + +struct LiteralFloat +{ + Id value; + LiteralFloat() = default; + ~LiteralFloat() = default; + LiteralFloat(const LiteralFloat &) = default; + LiteralFloat &operator=(const LiteralFloat &) = default; + LiteralFloat(LiteralFloat &&) = default; + LiteralFloat &operator=(LiteralFloat &&) = default; + LiteralFloat(const Id &v) : value{v} {} +}; + // Size usually depends on the type that is associated with this value // in most cases this is just one word for 32 or less bits constant values // currently this can not be larger than 64 bits diff --git a/prog/gameLibs/publicInclude/vr/vrHands.h b/prog/gameLibs/publicInclude/vr/vrHands.h index 0688828f1..659bfe917 100644 --- a/prog/gameLibs/publicInclude/vr/vrHands.h +++ b/prog/gameLibs/publicInclude/vr/vrHands.h @@ -53,6 +53,13 @@ class VrHands WHEEL } shape = CYLINDER; } attachment{}; + + struct Panel + { + bool isHoldingPanel = false; + Point3 angles{}; + Point3 position{}; + } panel{}; }; using HandsState = eastl::array; @@ -170,6 +177,7 @@ class VrHands int addAnimPhysVar(AnimV20::AnimcharBaseComponent &animchar_component, VrInput::Hands side, const char *name, float def_val); void setAnimPhysVarVal(VrInput::Hands side, int var_id, float val); void updateFingerStates(VrInput::Hands side); + void updatePanelAnim(VrInput::Hands side); void updateAttachment(VrInput::Hands side, const TMatrix &ref_rot_tm, const bool is_fold_forced); void convertDistalToFingertipTm(TMatrix &in_out_tm); diff --git a/prog/gameLibs/quirrel/frp/frp.cpp b/prog/gameLibs/quirrel/frp/frp.cpp index 398c56754..d58cca339 100644 --- a/prog/gameLibs/quirrel/frp/frp.cpp +++ b/prog/gameLibs/quirrel/frp/frp.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -610,7 +611,7 @@ bool ObservablesGraph::updateDeferred(String &err_msg) FRPDBG("@#@ ObservablesGraph(%p)::updateDeferred()", this); G_ASSERT(triggerNestDepth == 0); - auto t0 = ref_time_ticks(); + auto t0 = profile_ref_ticks(); onEnterTriggerRoot(); bool ok = true; @@ -647,7 +648,7 @@ bool ObservablesGraph::updateDeferred(String &err_msg) if (sortedGraph.empty()) { TIME_PROFILE(frp_topo_sort); - sortedGraph.reserve(allObservables.size()); + sortedGraph.reserve(allObservables.size() / 2); // Note: x0.5 is heuristic // topological sort (roots-to-leaves) forAllComputed([&](auto &c) { @@ -861,7 +862,21 @@ bool ObservablesGraph::updateDeferred(String &err_msg) onExitTriggerRoot(); - usecUpdateDeferred += get_time_usec(t0); + int updateTime = profile_time_usec(t0); + usecUpdateDeferred += updateTime; + + if (updateTime > slowUpdateThresholdUsec) + { + if (++slowUpdateFrames == 60) + { +#if DAGOR_DBGLEVEL > 0 + logerr("every FRP update is consistenly slow (%d > %d us), looks like looping", updateTime, slowUpdateThresholdUsec); +#endif + } + } + else + slowUpdateFrames = 0; + FRPDBG("@#@ / ObservablesGraph(%p)::updateDeferred()", this); return ok; } @@ -896,7 +911,7 @@ bool ObservablesGraph::callScriptSubscribers(BaseObservable *triggered_node, Str if (isCallingSubscribers) // leave processing to top level call return true; - auto t0 = ref_time_ticks(); + auto t0 = profile_ref_ticks(); bool ok = true; for (;;) { @@ -936,7 +951,7 @@ bool ObservablesGraph::callScriptSubscribers(BaseObservable *triggered_node, Str } curSubscriberCalls.clear(); } - usecSubscribers += get_time_usec(t0); + usecSubscribers += profile_time_usec(t0); return ok; } @@ -1067,7 +1082,7 @@ bool BaseObservable::triggerRoot(String &err_msg, bool call_subscribers) logerr("%s triggered during recalc of %s", info.c_str(), rinfo.c_str()); } - auto t0 = ref_time_ticks(); + auto t0 = profile_ref_ticks(); graph->onEnterTriggerRoot(); bool ok = true; @@ -1169,7 +1184,7 @@ bool BaseObservable::triggerRoot(String &err_msg, bool call_subscribers) isInTrigger = false; graph->onExitTriggerRoot(); - graph->usecTrigger += get_time_usec(t0); + graph->usecTrigger += profile_time_usec(t0); return ok; } @@ -2137,7 +2152,7 @@ bool ComputedValue::recalculate(bool &ok) Sqrat::Object newVal; bool callSucceeded = false; - auto t0 = ref_time_ticks(); + auto t0 = profile_ref_ticks(); if (funcAcceptsCurVal) callSucceeded = func.Evaluate(value, newVal); else @@ -2147,7 +2162,7 @@ bool ComputedValue::recalculate(bool &ok) needRecalc = false; maybeRecalc = false; - int timeUsec = get_time_usec(t0); + int timeUsec = profile_time_usec(t0); (isUsed ? graph->usecUsedComputed : graph->usecUnusedComputed) += timeUsec; graph->computedRecalcs++; @@ -2557,6 +2572,15 @@ static SQInteger set_recursive_sources(HSQUIRRELVM vm) return 0; } +static SQInteger set_slow_update_threshold_usec(HSQUIRRELVM vm) +{ + ObservablesGraph *graph = ObservablesGraph::get_from_vm(vm); + SQInteger val = 1500; + sq_getinteger(vm, 2, &val); + graph->slowUpdateThresholdUsec = val; + return 0; +} + static SQInteger update_deferred(HSQUIRRELVM vm) { ObservablesGraph *graph = ObservablesGraph::get_from_vm(vm); @@ -2650,6 +2674,7 @@ void bind_frp_classes(SqModules *module_mgr) .SquirrelFunc("make_all_observables_immutable", make_all_observables_immutable, 2, ".b") .SquirrelFunc("set_default_deferred", set_default_deferred, 2, ".b") .SquirrelFunc("set_recursive_sources", set_recursive_sources, 2, ".b") + .SquirrelFunc("set_slow_update_threshold_usec", set_slow_update_threshold_usec, 2, ".i") .SquirrelFunc("recalc_all_computed_values", recalc_all_computed_values, 1, ".") .SquirrelFunc("gather_graph_stats", gather_graph_stats, 1, ".") .SquirrelFunc("update_deferred", update_deferred, 1, ".") diff --git a/prog/gameLibs/rendInst/rendInstAccess.cpp b/prog/gameLibs/rendInst/rendInstAccess.cpp index 95fd590e3..339702e2d 100644 --- a/prog/gameLibs/rendInst/rendInstAccess.cpp +++ b/prog/gameLibs/rendInst/rendInstAccess.cpp @@ -11,22 +11,24 @@ #include #include -rendinst::AutoLockReadPrimaryAndExtra::AutoLockReadPrimaryAndExtra() +rendinst::AutoLockReadPrimary::AutoLockReadPrimary() { for (int l = 0; l < rendinst::rgPrimaryLayers; l++) if (RendInstGenData *rgl = rendinst::rgLayer[l]) rgl->rtData->riRwCs.lockRead(); - rendinst::ccExtra.lockRead(); } -rendinst::AutoLockReadPrimaryAndExtra::~AutoLockReadPrimaryAndExtra() +rendinst::AutoLockReadPrimary::~AutoLockReadPrimary() { for (int l = rendinst::rgPrimaryLayers - 1; l >= 0; l--) if (RendInstGenData *rgl = rendinst::rgLayer[l]) rgl->rtData->riRwCs.unlockRead(); - rendinst::ccExtra.unlockRead(); } +rendinst::AutoLockReadPrimaryAndExtra::AutoLockReadPrimaryAndExtra() { rendinst::ccExtra.lockRead(); } + +rendinst::AutoLockReadPrimaryAndExtra::~AutoLockReadPrimaryAndExtra() { rendinst::ccExtra.unlockRead(); } + int rendinst::getRIGenMaterialId(const RendInstDesc &desc, bool need_lock) { int pool = desc.isRiExtra() ? rendinst::riExtra[desc.pool].riPoolRef : desc.pool; @@ -493,6 +495,7 @@ void rendinst::build_ri_gen_thread_accel(RiGenVisibility *visibility, dag::Vecto void rendinst::foreachRiGenInstance(RiGenVisibility *visibility, RiGenIterator callback, void *user_data, const dag::Vector &accel1, const dag::Vector &accel2, volatile int &cursor1, volatile int &cursor2) { + rendinst::AutoLockReadPrimary lock; for (int index = interlocked_increment(cursor1) - 1; index < accel1.size(); index = interlocked_increment(cursor1) - 1) { TIME_PROFILE(process_lod_1); diff --git a/prog/gameLibs/rendInst/rendInstGenExtra.cpp b/prog/gameLibs/rendInst/rendInstGenExtra.cpp index 5c83b4085..5aa2faf35 100644 --- a/prog/gameLibs/rendInst/rendInstGenExtra.cpp +++ b/prog/gameLibs/rendInst/rendInstGenExtra.cpp @@ -661,6 +661,7 @@ static void update_ri_extra_game_resources(const char *ri_res_name, int id, Rend static int enable_hmap_blend_variable_id = VariableMap::getVariableId("enable_hmap_blend"); static int material_pn_triangulation_variable_id = VariableMap::getVariableId("material_pn_triangulation"); static int draw_grass_variable_id = VariableMap::getVariableId("draw_grass"); + static int material_grassify_variable_id = VariableMap::getVariableId("material_grassify"); static int ri_landclass_indexVarId = VariableMap::getVariableId("ri_landclass_index"); bool isPoolRendinstLandclass = false; @@ -743,6 +744,11 @@ static void update_ri_extra_game_resources(const char *ri_res_name, int id, Rend int drawGrass = 0; riExtra[id].usedInLandmaskHeight |= elems[elemNo].mat->getIntVariable(draw_grass_variable_id, drawGrass) && drawGrass; + + int materialGrassify = 0; + riExtra[id].isGrassify |= + elems[elemNo].mat->getIntVariable(material_grassify_variable_id, materialGrassify) && materialGrassify; + if (riExtra[id].isRendinstClipmap) { hasRiClipmap = rendinst::HasRIClipmap::YES; diff --git a/prog/gameLibs/rendInst/render/extra/riExtraRendererT.h b/prog/gameLibs/rendInst/render/extra/riExtraRendererT.h index cbf05f05e..27597c3e6 100644 --- a/prog/gameLibs/rendInst/render/extra/riExtraRendererT.h +++ b/prog/gameLibs/rendInst/render/extra/riExtraRendererT.h @@ -214,7 +214,7 @@ class RiExtraRendererT : public DynamicVariantsPolicy //-V730 d3d_err(d3d::setind(unitedvdata::riUnitedVdata.getIB())); RiShaderConstBuffers cb; - cb.setInstancing(0, 4, 1, 0); + cb.setInstancing(0, 4, 0x5, 0); cb.flushPerDraw(); #if USE_DEPTH_PREPASS_FOR_TREES @@ -282,7 +282,7 @@ class RiExtraRendererT : public DynamicVariantsPolicy //-V730 d3d_err(d3d::setind(unitedvdata::riUnitedVdata.getIB())); RiShaderConstBuffers cb; - cb.setInstancing(0, 4, 1, 0); + cb.setInstancing(0, 4, 0x5, 0); cb.flushPerDraw(); int cVbIdx = -1, cStride = 0; @@ -586,6 +586,9 @@ class RiExtraRendererT : public DynamicVariantsPolicy //-V730 if (curVar < 0) continue; + if (!currentShader->checkAndPrefetchMissingTextures()) + continue; + if (elem.vbIdx == unitedvdata::BufPool::IDX_IB) { logwarn("Invalid united VB index in ri='%s', shader='%s', numf=%d", riExtraMap.getName(ri_idx), diff --git a/prog/gameLibs/rendInst/render/riGenRenderer.cpp b/prog/gameLibs/rendInst/render/riGenRenderer.cpp index fc6ab2218..49f3629ec 100644 --- a/prog/gameLibs/rendInst/render/riGenRenderer.cpp +++ b/prog/gameLibs/rendInst/render/riGenRenderer.cpp @@ -710,7 +710,7 @@ void RiGenRenderer::renderPackedObjects(const RendInstGenData::RtData &rt_data, ShaderGlobal::setBlock(ShaderGlobal::getBlock(ShaderGlobal::LAYER_SCENE), ShaderGlobal::LAYER_SCENE); rendinst::render::RiShaderConstBuffers cb; - cb.setInstancing(0, 1, 1, 0); + cb.setInstancing(0, 1, 0x5, 0); cb.flushPerDraw(); bool currentDepthPrepass = false; diff --git a/prog/gameLibs/rendInst/riGen/riExtraPool.h b/prog/gameLibs/rendInst/riGen/riExtraPool.h index 33697b1c2..185e5196d 100644 --- a/prog/gameLibs/rendInst/riGen/riExtraPool.h +++ b/prog/gameLibs/rendInst/riGen/riExtraPool.h @@ -41,6 +41,7 @@ struct RiExtraPool unsigned hasOccluder : 1, largeOccluder : 1, isWalls : 1, useVsm : 1, usedInLandmaskHeight : 1; unsigned patchesHeightmap : 1, usingClipmap : 1; unsigned killsNearEffects : 1, hasTransitionLod : 1; + unsigned isGrassify : 1; uint8_t hideMask = 0; struct ElemMask { @@ -151,6 +152,7 @@ struct RiExtraPool immortal(false), hasColoredShaders(false), isTree(false), + isGrassify(false), hasOccluder(false), largeOccluder(false), isWalls(false), diff --git a/prog/gameLibs/rendInst/visibility/cullJob.h b/prog/gameLibs/rendInst/visibility/cullJob.h index 388da0924..1ef354570 100644 --- a/prog/gameLibs/rendInst/visibility/cullJob.h +++ b/prog/gameLibs/rendInst/visibility/cullJob.h @@ -37,18 +37,21 @@ struct CullJobSharedState class CullJob final : public cpujobs::IJob { - CullJobSharedState *parent = 0; + const CullJobSharedState *parent = 0; int jobIdx = 0; public: - void set(int job_idx, CullJobSharedState *parent_) + void set(int job_idx, const CullJobSharedState *parent_) { jobIdx = job_idx; parent = parent_; } - static inline void perform_job(int job_idx, CullJobSharedState *info) + static inline void perform_job(int job_idx, const CullJobSharedState *info) { + if (job_idx == 0) // First job wakes the rest + threadpool::wake_up_all(); + TIME_PROFILE(parallel_ri_cull_job); mat44f globtm = info->globtm; @@ -63,7 +66,7 @@ class CullJob final : public cpujobs::IJob std::atomic *riexLargeCnt = info->riexLargeCnt; [[maybe_unused]] int tiled_scene_idx = 0; - scene::TiledSceneCullContext *ctx = info->sceneContexts; + const scene::TiledSceneCullContext *ctx = info->sceneContexts; for (const RendinstTiledScene &tiled_scene : info->scenes) { while (!ctx->tilesPassDone.load() || ctx->nextIdxToProcess.load(std::memory_order_relaxed) < ctx->tilesCount) @@ -159,13 +162,7 @@ class CullJob final : public cpujobs::IJob G_FAST_ASSERT(ctx == &info->sceneContexts[++tiled_scene_idx]); } } - virtual void doJob() override - { - if (!parent) - return; - perform_job(jobIdx, parent); - parent = nullptr; - } + void doJob() override { perform_job(jobIdx, parent); } }; } // namespace rendinst diff --git a/prog/gameLibs/rendInst/visibility/cullJobRing.h b/prog/gameLibs/rendInst/visibility/cullJobRing.h index 38c3ad016..06e2c87f5 100644 --- a/prog/gameLibs/rendInst/visibility/cullJobRing.h +++ b/prog/gameLibs/rendInst/visibility/cullJobRing.h @@ -12,37 +12,40 @@ inline constexpr int MAX_CULL_JOBS = 8; struct CullJobRing { - StaticTab jobs; - CullJobSharedState info; + const CullJobSharedState &info; uint32_t queue_pos = 0; threadpool::JobPriority prio = threadpool::PRIO_HIGH; + StaticTab jobs; - void start(int num_jobs, const CullJobSharedState &jinfo) + CullJobRing(int num_jobs, const CullJobSharedState &jinfo) : info(jinfo) { G_FAST_ASSERT(num_jobs > 0); - num_jobs = min(num_jobs - 1, (int)MAX_CULL_JOBS); - info = jinfo; prio = is_main_thread() ? threadpool::PRIO_HIGH : threadpool::PRIO_NORMAL; - jobs.resize(num_jobs); + jobs.resize(min(num_jobs, MAX_CULL_JOBS)); for (int i = 0; i < jobs.size(); ++i) + jobs[i].set(i, &info); + } + void start() + { + for (int i = 0; i < (int)jobs.size() - 1; ++i) { - jobs[i].set(i + 1, &info); + G_FAST_ASSERT(interlocked_relaxed_load(jobs[i].done)); // Either not started yet or already finished threadpool::add(&jobs[i], prio, queue_pos, threadpool::AddFlags::None); } - threadpool::wake_up_all(); + threadpool::wake_up_one(); // Note: rest is woken up by first job } void finishWork() { - CullJob::perform_job(0, &info); - if (jobs.empty()) // could be if 1 worker + jobs.back().doJob(); + if (jobs.size() < 2) return; // Warning: scenes are read locked at this point, so any job that want to grab write lock for it will deadlock - barrier_active_wait_for_job(&jobs.back(), prio, queue_pos); + barrier_active_wait_for_job(&jobs[jobs.size() - 2], prio, queue_pos); DA_PROFILE_WAIT("wait_ri_cull_jobs"); - for (auto &j : jobs) - threadpool::wait(&j); + for (int i = 0; i < (int)jobs.size() - 1; ++i) + threadpool::wait(&jobs[i]); } }; diff --git a/prog/gameLibs/rendInst/visibility/extraVisibility.cpp b/prog/gameLibs/rendInst/visibility/extraVisibility.cpp index 0ec7f712b..a6aff3504 100644 --- a/prog/gameLibs/rendInst/visibility/extraVisibility.cpp +++ b/prog/gameLibs/rendInst/visibility/extraVisibility.cpp @@ -281,14 +281,22 @@ bool rendinst::prepareExtraVisibilityInternal(mat44f_cref globtm_cull, const Poi if (threads) { dag::ConstSpan cscenes = riExTiledScenes.cscenes(firstScene, sceneCount); - scene::TiledSceneCullContext *sceneContexts = - (scene::TiledSceneCullContext *)alloca(sizeof(scene::TiledSceneCullContext) * cscenes.size()); - std::atomic *riexDataCnt = + auto sceneContexts = (scene::TiledSceneCullContext *)alloca(sizeof(scene::TiledSceneCullContext) * cscenes.size()); + auto riexDataCnt = (std::atomic *)alloca(poolInfo.size() * rendinst::RiExtraPool::MAX_LODS * sizeof(std::atomic)); std::atomic *riexLargeCnt = sortLarge ? (std::atomic *)alloca(poolInfo.size() * LARGE_LOD_CNT * sizeof(std::atomic)) : nullptr; - for (int tiled_scene_idx = 0; tiled_scene_idx < cscenes.size(); tiled_scene_idx++) - new (sceneContexts + tiled_scene_idx, _NEW_INPLACE) scene::TiledSceneCullContext; + uint32_t totalTilesCount = 0; // Shared across all contexts + for (auto &ctx : make_span(sceneContexts, cscenes.size())) + { + new (&ctx, _NEW_INPLACE) scene::TiledSceneCullContext(totalTilesCount); + if (threads > 1) //-V547 + { + // To consider: wake up after first scene cull instead? + ctx.wakeUpOnNTiles = (threads - 1) * 12; + ctx.wake_up_cb = [](void *cjr) { ((CullJobRing *)cjr)->start(); }; + } + } memset(riexDataCnt, 0, poolInfo.size() * rendinst::RiExtraPool::MAX_LODS * sizeof(riexDataCnt[0])); if (riexLargeCnt) @@ -311,11 +319,13 @@ bool rendinst::prepareExtraVisibilityInternal(mat44f_cref globtm_cull, const Poi // also we locking rendInst layers locks in correct order because of using active wait { rendinst::AutoLockReadPrimaryAndExtra lock; + + CullJobRing ring(threads, cull_sd); for (int tiled_scene_idx = 0; tiled_scene_idx < cscenes.size(); tiled_scene_idx++) + { sceneContexts[tiled_scene_idx].needToUnlock = cscenes[tiled_scene_idx].lockForRead(); - - CullJobRing ring; - ring.start(threads, cull_sd); + sceneContexts[tiled_scene_idx].wake_up_ctx = ˚ + } for (int lod = 0; lod < rendinst::RiExtraPool::MAX_LODS; ++lod) for (auto &vv : v.riexData[lod]) @@ -324,6 +334,7 @@ bool rendinst::prepareExtraVisibilityInternal(mat44f_cref globtm_cull, const Poi for (int lod = 0; lod < LARGE_LOD_CNT; ++lod) for (auto &vv : v.riexLarge[lod]) vv.resize(vv.capacity()); + for (int tiled_scene_idx = 0; tiled_scene_idx < cscenes.size(); tiled_scene_idx++) { const auto &tiled_scene = cscenes[tiled_scene_idx]; @@ -389,16 +400,13 @@ bool rendinst::prepareExtraVisibilityInternal(mat44f_cref globtm_cull, const Poi for (int tiled_scene_idx = 0; tiled_scene_idx < cscenes.size(); tiled_scene_idx++) sceneContexts[tiled_scene_idx].nextIdxToProcess = 0; - ring.start(threads, cull_sd); + ring.start(); } for (int tiled_scene_idx = 0; tiled_scene_idx < cscenes.size(); tiled_scene_idx++) { - if (sceneContexts[tiled_scene_idx].needToUnlock) - { + if (eastl::exchange(sceneContexts[tiled_scene_idx].needToUnlock, false)) cscenes[tiled_scene_idx].unlockAfterRead(); - sceneContexts[tiled_scene_idx].needToUnlock = 0; - } sceneContexts[tiled_scene_idx].~TiledSceneCullContext(); } } // unlock ri and extra @@ -952,8 +960,20 @@ bool rendinst::prepareRIGenExtraVisibility(mat44f_cref globtm_cull, const Point3 cullIntention, for_visual_collision, filter_rendinst_clipmap, for_vsm, external_filter); } +bool rendinst::prepareRIGenExtraVisibilityForGrassifyBox(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, + RiGenVisibility &vbase, bbox3f *result_box) +{ + return prepareRIGenExtraVisibilityBoxInternal(box_cull, forced_lod, min_size, min_dist, true, vbase, result_box); +} + bool rendinst::prepareRIGenExtraVisibilityBox(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, RiGenVisibility &vbase, bbox3f *result_box) +{ + return prepareRIGenExtraVisibilityBoxInternal(box_cull, forced_lod, min_size, min_dist, false, vbase, result_box); +} + +bool rendinst::prepareRIGenExtraVisibilityBoxInternal(bbox3f_cref box_cull, int forced_lod, float min_size, float min_dist, + bool filter_grassify, RiGenVisibility &vbase, bbox3f *result_box) { if (!RendInstGenData::renderResRequired || !maxExtraRiCount || RendInstGenData::isLoading) return false; @@ -1012,6 +1032,8 @@ bool rendinst::prepareRIGenExtraVisibilityBox(bbox3f_cref box_cull, int forced_l return; const scene::pool_index poolId = scene::get_node_pool(m); const auto &riPool = poolInfo[poolId]; + if (filter_grassify && !riExtra[poolId].isGrassify) + return; if (riPool.distSqLOD[rendinst::RiExtraPool::MAX_LODS - 1] < min_dist_sq) return; const unsigned llm = riPool.lodLimits >> ((ri_game_render_mode + 1) * 8); @@ -1036,3 +1058,69 @@ bool rendinst::prepareRIGenExtraVisibilityBox(bbox3f_cref box_cull, int forced_l return true; } + +void rendinst::filterVisibility(RiGenVisibility &from, RiGenVisibility &to, const VisibilityExternalFilter &external_filter) +{ + TIME_D3D_PROFILE(filter_visibility); + + RiGenExtraVisibility &v = to.riex; + RiGenExtraVisibility &f = from.riex; + v.vbExtraGeneration = INVALID_VB_EXTRA_GEN; + rendinst::setRIGenVisibilityMinLod(&to, from.forcedLod, f.forcedExtraLod); + + const auto &poolInfo = riExTiledScenes.getPools(); + + for (int lod = 0; lod < rendinst::RiExtraPool::MAX_LODS; ++lod) + { + clear_and_resize(v.riexData[lod], poolInfo.size()); + clear_and_resize(v.minSqDistances[lod], poolInfo.size()); + clear_and_resize(v.minAllowedSqDistances[lod], poolInfo.size()); + memset(v.minSqDistances[lod].data(), 0x7f, data_size(v.minSqDistances[lod])); // ~FLT_MAX + memset(v.minAllowedSqDistances[lod].data(), 0x7f, data_size(v.minAllowedSqDistances[lod])); // ~FLT_MAX + for (auto &vv : v.riexData[lod]) + vv.resize(0); + } + v.riexPoolOrder.resize(0); + + int maxLodUsed = 0; + int newVisCnt = 0; + auto storeVisibleRiexData = [&](const vec4f *data, uint32_t poolId, int lod) -> bool { + mat44f riTm44f; + v_mat43_transpose_to_mat44(riTm44f, *(const mat43f *)data); + // riTm44f.col3[3] = 1; // v_mat43_transpose_to_mat44 sets the last column to 0 + + bbox3f box; + v_bbox3_init_empty(box); + v_bbox3_add_transformed_box(box, riTm44f, rendinst::riExtra[poolId].lbb); + + if (!external_filter(box.bmin, box.bmax)) + return false; + + maxLodUsed = max(lod, maxLodUsed); + v.minSqDistances[lod].data()[poolId] = f.minSqDistances[lod].data()[poolId]; + vec4f *addData = append_data(v.riexData[lod].data()[poolId], RIEXTRA_VECS_COUNT); + eastl::copy_n(data, RIEXTRA_VECS_COUNT, addData); + newVisCnt++; + return true; + }; + + for (int lod = 0; lod < rendinst::RiExtraPool::MAX_LODS; ++lod) + { + for (auto poolAndCnt : f.riexPoolOrder) + { + auto poolI = poolAndCnt & render::RI_RES_ORDER_COUNT_MASK; + const uint32_t poolCnt = (uint32_t)f.riexData[lod][poolI].size() / RIEXTRA_VECS_COUNT; + const vec4f *data = f.riexData[lod][poolI].data(); + + for (uint32_t i = 0, n = poolCnt; i < n; ++i) + storeVisibleRiexData(data + i * RIEXTRA_VECS_COUNT, poolI, lod); + } + } + v.riexInstCount = newVisCnt; + + if (!v.riexInstCount) + return; + + sortByPoolSizeOrder(v, maxLodUsed); + return; +} \ No newline at end of file diff --git a/prog/gameLibs/render/daBfg/debug/graphVisualization.cpp b/prog/gameLibs/render/daBfg/debug/graphVisualization.cpp index 3a9186b11..21cb943dd 100644 --- a/prog/gameLibs/render/daBfg/debug/graphVisualization.cpp +++ b/prog/gameLibs/render/daBfg/debug/graphVisualization.cpp @@ -816,6 +816,9 @@ static void visualize_framegraph_dependencies() fg_texture_visualization_imgui_line(registry); + ImGui::SameLine(); + overlay_checkbox("Overlay mode"); + static ImGuiEx::Canvas canvas; static ImVec2 viewOrigin = ImVec2(0.0f, 0.0f); ImVec2 centerView = ImVec2(0.0f, 0.0f); diff --git a/prog/gameLibs/render/daBfg/debug/textureVisualization.cpp b/prog/gameLibs/render/daBfg/debug/textureVisualization.cpp index 79f7cae40..de69899c0 100644 --- a/prog/gameLibs/render/daBfg/debug/textureVisualization.cpp +++ b/prog/gameLibs/render/daBfg/debug/textureVisualization.cpp @@ -6,11 +6,14 @@ #include #include #include +#include static dabfg::NodeHandle debugTextureCopyNode; static UniqueTex copiedTexture; +static bool overlayMode = false; + static const ImVec4 DISABLED_TEXT_COLOR = ImGuiStyle().Colors[ImGuiCol_TextDisabled]; struct AutoShowTexSettings @@ -63,18 +66,41 @@ bool deselect_button(const char *label) return buttonPressed; } -static UniqueTex create_empty_debug_tex(int fmt, int w, int h) { return dag::create_tex(NULL, w, h, fmt, 1, "copied_fg_debug_tex"); } +void overlay_checkbox(const char *label) +{ + ImGui::Checkbox(label, &overlayMode); + ImGui::SameLine(); + String hint(0, "If enabled, the selected texture will be displayed as overlay (similar to render.show_tex).\n" + "If disabled, Texture Debugger window will be opened for the selected texture."); + ImGuiDagor::HelpMarker(hint); +} + +static UniqueTex create_empty_debug_tex(int fmt, int w, int h, const char *name) +{ + return dag::create_tex(nullptr, w, h, fmt, 1, name); +} static const char *get_selected_resource_name(dabfg::ResNameId nameId, const dabfg::InternalRegistry ®istry) { return nameId == dabfg::ResNameId::Invalid ? "None" : registry.knownNames.getName(nameId); } +static void update_texdebug_texture() +{ + if (!savedSelection) + { + texdebug::select_texture(""); + return; + } + + texdebug::select_texture(copiedTexture->getTexName()); +} + // Calculated assuming that fgDebugTexBrightness of 1 corresponds to range limit of 1, // and fgDebugTexBrightness of 10 corresponds to range limit of 0.001. static float brightness_to_range_limit(float brightness) { return pow(10, (1 - brightness) / 3); } -static void update_shown_texture() +static void update_overlay_texture() { if (!savedSelection) { @@ -82,7 +108,8 @@ static void update_shown_texture() return; } - String showTexCommand(0, "render.show_tex copied_fg_debug_tex "); + String showTexCommand(0, "render.show_tex "); + showTexCommand.aprintf(0, "%s ", copiedTexture->getTexName()); if (auto manualSettings = eastl::get_if(&showTexSettings)) { showTexCommand.aprintf(0, "%s", manualSettings->showTexArgs); @@ -107,6 +134,8 @@ static void update_shown_texture() } } +static void update_shown_texture() { overlayMode ? update_overlay_texture() : update_texdebug_texture(); } + void fg_texture_visualization_imgui_line(const dabfg::InternalRegistry ®istry) { ImGui::SameLine(); @@ -209,19 +238,28 @@ static dabfg::NodeHandle makeDebugTextureCopyNode(const Selection &selection, da internalRegistry.nodes[ourId].readResources.clear(); } - return [hndl, fullSelectedResName]() { + return [hndl, fullSelectedResName, shortSelectedResName]() { if (hndl.get()) { + TextureInfo srcInfo; + hndl.view()->getinfo(srcInfo); + if (!copiedTexture) { - TextureInfo texInfo; - hndl.view()->getinfo(texInfo); - copiedTexture = create_empty_debug_tex(TEXFMT_A16B16G16R16F | TEXCF_RTARGET, texInfo.w, texInfo.h); - copiedTextureChannelCount = get_tex_format_desc(texInfo.cflg).channelsCount(); - + String copiedTextureName(0, "%s_copied", shortSelectedResName); + copiedTexture = create_empty_debug_tex(srcInfo.cflg | TEXCF_RTARGET, srcInfo.w, srcInfo.h, copiedTextureName); + copiedTextureChannelCount = get_tex_format_desc(srcInfo.cflg).channelsCount(); runShowTex = true; } - d3d::stretch_rect(hndl.view().getBaseTex(), copiedTexture.getBaseTex()); + else + { + TextureInfo dstInfo; + copiedTexture->getinfo(dstInfo); + G_ASSERTF_RETURN(dstInfo.cflg == (srcInfo.cflg | TEXCF_RTARGET), , + "Source and debug texture formats are different. Debug texture should be recreated."); + } + + copiedTexture.getBaseTex()->update(hndl.view().getBaseTex()); } else logerr("<%s> texture handle returned NULL - no copy was created", fullSelectedResName); @@ -256,6 +294,7 @@ void update_fg_debug_tex(const eastl::optional &selection, dabfg::Int } selectedResourceIsATexture = true; savedSelection = selection; + close_visualization_texture(); debugTextureCopyNode = makeDebugTextureCopyNode(*selection, registry); } else diff --git a/prog/gameLibs/render/daBfg/debug/textureVisualization.h b/prog/gameLibs/render/daBfg/debug/textureVisualization.h index 9aa4ef9c4..998af8aca 100644 --- a/prog/gameLibs/render/daBfg/debug/textureVisualization.h +++ b/prog/gameLibs/render/daBfg/debug/textureVisualization.h @@ -18,6 +18,7 @@ class NodeHandle; } // namespace dabfg bool deselect_button(const char *label); +void overlay_checkbox(const char *label); void fg_texture_visualization_imgui_line(const dabfg::InternalRegistry ®istry); diff --git a/prog/gameLibs/render/daBfg/jamfile b/prog/gameLibs/render/daBfg/jamfile index 6e1c940d5..253ab2f56 100644 --- a/prog/gameLibs/render/daBfg/jamfile +++ b/prog/gameLibs/render/daBfg/jamfile @@ -103,6 +103,7 @@ if $(Config) in dbg dev { engine/imgui engine/imgui/util gameLibs/graphLayouter + gameLibs/render/texDebug ; } else { Sources += debug/backendDebugStub.cpp ; diff --git a/prog/gameLibs/render/denoiser/denoiser.cpp b/prog/gameLibs/render/denoiser/denoiser.cpp index 4407b0f3e..978ce0576 100644 --- a/prog/gameLibs/render/denoiser/denoiser.cpp +++ b/prog/gameLibs/render/denoiser/denoiser.cpp @@ -90,6 +90,8 @@ static ComputeShaderElement *relaxSpecularHistoryFix = nullptr; static ComputeShaderElement *relaxSpecularHistoryClamping = nullptr; static ComputeShaderElement *relaxSpecularATorusSmem = nullptr; static ComputeShaderElement *relaxSpecularATorus = nullptr; +static ComputeShaderElement *relaxSpecularAntiFirefly = nullptr; +static ComputeShaderElement *relaxSpecularCopy = nullptr; static d3d::SamplerHandle samplerNearestClamp = d3d::INVALID_SAMPLER_HANDLE; static d3d::SamplerHandle samplerNearestMirror = d3d::INVALID_SAMPLER_HANDLE; @@ -137,6 +139,7 @@ static int denoiser_spec_confidence_half_resVarId = -1; static int rtao_bindless_slotVarId = -1; static int rtsm_bindless_slotVarId = -1; +static int rtsm_is_translucentVarId = -1; static int csm_bindless_slotVarId = -1; static int csm_sampler_bindless_slotVarId = -1; static int rtr_bindless_slotVarId = -1; @@ -478,6 +481,10 @@ void initialize(int w, int h) relaxSpecularATorusSmem = new_compute_shader("nrd_relax_specular_atorus_smem"); if (!relaxSpecularATorus) relaxSpecularATorus = new_compute_shader("nrd_relax_specular_atorus"); + if (!relaxSpecularAntiFirefly) + relaxSpecularAntiFirefly = new_compute_shader("nrd_relax_specular_anti_firefly"); + if (!relaxSpecularCopy) + relaxSpecularCopy = new_compute_shader("nrd_relax_specular_copy"); if (samplerNearestClamp == d3d::INVALID_SAMPLER_HANDLE) { @@ -543,6 +550,7 @@ void initialize(int w, int h) rtao_bindless_slotVarId = get_shader_variable_id("rtao_bindless_slot"); rtsm_bindless_slotVarId = get_shader_variable_id("rtsm_bindless_slot"); + rtsm_is_translucentVarId = get_shader_variable_id("rtsm_is_translucent"); csm_bindless_slotVarId = get_shader_variable_id("csm_bindless_slot", true); csm_sampler_bindless_slotVarId = get_shader_variable_id("csm_sampler_bindless_slot", true); rtr_bindless_slotVarId = get_shader_variable_id("rtr_bindless_slot"); @@ -647,20 +655,25 @@ static void clear_history_textures() clear_texture(tex); } -void make_shadow_maps(UniqueTex &shadow_value, UniqueTex &denoised_shadow) +static void do_make_shadow_maps(UniqueTex &shadow_value, UniqueTex &denoised_shadow, bool translucent) { shadow_value = dag::create_tex(nullptr, shadow_width, shadow_height, TEXCF_UNORDERED | TEXFMT_G16R16F, 1, "rtsm_value"); - denoised_shadow = - dag::create_tex(nullptr, shadow_width, shadow_height, TEXCF_UNORDERED | TEXCF_RTARGET | TEXFMT_A8R8G8B8, 1, "rtsm_shadows"); + denoised_shadow = dag::create_tex(nullptr, shadow_width, shadow_height, + TEXCF_UNORDERED | TEXCF_RTARGET | (translucent ? TEXFMT_A8R8G8B8 : TEXFMT_R8), 1, "rtsm_shadows"); transient_textures.clear(); clear_history_textures(); clear_texture(denoised_shadow); } +void make_shadow_maps(UniqueTex &shadow_value, UniqueTex &denoised_shadow) +{ + do_make_shadow_maps(shadow_value, denoised_shadow, false); +} + void make_shadow_maps(UniqueTex &shadow_value, UniqueTex &shadow_translucency, UniqueTex &denoised_shadow) { - make_shadow_maps(shadow_value, denoised_shadow); + do_make_shadow_maps(shadow_value, denoised_shadow, true); shadow_translucency = dag::create_tex(nullptr, shadow_width, shadow_height, TEXCF_UNORDERED | TEXFMT_A8R8G8B8, 1, "rtsm_translucency"); @@ -669,8 +682,8 @@ void make_shadow_maps(UniqueTex &shadow_value, UniqueTex &shadow_translucency, U void make_ao_maps(UniqueTex &ao_value, UniqueTex &denoised_ao, bool half_res) { - int width = denoiser::ao_width = half_res ? divide_up(denoiser::render_width, 2) : denoiser::render_width; - int height = denoiser::ao_height = half_res ? divide_up(denoiser::render_height, 2) : denoiser::render_height; + int width = denoiser::ao_width = half_res ? denoiser::render_width / 2 : denoiser::render_width; // TODO: Ceil division. + int height = denoiser::ao_height = half_res ? denoiser::render_height / 2 : denoiser::render_height; // TODO: Ceil division. ao_value = dag::create_tex(nullptr, width, height, TEXCF_UNORDERED | TEXFMT_L16, 1, "rtao_tex_unfiltered"); denoised_ao = dag::create_tex(nullptr, width, height, TEXCF_UNORDERED | TEXFMT_L16, 1, "rtao_tex"); @@ -692,8 +705,8 @@ void make_ao_maps(UniqueTex &ao_value, UniqueTex &denoised_ao, bool half_res) void make_reflection_maps(UniqueTex &reflection_value, UniqueTex &denoised_reflection, ReflectionMethod method, bool half_res) { - int width = denoiser::reflection_width = half_res ? divide_up(denoiser::render_width, 2) : denoiser::render_width; - int height = denoiser::reflection_height = half_res ? divide_up(denoiser::render_height, 2) : denoiser::render_height; + int width = denoiser::reflection_width = half_res ? denoiser::render_width / 2 : denoiser::render_width; // TODO: Ceil division. + int height = denoiser::reflection_height = half_res ? denoiser::render_height / 2 : denoiser::render_height; // TODO: Ceil division. reflection_value = dag::create_tex(nullptr, width, height, TEXCF_UNORDERED | TEXFMT_A16B16G16R16F, 1, "rtr_tex_unfiltered"); denoised_reflection = dag::create_tex(nullptr, width, height, TEXCF_UNORDERED | TEXFMT_A16B16G16R16F, 1, "rtr_tex"); @@ -833,6 +846,8 @@ void teardown() safe_delete(relaxSpecularHistoryClamping); safe_delete(relaxSpecularATorusSmem); safe_delete(relaxSpecularATorus); + safe_delete(relaxSpecularAntiFirefly); + safe_delete(relaxSpecularCopy); normal_roughness.close(); view_z.close(); @@ -1152,6 +1167,7 @@ void denoise_shadow(const ShadowDenoiser ¶ms) d3d::update_bindless_resource(bindless_range + rtsm_bindless_index, params.denoisedShadowMap); d3d::resource_barrier({params.denoisedShadowMap, RB_RO_SRV | RB_STAGE_ALL_SHADERS, 0, 0}); ShaderGlobal::set_int(rtsm_bindless_slotVarId, bindless_range + rtsm_bindless_index); + ShaderGlobal::set_int(rtsm_is_translucentVarId, params.shadowTranslucency ? 1 : 0); if (params.csmTexture) { @@ -2209,6 +2225,60 @@ static void denoise_reflection_relax(const ReflectionDenoiser ¶ms) relaxSpecularHistoryClamping->dispatch(tilesW * 2, tilesH * 2, 1); } + if (params.antiFirefly) + { + { + TIME_D3D_PROFILE(relax::copy); + + struct PassData + { + RelaxSharedConstants relaxSharedConstants; + uint32_t padding; + } passData; + + passData.relaxSharedConstants = relaxSharedConstants; + + static_assert(sizeof(passData) % (4 * sizeof(float)) == 0, + "RelaxSharedConstants size must be multiple of sizeof(float4) for d3d::set_cb0_data"); + + d3d::set_sampler(STAGE_CS, 0, samplerNearestClamp); + d3d::set_sampler(STAGE_CS, 1, samplerLinearClamp); + + d3d::set_cb0_data(STAGE_CS, (const float *)&passData, divide_up(sizeof(passData), 16)); + d3d::set_tex(STAGE_CS, 0, relax_spec_illum_prev.getTex2D(), false); + d3d::set_rwtex(STAGE_CS, 0, params.denoisedReflection, 0, 0); + + relaxSpecularCopy->dispatch(tilesW * 2, tilesH * 2, 1); + } + + { + TIME_D3D_PROFILE(relax::anti_firefly); + + struct PassData + { + RelaxSharedConstants relaxSharedConstants; + uint32_t padding; + } passData; + + passData.relaxSharedConstants = relaxSharedConstants; + + static_assert(sizeof(passData) % (4 * sizeof(float)) == 0, + "RelaxSharedConstants size must be multiple of sizeof(float4) for d3d::set_cb0_data"); + + d3d::set_sampler(STAGE_CS, 0, samplerNearestClamp); + d3d::set_sampler(STAGE_CS, 1, samplerLinearClamp); + + d3d::set_cb0_data(STAGE_CS, (const float *)&passData, divide_up(sizeof(passData), 16)); + d3d::set_tex(STAGE_CS, 0, tiles, false); + d3d::set_tex(STAGE_CS, 1, params.denoisedReflection, false); + d3d::set_tex(STAGE_CS, 2, normalRoughness, false); + d3d::set_tex(STAGE_CS, 3, viewZ, false); + d3d::set_rwtex(STAGE_CS, 0, relax_spec_illum_prev.getTex2D(), 0, 0); + + relaxSpecularAntiFirefly->dispatch(tilesW * 2, tilesH * 2, 1); + } + } + struct ATorusData { RelaxSharedConstants relaxSharedConstants; diff --git a/prog/gameLibs/render/denoiser/shaders/relax_specular.dshl b/prog/gameLibs/render/denoiser/shaders/relax_specular.dshl index fc1833e8a..deee2fdb0 100644 --- a/prog/gameLibs/render/denoiser/shaders/relax_specular.dshl +++ b/prog/gameLibs/render/denoiser/shaders/relax_specular.dshl @@ -68,6 +68,24 @@ shader nrd_relax_specular_atorus compile("cs_6_5", "main"); } +shader nrd_relax_specular_copy +{ + hlsl(cs) { + #include "RELAX_Specular_Copy.cs.hlsl" + } + + compile("cs_6_5", "main"); +} + +shader nrd_relax_specular_anti_firefly +{ + hlsl(cs) { + #include "RELAX_Specular_AntiFirefly.cs.hlsl" + } + + compile("cs_6_5", "main"); +} + shader nrd_relax_validation { hlsl (cs) { diff --git a/prog/gameLibs/render/dynmodelRenderer/dynmodelRenderer.cpp b/prog/gameLibs/render/dynmodelRenderer/dynmodelRenderer.cpp index 7c6a30542..7764a1ed1 100644 --- a/prog/gameLibs/render/dynmodelRenderer/dynmodelRenderer.cpp +++ b/prog/gameLibs/render/dynmodelRenderer/dynmodelRenderer.cpp @@ -1243,7 +1243,9 @@ void set_local_offset_hint(const Point3 &hint) { localOffsetHint = hint; } void enable_separate_atest_pass(bool enable) { separateAtestPass = enable; } +ShaderElement *get_replaced_shader() { return replacement_shader; } void replace_shader(ShaderElement *element) { replacement_shader = element; } +const Tab &get_filtered_material_names() { return filtered_material_names; } void set_material_filters_by_name(Tab &&material_names) { filtered_material_names = std::move(material_names); } void render_one_instance(const DynamicRenderableSceneInstance *instance, RenderMode mode, TexStreamingContext texCtx, diff --git a/prog/gameLibs/render/grassify.cpp b/prog/gameLibs/render/grassify.cpp index e3d1363d9..d40ee04df 100644 --- a/prog/gameLibs/render/grassify.cpp +++ b/prog/gameLibs/render/grassify.cpp @@ -60,16 +60,31 @@ struct GrassGenerateHelper GrassGenerateHelper(float distance, float viewSize) : distance(distance), viewSize(viewSize) { texelSize = (distance * 2.0f) / viewSize; - - rendinstVisibility = rendinst::createRIGenVisibility(midmem); - rendinst::setRIGenVisibilityMinLod(rendinstVisibility, 0, 2); - rendinst::setRIGenVisibilityRendering(rendinstVisibility, rendinst::VisibilityRenderingFlag::Static); }; - ~GrassGenerateHelper() { rendinst::destroyRIGenVisibility(rendinstVisibility); } + void initGrassifyRendinst() + { + if (!globalVis) + globalVis = rendinst::createRIGenVisibility(midmem); + + if (!frameVis) + frameVis = rendinst::createRIGenVisibility(midmem); + + rendinst::setRIGenVisibilityMinLod(globalVis, 0, 2); + rendinst::setRIGenVisibilityRendering(globalVis, rendinst::VisibilityRenderingFlag::Static); + const real max = 1e10; + bbox3f boxCull = v_ldu_bbox3(BBox3(Point3(-max, -max, -max), Point3(max, max, max))); + rendinst::prepareRIGenExtraVisibilityForGrassifyBox(boxCull, 3, 0, 0, *globalVis); + } + + ~GrassGenerateHelper() + { + rendinst::destroyRIGenVisibility(globalVis); + rendinst::destroyRIGenVisibility(frameVis); + } void generate(const Point3 &position, const IPoint2 &grassOffset, const IPoint2 &grassMaskSize, float grassMaskTexelSize, - const TMatrix &view_itm, const GPUGrassBase &gpuGrassBase); + const TMatrix &view_itm, Driver3dPerspective perspective, const GPUGrassBase &gpuGrassBase); void render(const Point3 &position, const TMatrix &view_itm, const GPUGrassBase &gpuGrassBase); private: @@ -80,7 +95,8 @@ struct GrassGenerateHelper float distance; float viewSize; float texelSize; - RiGenVisibility *rendinstVisibility = nullptr; + RiGenVisibility *globalVis = nullptr; + RiGenVisibility *frameVis = nullptr; int rendinstGrassifySceneBlockId = ShaderGlobal::getBlockId("rendinst_grassify_scene"); }; @@ -117,8 +133,11 @@ TMatrix4 GrassGenerateHelper::getProjectionMatrix(const Point3 &position) const } void GrassGenerateHelper::generate(const Point3 &position, const IPoint2 &grassMaskOffset, const IPoint2 &grassMaskSize, - float grassMaskTexelSize, const TMatrix &, const GPUGrassBase &gpuGrassBase) + float grassMaskTexelSize, const TMatrix &itm, Driver3dPerspective perspective, const GPUGrassBase &gpuGrassBase) { + if (!globalVis) + return; + TIME_D3D_PROFILE(grassify_generate); IPoint2 positionTC = IPoint2(position.x / texelSize, position.z / texelSize); @@ -126,12 +145,13 @@ void GrassGenerateHelper::generate(const Point3 &position, const IPoint2 &grassM Point3 alignedCenterPos = Point3(position2D.x, position.y, position2D.y); Point2 grassMaskDistance = Point2(grassMaskSize) * grassMaskTexelSize; - bbox3f boxCull = v_ldu_bbox3(BBox3(alignedCenterPos, distance * 2)); - // box visibility, skip small ri - bbox3f actualBox; + TMatrix4 projTm; + // Fix far to cull based on distance. + perspective.zf = distance; + d3d::calcproj(perspective, projTm); + Frustum frustum(TMatrix4(inverse(itm)) * projTm); + rendinst::filterVisibility(*globalVis, *frameVis, [&frustum](vec4f min, vec4f max) { return frustum.testBox(min, max); }); - rendinst::prepareRIGenExtraVisibilityBox(boxCull, 3, 0, 0, *rendinstVisibility, &actualBox); - if (v_bbox3_test_box_intersect_safe(actualBox, boxCull)) { SCOPE_VIEW_PROJ_MATRIX; @@ -156,7 +176,7 @@ void GrassGenerateHelper::generate(const Point3 &position, const IPoint2 &grassM ); // ShaderGlobal::set_color4(grass_grid_paramsVarId, alignedCenterPos.x, alignedCenterPos.y, currentGridSize, quadSize); - rendinst::render::renderRIGen(rendinst::RenderPass::Grassify, rendinstVisibility, orthonormalized_inverse(vtm), + rendinst::render::renderRIGen(rendinst::RenderPass::Grassify, frameVis, orthonormalized_inverse(vtm), rendinst::LayerFlag::Opaque, rendinst::OptimizeDepthPass::No, 3); }; @@ -188,8 +208,10 @@ Grassify::Grassify(const DataBlock &, int grassMaskResolution, float grassDistan grassGenHelper = eastl::make_unique(grassDistance, grassMaskResolution); } -void Grassify::generate(const Point3 &pos, const TMatrix &view_itm, Texture *grass_mask, IRandomGrassRenderHelper &grassRenderHelper, - const GPUGrassBase &gpuGrassBase) +void Grassify::initGrassifyRendinst() { grassGenHelper->initGrassifyRendinst(); } + +void Grassify::generate(const Point3 &pos, const TMatrix &view_itm, const Driver3dPerspective &perspective, Texture *grass_mask, + IRandomGrassRenderHelper &grassRenderHelper, const GPUGrassBase &gpuGrassBase) { if (!grassMaskHelper) generateGrassMask(grassRenderHelper); @@ -201,7 +223,7 @@ void Grassify::generate(const Point3 &pos, const TMatrix &view_itm, Texture *gra grassMaskHelper->maskTex.setVar(); grassMaskHelper->colorTex.setVar(); - grassGenHelper->generate(pos, grassMaskHelper->offset, grassMaskHelper->maskSize, grassMaskHelper->texelSize, view_itm, + grassGenHelper->generate(pos, grassMaskHelper->offset, grassMaskHelper->maskSize, grassMaskHelper->texelSize, view_itm, perspective, gpuGrassBase); } diff --git a/prog/gameLibs/render/mobile_ssao.cpp b/prog/gameLibs/render/mobile_ssao.cpp index 95a39fb08..5b5f92067 100644 --- a/prog/gameLibs/render/mobile_ssao.cpp +++ b/prog/gameLibs/render/mobile_ssao.cpp @@ -8,14 +8,16 @@ #include #include #include +#include #include - +#include #define GLOBAL_VARS_LIST \ VAR(ssao_tex) \ VAR(ssao_radius_factor) \ - VAR(ssao_texel_offset) + VAR(ssao_texel_offset) \ + VAR(ssao_gbuf_prev_globtm_no_ofs_psf) #define VAR(a) static int a##VarId = -1; GLOBAL_VARS_LIST @@ -95,8 +97,48 @@ void MobileSSAORenderer::applyBlur() ssaoBlurRenderer->render(); } -void MobileSSAORenderer::render(const TMatrix &, const TMatrix4 &, BaseTexture *ssaoDepthTexUse, const ManagedTex *ssao_tex, - const ManagedTex *prev_ssao_tex, const ManagedTex *tmp_tex, const DPoint3 *, SubFrameSample) +void set_shadervars_for_reprojection(const TMatrix4 &prev_glob_tm, const DPoint3 &prev_world_pos, const DPoint3 &world_pos) +{ + const DPoint3 move = world_pos - prev_world_pos; + + double reprojected_world_pos_d[4] = {(double)prev_glob_tm[0][0] * move.x + (double)prev_glob_tm[0][1] * move.y + + (double)prev_glob_tm[0][2] * move.z + (double)prev_glob_tm[0][3], + prev_glob_tm[1][0] * move.x + (double)prev_glob_tm[1][1] * move.y + (double)prev_glob_tm[1][2] * move.z + + (double)prev_glob_tm[1][3], + prev_glob_tm[2][0] * move.x + (double)prev_glob_tm[2][1] * move.y + (double)prev_glob_tm[2][2] * move.z + + (double)prev_glob_tm[2][3], + prev_glob_tm[3][0] * move.x + (double)prev_glob_tm[3][1] * move.y + (double)prev_glob_tm[3][2] * move.z + + (double)prev_glob_tm[3][3]}; + + float reprojected_world_pos[4] = {(float)reprojected_world_pos_d[0], (float)reprojected_world_pos_d[1], + (float)reprojected_world_pos_d[2], (float)reprojected_world_pos_d[3]}; + + TMatrix4 prev_glob_tm_ofs = prev_glob_tm; + prev_glob_tm_ofs.setcol(3, reprojected_world_pos[0], reprojected_world_pos[1], reprojected_world_pos[2], reprojected_world_pos[3]); + + ShaderGlobal::set_float4x4(ssao_gbuf_prev_globtm_no_ofs_psfVarId, prev_glob_tm_ofs); +} + +void MobileSSAORenderer::setReprojection(const TMatrix &view_tm, const TMatrix4 &proj_tm) +{ + TMatrix4 viewRot = TMatrix4(view_tm); + + TMatrix4D viewRotInv; + double det; + inverse44(TMatrix4D(viewRot), viewRotInv, det); + const DPoint3 worldPos = DPoint3(viewRotInv.m[3][0], viewRotInv.m[3][1], viewRotInv.m[3][2]); + + set_shadervars_for_reprojection(reprojectionData.prevGlobTm, reprojectionData.prevWorldPos, worldPos); + + viewRot.setrow(3, 0.0f, 0.0f, 0.0f, 1.0f); + const TMatrix4 globTm = (viewRot * proj_tm).transpose(); + + reprojectionData.prevGlobTm = globTm; + reprojectionData.prevWorldPos = worldPos; +} + +void MobileSSAORenderer::render(const TMatrix &view_tm, const TMatrix4 &proj_tm, BaseTexture *ssaoDepthTexUse, + const ManagedTex *ssao_tex, const ManagedTex *prev_ssao_tex, const ManagedTex *tmp_tex, const DPoint3 *, SubFrameSample) { TIME_D3D_PROFILE(SSAO_total) SCOPE_RENDER_TARGET; @@ -113,6 +155,8 @@ void MobileSSAORenderer::render(const TMatrix &, const TMatrix4 &, BaseTexture * setFrameNo(); + set_viewvecs_to_shader(view_tm, proj_tm); + { TIME_D3D_PROFILE(SSAO_render) renderSSAO(ssaoDepthTexUse); diff --git a/prog/gameLibs/render/rtao/rtao.cpp b/prog/gameLibs/render/rtao/rtao.cpp index 76fdd1af2..4134a8c19 100644 --- a/prog/gameLibs/render/rtao/rtao.cpp +++ b/prog/gameLibs/render/rtao/rtao.cpp @@ -29,14 +29,22 @@ static int inv_proj_tmVarId = -1; static int rtao_targetVarId = -1; static int rtao_frame_indexVarId = -1; static int rtao_hit_dist_paramsVarId = -1; -static int rtao_resolutionVarId = -1; static int rtao_resolutionIVarId = -1; static int ssao_texVarId = -1; static int rtao_bindless_slotVarId = -1; static int rtao_res_mulVarId = -1; static int downsampled_close_depth_texVarId = -1; -static float ray_length = 3; +static constexpr float ray_length_min = 0.01f; +static constexpr float ray_length_max = 10; +static constexpr float distance_factor_min = 0.01; +static constexpr float distance_factor_max = 5; +static constexpr float scatter_factor_min = 0; +static constexpr float scatter_factor_max = 50; +static constexpr float roughness_factor_min = -50.0; +static constexpr float roughness_factor_max = 0; + +static float ray_length = -1; static float distance_factor = 1; static float scatter_factor = 20.0; static float roughness_factor = -25.0; @@ -48,7 +56,6 @@ void initialize(bool half_res) rtao_frame_indexVarId = get_shader_variable_id("rtao_frame_index"); rtao_hit_dist_paramsVarId = get_shader_variable_id("rtao_hit_dist_params"); - rtao_resolutionVarId = get_shader_variable_id("rtao_resolution"); rtao_resolutionIVarId = get_shader_variable_id("rtao_resolutionI"); rtao_targetVarId = get_shader_variable_id("rtao_target"); inv_proj_tmVarId = get_shader_variable_id("inv_proj_tm"); @@ -64,6 +71,20 @@ void initialize(bool half_res) denoised_ao.close(); denoiser::make_ao_maps(ao_value, denoised_ao, half_res); + + if (ray_length <= 0) + { + auto gfx = ::dgs_get_settings()->getBlockByNameEx("graphics"); + ray_length = gfx->getReal("rtaoRayLength", 0.95f); + distance_factor = gfx->getReal("rtaoDistanceFactor", 1); + scatter_factor = gfx->getReal("rtaoScatterFactor", 20); + roughness_factor = gfx->getReal("rtaoRoughnessFactor", -25); + + ray_length = clamp(ray_length, ray_length_min, ray_length_max); + distance_factor = clamp(distance_factor, distance_factor_min, distance_factor_max); + scatter_factor = clamp(scatter_factor, scatter_factor_min, scatter_factor_max); + roughness_factor = clamp(roughness_factor, roughness_factor_min, roughness_factor_max); + } } template @@ -100,7 +121,6 @@ void render(bvh::ContextId context_id, const TMatrix4 &proj_tm, bool performance ShaderGlobal::set_texture(rtao_targetVarId, ao_value.getTexId()); ShaderGlobal::set_int(rtao_frame_indexVarId, denoiser::get_frame_number()); ShaderGlobal::set_color4(rtao_hit_dist_paramsVarId, hitDistParams); - ShaderGlobal::set_color4(rtao_resolutionVarId, ti.w, ti.h); ShaderGlobal::set_int4(rtao_resolutionIVarId, ti.w, ti.h, 0, 0); ShaderGlobal::set_texture(downsampled_close_depth_texVarId, half_depth); @@ -124,10 +144,10 @@ static void imguiWindow() if (!denoised_ao) return; - ImGui::SliderFloat("Ray length", &ray_length, 0.01f, 10); - ImGui::SliderFloat("Distance factor", &distance_factor, 0.01, 5); - ImGui::SliderFloat("Scatter factor", &scatter_factor, 0, 50); - ImGui::SliderFloat("Roughness factor", &roughness_factor, -50, 0); + ImGui::SliderFloat("Ray length", &ray_length, ray_length_min, ray_length_max); + ImGui::SliderFloat("Distance factor", &distance_factor, distance_factor_min, distance_factor_max); + ImGui::SliderFloat("Scatter factor", &scatter_factor, scatter_factor_min, scatter_factor_max); + ImGui::SliderFloat("Roughness factor", &roughness_factor, roughness_factor_min, roughness_factor_max); ImGuiDagor::Image(denoised_ao.getTexId(), denoised_ao.getTex2D()); } diff --git a/prog/gameLibs/render/rtao/shaders/rtao.dshl b/prog/gameLibs/render/rtao/shaders/rtao.dshl index adb0fa34b..1424b2c73 100644 --- a/prog/gameLibs/render/rtao/shaders/rtao.dshl +++ b/prog/gameLibs/render/rtao/shaders/rtao.dshl @@ -10,7 +10,6 @@ texture rtao_target; int rtao_frame_index; float4 rtao_hit_dist_params; -float4 rtao_resolution; int4 rtao_resolutionI = (1,1,1,1); int rtao_res_mul = 1; @@ -31,7 +30,7 @@ shader rt_ao inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; resolution@u2 = rtao_resolutionI.xy; - inv_resolution@f2 = (1.0 / rtao_resolution.x, 1.0 / rtao_resolution.y); + inv_aligned_resolution@f2 = (rtao_res_mul*screen_pos_to_texcoord.xy); hit_dist_params@f4 = rtao_hit_dist_params; frame_index@i1 = rtao_frame_index; output@uav = rtao_target hlsl { RWTexture2D output@uav; }; @@ -120,7 +119,7 @@ shader rt_ao } float w = linearize_z(rawDepth, zn_zfar.zw); - float underwaterFade = calc_underwater_fade(w, rayIndex, inv_resolution, world_view_pos); + float underwaterFade = calc_underwater_fade(w, rayIndex, inv_aligned_resolution, world_view_pos); BRANCH if (underwaterFade == 0) @@ -133,14 +132,14 @@ shader rt_ao bool isGrass = gbuffer.isGrass; float seed = outputIndex.x + outputIndex.y * 3.43121412313 + frac(1.12345314312 * (frame_index % MAX_ACCUM_DENOISE_FRAMES)); - float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); + float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_aligned_resolution); float3 normal = gbuffer.normal; if (!isGrass) { ##if rtao_res_mul == on - normal = calc_geometry_normal_half(rayIndex, inv_resolution, resolution); + normal = calc_geometry_normal_half(rayIndex, inv_aligned_resolution, resolution); ##else - normal = calc_geometry_normal(rayIndex, inv_resolution, resolution); + normal = calc_geometry_normal(rayIndex, inv_aligned_resolution, resolution); ##endif } float3 sampleDir = cosine_sample_hemisphere(normal, seed); diff --git a/prog/gameLibs/render/rtao/shaders/rtao_use.dshl b/prog/gameLibs/render/rtao/shaders/rtao_use.dshl index feef1d28b..39f842f57 100644 --- a/prog/gameLibs/render/rtao/shaders/rtao_use.dshl +++ b/prog/gameLibs/render/rtao/shaders/rtao_use.dshl @@ -46,10 +46,12 @@ macro USING_RTAO(stage, rtao_tex_space) float getRTAO(uint2 tci) { float2 uv = (tci.xy + 0.5) * inv_output_resolution; - float2 texelPos = frac(uv * output_resolutionF); - uint2 crd = uint2(uv * output_resolutionF); + float2 unnormalizedUv = uv * output_resolutionF; + float2 unnormalizedUvOfs = unnormalizedUv - 0.5; + float2 texelPos = frac(unnormalizedUvOfs); + uint2 crd = uint2(unnormalizedUvOfs); - float tl = texture2DAt(rt_texture_outputs[rtao_bindless_slot], crd).r; + float tl = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd, output_resolutionI - 1)).r; // TODO: Remove "min" when we ceil resolution scaling (only this line). float tr = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(1, 0), output_resolutionI - 1)).r; float bl = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(0, 1), output_resolutionI - 1)).r; float br = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(1, 1), output_resolutionI - 1)).r; diff --git a/prog/gameLibs/render/rtr/rtr.cpp b/prog/gameLibs/render/rtr/rtr.cpp index 716d54481..86448b552 100644 --- a/prog/gameLibs/render/rtr/rtr.cpp +++ b/prog/gameLibs/render/rtr/rtr.cpp @@ -84,6 +84,7 @@ static denoiser::ReflectionMethod output_type = denoiser::ReflectionMethod::Rela static bool performance_mode = true; static bool checkerboard = true; static bool show_validation = false; +static bool use_anti_firefly = false; static bool use_nrd_lib = false; static d3d::SamplerHandle linear_sampler = d3d::INVALID_SAMPLER_HANDLE; @@ -282,6 +283,7 @@ void render(bvh::ContextId context_id, const TMatrix4 &proj_tm, bool rt_shadow, params.reflectionValue = reflection_value.getTex2D(); params.performanceMode = performance_mode; params.validationTexture = show_validation ? validation_texture.getTex2D() : nullptr; + params.antiFirefly = use_anti_firefly; params.checkerboard = rtr::checkerboard; params.useNRDLib = use_nrd_lib; params.highSpeedMode = high_speed_mode; @@ -348,6 +350,7 @@ static void imguiWindow() ImGui::Checkbox("Show validation layer", &show_validation); ImGui::Checkbox("Use NRD library", &use_nrd_lib); + ImGui::Checkbox("Use anti firefly", &use_anti_firefly); if (oldType != output_type) { diff --git a/prog/gameLibs/render/rtr/shaders/rtr.dshl b/prog/gameLibs/render/rtr/shaders/rtr.dshl index 6504a20b6..57c4257a6 100644 --- a/prog/gameLibs/render/rtr/shaders/rtr.dshl +++ b/prog/gameLibs/render/rtr/shaders/rtr.dshl @@ -70,7 +70,7 @@ shader rt_reflection_classify world_view_pos@f3 = world_view_pos; resolution@u2 = rtr_resolutionI.xy; tilesResolution@i2 = rtr_resolutionI.zw; - inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); + inv_aligned_resolution@f2 = (rtr_res_mul*screen_pos_to_texcoord.xy); classify_tresholds@f3 = rtr_classify_tresholds; frame_index@i1 = rtr_frame_index; output@uav = rtr_tiles hlsl { RWTexture2D output@uav; }; @@ -142,7 +142,7 @@ shader rt_reflection_classify if (rawDepth > 0) { float w = linearize_z(rawDepth, zn_zfar.zw); - half underwaterFade = calc_underwater_fade(w, dtid, inv_resolution, world_view_pos); + half underwaterFade = calc_underwater_fade(w, dtid, inv_aligned_resolution, world_view_pos); uint sampleCount = 0; @@ -153,14 +153,14 @@ shader rt_reflection_classify float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(texture2DAt(nr_texture, rayIndex)); half smoothness = 1.0 - surfaceNormal_roughness.w; - float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); + float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_aligned_resolution); half3 toPoint = (half3)normalize(relPos); half3 surfaceNormal = (half3)normalize(surfaceNormal_roughness.xyz); if (rtr_res_mul > 1) - gbuffer.albedo = albedo_gbuf_read.SampleLevel(rtsm_linear_sampler, (rayIndex + .5f) * inv_resolution, 0).rgb; + gbuffer.albedo = albedo_gbuf_read.SampleLevel(rtsm_linear_sampler, (rayIndex + .5f) * inv_aligned_resolution, 0).rgb; - float3 worldPos = calc_world_pos(dtid, w, inv_resolution, world_view_pos); + float3 worldPos = calc_world_pos(dtid, w, inv_aligned_resolution, world_view_pos); apply_env_wetness(worldPos, surfaceNormal, -toPoint, gbuffer.material, gbuffer.albedo, smoothness, surfaceNormal, gbuffer.reflectance); half roughness = 1.0 - smoothness; @@ -208,7 +208,7 @@ shader rt_reflection_sample world_view_pos@f3 = world_view_pos; resolution@u2 = rtr_resolutionI; tilesResolution@u2 = rtr_resolutionI.zw; - inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); + inv_aligned_resolution@f2 = (rtr_res_mul*screen_pos_to_texcoord.xy); hit_dist_params@f4 = rtr_hit_dist_params; frame_index@i1 = rtr_frame_index; output@uav = rtr_target hlsl { RWTexture2D output@uav; }; @@ -295,11 +295,11 @@ shader rt_reflection_sample return; float w = linearize_z(rawDepth, zn_zfar.zw); - half underwaterFade = calc_underwater_fade(w, rayIndex, inv_resolution, world_view_pos); + half underwaterFade = calc_underwater_fade(w, rayIndex, inv_aligned_resolution, world_view_pos); - UnpackedGbuffer gbuffer = unpackGbuffer(loadPackedGbuffer(rayIndex)); + UnpackedGbuffer gbuffer = unpackGbuffer(loadPackedGbuffer(rayIndex * rtr_res_mul)); half roughness = linearSmoothnessToLinearRoughness(gbuffer.smoothness); - float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); + float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_aligned_resolution); half3 toPoint = (half3)normalize(relPos); half3 surfaceNormal = (half3) normalize(gbuffer.normal); half3 reflectionVector = reflect(toPoint, surfaceNormal); @@ -365,7 +365,7 @@ shader rt_reflection world_view_pos@f3 = world_view_pos; resolution@u2 = rtr_resolutionI; tilesResolution@u2 = rtr_resolutionI.zw; - inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); + inv_aligned_resolution@f2 = (rtr_res_mul*screen_pos_to_texcoord.xy); hit_dist_params@f4 = rtr_hit_dist_params; rough_ray_length@f1 = rtr_rough_ray_length; frame_index@i1 = rtr_frame_index; @@ -496,7 +496,7 @@ shader rt_reflection bool isUnstable = bvhFlags & BVH_UNSTABLE; bool isGrass = bvhFlags & BVH_GRASS; - float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); + float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_aligned_resolution); half3 toPoint = (half3)normalize(relPos); float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(texture2DAt(nr_texture, rayIndex)); @@ -507,7 +507,7 @@ shader rt_reflection half3 sampleDir = get_scattered_reflection_vector(reflectionVector, seed, roughness); if (!isGrass) { - normal = rtr_res_mul > 1 ? calc_geometry_normal_half(rayIndex, inv_resolution, resolution) : calc_geometry_normal(rayIndex, inv_resolution, resolution); + normal = rtr_res_mul > 1 ? calc_geometry_normal_half(rayIndex, inv_aligned_resolution, resolution) : calc_geometry_normal(rayIndex, inv_aligned_resolution, resolution); half SoN = dot(normal, sampleDir); // The ray points into the surface, lets mirror it to the surface if (SoN < 0) diff --git a/prog/gameLibs/render/rtr/shaders/rtr_use.dshl b/prog/gameLibs/render/rtr/shaders/rtr_use.dshl index 20c22f658..4f7515879 100644 --- a/prog/gameLibs/render/rtr/shaders/rtr_use.dshl +++ b/prog/gameLibs/render/rtr/shaders/rtr_use.dshl @@ -54,21 +54,23 @@ macro USING_RTR(stage) float3 getRTR(uint2 tci) { float2 uv = (tci.xy + 0.5) * inv_output_resolution_rt; - float2 texelPos = frac(uv * resolutionF_rt); - uint2 crd = uint2(uv * resolutionF_rt); + float2 unnormalizedUv = uv * resolutionF_rt; + float2 unnormalizedUvOfs = unnormalizedUv - 0.5; + float2 texelPos = frac(unnormalizedUvOfs); + uint2 crd = uint2(unnormalizedUvOfs); float3 tl, tr, bl, br; BRANCH if (rtr_output_type == RTR_REBLUR) { - tl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], crd)).rgb; + tl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd, resolutionI_rt - 1))).rgb; // TODO: Remove "min" when we ceil resolution scaling (only this line). tr = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 0), resolutionI_rt - 1))).rgb; bl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(0, 1), resolutionI_rt - 1))).rgb; br = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 1), resolutionI_rt - 1))).rgb; } else { - tl = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], crd)).rgb; + tl = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd, resolutionI_rt - 1))).rgb; // TODO: Remove "min" when we ceil resolution scaling (only this line). tr = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 0), resolutionI_rt - 1))).rgb; bl = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(0, 1), resolutionI_rt - 1))).rgb; br = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 1), resolutionI_rt - 1))).rgb; diff --git a/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl b/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl index 404367ba4..9d6e1d06a 100644 --- a/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl +++ b/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl @@ -1,4 +1,5 @@ int rtsm_bindless_slot = -1; +int rtsm_is_translucent = 0; int csm_bindless_slot = -1; int csm_sampler_bindless_slot = -1; @@ -7,6 +8,7 @@ macro CHECKING_RTSM(stage) { (stage) { rtsm_bindless_slot@i1 = rtsm_bindless_slot; + rtsm_is_translucent@i1 = rtsm_is_translucent; csm_bindless_slot@i1 = csm_bindless_slot; csm_sampler_bindless_slot@i1 = csm_sampler_bindless_slot; } @@ -46,7 +48,11 @@ macro USING_RTSM(stage) { half4 shadowTexel = texture2DAt(rt_texture_outputs[rtsm_bindless_slot], tci); half4 shadowData = SIGMA_BackEnd_UnpackShadow(shadowTexel); - return lerp(shadowData.yzw, 1.0, shadowData.x); + + if (!rtsm_is_translucent) + return shadowTexel.xxx; + else + return lerp(shadowData.yzw, 1.0, shadowData.x); } } } diff --git a/prog/gameLibs/render/shaders/bloom_ps.dshl b/prog/gameLibs/render/shaders/bloom_ps.dshl index b60bccbc5..71a232052 100644 --- a/prog/gameLibs/render/shaders/bloom_ps.dshl +++ b/prog/gameLibs/render/shaders/bloom_ps.dshl @@ -40,8 +40,6 @@ endmacro shader frame_bloom_downsample, bloom_downsample_hq, bloom_downsample_lq { POSTFX() - INIT_EXPOSURE(ps) - USE_EXPOSURE(ps) if (shader == bloom_downsample_hq) { @@ -78,7 +76,7 @@ shader frame_bloom_downsample, bloom_downsample_hq, bloom_downsample_lq #define THRESHOLD(a) ##elif shader == bloom_downsample_hq const bool bKillFireflies = true; - float ScaledThreshold = bloom_threshold * getInvExposureScale(); // BloomThreshold / Exposure + float ScaledThreshold = bloom_threshold; // BloomThreshold / Exposure #define THRESHOLD(a) {tex2 = tex; tex = max(0, tex - ScaledThreshold);} ##else const bool bKillFireflies = false; diff --git a/prog/gameLibs/render/shaders/monteCarlo.hlsl b/prog/gameLibs/render/shaders/monteCarlo.hlsl index 5b0f050e6..16be221db 100644 --- a/prog/gameLibs/render/shaders/monteCarlo.hlsl +++ b/prog/gameLibs/render/shaders/monteCarlo.hlsl @@ -133,7 +133,7 @@ float4 importance_sample_GGX_NDF( float2 E, float linear_roughness ) H.x = sinTheta * cos( phi ); H.y = sinTheta * sin( phi ); H.z = cosTheta; - + float d = ( cosTheta * m2 - cosTheta ) * cosTheta + 1; float D = m2 / ( PI*d*d ); float PDF = D * cosTheta; @@ -169,45 +169,69 @@ float3 importanceSampleVNDF_GGX_CAPPED(float2 u, float3 wi, float2 ggx_alpha) return normalize(float3(wmStd.xy * ggx_alpha, wmStd.z)); } -#if 0 -// http://jcgt.org/published/0007/04/01/paper.pdf by Eric Heitz -// Input Ve: view direction -// Input alpha_x, alpha_y: ggxroughness parameters -// Input U1, U2: uniform random numbers -// Output Ne: normal sampled with PDF D_Ve(Ne) = G1(Ve) * max(0, dot(Ve, Ne)) * D(Ne) / Ve.z +// https://gpuopen.com/download/publications/Bounded_VNDF_Sampling_for_Smith-GGX_Reflections.pdf +// in tangent space +float3 sampleGGXVNDFBounded(float ggx_alpha, float3 localView, float2 random) +{ + // Stretch the view vector as if roughness==1 + float3 wiStd = normalize(float3(ggx_alpha * localView.xy, localView.z)); + + float phi = 2.0f * PI * random.y; + float a = ggx_alpha; // Use a = saturate(min(ggx_alpha.x, ggx_alpha.y)) for anisotropic roughness. + float s = 1.0f + sign(1.0f - ggx_alpha) * length(float2(localView.x, localView.y)); + float a2 = a * a; + float s2 = s * s; + float k = (1.0f - a2) * s2 / (s2 + a2 * localView.z * localView.z); + float b = localView.z > 0.0f ? k * wiStd.z : wiStd.z; + + float z = mad(-b, random.x, 1.0f - random.x); + float sinTheta = sqrt(saturate(1.0f - z * z)); + float x = sinTheta * cos(phi); + float y = sinTheta * sin(phi); + float3 c = float3(x, y, z); + float3 wmStd = c + wiStd; + + // Convert normal to un-stretched and normalise + return normalize(float3(ggx_alpha * wmStd.xy, wmStd.z)); +} -float3 SampleGGXVNDF(float3 Ve, float alpha_x, float alpha_y, float U1, float U2) +// https://gpuopen.com/download/publications/Bounded_VNDF_Sampling_for_Smith-GGX_Reflections.pdf +// in tangent space + +float sampleGGXVNDFBoundedPDF(float ggx_alpha, float dotNH, float3 localView) { - // Section 3.2: transforming the view direction to the hemisphere configuration - float3 Vh = normalize(float3(alpha_x * Ve.x, alpha_y * Ve.y, Ve.z)); - // Section 4.1: orthonormal basis (with special case if cross product is zero) - float lensq = Vh.x * Vh.x + Vh.y * Vh.y; - float3 T1 = lensq > 0 ? float3(-Vh.y, Vh.x, 0) * rsqrt(lensq) : float3(1, 0, 0); - float3 T2 = cross(Vh, T1); - // Section 4.2: parameterization of the projected area - float r = sqrt(U1); - float phi = 2.0 * PI * U2; - float t1 = r * cos(phi); - float t2 = r * sin(phi); - float s = 0.5 * (1.0 + Vh.z); - t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; - // Section 4.3: reprojection onto hemisphere - float3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh; - // Section 3.4: transforming the normal back to the ellipsoid configuration - float3 Ne = normalize(float3(alpha_x * Nh.x, alpha_y * Nh.y, max(0.0, Nh.z))); - return Ne; + float a2 = ggx_alpha*ggx_alpha; + // GGX distribution + float d = ( dotNH * a2 - dotNH) * dotNH + 1; + float ndf = half(a2 / max(1e-8, d * d)) * 1./PI; + + float2 ai = ggx_alpha * localView.xy; + float len2 = dot(ai, ai); + float t = sqrt(len2 + localView.z * localView.z); + if (localView.z >= 0.0f) + { + float a = ggx_alpha; // Use a = saturate(min(roughnessAlpha.x, roughnessAlpha.y)) for anisotropic roughness. + float s = 1.0f + sign(1.0f - a) * length(float2(localView.x, localView.y)); + float s2 = s * s; + float k = (1.0f - a2) * s2 / (s2 + a2 * localView.z * localView.z); + return ndf / (2.0f * (k * localView.z + t)); + } + return ndf * (t - localView.z) / (2.0f * len2); } + +#if 0 float3 importance_sample_GGX_VNDF( float2 E, float3 Ve, float linear_roughness ) { float ggx_alpha = max(1e-4, linear_roughness*linear_roughness); - return SampleGGXVNDF(Ve, ggx_alpha, ggx_alpha, E.x, E.y); + return importanceSampleVNDF_GGX_CAPPED(E, Ve, ggx_alpha); } #else float3 importance_sample_GGX_VNDF( float2 E, float3 Ve, float linear_roughness ) { float ggx_alpha = max(1e-4, linear_roughness*linear_roughness); - return importanceSampleVNDF_GGX_CAPPED(E, Ve, ggx_alpha); + return sampleGGXVNDFBounded(ggx_alpha, Ve, E); } #endif + #endif \ No newline at end of file diff --git a/prog/gameLibs/render/shaders/ssao_inc.dshl b/prog/gameLibs/render/shaders/ssao_inc.dshl index 313e2590d..35004e6bf 100644 --- a/prog/gameLibs/render/shaders/ssao_inc.dshl +++ b/prog/gameLibs/render/shaders/ssao_inc.dshl @@ -6,7 +6,7 @@ hlsl { int use_ssao_reprojection = 0; interval use_ssao_reprojection : off<1, on; -float4x4 ssao_gbuf_prev_globtm; +float4x4 ssao_gbuf_prev_globtm_no_ofs_psf; texture ssao_tex; float4 lowres_rt_params = (1280, 720, 0, 0); @@ -35,7 +35,7 @@ macro INIT_MINIMUM_SSAO_TEX(stage) (stage) { ssao_tex@tex = ssao_tex hlsl { Texture2D ssao_tex@tex; } } if (use_ssao_reprojection == on) { (stage) { - ssao_gbuf_prev_globtm@f44 = ssao_gbuf_prev_globtm; + ssao_gbuf_prev_globtm_no_ofs_psf@f44 = ssao_gbuf_prev_globtm_no_ofs_psf; } } endmacro diff --git a/prog/gameLibs/render/shaders/ssao_reprojection.dshl b/prog/gameLibs/render/shaders/ssao_reprojection.dshl index 90e2fbf4f..520fec43c 100644 --- a/prog/gameLibs/render/shaders/ssao_reprojection.dshl +++ b/prog/gameLibs/render/shaders/ssao_reprojection.dshl @@ -109,7 +109,7 @@ hlsl(stage) { #if FIX_DISCONTINUTIES float2 historyCrdf = historyUV * prev_downsampled_close_depth_tex_target_size.xy - 0.5; float2 floorCrd = floor(historyCrdf); - float2 gatherUV = (floorCrd + 1.0) * prev_downsampled_close_depth_tex_target_size.zw; + float2 gatherUV = floorCrd*prev_downsampled_close_depth_tex_target_size.zw + prev_downsampled_close_depth_tex_target_size.zw; float2 fractCrd = historyCrdf - floorCrd; float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); diff --git a/prog/gameLibs/render/shaders/ssr_base.dshl b/prog/gameLibs/render/shaders/ssr_base.dshl index 314933224..b900e6f3e 100644 --- a/prog/gameLibs/render/shaders/ssr_base.dshl +++ b/prog/gameLibs/render/shaders/ssr_base.dshl @@ -13,6 +13,19 @@ include "halfres_close_depth_with_normals.dshl" include "motion_vectors_type.dshl" include_optional "ssr_env_resolve.dshl" +hlsl { + #define HIGH_ROUGHNESS_THRESHOLD_END 0.5 + #define HIGH_ROUGHNESS_THRESHOLD_START 0.1 + #define CALC_SSR_ROUGHNESS_THRESHOLD 0.7 + #define CALC_SSR_SMOOTHNESS_THRESHOLD (1-0.7) + // 0 - should be treated perform mirro-like for virtual point reflection + // 1 - should be treated rough-like for virtual point reflection + half get_is_rough_surface_param(half linear_roughness) + { + return saturate(linear_roughness*(1./HIGH_ROUGHNESS_THRESHOLD_END) - HIGH_ROUGHNESS_THRESHOLD_START/(HIGH_ROUGHNESS_THRESHOLD_END-HIGH_ROUGHNESS_THRESHOLD_START)); + } +} + int ssr_quality = 1; interval ssr_quality : low<1, medium<2, high<3, highest; @@ -42,6 +55,12 @@ define_macro_if_not_defined GET_TRANSLUCENT_ALTERNATE_REFLECTIONS(code) } endmacro +define_macro_if_not_defined GET_PLANAR_REFLECTIONS(code) +hlsl(code) { + void get_planar_reflections(inout half4 newTarget, inout float precision, float3 worldPos, float3 normal, float2 screenTC) {} +} +endmacro + macro INIT_TEXTURES(code) if (ssr_resolution == halfres) { INIT_HALF_RES_CLOSE_DEPTH(code) @@ -151,6 +170,7 @@ macro SSR_COMMON(code) INIT_TEXTURES(code) SSR_BASE(code) SSR_REPROJECTION(code) + GET_PLANAR_REFLECTIONS(code) (code) { prev_frame_tex@smp2d = prev_frame_tex; @@ -188,20 +208,72 @@ macro SSR_COMMON(code) } endmacro + macro SSR_DISOCCLUSION(code) hlsl(code) { + #include + half get_ssr_disocclusion_weight_sample(half3 current_normal, half current_roughness, float2 historyUV, float prev_linear_depth, inout half4 historySample) + { + #if USE_PREV_DOWNSAMPLED_CLOSE_DEPTH + // instead of exact uv = floor(historyCrdf)/prev_downsampled_close_depth_tex_target_size.xy + // we rely on prev_downsampled_close_depth_tex_samplerstate being point sample + float2 uv = historyUV; + float2 historyCrdf = historyUV*prev_downsampled_close_depth_tex_target_size.xy - 0.5; + float2 floorCrd = floor(historyCrdf); + float2 gatherUV = floorCrd*prev_downsampled_close_depth_tex_target_size.zw + prev_downsampled_close_depth_tex_target_size.zw; + float2 fractCrd = historyCrdf - floorCrd; + float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + //uv = uv - 0.5*prev_downsampled_close_depth_tex_target_size.zw;// re-center uv + float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); + float4 depthDiff = abs(linearDepths - prev_linear_depth); + float threshold = 0.1*prev_linear_depth; + half4 weights = depthDiff < threshold; + if (any(abs(historyUV*2-1) >= 1) || !any(weights)) // bilinear filtering is valid + { + historySample = 0; + return 0; + } + half4 lowResR = ssr_prev_target.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResG = ssr_prev_target.GatherGreen(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResB = ssr_prev_target.GatherBlue(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResA = ssr_prev_target.GatherAlpha(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + #if USE_PREV_DOWNSAMPLED_NORMALS + //ssr there was not computed + half4 lowresSmoothness = prev_downsampled_normals.GatherAlpha(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + weights *= lowresSmoothness > half(CALC_SSR_SMOOTHNESS_THRESHOLD); + #endif + + //half weight = saturate(dot(weights, 1)); // ignore bilateral weights + + half4 bil; + bil.xy = fractCrd; + bil.zw = 1.h - bil.xy; + weights *= half4(bil.zx*bil.w, bil.zx*bil.y) + 1e-4h; + weights *= exp2(depthDiff*(-5.f/threshold)); + half sumWeight = dot(weights, 1.h); + weights *= rcp(sumWeight); + bool weight = sumWeight > 1e-8h; + historySample = weight ? half4(dot(lowResR, weights), dot(lowResG, weights), dot(lowResB, weights), dot(lowResA, weights)) : 0; + return weight; + #else + historySample = tex2Dlod(ssr_prev_target, float4(historyUV, 0, 0)); + return 1; + #endif + } + #if USE_PREV_DOWNSAMPLED_NORMALS && USE_PREV_DOWNSAMPLED_CLOSE_DEPTH half4 unpack_normal_roughness(half4 packed_normal) { packed_normal.xyz = (packed_normal.xyz*2 - 1); packed_normal.xyz = normalize(packed_normal.xyz); - packed_normal.w = 1 - linearSmoothnessToLinearRoughness(packed_normal.w); + packed_normal.w = linearSmoothnessToLinearRoughness(packed_normal.w); return packed_normal; } - half historyNormalWeight(half4 sample_normal_smoothness, half3 normal, half roughness) + half historyNormalWeight(half4 sample_normal_roughness, half3 normal, half roughness) { - half smoothness = 1-roughness; //we can use higher smoothness history in lower smoothness (to a certain degree), but not visa verse - return (dot(normal, sample_normal_smoothness.xyz))*pow2(saturate(1.02 + (sample_normal_smoothness.w - smoothness))); + return sample_normal_roughness.w < half(CALC_SSR_ROUGHNESS_THRESHOLD) ? (dot(normal, sample_normal_roughness.xyz))*pow2(saturate(1.02 + (roughness - sample_normal_roughness.w))) : 0; + + //return pow2(dot(normal, sample_normal_smoothness.xyz)*saturate(1.0 - (sample_normal_smoothness.w - smoothness))); } half4 historyNormalWeights(half4 normalW, half roughness) { @@ -210,54 +282,169 @@ macro SSR_DISOCCLUSION(code) const float threshold = 0.2; return saturate(w*(1./(1-threshold)) - threshold*(1./(1-threshold))); } + half get_ssr_disocclusion_weight_sample_virtual(half3 current_normal, half current_roughness, float2 historyUV, float prev_linear_depth, inout half4 historySample) + { + // instead of exact uv = floor(historyCrdf)/prev_downsampled_close_depth_tex_target_size.xy + // we rely on prev_downsampled_close_depth_tex_samplerstate being point sample + float2 uv = historyUV; + float2 historyCrdf = historyUV*prev_downsampled_close_depth_tex_target_size.xy - 0.5; + float2 floorCrd = floor(historyCrdf); + float2 gatherUV = floorCrd*prev_downsampled_close_depth_tex_target_size.zw + prev_downsampled_close_depth_tex_target_size.zw; + float2 fractCrd = historyCrdf - floorCrd; + float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + //uv = uv - 0.5*prev_downsampled_close_depth_tex_target_size.zw;// re-center uv + float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); + float4 depthDiff = abs(linearDepths - prev_linear_depth); + float threshold = 0.1*prev_linear_depth; + half4 mask = depthDiff < threshold; + historySample = 0; + if (any(abs(historyUV*2-1) >= 1) || !any(mask)) // bilinear filtering is valid + return 0; + half4 weights = mask; + half4 normalslt = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, gatherUV, 0)); + half4 normalsrt = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, gatherUV, 0, int2(1,0))); + half4 normalslb = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, gatherUV, 0, int2(0,1))); + half4 normalsrb = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, gatherUV, 0, int2(1,1))); + half4 normalW = half4(historyNormalWeight(normalslt, current_normal, current_roughness), historyNormalWeight(normalsrt, current_normal, current_roughness), historyNormalWeight(normalslb, current_normal, current_roughness), historyNormalWeight(normalsrb, current_normal, current_roughness)); + normalW = historyNormalWeights(normalW, current_roughness); + weights *= normalW; + half weight = saturate(dot(weights, 1)); // ignore bilateral weights + + half4 bil; + bil.xy = fractCrd; + bil.zw = 1.h - bil.xy; + weights *= half4(bil.zx*bil.w, bil.zx*bil.y) + 1e-4h; + weights *= exp2(depthDiff*(-5.f/threshold)); + float sumW = dot(weights, 1.h); + if (sumW <= 1e-6) + return 0; + weights /= sumW; + + half4 lowResR = ssr_prev_target.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResG = ssr_prev_target.GatherGreen(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResB = ssr_prev_target.GatherBlue(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + half4 lowResA = ssr_prev_target.GatherAlpha(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; + historySample = float4(dot(lowResR, weights), dot(lowResG, weights), dot(lowResB, weights), dot(lowResA, weights)); + return weight; + } + #endif + + half get_ssr_disocclusion_weight_sample_duo(half rough_virtual_weight, half inf_refl_virtual_weight, half3 current_normal, half current_roughness, float2 historyVirtualUV, float prev_linear_depth, inout half4 historySample, inout half historyWeight) + { + #if 0 + #if USE_PREV_DOWNSAMPLED_NORMALS && USE_PREV_DOWNSAMPLED_CLOSE_DEPTH + //virtualWeight = 0; + //return get_ssr_disocclusion_weight_sample(reproject_alphaScale, currentAlpha, current_normal, current_roughness, historyVirtualUV, prev_linear_depth, historySample); + return historyWeight = get_ssr_disocclusion_weight_sample_virtual(current_normal, current_roughness, historyVirtualUV, prev_linear_depth, historySample); + #else + return 0; + #endif + #else + #if USE_PREV_DOWNSAMPLED_NORMALS && USE_PREV_DOWNSAMPLED_CLOSE_DEPTH + half4 historyVirtualSample; + half virtualWeight = get_ssr_disocclusion_weight_sample_virtual(current_normal, current_roughness, historyVirtualUV, prev_linear_depth, historyVirtualSample); + //virtualWeight = virtualWeight > 0.01; + virtualWeight *= rough_virtual_weight; + historyWeight *= (1.0-pow4(virtualWeight)); + virtualWeight *= inf_refl_virtual_weight; + half totalW = historyWeight + virtualWeight; + half invTotalW = rcp(max(1e-6h, totalW)); + half ret = max(virtualWeight, historyWeight); + historyWeight *= invTotalW; + virtualWeight *= invTotalW; + historySample = historySample*historyWeight + historyVirtualSample*virtualWeight; + historyWeight = ret; + return virtualWeight; + #else + return 0; + #endif + #endif + } + //old code bool get_ssr_disocclusion_weight_sample(half3 current_normal, half current_roughness, float2 historyUV, float prev_linear_depth, bool validate_normal, inout half4 historySample) { - bool weight = all(abs(historyUV*2-1) < 1); - #if USE_PREV_DOWNSAMPLED_CLOSE_DEPTH - // instead of exact uv = floor(historyCrdf)/prev_downsampled_close_depth_tex_target_size.xy - // we rely on prev_downsampled_close_depth_tex_samplerstate being point sample - float2 uv = historyUV; - float2 historyCrdf = historyUV*prev_downsampled_close_depth_tex_target_size.xy - 0.5; - uv = (floor(historyCrdf) + 0.5)*prev_downsampled_close_depth_tex_target_size.zw;//todo: one madd - float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, historyUV).wzxy; - float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); - float4 depthDiff = abs(linearDepths - prev_linear_depth); - float threshold = 0.1*prev_linear_depth; - half4 weights = depthDiff < threshold; - #if USE_PREV_DOWNSAMPLED_NORMALS - if (validate_normal) - { - half4 normalslt = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0)); - half4 normalsrt = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(1,0))); - half4 normalslb = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(0,1))); - half4 normalsrb = unpack_normal_roughness(prev_downsampled_normals.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(1,1))); - half4 normalW = half4(historyNormalWeight(normalslt, current_normal, current_roughness), historyNormalWeight(normalsrt, current_normal, current_roughness), historyNormalWeight(normalslb, current_normal, current_roughness), historyNormalWeight(normalsrb, current_normal, current_roughness)); - normalW = historyNormalWeights(normalW, current_roughness); - weights *= normalW; - } + #if USE_PREV_DOWNSAMPLED_NORMALS && USE_PREV_DOWNSAMPLED_CLOSE_DEPTH + if (validate_normal) + return get_ssr_disocclusion_weight_sample_virtual(current_normal, current_roughness, historyUV, prev_linear_depth, historySample) > 0; + else + #endif + return get_ssr_disocclusion_weight_sample(current_normal, current_roughness, historyUV, prev_linear_depth, historySample) > 0; + + } + } +endmacro + +macro SSR_GET_TEMPORAL_REPROJECTION_DUO(code) + SSR_DISOCCLUSION(code) + hlsl(code) { + half get_ssr_reprojection_with_weight(inout half neighboorhoodVariance, float3 cameraToPoint, float2 curViewTc, half3 normal, half linear_roughness, float reflectionDistance, float w, inout half4 prevFrame, out half virtualWeight) + { + float disocclusionWeightAtten = 1; + float3 prevViewVec = cameraToPoint; + + #if SSR_MOTIONREPROJ != 1 + bool isHero = apply_hero_matrix(curViewTc, prevViewVec); + #endif + + float4 prevClipExactPos = mul(float4(prevViewVec, 1), prev_globtm_no_ofs_psf); + float3 prevScreenExact = prevClipExactPos.w > 1e-6 ? prevClipExactPos.xyz/prevClipExactPos.w : float3(2,2,0); + float2 oldExactUV = prevScreenExact.xy*float2(0.5,-0.5) + float2(0.5,0.5); + float3 oldExactUVZ = float3(oldExactUV, clamp(linearize_z(prevScreenExact.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); + + float rayLength = length(cameraToPoint); + half linearRoughnessIsRoughW = get_is_rough_surface_param(linear_roughness); + float reflectionDistanceUse = lerp(reflectionDistance, 0, linearRoughnessIsRoughW); + float4 prevReflClip = mul(float4(prevViewVec*(reflectionDistanceUse + rayLength)/rayLength, 1), prev_globtm_no_ofs_psf); + float3 prevReflScreen = prevReflClip.w > 1e-6 ? prevReflClip.xyz/prevReflClip.w : float3(2,2,0); + float2 prevVirtualUV = prevReflScreen.xy*float2(0.5,-0.5) + float2(0.5,0.5); + float3 prevVirtualUVZ = float3(prevVirtualUV, clamp(linearize_z(prevReflScreen.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); + + + float weight = 1; + float3 reflecting_surface_3d_motion; + + #if SSR_MOTIONREPROJ == 1 + motion_type surface_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(curViewTc,0,0)).motion_attr; + #ifdef MOTION_TO_PREV_JITTERED_UV_OFS + surface_motion.xy += MOTION_TO_PREV_JITTERED_UV_OFS; #endif - if (all(weights)) // bilinear filtering is valid - { - historySample = tex2Dlod(ssr_prev_target, float4(historyUV, 0, 0)); - } else - { - float4 bil = float4(frac(historyCrdf), 1-frac(historyCrdf)); - weights *= float4(bil.zx*bil.w, bil.zx*bil.y) + 1e-4; - //weights = float4(bil.zx*bil.w, bil.zx*bil.y); - float sumW = dot(weights, 1); - weight = weight && sumW >= 0.0001; - weights *= rcp(max(1e-6, sumW)); - half4 lt = ssr_prev_target.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0); - half4 rt = ssr_prev_target.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(1,0)); - half4 lb = ssr_prev_target.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(0,1)); - half4 rb = ssr_prev_target.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, 0, int2(1,1)); - historySample = lt*weights.x + rt*weights.y + lb*weights.z + rb*weights.w; - } + #if MOTION_VECTORS_3D + reflecting_surface_3d_motion = surface_motion; + #else + reflecting_surface_3d_motion = float3(surface_motion, oldExactUVZ.z - w); + #endif + if (!CHECK_VALID_MOTION_VECTOR(reflecting_surface_3d_motion)) + reflecting_surface_3d_motion = oldExactUVZ - float3(curViewTc, w); + + //motion_type reflect_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(cameraHitUVZ.xy,0,0)).motion_attr; + //if (CHECK_VALID_MOTION_VECTOR(reflect_motion) && all(abs(cameraHitUVZ.xy*2-1) < 1)) + // prevUVZ = cameraHitUVZ + reflect_motion; + bool staticPixel = all(abs(curViewTc + reflecting_surface_3d_motion.xy - oldExactUVZ.xy) < 0.5*ssr_target_size.zw); #else - historySample = tex2Dlod(ssr_prev_target, float4(historyUV, 0, 0)); + reflecting_surface_3d_motion = oldExactUVZ - float3(curViewTc, w); + bool staticPixel = !isHero; + if (isHero) + reflecting_surface_3d_motion.z = 0; #endif + float2 useUV = curViewTc + reflecting_surface_3d_motion.xy; + float currentPosToPrevW = w + reflecting_surface_3d_motion.z; + { + + //&& any(abs(prevVirtualUV.xy - useUV.xy) > ssr_target_size.zw) + weight = get_ssr_disocclusion_weight_sample(normal, linear_roughness, useUV, currentPosToPrevW, prevFrame); + virtualWeight = 0; + float invDepth = rcp(w); + half scaledMovement = saturate(scaled_prev_camera_translation*invDepth); + half virtualMulW = (1-linearRoughnessIsRoughW)*(1-neighboorhoodVariance)*scaledMovement; + half virtualMulPostW = lerp(1, exp2(-reflectionDistance*invDepth), virtualMulW); + + if (staticPixel && virtualMulW > 1e-4 && all(abs(prevVirtualUV.xy*2-1) < 1)) + { + virtualWeight = get_ssr_disocclusion_weight_sample_duo(virtualMulW, virtualMulPostW, normal, linear_roughness, prevVirtualUV.xy, currentPosToPrevW, prevFrame, weight); + } + } + neighboorhoodVariance = lerp(1, neighboorhoodVariance, weight); return weight; } } endmacro - diff --git a/prog/gameLibs/render/shaders/ssr_common.hlsl b/prog/gameLibs/render/shaders/ssr_common.hlsl index ccb738936..931898a97 100644 --- a/prog/gameLibs/render/shaders/ssr_common.hlsl +++ b/prog/gameLibs/render/shaders/ssr_common.hlsl @@ -195,31 +195,35 @@ bool get_prev_frame_disocclusion_weight_sample(float2 historyUV, float prev_line { bool weight = all(abs(historyUV*2-1) < 1); #if USE_PREV_DOWNSAMPLED_CLOSE_DEPTH - float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, historyUV).wzxy; + float2 historyCrdf = historyUV * prev_downsampled_close_depth_tex_target_size.xy - 0.5; + float2 floorCrd = floor(historyCrdf); + float2 gatherUV = floorCrd*prev_downsampled_close_depth_tex_target_size.zw + prev_downsampled_close_depth_tex_target_size.zw; + float2 fractCrd = historyCrdf - floorCrd; + + float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, gatherUV).wzxy; float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); float4 depthDiff = abs(linearDepths - prev_linear_depth); float threshold = 0.05*prev_linear_depth; float4 weights = depthDiff < threshold; - if (all(weights)) // bilinear filtering is valid - { - historySample = tex2Dlod(prev_frame_tex, float4(historyUV, 0, lod)).rgb; - } else + + if (!any(weights) || !weight) + return false; { - float2 historyCrdf = historyUV*prev_downsampled_close_depth_tex_target_size.xy - 0.5; - float4 bil = float4(frac(historyCrdf), 1-frac(historyCrdf)); - weights *= float4(bil.zx*bil.w, bil.zx*bil.y); - float sumW = dot(weights, 1); - weight = weight && sumW >= 0.0001; - weights *= rcp(max(1e-6, sumW)); - float2 uv = (floor(historyCrdf) + 0.5)*prev_downsampled_close_depth_tex_target_size.zw;//todo: one madd + + float4 bil = float4(fractCrd, 1 - fractCrd); + float4 upsampleWeights = float4(bil.zx * bil.w, bil.zx * bil.y); + float4 spatialWeights = exp(-depthDiff * (5.0 / threshold)); + weights *= (spatialWeights * upsampleWeights + 1e-4); + weights /= dot(weights, 1.0); + float2 uv = gatherUV; // we rely on prev_downsampled_close_depth_tex_samplerstate being point sample //float2 uv = historyUV; - half3 lt = prev_frame_tex.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, lod).rgb; - half3 rt = prev_frame_tex.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, lod, int2(1,0)).rgb; - half3 lb = prev_frame_tex.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, lod, int2(0,1)).rgb; - half3 rb = prev_frame_tex.SampleLevel(prev_downsampled_close_depth_tex_samplerstate, uv, lod, int2(1,1)).rgb; - historySample = lt*weights.x + rt*weights.y + lb*weights.z + rb*weights.w; - //weight = 0; + half4 R = prev_frame_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, uv, lod).wzxy; + historySample.r = dot(weights, R); + half4 G = prev_frame_tex.GatherGreen(prev_downsampled_close_depth_tex_samplerstate, uv, lod).wzxy; + historySample.g = dot(weights, G); + half4 B = prev_frame_tex.GatherBlue(prev_downsampled_close_depth_tex_samplerstate, uv, lod).wzxy; + historySample.b = dot(weights, B); } #else historySample = tex2Dlod(prev_frame_tex, float4(historyUV, 0, lod)).rgb; diff --git a/prog/gameLibs/render/shaders/ssr_compute.dshl b/prog/gameLibs/render/shaders/ssr_compute.dshl index 223b295c8..6224bf2bd 100644 --- a/prog/gameLibs/render/shaders/ssr_compute.dshl +++ b/prog/gameLibs/render/shaders/ssr_compute.dshl @@ -2,71 +2,114 @@ include "ssr_base.dshl" texture ssr_target_before_denoise; int ssr_denoiser_tile; - -macro NORMAL_AWARE_BLUR(code) +texture blue_noise_tex; +float non_confident_inv_exposure = 0.01; +macro SSR_STOCHASTIC_RAY(code) + (code) { + blue_noise_tex@tex2d = blue_noise_tex; + stochasticFrame@f1 = (ssr_frameNo.y); + non_confident_exposure@f2 = (1 - non_confident_inv_exposure, non_confident_inv_exposure,0,0); + } hlsl(code) { - float normalWeight(float3 normal, float3 sample_normal) + float2 SampleRandomVector2D(uint2 pixel, uint frame_index) { - float sigma = 256; - half w = exp2(-sigma*saturate(1.0 - dot(normal, sample_normal.xyz))); - const float threshold = 0.01; - return saturate(w*(1./(1-threshold)) - threshold/(1-threshold)); + #define GOLDEN_RATIO 1.61803398875 + float2 E = texture2DAt(blue_noise_tex, pixel % 128).xy; + return float2(frac(E.x + (uint(frame_index.x) & 0xFFu) * GOLDEN_RATIO), + frac(E.y + (uint(frame_index.x) & 0xFFu) * GOLDEN_RATIO)); } - float planeDistance(float3 wpos, float3 sample_wpos, float3 plane_normal) + float2 HammersleylRandomVector2D(uint2 pixel, uint frame_index) { - return abs(dot(wpos - sample_wpos, plane_normal)); + uint2 random = ((pixel.xy + uint2(frame_index%4, (frame_index/4)%4))); + #define NUM_TEMPORAL_RAYS 16 + return hammersley( ((random.x&3) + 3*(random.y&3))&(NUM_TEMPORAL_RAYS-1), NUM_TEMPORAL_RAYS, random ); } - - float depthWeight(float3 wpos, float3 sample_wpos, float3 normal) + float3 getReflectionRayDir(float3 pointToEyeDir, float3 N, uint2 pixelPos, half linear_roughness) { - return planeDistance(wpos, sample_wpos, normal) < 0.01 ? 1.0 : 0.0; + float2 E = SampleRandomVector2D(pixelPos.xy, uint(stochasticFrame)); //HammersleylRandomVector2D + float3x3 tbnTransform = create_tbn_matrix(N); + float3 viewDirTC = mul(pointToEyeDir, tbnTransform); + float3 sampledNormalTC = importance_sample_GGX_VNDF(E, viewDirTC, linear_roughness); + float3 reflectedDirTC = reflect(-viewDirTC, sampledNormalTC); + return mul(reflectedDirTC, transpose(tbnTransform)); } - float4 normal_aware_blur(float3 wpos, float3 normal, uint2 GTid, int GI, float4 Out, float depth, float linear_roughness) + half LocalNeighborhoodKernelWeighted(half dist_sqr, half radius, half filterExp) { + radius = half(radius + 1.h); + return half(exp(-filterExp* dist_sqr / (radius * radius))); + } + float sampleGGXVNDFPDF(float ggx_alpha, float dotNH, float dotNV) { - float wMul = 1 + (GTid.x == 3 || GTid.x == 4) + (GTid.y == 3 || GTid.y == 4); - - // Mid sample for given pixel position and size of mini-tile - #define ADD_BLUR(cindex, weight)\ - {\ - int index=cindex;\ - float w = wMul*weight;\ - w *= ColorTarg[index].w;\ - w *= depthWeight(wpos, wposDepthTarg[index].xyz, normal);\ - w *= normalWeight(ReflectVecTarg[index], normal);\ - Out += w * ColorTarg[index];\ - TotalWeight += w;\ - } + // Calculate NDF function + float alpha2 = ggx_alpha*ggx_alpha; + // GGX distribution + float d = half(alpha2 / max(1e-8, pow2((dotNH * alpha2 - dotNH) * dotNH + 1))) * 1./PI; - float TotalWeight = 1;//is always 1 - const float centerWeight = 1.5; - float sideW = 1/centerWeight, cornerW = 0.7/centerWeight; - if (GTid.x>0) - { - ADD_BLUR(GI-1, sideW); - if (GTid.y>0) - ADD_BLUR(GI-1-TILE_SIZE, cornerW); - if (GTid.y0) - ADD_BLUR(GI+1-TILE_SIZE, cornerW); - if (GTid.y0) - ADD_BLUR(GI-TILE_SIZE, sideW); - if (GTid.y= 0.0f ? t + saturate(dotNV) : s / (t + saturate(abs(dotNV))); + return d / (2.0f * recipNormFactor); + } + half get_filter_exp(half linear_roughness, half confidence, float currentDepth) + { + half linearRoughnessW = get_is_rough_surface_param(linear_roughness); + half filter_exp = (5.h - 1.h*linearRoughnessW)*confidence; + filter_exp = lerp(filter_exp, filter_exp*confidence, saturate(scaled_prev_camera_translation/currentDepth)); + return filter_exp; + } + float atanh(float v) { + return 0.5*log((1+v)/(1-v)); + } + float AlphaToMacroNormalLength(float alpha) + { + float alpha2 = alpha * alpha; + float a = sqrt(saturate(1.0f - alpha2)); - return Out/TotalWeight; + return a < 1e-6 ? 2.0f / 3.0f : a >= 0.9999 ? 1.0 : (a - alpha2 * atanh(a)) / (a * a * a); + } + } +endmacro + +macro SSR_READ_POINT_INFO(code) + SSR_STOCHASTIC_RAY(code) + hlsl(code) { + struct PointInfo + { + half4 color; + half3 normal; + half linear_roughness; + float3 rayDir; + float3 cameraToPoint; + float linearDepth; + float PDF; + }; + PointInfo calc_point_info(uint2 screenCoord) + { + if (any(screenCoord >= uint2(resolution))) + return (PointInfo)0; + half4 newFrame = texelFetch(ssr_target_before_denoise, screenCoord, 0); + if (newFrame.a == 0) + return (PointInfo)0; + PointInfo p; + float rawDepth = texelFetch(src_depth_tex, screenCoord, 0).x; + p.linearDepth = linearize_z(rawDepth, zn_zfar.zw); + p.color = newFrame; + + float2 screenCoordCenter = screenCoord + float2(0.5,0.5); + float2 curViewTc = saturate(screenCoordCenter*ssr_target_size.zw); + + float3 viewVect = getViewVecOptimized(curViewTc); + p.cameraToPoint = viewVect * p.linearDepth; + half smoothness; + unpack_material(screenCoord, p.normal, p.linear_roughness, smoothness); + return p; + } + void calc_point_info_raydir(uint2 screenCoord, inout PointInfo p) + { + p.rayDir = getReflectionRayDir(-normalize(p.cameraToPoint), p.normal, screenCoord, p.linear_roughness); } } endmacro @@ -84,7 +127,7 @@ shader ssr_temporal_denoise_cs //#undef USE_PREV_DOWNSAMPLED_NORMALS } INIT_ZNZFAR_STAGE(cs) - SSR_DISOCCLUSION(cs) + SSR_GET_TEMPORAL_REPROJECTION_DUO(cs) if (compatibility_mode == compatibility_mode_on) { dont_render; } @@ -94,189 +137,293 @@ shader ssr_temporal_denoise_cs resolution@f2 = get_dimensions(ssr_target, 0); ssr_denoiser_tile@i1 = (ssr_denoiser_tile); } + SSR_READ_POINT_INFO(cs) + SSR_USE_EXPOSURE(cs) + hlsl(cs) { + #define FILTER 4 #define TILE 8 - #define TILE_SIZE TILE - groupshared float4 ColorTarg[TILE*TILE]; - groupshared float4 wposDepthTarg[TILE*TILE]; - groupshared float3 ReflectVecTarg[TILE*TILE]; - } - NORMAL_AWARE_BLUR(cs) + #define SHARED_ROW_SIZE (FILTER*2 + TILE) + #define TOTAL_SIZE (SHARED_ROW_SIZE*SHARED_ROW_SIZE) + #define WORK_PER_THREAD ((TOTAL_SIZE + (TILE*TILE) - 1)/(TILE*TILE)) - hlsl(cs) { - #define HIGH_ROUGHNESS_THRESHOLD_END 0.2 - #define HIGH_ROUGHNESS_THRESHOLD_START 0.1 + + groupshared float4 worldPos[TOTAL_SIZE]; + #define ENCODE_HALVES 0 + + #if ENCODE_HALVES + groupshared uint4 reflectDir_rayTracedResults[TOTAL_SIZE]; + uint2 encode_float4(float4 v) {uint4 vi = f32tof16(v);return vi.xy|(vi.zw<<16);} + float4 decode_float4(uint2 v) {return float4(f16tof32(v.xy), f16tof32(v.xy>>16));} + #else + groupshared float4 reflectDir[TOTAL_SIZE]; + groupshared float4 rayTracedResults[TOTAL_SIZE]; + #endif + uint get_local_index(uint2 localCoord) {return localCoord.y*SHARED_ROW_SIZE + localCoord.x;} + + void write_shared_info(uint2 localCoord, PointInfo p) + { + uint localIndex = get_local_index(localCoord); + if (localIndex >= TOTAL_SIZE) + return; + float4 rD = float4(p.normal, p.linear_roughness); + #if ENCODE_HALVES + reflectDir_rayTracedResults[localIndex] = uint4(encode_float4(rD), encode_float4(p.color)); + #else + reflectDir[localIndex] = rD; + rayTracedResults[localIndex] = p.color; + #endif + worldPos[localIndex] = float4(p.cameraToPoint, p.linearDepth); + } + PointInfo read_shared_info(uint2 localCoord) + { + uint localIndex = get_local_index(localCoord); + if (localIndex >= TOTAL_SIZE) + return (PointInfo)0; + PointInfo p; + float4 v; + #if ENCODE_HALVES + uint4 vi = reflectDir_rayTracedResults[localIndex]; + p.normal = 0;//missing + v = decode_float4(vi.xy); + p.rayDir = v.xyz; p.linear_roughness = v.a; + v = decode_float4(vi.zw); + p.color = v; + #else + v = reflectDir[localIndex]; + p.normal = 0;//missing + p.rayDir = v.xyz; p.linear_roughness = v.a; + p.color = rayTracedResults[localIndex]; + #endif + v = worldPos[localIndex]; + p.cameraToPoint = v.xyz; p.linearDepth = v.a; + return p; + } + void write_shared_info_raydir(uint localIndex, float3 rayDir, half linear_roughness) + { + if (localIndex < TOTAL_SIZE) + { + #if ENCODE_HALVES + reflectDir_rayTracedResults[localIndex].xy = encode_float4(float4(rayDir, linear_roughness)); + #else + reflectDir[localIndex].xyz = rayDir; + #endif + } + } + void read_shared_normal_roughness(uint localIndex, out half3 normal, out half linear_roughness) + { + #if ENCODE_HALVES + float4 v = (localIndex < TOTAL_SIZE) ? decode_float4(reflectDir_rayTracedResults[localIndex].xy) : 0; + #else + float4 v = (localIndex < TOTAL_SIZE) ? reflectDir[localIndex] : 0; + #endif + normal = v.xyz; + linear_roughness = v.w; + } + void read_shared_pos_depth(uint localIndex, out float3 cameraToPoint, out float linearDepth) + { + float4 v = (localIndex < TOTAL_SIZE) ? worldPos[localIndex] : 0; + cameraToPoint = v.xyz; + linearDepth = v.a; + } + void update_shared_info_raydir(uint2 localCoord, uint2 screenCoord) + { + uint localIndex = get_local_index(localCoord); + if (localIndex >= TOTAL_SIZE) + return; + half3 normal; + half linear_roughness; + read_shared_normal_roughness(localIndex, normal, linear_roughness); + PointInfo p; + write_shared_info_raydir(localIndex, getReflectionRayDir(-normalize(worldPos[localIndex].xyz), normal, screenCoord, linear_roughness), linear_roughness); + } + groupshared uint some_used_in_group; + + #include [numthreads(TILE, TILE, 1)] - void ssr_temporal_denoise_cs(uint2 screenCoord : SV_DispatchThreadID, uint2 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex) + void ssr_temporal_denoise_cs(uint2 screenCoord : SV_DispatchThreadID, uint2 Gid : SV_GroupID, uint2 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex) { - int2 scr = int2(screenCoord) - (ssr_denoiser_tile ? int2(TILE/2, TILE/2) : int2(0,0)); - uint2 screenCoordOfs = clamp(scr, 0, ssr_target_size.xy-1); - //uint2 screenCoordOfs = uint2(scr)%uint2(ssr_target_size.xy); - bool invalidPixel = any(scr != int2(screenCoordOfs)); - screenCoord = screenCoordOfs; + if (GI == 0) + some_used_in_group = 0; + GroupMemoryBarrierWithGroupSync(); - half4 newFrame = invalidPixel ? 0 : ssr_target_before_denoise[screenCoord]; - half4 prevFrame = 0; - half reprojectionWeight = 0; - float3 cameraToPoint = 0; - half linear_roughness = 0; - half3 normal = 0; - float w = 0; + PointInfo currentPoint = calc_point_info(screenCoord); - if (newFrame.a != 0) + #if WAVE_INTRINSICS + if (!WaveActiveAllTrue(currentPoint.color.a == 0)) { - reprojectionWeight = 1; - float rawDepth = texelFetch(src_depth_tex, screenCoord, 0).x; - w = linearize_z(rawDepth, zn_zfar.zw); + if (WaveIsHelperLane()) + InterlockedOr(some_used_in_group, 1); + } + #else + if (currentPoint.color.a != 0) + InterlockedOr(some_used_in_group, 1); + #endif + GroupMemoryBarrierWithGroupSync(); + if (!some_used_in_group) + { + texture2DAt(output, screenCoord) = 0; + return; + } - float2 screenCoordCenter = screenCoord + float2(0.5,0.5); - float2 curViewTc = saturate(screenCoordCenter*ssr_target_size.zw); + write_shared_info(GTid + FILTER, currentPoint); - float3 viewVect = getViewVecOptimized(curViewTc); - float3 viewDir = normalize(viewVect); - cameraToPoint = viewVect * w; - half smoothness; - unpack_material(screenCoord, normal, linear_roughness, smoothness); + { + UNROLL + for (uint i = 1; i < WORK_PER_THREAD; ++i) + { + uint2 localCoord = (GTid + FILTER + uint2(i&1, i>>1)*TILE)%SHARED_ROW_SIZE; + write_shared_info(localCoord, calc_point_info(Gid*TILE + localCoord - FILTER)); + } + } - half reflectionDistance = max(0, abs(newFrame.a) - f16tof32(0x0400)); - half ssrResultPrecision = exp2(-reflectionDistance/w); - newFrame.a = 1; + GroupMemoryBarrierWithGroupSync(); + float ggx_alpha = max(pow2(currentPoint.linear_roughness), 1e-4); + float4 scenePlaneScaled = float4(currentPoint.normal, dot(currentPoint.normal, currentPoint.cameraToPoint)) / currentPoint.linearDepth; + half neighboorhoodVariance = 0; + { + #define CONFIDENCE_FILTER 3 + half confidence = 0; + UNROLL + for (uint xy = 0, xye = (CONFIDENCE_FILTER*2+1)*(CONFIDENCE_FILTER*2+1); xy < xye; ++xy) { - half weight = 1; - float3 prevViewVec = cameraToPoint; - - #if SSR_MOTIONREPROJ != 1 - bool isHero = apply_hero_matrix(curViewTc, prevViewVec); - #endif - - float4 prevClipExactPos = mul(float4(prevViewVec, 1), prev_globtm_no_ofs_psf); - float3 prevScreenExact = prevClipExactPos.w > 1e-6 ? prevClipExactPos.xyz/prevClipExactPos.w : float3(2,2,0); - float2 oldExactUV = prevScreenExact.xy*float2(0.5,-0.5) + float2(0.5,0.5); - float3 oldExactUVZ = float3(oldExactUV, clamp(linearize_z(prevScreenExact.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); - float currentPosToPrevW = oldExactUVZ.z; - half linearRoughnessIsRoughW = saturate(linear_roughness*(1./HIGH_ROUGHNESS_THRESHOLD_END) - HIGH_ROUGHNESS_THRESHOLD_START/(HIGH_ROUGHNESS_THRESHOLD_END-HIGH_ROUGHNESS_THRESHOLD_START)); - reflectionDistance = lerp(reflectionDistance, 0, linearRoughnessIsRoughW); - float rayLength = length(cameraToPoint); - float4 prevReflClip = mul(float4(prevViewVec*(reflectionDistance + rayLength)/rayLength, 1), prev_globtm_no_ofs_psf); - float3 prevReflScreen = prevReflClip.w > 1e-6 ? prevReflClip.xyz/prevReflClip.w : float3(2,2,0); - float2 prevUV = prevReflScreen.xy*float2(0.5,-0.5) + float2(0.5,0.5); - float3 prevUVZ = float3(prevUV, clamp(linearize_z(prevReflScreen.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); - - - #if SSR_MOTIONREPROJ == 1 - motion_type surface_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(curViewTc,0,0)).motion_attr; - #if MOTION_VECTORS_3D - float3 surface_3d_motion = surface_motion; - #else - float3 surface_3d_motion = float3(surface_motion, oldExactUVZ.z - w); - #endif - if (!CHECK_VALID_MOTION_VECTOR(surface_motion)) - surface_3d_motion = oldExactUVZ - float3(curViewTc, w); - - //motion_type reflect_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(cameraHitUVZ.xy,0,0)).motion_attr; - //if (CHECK_VALID_MOTION_VECTOR(reflect_motion) && all(abs(cameraHitUVZ.xy*2-1) < 1)) - // prevUVZ = cameraHitUVZ + reflect_motion; - bool staticPixel = all(abs(curViewTc + surface_3d_motion.xy - oldExactUVZ.xy) < 0.5*ssr_target_size.zw); - #else - float3 surface_3d_motion = oldExactUVZ - float3(curViewTc, w); - bool staticPixel = !isHero; - if (isHero) - surface_3d_motion.z = 0; - #endif - + int x = int(xy%uint(CONFIDENCE_FILTER*2+1)) - CONFIDENCE_FILTER; + int y = int(xy/uint(CONFIDENCE_FILTER*2+1)) - CONFIDENCE_FILTER; + if (x != 0 || y != 0) { - float2 useUV = curViewTc + surface_3d_motion.xy; - currentPosToPrevW = w + surface_3d_motion.z; - bool validateNormal = false; - float weightMul = 1.0f; - if (staticPixel && prev_camera_translation > 0.01 && all(abs(prevUVZ.xy*2-1) < 1)) + uint localIndex = get_local_index(int2(GTid + FILTER) + int2(x,y)); + half3 neighboorNormal; + half neighboor_linear_roughness; + read_shared_normal_roughness(localIndex, neighboorNormal, neighboor_linear_roughness); + float3 cameraToPoint; + float linearDepth; + read_shared_pos_depth(localIndex, cameraToPoint, linearDepth); + + float relativeDepthDifference = pow2(dot(float4(cameraToPoint.xyz, -1), scenePlaneScaled)); + float depthWeight = exp2(-1000 * relativeDepthDifference); + depthWeight *= saturate(2 - 10*abs(currentPoint.linearDepth - linearDepth)/currentPoint.linearDepth); + if (depthWeight > 1e-4 && linearDepth > 0) { - useUV = prevUVZ.xy; - validateNormal = true; - // Parallax effect can produce totally wrong reflections in TPS view when camera both moves and - // rotates, so if we don't hit anything during trace on this frame, reduce reprojection weight. - weightMul = lerp(1.0f, static_pixel_miss_reprojection_weight.x + static_pixel_miss_reprojection_weight.y * ssrResultPrecision, saturate(scaled_prev_camera_translation/w)); + half sampleVariance = 1-pow16(dot(neighboorNormal, currentPoint.normal)) + 1-pow8(1-abs(neighboor_linear_roughness - currentPoint.linear_roughness)); + confidence += 1-sampleVariance; } - - weight = get_ssr_disocclusion_weight_sample(normal, linear_roughness, useUV, currentPosToPrevW, validateNormal, prevFrame); - weight *= weightMul; } - - const float disocclusionWeightAtten = weight; - //rougher surfaces should be more relaxed, to fight noise - //todo: add pixel age, so we can more correctly fight noise - const float roughnessWeightFactor = lerp(0.97, 0.8, exp2(-60*linear_roughness)); - reprojectionWeight = disocclusionWeightAtten * roughnessWeightFactor; } - } else - prevFrame = 0; + half filterW = min3((CONFIDENCE_FILTER*2+1), screenCoord.x+CONFIDENCE_FILTER+1, resolution.x - screenCoord.x+CONFIDENCE_FILTER+1); + half filterH = min3((CONFIDENCE_FILTER*2+1), screenCoord.y+CONFIDENCE_FILTER+1, resolution.y - screenCoord.y+CONFIDENCE_FILTER+1); + neighboorhoodVariance = saturate(1 - confidence * rcp(filterH*filterW - 1)); + } - ColorTarg[GI] = invalidPixel ? 0 : max(0, prevFrame); - ReflectVecTarg[GI] = normal; - wposDepthTarg[GI] = float4(cameraToPoint, w); + calc_point_info_raydir(screenCoord, currentPoint); + write_shared_info_raydir(get_local_index(GTid + FILTER), currentPoint.rayDir, currentPoint.linear_roughness); + + { + UNROLL + for (uint i = 1; i < WORK_PER_THREAD; ++i) + { + uint2 localCoord = (GTid + FILTER + uint2(i&1, i>>1)*TILE)%SHARED_ROW_SIZE; + update_shared_info_raydir(localCoord, Gid*TILE + localCoord - FILTER); + } + } GroupMemoryBarrierWithGroupSync(); + half4 newFrame = currentPoint.color; + //texture2DAt(output, screenCoord) = half4(newFrame.rgb, 1); + //return; + half4 prevFrame = 0; + half reprojectionWeight = 0, virtualWeight = 0; + + float3 viewDir = normalize(currentPoint.cameraToPoint); + half linear_roughness = currentPoint.linear_roughness; + half3 normal = currentPoint.normal; + float w = currentPoint.linearDepth; + float3 cameraToPoint = currentPoint.cameraToPoint; + float3 rayDir = currentPoint.rayDir; + + half reflectionDistance = max(0, abs(newFrame.a) - f16tof32(0x0400)); + if (newFrame.a != 0) + { + float2 screenCoordCenter = screenCoord + float2(0.5,0.5); + float2 curViewTc = saturate(screenCoordCenter*ssr_target_size.zw); + + half disocclusionWeightAtten = get_ssr_reprojection_with_weight(neighboorhoodVariance, cameraToPoint, curViewTc, normal, linear_roughness, reflectionDistance, w, prevFrame, virtualWeight); + //rougher surfaces should be more relaxed, to fight noise + //todo: add pixel age, so we can more correctly fight noise + const half roughnessWeightFactor = lerp(0.97h, 0.8h, exp2(-60*linear_roughness)); + reprojectionWeight = disocclusionWeightAtten * roughnessWeightFactor; + newFrame.a = 1; + } + if (newFrame.a == 0) { texture2DAt(output, screenCoord) = 0; return; } - { - half linearRoughnessIsRoughW = saturate(linear_roughness*(1./HIGH_ROUGHNESS_THRESHOLD_END) - HIGH_ROUGHNESS_THRESHOLD_START/(HIGH_ROUGHNESS_THRESHOLD_END-HIGH_ROUGHNESS_THRESHOLD_START)); - if (linearRoughnessIsRoughW > 0) - prevFrame = lerp(prevFrame, normal_aware_blur(cameraToPoint, normal, GTid, GI, prevFrame, w, linear_roughness), linearRoughnessIsRoughW); - } + half4 avgSq = 0, avg = 0; + half confidence = saturate(1.01h - neighboorhoodVariance); + half filterExp = get_filter_exp(linear_roughness, confidence, w); + //half exposure = max(1e-6h, PREV_FRAME_PACK(half3(1,1,1)).x); + half exposure = max(1e-6h, PREV_FRAME_PACK(half3(1,1,1)).x*rcp(confidence*half(non_confident_exposure.x) + half(non_confident_exposure.y)));//to reduce fire-flies more - half samples = 0; - half4 minV = newFrame, maxV = newFrame; - //todo: we can load neighboors into (TILE+FILTER*2)^2 shared memory - #define FILTER 3 - UNROLL - for (int y = -FILTER; y <= FILTER; ++y) + half4 sampleColor = half4(newFrame.rgb*exposure, currentPoint.color.a < 1000.); + sampleColor.rgb /= 1.h + luminance(sampleColor.rgb); + half4 averagedColor = sampleColor; half totalW = 1; + #define SFILTER FILTER { - UNROLL - for (int x = -FILTER; x <= FILTER; ++x) + LOOP + for (uint xy = 0, xye = (SFILTER*2+1)*(SFILTER*2+1); xy < xye; ++xy) { + int x = int(xy%uint(SFILTER*2+1)) - SFILTER; + int y = int(xy/uint(SFILTER*2+1)) - SFILTER; if (x != 0 || y != 0) { - uint2 coord = uint2(int(screenCoord.x) + x, int(screenCoord.y) + y); - if (all(coord < uint2(resolution))) - { - float neighboorW = linearize_z(texelFetch(src_depth_tex, coord, 0).x, zn_zfar.zw); - half depthW = abs(neighboorW - w) < w*0.05; - half neighboor_smoothness, neighboor_linear_roughness; - half3 neighboor_normal; - unpack_material(coord, neighboor_normal, neighboor_linear_roughness, neighboor_smoothness); - //todo: use reflection vec instead of normal! - half normalW = normalWeight(normal, neighboor_normal); - half w = max(0, depthW*normalW); - w *= pow2(saturate(10*(linear_roughness-neighboor_linear_roughness) + 1+0.01)); - - - half4 neighboor = ssr_target_before_denoise[coord]; - if (neighboor.a != 0 && w > 0) - { - neighboor.a = neighboor.a < 0 ? 0 : 1; - neighboor = lerp(newFrame, neighboor, w); + PointInfo neighboor = read_shared_info(int2(GTid + FILTER) + int2(x,y)); - minV = min(neighboor, minV); - maxV = max(neighboor, maxV); - samples += w; - } - } + float3 neighboorViewDir = normalize(neighboor.cameraToPoint); + float relativeDepthDifference = pow2(dot(float4(neighboor.cameraToPoint, -1), scenePlaneScaled)); + float depthWeight = exp2(-1000 * relativeDepthDifference); + depthWeight *= saturate(2 - 10*abs(currentPoint.linearDepth - neighboor.linearDepth)/currentPoint.linearDepth); + half sampleWeight = neighboor.color.w != 0 ? depthWeight : 0; + + float3 CurrentReflection = neighboor.rayDir; + float3 HalfVec = normalize(CurrentReflection.xyz - viewDir); + float NoH = saturate(dot(currentPoint.normal, HalfVec)); + float NoL = saturate(dot(currentPoint.normal, CurrentReflection.xyz)); + float D_GGX = NoL*BRDF_distribution( ggx_alpha, NoH ); + + sampleWeight *= D_GGX; + + half4 neighboorColor = neighboor.color; + neighboorColor.a = neighboorColor.a < 1000; + half4 sampleColor = neighboorColor; + + sampleWeight *= LocalNeighborhoodKernelWeighted(x*x + y*y, 3, filterExp); + + avgSq += (sampleWeight*sampleColor)*sampleColor; + avg += (sampleWeight*sampleColor); + + sampleColor.rgb = sampleColor.rgb*exposure; + sampleColor.rgb /= 1.h + luminance(sampleColor.rgb); + averagedColor += sampleColor*sampleWeight; + totalW += sampleWeight; } } } - half samplesW = saturate(1 - samples*1./((2*FILTER+1)*(2*FILTER+1) - 1)); - half filter_around = lerp(0.0h, 2.0h, samplesW);//should be age dependent - half filter_add = max(max(maxV.r, maxV.g), max(maxV.b, 1e-4h))*lerp(0.h, 0.15h, samplesW); - half4 extV = filter_around*max(0, maxV - minV) + filter_add; - half4 clampedHistory = clamp(prevFrame, max(minV - extV, 0), maxV + extV); - clampedHistory = lerp(prevFrame, clampedHistory, saturate(prev_camera_translation*100/w)); - newFrame = force_ignore_history == 0 ? lerp(newFrame, clampedHistory, reprojectionWeight) : newFrame; + half invW = rcp(totalW); + averagedColor *= invW; + avgSq *= invW; + avg *= invW; + half4 dev = sqrt(max(avgSq - avg*avg, 0)); + averagedColor.rgb /= 1 - luminance(averagedColor.rgb); + averagedColor.rgb = averagedColor.rgb/exposure; + newFrame = averagedColor; + half4 prevFrameClamped = clamp(prevFrame, max(newFrame - dev, 0), newFrame + dev); + //clampedHistory = lerp(prevFrame, clampedHistory, saturate(scaled_prev_camera_translation/w)); + prevFrame = lerp(prevFrame, prevFrameClamped, (1-neighboorhoodVariance)*saturate(scaled_prev_camera_translation/w)*(1-get_is_rough_surface_param(currentPoint.linear_roughness))); + newFrame = force_ignore_history == 0 ? lerp(newFrame, prevFrame, reprojectionWeight) : newFrame; newFrame.a = 1; texture2DAt(output, screenCoord) = newFrame; @@ -294,7 +441,6 @@ interval ssr_denoiser_type: manual<1, reblur<2, relax<3, simple; int denoiser_frame_index; texture packed_mv; -texture blue_noise_tex; texture denoised_ssr; macro RESOLVE_BY_NEIGHBOURS(code) @@ -302,13 +448,54 @@ macro RESOLVE_BY_NEIGHBOURS(code) #include groupshared float3 ReflectVecTarg[groupthreads]; + half GetNeighborhoodVariance(uint2 GTid, uint filterSize, float3 normal, float3 cameraToPoint, float linear_roughness, float currentDepth, inout half averageRoughness) + { + averageRoughness = linear_roughness; + half initial = AlphaToMacroNormalLength(pow2(linear_roughness)); + half3 avgNormal = normal*initial; + half avgNormalW = 1; + half confidence = 0; + float4 scenePlaneScaled = float4(normal, dot(normal, cameraToPoint)) / currentDepth; + for (uint y = GTid.y - min(filterSize, GTid.y), maxY = min(GTid.y + filterSize, TILE_SIZE - 1); y <= maxY; y++) + { + for (uint x = GTid.x - min(filterSize, GTid.x), maxX = min(GTid.x + filterSize, TILE_SIZE - 1); x <= maxX; x++) + { + if (x != GTid.x || y != GTid.y) + { + uint groupIndex = y*TILE_SIZE + x; - half LocalNeighborhoodKernelWeight(half dist_sqr) { - // Adapted from ffx - #define REFLECTIONS_LOCAL_NEIGHBORHOOD_RADIUS 3 - #define REFLECTIONS_GAUSSIAN_K 3.0 - const half radius = half(REFLECTIONS_LOCAL_NEIGHBORHOOD_RADIUS + 1); - return half(exp(-REFLECTIONS_GAUSSIAN_K * dist_sqr / (radius * radius))); + ##assert(groupIndex < groupthreads, "[%s:%.f] Out of bounds: groupthreads size is %d, but access to %d (%d:%d max %d:%d)", _FILE_, __LINE__, groupthreads, groupIndex, x, y, maxX, maxY); + + float4 neighboordNormalRoughness = ColorTarg[groupIndex]; + float4 neighboorWpos = wposDepthTarg[groupIndex]; + float relativeDepthDifference = pow2(dot(float4(wposDepthTarg[groupIndex].xyz, -1), scenePlaneScaled)); + float depthWeight = exp2(-1000 * relativeDepthDifference); + depthWeight *= saturate(2 - 10*abs(currentDepth - wposDepthTarg[groupIndex].w)/currentDepth); + half weight = neighboordNormalRoughness.w >= 0 ? depthWeight : 0; + + avgNormal += weight*neighboordNormalRoughness.xyz * AlphaToMacroNormalLength(pow2(neighboordNormalRoughness.w)); + avgNormalW += weight; + if (weight > 1e-4) + { + half sampleVariance = 1-pow16(dot(neighboordNormalRoughness.xyz, normal)) + 1-pow8(1-abs(neighboordNormalRoughness.w - linear_roughness)); + //variance += sampleVariance; + //samples += 1; + confidence += 1-sampleVariance; + } + } + } + } + avgNormal /= avgNormalW; + half avgNormalLen = length(avgNormal); + float aLR = (1 - linear_roughness)/(2./3. - initial); + float bLR = linear_roughness - initial*aLR; + averageRoughness = saturate(aLR*(avgNormalLen - initial) + linear_roughness); + + averageRoughness = avgNormalLen > initial ? linear_roughness : avgNormalLen <= 2.0/3.0f ? 1 : averageRoughness; + averageRoughness = linear_roughness; + half maxSamples = (min(GTid.y + filterSize, TILE_SIZE-1)+1 - (GTid.y - min(filterSize, GTid.y))) * (min(GTid.x + filterSize, TILE_SIZE-1) + 1 - (GTid.x - min(filterSize, GTid.x))) - 1; + //return samples > 0 ? min(saturate(samples / (2*filterSize*filterSize)), saturate(variance / samples)) : 1; + return saturate(1 - confidence / maxSamples); } ///////////////////////////////////// @@ -321,15 +508,23 @@ macro RESOLVE_BY_NEIGHBOURS(code) // alpha2, NdV - BRDF supporting values // uints2 x_samp, y_samp - size of mini-tile ///////////////////////////////////// - float4 ResolvePixels(float4 val, uint2 GTid, float3 pointToEyeDir, float3 normal, float linear_roughness, uint filterSize, float currentDepth) + float4 ResolvePixels(float4 val, uint2 GTid, float3 pointToEyeDir, float3 normal, float3 cameraToPoint, float linear_roughness, uint filterSize, float currentDepth, out float4 maxDeviation, float neighboorhoodVariance) { + half confidence = saturate(1.01h - neighboorhoodVariance); + half filterExp = get_filter_exp(linear_roughness, confidence, currentDepth); + //half exposure = max(1e-6h, PREV_FRAME_PACK(half3(1,1,1)).x); + half exposure = max(1e-6h, PREV_FRAME_PACK(half3(1,1,1)).x*rcp(confidence*half(non_confident_exposure.x) + half(non_confident_exposure.y)));//to reduce fire-flies more //fireflies //float TotalWeight = 0.01; //float4 Out = float4(val.rgb*TotalWeight/(1 + luminance(val.rgb)), val.a*TotalWeight); float TotalWeight = 0; float4 Out = 0; //reflectionDistanceW = 0; + maxDeviation = 0; float ggx_alpha = max(pow2(linear_roughness), 1e-4); + float4 scenePlaneScaled = float4(normal, dot(normal, cameraToPoint)) / currentDepth; + float NoV = saturate(dot(pointToEyeDir, normal)); + half4 avgSq = 0, avg = 0; for (uint y = GTid.y - min(filterSize, GTid.y), maxY = min(GTid.y + filterSize, TILE_SIZE - 1); y <= maxY; y++) { @@ -360,16 +555,25 @@ macro RESOLVE_BY_NEIGHBOURS(code) // This adds a significant amount of noise and fireflyies. So ignore that part. float hitPDF = 1.0; float sampleWeight = D_GGX / max(1e-5, hitPDF); - float2 toCenterVect = float2(float(x) - float(GTid.x), float(y) - float(GTid.y)); + //sampleWeight = sampleGGXVNDFPDF(ggx_alpha, NoH, NoV); + //float4 neighboorWpos = wposDepthTarg[groupIndex]; + float relativeDepthDifference = pow2(dot(float4(wposDepthTarg[groupIndex].xyz, -1), scenePlaneScaled)); + float depthWeight = exp2(-1000 * relativeDepthDifference); + depthWeight *= saturate(2 - 10*abs(currentDepth - wposDepthTarg[groupIndex].w)/currentDepth); + sampleWeight *= depthWeight; + //maxDeviation = max(maxDeviation, sampleWeight*abs(sampleColor - val)); + //maxDeviation += sampleWeight*abs(sampleColor - val); - sampleWeight *= LocalNeighborhoodKernelWeight(dot(toCenterVect, toCenterVect)); - sampleWeight *= saturate(2 - 50*abs(currentDepth - wposDepthTarg[groupIndex].w)/currentDepth); + float2 toCenterVect = float2(float(x) - float(GTid.x), float(y) - float(GTid.y)); + sampleWeight *= LocalNeighborhoodKernelWeighted(dot(toCenterVect, toCenterVect), 3, filterExp); //reflectionDistanceW += CurrentReflection.w * sampleWeight; TotalWeight += sampleWeight; // Integration of microfacet distribution (PDF) + avgSq += (sampleWeight*sampleColor)*sampleColor; + avg += (sampleWeight*sampleColor); //fireflies - sampleColor.rgb = PREV_FRAME_PACK(sampleColor.rgb); + sampleColor.rgb *= exposure; sampleColor.rgb /= 1 + luminance(sampleColor.rgb); Out += sampleWeight*sampleColor; // Integration of BRDF weighted color @@ -377,11 +581,16 @@ macro RESOLVE_BY_NEIGHBOURS(code) } //reflectionDistanceW /= TotalWeight; // divide by sum NDF - Out /= TotalWeight; + half invW = rcp(TotalWeight); + Out *= invW; + avgSq *= invW; + avg *= invW; + //maxDeviation *= invW; + maxDeviation = sqrt(max(avgSq - avg*avg, 0)); //fireflies Out.rgb /= 1 - luminance(Out.rgb); - Out.rgb = PREV_FRAME_UNPACK(Out.rgb); + Out.rgb = Out.rgb/exposure; return Out; } @@ -396,6 +605,7 @@ shader tile_ssr_compute SSR_COMMON(cs) SSR_CALCULATE(cs) INIT_ZNZFAR_STAGE(cs) + SSR_STOCHASTIC_RAY(cs) if (ssr_alternate_reflections == yes) { INIT_ENVI_SPECULAR_BASE(cs) @@ -404,7 +614,7 @@ shader tile_ssr_compute INIT_BRUNETON_FOG(cs) BASE_USE_BRUNETON_FOG(cs) } - SSR_DISOCCLUSION(cs) + SSR_GET_TEMPORAL_REPROJECTION_DUO(cs) bool manual_denoising = ssr_denoiser_type == manual || ssr_denoiser_type == simple; if (!manual_denoising && !hardware.dx12) { dont_render; } if (!manual_denoising && ssr_quality == low) { dont_render; } @@ -415,7 +625,6 @@ shader tile_ssr_compute ssr_tile_jitter@f2 = (ssr_tile_jitter); hit_dist_params@f4 = ssr_hit_dist_params; denoiser_frame_index@i1 = denoiser_frame_index; - blue_noise_tex@tex2d = blue_noise_tex; } hlsl(cs) { @@ -429,7 +638,6 @@ shader tile_ssr_compute if (manual_denoising) { RESOLVE_BY_NEIGHBOURS(cs) - NORMAL_AWARE_BLUR(cs) } if (ssr_alternate_reflections != yes) { if (ssr_denoiser_type != manual) { SSR_ENV_RESOLVE(cs) } @@ -450,21 +658,6 @@ shader tile_ssr_compute return sRGB ; } - float2 SampleRandomVector2D(uint2 pixel, uint frame_index) - { - #define GOLDEN_RATIO 1.61803398875 - float2 E = texture2DAt(blue_noise_tex, pixel % 128).xy; - return float2(frac(E.x + (uint(frame_index.x) & 0xFFu) * GOLDEN_RATIO), - frac(E.y + (uint(frame_index.x) & 0xFFu) * GOLDEN_RATIO)); - } - - float2 HammersleylRandomVector2D(uint2 pixel, uint frame_index) - { - uint2 random = ((pixel.xy + uint2(frame_index%4, (frame_index/4)%4))); - #define NUM_TEMPORAL_RAYS 16 - return hammersley( ((random.x&3) + 3*(random.y&3))&(NUM_TEMPORAL_RAYS-1), NUM_TEMPORAL_RAYS, random ); - } - ##if (ssr_alternate_reflections == yes) void applyFogToReflection(float3 view, float dist, inout float3 color) { @@ -523,10 +716,20 @@ shader tile_ssr_compute float rawDepth = tex2Dlod(src_depth_tex, float4(curViewTc, 0, 0)).x; float w = linearize_z(rawDepth, zn_zfar.zw); - + float3 cameraToPoint = viewVect * w; bool NEEDSSR = (linear_roughness < 0.7) && (w < 0.5*zn_zfar.y); - float3 cameraToPoint = viewVect * w; + half averageRoughness = linear_roughness; + ##if (manual_denoising) + wposDepthTarg[GI] = float4(cameraToPoint, w); + ColorTarg[GI] = float4(normal, linear_roughness); + GroupMemoryBarrierWithGroupSync(); + half neighboorhoodVariance = 0; + BRANCH + if (NEEDSSR) + neighboorhoodVariance = GetNeighborhoodVariance(GTid, 3, normal, cameraToPoint, linear_roughness, w, averageRoughness); + ##endif + float3 worldPos = world_view_pos.xyz + cameraToPoint; float3 realWorldPos = ssr_world_view_pos.xyz + cameraToPoint; uint2 pixelPos = screenCoord; @@ -536,7 +739,6 @@ shader tile_ssr_compute float4 newFrame = 0; float3 capturePoint = 0; float4 result = 0; - float reprojectionWeight = 0; float2 oldUv = 0; float reflectionDistance = INITIAL_REFLEC_DIST; @@ -547,25 +749,17 @@ shader tile_ssr_compute float3 R = float3(0, 0, 0); - float ssrResultPrecision = 0.0f; - BRANCH if (NEEDSSR) { - uint frameRandom = uint(SSRParams.w); - float stepOfs = interleavedGradientNoiseFramed(pixelPos.xy, uint(SSRParams.z)&7) - 0.25 + 1+ linear_roughness; + float stepOfs = interleavedGradientNoiseFramed(pixelPos.xy, uint(SSRParams.z)&7) - 0.25 + 1+ averageRoughness; - float2 E = SampleRandomVector2D(pixelPos.xy, frameRandom); //HammersleylRandomVector2D - float3x3 tbnTransform = create_tbn_matrix(N); - float3 viewDirTC = mul(-viewDir, tbnTransform); - float3 sampledNormalTC = importance_sample_GGX_VNDF(E, viewDirTC, linear_roughness); - float3 reflectedDirTC = reflect(-viewDirTC, sampledNormalTC); - R = mul(reflectedDirTC, transpose(tbnTransform)); + R = getReflectionRayDir(-viewDir, N, pixelPos.xy, averageRoughness); #if SSR_TRACEWATER == 1 - float4 hit_uv_z_fade = hierarchRayMarch(curViewTc, R, linear_roughness, w, cameraToPoint, stepOfs, globtm_no_ofs_psf, water_level-realWorldPos.y+worldPos.y); + float4 hit_uv_z_fade = hierarchRayMarch(curViewTc, R, averageRoughness, w, cameraToPoint, stepOfs, globtm_no_ofs_psf, water_level-realWorldPos.y+worldPos.y); #else - float4 hit_uv_z_fade = hierarchRayMarch(curViewTc, R, linear_roughness, w, cameraToPoint, stepOfs, globtm_no_ofs_psf, 0); + float4 hit_uv_z_fade = hierarchRayMarch(curViewTc, R, averageRoughness, w, cameraToPoint, stepOfs, globtm_no_ofs_psf, 0); #endif // if there was a hit @@ -573,9 +767,11 @@ shader tile_ssr_compute { const float linearZHit = ssr_linearize_z(hit_uv_z_fade.z); reflectionDistance = length(cameraToPoint - getViewVecOptimized(hit_uv_z_fade.xy) * linearZHit); - newFrame = sample_vignetted_color( float3(hit_uv_z_fade.xy, linearZHit), linear_roughness, linearZHit, cameraToPoint, N, realWorldPos); + newFrame = sample_vignetted_color( float3(hit_uv_z_fade.xy, linearZHit), averageRoughness, linearZHit, cameraToPoint, N, realWorldPos); } - ssrResultPrecision = newFrame.a; + // alternate reflections for puddles, if presented + half ssrResultPrecision = newFrame.a; + get_planar_reflections(newFrame, ssrResultPrecision, worldPos, normal, curViewTc); bool hitSky = hit_uv_z_fade.z == 0 && hit_uv_z_fade.w != 0; hitSky = hitSky && all(hit_uv_z_fade.xy>0); @@ -591,7 +787,6 @@ shader tile_ssr_compute if (!hitSky) { get_alternate_reflections(alternateRefl, reflectionDistance, pixelPos, R, cameraToPoint, normal, false, false); - ssrResultPrecision = exp2(-reflectionDistance/w); if (alternateRefl.a > 0) { float len = length(reflectionDistance*R + cameraToPoint); @@ -604,6 +799,7 @@ shader tile_ssr_compute reflectionDistance = SSR_FP16_MAX; } newFrame = half4(lerp(alternateRefl.rgb, newFrame.rgb, newFrame.a), 1); + //newFrame.a = reflectionDistance < 1000; #if !TEMPORAL_IN_ONE_PASS newFrame.a = alternateRefl.a; #endif @@ -613,7 +809,7 @@ shader tile_ssr_compute newFrame.rgb = newFrame.rgb*light_transmittance.a + light_transmittance.rgb; ##elif (ssr_denoiser_type != manual) - half3 enviLight = GetEnvLight(worldPos, w, R, normal,linear_roughness); + half3 enviLight = GetEnvLight(worldPos, w, R, normal, averageRoughness); newFrame.rgb = lerp(enviLight, newFrame.rgb, newFrame.a); ##endif } @@ -621,115 +817,47 @@ shader tile_ssr_compute if (any(!isfinite(newFrame))) { newFrame = float4(0,0,0,0); - ssrResultPrecision = 0; } - //Resolve - ##if (manual_denoising) - ReflectVecTarg[GI] = R; - wposDepthTarg[GI] = float4(cameraToPoint, w); - ColorTarg[GI] = newFrame; - GroupMemoryBarrierWithGroupSync(); - BRANCH - if (NEEDSSR) - { - uint res_Params = clamp(1 + linear_roughness * 2, 2, 3); - newFrame = ResolvePixels(newFrame, GTid, -viewDir, normal, linear_roughness, res_Params, w); - } - ##endif - ///////////////////////////////////////////////// // Temporal reprojection ///////////////////////////////////////////////// + half reprojectionWeight = 0, virtualWeight = 0; #if TEMPORAL_IN_ONE_PASS half4 prevFrame = 0; BRANCH if(NEEDSSR) { - float3 prevViewVec = cameraToPoint; - - #if SSR_MOTIONREPROJ != 1 - bool isHero = apply_hero_matrix(curViewTc, prevViewVec); - #endif - - float4 prevClipExactPos = mul(float4(prevViewVec, 1), prev_globtm_no_ofs_psf); - float3 prevScreenExact = prevClipExactPos.w > 1e-6 ? prevClipExactPos.xyz/prevClipExactPos.w : float3(2,2,0); - float2 oldExactUV = prevScreenExact.xy*float2(0.5,-0.5) + float2(0.5,0.5); - float3 oldExactUVZ = float3(oldExactUV, clamp(linearize_z(prevScreenExact.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); - float currentPosToPrevW = oldExactUVZ.z; - - float rayLength = length(cameraToPoint); - float4 prevReflClip = mul(float4(prevViewVec*(reflectionDistance + rayLength)/rayLength, 1), prev_globtm_no_ofs_psf); - float3 prevReflScreen = prevReflClip.w > 1e-6 ? prevReflClip.xyz/prevReflClip.w : float3(2,2,0); - float2 prevUV = prevReflScreen.xy*float2(0.5,-0.5) + float2(0.5,0.5); - float3 prevUVZ = float3(prevUV, clamp(linearize_z(prevReflScreen.z, prev_zn_zfar.zw), prev_zn_zfar.x, prev_zn_zfar.y)); - - - float weight = 1; - - #if SSR_MOTIONREPROJ == 1 - motion_type surface_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(curViewTc,0,0)).motion_attr; - #if MOTION_VECTORS_3D - float3 surface_3d_motion = surface_motion; - #else - float3 surface_3d_motion = float3(surface_motion, oldExactUVZ.z - w); - #endif - if (!CHECK_VALID_MOTION_VECTOR(surface_motion)) - surface_3d_motion = oldExactUVZ - float3(curViewTc, w); - - //motion_type reflect_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(cameraHitUVZ.xy,0,0)).motion_attr; - //if (CHECK_VALID_MOTION_VECTOR(reflect_motion) && all(abs(cameraHitUVZ.xy*2-1) < 1)) - // prevUVZ = cameraHitUVZ + reflect_motion; - bool staticPixel = all(abs(curViewTc + surface_3d_motion.xy - oldExactUVZ.xy) < 0.5*ssr_target_size.zw); - #else - float3 surface_3d_motion = oldExactUVZ - float3(curViewTc, w); - bool staticPixel = !isHero; - if (isHero) - surface_3d_motion.z = 0; - #endif - - { - float2 useUV = curViewTc + surface_3d_motion.xy; - currentPosToPrevW = w + surface_3d_motion.z; - bool validateNormal = false; - float weightMul = 1.0f; - if (staticPixel && prev_camera_translation > 0.01 && all(abs(prevUVZ.xy*2-1) < 1)) - { - useUV = prevUVZ.xy; - validateNormal = true; - // Parallax effect can produce totally wrong reflections in TPS view when camera both moves and - // rotates, so if we don't hit anything during trace on this frame, reduce reprojection weight. - weightMul = lerp(1.0f, static_pixel_miss_reprojection_weight.x + static_pixel_miss_reprojection_weight.y * ssrResultPrecision, saturate( scaled_prev_camera_translation/w)); - } - - weight = get_ssr_disocclusion_weight_sample(normal, linear_roughness, useUV, currentPosToPrevW, validateNormal, prevFrame); - weight *= weightMul; - } - - const float disocclusionWeightAtten = weight; + half disocclusionWeightAtten = get_ssr_reprojection_with_weight(neighboorhoodVariance, cameraToPoint, curViewTc, normal, averageRoughness, reflectionDistance, w, prevFrame, virtualWeight); //rougher surfaces should be more relaxed, to fight noise //todo: add pixel age, so we can more correctly fight noise - const float roughnessWeightFactor = lerp(0.97, 0.8, exp2(-60*linear_roughness)); + const half roughnessWeightFactor = lerp(0.97h, 0.8h, exp2(-60*averageRoughness)); reprojectionWeight = disocclusionWeightAtten * roughnessWeightFactor; - - // Not only prev frame are invalid when disocluded. - // But current frame we mark as partially invalid too, because there were not enough samples to converge - // todo: - // * first, disocclusionWeightAtten should be dependent on roughness. Smooth surfaces require less samples to converge - // * second, if we have GI , we better just lerp new sample with GI specular as old sample - // * third, reprojection of old surface is in generally incorrect thing to do, especially for smooth pixels. - // We need to connverge only noise in ray start, so if we would have last ray length, we can do without ghosting - // newFrame.a *= lerp(1, disocclusionWeightAtten, linear_roughness); } - newFrame.rgb *= newFrame.a; - newFrame = force_ignore_history == 0 ? lerp(newFrame, prevFrame, reprojectionWeight) : newFrame; + #endif - ColorTarg[GI] = invalidPixel ? 0 : newFrame; - ReflectVecTarg[GI] = normal; + ##if (manual_denoising) + ColorTarg[GI] = newFrame; + ReflectVecTarg[GI] = R; GroupMemoryBarrierWithGroupSync(); + half4 maxDev = 0; + BRANCH + if (NEEDSSR) + { + uint res_Params = 3; + newFrame = ResolvePixels(newFrame, GTid, -viewDir, normal, cameraToPoint, averageRoughness, res_Params, w, maxDev, neighboorhoodVariance); + } + ##endif + + #if TEMPORAL_IN_ONE_PASS + half4 minNeighboorhood = max(newFrame-maxDev, 0), maxNeighboorhood = newFrame+maxDev; + minNeighboorhood.rgb *= minNeighboorhood.a; maxNeighboorhood.rgb *= min(1, maxNeighboorhood.a); + newFrame.rgb *= newFrame.a; + half4 prevFrameClamped = clamp(prevFrame, minNeighboorhood, maxNeighboorhood); + prevFrame = lerp(prevFrame, prevFrameClamped, (1-neighboorhoodVariance)*saturate(scaled_prev_camera_translation/w)*(1-get_is_rough_surface_param(averageRoughness))); - newFrame = normal_aware_blur(cameraToPoint, normal, GTid, GI, newFrame, w, linear_roughness); + newFrame = force_ignore_history == 0 ? lerp(newFrame, prevFrame, reprojectionWeight) : newFrame; #endif result = newFrame; diff --git a/prog/gameLibs/render/shaders/ssr_ps.dshl b/prog/gameLibs/render/shaders/ssr_ps.dshl index 250723c63..95fcef773 100644 --- a/prog/gameLibs/render/shaders/ssr_ps.dshl +++ b/prog/gameLibs/render/shaders/ssr_ps.dshl @@ -11,7 +11,7 @@ shader ssr INIT_ZNZFAR() SSR_CALCULATE(ps) POSTFX_VS(0) - SSR_DISOCCLUSION(ps) + SSR_GET_TEMPORAL_REPROJECTION_DUO(ps) hlsl(ps) { float4 ssr_ps(VsOutput input HW_USE_SCREEN_POS) : SV_Target @@ -55,6 +55,8 @@ shader ssr #endif float ssrResultPrecision = newTarget.a; + // alternate reflections for puddles, if presented + get_planar_reflections(newTarget, ssrResultPrecision, worldPos, normal, curViewTc); float3 prevViewVec = cameraToPoint; @@ -79,6 +81,9 @@ shader ssr #if SSR_MOTIONREPROJ == 1 motion_type surface_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(curViewTc,0,0)).motion_attr; + #ifdef MOTION_TO_PREV_JITTERED_UV_OFS + surface_motion.xy += MOTION_TO_PREV_JITTERED_UV_OFS; + #endif #if MOTION_VECTORS_3D float3 surface_3d_motion = surface_motion; #else diff --git a/prog/gameLibs/render/waterRipples/waterRipples.cpp b/prog/gameLibs/render/waterRipples/waterRipples.cpp index 4b5b36b46..ffd310188 100644 --- a/prog/gameLibs/render/waterRipples/waterRipples.cpp +++ b/prog/gameLibs/render/waterRipples/waterRipples.cpp @@ -296,6 +296,7 @@ void WaterRipples::addDropInst(int reg_num) void WaterRipples::clearRts() { SCOPE_RENDER_TARGET; + d3d::set_render_target(); d3d::set_render_target(0, texBuffers[0].getTex2D(), 0); d3d::set_render_target(1, texBuffers[1].getTex2D(), 0); d3d::set_render_target(2, texBuffers[2].getTex2D(), 0); diff --git a/prog/gameLibs/spirv/gen_decoder.py b/prog/gameLibs/spirv/gen_decoder.py index f3e36a65c..f655a6042 100644 --- a/prog/gameLibs/spirv/gen_decoder.py +++ b/prog/gameLibs/spirv/gen_decoder.py @@ -249,7 +249,8 @@ def make_decoder(language): return result def generate_module_decoder(language, build_cfg): - result = '// this file is auto generated, do not modify\n//-V::1020\n' + result = '// Copyright (C) Gaijin Games KFT. All rights reserved.\n\n' + result += '// auto generated, do not modify\n//-V::1020\n' result += '#pragma once\n' result += '#include "{}"\n'.format(build_cfg.get('generated-cpp-header-file-name')) diff --git a/prog/gameLibs/spirv/gen_nodes.py b/prog/gameLibs/spirv/gen_nodes.py index 6680b9729..92a680357 100644 --- a/prog/gameLibs/spirv/gen_nodes.py +++ b/prog/gameLibs/spirv/gen_nodes.py @@ -428,7 +428,20 @@ def make_execution_mode_infos(language): result += 'template void executionModeVisitor(T *t, U u) {\n' result += 'switch (t->mode) {' + + uniqueSwitchOps = [] + + duplicatedEntry = False for e in executionModelType.values: + for j in uniqueSwitchOps: + if e.value == j: + duplicatedEntry = True + result += '//duplicated {} = {} \n'.format(e.name, e.value) + break + if duplicatedEntry: + continue + uniqueSwitchOps.append(e.value) + result += 'case {}::{}:\n'.format(executionModelType.get_type_name(), e.name) result += 'u(reinterpret_cast<{}{} *>(t)); break;\n'.format(executionModelType.get_type_name(), e.name) result += '}\n' @@ -1124,7 +1137,8 @@ def make_node_definitions_new(language): return result def generate_module_nodes(language, build_cfg): - result = '// this file is auto generated, do not modify\n' + result = '// Copyright (C) Gaijin Games KFT. All rights reserved.\n\n' + result += '// auto generated, do not modify!\n' result += '#pragma once\n' result += '#include "{}"\n'.format(build_cfg.get('generated-cpp-header-file-name')) diff --git a/prog/gameLibs/spirv/gen_reader.py b/prog/gameLibs/spirv/gen_reader.py index d11f0f87e..cc4827c8f 100644 --- a/prog/gameLibs/spirv/gen_reader.py +++ b/prog/gameLibs/spirv/gen_reader.py @@ -685,7 +685,19 @@ def generate_instruction_reader(language, instruction): result += 'switch ({}.value)'.format(modeName) result += '{\n' extParamNames = generate_extended_params_value_names(modeType, False) + uniqueSwitchOps = [] for e in modeType.values: + + duplicatedEntry = False + for j in uniqueSwitchOps: + if e.value == j: + duplicatedEntry = True + result += '//duplicated {} = {} \n'.format(e.name, e.value) + break + if duplicatedEntry: + continue + uniqueSwitchOps.append(e.value) + result += 'case {}::{}:\n'.format(modeType.get_type_name(), e.name) paramList = [] forwardRefs = [] @@ -735,10 +747,11 @@ def generate_instruction_reader(language, instruction): return result def generate_module_reader(language, build_cfg): - result = '// auto generated, do not modify!\n' - result += '#include "{}"\n'.format(build_cfg.get('module-decoder-file-name')) - result += '#include \n' + result = '// Copyright (C) Gaijin Games KFT. All rights reserved.\n\n' + result += '// auto generated, do not modify!\n' result += '#include "{}"\n'.format(build_cfg.get('module-node-file-name')) + result += '#include \n' + result += '#include "{}"\n'.format(build_cfg.get('module-decoder-file-name')) result += 'using namespace spirv;\n' result += 'struct PorpertyCloneVisitor {\n' diff --git a/prog/gameLibs/spirv/gen_traits.py b/prog/gameLibs/spirv/gen_traits.py index 0cce326d7..018914979 100644 --- a/prog/gameLibs/spirv/gen_traits.py +++ b/prog/gameLibs/spirv/gen_traits.py @@ -64,10 +64,8 @@ def make_extended_grammar_enums(language): # then all bitfields for e in language.enumerate_types('BitEnum'): if e.grammar.name == 'core': - # fill in missing & and ^ operator to complete bit ops - for o in operators: - if o != '|': # | already handled by khronos header - result += 'inline {0}Mask operator{1}({0}Mask a, {0}Mask b) {{ return {0}Mask(unsigned(a) {1} unsigned(b)); }}\n'.format(e.name, o) + # nothing to do + result += '' else: result += 'enum class {}Mask:unsigned{{\n'.format(e.name) result += ',\n'.join(['MaskNone = 0x00000000'] + ['{} = 0x{:0>8X}'.format(i.name, i.value) for i in e.values]) @@ -477,7 +475,9 @@ def generate_header(language, cfg, module_sections_json): return result def generate_source(language, cfg): - result = '#include "{}"\n'.format(cfg.get('generated-cpp-header-file-name')) + result = '// Copyright (C) Gaijin Games KFT. All rights reserved.\n' + result += '// auto generated, do not modify!\n' + result += '#include "{}"\n'.format(cfg.get('generated-cpp-header-file-name')) result += 'using namespace spirv;\n' idFindTemplate = 'for (Id i = 0; i < static_cast({1}); ++i) if (string_equals(name, {0}[i], name_len)) return static_cast<{2}>(i); return {1};' @@ -535,8 +535,7 @@ def generate_source(language, cfg): def make_traits_header_preamble(): return '//\n' \ '// Dagor Engine 6.5 - Game Libraries\n' \ - '// Copyright (C) 2023 Gaijin Games KFT. All rights reserved\n' \ - '// (for conditions of use see prog/license.txt)\n' \ + '// Copyright (C) Gaijin Games KFT. All rights reserved.\n' \ '//\n' \ '#pragma once\n\n' \ '// Auto Generated File, Generated By spirv/gen_traits.py\n\n' diff --git a/prog/gameLibs/spirv/gen_writer.py b/prog/gameLibs/spirv/gen_writer.py index 7d7dd9e22..aad4e837f 100644 --- a/prog/gameLibs/spirv/gen_writer.py +++ b/prog/gameLibs/spirv/gen_writer.py @@ -379,6 +379,9 @@ def make_encoder_for_node(language, node): pName = make_node_param_name(p, pIndex) if p.type.category == 'Id': result += 'target.writeWord(value->{}->resultId);\n'.format(pName) + elif p.type.category == 'ValueEnum': + # usual word should be ok here + result += 'target.writeWord((uint32_t)(value->{}));\n'.format(pName) else: result += 'target.writeWord(static_cast(value->{}.value));\n'.format(pName) pIndex += 1 @@ -779,7 +782,8 @@ def generate_module_opcodes_writer(language): return result def generate_module_writer(language, cfg, module_sections_json): - result = '// auto generated, do not modify!\n' + result = '// Copyright (C) Gaijin Games KFT. All rights reserved.\n\n' + result += '// auto generated, do not modify!\n' result += '#include "{}"\n'.format(cfg.get('module-node-file-name')) result += '#include \n' result += 'using namespace spirv;\n' diff --git a/prog/gameLibs/spirv/instruction.properties.json b/prog/gameLibs/spirv/instruction.properties.json index 1bf621aa3..7b9ac3ff5 100644 --- a/prog/gameLibs/spirv/instruction.properties.json +++ b/prog/gameLibs/spirv/instruction.properties.json @@ -1,7 +1,4 @@ { - "info": [ - "Auto generated extended grammar by spirv_meta_data_tools.make_extended_grammar_json_ready_def" - ], "instructions": [ { "opname": "OpNop", @@ -14,8 +11,8 @@ "opname": "OpUndef", "grammar": "core", "properties": [ - "undef", "allocates-id", + "undef", "result-type" ] }, @@ -31,9 +28,9 @@ "opname": "OpSource", "grammar": "core", "properties": [ + "source-code", "debug", - "source-language", - "source-code" + "source-language" ] }, { @@ -56,24 +53,24 @@ "opname": "OpMemberName", "grammar": "core", "properties": [ - "debug", - "object-member-name" + "object-member-name", + "debug" ] }, { "opname": "OpString", "grammar": "core", "properties": [ - "source-file", - "allocates-id" + "allocates-id", + "source-file" ] }, { "opname": "OpLine", "grammar": "core", "properties": [ - "action", - "begin-source-position" + "begin-source-position", + "action" ] }, { @@ -95,8 +92,8 @@ "opname": "OpExtInst", "grammar": "core", "properties": [ - "call-extended-grammar", "allocates-id", + "call-extended-grammar", "result-type" ] }, @@ -148,8 +145,8 @@ "opname": "OpTypeInt", "grammar": "core", "properties": [ - "bit-size", "typedef", + "bit-size", "allocates-id" ] }, @@ -157,8 +154,8 @@ "opname": "OpTypeFloat", "grammar": "core", "properties": [ - "bit-size", "typedef", + "bit-size", "allocates-id" ] }, @@ -294,17 +291,17 @@ "opname": "OpTypeForwardPointer", "grammar": "core", "properties": [ + "forward-typedef", "action", - "unary", - "forward-typedef" + "unary" ] }, { "opname": "OpConstantTrue", "grammar": "core", "properties": [ - "constant", "allocates-id", + "constant", "result-type" ] }, @@ -312,8 +309,8 @@ "opname": "OpConstantFalse", "grammar": "core", "properties": [ - "constant", "allocates-id", + "constant", "result-type" ] }, @@ -321,8 +318,8 @@ "opname": "OpConstant", "grammar": "core", "properties": [ - "constant", "allocates-id", + "constant", "result-type" ] }, @@ -330,9 +327,9 @@ "opname": "OpConstantComposite", "grammar": "core", "properties": [ + "allocates-id", "composite-constant", "constant", - "allocates-id", "result-type" ] }, @@ -340,9 +337,9 @@ "opname": "OpConstantSampler", "grammar": "core", "properties": [ - "sampler-constant", - "constant", "allocates-id", + "constant", + "sampler-constant", "result-type" ] }, @@ -350,8 +347,8 @@ "opname": "OpConstantNull", "grammar": "core", "properties": [ - "constant", "allocates-id", + "constant", "result-type" ] }, @@ -359,8 +356,8 @@ "opname": "OpSpecConstantTrue", "grammar": "core", "properties": [ - "spec-constant", "allocates-id", + "spec-constant", "result-type" ] }, @@ -368,8 +365,8 @@ "opname": "OpSpecConstantFalse", "grammar": "core", "properties": [ - "spec-constant", "allocates-id", + "spec-constant", "result-type" ] }, @@ -377,8 +374,8 @@ "opname": "OpSpecConstant", "grammar": "core", "properties": [ - "spec-constant", "allocates-id", + "spec-constant", "result-type" ] }, @@ -386,9 +383,9 @@ "opname": "OpSpecConstantComposite", "grammar": "core", "properties": [ + "allocates-id", "spec-constant", "composite-constant", - "allocates-id", "result-type" ] }, @@ -396,9 +393,9 @@ "opname": "OpSpecConstantOp", "grammar": "core", "properties": [ - "spec-op", - "spec-constant", "allocates-id", + "spec-constant", + "spec-op", "result-type" ] }, @@ -406,8 +403,8 @@ "opname": "OpFunction", "grammar": "core", "properties": [ - "function-begin", "allocates-id", + "function-begin", "result-type" ] }, @@ -415,9 +412,9 @@ "opname": "OpFunctionParameter", "grammar": "core", "properties": [ + "allocates-id", "function-parameter", "variable", - "allocates-id", "result-type" ] }, @@ -432,8 +429,8 @@ "opname": "OpFunctionCall", "grammar": "core", "properties": [ - "function-call", "allocates-id", + "function-call", "result-type" ] }, @@ -441,9 +438,9 @@ "opname": "OpVariable", "grammar": "core", "properties": [ - "variable", "global-variable", "allocates-id", + "variable", "result-type" ] }, @@ -451,8 +448,8 @@ "opname": "OpImageTexelPointer", "grammar": "core", "properties": [ - "variable", "allocates-id", + "variable", "result-type" ] }, @@ -460,8 +457,8 @@ "opname": "OpLoad", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -469,32 +466,32 @@ "opname": "OpStore", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { "opname": "OpCopyMemory", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { "opname": "OpCopyMemorySized", "grammar": "core", "properties": [ - "action", - "trinary" + "trinary", + "action" ] }, { "opname": "OpAccessChain", "grammar": "core", "properties": [ - "variable", "allocates-id", + "variable", "result-type" ] }, @@ -502,8 +499,8 @@ "opname": "OpInBoundsAccessChain", "grammar": "core", "properties": [ - "variable", "allocates-id", + "variable", "result-type" ] }, @@ -511,8 +508,8 @@ "opname": "OpPtrAccessChain", "grammar": "core", "properties": [ - "variable", "allocates-id", + "variable", "result-type" ] }, @@ -520,8 +517,8 @@ "opname": "OpArrayLength", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -529,8 +526,8 @@ "opname": "OpGenericPtrMemSemantics", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -538,8 +535,8 @@ "opname": "OpInBoundsPtrAccessChain", "grammar": "core", "properties": [ - "variable", "allocates-id", + "variable", "result-type" ] }, @@ -554,41 +551,41 @@ "opname": "OpMemberDecorate", "grammar": "core", "properties": [ - "member-property", - "adds-property" + "adds-property", + "member-property" ] }, { "opname": "OpDecorationGroup", "grammar": "core", "properties": [ - "create-property-group", - "allocates-id" + "allocates-id", + "create-property-group" ] }, { "opname": "OpGroupDecorate", "grammar": "core", "properties": [ - "use-property-group", - "adds-property" + "adds-property", + "use-property-group" ] }, { "opname": "OpGroupMemberDecorate", "grammar": "core", "properties": [ + "adds-property", "use-property-group", - "member-property", - "adds-property" + "member-property" ] }, { "opname": "OpVectorExtractDynamic", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -596,8 +593,8 @@ "opname": "OpVectorInsertDynamic", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -605,8 +602,8 @@ "opname": "OpVectorShuffle", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -622,8 +619,8 @@ "opname": "OpCompositeExtract", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -631,8 +628,8 @@ "opname": "OpCompositeInsert", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -640,8 +637,8 @@ "opname": "OpCopyObject", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -649,8 +646,8 @@ "opname": "OpTranspose", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -658,8 +655,8 @@ "opname": "OpSampledImage", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -667,8 +664,8 @@ "opname": "OpImageSampleImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -676,8 +673,8 @@ "opname": "OpImageSampleExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -685,8 +682,8 @@ "opname": "OpImageSampleDrefImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -694,8 +691,8 @@ "opname": "OpImageSampleDrefExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -703,8 +700,8 @@ "opname": "OpImageSampleProjImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -712,8 +709,8 @@ "opname": "OpImageSampleProjExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -721,8 +718,8 @@ "opname": "OpImageSampleProjDrefImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -730,8 +727,8 @@ "opname": "OpImageSampleProjDrefExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -739,8 +736,8 @@ "opname": "OpImageFetch", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -748,8 +745,8 @@ "opname": "OpImageGather", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -757,8 +754,8 @@ "opname": "OpImageDrefGather", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -766,8 +763,8 @@ "opname": "OpImageRead", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -775,16 +772,16 @@ "opname": "OpImageWrite", "grammar": "core", "properties": [ - "action", - "image-op" + "image-op", + "action" ] }, { "opname": "OpImage", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -792,8 +789,8 @@ "opname": "OpImageQueryFormat", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -801,8 +798,8 @@ "opname": "OpImageQueryOrder", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -810,8 +807,8 @@ "opname": "OpImageQuerySizeLod", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -819,8 +816,8 @@ "opname": "OpImageQuerySize", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -828,8 +825,8 @@ "opname": "OpImageQueryLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -837,8 +834,8 @@ "opname": "OpImageQueryLevels", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -846,8 +843,8 @@ "opname": "OpImageQuerySamples", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -855,8 +852,8 @@ "opname": "OpConvertFToU", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -864,8 +861,8 @@ "opname": "OpConvertFToS", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -873,8 +870,8 @@ "opname": "OpConvertSToF", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -882,8 +879,8 @@ "opname": "OpConvertUToF", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -891,8 +888,8 @@ "opname": "OpUConvert", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -900,8 +897,8 @@ "opname": "OpSConvert", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -909,8 +906,8 @@ "opname": "OpFConvert", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -918,8 +915,8 @@ "opname": "OpQuantizeToF16", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -927,8 +924,8 @@ "opname": "OpConvertPtrToU", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -936,8 +933,8 @@ "opname": "OpSatConvertSToU", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -945,8 +942,8 @@ "opname": "OpSatConvertUToS", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -954,8 +951,8 @@ "opname": "OpConvertUToPtr", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -963,8 +960,8 @@ "opname": "OpPtrCastToGeneric", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -972,8 +969,8 @@ "opname": "OpGenericCastToPtr", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -981,8 +978,8 @@ "opname": "OpGenericCastToPtrExplicit", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -990,8 +987,8 @@ "opname": "OpBitcast", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -999,8 +996,8 @@ "opname": "OpSNegate", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1008,8 +1005,8 @@ "opname": "OpFNegate", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1017,8 +1014,8 @@ "opname": "OpIAdd", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1026,8 +1023,8 @@ "opname": "OpFAdd", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1035,8 +1032,8 @@ "opname": "OpISub", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1044,8 +1041,8 @@ "opname": "OpFSub", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1053,8 +1050,8 @@ "opname": "OpIMul", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1062,8 +1059,8 @@ "opname": "OpFMul", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1071,8 +1068,8 @@ "opname": "OpUDiv", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1080,8 +1077,8 @@ "opname": "OpSDiv", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1089,8 +1086,8 @@ "opname": "OpFDiv", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1098,8 +1095,8 @@ "opname": "OpUMod", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1107,8 +1104,8 @@ "opname": "OpSRem", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1116,8 +1113,8 @@ "opname": "OpSMod", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1125,8 +1122,8 @@ "opname": "OpFRem", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1134,8 +1131,8 @@ "opname": "OpFMod", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1143,8 +1140,8 @@ "opname": "OpVectorTimesScalar", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1152,8 +1149,8 @@ "opname": "OpMatrixTimesScalar", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1161,8 +1158,8 @@ "opname": "OpVectorTimesMatrix", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1170,8 +1167,8 @@ "opname": "OpMatrixTimesVector", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1179,8 +1176,8 @@ "opname": "OpMatrixTimesMatrix", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1188,8 +1185,8 @@ "opname": "OpOuterProduct", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1197,8 +1194,8 @@ "opname": "OpDot", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1206,8 +1203,8 @@ "opname": "OpIAddCarry", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1215,8 +1212,8 @@ "opname": "OpISubBorrow", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1224,8 +1221,8 @@ "opname": "OpUMulExtended", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1233,8 +1230,8 @@ "opname": "OpSMulExtended", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1242,8 +1239,8 @@ "opname": "OpAny", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1251,8 +1248,8 @@ "opname": "OpAll", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1260,8 +1257,8 @@ "opname": "OpIsNan", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1269,8 +1266,8 @@ "opname": "OpIsInf", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1278,8 +1275,8 @@ "opname": "OpIsFinite", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1287,8 +1284,8 @@ "opname": "OpIsNormal", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1296,8 +1293,8 @@ "opname": "OpSignBitSet", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1305,8 +1302,8 @@ "opname": "OpLessOrGreater", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1314,8 +1311,8 @@ "opname": "OpOrdered", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1323,8 +1320,8 @@ "opname": "OpUnordered", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1332,8 +1329,8 @@ "opname": "OpLogicalEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1341,8 +1338,8 @@ "opname": "OpLogicalNotEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1350,8 +1347,8 @@ "opname": "OpLogicalOr", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1359,8 +1356,8 @@ "opname": "OpLogicalAnd", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1368,8 +1365,8 @@ "opname": "OpLogicalNot", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1377,8 +1374,8 @@ "opname": "OpSelect", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -1386,8 +1383,8 @@ "opname": "OpIEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1395,8 +1392,8 @@ "opname": "OpINotEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1404,8 +1401,8 @@ "opname": "OpUGreaterThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1413,8 +1410,8 @@ "opname": "OpSGreaterThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1422,8 +1419,8 @@ "opname": "OpUGreaterThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1431,8 +1428,8 @@ "opname": "OpSGreaterThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1440,8 +1437,8 @@ "opname": "OpULessThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1449,8 +1446,8 @@ "opname": "OpSLessThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1458,8 +1455,8 @@ "opname": "OpULessThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1467,8 +1464,8 @@ "opname": "OpSLessThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1476,8 +1473,8 @@ "opname": "OpFOrdEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1485,8 +1482,8 @@ "opname": "OpFUnordEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1494,8 +1491,8 @@ "opname": "OpFOrdNotEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1503,8 +1500,8 @@ "opname": "OpFUnordNotEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1512,8 +1509,8 @@ "opname": "OpFOrdLessThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1521,8 +1518,8 @@ "opname": "OpFUnordLessThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1530,8 +1527,8 @@ "opname": "OpFOrdGreaterThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1539,8 +1536,8 @@ "opname": "OpFUnordGreaterThan", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1548,8 +1545,8 @@ "opname": "OpFOrdLessThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1557,8 +1554,8 @@ "opname": "OpFUnordLessThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1566,8 +1563,8 @@ "opname": "OpFOrdGreaterThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1575,8 +1572,8 @@ "opname": "OpFUnordGreaterThanEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1584,8 +1581,8 @@ "opname": "OpShiftRightLogical", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1593,8 +1590,8 @@ "opname": "OpShiftRightArithmetic", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1602,8 +1599,8 @@ "opname": "OpShiftLeftLogical", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1611,8 +1608,8 @@ "opname": "OpBitwiseOr", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1620,8 +1617,8 @@ "opname": "OpBitwiseXor", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1629,8 +1626,8 @@ "opname": "OpBitwiseAnd", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -1638,8 +1635,8 @@ "opname": "OpNot", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1647,8 +1644,8 @@ "opname": "OpBitFieldInsert", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -1656,8 +1653,8 @@ "opname": "OpBitFieldSExtract", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -1665,8 +1662,8 @@ "opname": "OpBitFieldUExtract", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -1674,8 +1671,8 @@ "opname": "OpBitReverse", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1683,8 +1680,8 @@ "opname": "OpBitCount", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1692,8 +1689,8 @@ "opname": "OpDPdx", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1701,8 +1698,8 @@ "opname": "OpDPdy", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1710,8 +1707,8 @@ "opname": "OpFwidth", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1719,8 +1716,8 @@ "opname": "OpDPdxFine", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1728,8 +1725,8 @@ "opname": "OpDPdyFine", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1737,8 +1734,8 @@ "opname": "OpFwidthFine", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1746,8 +1743,8 @@ "opname": "OpDPdxCoarse", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1755,8 +1752,8 @@ "opname": "OpDPdyCoarse", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1764,8 +1761,8 @@ "opname": "OpFwidthCoarse", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -1819,9 +1816,9 @@ "opname": "OpAtomicLoad", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1829,8 +1826,8 @@ "opname": "OpAtomicStore", "grammar": "core", "properties": [ - "atomic-op", "action", + "atomic-op", "unary" ] }, @@ -1838,9 +1835,9 @@ "opname": "OpAtomicExchange", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1848,9 +1845,9 @@ "opname": "OpAtomicCompareExchange", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1858,9 +1855,9 @@ "opname": "OpAtomicCompareExchangeWeak", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1868,9 +1865,9 @@ "opname": "OpAtomicIIncrement", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1878,9 +1875,9 @@ "opname": "OpAtomicIDecrement", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1888,9 +1885,9 @@ "opname": "OpAtomicIAdd", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1898,9 +1895,9 @@ "opname": "OpAtomicISub", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1908,9 +1905,9 @@ "opname": "OpAtomicSMin", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1918,9 +1915,9 @@ "opname": "OpAtomicUMin", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1928,9 +1925,9 @@ "opname": "OpAtomicSMax", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1938,9 +1935,9 @@ "opname": "OpAtomicUMax", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1948,9 +1945,9 @@ "opname": "OpAtomicAnd", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1958,9 +1955,9 @@ "opname": "OpAtomicOr", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -1968,9 +1965,9 @@ "opname": "OpAtomicXor", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -2003,32 +2000,32 @@ "opname": "OpLabel", "grammar": "core", "properties": [ - "block-begin", - "allocates-id" + "allocates-id", + "block-begin" ] }, { "opname": "OpBranch", "grammar": "core", "properties": [ - "ends-block", - "branch" + "branch", + "ends-block" ] }, { "opname": "OpBranchConditional", "grammar": "core", "properties": [ - "ends-block", - "branch-conditional" + "branch-conditional", + "ends-block" ] }, { "opname": "OpSwitch", "grammar": "core", "properties": [ - "switch-section", - "ends-block" + "ends-block", + "switch-section" ] }, { @@ -2043,17 +2040,17 @@ "opname": "OpReturn", "grammar": "core", "properties": [ - "exit-function", - "ends-block" + "ends-block", + "exit-function" ] }, { "opname": "OpReturnValue", "grammar": "core", "properties": [ - "exit-function", + "function-result", "ends-block", - "function-result" + "exit-function" ] }, { @@ -2083,8 +2080,8 @@ "opname": "OpGroupAsyncCopy", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2100,8 +2097,8 @@ "opname": "OpGroupAll", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2109,8 +2106,8 @@ "opname": "OpGroupAny", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2118,8 +2115,8 @@ "opname": "OpGroupBroadcast", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2127,9 +2124,9 @@ "opname": "OpGroupIAdd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2137,9 +2134,9 @@ "opname": "OpGroupFAdd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2147,9 +2144,9 @@ "opname": "OpGroupFMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2157,9 +2154,9 @@ "opname": "OpGroupUMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2167,9 +2164,9 @@ "opname": "OpGroupSMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2177,9 +2174,9 @@ "opname": "OpGroupFMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2187,9 +2184,9 @@ "opname": "OpGroupUMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2197,9 +2194,9 @@ "opname": "OpGroupSMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2207,8 +2204,8 @@ "opname": "OpReadPipe", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2216,8 +2213,8 @@ "opname": "OpWritePipe", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2225,8 +2222,8 @@ "opname": "OpReservedReadPipe", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2234,8 +2231,8 @@ "opname": "OpReservedWritePipe", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2243,8 +2240,8 @@ "opname": "OpReserveReadPipePackets", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2252,8 +2249,8 @@ "opname": "OpReserveWritePipePackets", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2277,8 +2274,8 @@ "opname": "OpIsValidReserveId", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2286,8 +2283,8 @@ "opname": "OpGetNumPipePackets", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -2295,8 +2292,8 @@ "opname": "OpGetMaxPipePackets", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -2304,8 +2301,8 @@ "opname": "OpGroupReserveReadPipePackets", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2313,8 +2310,8 @@ "opname": "OpGroupReserveWritePipePackets", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2338,8 +2335,8 @@ "opname": "OpEnqueueMarker", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2347,8 +2344,8 @@ "opname": "OpEnqueueKernel", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2356,8 +2353,8 @@ "opname": "OpGetKernelNDrangeSubGroupCount", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2365,8 +2362,8 @@ "opname": "OpGetKernelNDrangeMaxSubGroupSize", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2374,8 +2371,8 @@ "opname": "OpGetKernelWorkGroupSize", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2383,8 +2380,8 @@ "opname": "OpGetKernelPreferredWorkGroupSizeMultiple", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2416,8 +2413,8 @@ "opname": "OpIsValidEvent", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2425,16 +2422,16 @@ "opname": "OpSetUserEventStatus", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { "opname": "OpCaptureEventProfilingInfo", "grammar": "core", "properties": [ - "action", - "trinary" + "trinary", + "action" ] }, { @@ -2449,8 +2446,8 @@ "opname": "OpBuildNDRange", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -2458,8 +2455,8 @@ "opname": "OpImageSparseSampleImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2467,8 +2464,8 @@ "opname": "OpImageSparseSampleExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2476,8 +2473,8 @@ "opname": "OpImageSparseSampleDrefImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2485,8 +2482,8 @@ "opname": "OpImageSparseSampleDrefExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2494,8 +2491,8 @@ "opname": "OpImageSparseSampleProjImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2503,8 +2500,8 @@ "opname": "OpImageSparseSampleProjExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2512,8 +2509,8 @@ "opname": "OpImageSparseSampleProjDrefImplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2521,8 +2518,8 @@ "opname": "OpImageSparseSampleProjDrefExplicitLod", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2530,8 +2527,8 @@ "opname": "OpImageSparseFetch", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -2539,8 +2536,8 @@ "opname": "OpImageSparseGather", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2548,8 +2545,8 @@ "opname": "OpImageSparseDrefGather", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "sampled-image-op", "result-type" ] }, @@ -2557,8 +2554,8 @@ "opname": "OpImageSparseTexelsResident", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2566,17 +2563,17 @@ "opname": "OpNoLine", "grammar": "core", "properties": [ - "action", - "end-source-position" + "end-source-position", + "action" ] }, { "opname": "OpAtomicFlagTestAndSet", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -2584,8 +2581,8 @@ "opname": "OpAtomicFlagClear", "grammar": "core", "properties": [ - "atomic-op", "action", + "atomic-op", "unary" ] }, @@ -2593,8 +2590,8 @@ "opname": "OpImageSparseRead", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -2602,8 +2599,8 @@ "opname": "OpSizeOf", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2619,8 +2616,8 @@ "opname": "OpConstantPipeStorage", "grammar": "core", "properties": [ - "constant", "allocates-id", + "constant", "result-type" ] }, @@ -2628,8 +2625,8 @@ "opname": "OpCreatePipeFromPipeStorage", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2637,8 +2634,8 @@ "opname": "OpGetKernelLocalSizeForSubgroupCount", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2646,8 +2643,8 @@ "opname": "OpGetKernelMaxNumSubgroups", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -2663,8 +2660,8 @@ "opname": "OpNamedBarrierInitialize", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -2695,16 +2692,16 @@ "opname": "OpDecorateId", "grammar": "core", "properties": [ - "property-type-id", - "adds-property" + "adds-property", + "property-type-id" ] }, { "opname": "OpGroupNonUniformElect", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2712,8 +2709,8 @@ "opname": "OpGroupNonUniformAll", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2721,8 +2718,8 @@ "opname": "OpGroupNonUniformAny", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2730,8 +2727,8 @@ "opname": "OpGroupNonUniformAllEqual", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2739,8 +2736,8 @@ "opname": "OpGroupNonUniformBroadcast", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2748,8 +2745,8 @@ "opname": "OpGroupNonUniformBroadcastFirst", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2757,8 +2754,8 @@ "opname": "OpGroupNonUniformBallot", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2766,8 +2763,8 @@ "opname": "OpGroupNonUniformInverseBallot", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2775,8 +2772,8 @@ "opname": "OpGroupNonUniformBallotBitExtract", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2784,9 +2781,9 @@ "opname": "OpGroupNonUniformBallotBitCount", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2794,8 +2791,8 @@ "opname": "OpGroupNonUniformBallotFindLSB", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2803,8 +2800,8 @@ "opname": "OpGroupNonUniformBallotFindMSB", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2812,8 +2809,8 @@ "opname": "OpGroupNonUniformShuffle", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2821,8 +2818,8 @@ "opname": "OpGroupNonUniformShuffleXor", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2830,8 +2827,8 @@ "opname": "OpGroupNonUniformShuffleUp", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2839,8 +2836,8 @@ "opname": "OpGroupNonUniformShuffleDown", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -2848,9 +2845,9 @@ "opname": "OpGroupNonUniformIAdd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2858,9 +2855,9 @@ "opname": "OpGroupNonUniformFAdd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2868,9 +2865,9 @@ "opname": "OpGroupNonUniformIMul", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2878,9 +2875,9 @@ "opname": "OpGroupNonUniformFMul", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2888,9 +2885,9 @@ "opname": "OpGroupNonUniformSMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2898,9 +2895,9 @@ "opname": "OpGroupNonUniformUMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2908,9 +2905,9 @@ "opname": "OpGroupNonUniformFMin", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2918,9 +2915,9 @@ "opname": "OpGroupNonUniformSMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2928,9 +2925,9 @@ "opname": "OpGroupNonUniformUMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2938,9 +2935,9 @@ "opname": "OpGroupNonUniformFMax", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2948,9 +2945,9 @@ "opname": "OpGroupNonUniformBitwiseAnd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2958,9 +2955,9 @@ "opname": "OpGroupNonUniformBitwiseOr", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2968,9 +2965,9 @@ "opname": "OpGroupNonUniformBitwiseXor", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2978,9 +2975,9 @@ "opname": "OpGroupNonUniformLogicalAnd", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2988,9 +2985,9 @@ "opname": "OpGroupNonUniformLogicalOr", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -2998,9 +2995,9 @@ "opname": "OpGroupNonUniformLogicalXor", "grammar": "core", "properties": [ + "allocates-id", "grouped", "scoped", - "allocates-id", "result-type" ] }, @@ -3008,8 +3005,8 @@ "opname": "OpGroupNonUniformQuadBroadcast", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -3017,8 +3014,8 @@ "opname": "OpGroupNonUniformQuadSwap", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "scoped", "result-type" ] }, @@ -3026,8 +3023,8 @@ "opname": "OpCopyLogical", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3035,8 +3032,8 @@ "opname": "OpPtrEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3044,8 +3041,8 @@ "opname": "OpPtrNotEqual", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3053,7 +3050,32 @@ "opname": "OpPtrDiff", "grammar": "core", "properties": [ + "allocates-id", "binary", + "result-type" + ] + }, + { + "opname": "OpColorAttachmentReadEXT", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpDepthAttachmentReadEXT", + "grammar": "core", + "properties": [ + "allocates-id", + "result-type" + ] + }, + { + "opname": "OpStencilAttachmentReadEXT", + "grammar": "core", + "properties": [ "allocates-id", "result-type" ] @@ -3069,8 +3091,8 @@ "opname": "OpSubgroupBallotKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3078,8 +3100,8 @@ "opname": "OpSubgroupFirstInvocationKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3087,8 +3109,8 @@ "opname": "OpSubgroupAllKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3096,8 +3118,8 @@ "opname": "OpSubgroupAnyKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3105,8 +3127,17 @@ "opname": "OpSubgroupAllEqualKHR", "grammar": "core", "properties": [ + "allocates-id", "unary", + "result-type" + ] + }, + { + "opname": "OpGroupNonUniformRotateKHR", + "grammar": "core", + "properties": [ "allocates-id", + "scoped", "result-type" ] }, @@ -3114,8 +3145,17 @@ "opname": "OpSubgroupReadInvocationKHR", "grammar": "core", "properties": [ + "allocates-id", "binary", + "result-type" + ] + }, + { + "opname": "OpExtInstWithForwardRefsKHR", + "grammar": "core", + "properties": [ "allocates-id", + "unary", "result-type" ] }, @@ -3131,16 +3171,16 @@ "opname": "OpExecuteCallableKHR", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { "opname": "OpConvertUToAccelerationStructureKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3162,8 +3202,8 @@ "opname": "OpSDot", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3171,8 +3211,8 @@ "opname": "OpSDotKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3180,8 +3220,8 @@ "opname": "OpUDot", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3189,8 +3229,8 @@ "opname": "OpUDotKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3198,8 +3238,8 @@ "opname": "OpSUDot", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3207,8 +3247,8 @@ "opname": "OpSUDotKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3216,8 +3256,8 @@ "opname": "OpSDotAccSat", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3225,8 +3265,8 @@ "opname": "OpSDotAccSatKHR", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3234,8 +3274,8 @@ "opname": "OpUDotAccSat", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3243,8 +3283,8 @@ "opname": "OpUDotAccSatKHR", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3252,8 +3292,8 @@ "opname": "OpSUDotAccSat", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3261,13 +3301,13 @@ "opname": "OpSUDotAccSatKHR", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, { - "opname": "OpTypeRayQueryKHR", + "opname": "OpTypeCooperativeMatrixKHR", "grammar": "core", "properties": [ "typedef", @@ -3275,211 +3315,717 @@ ] }, { - "opname": "OpRayQueryInitializeKHR", + "opname": "OpCooperativeMatrixLoadKHR", "grammar": "core", "properties": [ - "action", - "multinary" + "allocates-id", + "binary", + "result-type" ] }, { - "opname": "OpRayQueryTerminateKHR", + "opname": "OpCooperativeMatrixStoreKHR", "grammar": "core", "properties": [ - "action", - "unary" + "trinary", + "action" ] }, { - "opname": "OpRayQueryGenerateIntersectionKHR", + "opname": "OpCooperativeMatrixMulAddKHR", "grammar": "core", "properties": [ - "action", - "binary" + "allocates-id", + "trinary", + "result-type" ] }, { - "opname": "OpRayQueryConfirmIntersectionKHR", + "opname": "OpCooperativeMatrixLengthKHR", "grammar": "core", "properties": [ - "action", - "unary" + "allocates-id", + "unary", + "result-type" ] }, { - "opname": "OpRayQueryProceedKHR", + "opname": "OpConstantCompositeReplicateEXT", "grammar": "core", "properties": [ + "composite-constant", "unary", + "result-type", "allocates-id", - "result-type" + "constant" ] }, { - "opname": "OpRayQueryGetIntersectionTypeKHR", + "opname": "OpSpecConstantCompositeReplicateEXT", "grammar": "core", "properties": [ - "binary", - "allocates-id", - "result-type" + "spec-constant", + "composite-constant", + "unary", + "result-type", + "allocates-id" ] }, { - "opname": "OpGroupIAddNonUniformAMD", + "opname": "OpCompositeConstructReplicateEXT", "grammar": "core", "properties": [ - "grouped", - "scoped", "allocates-id", + "unary", "result-type" ] }, { - "opname": "OpGroupFAddNonUniformAMD", + "opname": "OpTypeRayQueryKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", - "allocates-id", - "result-type" + "typedef", + "allocates-id" ] }, { - "opname": "OpGroupFMinNonUniformAMD", + "opname": "OpRayQueryInitializeKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", - "allocates-id", - "result-type" + "action", + "multinary" ] }, { - "opname": "OpGroupUMinNonUniformAMD", + "opname": "OpRayQueryTerminateKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", - "allocates-id", - "result-type" + "action", + "unary" ] }, { - "opname": "OpGroupSMinNonUniformAMD", + "opname": "OpRayQueryGenerateIntersectionKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", - "allocates-id", - "result-type" + "binary", + "action" ] }, { - "opname": "OpGroupFMaxNonUniformAMD", + "opname": "OpRayQueryConfirmIntersectionKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", - "allocates-id", - "result-type" + "action", + "unary" ] }, { - "opname": "OpGroupUMaxNonUniformAMD", + "opname": "OpRayQueryProceedKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", "allocates-id", + "unary", "result-type" ] }, { - "opname": "OpGroupSMaxNonUniformAMD", + "opname": "OpRayQueryGetIntersectionTypeKHR", "grammar": "core", "properties": [ - "grouped", - "scoped", "allocates-id", + "binary", "result-type" ] }, { - "opname": "OpFragmentMaskFetchAMD", + "opname": "OpImageSampleWeightedQCOM", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "trinary", "result-type" ] }, { - "opname": "OpFragmentFetchAMD", + "opname": "OpImageBoxFilterQCOM", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "trinary", "result-type" ] }, { - "opname": "OpReadClockKHR", + "opname": "OpImageBlockMatchSSDQCOM", "grammar": "core", "properties": [ - "scoped", "allocates-id", + "multinary", "result-type" ] }, { - "opname": "OpImageSampleFootprintNV", + "opname": "OpImageBlockMatchSADQCOM", "grammar": "core", "properties": [ - "sampled-image-op", "allocates-id", + "multinary", "result-type" ] }, { - "opname": "OpGroupNonUniformPartitionNV", + "opname": "OpImageBlockMatchWindowSSDQCOM", "grammar": "core", "properties": [ - "unary", "allocates-id", + "multinary", "result-type" ] }, { - "opname": "OpWritePackedPrimitiveIndices4x8NV", + "opname": "OpImageBlockMatchWindowSADQCOM", "grammar": "core", "properties": [ - "action", - "binary" + "allocates-id", + "multinary", + "result-type" ] }, { - "opname": "OpReportIntersectionNV", + "opname": "OpImageBlockMatchGatherSSDQCOM", "grammar": "core", "properties": [ - "binary", "allocates-id", + "multinary", "result-type" ] }, { - "opname": "OpReportIntersectionKHR", + "opname": "OpImageBlockMatchGatherSADQCOM", "grammar": "core", "properties": [ - "binary", "allocates-id", + "multinary", "result-type" ] }, { - "opname": "OpIgnoreIntersectionNV", + "opname": "OpGroupIAddNonUniformAMD", "grammar": "core", "properties": [ - "action" + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupFAddNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupFMinNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupUMinNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupSMinNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupFMaxNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupUMaxNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpGroupSMaxNonUniformAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", + "result-type" + ] + }, + { + "opname": "OpFragmentMaskFetchAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "image-op", + "result-type" + ] + }, + { + "opname": "OpFragmentFetchAMD", + "grammar": "core", + "properties": [ + "allocates-id", + "image-op", + "result-type" + ] + }, + { + "opname": "OpReadClockKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "scoped", + "result-type" + ] + }, + { + "opname": "OpFinalizeNodePayloadsAMDX", + "grammar": "core", + "properties": [ + "action", + "unary" + ] + }, + { + "opname": "OpFinishWritingNodePayloadAMDX", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpInitializeNodePayloadsAMDX", + "grammar": "core", + "properties": [ + "action", + "unary" + ] + }, + { + "opname": "OpGroupNonUniformQuadAllKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpGroupNonUniformQuadAnyKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectRecordHitMotionNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectRecordHitWithIndexMotionNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectRecordMissMotionNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectGetWorldToObjectNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetObjectToWorldNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetObjectRayDirectionNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetObjectRayOriginNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectTraceRayMotionNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectGetShaderRecordBufferHandleNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetShaderBindingTableRecordIndexNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectRecordEmptyNV", + "grammar": "core", + "properties": [ + "action", + "unary" + ] + }, + { + "opname": "OpHitObjectTraceRayNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectRecordHitNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectRecordHitWithIndexNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectRecordMissNV", + "grammar": "core", + "properties": [ + "action", + "multinary" + ] + }, + { + "opname": "OpHitObjectExecuteShaderNV", + "grammar": "core", + "properties": [ + "binary", + "action" + ] + }, + { + "opname": "OpHitObjectGetCurrentTimeNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetAttributesNV", + "grammar": "core", + "properties": [ + "binary", + "action" + ] + }, + { + "opname": "OpHitObjectGetHitKindNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetPrimitiveIndexNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetGeometryIndexNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetInstanceIdNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetInstanceCustomIndexNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetWorldRayDirectionNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetWorldRayOriginNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetRayTMaxNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectGetRayTMinNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectIsEmptyNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectIsHitNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpHitObjectIsMissNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpReorderThreadWithHitObjectNV", + "grammar": "core", + "properties": [ + "action", + "unary" + ] + }, + { + "opname": "OpReorderThreadWithHintNV", + "grammar": "core", + "properties": [ + "binary", + "action" + ] + }, + { + "opname": "OpTypeHitObjectNV", + "grammar": "core", + "properties": [ + "typedef", + "allocates-id" + ] + }, + { + "opname": "OpImageSampleFootprintNV", + "grammar": "core", + "properties": [ + "allocates-id", + "sampled-image-op", + "result-type" + ] + }, + { + "opname": "OpEmitMeshTasksEXT", + "grammar": "core", + "properties": [ + "trinary", + "action" + ] + }, + { + "opname": "OpSetMeshOutputsEXT", + "grammar": "core", + "properties": [ + "binary", + "action" + ] + }, + { + "opname": "OpGroupNonUniformPartitionNV", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpWritePackedPrimitiveIndices4x8NV", + "grammar": "core", + "properties": [ + "binary", + "action" + ] + }, + { + "opname": "OpFetchMicroTriangleVertexPositionNV", + "grammar": "core", + "properties": [ + "allocates-id", + "multinary", + "result-type" + ] + }, + { + "opname": "OpFetchMicroTriangleVertexBarycentricNV", + "grammar": "core", + "properties": [ + "allocates-id", + "multinary", + "result-type" + ] + }, + { + "opname": "OpReportIntersectionKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "binary", + "result-type" + ] + }, + { + "opname": "OpReportIntersectionNV", + "grammar": "core", + "properties": [ + "allocates-id", + "binary", + "result-type" + ] + }, + { + "opname": "OpIgnoreIntersectionNV", + "grammar": "core", + "properties": [ + "action" ] }, { @@ -3514,7 +4060,16 @@ ] }, { - "opname": "OpTypeAccelerationStructureNV", + "opname": "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "binary", + "result-type" + ] + }, + { + "opname": "OpTypeAccelerationStructureKHR", "grammar": "core", "properties": [ "typedef", @@ -3522,7 +4077,7 @@ ] }, { - "opname": "OpTypeAccelerationStructureKHR", + "opname": "OpTypeAccelerationStructureNV", "grammar": "core", "properties": [ "typedef", @@ -3533,8 +4088,8 @@ "opname": "OpExecuteCallableNV", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { @@ -3549,8 +4104,8 @@ "opname": "OpCooperativeMatrixLoadNV", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3566,8 +4121,8 @@ "opname": "OpCooperativeMatrixMulAddNV", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3575,8 +4130,8 @@ "opname": "OpCooperativeMatrixLengthNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3620,8 +4175,8 @@ "opname": "OpConvertUToImageNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3629,8 +4184,8 @@ "opname": "OpConvertUToSamplerNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3638,8 +4193,8 @@ "opname": "OpConvertImageToUNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3647,8 +4202,8 @@ "opname": "OpConvertSamplerToUNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3656,8 +4211,8 @@ "opname": "OpConvertUToSampledImageNV", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3665,8 +4220,17 @@ "opname": "OpConvertSampledImageToUNV", "grammar": "core", "properties": [ + "allocates-id", "unary", + "result-type" + ] + }, + { + "opname": "OpRawAccessChainNV", + "grammar": "core", + "properties": [ "allocates-id", + "multinary", "result-type" ] }, @@ -3674,8 +4238,8 @@ "opname": "OpSubgroupShuffleINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3683,8 +4247,8 @@ "opname": "OpSubgroupShuffleDownINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3692,8 +4256,8 @@ "opname": "OpSubgroupShuffleUpINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -3701,8 +4265,8 @@ "opname": "OpSubgroupShuffleXorINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3710,8 +4274,8 @@ "opname": "OpSubgroupBlockReadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3719,16 +4283,16 @@ "opname": "OpSubgroupBlockWriteINTEL", "grammar": "core", "properties": [ - "action", - "binary" + "binary", + "action" ] }, { "opname": "OpSubgroupImageBlockReadINTEL", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -3736,16 +4300,16 @@ "opname": "OpSubgroupImageBlockWriteINTEL", "grammar": "core", "properties": [ - "action", - "image-op" + "image-op", + "action" ] }, { "opname": "OpSubgroupImageMediaBlockReadINTEL", "grammar": "core", "properties": [ - "image-op", "allocates-id", + "image-op", "result-type" ] }, @@ -3753,16 +4317,16 @@ "opname": "OpSubgroupImageMediaBlockWriteINTEL", "grammar": "core", "properties": [ - "action", - "image-op" + "image-op", + "action" ] }, { "opname": "OpUCountLeadingZerosINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3770,8 +4334,8 @@ "opname": "OpUCountTrailingZerosINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3779,8 +4343,8 @@ "opname": "OpAbsISubINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3788,8 +4352,8 @@ "opname": "OpAbsUSubINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3797,8 +4361,8 @@ "opname": "OpIAddSatINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3806,8 +4370,8 @@ "opname": "OpUAddSatINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3815,8 +4379,8 @@ "opname": "OpIAverageINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3824,8 +4388,8 @@ "opname": "OpUAverageINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3833,8 +4397,8 @@ "opname": "OpIAverageRoundedINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3842,8 +4406,8 @@ "opname": "OpUAverageRoundedINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3851,8 +4415,8 @@ "opname": "OpISubSatINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3860,8 +4424,8 @@ "opname": "OpUSubSatINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3869,8 +4433,8 @@ "opname": "OpIMul32x16INTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3878,8 +4442,8 @@ "opname": "OpUMul32x16INTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3887,9 +4451,9 @@ "opname": "OpConstantFunctionPointerINTEL", "grammar": "core", "properties": [ - "unary", - "constant", "allocates-id", + "constant", + "unary", "result-type" ] }, @@ -3913,8 +4477,8 @@ "opname": "OpAsmINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3922,8 +4486,8 @@ "opname": "OpAsmCallINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -3931,9 +4495,9 @@ "opname": "OpAtomicFMinEXT", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -3941,9 +4505,9 @@ "opname": "OpAtomicFMaxEXT", "grammar": "core", "properties": [ + "allocates-id", "atomic-op", "unary", - "allocates-id", "result-type" ] }, @@ -3959,8 +4523,8 @@ "opname": "OpExpectKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -3968,42 +4532,42 @@ "opname": "OpDecorateString", "grammar": "core", "properties": [ - "property-type-string", - "adds-property" + "adds-property", + "property-type-string" ] }, { "opname": "OpDecorateStringGOOGLE", "grammar": "core", "properties": [ - "property-type-string", - "adds-property" + "adds-property", + "property-type-string" ] }, { "opname": "OpMemberDecorateString", "grammar": "core", "properties": [ - "member-property", + "adds-property", "property-type-string", - "adds-property" + "member-property" ] }, { "opname": "OpMemberDecorateStringGOOGLE", "grammar": "core", "properties": [ - "member-property", + "adds-property", "property-type-string", - "adds-property" + "member-property" ] }, { "opname": "OpVmeImageINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4115,8 +4679,8 @@ "opname": "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4124,8 +4688,8 @@ "opname": "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4133,8 +4697,8 @@ "opname": "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4142,8 +4706,8 @@ "opname": "OpSubgroupAvcMceSetInterShapePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4151,8 +4715,8 @@ "opname": "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4160,8 +4724,8 @@ "opname": "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4169,8 +4733,8 @@ "opname": "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4178,8 +4742,8 @@ "opname": "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4211,8 +4775,8 @@ "opname": "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4220,8 +4784,8 @@ "opname": "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4245,8 +4809,8 @@ "opname": "OpSubgroupAvcMceSetAcOnlyHaarINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4254,8 +4818,8 @@ "opname": "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4263,8 +4827,8 @@ "opname": "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4272,8 +4836,8 @@ "opname": "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4281,8 +4845,8 @@ "opname": "OpSubgroupAvcMceConvertToImePayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4290,8 +4854,8 @@ "opname": "OpSubgroupAvcMceConvertToImeResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4299,8 +4863,8 @@ "opname": "OpSubgroupAvcMceConvertToRefPayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4308,8 +4872,8 @@ "opname": "OpSubgroupAvcMceConvertToRefResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4317,8 +4881,8 @@ "opname": "OpSubgroupAvcMceConvertToSicPayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4326,8 +4890,8 @@ "opname": "OpSubgroupAvcMceConvertToSicResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4335,8 +4899,8 @@ "opname": "OpSubgroupAvcMceGetMotionVectorsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4344,8 +4908,8 @@ "opname": "OpSubgroupAvcMceGetInterDistortionsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4353,8 +4917,8 @@ "opname": "OpSubgroupAvcMceGetBestInterDistortionsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4362,8 +4926,8 @@ "opname": "OpSubgroupAvcMceGetInterMajorShapeINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4371,8 +4935,8 @@ "opname": "OpSubgroupAvcMceGetInterMinorShapeINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4380,8 +4944,8 @@ "opname": "OpSubgroupAvcMceGetInterDirectionsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4389,8 +4953,8 @@ "opname": "OpSubgroupAvcMceGetInterMotionVectorCountINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4398,8 +4962,8 @@ "opname": "OpSubgroupAvcMceGetInterReferenceIdsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4407,8 +4971,8 @@ "opname": "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4416,8 +4980,8 @@ "opname": "OpSubgroupAvcImeInitializeINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4425,8 +4989,8 @@ "opname": "OpSubgroupAvcImeSetSingleReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4434,8 +4998,8 @@ "opname": "OpSubgroupAvcImeSetDualReferenceINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4443,8 +5007,8 @@ "opname": "OpSubgroupAvcImeRefWindowSizeINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4452,8 +5016,8 @@ "opname": "OpSubgroupAvcImeAdjustRefOffsetINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4461,8 +5025,8 @@ "opname": "OpSubgroupAvcImeConvertToMcePayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4470,8 +5034,8 @@ "opname": "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4479,8 +5043,8 @@ "opname": "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4488,8 +5052,8 @@ "opname": "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4497,8 +5061,8 @@ "opname": "OpSubgroupAvcImeSetWeightedSadINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4506,8 +5070,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4515,8 +5079,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4524,8 +5088,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4533,8 +5097,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4542,8 +5106,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4551,8 +5115,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4560,8 +5124,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4569,8 +5133,8 @@ "opname": "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4578,8 +5142,8 @@ "opname": "OpSubgroupAvcImeConvertToMceResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4587,8 +5151,8 @@ "opname": "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4596,8 +5160,8 @@ "opname": "OpSubgroupAvcImeGetDualReferenceStreaminINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4605,8 +5169,8 @@ "opname": "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4614,8 +5178,8 @@ "opname": "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4623,8 +5187,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4632,8 +5196,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4641,8 +5205,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4650,8 +5214,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4659,8 +5223,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4668,8 +5232,8 @@ "opname": "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4677,8 +5241,8 @@ "opname": "OpSubgroupAvcImeGetBorderReachedINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4686,8 +5250,8 @@ "opname": "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4695,8 +5259,8 @@ "opname": "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4704,8 +5268,8 @@ "opname": "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4713,8 +5277,8 @@ "opname": "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4722,8 +5286,8 @@ "opname": "OpSubgroupAvcFmeInitializeINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4731,8 +5295,8 @@ "opname": "OpSubgroupAvcBmeInitializeINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4740,8 +5304,8 @@ "opname": "OpSubgroupAvcRefConvertToMcePayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4749,8 +5313,8 @@ "opname": "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4758,8 +5322,8 @@ "opname": "OpSubgroupAvcRefSetBilinearFilterEnableINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4767,8 +5331,8 @@ "opname": "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4776,8 +5340,8 @@ "opname": "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4785,8 +5349,8 @@ "opname": "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4794,8 +5358,8 @@ "opname": "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4803,8 +5367,8 @@ "opname": "OpSubgroupAvcRefConvertToMceResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4812,8 +5376,8 @@ "opname": "OpSubgroupAvcSicInitializeINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4821,8 +5385,8 @@ "opname": "OpSubgroupAvcSicConfigureSkcINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4830,8 +5394,8 @@ "opname": "OpSubgroupAvcSicConfigureIpeLumaINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4839,8 +5403,8 @@ "opname": "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4848,8 +5412,8 @@ "opname": "OpSubgroupAvcSicGetMotionVectorMaskINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4857,8 +5421,8 @@ "opname": "OpSubgroupAvcSicConvertToMcePayloadINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4866,8 +5430,8 @@ "opname": "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4875,8 +5439,8 @@ "opname": "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4884,8 +5448,8 @@ "opname": "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4893,8 +5457,8 @@ "opname": "OpSubgroupAvcSicSetBilinearFilterEnableINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4902,8 +5466,8 @@ "opname": "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4911,8 +5475,8 @@ "opname": "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4920,8 +5484,8 @@ "opname": "OpSubgroupAvcSicEvaluateIpeINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -4929,8 +5493,8 @@ "opname": "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4938,8 +5502,8 @@ "opname": "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4947,8 +5511,8 @@ "opname": "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL", "grammar": "core", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -4956,8 +5520,8 @@ "opname": "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", "grammar": "core", "properties": [ - "multinary", "allocates-id", + "multinary", "result-type" ] }, @@ -4965,8 +5529,8 @@ "opname": "OpSubgroupAvcSicConvertToMceResultINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4974,8 +5538,8 @@ "opname": "OpSubgroupAvcSicGetIpeLumaShapeINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4983,8 +5547,8 @@ "opname": "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -4992,8 +5556,8 @@ "opname": "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5001,8 +5565,8 @@ "opname": "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5010,8 +5574,8 @@ "opname": "OpSubgroupAvcSicGetIpeChromaModeINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5019,8 +5583,8 @@ "opname": "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5028,8 +5592,8 @@ "opname": "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5037,8 +5601,8 @@ "opname": "OpSubgroupAvcSicGetInterRawSadsINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5046,8 +5610,8 @@ "opname": "OpVariableLengthArrayINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5071,8 +5635,8 @@ "opname": "OpArbitraryFloatSinCosPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5080,8 +5644,8 @@ "opname": "OpArbitraryFloatCastINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5089,8 +5653,8 @@ "opname": "OpArbitraryFloatCastFromIntINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5098,8 +5662,8 @@ "opname": "OpArbitraryFloatCastToIntINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5107,8 +5671,8 @@ "opname": "OpArbitraryFloatAddINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5116,8 +5680,8 @@ "opname": "OpArbitraryFloatSubINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5125,8 +5689,8 @@ "opname": "OpArbitraryFloatMulINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5134,8 +5698,8 @@ "opname": "OpArbitraryFloatDivINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5143,8 +5707,8 @@ "opname": "OpArbitraryFloatGTINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5152,8 +5716,8 @@ "opname": "OpArbitraryFloatGEINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5161,8 +5725,8 @@ "opname": "OpArbitraryFloatLTINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5170,8 +5734,8 @@ "opname": "OpArbitraryFloatLEINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5179,8 +5743,8 @@ "opname": "OpArbitraryFloatEQINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5188,8 +5752,8 @@ "opname": "OpArbitraryFloatRecipINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5197,8 +5761,8 @@ "opname": "OpArbitraryFloatRSqrtINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5206,8 +5770,8 @@ "opname": "OpArbitraryFloatCbrtINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5215,8 +5779,8 @@ "opname": "OpArbitraryFloatHypotINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5224,8 +5788,8 @@ "opname": "OpArbitraryFloatSqrtINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5233,8 +5797,8 @@ "opname": "OpArbitraryFloatLogINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5242,8 +5806,8 @@ "opname": "OpArbitraryFloatLog2INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5251,8 +5815,8 @@ "opname": "OpArbitraryFloatLog10INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5260,8 +5824,8 @@ "opname": "OpArbitraryFloatLog1pINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5269,8 +5833,8 @@ "opname": "OpArbitraryFloatExpINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5278,8 +5842,8 @@ "opname": "OpArbitraryFloatExp2INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5287,8 +5851,8 @@ "opname": "OpArbitraryFloatExp10INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5296,8 +5860,8 @@ "opname": "OpArbitraryFloatExpm1INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5305,8 +5869,8 @@ "opname": "OpArbitraryFloatSinINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5314,8 +5878,8 @@ "opname": "OpArbitraryFloatCosINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5323,8 +5887,8 @@ "opname": "OpArbitraryFloatSinCosINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5332,8 +5896,8 @@ "opname": "OpArbitraryFloatSinPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5341,8 +5905,8 @@ "opname": "OpArbitraryFloatCosPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5350,8 +5914,8 @@ "opname": "OpArbitraryFloatASinINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5359,8 +5923,8 @@ "opname": "OpArbitraryFloatASinPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5368,8 +5932,8 @@ "opname": "OpArbitraryFloatACosINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5377,8 +5941,8 @@ "opname": "OpArbitraryFloatACosPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5386,8 +5950,8 @@ "opname": "OpArbitraryFloatATanINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5395,8 +5959,8 @@ "opname": "OpArbitraryFloatATanPiINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5404,8 +5968,8 @@ "opname": "OpArbitraryFloatATan2INTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5413,8 +5977,8 @@ "opname": "OpArbitraryFloatPowINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5422,8 +5986,8 @@ "opname": "OpArbitraryFloatPowRINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5431,17 +5995,38 @@ "opname": "OpArbitraryFloatPowNINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, + { + "opname": "OpAliasDomainDeclINTEL", + "grammar": "core", + "properties": [ + "allocates-id" + ] + }, + { + "opname": "OpAliasScopeDeclINTEL", + "grammar": "core", + "properties": [ + "allocates-id" + ] + }, + { + "opname": "OpAliasScopeListDeclINTEL", + "grammar": "core", + "properties": [ + "allocates-id" + ] + }, { "opname": "OpFixedSqrtINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5449,8 +6034,8 @@ "opname": "OpFixedRecipINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5458,8 +6043,8 @@ "opname": "OpFixedRsqrtINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5467,8 +6052,8 @@ "opname": "OpFixedSinINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5476,8 +6061,8 @@ "opname": "OpFixedCosINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5485,8 +6070,8 @@ "opname": "OpFixedSinCosINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5494,8 +6079,8 @@ "opname": "OpFixedSinPiINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5503,8 +6088,8 @@ "opname": "OpFixedCosPiINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5512,8 +6097,8 @@ "opname": "OpFixedSinCosPiINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5521,8 +6106,8 @@ "opname": "OpFixedLogINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5530,8 +6115,8 @@ "opname": "OpFixedExpINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5539,8 +6124,8 @@ "opname": "OpPtrCastToCrossWorkgroupINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5548,8 +6133,8 @@ "opname": "OpCrossWorkgroupCastToPtrINTEL", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5557,8 +6142,8 @@ "opname": "OpReadPipeBlockingINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5566,8 +6151,8 @@ "opname": "OpWritePipeBlockingINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5575,8 +6160,8 @@ "opname": "OpFPGARegINTEL", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5584,8 +6169,8 @@ "opname": "OpRayQueryGetRayTMinKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5593,8 +6178,8 @@ "opname": "OpRayQueryGetRayFlagsKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5602,8 +6187,8 @@ "opname": "OpRayQueryGetIntersectionTKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5611,8 +6196,8 @@ "opname": "OpRayQueryGetIntersectionInstanceCustomIndexKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5620,8 +6205,8 @@ "opname": "OpRayQueryGetIntersectionInstanceIdKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5629,8 +6214,8 @@ "opname": "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5638,8 +6223,8 @@ "opname": "OpRayQueryGetIntersectionGeometryIndexKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5647,8 +6232,8 @@ "opname": "OpRayQueryGetIntersectionPrimitiveIndexKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5656,8 +6241,8 @@ "opname": "OpRayQueryGetIntersectionBarycentricsKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5665,8 +6250,8 @@ "opname": "OpRayQueryGetIntersectionFrontFaceKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5674,8 +6259,8 @@ "opname": "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5683,8 +6268,8 @@ "opname": "OpRayQueryGetIntersectionObjectRayDirectionKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -5692,94 +6277,233 @@ "opname": "OpRayQueryGetIntersectionObjectRayOriginKHR", "grammar": "core", "properties": [ + "allocates-id", + "binary", + "result-type" + ] + }, + { + "opname": "OpRayQueryGetWorldRayDirectionKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpRayQueryGetWorldRayOriginKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpRayQueryGetIntersectionObjectToWorldKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "binary", + "result-type" + ] + }, + { + "opname": "OpRayQueryGetIntersectionWorldToObjectKHR", + "grammar": "core", + "properties": [ + "allocates-id", "binary", + "result-type" + ] + }, + { + "opname": "OpAtomicFAddEXT", + "grammar": "core", + "properties": [ + "allocates-id", + "atomic-op", + "unary", + "result-type" + ] + }, + { + "opname": "OpTypeBufferSurfaceINTEL", + "grammar": "core", + "properties": [ + "typedef", + "allocates-id" + ] + }, + { + "opname": "OpTypeStructContinuedINTEL", + "grammar": "core", + "properties": [ + "typedef" + ] + }, + { + "opname": "OpConstantCompositeContinuedINTEL", + "grammar": "core", + "properties": [ + "composite-constant", + "constant" + ] + }, + { + "opname": "OpSpecConstantCompositeContinuedINTEL", + "grammar": "core", + "properties": [ + "spec-constant", + "composite-constant" + ] + }, + { + "opname": "OpCompositeConstructContinuedINTEL", + "grammar": "core", + "properties": [ + "allocates-id", + "result-type" + ] + }, + { + "opname": "OpConvertFToBF16INTEL", + "grammar": "core", + "properties": [ "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpConvertBF16ToFINTEL", + "grammar": "core", + "properties": [ + "allocates-id", + "unary", + "result-type" + ] + }, + { + "opname": "OpControlBarrierArriveINTEL", + "grammar": "core", + "properties": [ + "action", + "scoped" + ] + }, + { + "opname": "OpControlBarrierWaitINTEL", + "grammar": "core", + "properties": [ + "action", + "scoped" + ] + }, + { + "opname": "OpGroupIMulKHR", + "grammar": "core", + "properties": [ + "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpRayQueryGetWorldRayDirectionKHR", + "opname": "OpGroupFMulKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpRayQueryGetWorldRayOriginKHR", + "opname": "OpGroupBitwiseAndKHR", "grammar": "core", "properties": [ - "unary", "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpRayQueryGetIntersectionObjectToWorldKHR", + "opname": "OpGroupBitwiseOrKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpRayQueryGetIntersectionWorldToObjectKHR", + "opname": "OpGroupBitwiseXorKHR", "grammar": "core", "properties": [ - "binary", "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpAtomicFAddEXT", + "opname": "OpGroupLogicalAndKHR", "grammar": "core", "properties": [ - "atomic-op", - "unary", "allocates-id", + "grouped", + "scoped", "result-type" ] }, { - "opname": "OpTypeBufferSurfaceINTEL", + "opname": "OpGroupLogicalOrKHR", "grammar": "core", "properties": [ - "typedef", - "allocates-id" + "allocates-id", + "grouped", + "scoped", + "result-type" ] }, { - "opname": "OpTypeStructContinuedINTEL", + "opname": "OpGroupLogicalXorKHR", "grammar": "core", "properties": [ - "typedef" + "allocates-id", + "grouped", + "scoped", + "result-type" ] }, { - "opname": "OpConstantCompositeContinuedINTEL", + "opname": "OpMaskedGatherINTEL", "grammar": "core", "properties": [ - "composite-constant", - "constant" + "allocates-id", + "unary", + "result-type" ] }, { - "opname": "OpSpecConstantCompositeContinuedINTEL", + "opname": "OpMaskedScatterINTEL", "grammar": "core", "properties": [ - "spec-constant", - "composite-constant" + "binary", + "action" ] }, { "opname": "Round", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5787,8 +6511,8 @@ "opname": "RoundEven", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5796,8 +6520,8 @@ "opname": "Trunc", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5805,8 +6529,8 @@ "opname": "FAbs", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5814,8 +6538,8 @@ "opname": "SAbs", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5823,8 +6547,8 @@ "opname": "FSign", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5832,8 +6556,8 @@ "opname": "SSign", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5841,8 +6565,8 @@ "opname": "Floor", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5850,8 +6574,8 @@ "opname": "Ceil", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5859,8 +6583,8 @@ "opname": "Fract", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5868,8 +6592,8 @@ "opname": "Radians", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5877,8 +6601,8 @@ "opname": "Degrees", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5886,8 +6610,8 @@ "opname": "Sin", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5895,8 +6619,8 @@ "opname": "Cos", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5904,8 +6628,8 @@ "opname": "Tan", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5913,8 +6637,8 @@ "opname": "Asin", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5922,8 +6646,8 @@ "opname": "Acos", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5931,8 +6655,8 @@ "opname": "Atan", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5940,8 +6664,8 @@ "opname": "Sinh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5949,8 +6673,8 @@ "opname": "Cosh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5958,8 +6682,8 @@ "opname": "Tanh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5967,8 +6691,8 @@ "opname": "Asinh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5976,8 +6700,8 @@ "opname": "Acosh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5985,8 +6709,8 @@ "opname": "Atanh", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -5994,8 +6718,8 @@ "opname": "Atan2", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6003,8 +6727,8 @@ "opname": "Pow", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6012,8 +6736,8 @@ "opname": "Exp", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6021,8 +6745,8 @@ "opname": "Log", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6030,8 +6754,8 @@ "opname": "Exp2", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6039,8 +6763,8 @@ "opname": "Log2", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6048,8 +6772,8 @@ "opname": "Sqrt", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6057,8 +6781,8 @@ "opname": "InverseSqrt", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6066,8 +6790,8 @@ "opname": "Determinant", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6075,8 +6799,8 @@ "opname": "MatrixInverse", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6084,8 +6808,8 @@ "opname": "Modf", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6093,8 +6817,8 @@ "opname": "ModfStruct", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6102,8 +6826,8 @@ "opname": "FMin", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6111,8 +6835,8 @@ "opname": "UMin", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6120,8 +6844,8 @@ "opname": "SMin", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6129,8 +6853,8 @@ "opname": "FMax", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6138,8 +6862,8 @@ "opname": "UMax", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6147,8 +6871,8 @@ "opname": "SMax", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6156,8 +6880,8 @@ "opname": "FClamp", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6165,8 +6889,8 @@ "opname": "UClamp", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6174,8 +6898,8 @@ "opname": "SClamp", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6183,8 +6907,8 @@ "opname": "FMix", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6192,8 +6916,8 @@ "opname": "IMix", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6201,8 +6925,8 @@ "opname": "Step", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6210,8 +6934,8 @@ "opname": "SmoothStep", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6219,8 +6943,8 @@ "opname": "Fma", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6228,8 +6952,8 @@ "opname": "Frexp", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6237,8 +6961,8 @@ "opname": "FrexpStruct", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6246,8 +6970,8 @@ "opname": "Ldexp", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6255,8 +6979,8 @@ "opname": "PackSnorm4x8", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6264,8 +6988,8 @@ "opname": "PackUnorm4x8", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6273,8 +6997,8 @@ "opname": "PackSnorm2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6282,8 +7006,8 @@ "opname": "PackUnorm2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6291,8 +7015,8 @@ "opname": "PackHalf2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6300,8 +7024,8 @@ "opname": "PackDouble2x32", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6309,8 +7033,8 @@ "opname": "UnpackSnorm2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6318,8 +7042,8 @@ "opname": "UnpackUnorm2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6327,8 +7051,8 @@ "opname": "UnpackHalf2x16", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6336,8 +7060,8 @@ "opname": "UnpackSnorm4x8", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6345,8 +7069,8 @@ "opname": "UnpackUnorm4x8", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6354,8 +7078,8 @@ "opname": "UnpackDouble2x32", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6363,8 +7087,8 @@ "opname": "Length", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6372,8 +7096,8 @@ "opname": "Distance", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6381,8 +7105,8 @@ "opname": "Cross", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6390,8 +7114,8 @@ "opname": "Normalize", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6399,8 +7123,8 @@ "opname": "FaceForward", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6408,8 +7132,8 @@ "opname": "Reflect", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6417,8 +7141,8 @@ "opname": "Refract", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6426,8 +7150,8 @@ "opname": "FindILsb", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6435,8 +7159,8 @@ "opname": "FindSMsb", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6444,8 +7168,8 @@ "opname": "FindUMsb", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6453,8 +7177,8 @@ "opname": "InterpolateAtCentroid", "grammar": "GLSL.std.450", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6462,8 +7186,8 @@ "opname": "InterpolateAtSample", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6471,8 +7195,8 @@ "opname": "InterpolateAtOffset", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6480,8 +7204,8 @@ "opname": "NMin", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6489,8 +7213,8 @@ "opname": "NMax", "grammar": "GLSL.std.450", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6498,8 +7222,8 @@ "opname": "NClamp", "grammar": "GLSL.std.450", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6507,8 +7231,8 @@ "opname": "CubeFaceIndexAMD", "grammar": "SPV_AMD_gcn_shader", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6516,8 +7240,8 @@ "opname": "CubeFaceCoordAMD", "grammar": "SPV_AMD_gcn_shader", "properties": [ - "unary", "allocates-id", + "unary", "result-type" ] }, @@ -6533,8 +7257,8 @@ "opname": "SwizzleInvocationsAMD", "grammar": "SPV_AMD_shader_ballot", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6542,8 +7266,8 @@ "opname": "SwizzleInvocationsMaskedAMD", "grammar": "SPV_AMD_shader_ballot", "properties": [ - "binary", "allocates-id", + "binary", "result-type" ] }, @@ -6551,8 +7275,8 @@ "opname": "WriteInvocationAMD", "grammar": "SPV_AMD_shader_ballot", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6560,8 +7284,17 @@ "opname": "MbcntAMD", "grammar": "SPV_AMD_shader_ballot", "properties": [ + "allocates-id", "unary", + "result-type" + ] + }, + { + "opname": "InterpolateAtVertexAMD", + "grammar": "SPV_AMD_shader_explicit_vertex_parameter", + "properties": [ "allocates-id", + "binary", "result-type" ] }, @@ -6569,8 +7302,8 @@ "opname": "FMin3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6578,8 +7311,8 @@ "opname": "UMin3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6587,8 +7320,8 @@ "opname": "SMin3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6596,8 +7329,8 @@ "opname": "FMax3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6605,8 +7338,8 @@ "opname": "UMax3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6614,8 +7347,8 @@ "opname": "SMax3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6623,8 +7356,8 @@ "opname": "FMid3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6632,8 +7365,8 @@ "opname": "UMid3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", "allocates-id", + "trinary", "result-type" ] }, @@ -6641,19 +7374,13 @@ "opname": "SMid3AMD", "grammar": "SPV_AMD_shader_trinary_minmax", "properties": [ - "trinary", - "allocates-id", - "result-type" - ] - }, - { - "opname": "InterpolateAtVertexAMD", - "grammar": "SPV_AMD_shader_explicit_vertex_parameter", - "properties": [ - "binary", "allocates-id", + "trinary", "result-type" ] } + ], + "info": [ + "Auto generated extended grammar by spirv_meta_data_tools.make_extended_grammar_json_ready_def" ] } \ No newline at end of file diff --git a/prog/gameLibs/spirv/module_decoder.h b/prog/gameLibs/spirv/module_decoder.h index df943f67c..5f91cb9f7 100644 --- a/prog/gameLibs/spirv/module_decoder.h +++ b/prog/gameLibs/spirv/module_decoder.h @@ -1,4 +1,6 @@ -// this file is auto generated, do not modify +// Copyright (C) Gaijin Games KFT. All rights reserved. + +// auto generated, do not modify //-V::1020 #pragma once #include "../publicInclude/spirv/traits_table.h" @@ -790,6 +792,28 @@ inline bool loadExtendedAMDShaderBallot(IdResult result_id, IdResultType result_ return true; } template +inline bool loadExtendedAMDShaderExplicitVertexParameter(IdResult result_id, IdResultType result_type, + AMDShaderExplicitVertexParameter opcode, detail::Operands &operands, LC load_context, ECB on_error) +{ + switch (opcode) + { + default: + if (on_error("unknown opcode for extended grammar 'SPV_AMD_shader_explicit_vertex_parameter'")) + return false; + break; + case AMDShaderExplicitVertexParameter::InterpolateAtVertexAMD: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + if (!operands.finishOperands(on_error, "SPV_AMD_shader_explicit_vertex_parameter:InterpolateAtVertexAMD")) + return false; + load_context.onAMDShaderExplicitVertexParameterInterpolateAtVertex(opcode, result_id, result_type, c0, c1); + break; + } + }; + return true; +} +template inline bool loadExtendedAMDShaderTrinaryMinmax(IdResult result_id, IdResultType result_type, AMDShaderTrinaryMinmax opcode, detail::Operands &operands, LC load_context, ECB on_error) { @@ -892,28 +916,6 @@ inline bool loadExtendedAMDShaderTrinaryMinmax(IdResult result_id, IdResultType }; return true; } -template -inline bool loadExtendedAMDShaderExplicitVertexParameter(IdResult result_id, IdResultType result_type, - AMDShaderExplicitVertexParameter opcode, detail::Operands &operands, LC load_context, ECB on_error) -{ - switch (opcode) - { - default: - if (on_error("unknown opcode for extended grammar 'SPV_AMD_shader_explicit_vertex_parameter'")) - return false; - break; - case AMDShaderExplicitVertexParameter::InterpolateAtVertexAMD: - { - auto c0 = operands.read(); - auto c1 = operands.read(); - if (!operands.finishOperands(on_error, "SPV_AMD_shader_explicit_vertex_parameter:InterpolateAtVertexAMD")) - return false; - load_context.onAMDShaderExplicitVertexParameterInterpolateAtVertex(opcode, result_id, result_type, c0, c1); - break; - } - }; - return true; -} template inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, ECB on_error) { @@ -1067,16 +1069,16 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, if (!loadExtendedAMDShaderBallot(c1, c0, static_cast(c3.value), operands, load_context, on_error)) return false; break; - case ExtendedGrammar::AMD_shader_trinary_minmax: - if (!loadExtendedAMDShaderTrinaryMinmax(c1, c0, static_cast(c3.value), operands, load_context, - on_error)) - return false; - break; case ExtendedGrammar::AMD_shader_explicit_vertex_parameter: if (!loadExtendedAMDShaderExplicitVertexParameter(c1, c0, static_cast(c3.value), operands, load_context, on_error)) return false; break; + case ExtendedGrammar::AMD_shader_trinary_minmax: + if (!loadExtendedAMDShaderTrinaryMinmax(c1, c0, static_cast(c3.value), operands, load_context, + on_error)) + return false; + break; }; break; } @@ -5236,6 +5238,37 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onPtrDiff(Op::OpPtrDiff, c1, c0, c2, c3); break; } + case Op::OpColorAttachmentReadEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read>(); + if (!operands.finishOperands(on_error, "OpColorAttachmentReadEXT")) + return false; + load_context.onColorAttachmentReadEXT(Op::OpColorAttachmentReadEXT, c1, c0, c2, c3); + break; + } + case Op::OpDepthAttachmentReadEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read>(); + if (!operands.finishOperands(on_error, "OpDepthAttachmentReadEXT")) + return false; + load_context.onDepthAttachmentReadEXT(Op::OpDepthAttachmentReadEXT, c1, c0, c2); + break; + } + case Op::OpStencilAttachmentReadEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read>(); + if (!operands.finishOperands(on_error, "OpStencilAttachmentReadEXT")) + return false; + load_context.onStencilAttachmentReadEXT(Op::OpStencilAttachmentReadEXT, c1, c0, c2); + break; + } case Op::OpTerminateInvocation: { if (!operands.finishOperands(on_error, "OpTerminateInvocation")) @@ -5293,6 +5326,19 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onSubgroupAllEqualKHR(Op::OpSubgroupAllEqualKHR, c1, c0, c2); break; } + case Op::OpGroupNonUniformRotateKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read>(); + if (!operands.finishOperands(on_error, "OpGroupNonUniformRotateKHR")) + return false; + load_context.onGroupNonUniformRotateKHR(Op::OpGroupNonUniformRotateKHR, c1, c0, c2, c3, c4, c5); + break; + } case Op::OpSubgroupReadInvocationKHR: { auto c0 = operands.read(); @@ -5304,6 +5350,18 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onSubgroupReadInvocationKHR(Op::OpSubgroupReadInvocationKHR, c1, c0, c2, c3); break; } + case Op::OpExtInstWithForwardRefsKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read>(); + if (!operands.finishOperands(on_error, "OpExtInstWithForwardRefsKHR")) + return false; + load_context.onExtInstWithForwardRefsKHR(Op::OpExtInstWithForwardRefsKHR, c1, c0, c2, c3, c4); + break; + } case Op::OpTraceRayKHR: { auto c0 = operands.read(); @@ -5436,6 +5494,97 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, break; } // OpSUDotAccSatKHR alias of OpSUDotAccSat + case Op::OpTypeCooperativeMatrixKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + if (!operands.finishOperands(on_error, "OpTypeCooperativeMatrixKHR")) + return false; + load_context.onTypeCooperativeMatrixKHR(Op::OpTypeCooperativeMatrixKHR, c0, c1, c2, c3, c4, c5); + break; + } + case Op::OpCooperativeMatrixLoadKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read>(); + auto c5 = operands.read>(); + if (!operands.finishOperands(on_error, "OpCooperativeMatrixLoadKHR")) + return false; + load_context.onCooperativeMatrixLoadKHR(Op::OpCooperativeMatrixLoadKHR, c1, c0, c2, c3, c4, c5); + break; + } + case Op::OpCooperativeMatrixStoreKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read>(); + auto c4 = operands.read>(); + if (!operands.finishOperands(on_error, "OpCooperativeMatrixStoreKHR")) + return false; + load_context.onCooperativeMatrixStoreKHR(Op::OpCooperativeMatrixStoreKHR, c0, c1, c2, c3, c4); + break; + } + case Op::OpCooperativeMatrixMulAddKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read>(); + if (!operands.finishOperands(on_error, "OpCooperativeMatrixMulAddKHR")) + return false; + load_context.onCooperativeMatrixMulAddKHR(Op::OpCooperativeMatrixMulAddKHR, c1, c0, c2, c3, c4, c5); + break; + } + case Op::OpCooperativeMatrixLengthKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpCooperativeMatrixLengthKHR")) + return false; + load_context.onCooperativeMatrixLengthKHR(Op::OpCooperativeMatrixLengthKHR, c1, c0, c2); + break; + } + case Op::OpConstantCompositeReplicateEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpConstantCompositeReplicateEXT")) + return false; + load_context.onConstantCompositeReplicateEXT(Op::OpConstantCompositeReplicateEXT, c1, c0, c2); + break; + } + case Op::OpSpecConstantCompositeReplicateEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpSpecConstantCompositeReplicateEXT")) + return false; + load_context.onSpecConstantCompositeReplicateEXT(Op::OpSpecConstantCompositeReplicateEXT, c1, c0, c2); + break; + } + case Op::OpCompositeConstructReplicateEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpCompositeConstructReplicateEXT")) + return false; + load_context.onCompositeConstructReplicateEXT(Op::OpCompositeConstructReplicateEXT, c1, c0, c2); + break; + } case Op::OpTypeRayQueryKHR: { auto c0 = operands.read(); @@ -5505,6 +5654,114 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onRayQueryGetIntersectionTypeKHR(Op::OpRayQueryGetIntersectionTypeKHR, c1, c0, c2, c3); break; } + case Op::OpImageSampleWeightedQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageSampleWeightedQCOM")) + return false; + load_context.onImageSampleWeightedQCOM(Op::OpImageSampleWeightedQCOM, c1, c0, c2, c3, c4); + break; + } + case Op::OpImageBoxFilterQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBoxFilterQCOM")) + return false; + load_context.onImageBoxFilterQCOM(Op::OpImageBoxFilterQCOM, c1, c0, c2, c3, c4); + break; + } + case Op::OpImageBlockMatchSSDQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchSSDQCOM")) + return false; + load_context.onImageBlockMatchSSDQCOM(Op::OpImageBlockMatchSSDQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpImageBlockMatchSADQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchSADQCOM")) + return false; + load_context.onImageBlockMatchSADQCOM(Op::OpImageBlockMatchSADQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpImageBlockMatchWindowSSDQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchWindowSSDQCOM")) + return false; + load_context.onImageBlockMatchWindowSSDQCOM(Op::OpImageBlockMatchWindowSSDQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpImageBlockMatchWindowSADQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchWindowSADQCOM")) + return false; + load_context.onImageBlockMatchWindowSADQCOM(Op::OpImageBlockMatchWindowSADQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpImageBlockMatchGatherSSDQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchGatherSSDQCOM")) + return false; + load_context.onImageBlockMatchGatherSSDQCOM(Op::OpImageBlockMatchGatherSSDQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpImageBlockMatchGatherSADQCOM: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpImageBlockMatchGatherSADQCOM")) + return false; + load_context.onImageBlockMatchGatherSADQCOM(Op::OpImageBlockMatchGatherSADQCOM, c1, c0, c2, c3, c4, c5, c6); + break; + } case Op::OpGroupIAddNonUniformAMD: { auto c0 = operands.read(); @@ -5634,21 +5891,483 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onReadClockKHR(Op::OpReadClockKHR, c1, c0, c2); break; } - case Op::OpImageSampleFootprintNV: + case Op::OpFinalizeNodePayloadsAMDX: { - auto c0 = operands.read(); - auto c1 = operands.read(); - auto c2 = operands.read(); - auto c3 = operands.read(); - auto c4 = operands.read(); - auto c5 = operands.read(); - auto c6 = operands.read>(); - if (!operands.finishOperands(on_error, "OpImageSampleFootprintNV")) + auto c0 = operands.read(); + if (!operands.finishOperands(on_error, "OpFinalizeNodePayloadsAMDX")) return false; - load_context.onImageSampleFootprintNV(Op::OpImageSampleFootprintNV, c1, c0, c2, c3, c4, c5, c6); + load_context.onFinalizeNodePayloadsAMDX(Op::OpFinalizeNodePayloadsAMDX, c0); break; } - case Op::OpGroupNonUniformPartitionNV: + case Op::OpFinishWritingNodePayloadAMDX: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpFinishWritingNodePayloadAMDX")) + return false; + load_context.onFinishWritingNodePayloadAMDX(Op::OpFinishWritingNodePayloadAMDX, c1, c0, c2); + break; + } + case Op::OpInitializeNodePayloadsAMDX: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + if (!operands.finishOperands(on_error, "OpInitializeNodePayloadsAMDX")) + return false; + load_context.onInitializeNodePayloadsAMDX(Op::OpInitializeNodePayloadsAMDX, c0, c1, c2, c3); + break; + } + case Op::OpGroupNonUniformQuadAllKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupNonUniformQuadAllKHR")) + return false; + load_context.onGroupNonUniformQuadAllKHR(Op::OpGroupNonUniformQuadAllKHR, c1, c0, c2); + break; + } + case Op::OpGroupNonUniformQuadAnyKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupNonUniformQuadAnyKHR")) + return false; + load_context.onGroupNonUniformQuadAnyKHR(Op::OpGroupNonUniformQuadAnyKHR, c1, c0, c2); + break; + } + case Op::OpHitObjectRecordHitMotionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + auto c12 = operands.read(); + auto c13 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordHitMotionNV")) + return false; + load_context.onHitObjectRecordHitMotionNV(Op::OpHitObjectRecordHitMotionNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, + c12, c13); + break; + } + case Op::OpHitObjectRecordHitWithIndexMotionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + auto c12 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordHitWithIndexMotionNV")) + return false; + load_context.onHitObjectRecordHitWithIndexMotionNV(Op::OpHitObjectRecordHitWithIndexMotionNV, c0, c1, c2, c3, c4, c5, c6, c7, + c8, c9, c10, c11, c12); + break; + } + case Op::OpHitObjectRecordMissMotionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordMissMotionNV")) + return false; + load_context.onHitObjectRecordMissMotionNV(Op::OpHitObjectRecordMissMotionNV, c0, c1, c2, c3, c4, c5, c6); + break; + } + case Op::OpHitObjectGetWorldToObjectNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetWorldToObjectNV")) + return false; + load_context.onHitObjectGetWorldToObjectNV(Op::OpHitObjectGetWorldToObjectNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetObjectToWorldNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetObjectToWorldNV")) + return false; + load_context.onHitObjectGetObjectToWorldNV(Op::OpHitObjectGetObjectToWorldNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetObjectRayDirectionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetObjectRayDirectionNV")) + return false; + load_context.onHitObjectGetObjectRayDirectionNV(Op::OpHitObjectGetObjectRayDirectionNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetObjectRayOriginNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetObjectRayOriginNV")) + return false; + load_context.onHitObjectGetObjectRayOriginNV(Op::OpHitObjectGetObjectRayOriginNV, c1, c0, c2); + break; + } + case Op::OpHitObjectTraceRayMotionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + auto c12 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectTraceRayMotionNV")) + return false; + load_context.onHitObjectTraceRayMotionNV(Op::OpHitObjectTraceRayMotionNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, + c12); + break; + } + case Op::OpHitObjectGetShaderRecordBufferHandleNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetShaderRecordBufferHandleNV")) + return false; + load_context.onHitObjectGetShaderRecordBufferHandleNV(Op::OpHitObjectGetShaderRecordBufferHandleNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetShaderBindingTableRecordIndexNV")) + return false; + load_context.onHitObjectGetShaderBindingTableRecordIndexNV(Op::OpHitObjectGetShaderBindingTableRecordIndexNV, c1, c0, c2); + break; + } + case Op::OpHitObjectRecordEmptyNV: + { + auto c0 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordEmptyNV")) + return false; + load_context.onHitObjectRecordEmptyNV(Op::OpHitObjectRecordEmptyNV, c0); + break; + } + case Op::OpHitObjectTraceRayNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectTraceRayNV")) + return false; + load_context.onHitObjectTraceRayNV(Op::OpHitObjectTraceRayNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11); + break; + } + case Op::OpHitObjectRecordHitNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + auto c12 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordHitNV")) + return false; + load_context.onHitObjectRecordHitNV(Op::OpHitObjectRecordHitNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12); + break; + } + case Op::OpHitObjectRecordHitWithIndexNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + auto c7 = operands.read(); + auto c8 = operands.read(); + auto c9 = operands.read(); + auto c10 = operands.read(); + auto c11 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordHitWithIndexNV")) + return false; + load_context.onHitObjectRecordHitWithIndexNV(Op::OpHitObjectRecordHitWithIndexNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, + c11); + break; + } + case Op::OpHitObjectRecordMissNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectRecordMissNV")) + return false; + load_context.onHitObjectRecordMissNV(Op::OpHitObjectRecordMissNV, c0, c1, c2, c3, c4, c5); + break; + } + case Op::OpHitObjectExecuteShaderNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectExecuteShaderNV")) + return false; + load_context.onHitObjectExecuteShaderNV(Op::OpHitObjectExecuteShaderNV, c0, c1); + break; + } + case Op::OpHitObjectGetCurrentTimeNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetCurrentTimeNV")) + return false; + load_context.onHitObjectGetCurrentTimeNV(Op::OpHitObjectGetCurrentTimeNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetAttributesNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetAttributesNV")) + return false; + load_context.onHitObjectGetAttributesNV(Op::OpHitObjectGetAttributesNV, c0, c1); + break; + } + case Op::OpHitObjectGetHitKindNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetHitKindNV")) + return false; + load_context.onHitObjectGetHitKindNV(Op::OpHitObjectGetHitKindNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetPrimitiveIndexNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetPrimitiveIndexNV")) + return false; + load_context.onHitObjectGetPrimitiveIndexNV(Op::OpHitObjectGetPrimitiveIndexNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetGeometryIndexNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetGeometryIndexNV")) + return false; + load_context.onHitObjectGetGeometryIndexNV(Op::OpHitObjectGetGeometryIndexNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetInstanceIdNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetInstanceIdNV")) + return false; + load_context.onHitObjectGetInstanceIdNV(Op::OpHitObjectGetInstanceIdNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetInstanceCustomIndexNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetInstanceCustomIndexNV")) + return false; + load_context.onHitObjectGetInstanceCustomIndexNV(Op::OpHitObjectGetInstanceCustomIndexNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetWorldRayDirectionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetWorldRayDirectionNV")) + return false; + load_context.onHitObjectGetWorldRayDirectionNV(Op::OpHitObjectGetWorldRayDirectionNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetWorldRayOriginNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetWorldRayOriginNV")) + return false; + load_context.onHitObjectGetWorldRayOriginNV(Op::OpHitObjectGetWorldRayOriginNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetRayTMaxNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetRayTMaxNV")) + return false; + load_context.onHitObjectGetRayTMaxNV(Op::OpHitObjectGetRayTMaxNV, c1, c0, c2); + break; + } + case Op::OpHitObjectGetRayTMinNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectGetRayTMinNV")) + return false; + load_context.onHitObjectGetRayTMinNV(Op::OpHitObjectGetRayTMinNV, c1, c0, c2); + break; + } + case Op::OpHitObjectIsEmptyNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectIsEmptyNV")) + return false; + load_context.onHitObjectIsEmptyNV(Op::OpHitObjectIsEmptyNV, c1, c0, c2); + break; + } + case Op::OpHitObjectIsHitNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectIsHitNV")) + return false; + load_context.onHitObjectIsHitNV(Op::OpHitObjectIsHitNV, c1, c0, c2); + break; + } + case Op::OpHitObjectIsMissNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpHitObjectIsMissNV")) + return false; + load_context.onHitObjectIsMissNV(Op::OpHitObjectIsMissNV, c1, c0, c2); + break; + } + case Op::OpReorderThreadWithHitObjectNV: + { + auto c0 = operands.read(); + auto c1 = operands.read>(); + auto c2 = operands.read>(); + if (!operands.finishOperands(on_error, "OpReorderThreadWithHitObjectNV")) + return false; + load_context.onReorderThreadWithHitObjectNV(Op::OpReorderThreadWithHitObjectNV, c0, c1, c2); + break; + } + case Op::OpReorderThreadWithHintNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + if (!operands.finishOperands(on_error, "OpReorderThreadWithHintNV")) + return false; + load_context.onReorderThreadWithHintNV(Op::OpReorderThreadWithHintNV, c0, c1); + break; + } + case Op::OpTypeHitObjectNV: + { + auto c0 = operands.read(); + if (!operands.finishOperands(on_error, "OpTypeHitObjectNV")) + return false; + load_context.onTypeHitObjectNV(Op::OpTypeHitObjectNV, c0); + break; + } + case Op::OpImageSampleFootprintNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read>(); + if (!operands.finishOperands(on_error, "OpImageSampleFootprintNV")) + return false; + load_context.onImageSampleFootprintNV(Op::OpImageSampleFootprintNV, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpEmitMeshTasksEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read>(); + if (!operands.finishOperands(on_error, "OpEmitMeshTasksEXT")) + return false; + load_context.onEmitMeshTasksEXT(Op::OpEmitMeshTasksEXT, c0, c1, c2, c3); + break; + } + case Op::OpSetMeshOutputsEXT: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + if (!operands.finishOperands(on_error, "OpSetMeshOutputsEXT")) + return false; + load_context.onSetMeshOutputsEXT(Op::OpSetMeshOutputsEXT, c0, c1); + break; + } + case Op::OpGroupNonUniformPartitionNV: { auto c0 = operands.read(); auto c1 = operands.read(); @@ -5667,18 +6386,46 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onWritePackedPrimitiveIndices4x8NV(Op::OpWritePackedPrimitiveIndices4x8NV, c0, c1); break; } - case Op::OpReportIntersectionNV: + case Op::OpFetchMicroTriangleVertexPositionNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpFetchMicroTriangleVertexPositionNV")) + return false; + load_context.onFetchMicroTriangleVertexPositionNV(Op::OpFetchMicroTriangleVertexPositionNV, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpFetchMicroTriangleVertexBarycentricNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read(); + if (!operands.finishOperands(on_error, "OpFetchMicroTriangleVertexBarycentricNV")) + return false; + load_context.onFetchMicroTriangleVertexBarycentricNV(Op::OpFetchMicroTriangleVertexBarycentricNV, c1, c0, c2, c3, c4, c5, c6); + break; + } + case Op::OpReportIntersectionKHR: { auto c0 = operands.read(); auto c1 = operands.read(); auto c2 = operands.read(); auto c3 = operands.read(); - if (!operands.finishOperands(on_error, "OpReportIntersectionNV")) + if (!operands.finishOperands(on_error, "OpReportIntersectionKHR")) return false; - load_context.onReportIntersectionNV(Op::OpReportIntersectionNV, c1, c0, c2, c3); + load_context.onReportIntersectionKHR(Op::OpReportIntersectionKHR, c1, c0, c2, c3); break; } - // OpReportIntersectionKHR alias of OpReportIntersectionNV + // OpReportIntersectionNV alias of OpReportIntersectionKHR case Op::OpIgnoreIntersectionNV: { if (!operands.finishOperands(on_error, "OpIgnoreIntersectionNV")) @@ -5749,15 +6496,27 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onTraceRayMotionNV(Op::OpTraceRayMotionNV, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11); break; } - case Op::OpTypeAccelerationStructureNV: + case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + if (!operands.finishOperands(on_error, "OpRayQueryGetIntersectionTriangleVertexPositionsKHR")) + return false; + load_context.onRayQueryGetIntersectionTriangleVertexPositionsKHR(Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR, c1, + c0, c2, c3); + break; + } + case Op::OpTypeAccelerationStructureKHR: { auto c0 = operands.read(); - if (!operands.finishOperands(on_error, "OpTypeAccelerationStructureNV")) + if (!operands.finishOperands(on_error, "OpTypeAccelerationStructureKHR")) return false; - load_context.onTypeAccelerationStructureNV(Op::OpTypeAccelerationStructureNV, c0); + load_context.onTypeAccelerationStructureKHR(Op::OpTypeAccelerationStructureKHR, c0); break; } - // OpTypeAccelerationStructureKHR alias of OpTypeAccelerationStructureNV + // OpTypeAccelerationStructureNV alias of OpTypeAccelerationStructureKHR case Op::OpExecuteCallableNV: { auto c0 = operands.read(); @@ -5925,6 +6684,20 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onSamplerImageAddressingModeNV(Op::OpSamplerImageAddressingModeNV, c0); break; } + case Op::OpRawAccessChainNV: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + auto c6 = operands.read>(); + if (!operands.finishOperands(on_error, "OpRawAccessChainNV")) + return false; + load_context.onRawAccessChainNV(Op::OpRawAccessChainNV, c1, c0, c2, c3, c4, c5, c6); + break; + } case Op::OpSubgroupShuffleINTEL: { auto c0 = operands.read(); @@ -8300,6 +9073,34 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onLoopControlINTEL(Op::OpLoopControlINTEL, c0); break; } + case Op::OpAliasDomainDeclINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read>(); + if (!operands.finishOperands(on_error, "OpAliasDomainDeclINTEL")) + return false; + load_context.onAliasDomainDeclINTEL(Op::OpAliasDomainDeclINTEL, c0, c1); + break; + } + case Op::OpAliasScopeDeclINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read>(); + if (!operands.finishOperands(on_error, "OpAliasScopeDeclINTEL")) + return false; + load_context.onAliasScopeDeclINTEL(Op::OpAliasScopeDeclINTEL, c0, c1, c2); + break; + } + case Op::OpAliasScopeListDeclINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read>(); + if (!operands.finishOperands(on_error, "OpAliasScopeListDeclINTEL")) + return false; + load_context.onAliasScopeListDeclINTEL(Op::OpAliasScopeListDeclINTEL, c0, c1); + break; + } case Op::OpFixedSqrtINTEL: { auto c0 = operands.read(); @@ -8760,6 +9561,176 @@ inline bool load(const Id *words, Id word_count, HCB on_header, LC load_context, load_context.onSpecConstantCompositeContinuedINTEL(Op::OpSpecConstantCompositeContinuedINTEL, c0); break; } + case Op::OpCompositeConstructContinuedINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read>(); + if (!operands.finishOperands(on_error, "OpCompositeConstructContinuedINTEL")) + return false; + load_context.onCompositeConstructContinuedINTEL(Op::OpCompositeConstructContinuedINTEL, c1, c0, c2); + break; + } + case Op::OpConvertFToBF16INTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpConvertFToBF16INTEL")) + return false; + load_context.onConvertFToBF16INTEL(Op::OpConvertFToBF16INTEL, c1, c0, c2); + break; + } + case Op::OpConvertBF16ToFINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpConvertBF16ToFINTEL")) + return false; + load_context.onConvertBF16ToFINTEL(Op::OpConvertBF16ToFINTEL, c1, c0, c2); + break; + } + case Op::OpControlBarrierArriveINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpControlBarrierArriveINTEL")) + return false; + load_context.onControlBarrierArriveINTEL(Op::OpControlBarrierArriveINTEL, c0, c1, c2); + break; + } + case Op::OpControlBarrierWaitINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + if (!operands.finishOperands(on_error, "OpControlBarrierWaitINTEL")) + return false; + load_context.onControlBarrierWaitINTEL(Op::OpControlBarrierWaitINTEL, c0, c1, c2); + break; + } + case Op::OpGroupIMulKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupIMulKHR")) + return false; + load_context.onGroupIMulKHR(Op::OpGroupIMulKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupFMulKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupFMulKHR")) + return false; + load_context.onGroupFMulKHR(Op::OpGroupFMulKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupBitwiseAndKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupBitwiseAndKHR")) + return false; + load_context.onGroupBitwiseAndKHR(Op::OpGroupBitwiseAndKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupBitwiseOrKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupBitwiseOrKHR")) + return false; + load_context.onGroupBitwiseOrKHR(Op::OpGroupBitwiseOrKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupBitwiseXorKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupBitwiseXorKHR")) + return false; + load_context.onGroupBitwiseXorKHR(Op::OpGroupBitwiseXorKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupLogicalAndKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupLogicalAndKHR")) + return false; + load_context.onGroupLogicalAndKHR(Op::OpGroupLogicalAndKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupLogicalOrKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupLogicalOrKHR")) + return false; + load_context.onGroupLogicalOrKHR(Op::OpGroupLogicalOrKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpGroupLogicalXorKHR: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + if (!operands.finishOperands(on_error, "OpGroupLogicalXorKHR")) + return false; + load_context.onGroupLogicalXorKHR(Op::OpGroupLogicalXorKHR, c1, c0, c2, c3, c4); + break; + } + case Op::OpMaskedGatherINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + auto c4 = operands.read(); + auto c5 = operands.read(); + if (!operands.finishOperands(on_error, "OpMaskedGatherINTEL")) + return false; + load_context.onMaskedGatherINTEL(Op::OpMaskedGatherINTEL, c1, c0, c2, c3, c4, c5); + break; + } + case Op::OpMaskedScatterINTEL: + { + auto c0 = operands.read(); + auto c1 = operands.read(); + auto c2 = operands.read(); + auto c3 = operands.read(); + if (!operands.finishOperands(on_error, "OpMaskedScatterINTEL")) + return false; + load_context.onMaskedScatterINTEL(Op::OpMaskedScatterINTEL, c0, c1, c2, c3); + break; + } } at += len; } diff --git a/prog/gameLibs/spirv/module_nodes.h b/prog/gameLibs/spirv/module_nodes.h index 8df54e598..21e8904b0 100644 --- a/prog/gameLibs/spirv/module_nodes.h +++ b/prog/gameLibs/spirv/module_nodes.h @@ -1,4 +1,6 @@ -// this file is auto generated, do not modify +// Copyright (C) Gaijin Games KFT. All rights reserved. + +// auto generated, do not modify! #pragma once #include "../publicInclude/spirv/traits_table.h" namespace spirv @@ -1616,6 +1618,87 @@ struct PropertyNoUnsignedWrap void visitRefs(T) {} }; +struct PropertyWeightTextureQCOM +{ + const Decoration type = Decoration::WeightTextureQCOM; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::WeightTextureQCOM; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyWeightTextureQCOM}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyWeightTextureQCOM}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyBlockMatchTextureQCOM +{ + const Decoration type = Decoration::BlockMatchTextureQCOM; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::BlockMatchTextureQCOM; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyBlockMatchTextureQCOM}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyBlockMatchTextureQCOM}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyBlockMatchSamplerQCOM +{ + const Decoration type = Decoration::BlockMatchSamplerQCOM; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::BlockMatchSamplerQCOM; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyBlockMatchSamplerQCOM}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyBlockMatchSamplerQCOM}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; struct PropertyExplicitInterpAMD { const Decoration type = Decoration::ExplicitInterpAMD; @@ -1643,6 +1726,127 @@ struct PropertyExplicitInterpAMD void visitRefs(T) {} }; +struct PropertyNodeSharesPayloadLimitsWithAMDX +{ + const Decoration type = Decoration::NodeSharesPayloadLimitsWithAMDX; + eastl::optional memberIndex; + NodePointer payloadArray; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::NodeSharesPayloadLimitsWithAMDX; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyNodeSharesPayloadLimitsWithAMDX}; + result->memberIndex = memberIndex; + result->payloadArray = payloadArray; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyNodeSharesPayloadLimitsWithAMDX}; + result->memberIndex = i.value; + result->payloadArray = payloadArray; + return result; + } + template + void visitRefs(T visitor) + { + visitor(payloadArray); + } +}; +struct PropertyNodeMaxPayloadsAMDX +{ + const Decoration type = Decoration::NodeMaxPayloadsAMDX; + eastl::optional memberIndex; + NodePointer maxNumberOfPayloads; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::NodeMaxPayloadsAMDX; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyNodeMaxPayloadsAMDX}; + result->memberIndex = memberIndex; + result->maxNumberOfPayloads = maxNumberOfPayloads; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyNodeMaxPayloadsAMDX}; + result->memberIndex = i.value; + result->maxNumberOfPayloads = maxNumberOfPayloads; + return result; + } + template + void visitRefs(T visitor) + { + visitor(maxNumberOfPayloads); + } +}; +struct PropertyTrackFinishWritingAMDX +{ + const Decoration type = Decoration::TrackFinishWritingAMDX; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::TrackFinishWritingAMDX; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyTrackFinishWritingAMDX}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyTrackFinishWritingAMDX}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyPayloadNodeNameAMDX +{ + const Decoration type = Decoration::PayloadNodeNameAMDX; + eastl::optional memberIndex; + eastl::string nodeName; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::PayloadNodeNameAMDX; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyPayloadNodeNameAMDX}; + result->memberIndex = memberIndex; + result->nodeName = nodeName; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyPayloadNodeNameAMDX}; + result->memberIndex = i.value; + result->nodeName = nodeName; + return result; + } + template + void visitRefs(T) + {} +}; struct PropertyOverrideCoverageNV { const Decoration type = Decoration::OverrideCoverageNV; @@ -1754,26 +1958,26 @@ struct PropertySecondaryViewportRelativeNV void visitRefs(T) {} }; -struct PropertyPerPrimitiveNV +struct PropertyPerPrimitiveEXT { - const Decoration type = Decoration::PerPrimitiveNV; + const Decoration type = Decoration::PerPrimitiveEXT; eastl::optional memberIndex; template static constexpr bool is(const T *value) { - return value->type == Decoration::PerPrimitiveNV; + return value->type == Decoration::PerPrimitiveEXT; } - CastableUniquePointer clone() const + CastableUniquePointer clone() const { - CastableUniquePointer result // - {new PropertyPerPrimitiveNV}; + CastableUniquePointer result // + {new PropertyPerPrimitiveEXT}; result->memberIndex = memberIndex; return result; } - CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const { - CastableUniquePointer result // - {new PropertyPerPrimitiveNV}; + CastableUniquePointer result // + {new PropertyPerPrimitiveEXT}; result->memberIndex = i.value; return result; } @@ -1781,6 +1985,7 @@ struct PropertyPerPrimitiveNV void visitRefs(T) {} }; +typedef PropertyPerPrimitiveEXT PropertyPerPrimitiveNV; struct PropertyPerViewNV { const Decoration type = Decoration::PerViewNV; @@ -1947,6 +2152,33 @@ struct PropertyAliasedPointer {} }; typedef PropertyAliasedPointer PropertyAliasedPointerEXT; +struct PropertyHitObjectShaderRecordBufferNV +{ + const Decoration type = Decoration::HitObjectShaderRecordBufferNV; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::HitObjectShaderRecordBufferNV; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyHitObjectShaderRecordBufferNV}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyHitObjectShaderRecordBufferNV}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; struct PropertyBindlessSamplerNV { const Decoration type = Decoration::BindlessSamplerNV; @@ -2821,6 +3053,93 @@ struct PropertyForcePow2DepthINTEL void visitRefs(T) {} }; +struct PropertyStridesizeINTEL +{ + const Decoration type = Decoration::StridesizeINTEL; + eastl::optional memberIndex; + LiteralInteger strideSize; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::StridesizeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyStridesizeINTEL}; + result->memberIndex = memberIndex; + result->strideSize = strideSize; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyStridesizeINTEL}; + result->memberIndex = i.value; + result->strideSize = strideSize; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyWordsizeINTEL +{ + const Decoration type = Decoration::WordsizeINTEL; + eastl::optional memberIndex; + LiteralInteger wordSize; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::WordsizeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyWordsizeINTEL}; + result->memberIndex = memberIndex; + result->wordSize = wordSize; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyWordsizeINTEL}; + result->memberIndex = i.value; + result->wordSize = wordSize; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyTrueDualPortINTEL +{ + const Decoration type = Decoration::TrueDualPortINTEL; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::TrueDualPortINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyTrueDualPortINTEL}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyTrueDualPortINTEL}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; struct PropertyBurstCoalesceINTEL { const Decoration type = Decoration::BurstCoalesceINTEL; @@ -2989,6 +3308,193 @@ struct PropertyFuseLoopsInFunctionINTEL void visitRefs(T) {} }; +struct PropertyMathOpDSPModeINTEL +{ + const Decoration type = Decoration::MathOpDSPModeINTEL; + eastl::optional memberIndex; + LiteralInteger mode; + LiteralInteger propagate; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MathOpDSPModeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMathOpDSPModeINTEL}; + result->memberIndex = memberIndex; + result->mode = mode; + result->propagate = propagate; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMathOpDSPModeINTEL}; + result->memberIndex = i.value; + result->mode = mode; + result->propagate = propagate; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyAliasScopeINTEL +{ + const Decoration type = Decoration::AliasScopeINTEL; + eastl::optional memberIndex; + NodePointer aliasingScopesList; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::AliasScopeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyAliasScopeINTEL}; + result->memberIndex = memberIndex; + result->aliasingScopesList = aliasingScopesList; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyAliasScopeINTEL}; + result->memberIndex = i.value; + result->aliasingScopesList = aliasingScopesList; + return result; + } + template + void visitRefs(T visitor) + { + visitor(aliasingScopesList); + } +}; +struct PropertyNoAliasINTEL +{ + const Decoration type = Decoration::NoAliasINTEL; + eastl::optional memberIndex; + NodePointer aliasingScopesList; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::NoAliasINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyNoAliasINTEL}; + result->memberIndex = memberIndex; + result->aliasingScopesList = aliasingScopesList; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyNoAliasINTEL}; + result->memberIndex = i.value; + result->aliasingScopesList = aliasingScopesList; + return result; + } + template + void visitRefs(T visitor) + { + visitor(aliasingScopesList); + } +}; +struct PropertyInitiationIntervalINTEL +{ + const Decoration type = Decoration::InitiationIntervalINTEL; + eastl::optional memberIndex; + LiteralInteger cycles; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::InitiationIntervalINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyInitiationIntervalINTEL}; + result->memberIndex = memberIndex; + result->cycles = cycles; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyInitiationIntervalINTEL}; + result->memberIndex = i.value; + result->cycles = cycles; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMaxConcurrencyINTEL +{ + const Decoration type = Decoration::MaxConcurrencyINTEL; + eastl::optional memberIndex; + LiteralInteger invocations; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MaxConcurrencyINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMaxConcurrencyINTEL}; + result->memberIndex = memberIndex; + result->invocations = invocations; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMaxConcurrencyINTEL}; + result->memberIndex = i.value; + result->invocations = invocations; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyPipelineEnableINTEL +{ + const Decoration type = Decoration::PipelineEnableINTEL; + eastl::optional memberIndex; + LiteralInteger enable; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::PipelineEnableINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyPipelineEnableINTEL}; + result->memberIndex = memberIndex; + result->enable = enable; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyPipelineEnableINTEL}; + result->memberIndex = i.value; + result->enable = enable; + return result; + } + template + void visitRefs(T) + {} +}; struct PropertyBufferLocationINTEL { const Decoration type = Decoration::BufferLocationINTEL; @@ -3163,6 +3669,549 @@ struct PropertyMediaBlockIOINTEL void visitRefs(T) {} }; +struct PropertyStallFreeINTEL +{ + const Decoration type = Decoration::StallFreeINTEL; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::StallFreeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyStallFreeINTEL}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyStallFreeINTEL}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyFPMaxErrorDecorationINTEL +{ + const Decoration type = Decoration::FPMaxErrorDecorationINTEL; + eastl::optional memberIndex; + LiteralFloat maxError; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::FPMaxErrorDecorationINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyFPMaxErrorDecorationINTEL}; + result->memberIndex = memberIndex; + result->maxError = maxError; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyFPMaxErrorDecorationINTEL}; + result->memberIndex = i.value; + result->maxError = maxError; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyLatencyControlLabelINTEL +{ + const Decoration type = Decoration::LatencyControlLabelINTEL; + eastl::optional memberIndex; + LiteralInteger latencyLabel; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::LatencyControlLabelINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyLatencyControlLabelINTEL}; + result->memberIndex = memberIndex; + result->latencyLabel = latencyLabel; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyLatencyControlLabelINTEL}; + result->memberIndex = i.value; + result->latencyLabel = latencyLabel; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyLatencyControlConstraintINTEL +{ + const Decoration type = Decoration::LatencyControlConstraintINTEL; + eastl::optional memberIndex; + LiteralInteger relativeTo; + LiteralInteger controlType; + LiteralInteger relativeCycle; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::LatencyControlConstraintINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyLatencyControlConstraintINTEL}; + result->memberIndex = memberIndex; + result->relativeTo = relativeTo; + result->controlType = controlType; + result->relativeCycle = relativeCycle; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyLatencyControlConstraintINTEL}; + result->memberIndex = i.value; + result->relativeTo = relativeTo; + result->controlType = controlType; + result->relativeCycle = relativeCycle; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyConduitKernelArgumentINTEL +{ + const Decoration type = Decoration::ConduitKernelArgumentINTEL; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::ConduitKernelArgumentINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyConduitKernelArgumentINTEL}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyConduitKernelArgumentINTEL}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyRegisterMapKernelArgumentINTEL +{ + const Decoration type = Decoration::RegisterMapKernelArgumentINTEL; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::RegisterMapKernelArgumentINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyRegisterMapKernelArgumentINTEL}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyRegisterMapKernelArgumentINTEL}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceAddressWidthINTEL +{ + const Decoration type = Decoration::MMHostInterfaceAddressWidthINTEL; + eastl::optional memberIndex; + LiteralInteger addressWidth; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceAddressWidthINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceAddressWidthINTEL}; + result->memberIndex = memberIndex; + result->addressWidth = addressWidth; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceAddressWidthINTEL}; + result->memberIndex = i.value; + result->addressWidth = addressWidth; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceDataWidthINTEL +{ + const Decoration type = Decoration::MMHostInterfaceDataWidthINTEL; + eastl::optional memberIndex; + LiteralInteger dataWidth; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceDataWidthINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceDataWidthINTEL}; + result->memberIndex = memberIndex; + result->dataWidth = dataWidth; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceDataWidthINTEL}; + result->memberIndex = i.value; + result->dataWidth = dataWidth; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceLatencyINTEL +{ + const Decoration type = Decoration::MMHostInterfaceLatencyINTEL; + eastl::optional memberIndex; + LiteralInteger latency; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceLatencyINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceLatencyINTEL}; + result->memberIndex = memberIndex; + result->latency = latency; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceLatencyINTEL}; + result->memberIndex = i.value; + result->latency = latency; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceReadWriteModeINTEL +{ + const Decoration type = Decoration::MMHostInterfaceReadWriteModeINTEL; + eastl::optional memberIndex; + AccessQualifier readWriteMode; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceReadWriteModeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceReadWriteModeINTEL}; + result->memberIndex = memberIndex; + result->readWriteMode = readWriteMode; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceReadWriteModeINTEL}; + result->memberIndex = i.value; + result->readWriteMode = readWriteMode; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceMaxBurstINTEL +{ + const Decoration type = Decoration::MMHostInterfaceMaxBurstINTEL; + eastl::optional memberIndex; + LiteralInteger maxBurstCount; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceMaxBurstINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceMaxBurstINTEL}; + result->memberIndex = memberIndex; + result->maxBurstCount = maxBurstCount; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceMaxBurstINTEL}; + result->memberIndex = i.value; + result->maxBurstCount = maxBurstCount; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyMMHostInterfaceWaitRequestINTEL +{ + const Decoration type = Decoration::MMHostInterfaceWaitRequestINTEL; + eastl::optional memberIndex; + LiteralInteger waitrequest; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::MMHostInterfaceWaitRequestINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceWaitRequestINTEL}; + result->memberIndex = memberIndex; + result->waitrequest = waitrequest; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyMMHostInterfaceWaitRequestINTEL}; + result->memberIndex = i.value; + result->waitrequest = waitrequest; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyStableKernelArgumentINTEL +{ + const Decoration type = Decoration::StableKernelArgumentINTEL; + eastl::optional memberIndex; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::StableKernelArgumentINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyStableKernelArgumentINTEL}; + result->memberIndex = memberIndex; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyStableKernelArgumentINTEL}; + result->memberIndex = i.value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyHostAccessINTEL +{ + const Decoration type = Decoration::HostAccessINTEL; + eastl::optional memberIndex; + HostAccessQualifier access; + eastl::string name; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::HostAccessINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyHostAccessINTEL}; + result->memberIndex = memberIndex; + result->access = access; + result->name = name; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyHostAccessINTEL}; + result->memberIndex = i.value; + result->access = access; + result->name = name; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyInitModeINTEL +{ + const Decoration type = Decoration::InitModeINTEL; + eastl::optional memberIndex; + InitializationModeQualifier trigger; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::InitModeINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyInitModeINTEL}; + result->memberIndex = memberIndex; + result->trigger = trigger; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyInitModeINTEL}; + result->memberIndex = i.value; + result->trigger = trigger; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyImplementInRegisterMapINTEL +{ + const Decoration type = Decoration::ImplementInRegisterMapINTEL; + eastl::optional memberIndex; + LiteralInteger value; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::ImplementInRegisterMapINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyImplementInRegisterMapINTEL}; + result->memberIndex = memberIndex; + result->value = value; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyImplementInRegisterMapINTEL}; + result->memberIndex = i.value; + result->value = value; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyCacheControlLoadINTEL +{ + const Decoration type = Decoration::CacheControlLoadINTEL; + eastl::optional memberIndex; + LiteralInteger cacheLevel; + LoadCacheControl cacheControl; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::CacheControlLoadINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyCacheControlLoadINTEL}; + result->memberIndex = memberIndex; + result->cacheLevel = cacheLevel; + result->cacheControl = cacheControl; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyCacheControlLoadINTEL}; + result->memberIndex = i.value; + result->cacheLevel = cacheLevel; + result->cacheControl = cacheControl; + return result; + } + template + void visitRefs(T) + {} +}; +struct PropertyCacheControlStoreINTEL +{ + const Decoration type = Decoration::CacheControlStoreINTEL; + eastl::optional memberIndex; + LiteralInteger cacheLevel; + StoreCacheControl cacheControl; + template + static constexpr bool is(const T *value) + { + return value->type == Decoration::CacheControlStoreINTEL; + } + CastableUniquePointer clone() const + { + CastableUniquePointer result // + {new PropertyCacheControlStoreINTEL}; + result->memberIndex = memberIndex; + result->cacheLevel = cacheLevel; + result->cacheControl = cacheControl; + return result; + } + CastableUniquePointer cloneWithMemberIndexOverride(LiteralInteger i) const + { + CastableUniquePointer result // + {new PropertyCacheControlStoreINTEL}; + result->memberIndex = i.value; + result->cacheLevel = cacheLevel; + result->cacheControl = cacheControl; + return result; + } + template + void visitRefs(T) + {} +}; // in memory nodes struct Node { @@ -3556,6 +4605,8 @@ struct NodeOpCopyMemory NodePointer memoryAccess0MakePointerAvailableKHR; NodePointer memoryAccess0MakePointerVisible; NodePointer memoryAccess0MakePointerVisibleKHR; + NodePointer memoryAccess0AliasScopeINTELMask; + NodePointer memoryAccess0NoAliasINTELMask; eastl::optional memoryAccess1; // extra values for memoryAccess1 LiteralInteger memoryAccess1Aligned; @@ -3563,6 +4614,8 @@ struct NodeOpCopyMemory NodePointer memoryAccess1MakePointerAvailableKHR; NodePointer memoryAccess1MakePointerVisible; NodePointer memoryAccess1MakePointerVisibleKHR; + NodePointer memoryAccess1AliasScopeINTELMask; + NodePointer memoryAccess1NoAliasINTELMask; template void visitRefs(T visitor) { @@ -3576,6 +4629,10 @@ struct NodeOpCopyMemory visitor(memoryAccess0MakePointerVisible); if (memoryAccess0MakePointerVisibleKHR) visitor(memoryAccess0MakePointerVisibleKHR); + if (memoryAccess0AliasScopeINTELMask) + visitor(memoryAccess0AliasScopeINTELMask); + if (memoryAccess0NoAliasINTELMask) + visitor(memoryAccess0NoAliasINTELMask); if (memoryAccess1MakePointerAvailable) visitor(memoryAccess1MakePointerAvailable); if (memoryAccess1MakePointerAvailableKHR) @@ -3584,6 +4641,10 @@ struct NodeOpCopyMemory visitor(memoryAccess1MakePointerVisible); if (memoryAccess1MakePointerVisibleKHR) visitor(memoryAccess1MakePointerVisibleKHR); + if (memoryAccess1AliasScopeINTELMask) + visitor(memoryAccess1AliasScopeINTELMask); + if (memoryAccess1NoAliasINTELMask) + visitor(memoryAccess1NoAliasINTELMask); } NodeOpCopyMemory() = default; ~NodeOpCopyMemory() = default; @@ -3595,11 +4656,13 @@ struct NodeOpCopyMemory eastl::optional memory_access0_aligned = {}, NodePointer memory_access0_makePointerAvailable = {}, NodePointer memory_access0_makePointerAvailableKHR = {}, NodePointer memory_access0_makePointerVisible = {}, - NodePointer memory_access0_makePointerVisibleKHR = {}, eastl::optional memory_access1 = {}, + NodePointer memory_access0_makePointerVisibleKHR = {}, NodePointer memory_access0_aliasScopeINTELMask = {}, + NodePointer memory_access0_noAliasINTELMask = {}, eastl::optional memory_access1 = {}, eastl::optional memory_access1_aligned = {}, NodePointer memory_access1_makePointerAvailable = {}, NodePointer memory_access1_makePointerAvailableKHR = {}, NodePointer memory_access1_makePointerVisible = {}, - NodePointer memory_access1_makePointerVisibleKHR = {}) + NodePointer memory_access1_makePointerVisibleKHR = {}, NodePointer memory_access1_aliasScopeINTELMask = {}, + NodePointer memory_access1_noAliasINTELMask = {}) { this->target = target; this->source = source; @@ -3610,6 +4673,8 @@ struct NodeOpCopyMemory this->memoryAccess0MakePointerAvailableKHR = memory_access0_makePointerAvailableKHR; this->memoryAccess0MakePointerVisible = memory_access0_makePointerVisible; this->memoryAccess0MakePointerVisibleKHR = memory_access0_makePointerVisibleKHR; + this->memoryAccess0AliasScopeINTELMask = memory_access0_aliasScopeINTELMask; + this->memoryAccess0NoAliasINTELMask = memory_access0_noAliasINTELMask; this->memoryAccess1 = memory_access1; if (memory_access1_aligned) this->memoryAccess1Aligned = *memory_access1_aligned; @@ -3617,6 +4682,8 @@ struct NodeOpCopyMemory this->memoryAccess1MakePointerAvailableKHR = memory_access1_makePointerAvailableKHR; this->memoryAccess1MakePointerVisible = memory_access1_makePointerVisible; this->memoryAccess1MakePointerVisibleKHR = memory_access1_makePointerVisibleKHR; + this->memoryAccess1AliasScopeINTELMask = memory_access1_aliasScopeINTELMask; + this->memoryAccess1NoAliasINTELMask = memory_access1_noAliasINTELMask; } template static constexpr bool is(const T *value); @@ -3677,6 +4744,96 @@ struct NodeOpExecuteCallableNV template static constexpr bool is(const T *value); }; +struct NodeOpHitObjectExecuteShaderNV +{ + const NodeKind nodeKind = NodeKind::BinaryAction; + const Op opCode = Op::OpHitObjectExecuteShaderNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer hitObject; + NodePointer payload; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(payload); + } + NodeOpHitObjectExecuteShaderNV() = default; + ~NodeOpHitObjectExecuteShaderNV() = default; + NodeOpHitObjectExecuteShaderNV(const NodeOpHitObjectExecuteShaderNV &) = delete; + NodeOpHitObjectExecuteShaderNV &operator=(const NodeOpHitObjectExecuteShaderNV &) = delete; + NodeOpHitObjectExecuteShaderNV(NodeOpHitObjectExecuteShaderNV &&) = delete; + NodeOpHitObjectExecuteShaderNV &operator=(NodeOpHitObjectExecuteShaderNV &&) = delete; + NodeOpHitObjectExecuteShaderNV(NodePointer hit_object, NodePointer payload) + { + this->hitObject = hit_object; + this->payload = payload; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetAttributesNV +{ + const NodeKind nodeKind = NodeKind::BinaryAction; + const Op opCode = Op::OpHitObjectGetAttributesNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer hitObject; + NodePointer hitObjectAttribute; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(hitObjectAttribute); + } + NodeOpHitObjectGetAttributesNV() = default; + ~NodeOpHitObjectGetAttributesNV() = default; + NodeOpHitObjectGetAttributesNV(const NodeOpHitObjectGetAttributesNV &) = delete; + NodeOpHitObjectGetAttributesNV &operator=(const NodeOpHitObjectGetAttributesNV &) = delete; + NodeOpHitObjectGetAttributesNV(NodeOpHitObjectGetAttributesNV &&) = delete; + NodeOpHitObjectGetAttributesNV &operator=(NodeOpHitObjectGetAttributesNV &&) = delete; + NodeOpHitObjectGetAttributesNV(NodePointer hit_object, NodePointer hit_object_attribute) + { + this->hitObject = hit_object; + this->hitObjectAttribute = hit_object_attribute; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpMaskedScatterINTEL +{ + const NodeKind nodeKind = NodeKind::BinaryAction; + const Op opCode = Op::OpMaskedScatterINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer inputVector; + NodePointer ptrVector; + LiteralInteger alignment; + NodePointer mask; + template + void visitRefs(T visitor) + { + visitor(inputVector); + visitor(ptrVector); + visitor(mask); + } + NodeOpMaskedScatterINTEL() = default; + ~NodeOpMaskedScatterINTEL() = default; + NodeOpMaskedScatterINTEL(const NodeOpMaskedScatterINTEL &) = delete; + NodeOpMaskedScatterINTEL &operator=(const NodeOpMaskedScatterINTEL &) = delete; + NodeOpMaskedScatterINTEL(NodeOpMaskedScatterINTEL &&) = delete; + NodeOpMaskedScatterINTEL &operator=(NodeOpMaskedScatterINTEL &&) = delete; + NodeOpMaskedScatterINTEL(NodePointer input_vector, NodePointer ptr_vector, LiteralInteger alignment, + NodePointer mask) + { + this->inputVector = input_vector; + this->ptrVector = ptr_vector; + this->alignment = alignment; + this->mask = mask; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpRayQueryGenerateIntersectionKHR { const NodeKind nodeKind = NodeKind::BinaryAction; @@ -3705,6 +4862,62 @@ struct NodeOpRayQueryGenerateIntersectionKHR template static constexpr bool is(const T *value); }; +struct NodeOpReorderThreadWithHintNV +{ + const NodeKind nodeKind = NodeKind::BinaryAction; + const Op opCode = Op::OpReorderThreadWithHintNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer hint; + NodePointer bits; + template + void visitRefs(T visitor) + { + visitor(hint); + visitor(bits); + } + NodeOpReorderThreadWithHintNV() = default; + ~NodeOpReorderThreadWithHintNV() = default; + NodeOpReorderThreadWithHintNV(const NodeOpReorderThreadWithHintNV &) = delete; + NodeOpReorderThreadWithHintNV &operator=(const NodeOpReorderThreadWithHintNV &) = delete; + NodeOpReorderThreadWithHintNV(NodeOpReorderThreadWithHintNV &&) = delete; + NodeOpReorderThreadWithHintNV &operator=(NodeOpReorderThreadWithHintNV &&) = delete; + NodeOpReorderThreadWithHintNV(NodePointer hint, NodePointer bits) + { + this->hint = hint; + this->bits = bits; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpSetMeshOutputsEXT +{ + const NodeKind nodeKind = NodeKind::BinaryAction; + const Op opCode = Op::OpSetMeshOutputsEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer vertexCount; + NodePointer primitiveCount; + template + void visitRefs(T visitor) + { + visitor(vertexCount); + visitor(primitiveCount); + } + NodeOpSetMeshOutputsEXT() = default; + ~NodeOpSetMeshOutputsEXT() = default; + NodeOpSetMeshOutputsEXT(const NodeOpSetMeshOutputsEXT &) = delete; + NodeOpSetMeshOutputsEXT &operator=(const NodeOpSetMeshOutputsEXT &) = delete; + NodeOpSetMeshOutputsEXT(NodeOpSetMeshOutputsEXT &&) = delete; + NodeOpSetMeshOutputsEXT &operator=(NodeOpSetMeshOutputsEXT &&) = delete; + NodeOpSetMeshOutputsEXT(NodePointer vertex_count, NodePointer primitive_count) + { + this->vertexCount = vertex_count; + this->primitiveCount = primitive_count; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpSetUserEventStatus { const NodeKind nodeKind = NodeKind::BinaryAction; @@ -3748,6 +4961,8 @@ struct NodeOpStore NodePointer memoryAccessMakePointerAvailableKHR; NodePointer memoryAccessMakePointerVisible; NodePointer memoryAccessMakePointerVisibleKHR; + NodePointer memoryAccessAliasScopeINTELMask; + NodePointer memoryAccessNoAliasINTELMask; template void visitRefs(T visitor) { @@ -3761,6 +4976,10 @@ struct NodeOpStore visitor(memoryAccessMakePointerVisible); if (memoryAccessMakePointerVisibleKHR) visitor(memoryAccessMakePointerVisibleKHR); + if (memoryAccessAliasScopeINTELMask) + visitor(memoryAccessAliasScopeINTELMask); + if (memoryAccessNoAliasINTELMask) + visitor(memoryAccessNoAliasINTELMask); } NodeOpStore() = default; ~NodeOpStore() = default; @@ -3772,7 +4991,8 @@ struct NodeOpStore eastl::optional memory_access_aligned = {}, NodePointer memory_access_makePointerAvailable = {}, NodePointer memory_access_makePointerAvailableKHR = {}, NodePointer memory_access_makePointerVisible = {}, - NodePointer memory_access_makePointerVisibleKHR = {}) + NodePointer memory_access_makePointerVisibleKHR = {}, NodePointer memory_access_aliasScopeINTELMask = {}, + NodePointer memory_access_noAliasINTELMask = {}) { this->pointer = pointer; this->object = object; @@ -3783,6 +5003,8 @@ struct NodeOpStore this->memoryAccessMakePointerAvailableKHR = memory_access_makePointerAvailableKHR; this->memoryAccessMakePointerVisible = memory_access_makePointerVisible; this->memoryAccessMakePointerVisibleKHR = memory_access_makePointerVisibleKHR; + this->memoryAccessAliasScopeINTELMask = memory_access_aliasScopeINTELMask; + this->memoryAccessNoAliasINTELMask = memory_access_noAliasINTELMask; } template static constexpr bool is(const T *value); @@ -3863,10 +5085,30 @@ inline bool NodeBinaryAction::visit(NodeBinaryAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpHitObjectExecuteShaderNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetAttributesNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpMaskedScatterINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpRayQueryGenerateIntersectionKHR: if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpReorderThreadWithHintNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpSetMeshOutputsEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpSetUserEventStatus: if (visitor(reinterpret_cast(node))) return true; @@ -4200,6 +5442,8 @@ struct NodeOpCooperativeMatrixStoreNV NodePointer memoryAccessMakePointerAvailableKHR; NodePointer memoryAccessMakePointerVisible; NodePointer memoryAccessMakePointerVisibleKHR; + NodePointer memoryAccessAliasScopeINTELMask; + NodePointer memoryAccessNoAliasINTELMask; template void visitRefs(T visitor) { @@ -4215,6 +5459,10 @@ struct NodeOpCooperativeMatrixStoreNV visitor(memoryAccessMakePointerVisible); if (memoryAccessMakePointerVisibleKHR) visitor(memoryAccessMakePointerVisibleKHR); + if (memoryAccessAliasScopeINTELMask) + visitor(memoryAccessAliasScopeINTELMask); + if (memoryAccessNoAliasINTELMask) + visitor(memoryAccessNoAliasINTELMask); } NodeOpCooperativeMatrixStoreNV() = default; ~NodeOpCooperativeMatrixStoreNV() = default; @@ -4227,7 +5475,8 @@ struct NodeOpCooperativeMatrixStoreNV eastl::optional memory_access_aligned = {}, NodePointer memory_access_makePointerAvailable = {}, NodePointer memory_access_makePointerAvailableKHR = {}, NodePointer memory_access_makePointerVisible = {}, - NodePointer memory_access_makePointerVisibleKHR = {}) + NodePointer memory_access_makePointerVisibleKHR = {}, NodePointer memory_access_aliasScopeINTELMask = {}, + NodePointer memory_access_noAliasINTELMask = {}) { this->pointer = pointer; this->object = object; @@ -4240,6 +5489,485 @@ struct NodeOpCooperativeMatrixStoreNV this->memoryAccessMakePointerAvailableKHR = memory_access_makePointerAvailableKHR; this->memoryAccessMakePointerVisible = memory_access_makePointerVisible; this->memoryAccessMakePointerVisibleKHR = memory_access_makePointerVisibleKHR; + this->memoryAccessAliasScopeINTELMask = memory_access_aliasScopeINTELMask; + this->memoryAccessNoAliasINTELMask = memory_access_noAliasINTELMask; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordHitMotionNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordHitMotionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 14; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer instanceId; + NodePointer primitiveId; + NodePointer geometryIndex; + NodePointer hitKind; + NodePointer sbtRecordOffset; + NodePointer sbtRecordStride; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer currentTime; + NodePointer hitobjectAttributes; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(instanceId); + visitor(primitiveId); + visitor(geometryIndex); + visitor(hitKind); + visitor(sbtRecordOffset); + visitor(sbtRecordStride); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(currentTime); + visitor(hitobjectAttributes); + } + NodeOpHitObjectRecordHitMotionNV() = default; + ~NodeOpHitObjectRecordHitMotionNV() = default; + NodeOpHitObjectRecordHitMotionNV(const NodeOpHitObjectRecordHitMotionNV &) = delete; + NodeOpHitObjectRecordHitMotionNV &operator=(const NodeOpHitObjectRecordHitMotionNV &) = delete; + NodeOpHitObjectRecordHitMotionNV(NodeOpHitObjectRecordHitMotionNV &&) = delete; + NodeOpHitObjectRecordHitMotionNV &operator=(NodeOpHitObjectRecordHitMotionNV &&) = delete; + NodeOpHitObjectRecordHitMotionNV(NodePointer hit_object, NodePointer acceleration_structure, + NodePointer instance_id, NodePointer primitive_id, NodePointer geometry_index, + NodePointer hit_kind, NodePointer s_b_t_record_offset, NodePointer s_b_t_record_stride, + NodePointer origin, NodePointer t_min, NodePointer direction, NodePointer t_max, + NodePointer current_time, NodePointer hit_object_attributes) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->instanceId = instance_id; + this->primitiveId = primitive_id; + this->geometryIndex = geometry_index; + this->hitKind = hit_kind; + this->sbtRecordOffset = s_b_t_record_offset; + this->sbtRecordStride = s_b_t_record_stride; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->currentTime = current_time; + this->hitobjectAttributes = hit_object_attributes; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordHitNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordHitNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 13; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer instanceId; + NodePointer primitiveId; + NodePointer geometryIndex; + NodePointer hitKind; + NodePointer sbtRecordOffset; + NodePointer sbtRecordStride; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer hitobjectAttributes; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(instanceId); + visitor(primitiveId); + visitor(geometryIndex); + visitor(hitKind); + visitor(sbtRecordOffset); + visitor(sbtRecordStride); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(hitobjectAttributes); + } + NodeOpHitObjectRecordHitNV() = default; + ~NodeOpHitObjectRecordHitNV() = default; + NodeOpHitObjectRecordHitNV(const NodeOpHitObjectRecordHitNV &) = delete; + NodeOpHitObjectRecordHitNV &operator=(const NodeOpHitObjectRecordHitNV &) = delete; + NodeOpHitObjectRecordHitNV(NodeOpHitObjectRecordHitNV &&) = delete; + NodeOpHitObjectRecordHitNV &operator=(NodeOpHitObjectRecordHitNV &&) = delete; + NodeOpHitObjectRecordHitNV(NodePointer hit_object, NodePointer acceleration_structure, + NodePointer instance_id, NodePointer primitive_id, NodePointer geometry_index, + NodePointer hit_kind, NodePointer s_b_t_record_offset, NodePointer s_b_t_record_stride, + NodePointer origin, NodePointer t_min, NodePointer direction, NodePointer t_max, + NodePointer hit_object_attributes) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->instanceId = instance_id; + this->primitiveId = primitive_id; + this->geometryIndex = geometry_index; + this->hitKind = hit_kind; + this->sbtRecordOffset = s_b_t_record_offset; + this->sbtRecordStride = s_b_t_record_stride; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->hitobjectAttributes = hit_object_attributes; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordHitWithIndexMotionNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordHitWithIndexMotionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 13; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer instanceId; + NodePointer primitiveId; + NodePointer geometryIndex; + NodePointer hitKind; + NodePointer sbtRecordIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer currentTime; + NodePointer hitobjectAttributes; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(instanceId); + visitor(primitiveId); + visitor(geometryIndex); + visitor(hitKind); + visitor(sbtRecordIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(currentTime); + visitor(hitobjectAttributes); + } + NodeOpHitObjectRecordHitWithIndexMotionNV() = default; + ~NodeOpHitObjectRecordHitWithIndexMotionNV() = default; + NodeOpHitObjectRecordHitWithIndexMotionNV(const NodeOpHitObjectRecordHitWithIndexMotionNV &) = delete; + NodeOpHitObjectRecordHitWithIndexMotionNV &operator=(const NodeOpHitObjectRecordHitWithIndexMotionNV &) = delete; + NodeOpHitObjectRecordHitWithIndexMotionNV(NodeOpHitObjectRecordHitWithIndexMotionNV &&) = delete; + NodeOpHitObjectRecordHitWithIndexMotionNV &operator=(NodeOpHitObjectRecordHitWithIndexMotionNV &&) = delete; + NodeOpHitObjectRecordHitWithIndexMotionNV(NodePointer hit_object, NodePointer acceleration_structure, + NodePointer instance_id, NodePointer primitive_id, NodePointer geometry_index, + NodePointer hit_kind, NodePointer s_b_t_record_index, NodePointer origin, NodePointer t_min, + NodePointer direction, NodePointer t_max, NodePointer current_time, + NodePointer hit_object_attributes) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->instanceId = instance_id; + this->primitiveId = primitive_id; + this->geometryIndex = geometry_index; + this->hitKind = hit_kind; + this->sbtRecordIndex = s_b_t_record_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->currentTime = current_time; + this->hitobjectAttributes = hit_object_attributes; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordHitWithIndexNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordHitWithIndexNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 12; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer instanceId; + NodePointer primitiveId; + NodePointer geometryIndex; + NodePointer hitKind; + NodePointer sbtRecordIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer hitobjectAttributes; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(instanceId); + visitor(primitiveId); + visitor(geometryIndex); + visitor(hitKind); + visitor(sbtRecordIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(hitobjectAttributes); + } + NodeOpHitObjectRecordHitWithIndexNV() = default; + ~NodeOpHitObjectRecordHitWithIndexNV() = default; + NodeOpHitObjectRecordHitWithIndexNV(const NodeOpHitObjectRecordHitWithIndexNV &) = delete; + NodeOpHitObjectRecordHitWithIndexNV &operator=(const NodeOpHitObjectRecordHitWithIndexNV &) = delete; + NodeOpHitObjectRecordHitWithIndexNV(NodeOpHitObjectRecordHitWithIndexNV &&) = delete; + NodeOpHitObjectRecordHitWithIndexNV &operator=(NodeOpHitObjectRecordHitWithIndexNV &&) = delete; + NodeOpHitObjectRecordHitWithIndexNV(NodePointer hit_object, NodePointer acceleration_structure, + NodePointer instance_id, NodePointer primitive_id, NodePointer geometry_index, + NodePointer hit_kind, NodePointer s_b_t_record_index, NodePointer origin, NodePointer t_min, + NodePointer direction, NodePointer t_max, NodePointer hit_object_attributes) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->instanceId = instance_id; + this->primitiveId = primitive_id; + this->geometryIndex = geometry_index; + this->hitKind = hit_kind; + this->sbtRecordIndex = s_b_t_record_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->hitobjectAttributes = hit_object_attributes; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordMissMotionNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordMissMotionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 7; + NodePointer hitObject; + NodePointer sbtIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer currentTime; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(sbtIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(currentTime); + } + NodeOpHitObjectRecordMissMotionNV() = default; + ~NodeOpHitObjectRecordMissMotionNV() = default; + NodeOpHitObjectRecordMissMotionNV(const NodeOpHitObjectRecordMissMotionNV &) = delete; + NodeOpHitObjectRecordMissMotionNV &operator=(const NodeOpHitObjectRecordMissMotionNV &) = delete; + NodeOpHitObjectRecordMissMotionNV(NodeOpHitObjectRecordMissMotionNV &&) = delete; + NodeOpHitObjectRecordMissMotionNV &operator=(NodeOpHitObjectRecordMissMotionNV &&) = delete; + NodeOpHitObjectRecordMissMotionNV(NodePointer hit_object, NodePointer s_b_t_index, NodePointer origin, + NodePointer t_min, NodePointer direction, NodePointer t_max, NodePointer current_time) + { + this->hitObject = hit_object; + this->sbtIndex = s_b_t_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->currentTime = current_time; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordMissNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectRecordMissNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 6; + NodePointer hitObject; + NodePointer sbtIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(sbtIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + } + NodeOpHitObjectRecordMissNV() = default; + ~NodeOpHitObjectRecordMissNV() = default; + NodeOpHitObjectRecordMissNV(const NodeOpHitObjectRecordMissNV &) = delete; + NodeOpHitObjectRecordMissNV &operator=(const NodeOpHitObjectRecordMissNV &) = delete; + NodeOpHitObjectRecordMissNV(NodeOpHitObjectRecordMissNV &&) = delete; + NodeOpHitObjectRecordMissNV &operator=(NodeOpHitObjectRecordMissNV &&) = delete; + NodeOpHitObjectRecordMissNV(NodePointer hit_object, NodePointer s_b_t_index, NodePointer origin, + NodePointer t_min, NodePointer direction, NodePointer t_max) + { + this->hitObject = hit_object; + this->sbtIndex = s_b_t_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectTraceRayMotionNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectTraceRayMotionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 13; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer rayFlags; + NodePointer cullmask; + NodePointer sbtRecordOffset; + NodePointer sbtRecordStride; + NodePointer missIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer time; + NodePointer payload; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(rayFlags); + visitor(cullmask); + visitor(sbtRecordOffset); + visitor(sbtRecordStride); + visitor(missIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(time); + visitor(payload); + } + NodeOpHitObjectTraceRayMotionNV() = default; + ~NodeOpHitObjectTraceRayMotionNV() = default; + NodeOpHitObjectTraceRayMotionNV(const NodeOpHitObjectTraceRayMotionNV &) = delete; + NodeOpHitObjectTraceRayMotionNV &operator=(const NodeOpHitObjectTraceRayMotionNV &) = delete; + NodeOpHitObjectTraceRayMotionNV(NodeOpHitObjectTraceRayMotionNV &&) = delete; + NodeOpHitObjectTraceRayMotionNV &operator=(NodeOpHitObjectTraceRayMotionNV &&) = delete; + NodeOpHitObjectTraceRayMotionNV(NodePointer hit_object, NodePointer acceleration_structure, + NodePointer ray_flags, NodePointer cullmask, NodePointer s_b_t_record_offset, + NodePointer s_b_t_record_stride, NodePointer miss_index, NodePointer origin, NodePointer t_min, + NodePointer direction, NodePointer t_max, NodePointer time, NodePointer payload) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->rayFlags = ray_flags; + this->cullmask = cullmask; + this->sbtRecordOffset = s_b_t_record_offset; + this->sbtRecordStride = s_b_t_record_stride; + this->missIndex = miss_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->time = time; + this->payload = payload; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectTraceRayNV +{ + const NodeKind nodeKind = NodeKind::MultinaryAction; + const Op opCode = Op::OpHitObjectTraceRayNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + const Id pCount = 12; + NodePointer hitObject; + NodePointer accelerationStructure; + NodePointer rayFlags; + NodePointer cullmask; + NodePointer sbtRecordOffset; + NodePointer sbtRecordStride; + NodePointer missIndex; + NodePointer origin; + NodePointer tMin; + NodePointer direction; + NodePointer tMax; + NodePointer payload; + template + void visitRefs(T visitor) + { + visitor(hitObject); + visitor(accelerationStructure); + visitor(rayFlags); + visitor(cullmask); + visitor(sbtRecordOffset); + visitor(sbtRecordStride); + visitor(missIndex); + visitor(origin); + visitor(tMin); + visitor(direction); + visitor(tMax); + visitor(payload); + } + NodeOpHitObjectTraceRayNV() = default; + ~NodeOpHitObjectTraceRayNV() = default; + NodeOpHitObjectTraceRayNV(const NodeOpHitObjectTraceRayNV &) = delete; + NodeOpHitObjectTraceRayNV &operator=(const NodeOpHitObjectTraceRayNV &) = delete; + NodeOpHitObjectTraceRayNV(NodeOpHitObjectTraceRayNV &&) = delete; + NodeOpHitObjectTraceRayNV &operator=(NodeOpHitObjectTraceRayNV &&) = delete; + NodeOpHitObjectTraceRayNV(NodePointer hit_object, NodePointer acceleration_structure, NodePointer ray_flags, + NodePointer cullmask, NodePointer s_b_t_record_offset, NodePointer s_b_t_record_stride, + NodePointer miss_index, NodePointer origin, NodePointer t_min, NodePointer direction, + NodePointer t_max, NodePointer payload) + { + this->hitObject = hit_object; + this->accelerationStructure = acceleration_structure; + this->rayFlags = ray_flags; + this->cullmask = cullmask; + this->sbtRecordOffset = s_b_t_record_offset; + this->sbtRecordStride = s_b_t_record_stride; + this->missIndex = miss_index; + this->origin = origin; + this->tMin = t_min; + this->direction = direction; + this->tMax = t_max; + this->payload = payload; } template static constexpr bool is(const T *value); @@ -4553,6 +6281,38 @@ inline bool NodeMultinaryAction::visit(NodeMultinaryAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpHitObjectRecordHitMotionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordHitNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordHitWithIndexMotionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordHitWithIndexNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordMissMotionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordMissNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectTraceRayMotionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectTraceRayNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpRayQueryInitializeKHR: if (visitor(reinterpret_cast(node))) return true; @@ -4623,6 +6383,70 @@ struct NodeOpControlBarrier template static constexpr bool is(const T *value); }; +struct NodeOpControlBarrierArriveINTEL +{ + const NodeKind nodeKind = NodeKind::ScopedAction; + const Op opCode = Op::OpControlBarrierArriveINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer execution; + NodePointer memory; + NodePointer semantics; + template + void visitRefs(T visitor) + { + visitor(execution); + visitor(memory); + visitor(semantics); + } + NodeOpControlBarrierArriveINTEL() = default; + ~NodeOpControlBarrierArriveINTEL() = default; + NodeOpControlBarrierArriveINTEL(const NodeOpControlBarrierArriveINTEL &) = delete; + NodeOpControlBarrierArriveINTEL &operator=(const NodeOpControlBarrierArriveINTEL &) = delete; + NodeOpControlBarrierArriveINTEL(NodeOpControlBarrierArriveINTEL &&) = delete; + NodeOpControlBarrierArriveINTEL &operator=(NodeOpControlBarrierArriveINTEL &&) = delete; + NodeOpControlBarrierArriveINTEL(NodePointer execution, NodePointer memory, + NodePointer semantics) + { + this->execution = execution; + this->memory = memory; + this->semantics = semantics; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpControlBarrierWaitINTEL +{ + const NodeKind nodeKind = NodeKind::ScopedAction; + const Op opCode = Op::OpControlBarrierWaitINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer execution; + NodePointer memory; + NodePointer semantics; + template + void visitRefs(T visitor) + { + visitor(execution); + visitor(memory); + visitor(semantics); + } + NodeOpControlBarrierWaitINTEL() = default; + ~NodeOpControlBarrierWaitINTEL() = default; + NodeOpControlBarrierWaitINTEL(const NodeOpControlBarrierWaitINTEL &) = delete; + NodeOpControlBarrierWaitINTEL &operator=(const NodeOpControlBarrierWaitINTEL &) = delete; + NodeOpControlBarrierWaitINTEL(NodeOpControlBarrierWaitINTEL &&) = delete; + NodeOpControlBarrierWaitINTEL &operator=(NodeOpControlBarrierWaitINTEL &&) = delete; + NodeOpControlBarrierWaitINTEL(NodePointer execution, NodePointer memory, + NodePointer semantics) + { + this->execution = execution; + this->memory = memory; + this->semantics = semantics; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGroupCommitReadPipe { const NodeKind nodeKind = NodeKind::ScopedAction; @@ -4787,6 +6611,14 @@ inline bool NodeScopedAction::visit(NodeScopedAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpControlBarrierArriveINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpControlBarrierWaitINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGroupCommitReadPipe: if (visitor(reinterpret_cast(node))) return true; @@ -4863,6 +6695,77 @@ struct NodeOpCaptureEventProfilingInfo template static constexpr bool is(const T *value); }; +struct NodeOpCooperativeMatrixStoreKHR +{ + const NodeKind nodeKind = NodeKind::TrinaryAction; + const Op opCode = Op::OpCooperativeMatrixStoreKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer pointer; + NodePointer object; + NodePointer memoryLayout; + eastl::optional> stride; + eastl::optional memoryOperand; + // extra values for memoryOperand + LiteralInteger memoryOperandAligned; + NodePointer memoryOperandMakePointerAvailable; + NodePointer memoryOperandMakePointerAvailableKHR; + NodePointer memoryOperandMakePointerVisible; + NodePointer memoryOperandMakePointerVisibleKHR; + NodePointer memoryOperandAliasScopeINTELMask; + NodePointer memoryOperandNoAliasINTELMask; + template + void visitRefs(T visitor) + { + visitor(pointer); + visitor(object); + visitor(memoryLayout); + if (stride) + visitor(*stride); + if (memoryOperandMakePointerAvailable) + visitor(memoryOperandMakePointerAvailable); + if (memoryOperandMakePointerAvailableKHR) + visitor(memoryOperandMakePointerAvailableKHR); + if (memoryOperandMakePointerVisible) + visitor(memoryOperandMakePointerVisible); + if (memoryOperandMakePointerVisibleKHR) + visitor(memoryOperandMakePointerVisibleKHR); + if (memoryOperandAliasScopeINTELMask) + visitor(memoryOperandAliasScopeINTELMask); + if (memoryOperandNoAliasINTELMask) + visitor(memoryOperandNoAliasINTELMask); + } + NodeOpCooperativeMatrixStoreKHR() = default; + ~NodeOpCooperativeMatrixStoreKHR() = default; + NodeOpCooperativeMatrixStoreKHR(const NodeOpCooperativeMatrixStoreKHR &) = delete; + NodeOpCooperativeMatrixStoreKHR &operator=(const NodeOpCooperativeMatrixStoreKHR &) = delete; + NodeOpCooperativeMatrixStoreKHR(NodeOpCooperativeMatrixStoreKHR &&) = delete; + NodeOpCooperativeMatrixStoreKHR &operator=(NodeOpCooperativeMatrixStoreKHR &&) = delete; + NodeOpCooperativeMatrixStoreKHR(NodePointer pointer, NodePointer object, NodePointer memory_layout, + eastl::optional> stride = {}, eastl::optional memory_operand = {}, + eastl::optional memory_operand_aligned = {}, NodePointer memory_operand_makePointerAvailable = {}, + NodePointer memory_operand_makePointerAvailableKHR = {}, + NodePointer memory_operand_makePointerVisible = {}, + NodePointer memory_operand_makePointerVisibleKHR = {}, NodePointer memory_operand_aliasScopeINTELMask = {}, + NodePointer memory_operand_noAliasINTELMask = {}) + { + this->pointer = pointer; + this->object = object; + this->memoryLayout = memory_layout; + this->stride = stride; + this->memoryOperand = memory_operand; + if (memory_operand_aligned) + this->memoryOperandAligned = *memory_operand_aligned; + this->memoryOperandMakePointerAvailable = memory_operand_makePointerAvailable; + this->memoryOperandMakePointerAvailableKHR = memory_operand_makePointerAvailableKHR; + this->memoryOperandMakePointerVisible = memory_operand_makePointerVisible; + this->memoryOperandMakePointerVisibleKHR = memory_operand_makePointerVisibleKHR; + this->memoryOperandAliasScopeINTELMask = memory_operand_aliasScopeINTELMask; + this->memoryOperandNoAliasINTELMask = memory_operand_noAliasINTELMask; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpCopyMemorySized { const NodeKind nodeKind = NodeKind::TrinaryAction; @@ -4879,6 +6782,8 @@ struct NodeOpCopyMemorySized NodePointer memoryAccess0MakePointerAvailableKHR; NodePointer memoryAccess0MakePointerVisible; NodePointer memoryAccess0MakePointerVisibleKHR; + NodePointer memoryAccess0AliasScopeINTELMask; + NodePointer memoryAccess0NoAliasINTELMask; eastl::optional memoryAccess1; // extra values for memoryAccess1 LiteralInteger memoryAccess1Aligned; @@ -4886,6 +6791,8 @@ struct NodeOpCopyMemorySized NodePointer memoryAccess1MakePointerAvailableKHR; NodePointer memoryAccess1MakePointerVisible; NodePointer memoryAccess1MakePointerVisibleKHR; + NodePointer memoryAccess1AliasScopeINTELMask; + NodePointer memoryAccess1NoAliasINTELMask; template void visitRefs(T visitor) { @@ -4900,6 +6807,10 @@ struct NodeOpCopyMemorySized visitor(memoryAccess0MakePointerVisible); if (memoryAccess0MakePointerVisibleKHR) visitor(memoryAccess0MakePointerVisibleKHR); + if (memoryAccess0AliasScopeINTELMask) + visitor(memoryAccess0AliasScopeINTELMask); + if (memoryAccess0NoAliasINTELMask) + visitor(memoryAccess0NoAliasINTELMask); if (memoryAccess1MakePointerAvailable) visitor(memoryAccess1MakePointerAvailable); if (memoryAccess1MakePointerAvailableKHR) @@ -4908,6 +6819,10 @@ struct NodeOpCopyMemorySized visitor(memoryAccess1MakePointerVisible); if (memoryAccess1MakePointerVisibleKHR) visitor(memoryAccess1MakePointerVisibleKHR); + if (memoryAccess1AliasScopeINTELMask) + visitor(memoryAccess1AliasScopeINTELMask); + if (memoryAccess1NoAliasINTELMask) + visitor(memoryAccess1NoAliasINTELMask); } NodeOpCopyMemorySized() = default; ~NodeOpCopyMemorySized() = default; @@ -4920,11 +6835,13 @@ struct NodeOpCopyMemorySized NodePointer memory_access0_makePointerAvailable = {}, NodePointer memory_access0_makePointerAvailableKHR = {}, NodePointer memory_access0_makePointerVisible = {}, - NodePointer memory_access0_makePointerVisibleKHR = {}, eastl::optional memory_access1 = {}, + NodePointer memory_access0_makePointerVisibleKHR = {}, NodePointer memory_access0_aliasScopeINTELMask = {}, + NodePointer memory_access0_noAliasINTELMask = {}, eastl::optional memory_access1 = {}, eastl::optional memory_access1_aligned = {}, NodePointer memory_access1_makePointerAvailable = {}, NodePointer memory_access1_makePointerAvailableKHR = {}, NodePointer memory_access1_makePointerVisible = {}, - NodePointer memory_access1_makePointerVisibleKHR = {}) + NodePointer memory_access1_makePointerVisibleKHR = {}, NodePointer memory_access1_aliasScopeINTELMask = {}, + NodePointer memory_access1_noAliasINTELMask = {}) { this->target = target; this->source = source; @@ -4936,6 +6853,8 @@ struct NodeOpCopyMemorySized this->memoryAccess0MakePointerAvailableKHR = memory_access0_makePointerAvailableKHR; this->memoryAccess0MakePointerVisible = memory_access0_makePointerVisible; this->memoryAccess0MakePointerVisibleKHR = memory_access0_makePointerVisibleKHR; + this->memoryAccess0AliasScopeINTELMask = memory_access0_aliasScopeINTELMask; + this->memoryAccess0NoAliasINTELMask = memory_access0_noAliasINTELMask; this->memoryAccess1 = memory_access1; if (memory_access1_aligned) this->memoryAccess1Aligned = *memory_access1_aligned; @@ -4943,6 +6862,44 @@ struct NodeOpCopyMemorySized this->memoryAccess1MakePointerAvailableKHR = memory_access1_makePointerAvailableKHR; this->memoryAccess1MakePointerVisible = memory_access1_makePointerVisible; this->memoryAccess1MakePointerVisibleKHR = memory_access1_makePointerVisibleKHR; + this->memoryAccess1AliasScopeINTELMask = memory_access1_aliasScopeINTELMask; + this->memoryAccess1NoAliasINTELMask = memory_access1_noAliasINTELMask; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpEmitMeshTasksEXT +{ + const NodeKind nodeKind = NodeKind::TrinaryAction; + const Op opCode = Op::OpEmitMeshTasksEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer groupCountX; + NodePointer groupCountY; + NodePointer groupCountZ; + eastl::optional> payload; + template + void visitRefs(T visitor) + { + visitor(groupCountX); + visitor(groupCountY); + visitor(groupCountZ); + if (payload) + visitor(*payload); + } + NodeOpEmitMeshTasksEXT() = default; + ~NodeOpEmitMeshTasksEXT() = default; + NodeOpEmitMeshTasksEXT(const NodeOpEmitMeshTasksEXT &) = delete; + NodeOpEmitMeshTasksEXT &operator=(const NodeOpEmitMeshTasksEXT &) = delete; + NodeOpEmitMeshTasksEXT(NodeOpEmitMeshTasksEXT &&) = delete; + NodeOpEmitMeshTasksEXT &operator=(NodeOpEmitMeshTasksEXT &&) = delete; + NodeOpEmitMeshTasksEXT(NodePointer group_count_x, NodePointer group_count_y, NodePointer group_count_z, + eastl::optional> payload = {}) + { + this->groupCountX = group_count_x; + this->groupCountY = group_count_y; + this->groupCountZ = group_count_z; + this->payload = payload; } template static constexpr bool is(const T *value); @@ -4959,10 +6916,18 @@ inline bool NodeTrinaryAction::visit(NodeTrinaryAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpCooperativeMatrixStoreKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpCopyMemorySized: if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpEmitMeshTasksEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; } } else @@ -5114,6 +7079,85 @@ struct NodeOpEndStreamPrimitive template static constexpr bool is(const T *value); }; +struct NodeOpFinalizeNodePayloadsAMDX +{ + const NodeKind nodeKind = NodeKind::UnaryAction; + const Op opCode = Op::OpFinalizeNodePayloadsAMDX; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer payloadArray; + template + void visitRefs(T visitor) + { + visitor(payloadArray); + } + NodeOpFinalizeNodePayloadsAMDX() = default; + ~NodeOpFinalizeNodePayloadsAMDX() = default; + NodeOpFinalizeNodePayloadsAMDX(const NodeOpFinalizeNodePayloadsAMDX &) = delete; + NodeOpFinalizeNodePayloadsAMDX &operator=(const NodeOpFinalizeNodePayloadsAMDX &) = delete; + NodeOpFinalizeNodePayloadsAMDX(NodeOpFinalizeNodePayloadsAMDX &&) = delete; + NodeOpFinalizeNodePayloadsAMDX &operator=(NodeOpFinalizeNodePayloadsAMDX &&) = delete; + NodeOpFinalizeNodePayloadsAMDX(NodePointer payload_array) { this->payloadArray = payload_array; } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectRecordEmptyNV +{ + const NodeKind nodeKind = NodeKind::UnaryAction; + const Op opCode = Op::OpHitObjectRecordEmptyNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(hitObject); + } + NodeOpHitObjectRecordEmptyNV() = default; + ~NodeOpHitObjectRecordEmptyNV() = default; + NodeOpHitObjectRecordEmptyNV(const NodeOpHitObjectRecordEmptyNV &) = delete; + NodeOpHitObjectRecordEmptyNV &operator=(const NodeOpHitObjectRecordEmptyNV &) = delete; + NodeOpHitObjectRecordEmptyNV(NodeOpHitObjectRecordEmptyNV &&) = delete; + NodeOpHitObjectRecordEmptyNV &operator=(NodeOpHitObjectRecordEmptyNV &&) = delete; + NodeOpHitObjectRecordEmptyNV(NodePointer hit_object) { this->hitObject = hit_object; } + template + static constexpr bool is(const T *value); +}; +struct NodeOpInitializeNodePayloadsAMDX +{ + const NodeKind nodeKind = NodeKind::UnaryAction; + const Op opCode = Op::OpInitializeNodePayloadsAMDX; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer payloadArray; + NodePointer visibility; + NodePointer payloadCount; + NodePointer nodeIndex; + template + void visitRefs(T visitor) + { + visitor(payloadArray); + visitor(visibility); + visitor(payloadCount); + visitor(nodeIndex); + } + NodeOpInitializeNodePayloadsAMDX() = default; + ~NodeOpInitializeNodePayloadsAMDX() = default; + NodeOpInitializeNodePayloadsAMDX(const NodeOpInitializeNodePayloadsAMDX &) = delete; + NodeOpInitializeNodePayloadsAMDX &operator=(const NodeOpInitializeNodePayloadsAMDX &) = delete; + NodeOpInitializeNodePayloadsAMDX(NodeOpInitializeNodePayloadsAMDX &&) = delete; + NodeOpInitializeNodePayloadsAMDX &operator=(NodeOpInitializeNodePayloadsAMDX &&) = delete; + NodeOpInitializeNodePayloadsAMDX(NodePointer payload_array, NodePointer visibility, + NodePointer payload_count, NodePointer node_index) + { + this->payloadArray = payload_array; + this->visibility = visibility; + this->payloadCount = payload_count; + this->nodeIndex = node_index; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpLifetimeStart { const NodeKind nodeKind = NodeKind::UnaryAction; @@ -5265,6 +7309,40 @@ struct NodeOpReleaseEvent template static constexpr bool is(const T *value); }; +struct NodeOpReorderThreadWithHitObjectNV +{ + const NodeKind nodeKind = NodeKind::UnaryAction; + const Op opCode = Op::OpReorderThreadWithHitObjectNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + NodePointer hitObject; + eastl::optional> hint; + eastl::optional> bits; + template + void visitRefs(T visitor) + { + visitor(hitObject); + if (hint) + visitor(*hint); + if (bits) + visitor(*bits); + } + NodeOpReorderThreadWithHitObjectNV() = default; + ~NodeOpReorderThreadWithHitObjectNV() = default; + NodeOpReorderThreadWithHitObjectNV(const NodeOpReorderThreadWithHitObjectNV &) = delete; + NodeOpReorderThreadWithHitObjectNV &operator=(const NodeOpReorderThreadWithHitObjectNV &) = delete; + NodeOpReorderThreadWithHitObjectNV(NodeOpReorderThreadWithHitObjectNV &&) = delete; + NodeOpReorderThreadWithHitObjectNV &operator=(NodeOpReorderThreadWithHitObjectNV &&) = delete; + NodeOpReorderThreadWithHitObjectNV(NodePointer hit_object, eastl::optional> hint = {}, + eastl::optional> bits = {}) + { + this->hitObject = hit_object; + this->hint = hint; + this->bits = bits; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpRestoreMemoryINTEL { const NodeKind nodeKind = NodeKind::UnaryAction; @@ -5337,6 +7415,18 @@ inline bool NodeUnaryAction::visit(NodeUnaryAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpFinalizeNodePayloadsAMDX: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectRecordEmptyNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpInitializeNodePayloadsAMDX: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpLifetimeStart: if (visitor(reinterpret_cast(node))) return true; @@ -5361,6 +7451,10 @@ inline bool NodeUnaryAction::visit(NodeUnaryAction *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpReorderThreadWithHitObjectNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpRestoreMemoryINTEL: if (visitor(reinterpret_cast(node))) return true; @@ -5827,6 +7921,97 @@ struct NodeId : Node void visitRefs(T) {} }; +struct NodeOpAliasDomainDeclINTEL +{ + const NodeKind nodeKind = NodeKind::Id; + const Op opCode = Op::OpAliasDomainDeclINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + eastl::optional> name; + template + void visitRefs(T visitor) + { + if (name) + visitor(*name); + } + NodeOpAliasDomainDeclINTEL() = default; + ~NodeOpAliasDomainDeclINTEL() = default; + NodeOpAliasDomainDeclINTEL(const NodeOpAliasDomainDeclINTEL &) = delete; + NodeOpAliasDomainDeclINTEL &operator=(const NodeOpAliasDomainDeclINTEL &) = delete; + NodeOpAliasDomainDeclINTEL(NodeOpAliasDomainDeclINTEL &&) = delete; + NodeOpAliasDomainDeclINTEL &operator=(NodeOpAliasDomainDeclINTEL &&) = delete; + NodeOpAliasDomainDeclINTEL(Id id_result, eastl::optional> name = {}) + { + this->resultId = id_result; + this->name = name; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpAliasScopeDeclINTEL +{ + const NodeKind nodeKind = NodeKind::Id; + const Op opCode = Op::OpAliasScopeDeclINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer aliasDomain; + eastl::optional> name; + template + void visitRefs(T visitor) + { + visitor(aliasDomain); + if (name) + visitor(*name); + } + NodeOpAliasScopeDeclINTEL() = default; + ~NodeOpAliasScopeDeclINTEL() = default; + NodeOpAliasScopeDeclINTEL(const NodeOpAliasScopeDeclINTEL &) = delete; + NodeOpAliasScopeDeclINTEL &operator=(const NodeOpAliasScopeDeclINTEL &) = delete; + NodeOpAliasScopeDeclINTEL(NodeOpAliasScopeDeclINTEL &&) = delete; + NodeOpAliasScopeDeclINTEL &operator=(NodeOpAliasScopeDeclINTEL &&) = delete; + NodeOpAliasScopeDeclINTEL(Id id_result, NodePointer alias_domain, eastl::optional> name = {}) + { + this->resultId = id_result; + this->aliasDomain = alias_domain; + this->name = name; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpAliasScopeListDeclINTEL +{ + const NodeKind nodeKind = NodeKind::Id; + const Op opCode = Op::OpAliasScopeListDeclINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + eastl::vector> aliasscope1Aliasscope2; + template + void visitRefs(T visitor) + { + for (auto &&ref : aliasscope1Aliasscope2) + visitor(ref); + } + NodeOpAliasScopeListDeclINTEL() = default; + ~NodeOpAliasScopeListDeclINTEL() = default; + NodeOpAliasScopeListDeclINTEL(const NodeOpAliasScopeListDeclINTEL &) = delete; + NodeOpAliasScopeListDeclINTEL &operator=(const NodeOpAliasScopeListDeclINTEL &) = delete; + NodeOpAliasScopeListDeclINTEL(NodeOpAliasScopeListDeclINTEL &&) = delete; + NodeOpAliasScopeListDeclINTEL &operator=(NodeOpAliasScopeListDeclINTEL &&) = delete; + NodeOpAliasScopeListDeclINTEL(Id id_result, NodePointer *alias_scope1_alias_scope2 = nullptr, + size_t alias_scope1_alias_scope2_count = 0) + { + this->resultId = id_result; + this->aliasscope1Aliasscope2.assign(alias_scope1_alias_scope2, alias_scope1_alias_scope2 + alias_scope1_alias_scope2_count); + } + template + static constexpr bool is(const T *value); +}; struct NodeOpDecorationGroup { const NodeKind nodeKind = NodeKind::Id; @@ -5995,6 +8180,39 @@ struct NodeOpCompositeConstruct template static constexpr bool is(const T *value); }; +struct NodeOpCompositeConstructContinuedINTEL +{ + const NodeKind nodeKind = NodeKind::Operation; + const Op opCode = Op::OpCompositeConstructContinuedINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + eastl::vector> constituents; + template + void visitRefs(T visitor) + { + visitor(resultType); + for (auto &&ref : constituents) + visitor(ref); + } + NodeOpCompositeConstructContinuedINTEL() = default; + ~NodeOpCompositeConstructContinuedINTEL() = default; + NodeOpCompositeConstructContinuedINTEL(const NodeOpCompositeConstructContinuedINTEL &) = delete; + NodeOpCompositeConstructContinuedINTEL &operator=(const NodeOpCompositeConstructContinuedINTEL &) = delete; + NodeOpCompositeConstructContinuedINTEL(NodeOpCompositeConstructContinuedINTEL &&) = delete; + NodeOpCompositeConstructContinuedINTEL &operator=(NodeOpCompositeConstructContinuedINTEL &&) = delete; + NodeOpCompositeConstructContinuedINTEL(Id id_result, NodePointer id_result_type, + NodePointer *constituents = nullptr, size_t constituents_count = 0) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->constituents.assign(constituents, constituents + constituents_count); + } + template + static constexpr bool is(const T *value); +}; struct NodeOpCreateUserEvent { const NodeKind nodeKind = NodeKind::Operation; @@ -6023,6 +8241,38 @@ struct NodeOpCreateUserEvent template static constexpr bool is(const T *value); }; +struct NodeOpDepthAttachmentReadEXT +{ + const NodeKind nodeKind = NodeKind::Operation; + const Op opCode = Op::OpDepthAttachmentReadEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + eastl::optional> sample; + template + void visitRefs(T visitor) + { + visitor(resultType); + if (sample) + visitor(*sample); + } + NodeOpDepthAttachmentReadEXT() = default; + ~NodeOpDepthAttachmentReadEXT() = default; + NodeOpDepthAttachmentReadEXT(const NodeOpDepthAttachmentReadEXT &) = delete; + NodeOpDepthAttachmentReadEXT &operator=(const NodeOpDepthAttachmentReadEXT &) = delete; + NodeOpDepthAttachmentReadEXT(NodeOpDepthAttachmentReadEXT &&) = delete; + NodeOpDepthAttachmentReadEXT &operator=(NodeOpDepthAttachmentReadEXT &&) = delete; + NodeOpDepthAttachmentReadEXT(Id id_result, NodePointer id_result_type, eastl::optional> sample = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->sample = sample; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpFunctionPointerCallINTEL { const NodeKind nodeKind = NodeKind::Operation; @@ -6140,6 +8390,39 @@ struct NodeOpSaveMemoryINTEL template static constexpr bool is(const T *value); }; +struct NodeOpStencilAttachmentReadEXT +{ + const NodeKind nodeKind = NodeKind::Operation; + const Op opCode = Op::OpStencilAttachmentReadEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + eastl::optional> sample; + template + void visitRefs(T visitor) + { + visitor(resultType); + if (sample) + visitor(*sample); + } + NodeOpStencilAttachmentReadEXT() = default; + ~NodeOpStencilAttachmentReadEXT() = default; + NodeOpStencilAttachmentReadEXT(const NodeOpStencilAttachmentReadEXT &) = delete; + NodeOpStencilAttachmentReadEXT &operator=(const NodeOpStencilAttachmentReadEXT &) = delete; + NodeOpStencilAttachmentReadEXT(NodeOpStencilAttachmentReadEXT &&) = delete; + NodeOpStencilAttachmentReadEXT &operator=(NodeOpStencilAttachmentReadEXT &&) = delete; + NodeOpStencilAttachmentReadEXT(Id id_result, NodePointer id_result_type, + eastl::optional> sample = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->sample = sample; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL { const NodeKind nodeKind = NodeKind::Operation; @@ -7057,6 +9340,81 @@ struct NodeOpCompositeInsert template static constexpr bool is(const T *value); }; +struct NodeOpCooperativeMatrixLoadKHR +{ + const NodeKind nodeKind = NodeKind::BinaryOperation; + const Op opCode = Op::OpCooperativeMatrixLoadKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer pointer; + NodePointer memoryLayout; + eastl::optional> stride; + eastl::optional memoryOperand; + // extra values for memoryOperand + LiteralInteger memoryOperandAligned; + NodePointer memoryOperandMakePointerAvailable; + NodePointer memoryOperandMakePointerAvailableKHR; + NodePointer memoryOperandMakePointerVisible; + NodePointer memoryOperandMakePointerVisibleKHR; + NodePointer memoryOperandAliasScopeINTELMask; + NodePointer memoryOperandNoAliasINTELMask; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(pointer); + visitor(memoryLayout); + if (stride) + visitor(*stride); + if (memoryOperandMakePointerAvailable) + visitor(memoryOperandMakePointerAvailable); + if (memoryOperandMakePointerAvailableKHR) + visitor(memoryOperandMakePointerAvailableKHR); + if (memoryOperandMakePointerVisible) + visitor(memoryOperandMakePointerVisible); + if (memoryOperandMakePointerVisibleKHR) + visitor(memoryOperandMakePointerVisibleKHR); + if (memoryOperandAliasScopeINTELMask) + visitor(memoryOperandAliasScopeINTELMask); + if (memoryOperandNoAliasINTELMask) + visitor(memoryOperandNoAliasINTELMask); + } + NodeOpCooperativeMatrixLoadKHR() = default; + ~NodeOpCooperativeMatrixLoadKHR() = default; + NodeOpCooperativeMatrixLoadKHR(const NodeOpCooperativeMatrixLoadKHR &) = delete; + NodeOpCooperativeMatrixLoadKHR &operator=(const NodeOpCooperativeMatrixLoadKHR &) = delete; + NodeOpCooperativeMatrixLoadKHR(NodeOpCooperativeMatrixLoadKHR &&) = delete; + NodeOpCooperativeMatrixLoadKHR &operator=(NodeOpCooperativeMatrixLoadKHR &&) = delete; + NodeOpCooperativeMatrixLoadKHR(Id id_result, NodePointer id_result_type, NodePointer pointer, + NodePointer memory_layout, eastl::optional> stride = {}, + eastl::optional memory_operand = {}, eastl::optional memory_operand_aligned = {}, + NodePointer memory_operand_makePointerAvailable = {}, + NodePointer memory_operand_makePointerAvailableKHR = {}, + NodePointer memory_operand_makePointerVisible = {}, + NodePointer memory_operand_makePointerVisibleKHR = {}, NodePointer memory_operand_aliasScopeINTELMask = {}, + NodePointer memory_operand_noAliasINTELMask = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->pointer = pointer; + this->memoryLayout = memory_layout; + this->stride = stride; + this->memoryOperand = memory_operand; + if (memory_operand_aligned) + this->memoryOperandAligned = *memory_operand_aligned; + this->memoryOperandMakePointerAvailable = memory_operand_makePointerAvailable; + this->memoryOperandMakePointerAvailableKHR = memory_operand_makePointerAvailableKHR; + this->memoryOperandMakePointerVisible = memory_operand_makePointerVisible; + this->memoryOperandMakePointerVisibleKHR = memory_operand_makePointerVisibleKHR; + this->memoryOperandAliasScopeINTELMask = memory_operand_aliasScopeINTELMask; + this->memoryOperandNoAliasINTELMask = memory_operand_noAliasINTELMask; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpDot { const NodeKind nodeKind = NodeKind::BinaryOperation; @@ -9527,6 +11885,43 @@ struct NodeOpRayQueryGetIntersectionTKHR template static constexpr bool is(const T *value); }; +struct NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR +{ + const NodeKind nodeKind = NodeKind::BinaryOperation; + const Op opCode = Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer rayQuery; + NodePointer intersection; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(rayQuery); + visitor(intersection); + } + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR() = default; + ~NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR() = default; + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR(const NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &) = delete; + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &operator=( + const NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &) = delete; + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR(NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &&) = delete; + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &operator=( + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR &&) = delete; + NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR(Id id_result, NodePointer id_result_type, + NodePointer ray_query, NodePointer intersection) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->rayQuery = ray_query; + this->intersection = intersection; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpRayQueryGetIntersectionTypeKHR { const NodeKind nodeKind = NodeKind::BinaryOperation; @@ -12333,6 +14728,10 @@ inline bool NodeBinaryOperation::visit(NodeBinaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpCooperativeMatrixLoadKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpDot: if (visitor(reinterpret_cast(node))) return true; @@ -12605,6 +15004,10 @@ inline bool NodeBinaryOperation::visit(NodeBinaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpRayQueryGetIntersectionTypeKHR: if (visitor(reinterpret_cast(node))) return true; @@ -12955,6 +15358,14 @@ inline bool NodeBinaryOperation::visit(NodeBinaryOperation *node, T visitor) break; } break; + case ExtendedGrammar::AMD_shader_explicit_vertex_parameter: // only one instruction for this grammar + if (static_cast(node->extOpCode) == + AMDShaderExplicitVertexParameter::InterpolateAtVertexAMD) + { + if (visitor(reinterpret_cast(node))) + return true; + } + break; case ExtendedGrammar::AMD_shader_ballot: switch (static_cast(node->extOpCode)) { @@ -12969,14 +15380,6 @@ inline bool NodeBinaryOperation::visit(NodeBinaryOperation *node, T visitor) break; } break; - case ExtendedGrammar::AMD_shader_explicit_vertex_parameter: // only one instruction for this grammar - if (static_cast(node->extOpCode) == - AMDShaderExplicitVertexParameter::InterpolateAtVertexAMD) - { - if (visitor(reinterpret_cast(node))) - return true; - } - break; } break; } @@ -13055,6 +15458,37 @@ struct NodeOpConstantFalse template static constexpr bool is(const T *value); }; +struct NodeOpConstantFunctionPointerINTEL +{ + const NodeKind nodeKind = NodeKind::Constant; + const Op opCode = Op::OpConstantFunctionPointerINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer function; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(function); + } + NodeOpConstantFunctionPointerINTEL() = default; + ~NodeOpConstantFunctionPointerINTEL() = default; + NodeOpConstantFunctionPointerINTEL(const NodeOpConstantFunctionPointerINTEL &) = delete; + NodeOpConstantFunctionPointerINTEL &operator=(const NodeOpConstantFunctionPointerINTEL &) = delete; + NodeOpConstantFunctionPointerINTEL(NodeOpConstantFunctionPointerINTEL &&) = delete; + NodeOpConstantFunctionPointerINTEL &operator=(NodeOpConstantFunctionPointerINTEL &&) = delete; + NodeOpConstantFunctionPointerINTEL(Id id_result, NodePointer id_result_type, NodePointer function) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->function = function; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpConstantNull { const NodeKind nodeKind = NodeKind::Constant; @@ -13189,12 +15623,59 @@ struct NodeOpConstantComposite template static constexpr bool is(const T *value); }; +struct NodeOpConstantCompositeReplicateEXT +{ + const NodeKind nodeKind = NodeKind::ConstantComposite; + const Op opCode = Op::OpConstantCompositeReplicateEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer value; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(value); + } + NodeOpConstantCompositeReplicateEXT() = default; + ~NodeOpConstantCompositeReplicateEXT() = default; + NodeOpConstantCompositeReplicateEXT(const NodeOpConstantCompositeReplicateEXT &) = delete; + NodeOpConstantCompositeReplicateEXT &operator=(const NodeOpConstantCompositeReplicateEXT &) = delete; + NodeOpConstantCompositeReplicateEXT(NodeOpConstantCompositeReplicateEXT &&) = delete; + NodeOpConstantCompositeReplicateEXT &operator=(NodeOpConstantCompositeReplicateEXT &&) = delete; + NodeOpConstantCompositeReplicateEXT(Id id_result, NodePointer id_result_type, NodePointer value) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->value = value; + } + template + static constexpr bool is(const T *value); +}; template inline bool NodeConstantComposite::visit(NodeConstantComposite *node, T visitor) { - // simplified case where this node has no children and only one instruction - if (visitor(reinterpret_cast(node))) - return true; + if (node->nodeKind == NodeKind::ConstantComposite) + { + switch (node->opCode) + { + default: break; + case Op::OpConstantComposite: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpConstantCompositeReplicateEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; + } + } + else + { + return false; + } return visitor(node); } struct NodeConstantSampler : NodeConstant @@ -13266,6 +15747,10 @@ inline bool NodeConstant::visit(NodeConstant *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpConstantFunctionPointerINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpConstantNull: if (visitor(reinterpret_cast(node))) return true; @@ -16790,6 +19275,98 @@ struct NodeOpEnqueueMarker template static constexpr bool is(const T *value); }; +struct NodeOpFetchMicroTriangleVertexBarycentricNV +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpFetchMicroTriangleVertexBarycentricNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer accel; + NodePointer instanceId; + NodePointer geometryIndex; + NodePointer primitiveIndex; + NodePointer barycentric; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(accel); + visitor(instanceId); + visitor(geometryIndex); + visitor(primitiveIndex); + visitor(barycentric); + } + NodeOpFetchMicroTriangleVertexBarycentricNV() = default; + ~NodeOpFetchMicroTriangleVertexBarycentricNV() = default; + NodeOpFetchMicroTriangleVertexBarycentricNV(const NodeOpFetchMicroTriangleVertexBarycentricNV &) = delete; + NodeOpFetchMicroTriangleVertexBarycentricNV &operator=(const NodeOpFetchMicroTriangleVertexBarycentricNV &) = delete; + NodeOpFetchMicroTriangleVertexBarycentricNV(NodeOpFetchMicroTriangleVertexBarycentricNV &&) = delete; + NodeOpFetchMicroTriangleVertexBarycentricNV &operator=(NodeOpFetchMicroTriangleVertexBarycentricNV &&) = delete; + NodeOpFetchMicroTriangleVertexBarycentricNV(Id id_result, NodePointer id_result_type, NodePointer accel, + NodePointer instance_id, NodePointer geometry_index, NodePointer primitive_index, + NodePointer barycentric) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->accel = accel; + this->instanceId = instance_id; + this->geometryIndex = geometry_index; + this->primitiveIndex = primitive_index; + this->barycentric = barycentric; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpFetchMicroTriangleVertexPositionNV +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpFetchMicroTriangleVertexPositionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer accel; + NodePointer instanceId; + NodePointer geometryIndex; + NodePointer primitiveIndex; + NodePointer barycentric; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(accel); + visitor(instanceId); + visitor(geometryIndex); + visitor(primitiveIndex); + visitor(barycentric); + } + NodeOpFetchMicroTriangleVertexPositionNV() = default; + ~NodeOpFetchMicroTriangleVertexPositionNV() = default; + NodeOpFetchMicroTriangleVertexPositionNV(const NodeOpFetchMicroTriangleVertexPositionNV &) = delete; + NodeOpFetchMicroTriangleVertexPositionNV &operator=(const NodeOpFetchMicroTriangleVertexPositionNV &) = delete; + NodeOpFetchMicroTriangleVertexPositionNV(NodeOpFetchMicroTriangleVertexPositionNV &&) = delete; + NodeOpFetchMicroTriangleVertexPositionNV &operator=(NodeOpFetchMicroTriangleVertexPositionNV &&) = delete; + NodeOpFetchMicroTriangleVertexPositionNV(Id id_result, NodePointer id_result_type, NodePointer accel, + NodePointer instance_id, NodePointer geometry_index, NodePointer primitive_index, + NodePointer barycentric) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->accel = accel; + this->instanceId = instance_id; + this->geometryIndex = geometry_index; + this->primitiveIndex = primitive_index; + this->barycentric = barycentric; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGetKernelLocalSizeForSubgroupCount { const NodeKind nodeKind = NodeKind::MultinaryOperation; @@ -17051,6 +19628,327 @@ struct NodeOpGetKernelWorkGroupSize template static constexpr bool is(const T *value); }; +struct NodeOpImageBlockMatchGatherSADQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchGatherSADQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer targetSampledImage; + NodePointer targetCoordinates; + NodePointer referenceSampledImage; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(targetSampledImage); + visitor(targetCoordinates); + visitor(referenceSampledImage); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchGatherSADQCOM() = default; + ~NodeOpImageBlockMatchGatherSADQCOM() = default; + NodeOpImageBlockMatchGatherSADQCOM(const NodeOpImageBlockMatchGatherSADQCOM &) = delete; + NodeOpImageBlockMatchGatherSADQCOM &operator=(const NodeOpImageBlockMatchGatherSADQCOM &) = delete; + NodeOpImageBlockMatchGatherSADQCOM(NodeOpImageBlockMatchGatherSADQCOM &&) = delete; + NodeOpImageBlockMatchGatherSADQCOM &operator=(NodeOpImageBlockMatchGatherSADQCOM &&) = delete; + NodeOpImageBlockMatchGatherSADQCOM(Id id_result, NodePointer id_result_type, NodePointer target_sampled_image, + NodePointer target_coordinates, NodePointer reference_sampled_image, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->targetSampledImage = target_sampled_image; + this->targetCoordinates = target_coordinates; + this->referenceSampledImage = reference_sampled_image; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageBlockMatchGatherSSDQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchGatherSSDQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer targetSampledImage; + NodePointer targetCoordinates; + NodePointer referenceSampledImage; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(targetSampledImage); + visitor(targetCoordinates); + visitor(referenceSampledImage); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchGatherSSDQCOM() = default; + ~NodeOpImageBlockMatchGatherSSDQCOM() = default; + NodeOpImageBlockMatchGatherSSDQCOM(const NodeOpImageBlockMatchGatherSSDQCOM &) = delete; + NodeOpImageBlockMatchGatherSSDQCOM &operator=(const NodeOpImageBlockMatchGatherSSDQCOM &) = delete; + NodeOpImageBlockMatchGatherSSDQCOM(NodeOpImageBlockMatchGatherSSDQCOM &&) = delete; + NodeOpImageBlockMatchGatherSSDQCOM &operator=(NodeOpImageBlockMatchGatherSSDQCOM &&) = delete; + NodeOpImageBlockMatchGatherSSDQCOM(Id id_result, NodePointer id_result_type, NodePointer target_sampled_image, + NodePointer target_coordinates, NodePointer reference_sampled_image, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->targetSampledImage = target_sampled_image; + this->targetCoordinates = target_coordinates; + this->referenceSampledImage = reference_sampled_image; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageBlockMatchSADQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchSADQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer target; + NodePointer targetCoordinates; + NodePointer reference; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(target); + visitor(targetCoordinates); + visitor(reference); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchSADQCOM() = default; + ~NodeOpImageBlockMatchSADQCOM() = default; + NodeOpImageBlockMatchSADQCOM(const NodeOpImageBlockMatchSADQCOM &) = delete; + NodeOpImageBlockMatchSADQCOM &operator=(const NodeOpImageBlockMatchSADQCOM &) = delete; + NodeOpImageBlockMatchSADQCOM(NodeOpImageBlockMatchSADQCOM &&) = delete; + NodeOpImageBlockMatchSADQCOM &operator=(NodeOpImageBlockMatchSADQCOM &&) = delete; + NodeOpImageBlockMatchSADQCOM(Id id_result, NodePointer id_result_type, NodePointer target, + NodePointer target_coordinates, NodePointer reference, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->target = target; + this->targetCoordinates = target_coordinates; + this->reference = reference; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageBlockMatchSSDQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchSSDQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer target; + NodePointer targetCoordinates; + NodePointer reference; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(target); + visitor(targetCoordinates); + visitor(reference); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchSSDQCOM() = default; + ~NodeOpImageBlockMatchSSDQCOM() = default; + NodeOpImageBlockMatchSSDQCOM(const NodeOpImageBlockMatchSSDQCOM &) = delete; + NodeOpImageBlockMatchSSDQCOM &operator=(const NodeOpImageBlockMatchSSDQCOM &) = delete; + NodeOpImageBlockMatchSSDQCOM(NodeOpImageBlockMatchSSDQCOM &&) = delete; + NodeOpImageBlockMatchSSDQCOM &operator=(NodeOpImageBlockMatchSSDQCOM &&) = delete; + NodeOpImageBlockMatchSSDQCOM(Id id_result, NodePointer id_result_type, NodePointer target, + NodePointer target_coordinates, NodePointer reference, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->target = target; + this->targetCoordinates = target_coordinates; + this->reference = reference; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageBlockMatchWindowSADQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchWindowSADQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer targetSampledImage; + NodePointer targetCoordinates; + NodePointer referenceSampledImage; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(targetSampledImage); + visitor(targetCoordinates); + visitor(referenceSampledImage); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchWindowSADQCOM() = default; + ~NodeOpImageBlockMatchWindowSADQCOM() = default; + NodeOpImageBlockMatchWindowSADQCOM(const NodeOpImageBlockMatchWindowSADQCOM &) = delete; + NodeOpImageBlockMatchWindowSADQCOM &operator=(const NodeOpImageBlockMatchWindowSADQCOM &) = delete; + NodeOpImageBlockMatchWindowSADQCOM(NodeOpImageBlockMatchWindowSADQCOM &&) = delete; + NodeOpImageBlockMatchWindowSADQCOM &operator=(NodeOpImageBlockMatchWindowSADQCOM &&) = delete; + NodeOpImageBlockMatchWindowSADQCOM(Id id_result, NodePointer id_result_type, NodePointer target_sampled_image, + NodePointer target_coordinates, NodePointer reference_sampled_image, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->targetSampledImage = target_sampled_image; + this->targetCoordinates = target_coordinates; + this->referenceSampledImage = reference_sampled_image; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageBlockMatchWindowSSDQCOM +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpImageBlockMatchWindowSSDQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 5; + NodePointer targetSampledImage; + NodePointer targetCoordinates; + NodePointer referenceSampledImage; + NodePointer referenceCoordinates; + NodePointer blockSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(targetSampledImage); + visitor(targetCoordinates); + visitor(referenceSampledImage); + visitor(referenceCoordinates); + visitor(blockSize); + } + NodeOpImageBlockMatchWindowSSDQCOM() = default; + ~NodeOpImageBlockMatchWindowSSDQCOM() = default; + NodeOpImageBlockMatchWindowSSDQCOM(const NodeOpImageBlockMatchWindowSSDQCOM &) = delete; + NodeOpImageBlockMatchWindowSSDQCOM &operator=(const NodeOpImageBlockMatchWindowSSDQCOM &) = delete; + NodeOpImageBlockMatchWindowSSDQCOM(NodeOpImageBlockMatchWindowSSDQCOM &&) = delete; + NodeOpImageBlockMatchWindowSSDQCOM &operator=(NodeOpImageBlockMatchWindowSSDQCOM &&) = delete; + NodeOpImageBlockMatchWindowSSDQCOM(Id id_result, NodePointer id_result_type, NodePointer target_sampled_image, + NodePointer target_coordinates, NodePointer reference_sampled_image, NodePointer reference_coordinates, + NodePointer block_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->targetSampledImage = target_sampled_image; + this->targetCoordinates = target_coordinates; + this->referenceSampledImage = reference_sampled_image; + this->referenceCoordinates = reference_coordinates; + this->blockSize = block_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpRawAccessChainNV +{ + const NodeKind nodeKind = NodeKind::MultinaryOperation; + const Op opCode = Op::OpRawAccessChainNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + const Id pCount = 4; + NodePointer base; + NodePointer byteStride; + NodePointer elementIndex; + NodePointer byteOffset; + eastl::optional rawAccessChainOperands; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(base); + visitor(byteStride); + visitor(elementIndex); + visitor(byteOffset); + } + NodeOpRawAccessChainNV() = default; + ~NodeOpRawAccessChainNV() = default; + NodeOpRawAccessChainNV(const NodeOpRawAccessChainNV &) = delete; + NodeOpRawAccessChainNV &operator=(const NodeOpRawAccessChainNV &) = delete; + NodeOpRawAccessChainNV(NodeOpRawAccessChainNV &&) = delete; + NodeOpRawAccessChainNV &operator=(NodeOpRawAccessChainNV &&) = delete; + NodeOpRawAccessChainNV(Id id_result, NodePointer id_result_type, NodePointer base, + NodePointer byte_stride, NodePointer element_index, NodePointer byte_offset, + eastl::optional raw_access_chain_operands = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->base = base; + this->byteStride = byte_stride; + this->elementIndex = element_index; + this->byteOffset = byte_offset; + this->rawAccessChainOperands = raw_access_chain_operands; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpReadPipe { const NodeKind nodeKind = NodeKind::MultinaryOperation; @@ -18246,6 +21144,14 @@ inline bool NodeMultinaryOperation::visit(NodeMultinaryOperation *node, T visito if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpFetchMicroTriangleVertexBarycentricNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpFetchMicroTriangleVertexPositionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGetKernelLocalSizeForSubgroupCount: if (visitor(reinterpret_cast(node))) return true; @@ -18270,6 +21176,34 @@ inline bool NodeMultinaryOperation::visit(NodeMultinaryOperation *node, T visito if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpImageBlockMatchGatherSADQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageBlockMatchGatherSSDQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageBlockMatchSADQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageBlockMatchSSDQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageBlockMatchWindowSADQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageBlockMatchWindowSSDQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpRawAccessChainNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpReadPipe: if (visitor(reinterpret_cast(node))) return true; @@ -19080,6 +22014,48 @@ struct NodeOpGroupNonUniformQuadSwap template static constexpr bool is(const T *value); }; +struct NodeOpGroupNonUniformRotateKHR +{ + const NodeKind nodeKind = NodeKind::ScopedOperation; + const Op opCode = Op::OpGroupNonUniformRotateKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + NodePointer value; + NodePointer delta; + eastl::optional> clusterSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(value); + visitor(delta); + if (clusterSize) + visitor(*clusterSize); + } + NodeOpGroupNonUniformRotateKHR() = default; + ~NodeOpGroupNonUniformRotateKHR() = default; + NodeOpGroupNonUniformRotateKHR(const NodeOpGroupNonUniformRotateKHR &) = delete; + NodeOpGroupNonUniformRotateKHR &operator=(const NodeOpGroupNonUniformRotateKHR &) = delete; + NodeOpGroupNonUniformRotateKHR(NodeOpGroupNonUniformRotateKHR &&) = delete; + NodeOpGroupNonUniformRotateKHR &operator=(NodeOpGroupNonUniformRotateKHR &&) = delete; + NodeOpGroupNonUniformRotateKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + NodePointer value, NodePointer delta, eastl::optional> cluster_size = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->value = value; + this->delta = delta; + this->clusterSize = cluster_size; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGroupNonUniformShuffle { const NodeKind nodeKind = NodeKind::ScopedOperation; @@ -19363,6 +22339,117 @@ struct NodeGroupedOperation : NodeScopedOperation void visitRefs(T) {} }; +struct NodeOpGroupBitwiseAndKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupBitwiseAndKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupBitwiseAndKHR() = default; + ~NodeOpGroupBitwiseAndKHR() = default; + NodeOpGroupBitwiseAndKHR(const NodeOpGroupBitwiseAndKHR &) = delete; + NodeOpGroupBitwiseAndKHR &operator=(const NodeOpGroupBitwiseAndKHR &) = delete; + NodeOpGroupBitwiseAndKHR(NodeOpGroupBitwiseAndKHR &&) = delete; + NodeOpGroupBitwiseAndKHR &operator=(NodeOpGroupBitwiseAndKHR &&) = delete; + NodeOpGroupBitwiseAndKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupBitwiseOrKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupBitwiseOrKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupBitwiseOrKHR() = default; + ~NodeOpGroupBitwiseOrKHR() = default; + NodeOpGroupBitwiseOrKHR(const NodeOpGroupBitwiseOrKHR &) = delete; + NodeOpGroupBitwiseOrKHR &operator=(const NodeOpGroupBitwiseOrKHR &) = delete; + NodeOpGroupBitwiseOrKHR(NodeOpGroupBitwiseOrKHR &&) = delete; + NodeOpGroupBitwiseOrKHR &operator=(NodeOpGroupBitwiseOrKHR &&) = delete; + NodeOpGroupBitwiseOrKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupBitwiseXorKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupBitwiseXorKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupBitwiseXorKHR() = default; + ~NodeOpGroupBitwiseXorKHR() = default; + NodeOpGroupBitwiseXorKHR(const NodeOpGroupBitwiseXorKHR &) = delete; + NodeOpGroupBitwiseXorKHR &operator=(const NodeOpGroupBitwiseXorKHR &) = delete; + NodeOpGroupBitwiseXorKHR(NodeOpGroupBitwiseXorKHR &&) = delete; + NodeOpGroupBitwiseXorKHR &operator=(NodeOpGroupBitwiseXorKHR &&) = delete; + NodeOpGroupBitwiseXorKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGroupFAdd { const NodeKind nodeKind = NodeKind::GroupedOperation; @@ -19585,6 +22672,43 @@ struct NodeOpGroupFMinNonUniformAMD template static constexpr bool is(const T *value); }; +struct NodeOpGroupFMulKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupFMulKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupFMulKHR() = default; + ~NodeOpGroupFMulKHR() = default; + NodeOpGroupFMulKHR(const NodeOpGroupFMulKHR &) = delete; + NodeOpGroupFMulKHR &operator=(const NodeOpGroupFMulKHR &) = delete; + NodeOpGroupFMulKHR(NodeOpGroupFMulKHR &&) = delete; + NodeOpGroupFMulKHR &operator=(NodeOpGroupFMulKHR &&) = delete; + NodeOpGroupFMulKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGroupIAdd { const NodeKind nodeKind = NodeKind::GroupedOperation; @@ -19659,6 +22783,154 @@ struct NodeOpGroupIAddNonUniformAMD template static constexpr bool is(const T *value); }; +struct NodeOpGroupIMulKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupIMulKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupIMulKHR() = default; + ~NodeOpGroupIMulKHR() = default; + NodeOpGroupIMulKHR(const NodeOpGroupIMulKHR &) = delete; + NodeOpGroupIMulKHR &operator=(const NodeOpGroupIMulKHR &) = delete; + NodeOpGroupIMulKHR(NodeOpGroupIMulKHR &&) = delete; + NodeOpGroupIMulKHR &operator=(NodeOpGroupIMulKHR &&) = delete; + NodeOpGroupIMulKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupLogicalAndKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupLogicalAndKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupLogicalAndKHR() = default; + ~NodeOpGroupLogicalAndKHR() = default; + NodeOpGroupLogicalAndKHR(const NodeOpGroupLogicalAndKHR &) = delete; + NodeOpGroupLogicalAndKHR &operator=(const NodeOpGroupLogicalAndKHR &) = delete; + NodeOpGroupLogicalAndKHR(NodeOpGroupLogicalAndKHR &&) = delete; + NodeOpGroupLogicalAndKHR &operator=(NodeOpGroupLogicalAndKHR &&) = delete; + NodeOpGroupLogicalAndKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupLogicalOrKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupLogicalOrKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupLogicalOrKHR() = default; + ~NodeOpGroupLogicalOrKHR() = default; + NodeOpGroupLogicalOrKHR(const NodeOpGroupLogicalOrKHR &) = delete; + NodeOpGroupLogicalOrKHR &operator=(const NodeOpGroupLogicalOrKHR &) = delete; + NodeOpGroupLogicalOrKHR(NodeOpGroupLogicalOrKHR &&) = delete; + NodeOpGroupLogicalOrKHR &operator=(NodeOpGroupLogicalOrKHR &&) = delete; + NodeOpGroupLogicalOrKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupLogicalXorKHR +{ + const NodeKind nodeKind = NodeKind::GroupedOperation; + const Op opCode = Op::OpGroupLogicalXorKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer execution; + GroupOperation operation; + NodePointer x; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(execution); + visitor(x); + } + NodeOpGroupLogicalXorKHR() = default; + ~NodeOpGroupLogicalXorKHR() = default; + NodeOpGroupLogicalXorKHR(const NodeOpGroupLogicalXorKHR &) = delete; + NodeOpGroupLogicalXorKHR &operator=(const NodeOpGroupLogicalXorKHR &) = delete; + NodeOpGroupLogicalXorKHR(NodeOpGroupLogicalXorKHR &&) = delete; + NodeOpGroupLogicalXorKHR &operator=(NodeOpGroupLogicalXorKHR &&) = delete; + NodeOpGroupLogicalXorKHR(Id id_result, NodePointer id_result_type, NodePointer execution, + GroupOperation operation, NodePointer x) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->execution = execution; + this->operation = operation; + this->x = x; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpGroupNonUniformBallotBitCount { const NodeKind nodeKind = NodeKind::GroupedOperation; @@ -20656,6 +23928,18 @@ inline bool NodeGroupedOperation::visit(NodeGroupedOperation *node, T visitor) switch (node->opCode) { default: break; + case Op::OpGroupBitwiseAndKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupBitwiseOrKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupBitwiseXorKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGroupFAdd: if (visitor(reinterpret_cast(node))) return true; @@ -20680,6 +23964,10 @@ inline bool NodeGroupedOperation::visit(NodeGroupedOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpGroupFMulKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGroupIAdd: if (visitor(reinterpret_cast(node))) return true; @@ -20688,6 +23976,22 @@ inline bool NodeGroupedOperation::visit(NodeGroupedOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpGroupIMulKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupLogicalAndKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupLogicalOrKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupLogicalXorKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGroupNonUniformBallotBitCount: if (visitor(reinterpret_cast(node))) return true; @@ -20872,6 +24176,10 @@ inline bool NodeScopedOperation::visit(NodeScopedOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpGroupNonUniformRotateKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpGroupNonUniformShuffle: if (visitor(reinterpret_cast(node))) return true; @@ -21055,12 +24363,59 @@ struct NodeOpSpecConstantComposite template static constexpr bool is(const T *value); }; +struct NodeOpSpecConstantCompositeReplicateEXT +{ + const NodeKind nodeKind = NodeKind::SpecConstantComposite; + const Op opCode = Op::OpSpecConstantCompositeReplicateEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer value; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(value); + } + NodeOpSpecConstantCompositeReplicateEXT() = default; + ~NodeOpSpecConstantCompositeReplicateEXT() = default; + NodeOpSpecConstantCompositeReplicateEXT(const NodeOpSpecConstantCompositeReplicateEXT &) = delete; + NodeOpSpecConstantCompositeReplicateEXT &operator=(const NodeOpSpecConstantCompositeReplicateEXT &) = delete; + NodeOpSpecConstantCompositeReplicateEXT(NodeOpSpecConstantCompositeReplicateEXT &&) = delete; + NodeOpSpecConstantCompositeReplicateEXT &operator=(NodeOpSpecConstantCompositeReplicateEXT &&) = delete; + NodeOpSpecConstantCompositeReplicateEXT(Id id_result, NodePointer id_result_type, NodePointer value) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->value = value; + } + template + static constexpr bool is(const T *value); +}; template inline bool NodeSpecConstantComposite::visit(NodeSpecConstantComposite *node, T visitor) { - // simplified case where this node has no children and only one instruction - if (visitor(reinterpret_cast(node))) - return true; + if (node->nodeKind == NodeKind::SpecConstantComposite) + { + switch (node->opCode) + { + default: break; + case Op::OpSpecConstantComposite: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpSpecConstantCompositeReplicateEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; + } + } + else + { + return false; + } return visitor(node); } struct NodeSpecConstantOperation : NodeSpecConstant @@ -21641,6 +24996,8 @@ struct NodeOpCooperativeMatrixLoadNV NodePointer memoryAccessMakePointerAvailableKHR; NodePointer memoryAccessMakePointerVisible; NodePointer memoryAccessMakePointerVisibleKHR; + NodePointer memoryAccessAliasScopeINTELMask; + NodePointer memoryAccessNoAliasINTELMask; template void visitRefs(T visitor) { @@ -21656,6 +25013,10 @@ struct NodeOpCooperativeMatrixLoadNV visitor(memoryAccessMakePointerVisible); if (memoryAccessMakePointerVisibleKHR) visitor(memoryAccessMakePointerVisibleKHR); + if (memoryAccessAliasScopeINTELMask) + visitor(memoryAccessAliasScopeINTELMask); + if (memoryAccessNoAliasINTELMask) + visitor(memoryAccessNoAliasINTELMask); } NodeOpCooperativeMatrixLoadNV() = default; ~NodeOpCooperativeMatrixLoadNV() = default; @@ -21668,7 +25029,8 @@ struct NodeOpCooperativeMatrixLoadNV eastl::optional memory_access_aligned = {}, NodePointer memory_access_makePointerAvailable = {}, NodePointer memory_access_makePointerAvailableKHR = {}, NodePointer memory_access_makePointerVisible = {}, - NodePointer memory_access_makePointerVisibleKHR = {}) + NodePointer memory_access_makePointerVisibleKHR = {}, NodePointer memory_access_aliasScopeINTELMask = {}, + NodePointer memory_access_noAliasINTELMask = {}) { this->resultId = id_result; this->resultType = id_result_type; @@ -21682,6 +25044,48 @@ struct NodeOpCooperativeMatrixLoadNV this->memoryAccessMakePointerAvailableKHR = memory_access_makePointerAvailableKHR; this->memoryAccessMakePointerVisible = memory_access_makePointerVisible; this->memoryAccessMakePointerVisibleKHR = memory_access_makePointerVisibleKHR; + this->memoryAccessAliasScopeINTELMask = memory_access_aliasScopeINTELMask; + this->memoryAccessNoAliasINTELMask = memory_access_noAliasINTELMask; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpCooperativeMatrixMulAddKHR +{ + const NodeKind nodeKind = NodeKind::TrinaryOperation; + const Op opCode = Op::OpCooperativeMatrixMulAddKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer a; + NodePointer b; + NodePointer c; + eastl::optional cooperativeMatrixOperands; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(a); + visitor(b); + visitor(c); + } + NodeOpCooperativeMatrixMulAddKHR() = default; + ~NodeOpCooperativeMatrixMulAddKHR() = default; + NodeOpCooperativeMatrixMulAddKHR(const NodeOpCooperativeMatrixMulAddKHR &) = delete; + NodeOpCooperativeMatrixMulAddKHR &operator=(const NodeOpCooperativeMatrixMulAddKHR &) = delete; + NodeOpCooperativeMatrixMulAddKHR(NodeOpCooperativeMatrixMulAddKHR &&) = delete; + NodeOpCooperativeMatrixMulAddKHR &operator=(NodeOpCooperativeMatrixMulAddKHR &&) = delete; + NodeOpCooperativeMatrixMulAddKHR(Id id_result, NodePointer id_result_type, NodePointer a, NodePointer b, + NodePointer c, eastl::optional cooperative_matrix_operands = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->a = a; + this->b = b; + this->c = c; + this->cooperativeMatrixOperands = cooperative_matrix_operands; } template static constexpr bool is(const T *value); @@ -21800,6 +25204,82 @@ struct NodeOpGetNumPipePackets template static constexpr bool is(const T *value); }; +struct NodeOpImageBoxFilterQCOM +{ + const NodeKind nodeKind = NodeKind::TrinaryOperation; + const Op opCode = Op::OpImageBoxFilterQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer texture; + NodePointer coordinates; + NodePointer boxSize; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(texture); + visitor(coordinates); + visitor(boxSize); + } + NodeOpImageBoxFilterQCOM() = default; + ~NodeOpImageBoxFilterQCOM() = default; + NodeOpImageBoxFilterQCOM(const NodeOpImageBoxFilterQCOM &) = delete; + NodeOpImageBoxFilterQCOM &operator=(const NodeOpImageBoxFilterQCOM &) = delete; + NodeOpImageBoxFilterQCOM(NodeOpImageBoxFilterQCOM &&) = delete; + NodeOpImageBoxFilterQCOM &operator=(NodeOpImageBoxFilterQCOM &&) = delete; + NodeOpImageBoxFilterQCOM(Id id_result, NodePointer id_result_type, NodePointer texture, + NodePointer coordinates, NodePointer box_size) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->texture = texture; + this->coordinates = coordinates; + this->boxSize = box_size; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpImageSampleWeightedQCOM +{ + const NodeKind nodeKind = NodeKind::TrinaryOperation; + const Op opCode = Op::OpImageSampleWeightedQCOM; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer texture; + NodePointer coordinates; + NodePointer weights; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(texture); + visitor(coordinates); + visitor(weights); + } + NodeOpImageSampleWeightedQCOM() = default; + ~NodeOpImageSampleWeightedQCOM() = default; + NodeOpImageSampleWeightedQCOM(const NodeOpImageSampleWeightedQCOM &) = delete; + NodeOpImageSampleWeightedQCOM &operator=(const NodeOpImageSampleWeightedQCOM &) = delete; + NodeOpImageSampleWeightedQCOM(NodeOpImageSampleWeightedQCOM &&) = delete; + NodeOpImageSampleWeightedQCOM &operator=(NodeOpImageSampleWeightedQCOM &&) = delete; + NodeOpImageSampleWeightedQCOM(Id id_result, NodePointer id_result_type, NodePointer texture, + NodePointer coordinates, NodePointer weights) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->texture = texture; + this->coordinates = coordinates; + this->weights = weights; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpSDotAccSat { const NodeKind nodeKind = NodeKind::TrinaryOperation; @@ -23157,6 +26637,10 @@ inline bool NodeTrinaryOperation::visit(NodeTrinaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpCooperativeMatrixMulAddKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpCooperativeMatrixMulAddNV: if (visitor(reinterpret_cast(node))) return true; @@ -23169,6 +26653,14 @@ inline bool NodeTrinaryOperation::visit(NodeTrinaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpImageBoxFilterQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpImageSampleWeightedQCOM: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpSDotAccSat: if (visitor(reinterpret_cast(node))) return true; @@ -23302,13 +26794,6 @@ inline bool NodeTrinaryOperation::visit(NodeTrinaryOperation *node, T visitor) break; } break; - case ExtendedGrammar::AMD_shader_ballot: // only one instruction for this grammar - if (static_cast(node->extOpCode) == AMDShaderBallot::WriteInvocationAMD) - { - if (visitor(reinterpret_cast(node))) - return true; - } - break; case ExtendedGrammar::AMD_shader_trinary_minmax: switch (static_cast(node->extOpCode)) { @@ -23351,6 +26836,13 @@ inline bool NodeTrinaryOperation::visit(NodeTrinaryOperation *node, T visitor) break; } break; + case ExtendedGrammar::AMD_shader_ballot: // only one instruction for this grammar + if (static_cast(node->extOpCode) == AMDShaderBallot::WriteInvocationAMD) + { + if (visitor(reinterpret_cast(node))) + return true; + } + break; } break; } @@ -27130,6 +30622,73 @@ struct NodeOpBitcast template static constexpr bool is(const T *value); }; +struct NodeOpColorAttachmentReadEXT +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpColorAttachmentReadEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer attachment; + eastl::optional> sample; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(attachment); + if (sample) + visitor(*sample); + } + NodeOpColorAttachmentReadEXT() = default; + ~NodeOpColorAttachmentReadEXT() = default; + NodeOpColorAttachmentReadEXT(const NodeOpColorAttachmentReadEXT &) = delete; + NodeOpColorAttachmentReadEXT &operator=(const NodeOpColorAttachmentReadEXT &) = delete; + NodeOpColorAttachmentReadEXT(NodeOpColorAttachmentReadEXT &&) = delete; + NodeOpColorAttachmentReadEXT &operator=(NodeOpColorAttachmentReadEXT &&) = delete; + NodeOpColorAttachmentReadEXT(Id id_result, NodePointer id_result_type, NodePointer attachment, + eastl::optional> sample = {}) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->attachment = attachment; + this->sample = sample; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpCompositeConstructReplicateEXT +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpCompositeConstructReplicateEXT; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer value; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(value); + } + NodeOpCompositeConstructReplicateEXT() = default; + ~NodeOpCompositeConstructReplicateEXT() = default; + NodeOpCompositeConstructReplicateEXT(const NodeOpCompositeConstructReplicateEXT &) = delete; + NodeOpCompositeConstructReplicateEXT &operator=(const NodeOpCompositeConstructReplicateEXT &) = delete; + NodeOpCompositeConstructReplicateEXT(NodeOpCompositeConstructReplicateEXT &&) = delete; + NodeOpCompositeConstructReplicateEXT &operator=(NodeOpCompositeConstructReplicateEXT &&) = delete; + NodeOpCompositeConstructReplicateEXT(Id id_result, NodePointer id_result_type, NodePointer value) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->value = value; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpCompositeExtract { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -27164,33 +30723,64 @@ struct NodeOpCompositeExtract template static constexpr bool is(const T *value); }; -struct NodeOpConstantFunctionPointerINTEL +struct NodeOpConvertBF16ToFINTEL { const NodeKind nodeKind = NodeKind::UnaryOperation; - const Op opCode = Op::OpConstantFunctionPointerINTEL; + const Op opCode = Op::OpConvertBF16ToFINTEL; const Id extOpCode = {}; const ExtendedGrammar grammarId = ExtendedGrammar::Count; Id resultId = 0; eastl::vector> properties; NodePointer resultType; - NodePointer function; + NodePointer bfloat16Value; template void visitRefs(T visitor) { visitor(resultType); - visitor(function); + visitor(bfloat16Value); } - NodeOpConstantFunctionPointerINTEL() = default; - ~NodeOpConstantFunctionPointerINTEL() = default; - NodeOpConstantFunctionPointerINTEL(const NodeOpConstantFunctionPointerINTEL &) = delete; - NodeOpConstantFunctionPointerINTEL &operator=(const NodeOpConstantFunctionPointerINTEL &) = delete; - NodeOpConstantFunctionPointerINTEL(NodeOpConstantFunctionPointerINTEL &&) = delete; - NodeOpConstantFunctionPointerINTEL &operator=(NodeOpConstantFunctionPointerINTEL &&) = delete; - NodeOpConstantFunctionPointerINTEL(Id id_result, NodePointer id_result_type, NodePointer function) + NodeOpConvertBF16ToFINTEL() = default; + ~NodeOpConvertBF16ToFINTEL() = default; + NodeOpConvertBF16ToFINTEL(const NodeOpConvertBF16ToFINTEL &) = delete; + NodeOpConvertBF16ToFINTEL &operator=(const NodeOpConvertBF16ToFINTEL &) = delete; + NodeOpConvertBF16ToFINTEL(NodeOpConvertBF16ToFINTEL &&) = delete; + NodeOpConvertBF16ToFINTEL &operator=(NodeOpConvertBF16ToFINTEL &&) = delete; + NodeOpConvertBF16ToFINTEL(Id id_result, NodePointer id_result_type, NodePointer b_float16_value) { this->resultId = id_result; this->resultType = id_result_type; - this->function = function; + this->bfloat16Value = b_float16_value; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpConvertFToBF16INTEL +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpConvertFToBF16INTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer floatValue; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(floatValue); + } + NodeOpConvertFToBF16INTEL() = default; + ~NodeOpConvertFToBF16INTEL() = default; + NodeOpConvertFToBF16INTEL(const NodeOpConvertFToBF16INTEL &) = delete; + NodeOpConvertFToBF16INTEL &operator=(const NodeOpConvertFToBF16INTEL &) = delete; + NodeOpConvertFToBF16INTEL(NodeOpConvertFToBF16INTEL &&) = delete; + NodeOpConvertFToBF16INTEL &operator=(NodeOpConvertFToBF16INTEL &&) = delete; + NodeOpConvertFToBF16INTEL(Id id_result, NodePointer id_result_type, NodePointer float_value) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->floatValue = float_value; } template static constexpr bool is(const T *value); @@ -27598,6 +31188,37 @@ struct NodeOpConvertUToSamplerNV template static constexpr bool is(const T *value); }; +struct NodeOpCooperativeMatrixLengthKHR +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpCooperativeMatrixLengthKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer type; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(type); + } + NodeOpCooperativeMatrixLengthKHR() = default; + ~NodeOpCooperativeMatrixLengthKHR() = default; + NodeOpCooperativeMatrixLengthKHR(const NodeOpCooperativeMatrixLengthKHR &) = delete; + NodeOpCooperativeMatrixLengthKHR &operator=(const NodeOpCooperativeMatrixLengthKHR &) = delete; + NodeOpCooperativeMatrixLengthKHR(NodeOpCooperativeMatrixLengthKHR &&) = delete; + NodeOpCooperativeMatrixLengthKHR &operator=(NodeOpCooperativeMatrixLengthKHR &&) = delete; + NodeOpCooperativeMatrixLengthKHR(Id id_result, NodePointer id_result_type, NodePointer type) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->type = type; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpCooperativeMatrixLengthNV { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -27939,6 +31560,44 @@ struct NodeOpDPdyFine template static constexpr bool is(const T *value); }; +struct NodeOpExtInstWithForwardRefsKHR +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpExtInstWithForwardRefsKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer set; + LiteralExtInstInteger instruction; + eastl::vector> param4; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(set); + for (auto &&ref : param4) + visitor(ref); + } + NodeOpExtInstWithForwardRefsKHR() = default; + ~NodeOpExtInstWithForwardRefsKHR() = default; + NodeOpExtInstWithForwardRefsKHR(const NodeOpExtInstWithForwardRefsKHR &) = delete; + NodeOpExtInstWithForwardRefsKHR &operator=(const NodeOpExtInstWithForwardRefsKHR &) = delete; + NodeOpExtInstWithForwardRefsKHR(NodeOpExtInstWithForwardRefsKHR &&) = delete; + NodeOpExtInstWithForwardRefsKHR &operator=(NodeOpExtInstWithForwardRefsKHR &&) = delete; + NodeOpExtInstWithForwardRefsKHR(Id id_result, NodePointer id_result_type, NodePointer set, + LiteralExtInstInteger instruction, NodePointer *param_4 = nullptr, size_t param_4_count = 0) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->set = set; + this->instruction = instruction; + this->param4.assign(param_4, param_4 + param_4_count); + } + template + static constexpr bool is(const T *value); +}; struct NodeOpFConvert { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -28001,6 +31660,37 @@ struct NodeOpFNegate template static constexpr bool is(const T *value); }; +struct NodeOpFinishWritingNodePayloadAMDX +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpFinishWritingNodePayloadAMDX; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer payload; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(payload); + } + NodeOpFinishWritingNodePayloadAMDX() = default; + ~NodeOpFinishWritingNodePayloadAMDX() = default; + NodeOpFinishWritingNodePayloadAMDX(const NodeOpFinishWritingNodePayloadAMDX &) = delete; + NodeOpFinishWritingNodePayloadAMDX &operator=(const NodeOpFinishWritingNodePayloadAMDX &) = delete; + NodeOpFinishWritingNodePayloadAMDX(NodeOpFinishWritingNodePayloadAMDX &&) = delete; + NodeOpFinishWritingNodePayloadAMDX &operator=(NodeOpFinishWritingNodePayloadAMDX &&) = delete; + NodeOpFinishWritingNodePayloadAMDX(Id id_result, NodePointer id_result_type, NodePointer payload) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->payload = payload; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpFwidth { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -28221,6 +31911,658 @@ struct NodeOpGroupNonUniformPartitionNV template static constexpr bool is(const T *value); }; +struct NodeOpGroupNonUniformQuadAllKHR +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpGroupNonUniformQuadAllKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer predicate; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(predicate); + } + NodeOpGroupNonUniformQuadAllKHR() = default; + ~NodeOpGroupNonUniformQuadAllKHR() = default; + NodeOpGroupNonUniformQuadAllKHR(const NodeOpGroupNonUniformQuadAllKHR &) = delete; + NodeOpGroupNonUniformQuadAllKHR &operator=(const NodeOpGroupNonUniformQuadAllKHR &) = delete; + NodeOpGroupNonUniformQuadAllKHR(NodeOpGroupNonUniformQuadAllKHR &&) = delete; + NodeOpGroupNonUniformQuadAllKHR &operator=(NodeOpGroupNonUniformQuadAllKHR &&) = delete; + NodeOpGroupNonUniformQuadAllKHR(Id id_result, NodePointer id_result_type, NodePointer predicate) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->predicate = predicate; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpGroupNonUniformQuadAnyKHR +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpGroupNonUniformQuadAnyKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer predicate; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(predicate); + } + NodeOpGroupNonUniformQuadAnyKHR() = default; + ~NodeOpGroupNonUniformQuadAnyKHR() = default; + NodeOpGroupNonUniformQuadAnyKHR(const NodeOpGroupNonUniformQuadAnyKHR &) = delete; + NodeOpGroupNonUniformQuadAnyKHR &operator=(const NodeOpGroupNonUniformQuadAnyKHR &) = delete; + NodeOpGroupNonUniformQuadAnyKHR(NodeOpGroupNonUniformQuadAnyKHR &&) = delete; + NodeOpGroupNonUniformQuadAnyKHR &operator=(NodeOpGroupNonUniformQuadAnyKHR &&) = delete; + NodeOpGroupNonUniformQuadAnyKHR(Id id_result, NodePointer id_result_type, NodePointer predicate) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->predicate = predicate; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetCurrentTimeNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetCurrentTimeNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetCurrentTimeNV() = default; + ~NodeOpHitObjectGetCurrentTimeNV() = default; + NodeOpHitObjectGetCurrentTimeNV(const NodeOpHitObjectGetCurrentTimeNV &) = delete; + NodeOpHitObjectGetCurrentTimeNV &operator=(const NodeOpHitObjectGetCurrentTimeNV &) = delete; + NodeOpHitObjectGetCurrentTimeNV(NodeOpHitObjectGetCurrentTimeNV &&) = delete; + NodeOpHitObjectGetCurrentTimeNV &operator=(NodeOpHitObjectGetCurrentTimeNV &&) = delete; + NodeOpHitObjectGetCurrentTimeNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetGeometryIndexNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetGeometryIndexNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetGeometryIndexNV() = default; + ~NodeOpHitObjectGetGeometryIndexNV() = default; + NodeOpHitObjectGetGeometryIndexNV(const NodeOpHitObjectGetGeometryIndexNV &) = delete; + NodeOpHitObjectGetGeometryIndexNV &operator=(const NodeOpHitObjectGetGeometryIndexNV &) = delete; + NodeOpHitObjectGetGeometryIndexNV(NodeOpHitObjectGetGeometryIndexNV &&) = delete; + NodeOpHitObjectGetGeometryIndexNV &operator=(NodeOpHitObjectGetGeometryIndexNV &&) = delete; + NodeOpHitObjectGetGeometryIndexNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetHitKindNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetHitKindNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetHitKindNV() = default; + ~NodeOpHitObjectGetHitKindNV() = default; + NodeOpHitObjectGetHitKindNV(const NodeOpHitObjectGetHitKindNV &) = delete; + NodeOpHitObjectGetHitKindNV &operator=(const NodeOpHitObjectGetHitKindNV &) = delete; + NodeOpHitObjectGetHitKindNV(NodeOpHitObjectGetHitKindNV &&) = delete; + NodeOpHitObjectGetHitKindNV &operator=(NodeOpHitObjectGetHitKindNV &&) = delete; + NodeOpHitObjectGetHitKindNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetInstanceCustomIndexNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetInstanceCustomIndexNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetInstanceCustomIndexNV() = default; + ~NodeOpHitObjectGetInstanceCustomIndexNV() = default; + NodeOpHitObjectGetInstanceCustomIndexNV(const NodeOpHitObjectGetInstanceCustomIndexNV &) = delete; + NodeOpHitObjectGetInstanceCustomIndexNV &operator=(const NodeOpHitObjectGetInstanceCustomIndexNV &) = delete; + NodeOpHitObjectGetInstanceCustomIndexNV(NodeOpHitObjectGetInstanceCustomIndexNV &&) = delete; + NodeOpHitObjectGetInstanceCustomIndexNV &operator=(NodeOpHitObjectGetInstanceCustomIndexNV &&) = delete; + NodeOpHitObjectGetInstanceCustomIndexNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetInstanceIdNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetInstanceIdNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetInstanceIdNV() = default; + ~NodeOpHitObjectGetInstanceIdNV() = default; + NodeOpHitObjectGetInstanceIdNV(const NodeOpHitObjectGetInstanceIdNV &) = delete; + NodeOpHitObjectGetInstanceIdNV &operator=(const NodeOpHitObjectGetInstanceIdNV &) = delete; + NodeOpHitObjectGetInstanceIdNV(NodeOpHitObjectGetInstanceIdNV &&) = delete; + NodeOpHitObjectGetInstanceIdNV &operator=(NodeOpHitObjectGetInstanceIdNV &&) = delete; + NodeOpHitObjectGetInstanceIdNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetObjectRayDirectionNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetObjectRayDirectionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetObjectRayDirectionNV() = default; + ~NodeOpHitObjectGetObjectRayDirectionNV() = default; + NodeOpHitObjectGetObjectRayDirectionNV(const NodeOpHitObjectGetObjectRayDirectionNV &) = delete; + NodeOpHitObjectGetObjectRayDirectionNV &operator=(const NodeOpHitObjectGetObjectRayDirectionNV &) = delete; + NodeOpHitObjectGetObjectRayDirectionNV(NodeOpHitObjectGetObjectRayDirectionNV &&) = delete; + NodeOpHitObjectGetObjectRayDirectionNV &operator=(NodeOpHitObjectGetObjectRayDirectionNV &&) = delete; + NodeOpHitObjectGetObjectRayDirectionNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetObjectRayOriginNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetObjectRayOriginNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetObjectRayOriginNV() = default; + ~NodeOpHitObjectGetObjectRayOriginNV() = default; + NodeOpHitObjectGetObjectRayOriginNV(const NodeOpHitObjectGetObjectRayOriginNV &) = delete; + NodeOpHitObjectGetObjectRayOriginNV &operator=(const NodeOpHitObjectGetObjectRayOriginNV &) = delete; + NodeOpHitObjectGetObjectRayOriginNV(NodeOpHitObjectGetObjectRayOriginNV &&) = delete; + NodeOpHitObjectGetObjectRayOriginNV &operator=(NodeOpHitObjectGetObjectRayOriginNV &&) = delete; + NodeOpHitObjectGetObjectRayOriginNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetObjectToWorldNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetObjectToWorldNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetObjectToWorldNV() = default; + ~NodeOpHitObjectGetObjectToWorldNV() = default; + NodeOpHitObjectGetObjectToWorldNV(const NodeOpHitObjectGetObjectToWorldNV &) = delete; + NodeOpHitObjectGetObjectToWorldNV &operator=(const NodeOpHitObjectGetObjectToWorldNV &) = delete; + NodeOpHitObjectGetObjectToWorldNV(NodeOpHitObjectGetObjectToWorldNV &&) = delete; + NodeOpHitObjectGetObjectToWorldNV &operator=(NodeOpHitObjectGetObjectToWorldNV &&) = delete; + NodeOpHitObjectGetObjectToWorldNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetPrimitiveIndexNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetPrimitiveIndexNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetPrimitiveIndexNV() = default; + ~NodeOpHitObjectGetPrimitiveIndexNV() = default; + NodeOpHitObjectGetPrimitiveIndexNV(const NodeOpHitObjectGetPrimitiveIndexNV &) = delete; + NodeOpHitObjectGetPrimitiveIndexNV &operator=(const NodeOpHitObjectGetPrimitiveIndexNV &) = delete; + NodeOpHitObjectGetPrimitiveIndexNV(NodeOpHitObjectGetPrimitiveIndexNV &&) = delete; + NodeOpHitObjectGetPrimitiveIndexNV &operator=(NodeOpHitObjectGetPrimitiveIndexNV &&) = delete; + NodeOpHitObjectGetPrimitiveIndexNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetRayTMaxNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetRayTMaxNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetRayTMaxNV() = default; + ~NodeOpHitObjectGetRayTMaxNV() = default; + NodeOpHitObjectGetRayTMaxNV(const NodeOpHitObjectGetRayTMaxNV &) = delete; + NodeOpHitObjectGetRayTMaxNV &operator=(const NodeOpHitObjectGetRayTMaxNV &) = delete; + NodeOpHitObjectGetRayTMaxNV(NodeOpHitObjectGetRayTMaxNV &&) = delete; + NodeOpHitObjectGetRayTMaxNV &operator=(NodeOpHitObjectGetRayTMaxNV &&) = delete; + NodeOpHitObjectGetRayTMaxNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetRayTMinNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetRayTMinNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetRayTMinNV() = default; + ~NodeOpHitObjectGetRayTMinNV() = default; + NodeOpHitObjectGetRayTMinNV(const NodeOpHitObjectGetRayTMinNV &) = delete; + NodeOpHitObjectGetRayTMinNV &operator=(const NodeOpHitObjectGetRayTMinNV &) = delete; + NodeOpHitObjectGetRayTMinNV(NodeOpHitObjectGetRayTMinNV &&) = delete; + NodeOpHitObjectGetRayTMinNV &operator=(NodeOpHitObjectGetRayTMinNV &&) = delete; + NodeOpHitObjectGetRayTMinNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetShaderBindingTableRecordIndexNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetShaderBindingTableRecordIndexNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetShaderBindingTableRecordIndexNV() = default; + ~NodeOpHitObjectGetShaderBindingTableRecordIndexNV() = default; + NodeOpHitObjectGetShaderBindingTableRecordIndexNV(const NodeOpHitObjectGetShaderBindingTableRecordIndexNV &) = delete; + NodeOpHitObjectGetShaderBindingTableRecordIndexNV &operator=(const NodeOpHitObjectGetShaderBindingTableRecordIndexNV &) = delete; + NodeOpHitObjectGetShaderBindingTableRecordIndexNV(NodeOpHitObjectGetShaderBindingTableRecordIndexNV &&) = delete; + NodeOpHitObjectGetShaderBindingTableRecordIndexNV &operator=(NodeOpHitObjectGetShaderBindingTableRecordIndexNV &&) = delete; + NodeOpHitObjectGetShaderBindingTableRecordIndexNV(Id id_result, NodePointer id_result_type, + NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetShaderRecordBufferHandleNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetShaderRecordBufferHandleNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetShaderRecordBufferHandleNV() = default; + ~NodeOpHitObjectGetShaderRecordBufferHandleNV() = default; + NodeOpHitObjectGetShaderRecordBufferHandleNV(const NodeOpHitObjectGetShaderRecordBufferHandleNV &) = delete; + NodeOpHitObjectGetShaderRecordBufferHandleNV &operator=(const NodeOpHitObjectGetShaderRecordBufferHandleNV &) = delete; + NodeOpHitObjectGetShaderRecordBufferHandleNV(NodeOpHitObjectGetShaderRecordBufferHandleNV &&) = delete; + NodeOpHitObjectGetShaderRecordBufferHandleNV &operator=(NodeOpHitObjectGetShaderRecordBufferHandleNV &&) = delete; + NodeOpHitObjectGetShaderRecordBufferHandleNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetWorldRayDirectionNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetWorldRayDirectionNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetWorldRayDirectionNV() = default; + ~NodeOpHitObjectGetWorldRayDirectionNV() = default; + NodeOpHitObjectGetWorldRayDirectionNV(const NodeOpHitObjectGetWorldRayDirectionNV &) = delete; + NodeOpHitObjectGetWorldRayDirectionNV &operator=(const NodeOpHitObjectGetWorldRayDirectionNV &) = delete; + NodeOpHitObjectGetWorldRayDirectionNV(NodeOpHitObjectGetWorldRayDirectionNV &&) = delete; + NodeOpHitObjectGetWorldRayDirectionNV &operator=(NodeOpHitObjectGetWorldRayDirectionNV &&) = delete; + NodeOpHitObjectGetWorldRayDirectionNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetWorldRayOriginNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetWorldRayOriginNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetWorldRayOriginNV() = default; + ~NodeOpHitObjectGetWorldRayOriginNV() = default; + NodeOpHitObjectGetWorldRayOriginNV(const NodeOpHitObjectGetWorldRayOriginNV &) = delete; + NodeOpHitObjectGetWorldRayOriginNV &operator=(const NodeOpHitObjectGetWorldRayOriginNV &) = delete; + NodeOpHitObjectGetWorldRayOriginNV(NodeOpHitObjectGetWorldRayOriginNV &&) = delete; + NodeOpHitObjectGetWorldRayOriginNV &operator=(NodeOpHitObjectGetWorldRayOriginNV &&) = delete; + NodeOpHitObjectGetWorldRayOriginNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectGetWorldToObjectNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectGetWorldToObjectNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectGetWorldToObjectNV() = default; + ~NodeOpHitObjectGetWorldToObjectNV() = default; + NodeOpHitObjectGetWorldToObjectNV(const NodeOpHitObjectGetWorldToObjectNV &) = delete; + NodeOpHitObjectGetWorldToObjectNV &operator=(const NodeOpHitObjectGetWorldToObjectNV &) = delete; + NodeOpHitObjectGetWorldToObjectNV(NodeOpHitObjectGetWorldToObjectNV &&) = delete; + NodeOpHitObjectGetWorldToObjectNV &operator=(NodeOpHitObjectGetWorldToObjectNV &&) = delete; + NodeOpHitObjectGetWorldToObjectNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectIsEmptyNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectIsEmptyNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectIsEmptyNV() = default; + ~NodeOpHitObjectIsEmptyNV() = default; + NodeOpHitObjectIsEmptyNV(const NodeOpHitObjectIsEmptyNV &) = delete; + NodeOpHitObjectIsEmptyNV &operator=(const NodeOpHitObjectIsEmptyNV &) = delete; + NodeOpHitObjectIsEmptyNV(NodeOpHitObjectIsEmptyNV &&) = delete; + NodeOpHitObjectIsEmptyNV &operator=(NodeOpHitObjectIsEmptyNV &&) = delete; + NodeOpHitObjectIsEmptyNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectIsHitNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectIsHitNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectIsHitNV() = default; + ~NodeOpHitObjectIsHitNV() = default; + NodeOpHitObjectIsHitNV(const NodeOpHitObjectIsHitNV &) = delete; + NodeOpHitObjectIsHitNV &operator=(const NodeOpHitObjectIsHitNV &) = delete; + NodeOpHitObjectIsHitNV(NodeOpHitObjectIsHitNV &&) = delete; + NodeOpHitObjectIsHitNV &operator=(NodeOpHitObjectIsHitNV &&) = delete; + NodeOpHitObjectIsHitNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; +struct NodeOpHitObjectIsMissNV +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpHitObjectIsMissNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer hitObject; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(hitObject); + } + NodeOpHitObjectIsMissNV() = default; + ~NodeOpHitObjectIsMissNV() = default; + NodeOpHitObjectIsMissNV(const NodeOpHitObjectIsMissNV &) = delete; + NodeOpHitObjectIsMissNV &operator=(const NodeOpHitObjectIsMissNV &) = delete; + NodeOpHitObjectIsMissNV(NodeOpHitObjectIsMissNV &&) = delete; + NodeOpHitObjectIsMissNV &operator=(NodeOpHitObjectIsMissNV &&) = delete; + NodeOpHitObjectIsMissNV(Id id_result, NodePointer id_result_type, NodePointer hit_object) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->hitObject = hit_object; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpImageSparseTexelsResident { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -28455,6 +32797,8 @@ struct NodeOpLoad NodePointer memoryAccessMakePointerAvailableKHR; NodePointer memoryAccessMakePointerVisible; NodePointer memoryAccessMakePointerVisibleKHR; + NodePointer memoryAccessAliasScopeINTELMask; + NodePointer memoryAccessNoAliasINTELMask; template void visitRefs(T visitor) { @@ -28468,6 +32812,10 @@ struct NodeOpLoad visitor(memoryAccessMakePointerVisible); if (memoryAccessMakePointerVisibleKHR) visitor(memoryAccessMakePointerVisibleKHR); + if (memoryAccessAliasScopeINTELMask) + visitor(memoryAccessAliasScopeINTELMask); + if (memoryAccessNoAliasINTELMask) + visitor(memoryAccessNoAliasINTELMask); } NodeOpLoad() = default; ~NodeOpLoad() = default; @@ -28480,7 +32828,8 @@ struct NodeOpLoad NodePointer memory_access_makePointerAvailable = {}, NodePointer memory_access_makePointerAvailableKHR = {}, NodePointer memory_access_makePointerVisible = {}, - NodePointer memory_access_makePointerVisibleKHR = {}) + NodePointer memory_access_makePointerVisibleKHR = {}, NodePointer memory_access_aliasScopeINTELMask = {}, + NodePointer memory_access_noAliasINTELMask = {}) { this->resultId = id_result; this->resultType = id_result_type; @@ -28492,6 +32841,8 @@ struct NodeOpLoad this->memoryAccessMakePointerAvailableKHR = memory_access_makePointerAvailableKHR; this->memoryAccessMakePointerVisible = memory_access_makePointerVisible; this->memoryAccessMakePointerVisibleKHR = memory_access_makePointerVisibleKHR; + this->memoryAccessAliasScopeINTELMask = memory_access_aliasScopeINTELMask; + this->memoryAccessNoAliasINTELMask = memory_access_noAliasINTELMask; } template static constexpr bool is(const T *value); @@ -28527,6 +32878,46 @@ struct NodeOpLogicalNot template static constexpr bool is(const T *value); }; +struct NodeOpMaskedGatherINTEL +{ + const NodeKind nodeKind = NodeKind::UnaryOperation; + const Op opCode = Op::OpMaskedGatherINTEL; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer resultType; + NodePointer ptrVector; + LiteralInteger alignment; + NodePointer mask; + NodePointer fillEmpty; + template + void visitRefs(T visitor) + { + visitor(resultType); + visitor(ptrVector); + visitor(mask); + visitor(fillEmpty); + } + NodeOpMaskedGatherINTEL() = default; + ~NodeOpMaskedGatherINTEL() = default; + NodeOpMaskedGatherINTEL(const NodeOpMaskedGatherINTEL &) = delete; + NodeOpMaskedGatherINTEL &operator=(const NodeOpMaskedGatherINTEL &) = delete; + NodeOpMaskedGatherINTEL(NodeOpMaskedGatherINTEL &&) = delete; + NodeOpMaskedGatherINTEL &operator=(NodeOpMaskedGatherINTEL &&) = delete; + NodeOpMaskedGatherINTEL(Id id_result, NodePointer id_result_type, NodePointer ptr_vector, + LiteralInteger alignment, NodePointer mask, NodePointer fill_empty) + { + this->resultId = id_result; + this->resultType = id_result_type; + this->ptrVector = ptr_vector; + this->alignment = alignment; + this->mask = mask; + this->fillEmpty = fill_empty; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpNamedBarrierInitialize { const NodeKind nodeKind = NodeKind::UnaryOperation; @@ -30709,12 +35100,12 @@ struct NodeOpVariableLengthArrayINTEL Id resultId = 0; eastl::vector> properties; NodePointer resultType; - NodePointer length; + NodePointer lenght; template void visitRefs(T visitor) { visitor(resultType); - visitor(length); + visitor(lenght); } NodeOpVariableLengthArrayINTEL() = default; ~NodeOpVariableLengthArrayINTEL() = default; @@ -30722,11 +35113,11 @@ struct NodeOpVariableLengthArrayINTEL NodeOpVariableLengthArrayINTEL &operator=(const NodeOpVariableLengthArrayINTEL &) = delete; NodeOpVariableLengthArrayINTEL(NodeOpVariableLengthArrayINTEL &&) = delete; NodeOpVariableLengthArrayINTEL &operator=(NodeOpVariableLengthArrayINTEL &&) = delete; - NodeOpVariableLengthArrayINTEL(Id id_result, NodePointer id_result_type, NodePointer length) + NodeOpVariableLengthArrayINTEL(Id id_result, NodePointer id_result_type, NodePointer lenght) { this->resultId = id_result; this->resultType = id_result_type; - this->length = length; + this->lenght = lenght; } template static constexpr bool is(const T *value); @@ -31720,12 +36111,24 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpColorAttachmentReadEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpCompositeConstructReplicateEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpCompositeExtract: if (visitor(reinterpret_cast(node))) return true; break; - case Op::OpConstantFunctionPointerINTEL: - if (visitor(reinterpret_cast(node))) + case Op::OpConvertBF16ToFINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpConvertFToBF16INTEL: + if (visitor(reinterpret_cast(node))) return true; break; case Op::OpConvertFToS: @@ -31780,6 +36183,10 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpCooperativeMatrixLengthKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpCooperativeMatrixLengthNV: if (visitor(reinterpret_cast(node))) return true; @@ -31824,6 +36231,10 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpExtInstWithForwardRefsKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpFConvert: if (visitor(reinterpret_cast(node))) return true; @@ -31832,6 +36243,10 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpFinishWritingNodePayloadAMDX: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpFwidth: if (visitor(reinterpret_cast(node))) return true; @@ -31860,6 +36275,90 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpGroupNonUniformQuadAllKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpGroupNonUniformQuadAnyKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetCurrentTimeNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetGeometryIndexNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetHitKindNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetInstanceCustomIndexNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetInstanceIdNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetObjectRayDirectionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetObjectRayOriginNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetObjectToWorldNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetPrimitiveIndexNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetRayTMaxNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetRayTMinNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetShaderBindingTableRecordIndexNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetShaderRecordBufferHandleNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetWorldRayDirectionNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetWorldRayOriginNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectGetWorldToObjectNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectIsEmptyNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectIsHitNV: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpHitObjectIsMissNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpImageSparseTexelsResident: if (visitor(reinterpret_cast(node))) return true; @@ -31896,6 +36395,10 @@ inline bool NodeUnaryOperation::visit(NodeUnaryOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpMaskedGatherINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpNamedBarrierInitialize: if (visitor(reinterpret_cast(node))) return true; @@ -32746,10 +37249,18 @@ inline bool NodeOperation::visit(NodeOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpCompositeConstructContinuedINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpCreateUserEvent: if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpDepthAttachmentReadEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpFunctionPointerCallINTEL: if (visitor(reinterpret_cast(node))) return true; @@ -32766,6 +37277,10 @@ inline bool NodeOperation::visit(NodeOperation *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpStencilAttachmentReadEXT: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: if (visitor(reinterpret_cast(node))) return true; @@ -33253,6 +37768,47 @@ struct NodeOpTypeBufferSurfaceINTEL template static constexpr bool is(const T *value); }; +struct NodeOpTypeCooperativeMatrixKHR +{ + const NodeKind nodeKind = NodeKind::Typedef; + const Op opCode = Op::OpTypeCooperativeMatrixKHR; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + NodePointer componentType; + NodePointer scope; + NodePointer rows; + NodePointer columns; + NodePointer use; + template + void visitRefs(T visitor) + { + visitor(componentType); + visitor(scope); + visitor(rows); + visitor(columns); + visitor(use); + } + NodeOpTypeCooperativeMatrixKHR() = default; + ~NodeOpTypeCooperativeMatrixKHR() = default; + NodeOpTypeCooperativeMatrixKHR(const NodeOpTypeCooperativeMatrixKHR &) = delete; + NodeOpTypeCooperativeMatrixKHR &operator=(const NodeOpTypeCooperativeMatrixKHR &) = delete; + NodeOpTypeCooperativeMatrixKHR(NodeOpTypeCooperativeMatrixKHR &&) = delete; + NodeOpTypeCooperativeMatrixKHR &operator=(NodeOpTypeCooperativeMatrixKHR &&) = delete; + NodeOpTypeCooperativeMatrixKHR(Id id_result, NodePointer component_type, NodePointer scope, + NodePointer rows, NodePointer columns, NodePointer use) + { + this->resultId = id_result; + this->componentType = component_type; + this->scope = scope; + this->rows = rows; + this->columns = columns; + this->use = use; + } + template + static constexpr bool is(const T *value); +}; struct NodeOpTypeCooperativeMatrixNV { const NodeKind nodeKind = NodeKind::Typedef; @@ -33391,6 +37947,27 @@ struct NodeOpTypeFunction template static constexpr bool is(const T *value); }; +struct NodeOpTypeHitObjectNV +{ + const NodeKind nodeKind = NodeKind::Typedef; + const Op opCode = Op::OpTypeHitObjectNV; + const Id extOpCode = {}; + const ExtendedGrammar grammarId = ExtendedGrammar::Count; + Id resultId = 0; + eastl::vector> properties; + template + void visitRefs(T) + {} + NodeOpTypeHitObjectNV() = default; + ~NodeOpTypeHitObjectNV() = default; + NodeOpTypeHitObjectNV(const NodeOpTypeHitObjectNV &) = delete; + NodeOpTypeHitObjectNV &operator=(const NodeOpTypeHitObjectNV &) = delete; + NodeOpTypeHitObjectNV(NodeOpTypeHitObjectNV &&) = delete; + NodeOpTypeHitObjectNV &operator=(NodeOpTypeHitObjectNV &&) = delete; + NodeOpTypeHitObjectNV(Id id_result) { this->resultId = id_result; } + template + static constexpr bool is(const T *value); +}; struct NodeOpTypeImage { const NodeKind nodeKind = NodeKind::Typedef; @@ -33937,6 +38514,10 @@ inline bool NodeTypedef::visit(NodeTypedef *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpTypeCooperativeMatrixKHR: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpTypeCooperativeMatrixNV: if (visitor(reinterpret_cast(node))) return true; @@ -33957,6 +38538,10 @@ inline bool NodeTypedef::visit(NodeTypedef *node, T visitor) if (visitor(reinterpret_cast(node))) return true; break; + case Op::OpTypeHitObjectNV: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpTypeImage: if (visitor(reinterpret_cast(node))) return true; @@ -34045,6 +38630,18 @@ inline bool NodeId::visit(NodeId *node, T visitor) switch (node->opCode) { default: break; + case Op::OpAliasDomainDeclINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpAliasScopeDeclINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; + case Op::OpAliasScopeListDeclINTEL: + if (visitor(reinterpret_cast(node))) + return true; + break; case Op::OpDecorationGroup: if (visitor(reinterpret_cast(node))) return true; @@ -34256,11 +38853,36 @@ inline constexpr bool NodeOpExecuteCallableNV::is(const T *val) return val->opCode == Op::OpExecuteCallableNV; } template +inline constexpr bool NodeOpHitObjectExecuteShaderNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectExecuteShaderNV; +} +template +inline constexpr bool NodeOpHitObjectGetAttributesNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetAttributesNV; +} +template +inline constexpr bool NodeOpMaskedScatterINTEL::is(const T *val) +{ + return val->opCode == Op::OpMaskedScatterINTEL; +} +template inline constexpr bool NodeOpRayQueryGenerateIntersectionKHR::is(const T *val) { return val->opCode == Op::OpRayQueryGenerateIntersectionKHR; } template +inline constexpr bool NodeOpReorderThreadWithHintNV::is(const T *val) +{ + return val->opCode == Op::OpReorderThreadWithHintNV; +} +template +inline constexpr bool NodeOpSetMeshOutputsEXT::is(const T *val) +{ + return val->opCode == Op::OpSetMeshOutputsEXT; +} +template inline constexpr bool NodeOpSetUserEventStatus::is(const T *val) { return val->opCode == Op::OpSetUserEventStatus; @@ -34321,6 +38943,46 @@ inline constexpr bool NodeOpCooperativeMatrixStoreNV::is(const T *val) return val->opCode == Op::OpCooperativeMatrixStoreNV; } template +inline constexpr bool NodeOpHitObjectRecordHitMotionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordHitMotionNV; +} +template +inline constexpr bool NodeOpHitObjectRecordHitNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordHitNV; +} +template +inline constexpr bool NodeOpHitObjectRecordHitWithIndexMotionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordHitWithIndexMotionNV; +} +template +inline constexpr bool NodeOpHitObjectRecordHitWithIndexNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordHitWithIndexNV; +} +template +inline constexpr bool NodeOpHitObjectRecordMissMotionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordMissMotionNV; +} +template +inline constexpr bool NodeOpHitObjectRecordMissNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordMissNV; +} +template +inline constexpr bool NodeOpHitObjectTraceRayMotionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectTraceRayMotionNV; +} +template +inline constexpr bool NodeOpHitObjectTraceRayNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectTraceRayNV; +} +template inline constexpr bool NodeOpRayQueryInitializeKHR::is(const T *val) { return val->opCode == Op::OpRayQueryInitializeKHR; @@ -34356,6 +39018,16 @@ inline constexpr bool NodeOpControlBarrier::is(const T *val) return val->opCode == Op::OpControlBarrier; } template +inline constexpr bool NodeOpControlBarrierArriveINTEL::is(const T *val) +{ + return val->opCode == Op::OpControlBarrierArriveINTEL; +} +template +inline constexpr bool NodeOpControlBarrierWaitINTEL::is(const T *val) +{ + return val->opCode == Op::OpControlBarrierWaitINTEL; +} +template inline constexpr bool NodeOpGroupCommitReadPipe::is(const T *val) { return val->opCode == Op::OpGroupCommitReadPipe; @@ -34391,11 +39063,21 @@ inline constexpr bool NodeOpCaptureEventProfilingInfo::is(const T *val) return val->opCode == Op::OpCaptureEventProfilingInfo; } template +inline constexpr bool NodeOpCooperativeMatrixStoreKHR::is(const T *val) +{ + return val->opCode == Op::OpCooperativeMatrixStoreKHR; +} +template inline constexpr bool NodeOpCopyMemorySized::is(const T *val) { return val->opCode == Op::OpCopyMemorySized; } template +inline constexpr bool NodeOpEmitMeshTasksEXT::is(const T *val) +{ + return val->opCode == Op::OpEmitMeshTasksEXT; +} +template inline constexpr bool NodeUnaryAction::is(const T *val) { return val->nodeKind == NodeKind::UnaryAction; @@ -34426,6 +39108,21 @@ inline constexpr bool NodeOpEndStreamPrimitive::is(const T *val) return val->opCode == Op::OpEndStreamPrimitive; } template +inline constexpr bool NodeOpFinalizeNodePayloadsAMDX::is(const T *val) +{ + return val->opCode == Op::OpFinalizeNodePayloadsAMDX; +} +template +inline constexpr bool NodeOpHitObjectRecordEmptyNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectRecordEmptyNV; +} +template +inline constexpr bool NodeOpInitializeNodePayloadsAMDX::is(const T *val) +{ + return val->opCode == Op::OpInitializeNodePayloadsAMDX; +} +template inline constexpr bool NodeOpLifetimeStart::is(const T *val) { return val->opCode == Op::OpLifetimeStart; @@ -34456,6 +39153,11 @@ inline constexpr bool NodeOpReleaseEvent::is(const T *val) return val->opCode == Op::OpReleaseEvent; } template +inline constexpr bool NodeOpReorderThreadWithHitObjectNV::is(const T *val) +{ + return val->opCode == Op::OpReorderThreadWithHitObjectNV; +} +template inline constexpr bool NodeOpRestoreMemoryINTEL::is(const T *val) { return val->opCode == Op::OpRestoreMemoryINTEL; @@ -34531,6 +39233,21 @@ inline constexpr bool NodeId::is(const T *val) return val->nodeKind == NodeKind::Id || NodeBlock::is(val) || NodeOperation::is(val) || NodeTypedef::is(val); } template +inline constexpr bool NodeOpAliasDomainDeclINTEL::is(const T *val) +{ + return val->opCode == Op::OpAliasDomainDeclINTEL; +} +template +inline constexpr bool NodeOpAliasScopeDeclINTEL::is(const T *val) +{ + return val->opCode == Op::OpAliasScopeDeclINTEL; +} +template +inline constexpr bool NodeOpAliasScopeListDeclINTEL::is(const T *val) +{ + return val->opCode == Op::OpAliasScopeListDeclINTEL; +} +template inline constexpr bool NodeOpDecorationGroup::is(const T *val) { return val->opCode == Op::OpDecorationGroup; @@ -34569,11 +39286,21 @@ inline constexpr bool NodeOpCompositeConstruct::is(const T *val) return val->opCode == Op::OpCompositeConstruct; } template +inline constexpr bool NodeOpCompositeConstructContinuedINTEL::is(const T *val) +{ + return val->opCode == Op::OpCompositeConstructContinuedINTEL; +} +template inline constexpr bool NodeOpCreateUserEvent::is(const T *val) { return val->opCode == Op::OpCreateUserEvent; } template +inline constexpr bool NodeOpDepthAttachmentReadEXT::is(const T *val) +{ + return val->opCode == Op::OpDepthAttachmentReadEXT; +} +template inline constexpr bool NodeOpFunctionPointerCallINTEL::is(const T *val) { return val->opCode == Op::OpFunctionPointerCallINTEL; @@ -34594,6 +39321,11 @@ inline constexpr bool NodeOpSaveMemoryINTEL::is(const T *val) return val->opCode == Op::OpSaveMemoryINTEL; } template +inline constexpr bool NodeOpStencilAttachmentReadEXT::is(const T *val) +{ + return val->opCode == Op::OpStencilAttachmentReadEXT; +} +template inline constexpr bool NodeOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL::is(const T *val) { return val->opCode == Op::OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL; @@ -34748,6 +39480,11 @@ inline constexpr bool NodeOpCompositeInsert::is(const T *val) return val->opCode == Op::OpCompositeInsert; } template +inline constexpr bool NodeOpCooperativeMatrixLoadKHR::is(const T *val) +{ + return val->opCode == Op::OpCooperativeMatrixLoadKHR; +} +template inline constexpr bool NodeOpDot::is(const T *val) { return val->opCode == Op::OpDot; @@ -35088,6 +39825,11 @@ inline constexpr bool NodeOpRayQueryGetIntersectionTKHR::is(const T *val) return val->opCode == Op::OpRayQueryGetIntersectionTKHR; } template +inline constexpr bool NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR::is(const T *val) +{ + return val->opCode == Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR; +} +template inline constexpr bool NodeOpRayQueryGetIntersectionTypeKHR::is(const T *val) { return val->opCode == Op::OpRayQueryGetIntersectionTypeKHR; @@ -35502,6 +40244,11 @@ inline constexpr bool NodeOpConstantFalse::is(const T *val) return val->opCode == Op::OpConstantFalse; } template +inline constexpr bool NodeOpConstantFunctionPointerINTEL::is(const T *val) +{ + return val->opCode == Op::OpConstantFunctionPointerINTEL; +} +template inline constexpr bool NodeOpConstantNull::is(const T *val) { return val->opCode == Op::OpConstantNull; @@ -35527,6 +40274,11 @@ inline constexpr bool NodeOpConstantComposite::is(const T *val) return val->opCode == Op::OpConstantComposite; } template +inline constexpr bool NodeOpConstantCompositeReplicateEXT::is(const T *val) +{ + return val->opCode == Op::OpConstantCompositeReplicateEXT; +} +template inline constexpr bool NodeConstantSampler::is(const T *val) { return val->nodeKind == NodeKind::ConstantSampler; @@ -35772,6 +40524,16 @@ inline constexpr bool NodeOpEnqueueMarker::is(const T *val) return val->opCode == Op::OpEnqueueMarker; } template +inline constexpr bool NodeOpFetchMicroTriangleVertexBarycentricNV::is(const T *val) +{ + return val->opCode == Op::OpFetchMicroTriangleVertexBarycentricNV; +} +template +inline constexpr bool NodeOpFetchMicroTriangleVertexPositionNV::is(const T *val) +{ + return val->opCode == Op::OpFetchMicroTriangleVertexPositionNV; +} +template inline constexpr bool NodeOpGetKernelLocalSizeForSubgroupCount::is(const T *val) { return val->opCode == Op::OpGetKernelLocalSizeForSubgroupCount; @@ -35802,6 +40564,41 @@ inline constexpr bool NodeOpGetKernelWorkGroupSize::is(const T *val) return val->opCode == Op::OpGetKernelWorkGroupSize; } template +inline constexpr bool NodeOpImageBlockMatchGatherSADQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchGatherSADQCOM; +} +template +inline constexpr bool NodeOpImageBlockMatchGatherSSDQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchGatherSSDQCOM; +} +template +inline constexpr bool NodeOpImageBlockMatchSADQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchSADQCOM; +} +template +inline constexpr bool NodeOpImageBlockMatchSSDQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchSSDQCOM; +} +template +inline constexpr bool NodeOpImageBlockMatchWindowSADQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchWindowSADQCOM; +} +template +inline constexpr bool NodeOpImageBlockMatchWindowSSDQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBlockMatchWindowSSDQCOM; +} +template +inline constexpr bool NodeOpRawAccessChainNV::is(const T *val) +{ + return val->opCode == Op::OpRawAccessChainNV; +} +template inline constexpr bool NodeOpReadPipe::is(const T *val) { return val->opCode == Op::OpReadPipe; @@ -36027,6 +40824,11 @@ inline constexpr bool NodeOpGroupNonUniformQuadSwap::is(const T *val) return val->opCode == Op::OpGroupNonUniformQuadSwap; } template +inline constexpr bool NodeOpGroupNonUniformRotateKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupNonUniformRotateKHR; +} +template inline constexpr bool NodeOpGroupNonUniformShuffle::is(const T *val) { return val->opCode == Op::OpGroupNonUniformShuffle; @@ -36067,6 +40869,21 @@ inline constexpr bool NodeGroupedOperation::is(const T *val) return val->nodeKind == NodeKind::GroupedOperation; } template +inline constexpr bool NodeOpGroupBitwiseAndKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupBitwiseAndKHR; +} +template +inline constexpr bool NodeOpGroupBitwiseOrKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupBitwiseOrKHR; +} +template +inline constexpr bool NodeOpGroupBitwiseXorKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupBitwiseXorKHR; +} +template inline constexpr bool NodeOpGroupFAdd::is(const T *val) { return val->opCode == Op::OpGroupFAdd; @@ -36097,6 +40914,11 @@ inline constexpr bool NodeOpGroupFMinNonUniformAMD::is(const T *val) return val->opCode == Op::OpGroupFMinNonUniformAMD; } template +inline constexpr bool NodeOpGroupFMulKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupFMulKHR; +} +template inline constexpr bool NodeOpGroupIAdd::is(const T *val) { return val->opCode == Op::OpGroupIAdd; @@ -36107,6 +40929,26 @@ inline constexpr bool NodeOpGroupIAddNonUniformAMD::is(const T *val) return val->opCode == Op::OpGroupIAddNonUniformAMD; } template +inline constexpr bool NodeOpGroupIMulKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupIMulKHR; +} +template +inline constexpr bool NodeOpGroupLogicalAndKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupLogicalAndKHR; +} +template +inline constexpr bool NodeOpGroupLogicalOrKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupLogicalOrKHR; +} +template +inline constexpr bool NodeOpGroupLogicalXorKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupLogicalXorKHR; +} +template inline constexpr bool NodeOpGroupNonUniformBallotBitCount::is(const T *val) { return val->opCode == Op::OpGroupNonUniformBallotBitCount; @@ -36262,6 +41104,11 @@ inline constexpr bool NodeOpSpecConstantComposite::is(const T *val) return val->opCode == Op::OpSpecConstantComposite; } template +inline constexpr bool NodeOpSpecConstantCompositeReplicateEXT::is(const T *val) +{ + return val->opCode == Op::OpSpecConstantCompositeReplicateEXT; +} +template inline constexpr bool NodeSpecConstantOperation::is(const T *val) { return val->nodeKind == NodeKind::SpecConstantOperation; @@ -36351,6 +41198,11 @@ inline constexpr bool NodeOpCooperativeMatrixLoadNV::is(const T *val) return val->opCode == Op::OpCooperativeMatrixLoadNV; } template +inline constexpr bool NodeOpCooperativeMatrixMulAddKHR::is(const T *val) +{ + return val->opCode == Op::OpCooperativeMatrixMulAddKHR; +} +template inline constexpr bool NodeOpCooperativeMatrixMulAddNV::is(const T *val) { return val->opCode == Op::OpCooperativeMatrixMulAddNV; @@ -36366,6 +41218,16 @@ inline constexpr bool NodeOpGetNumPipePackets::is(const T *val) return val->opCode == Op::OpGetNumPipePackets; } template +inline constexpr bool NodeOpImageBoxFilterQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageBoxFilterQCOM; +} +template +inline constexpr bool NodeOpImageSampleWeightedQCOM::is(const T *val) +{ + return val->opCode == Op::OpImageSampleWeightedQCOM; +} +template inline constexpr bool NodeOpSDotAccSat::is(const T *val) { return val->opCode == Op::OpSDotAccSat; @@ -37079,14 +41941,29 @@ inline constexpr bool NodeOpBitcast::is(const T *val) return val->opCode == Op::OpBitcast; } template +inline constexpr bool NodeOpColorAttachmentReadEXT::is(const T *val) +{ + return val->opCode == Op::OpColorAttachmentReadEXT; +} +template +inline constexpr bool NodeOpCompositeConstructReplicateEXT::is(const T *val) +{ + return val->opCode == Op::OpCompositeConstructReplicateEXT; +} +template inline constexpr bool NodeOpCompositeExtract::is(const T *val) { return val->opCode == Op::OpCompositeExtract; } template -inline constexpr bool NodeOpConstantFunctionPointerINTEL::is(const T *val) +inline constexpr bool NodeOpConvertBF16ToFINTEL::is(const T *val) { - return val->opCode == Op::OpConstantFunctionPointerINTEL; + return val->opCode == Op::OpConvertBF16ToFINTEL; +} +template +inline constexpr bool NodeOpConvertFToBF16INTEL::is(const T *val) +{ + return val->opCode == Op::OpConvertFToBF16INTEL; } template inline constexpr bool NodeOpConvertFToS::is(const T *val) @@ -37154,6 +42031,11 @@ inline constexpr bool NodeOpConvertUToSamplerNV::is(const T *val) return val->opCode == Op::OpConvertUToSamplerNV; } template +inline constexpr bool NodeOpCooperativeMatrixLengthKHR::is(const T *val) +{ + return val->opCode == Op::OpCooperativeMatrixLengthKHR; +} +template inline constexpr bool NodeOpCooperativeMatrixLengthNV::is(const T *val) { return val->opCode == Op::OpCooperativeMatrixLengthNV; @@ -37209,6 +42091,11 @@ inline constexpr bool NodeOpDPdyFine::is(const T *val) return val->opCode == Op::OpDPdyFine; } template +inline constexpr bool NodeOpExtInstWithForwardRefsKHR::is(const T *val) +{ + return val->opCode == Op::OpExtInstWithForwardRefsKHR; +} +template inline constexpr bool NodeOpFConvert::is(const T *val) { return val->opCode == Op::OpFConvert; @@ -37219,6 +42106,11 @@ inline constexpr bool NodeOpFNegate::is(const T *val) return val->opCode == Op::OpFNegate; } template +inline constexpr bool NodeOpFinishWritingNodePayloadAMDX::is(const T *val) +{ + return val->opCode == Op::OpFinishWritingNodePayloadAMDX; +} +template inline constexpr bool NodeOpFwidth::is(const T *val) { return val->opCode == Op::OpFwidth; @@ -37254,6 +42146,111 @@ inline constexpr bool NodeOpGroupNonUniformPartitionNV::is(const T *val) return val->opCode == Op::OpGroupNonUniformPartitionNV; } template +inline constexpr bool NodeOpGroupNonUniformQuadAllKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupNonUniformQuadAllKHR; +} +template +inline constexpr bool NodeOpGroupNonUniformQuadAnyKHR::is(const T *val) +{ + return val->opCode == Op::OpGroupNonUniformQuadAnyKHR; +} +template +inline constexpr bool NodeOpHitObjectGetCurrentTimeNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetCurrentTimeNV; +} +template +inline constexpr bool NodeOpHitObjectGetGeometryIndexNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetGeometryIndexNV; +} +template +inline constexpr bool NodeOpHitObjectGetHitKindNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetHitKindNV; +} +template +inline constexpr bool NodeOpHitObjectGetInstanceCustomIndexNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetInstanceCustomIndexNV; +} +template +inline constexpr bool NodeOpHitObjectGetInstanceIdNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetInstanceIdNV; +} +template +inline constexpr bool NodeOpHitObjectGetObjectRayDirectionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetObjectRayDirectionNV; +} +template +inline constexpr bool NodeOpHitObjectGetObjectRayOriginNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetObjectRayOriginNV; +} +template +inline constexpr bool NodeOpHitObjectGetObjectToWorldNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetObjectToWorldNV; +} +template +inline constexpr bool NodeOpHitObjectGetPrimitiveIndexNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetPrimitiveIndexNV; +} +template +inline constexpr bool NodeOpHitObjectGetRayTMaxNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetRayTMaxNV; +} +template +inline constexpr bool NodeOpHitObjectGetRayTMinNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetRayTMinNV; +} +template +inline constexpr bool NodeOpHitObjectGetShaderBindingTableRecordIndexNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetShaderBindingTableRecordIndexNV; +} +template +inline constexpr bool NodeOpHitObjectGetShaderRecordBufferHandleNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetShaderRecordBufferHandleNV; +} +template +inline constexpr bool NodeOpHitObjectGetWorldRayDirectionNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetWorldRayDirectionNV; +} +template +inline constexpr bool NodeOpHitObjectGetWorldRayOriginNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetWorldRayOriginNV; +} +template +inline constexpr bool NodeOpHitObjectGetWorldToObjectNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectGetWorldToObjectNV; +} +template +inline constexpr bool NodeOpHitObjectIsEmptyNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectIsEmptyNV; +} +template +inline constexpr bool NodeOpHitObjectIsHitNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectIsHitNV; +} +template +inline constexpr bool NodeOpHitObjectIsMissNV::is(const T *val) +{ + return val->opCode == Op::OpHitObjectIsMissNV; +} +template inline constexpr bool NodeOpImageSparseTexelsResident::is(const T *val) { return val->opCode == Op::OpImageSparseTexelsResident; @@ -37299,6 +42296,11 @@ inline constexpr bool NodeOpLogicalNot::is(const T *val) return val->opCode == Op::OpLogicalNot; } template +inline constexpr bool NodeOpMaskedGatherINTEL::is(const T *val) +{ + return val->opCode == Op::OpMaskedGatherINTEL; +} +template inline constexpr bool NodeOpNamedBarrierInitialize::is(const T *val) { return val->opCode == Op::OpNamedBarrierInitialize; @@ -37917,6 +42919,11 @@ inline constexpr bool NodeOpTypeBufferSurfaceINTEL::is(const T *val) return val->opCode == Op::OpTypeBufferSurfaceINTEL; } template +inline constexpr bool NodeOpTypeCooperativeMatrixKHR::is(const T *val) +{ + return val->opCode == Op::OpTypeCooperativeMatrixKHR; +} +template inline constexpr bool NodeOpTypeCooperativeMatrixNV::is(const T *val) { return val->opCode == Op::OpTypeCooperativeMatrixNV; @@ -37942,6 +42949,11 @@ inline constexpr bool NodeOpTypeFunction::is(const T *val) return val->opCode == Op::OpTypeFunction; } template +inline constexpr bool NodeOpTypeHitObjectNV::is(const T *val) +{ + return val->opCode == Op::OpTypeHitObjectNV; +} +template inline constexpr bool NodeOpTypeImage::is(const T *val) { return val->opCode == Op::OpTypeImage; @@ -38086,18 +43098,26 @@ inline auto visitProperty(T *p, U u) case Decoration::MaxByteOffsetId: return u(reinterpret_cast(p)); case Decoration::NoSignedWrap: return u(reinterpret_cast(p)); case Decoration::NoUnsignedWrap: return u(reinterpret_cast(p)); + case Decoration::WeightTextureQCOM: return u(reinterpret_cast(p)); + case Decoration::BlockMatchTextureQCOM: return u(reinterpret_cast(p)); + case Decoration::BlockMatchSamplerQCOM: return u(reinterpret_cast(p)); case Decoration::ExplicitInterpAMD: return u(reinterpret_cast(p)); + case Decoration::NodeSharesPayloadLimitsWithAMDX: return u(reinterpret_cast(p)); + case Decoration::NodeMaxPayloadsAMDX: return u(reinterpret_cast(p)); + case Decoration::TrackFinishWritingAMDX: return u(reinterpret_cast(p)); + case Decoration::PayloadNodeNameAMDX: return u(reinterpret_cast(p)); case Decoration::OverrideCoverageNV: return u(reinterpret_cast(p)); case Decoration::PassthroughNV: return u(reinterpret_cast(p)); case Decoration::ViewportRelativeNV: return u(reinterpret_cast(p)); case Decoration::SecondaryViewportRelativeNV: return u(reinterpret_cast(p)); - case Decoration::PerPrimitiveNV: return u(reinterpret_cast(p)); + case Decoration::PerPrimitiveEXT: return u(reinterpret_cast(p)); case Decoration::PerViewNV: return u(reinterpret_cast(p)); case Decoration::PerTaskNV: return u(reinterpret_cast(p)); case Decoration::PerVertexKHR: return u(reinterpret_cast(p)); case Decoration::NonUniform: return u(reinterpret_cast(p)); case Decoration::RestrictPointer: return u(reinterpret_cast(p)); case Decoration::AliasedPointer: return u(reinterpret_cast(p)); + case Decoration::HitObjectShaderRecordBufferNV: return u(reinterpret_cast(p)); case Decoration::BindlessSamplerNV: return u(reinterpret_cast(p)); case Decoration::BindlessImageNV: return u(reinterpret_cast(p)); case Decoration::BoundSamplerNV: return u(reinterpret_cast(p)); @@ -38128,18 +43148,45 @@ inline auto visitProperty(T *p, U u) case Decoration::MergeINTEL: return u(reinterpret_cast(p)); case Decoration::BankBitsINTEL: return u(reinterpret_cast(p)); case Decoration::ForcePow2DepthINTEL: return u(reinterpret_cast(p)); + case Decoration::StridesizeINTEL: return u(reinterpret_cast(p)); + case Decoration::WordsizeINTEL: return u(reinterpret_cast(p)); + case Decoration::TrueDualPortINTEL: return u(reinterpret_cast(p)); case Decoration::BurstCoalesceINTEL: return u(reinterpret_cast(p)); case Decoration::CacheSizeINTEL: return u(reinterpret_cast(p)); case Decoration::DontStaticallyCoalesceINTEL: return u(reinterpret_cast(p)); case Decoration::PrefetchINTEL: return u(reinterpret_cast(p)); case Decoration::StallEnableINTEL: return u(reinterpret_cast(p)); case Decoration::FuseLoopsInFunctionINTEL: return u(reinterpret_cast(p)); + case Decoration::MathOpDSPModeINTEL: return u(reinterpret_cast(p)); + case Decoration::AliasScopeINTEL: return u(reinterpret_cast(p)); + case Decoration::NoAliasINTEL: return u(reinterpret_cast(p)); + case Decoration::InitiationIntervalINTEL: return u(reinterpret_cast(p)); + case Decoration::MaxConcurrencyINTEL: return u(reinterpret_cast(p)); + case Decoration::PipelineEnableINTEL: return u(reinterpret_cast(p)); case Decoration::BufferLocationINTEL: return u(reinterpret_cast(p)); case Decoration::IOPipeStorageINTEL: return u(reinterpret_cast(p)); case Decoration::FunctionFloatingPointModeINTEL: return u(reinterpret_cast(p)); case Decoration::SingleElementVectorINTEL: return u(reinterpret_cast(p)); case Decoration::VectorComputeCallableFunctionINTEL: return u(reinterpret_cast(p)); case Decoration::MediaBlockIOINTEL: return u(reinterpret_cast(p)); + case Decoration::StallFreeINTEL: return u(reinterpret_cast(p)); + case Decoration::FPMaxErrorDecorationINTEL: return u(reinterpret_cast(p)); + case Decoration::LatencyControlLabelINTEL: return u(reinterpret_cast(p)); + case Decoration::LatencyControlConstraintINTEL: return u(reinterpret_cast(p)); + case Decoration::ConduitKernelArgumentINTEL: return u(reinterpret_cast(p)); + case Decoration::RegisterMapKernelArgumentINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceAddressWidthINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceDataWidthINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceLatencyINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceReadWriteModeINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceMaxBurstINTEL: return u(reinterpret_cast(p)); + case Decoration::MMHostInterfaceWaitRequestINTEL: return u(reinterpret_cast(p)); + case Decoration::StableKernelArgumentINTEL: return u(reinterpret_cast(p)); + case Decoration::HostAccessINTEL: return u(reinterpret_cast(p)); + case Decoration::InitModeINTEL: return u(reinterpret_cast(p)); + case Decoration::ImplementInRegisterMapINTEL: return u(reinterpret_cast(p)); + case Decoration::CacheControlLoadINTEL: return u(reinterpret_cast(p)); + case Decoration::CacheControlStoreINTEL: return u(reinterpret_cast(p)); } if (p->type == DecorationName) { @@ -38800,6 +43847,45 @@ struct ExecutionModeLocalSizeHintId : ExecutionModeBase visitor(zSizeHint); } }; +struct ExecutionModeNonCoherentColorAttachmentReadEXT : ExecutionModeBase +{ + ExecutionModeNonCoherentColorAttachmentReadEXT() : ExecutionModeBase(ExecutionMode::NonCoherentColorAttachmentReadEXT) {} + ~ExecutionModeNonCoherentColorAttachmentReadEXT() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::NonCoherentColorAttachmentReadEXT; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeNonCoherentDepthAttachmentReadEXT : ExecutionModeBase +{ + ExecutionModeNonCoherentDepthAttachmentReadEXT() : ExecutionModeBase(ExecutionMode::NonCoherentDepthAttachmentReadEXT) {} + ~ExecutionModeNonCoherentDepthAttachmentReadEXT() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::NonCoherentDepthAttachmentReadEXT; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeNonCoherentStencilAttachmentReadEXT : ExecutionModeBase +{ + ExecutionModeNonCoherentStencilAttachmentReadEXT() : ExecutionModeBase(ExecutionMode::NonCoherentStencilAttachmentReadEXT) {} + ~ExecutionModeNonCoherentStencilAttachmentReadEXT() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::NonCoherentStencilAttachmentReadEXT; + } + template + void visitRefs(T) + {} +}; struct ExecutionModeSubgroupUniformControlFlowKHR : ExecutionModeBase { ExecutionModeSubgroupUniformControlFlowKHR() : ExecutionModeBase(ExecutionMode::SubgroupUniformControlFlowKHR) {} @@ -38916,6 +44002,19 @@ struct ExecutionModeRoundingModeRTZ : ExecutionModeBase void visitRefs(T) {} }; +struct ExecutionModeEarlyAndLateFragmentTestsAMD : ExecutionModeBase +{ + ExecutionModeEarlyAndLateFragmentTestsAMD() : ExecutionModeBase(ExecutionMode::EarlyAndLateFragmentTestsAMD) {} + ~ExecutionModeEarlyAndLateFragmentTestsAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::EarlyAndLateFragmentTestsAMD; + } + template + void visitRefs(T) + {} +}; struct ExecutionModeStencilRefReplacingEXT : ExecutionModeBase { ExecutionModeStencilRefReplacingEXT() : ExecutionModeBase(ExecutionMode::StencilRefReplacingEXT) {} @@ -38929,6 +44028,230 @@ struct ExecutionModeStencilRefReplacingEXT : ExecutionModeBase void visitRefs(T) {} }; +struct ExecutionModeCoalescingAMDX : ExecutionModeBase +{ + ExecutionModeCoalescingAMDX() : ExecutionModeBase(ExecutionMode::CoalescingAMDX) {} + ~ExecutionModeCoalescingAMDX() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::CoalescingAMDX; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeMaxNodeRecursionAMDX : ExecutionModeBase +{ + NodePointer numberOfRecursions; + ExecutionModeMaxNodeRecursionAMDX() : ExecutionModeBase(ExecutionMode::MaxNodeRecursionAMDX) {} + ~ExecutionModeMaxNodeRecursionAMDX() = default; + ExecutionModeMaxNodeRecursionAMDX(NodePointer number_of_recursions) : ExecutionModeBase(ExecutionMode::MaxNodeRecursionAMDX) + { + numberOfRecursions = number_of_recursions; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::MaxNodeRecursionAMDX; + } + template + void visitRefs(T visitor) + { + visitor(numberOfRecursions); + } +}; +struct ExecutionModeStaticNumWorkgroupsAMDX : ExecutionModeBase +{ + NodePointer xSize; + NodePointer ySize; + NodePointer zSize; + ExecutionModeStaticNumWorkgroupsAMDX() : ExecutionModeBase(ExecutionMode::StaticNumWorkgroupsAMDX) {} + ~ExecutionModeStaticNumWorkgroupsAMDX() = default; + ExecutionModeStaticNumWorkgroupsAMDX(NodePointer x_size, NodePointer y_size, NodePointer z_size) : + ExecutionModeBase(ExecutionMode::StaticNumWorkgroupsAMDX) + { + xSize = x_size; + ySize = y_size; + zSize = z_size; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StaticNumWorkgroupsAMDX; + } + template + void visitRefs(T visitor) + { + visitor(xSize); + visitor(ySize); + visitor(zSize); + } +}; +struct ExecutionModeShaderIndexAMDX : ExecutionModeBase +{ + NodePointer shaderIndex; + ExecutionModeShaderIndexAMDX() : ExecutionModeBase(ExecutionMode::ShaderIndexAMDX) {} + ~ExecutionModeShaderIndexAMDX() = default; + ExecutionModeShaderIndexAMDX(NodePointer shader_index) : ExecutionModeBase(ExecutionMode::ShaderIndexAMDX) + { + shaderIndex = shader_index; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::ShaderIndexAMDX; + } + template + void visitRefs(T visitor) + { + visitor(shaderIndex); + } +}; +struct ExecutionModeMaxNumWorkgroupsAMDX : ExecutionModeBase +{ + NodePointer xSize; + NodePointer ySize; + NodePointer zSize; + ExecutionModeMaxNumWorkgroupsAMDX() : ExecutionModeBase(ExecutionMode::MaxNumWorkgroupsAMDX) {} + ~ExecutionModeMaxNumWorkgroupsAMDX() = default; + ExecutionModeMaxNumWorkgroupsAMDX(NodePointer x_size, NodePointer y_size, NodePointer z_size) : + ExecutionModeBase(ExecutionMode::MaxNumWorkgroupsAMDX) + { + xSize = x_size; + ySize = y_size; + zSize = z_size; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::MaxNumWorkgroupsAMDX; + } + template + void visitRefs(T visitor) + { + visitor(xSize); + visitor(ySize); + visitor(zSize); + } +}; +struct ExecutionModeStencilRefUnchangedFrontAMD : ExecutionModeBase +{ + ExecutionModeStencilRefUnchangedFrontAMD() : ExecutionModeBase(ExecutionMode::StencilRefUnchangedFrontAMD) {} + ~ExecutionModeStencilRefUnchangedFrontAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefUnchangedFrontAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeStencilRefGreaterFrontAMD : ExecutionModeBase +{ + ExecutionModeStencilRefGreaterFrontAMD() : ExecutionModeBase(ExecutionMode::StencilRefGreaterFrontAMD) {} + ~ExecutionModeStencilRefGreaterFrontAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefGreaterFrontAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeStencilRefLessFrontAMD : ExecutionModeBase +{ + ExecutionModeStencilRefLessFrontAMD() : ExecutionModeBase(ExecutionMode::StencilRefLessFrontAMD) {} + ~ExecutionModeStencilRefLessFrontAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefLessFrontAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeStencilRefUnchangedBackAMD : ExecutionModeBase +{ + ExecutionModeStencilRefUnchangedBackAMD() : ExecutionModeBase(ExecutionMode::StencilRefUnchangedBackAMD) {} + ~ExecutionModeStencilRefUnchangedBackAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefUnchangedBackAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeStencilRefGreaterBackAMD : ExecutionModeBase +{ + ExecutionModeStencilRefGreaterBackAMD() : ExecutionModeBase(ExecutionMode::StencilRefGreaterBackAMD) {} + ~ExecutionModeStencilRefGreaterBackAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefGreaterBackAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeStencilRefLessBackAMD : ExecutionModeBase +{ + ExecutionModeStencilRefLessBackAMD() : ExecutionModeBase(ExecutionMode::StencilRefLessBackAMD) {} + ~ExecutionModeStencilRefLessBackAMD() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StencilRefLessBackAMD; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeQuadDerivativesKHR : ExecutionModeBase +{ + ExecutionModeQuadDerivativesKHR() : ExecutionModeBase(ExecutionMode::QuadDerivativesKHR) {} + ~ExecutionModeQuadDerivativesKHR() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::QuadDerivativesKHR; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeRequireFullQuadsKHR : ExecutionModeBase +{ + ExecutionModeRequireFullQuadsKHR() : ExecutionModeBase(ExecutionMode::RequireFullQuadsKHR) {} + ~ExecutionModeRequireFullQuadsKHR() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::RequireFullQuadsKHR; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeOutputLinesEXT : ExecutionModeBase +{ + ExecutionModeOutputLinesEXT() : ExecutionModeBase(ExecutionMode::OutputLinesEXT) {} + ~ExecutionModeOutputLinesEXT() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::OutputLinesEXT; + } + template + void visitRefs(T) + {} +}; struct ExecutionModeOutputLinesNV : ExecutionModeBase { ExecutionModeOutputLinesNV() : ExecutionModeBase(ExecutionMode::OutputLinesNV) {} @@ -38942,6 +44265,24 @@ struct ExecutionModeOutputLinesNV : ExecutionModeBase void visitRefs(T) {} }; +struct ExecutionModeOutputPrimitivesEXT : ExecutionModeBase +{ + LiteralInteger primitiveCount; + ExecutionModeOutputPrimitivesEXT() : ExecutionModeBase(ExecutionMode::OutputPrimitivesEXT) {} + ~ExecutionModeOutputPrimitivesEXT() = default; + ExecutionModeOutputPrimitivesEXT(LiteralInteger primitive_count) : ExecutionModeBase(ExecutionMode::OutputPrimitivesEXT) + { + primitiveCount = primitive_count; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::OutputPrimitivesEXT; + } + template + void visitRefs(T) + {} +}; struct ExecutionModeOutputPrimitivesNV : ExecutionModeBase { LiteralInteger primitiveCount; @@ -38986,6 +44327,19 @@ struct ExecutionModeDerivativeGroupLinearNV : ExecutionModeBase void visitRefs(T) {} }; +struct ExecutionModeOutputTrianglesEXT : ExecutionModeBase +{ + ExecutionModeOutputTrianglesEXT() : ExecutionModeBase(ExecutionMode::OutputTrianglesEXT) {} + ~ExecutionModeOutputTrianglesEXT() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::OutputTrianglesEXT; + } + template + void visitRefs(T) + {} +}; struct ExecutionModeOutputTrianglesNV : ExecutionModeBase { ExecutionModeOutputTrianglesNV() : ExecutionModeBase(ExecutionMode::OutputTrianglesNV) {} @@ -39257,6 +44611,156 @@ struct ExecutionModeSchedulerTargetFmaxMhzINTEL : ExecutionModeBase void visitRefs(T) {} }; +struct ExecutionModeMaximallyReconvergesKHR : ExecutionModeBase +{ + ExecutionModeMaximallyReconvergesKHR() : ExecutionModeBase(ExecutionMode::MaximallyReconvergesKHR) {} + ~ExecutionModeMaximallyReconvergesKHR() = default; + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::MaximallyReconvergesKHR; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeFPFastMathDefault : ExecutionModeBase +{ + NodePointer targetType; + NodePointer fastMathMode; + ExecutionModeFPFastMathDefault() : ExecutionModeBase(ExecutionMode::FPFastMathDefault) {} + ~ExecutionModeFPFastMathDefault() = default; + ExecutionModeFPFastMathDefault(NodePointer target_type, NodePointer fast_math_mode) : + ExecutionModeBase(ExecutionMode::FPFastMathDefault) + { + targetType = target_type; + fastMathMode = fast_math_mode; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::FPFastMathDefault; + } + template + void visitRefs(T visitor) + { + visitor(targetType); + visitor(fastMathMode); + } +}; +struct ExecutionModeStreamingInterfaceINTEL : ExecutionModeBase +{ + LiteralInteger stallFreeReturn; + ExecutionModeStreamingInterfaceINTEL() : ExecutionModeBase(ExecutionMode::StreamingInterfaceINTEL) {} + ~ExecutionModeStreamingInterfaceINTEL() = default; + ExecutionModeStreamingInterfaceINTEL(LiteralInteger stall_free_return) : ExecutionModeBase(ExecutionMode::StreamingInterfaceINTEL) + { + stallFreeReturn = stall_free_return; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::StreamingInterfaceINTEL; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeRegisterMapInterfaceINTEL : ExecutionModeBase +{ + LiteralInteger waitForDoneWrite; + ExecutionModeRegisterMapInterfaceINTEL() : ExecutionModeBase(ExecutionMode::RegisterMapInterfaceINTEL) {} + ~ExecutionModeRegisterMapInterfaceINTEL() = default; + ExecutionModeRegisterMapInterfaceINTEL(LiteralInteger wait_for_done_write) : + ExecutionModeBase(ExecutionMode::RegisterMapInterfaceINTEL) + { + waitForDoneWrite = wait_for_done_write; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::RegisterMapInterfaceINTEL; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeNamedBarrierCountINTEL : ExecutionModeBase +{ + LiteralInteger barrierCount; + ExecutionModeNamedBarrierCountINTEL() : ExecutionModeBase(ExecutionMode::NamedBarrierCountINTEL) {} + ~ExecutionModeNamedBarrierCountINTEL() = default; + ExecutionModeNamedBarrierCountINTEL(LiteralInteger barrier_count) : ExecutionModeBase(ExecutionMode::NamedBarrierCountINTEL) + { + barrierCount = barrier_count; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::NamedBarrierCountINTEL; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeMaximumRegistersINTEL : ExecutionModeBase +{ + LiteralInteger numberOfRegisters; + ExecutionModeMaximumRegistersINTEL() : ExecutionModeBase(ExecutionMode::MaximumRegistersINTEL) {} + ~ExecutionModeMaximumRegistersINTEL() = default; + ExecutionModeMaximumRegistersINTEL(LiteralInteger number_of_registers) : ExecutionModeBase(ExecutionMode::MaximumRegistersINTEL) + { + numberOfRegisters = number_of_registers; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::MaximumRegistersINTEL; + } + template + void visitRefs(T) + {} +}; +struct ExecutionModeMaximumRegistersIdINTEL : ExecutionModeBase +{ + NodePointer numberOfRegisters; + ExecutionModeMaximumRegistersIdINTEL() : ExecutionModeBase(ExecutionMode::MaximumRegistersIdINTEL) {} + ~ExecutionModeMaximumRegistersIdINTEL() = default; + ExecutionModeMaximumRegistersIdINTEL(NodePointer number_of_registers) : + ExecutionModeBase(ExecutionMode::MaximumRegistersIdINTEL) + { + numberOfRegisters = number_of_registers; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::MaximumRegistersIdINTEL; + } + template + void visitRefs(T visitor) + { + visitor(numberOfRegisters); + } +}; +struct ExecutionModeNamedMaximumRegistersINTEL : ExecutionModeBase +{ + NamedMaximumNumberOfRegisters namedMaximumNumberOfRegisters; + ExecutionModeNamedMaximumRegistersINTEL() : ExecutionModeBase(ExecutionMode::NamedMaximumRegistersINTEL) {} + ~ExecutionModeNamedMaximumRegistersINTEL() = default; + ExecutionModeNamedMaximumRegistersINTEL(NamedMaximumNumberOfRegisters named_maximum_number_of_registers) : + ExecutionModeBase(ExecutionMode::NamedMaximumRegistersINTEL) + { + namedMaximumNumberOfRegisters = named_maximum_number_of_registers; + } + template + static constexpr bool is(const T *v) + { + return v->mode == ExecutionMode::NamedMaximumRegistersINTEL; + } + template + void visitRefs(T) + {} +}; template void executionModeVisitor(T *t, U u) { @@ -39300,6 +44804,15 @@ void executionModeVisitor(T *t, U u) case ExecutionMode::SubgroupsPerWorkgroupId: u(reinterpret_cast(t)); break; case ExecutionMode::LocalSizeId: u(reinterpret_cast(t)); break; case ExecutionMode::LocalSizeHintId: u(reinterpret_cast(t)); break; + case ExecutionMode::NonCoherentColorAttachmentReadEXT: + u(reinterpret_cast(t)); + break; + case ExecutionMode::NonCoherentDepthAttachmentReadEXT: + u(reinterpret_cast(t)); + break; + case ExecutionMode::NonCoherentStencilAttachmentReadEXT: + u(reinterpret_cast(t)); + break; case ExecutionMode::SubgroupUniformControlFlowKHR: u(reinterpret_cast(t)); break; case ExecutionMode::PostDepthCoverage: u(reinterpret_cast(t)); break; case ExecutionMode::DenormPreserve: u(reinterpret_cast(t)); break; @@ -39307,30 +44820,25 @@ void executionModeVisitor(T *t, U u) case ExecutionMode::SignedZeroInfNanPreserve: u(reinterpret_cast(t)); break; case ExecutionMode::RoundingModeRTE: u(reinterpret_cast(t)); break; case ExecutionMode::RoundingModeRTZ: u(reinterpret_cast(t)); break; + case ExecutionMode::EarlyAndLateFragmentTestsAMD: u(reinterpret_cast(t)); break; case ExecutionMode::StencilRefReplacingEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::OutputLinesNV: u(reinterpret_cast(t)); break; - case ExecutionMode::OutputPrimitivesNV: u(reinterpret_cast(t)); break; - case ExecutionMode::DerivativeGroupQuadsNV: u(reinterpret_cast(t)); break; - case ExecutionMode::DerivativeGroupLinearNV: u(reinterpret_cast(t)); break; - case ExecutionMode::OutputTrianglesNV: u(reinterpret_cast(t)); break; - case ExecutionMode::PixelInterlockOrderedEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::PixelInterlockUnorderedEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::SampleInterlockOrderedEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::SampleInterlockUnorderedEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::ShadingRateInterlockOrderedEXT: u(reinterpret_cast(t)); break; - case ExecutionMode::ShadingRateInterlockUnorderedEXT: - u(reinterpret_cast(t)); + case ExecutionMode::CoalescingAMDX: u(reinterpret_cast(t)); break; + case ExecutionMode::MaxNodeRecursionAMDX: u(reinterpret_cast(t)); break; + case ExecutionMode::StaticNumWorkgroupsAMDX: u(reinterpret_cast(t)); break; + case ExecutionMode::ShaderIndexAMDX: u(reinterpret_cast(t)); break; + case ExecutionMode::MaxNumWorkgroupsAMDX: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefUnchangedFrontAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefGreaterFrontAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefLessFrontAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefUnchangedBackAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefGreaterBackAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::StencilRefLessBackAMD: u(reinterpret_cast(t)); break; + case ExecutionMode::QuadDerivativesKHR: u(reinterpret_cast(t)); break; + case ExecutionMode::RequireFullQuadsKHR: u(reinterpret_cast(t)); break; + case ExecutionMode::OutputLinesEXT: + u(reinterpret_cast(t)); break; - case ExecutionMode::SharedLocalMemorySizeINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::RoundingModeRTPINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::RoundingModeRTNINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::FloatingPointModeALTINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::FloatingPointModeIEEEINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::MaxWorkgroupSizeINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::MaxWorkDimINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::NoGlobalOffsetINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::NumSIMDWorkitemsINTEL: u(reinterpret_cast(t)); break; - case ExecutionMode::SchedulerTargetFmaxMhzINTEL: u(reinterpret_cast(t)); break; + // duplicated OutputLinesNV = 5269 } }; } // namespace spirv diff --git a/prog/gameLibs/spirv/module_reader.cpp b/prog/gameLibs/spirv/module_reader.cpp index fedbfdb91..c5ad1ebe6 100644 --- a/prog/gameLibs/spirv/module_reader.cpp +++ b/prog/gameLibs/spirv/module_reader.cpp @@ -1,3 +1,5 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + // auto generated, do not modify! #include "module_nodes.h" #include @@ -292,6 +294,9 @@ struct ReaderContext info.mode = emode; }; break; + case ExecutionMode::NonCoherentColorAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentColorAttachmentReadEXT; break; + case ExecutionMode::NonCoherentDepthAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentDepthAttachmentReadEXT; break; + case ExecutionMode::NonCoherentStencilAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentStencilAttachmentReadEXT; break; case ExecutionMode::SubgroupUniformControlFlowKHR: info.mode = new ExecutionModeSubgroupUniformControlFlowKHR; break; case ExecutionMode::PostDepthCoverage: info.mode = new ExecutionModePostDepthCoverage; break; case ExecutionMode::DenormPreserve: info.mode = new ExecutionModeDenormPreserve(mode.data.DenormPreserve.targetWidth); break; @@ -303,14 +308,79 @@ struct ReaderContext break; case ExecutionMode::RoundingModeRTE: info.mode = new ExecutionModeRoundingModeRTE(mode.data.RoundingModeRTE.targetWidth); break; case ExecutionMode::RoundingModeRTZ: info.mode = new ExecutionModeRoundingModeRTZ(mode.data.RoundingModeRTZ.targetWidth); break; + case ExecutionMode::EarlyAndLateFragmentTestsAMD: info.mode = new ExecutionModeEarlyAndLateFragmentTestsAMD; break; case ExecutionMode::StencilRefReplacingEXT: info.mode = new ExecutionModeStencilRefReplacingEXT; break; - case ExecutionMode::OutputLinesNV: info.mode = new ExecutionModeOutputLinesNV; break; - case ExecutionMode::OutputPrimitivesNV: - info.mode = new ExecutionModeOutputPrimitivesNV(mode.data.OutputPrimitivesNV.primitiveCount); - break; + case ExecutionMode::CoalescingAMDX: info.mode = new ExecutionModeCoalescingAMDX; break; + case ExecutionMode::MaxNodeRecursionAMDX: + { + auto emode = new ExecutionModeMaxNodeRecursionAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->numberOfRecursions; + refInfo.ref = mode.data.MaxNodeRecursionAMDX.numberOfRecursions; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StaticNumWorkgroupsAMDX: + { + auto emode = new ExecutionModeStaticNumWorkgroupsAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->xSize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.xSize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->ySize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.ySize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->zSize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.zSize; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::ShaderIndexAMDX: + { + auto emode = new ExecutionModeShaderIndexAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->shaderIndex; + refInfo.ref = mode.data.ShaderIndexAMDX.shaderIndex; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::MaxNumWorkgroupsAMDX: + { + auto emode = new ExecutionModeMaxNumWorkgroupsAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->xSize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.xSize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->ySize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.ySize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->zSize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.zSize; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StencilRefUnchangedFrontAMD: info.mode = new ExecutionModeStencilRefUnchangedFrontAMD; break; + case ExecutionMode::StencilRefGreaterFrontAMD: info.mode = new ExecutionModeStencilRefGreaterFrontAMD; break; + case ExecutionMode::StencilRefLessFrontAMD: info.mode = new ExecutionModeStencilRefLessFrontAMD; break; + case ExecutionMode::StencilRefUnchangedBackAMD: info.mode = new ExecutionModeStencilRefUnchangedBackAMD; break; + case ExecutionMode::StencilRefGreaterBackAMD: info.mode = new ExecutionModeStencilRefGreaterBackAMD; break; + case ExecutionMode::StencilRefLessBackAMD: info.mode = new ExecutionModeStencilRefLessBackAMD; break; + case ExecutionMode::QuadDerivativesKHR: info.mode = new ExecutionModeQuadDerivativesKHR; break; + case ExecutionMode::RequireFullQuadsKHR: info.mode = new ExecutionModeRequireFullQuadsKHR; break; + case ExecutionMode::OutputLinesEXT: info.mode = new ExecutionModeOutputLinesEXT; break; + // duplicated OutputLinesNV = 5269 + case ExecutionMode::OutputPrimitivesEXT: + info.mode = new ExecutionModeOutputPrimitivesEXT(mode.data.OutputPrimitivesEXT.primitiveCount); + break; + // duplicated OutputPrimitivesNV = 5270 case ExecutionMode::DerivativeGroupQuadsNV: info.mode = new ExecutionModeDerivativeGroupQuadsNV; break; case ExecutionMode::DerivativeGroupLinearNV: info.mode = new ExecutionModeDerivativeGroupLinearNV; break; - case ExecutionMode::OutputTrianglesNV: info.mode = new ExecutionModeOutputTrianglesNV; break; + case ExecutionMode::OutputTrianglesEXT: info.mode = new ExecutionModeOutputTrianglesEXT; break; + // duplicated OutputTrianglesNV = 5298 case ExecutionMode::PixelInterlockOrderedEXT: info.mode = new ExecutionModePixelInterlockOrderedEXT; break; case ExecutionMode::PixelInterlockUnorderedEXT: info.mode = new ExecutionModePixelInterlockUnorderedEXT; break; case ExecutionMode::SampleInterlockOrderedEXT: info.mode = new ExecutionModeSampleInterlockOrderedEXT; break; @@ -346,6 +416,45 @@ struct ReaderContext case ExecutionMode::SchedulerTargetFmaxMhzINTEL: info.mode = new ExecutionModeSchedulerTargetFmaxMhzINTEL(mode.data.SchedulerTargetFmaxMhzINTEL.target_fmax); break; + case ExecutionMode::MaximallyReconvergesKHR: info.mode = new ExecutionModeMaximallyReconvergesKHR; break; + case ExecutionMode::FPFastMathDefault: + { + auto emode = new ExecutionModeFPFastMathDefault; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->targetType; + refInfo.ref = mode.data.FPFastMathDefault.targetType; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->fastMathMode; + refInfo.ref = mode.data.FPFastMathDefault.fastMathMode; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StreamingInterfaceINTEL: + info.mode = new ExecutionModeStreamingInterfaceINTEL(mode.data.StreamingInterfaceINTEL.stallFreeReturn); + break; + case ExecutionMode::RegisterMapInterfaceINTEL: + info.mode = new ExecutionModeRegisterMapInterfaceINTEL(mode.data.RegisterMapInterfaceINTEL.waitForDoneWrite); + break; + case ExecutionMode::NamedBarrierCountINTEL: + info.mode = new ExecutionModeNamedBarrierCountINTEL(mode.data.NamedBarrierCountINTEL.barrierCount); + break; + case ExecutionMode::MaximumRegistersINTEL: + info.mode = new ExecutionModeMaximumRegistersINTEL(mode.data.MaximumRegistersINTEL.numberOfRegisters); + break; + case ExecutionMode::MaximumRegistersIdINTEL: + { + auto emode = new ExecutionModeMaximumRegistersIdINTEL; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->numberOfRegisters; + refInfo.ref = mode.data.MaximumRegistersIdINTEL.numberOfRegisters; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::NamedMaximumRegistersINTEL: + info.mode = new ExecutionModeNamedMaximumRegistersINTEL(mode.data.NamedMaximumRegistersINTEL.namedMaximumNumberOfRegisters); + break; } executionModes.push_back(eastl::move(info)); } @@ -1329,6 +1438,8 @@ struct ReaderContext NodePointer memory_access_MakePointerAvailableKHR_first; NodePointer memory_access_MakePointerVisible_first; NodePointer memory_access_MakePointerVisibleKHR_first; + NodePointer memory_access_AliasScopeINTELMask_first; + NodePointer memory_access_NoAliasINTELMask_first; if (memory_access.valid) { memory_accessVal = memory_access.value.value; @@ -1356,10 +1467,21 @@ struct ReaderContext memory_access_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.NoAliasINTELMask.first)); + } } auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(pointer), memory_accessVal, memory_access_Aligned_first, memory_access_MakePointerAvailable_first, - memory_access_MakePointerAvailableKHR_first, memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first); + memory_access_MakePointerAvailableKHR_first, memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first, + memory_access_AliasScopeINTELMask_first, memory_access_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -1371,6 +1493,8 @@ struct ReaderContext NodePointer memory_access_MakePointerAvailableKHR_first; NodePointer memory_access_MakePointerVisible_first; NodePointer memory_access_MakePointerVisibleKHR_first; + NodePointer memory_access_AliasScopeINTELMask_first; + NodePointer memory_access_NoAliasINTELMask_first; if (memory_access.valid) { memory_accessVal = memory_access.value.value; @@ -1398,10 +1522,21 @@ struct ReaderContext memory_access_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.NoAliasINTELMask.first)); + } } auto node = moduleBuilder.newNode(moduleBuilder.getNode(pointer), moduleBuilder.getNode(object), memory_accessVal, memory_access_Aligned_first, memory_access_MakePointerAvailable_first, memory_access_MakePointerAvailableKHR_first, - memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first); + memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first, memory_access_AliasScopeINTELMask_first, + memory_access_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -1414,6 +1549,8 @@ struct ReaderContext NodePointer memory_access0_MakePointerAvailableKHR_first; NodePointer memory_access0_MakePointerVisible_first; NodePointer memory_access0_MakePointerVisibleKHR_first; + NodePointer memory_access0_AliasScopeINTELMask_first; + NodePointer memory_access0_NoAliasINTELMask_first; if (memory_access0.valid) { memory_access0Val = memory_access0.value.value; @@ -1441,6 +1578,16 @@ struct ReaderContext memory_access0_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access0.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access0.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access0_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access0.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access0.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access0_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access0.value.data.NoAliasINTELMask.first)); + } } eastl::optional memory_access1Val; eastl::optional memory_access1_Aligned_first; @@ -1448,6 +1595,8 @@ struct ReaderContext NodePointer memory_access1_MakePointerAvailableKHR_first; NodePointer memory_access1_MakePointerVisible_first; NodePointer memory_access1_MakePointerVisibleKHR_first; + NodePointer memory_access1_AliasScopeINTELMask_first; + NodePointer memory_access1_NoAliasINTELMask_first; if (memory_access1.valid) { memory_access1Val = memory_access1.value.value; @@ -1475,13 +1624,24 @@ struct ReaderContext memory_access1_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access1.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access1.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access1_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access1.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access1.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access1_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access1.value.data.NoAliasINTELMask.first)); + } } - auto node = - moduleBuilder.newNode(moduleBuilder.getNode(target), moduleBuilder.getNode(source), memory_access0Val, - memory_access0_Aligned_first, memory_access0_MakePointerAvailable_first, memory_access0_MakePointerAvailableKHR_first, - memory_access0_MakePointerVisible_first, memory_access0_MakePointerVisibleKHR_first, memory_access1Val, - memory_access1_Aligned_first, memory_access1_MakePointerAvailable_first, memory_access1_MakePointerAvailableKHR_first, - memory_access1_MakePointerVisible_first, memory_access1_MakePointerVisibleKHR_first); + auto node = moduleBuilder.newNode(moduleBuilder.getNode(target), moduleBuilder.getNode(source), + memory_access0Val, memory_access0_Aligned_first, memory_access0_MakePointerAvailable_first, + memory_access0_MakePointerAvailableKHR_first, memory_access0_MakePointerVisible_first, + memory_access0_MakePointerVisibleKHR_first, memory_access0_AliasScopeINTELMask_first, memory_access0_NoAliasINTELMask_first, + memory_access1Val, memory_access1_Aligned_first, memory_access1_MakePointerAvailable_first, + memory_access1_MakePointerAvailableKHR_first, memory_access1_MakePointerVisible_first, + memory_access1_MakePointerVisibleKHR_first, memory_access1_AliasScopeINTELMask_first, memory_access1_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -1494,6 +1654,8 @@ struct ReaderContext NodePointer memory_access0_MakePointerAvailableKHR_first; NodePointer memory_access0_MakePointerVisible_first; NodePointer memory_access0_MakePointerVisibleKHR_first; + NodePointer memory_access0_AliasScopeINTELMask_first; + NodePointer memory_access0_NoAliasINTELMask_first; if (memory_access0.valid) { memory_access0Val = memory_access0.value.value; @@ -1521,6 +1683,16 @@ struct ReaderContext memory_access0_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access0.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access0.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access0_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access0.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access0.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access0_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access0.value.data.NoAliasINTELMask.first)); + } } eastl::optional memory_access1Val; eastl::optional memory_access1_Aligned_first; @@ -1528,6 +1700,8 @@ struct ReaderContext NodePointer memory_access1_MakePointerAvailableKHR_first; NodePointer memory_access1_MakePointerVisible_first; NodePointer memory_access1_MakePointerVisibleKHR_first; + NodePointer memory_access1_AliasScopeINTELMask_first; + NodePointer memory_access1_NoAliasINTELMask_first; if (memory_access1.valid) { memory_access1Val = memory_access1.value.value; @@ -1555,13 +1729,24 @@ struct ReaderContext memory_access1_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access1.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access1.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access1_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access1.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access1.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access1_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access1.value.data.NoAliasINTELMask.first)); + } } auto node = moduleBuilder.newNode(moduleBuilder.getNode(target), moduleBuilder.getNode(source), moduleBuilder.getNode(size), memory_access0Val, memory_access0_Aligned_first, memory_access0_MakePointerAvailable_first, memory_access0_MakePointerAvailableKHR_first, memory_access0_MakePointerVisible_first, - memory_access0_MakePointerVisibleKHR_first, memory_access1Val, memory_access1_Aligned_first, - memory_access1_MakePointerAvailable_first, memory_access1_MakePointerAvailableKHR_first, memory_access1_MakePointerVisible_first, - memory_access1_MakePointerVisibleKHR_first); + memory_access0_MakePointerVisibleKHR_first, memory_access0_AliasScopeINTELMask_first, memory_access0_NoAliasINTELMask_first, + memory_access1Val, memory_access1_Aligned_first, memory_access1_MakePointerAvailable_first, + memory_access1_MakePointerAvailableKHR_first, memory_access1_MakePointerVisible_first, + memory_access1_MakePointerVisibleKHR_first, memory_access1_AliasScopeINTELMask_first, memory_access1_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -1962,12 +2147,63 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; propPtr.reset(newProp); break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -1993,9 +2229,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); break; } @@ -2035,6 +2271,12 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -2237,6 +2479,26 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -2275,6 +2537,55 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } case Decoration::BufferLocationINTEL: { auto newProp = new PropertyBufferLocationINTEL; @@ -2315,6 +2626,133 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; + propPtr.reset(newProp); + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; + break; + } + case Decoration::MMHostInterfaceLatencyINTEL: + { + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; + propPtr.reset(newProp); + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; + break; + } + case Decoration::MMHostInterfaceReadWriteModeINTEL: + { + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; + propPtr.reset(newProp); + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; + break; + } + case Decoration::MMHostInterfaceMaxBurstINTEL: + { + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; + propPtr.reset(newProp); + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; + break; + } + case Decoration::MMHostInterfaceWaitRequestINTEL: + { + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; + propPtr.reset(newProp); + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; + break; + } + case Decoration::StableKernelArgumentINTEL: + { + auto newProp = new PropertyStableKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::HostAccessINTEL: + { + auto newProp = new PropertyHostAccessINTEL; + propPtr.reset(newProp); + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); + break; + } + case Decoration::InitModeINTEL: + { + auto newProp = new PropertyInitModeINTEL; + propPtr.reset(newProp); + newProp->trigger = decoration.data.InitModeINTEL.trigger; + break; + } + case Decoration::ImplementInRegisterMapINTEL: + { + auto newProp = new PropertyImplementInRegisterMapINTEL; + propPtr.reset(newProp); + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; + break; + } + case Decoration::CacheControlLoadINTEL: + { + auto newProp = new PropertyCacheControlLoadINTEL; + propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; + break; + } + case Decoration::CacheControlStoreINTEL: + { + auto newProp = new PropertyCacheControlStoreINTEL; + propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; + break; + } } PropertyTargetResolveInfo targetResolve // {target, eastl::move(propPtr)}; @@ -2699,73 +3137,131 @@ struct ReaderContext newProp->memberIndex = member.value; break; } - case Decoration::ExplicitInterpAMD: + case Decoration::WeightTextureQCOM: { - auto newProp = new PropertyExplicitInterpAMD; + auto newProp = new PropertyWeightTextureQCOM; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::OverrideCoverageNV: + case Decoration::BlockMatchTextureQCOM: { - auto newProp = new PropertyOverrideCoverageNV; + auto newProp = new PropertyBlockMatchTextureQCOM; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::PassthroughNV: + case Decoration::BlockMatchSamplerQCOM: { - auto newProp = new PropertyPassthroughNV; + auto newProp = new PropertyBlockMatchSamplerQCOM; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::ViewportRelativeNV: + case Decoration::ExplicitInterpAMD: { - auto newProp = new PropertyViewportRelativeNV; + auto newProp = new PropertyExplicitInterpAMD; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::SecondaryViewportRelativeNV: + case Decoration::NodeSharesPayloadLimitsWithAMDX: { - auto newProp = new PropertySecondaryViewportRelativeNV; + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; propPtr.reset(newProp); newProp->memberIndex = member.value; - newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); break; } - case Decoration::PerPrimitiveNV: + case Decoration::NodeMaxPayloadsAMDX: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyNodeMaxPayloadsAMDX; propPtr.reset(newProp); newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); break; } - case Decoration::PerViewNV: + case Decoration::TrackFinishWritingAMDX: { - auto newProp = new PropertyPerViewNV; + auto newProp = new PropertyTrackFinishWritingAMDX; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::PerTaskNV: + case Decoration::PayloadNodeNameAMDX: { - auto newProp = new PropertyPerTaskNV; + auto newProp = new PropertyPayloadNodeNameAMDX; propPtr.reset(newProp); newProp->memberIndex = member.value; + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); break; } - case Decoration::PerVertexKHR: + case Decoration::OverrideCoverageNV: { - auto newProp = new PropertyPerVertexKHR; + auto newProp = new PropertyOverrideCoverageNV; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::NonUniform: + case Decoration::PassthroughNV: { - auto newProp = new PropertyNonUniform; + auto newProp = new PropertyPassthroughNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::ViewportRelativeNV: + { + auto newProp = new PropertyViewportRelativeNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::SecondaryViewportRelativeNV: + { + auto newProp = new PropertySecondaryViewportRelativeNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; + break; + } + case Decoration::PerPrimitiveEXT: + { + auto newProp = new PropertyPerPrimitiveEXT; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::PerViewNV: + { + auto newProp = new PropertyPerViewNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::PerTaskNV: + { + auto newProp = new PropertyPerTaskNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::PerVertexKHR: + { + auto newProp = new PropertyPerVertexKHR; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::NonUniform: + { + auto newProp = new PropertyNonUniform; propPtr.reset(newProp); newProp->memberIndex = member.value; break; @@ -2784,6 +3280,13 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -3016,6 +3519,29 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -3060,6 +3586,61 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } case Decoration::BufferLocationINTEL: { auto newProp = new PropertyBufferLocationINTEL; @@ -3106,6 +3687,151 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; + break; + } + case Decoration::MMHostInterfaceLatencyINTEL: + { + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; + break; + } + case Decoration::MMHostInterfaceReadWriteModeINTEL: + { + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; + break; + } + case Decoration::MMHostInterfaceMaxBurstINTEL: + { + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; + break; + } + case Decoration::MMHostInterfaceWaitRequestINTEL: + { + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; + break; + } + case Decoration::StableKernelArgumentINTEL: + { + auto newProp = new PropertyStableKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::HostAccessINTEL: + { + auto newProp = new PropertyHostAccessINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); + break; + } + case Decoration::InitModeINTEL: + { + auto newProp = new PropertyInitModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->trigger = decoration.data.InitModeINTEL.trigger; + break; + } + case Decoration::ImplementInRegisterMapINTEL: + { + auto newProp = new PropertyImplementInRegisterMapINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; + break; + } + case Decoration::CacheControlLoadINTEL: + { + auto newProp = new PropertyCacheControlLoadINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; + break; + } + case Decoration::CacheControlStoreINTEL: + { + auto newProp = new PropertyCacheControlStoreINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; + break; + } } PropertyTargetResolveInfo targetResolve // {structure_type, eastl::move(propPtr)}; @@ -3176,6 +3902,37 @@ struct ReaderContext } } } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->payloadArray)}; + auto cmp = + reinterpret_cast *>(&as(prop.property)->payloadArray); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->maxNumberOfPayloads)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->maxNumberOfPayloads); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } else if (is(newProp)) { PropertyReferenceResolveInfo refResolve // @@ -3206,6 +3963,36 @@ struct ReaderContext } } } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->aliasingScopesList)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->aliasingScopesList); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->aliasingScopesList)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->aliasingScopesList); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } targetsToAdd.push_back(eastl::move(targetResolve)); } } @@ -3273,11 +4060,12 @@ struct ReaderContext } } } - else if (is(newProp)) + else if (is(newProp)) { PropertyReferenceResolveInfo refResolve // - {reinterpret_cast *>(&as(newProp)->counterBuffer)}; - auto cmp = reinterpret_cast *>(&as(prop.property)->counterBuffer); + {reinterpret_cast *>(&as(newProp)->payloadArray)}; + auto cmp = + reinterpret_cast *>(&as(prop.property)->payloadArray); for (auto &&ref : propertyReferenceResolves) { if (ref.target == cmp) @@ -3288,11 +4076,11 @@ struct ReaderContext } } } - else if (is(newProp)) + else if (is(newProp)) { PropertyReferenceResolveInfo refResolve // - {reinterpret_cast *>(&as(newProp)->counterBuffer)}; - auto cmp = reinterpret_cast *>(&as(prop.property)->counterBuffer); + {reinterpret_cast *>(&as(newProp)->maxNumberOfPayloads)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->maxNumberOfPayloads); for (auto &&ref : propertyReferenceResolves) { if (ref.target == cmp) @@ -3303,16 +4091,76 @@ struct ReaderContext } } } - targetsToAdd.push_back(eastl::move(targetResolve)); - } - } - } - propertyReferenceResolves.insert(propertyReferenceResolves.end(), refsToAdd.begin(), refsToAdd.end()); - for (auto &&ta : targetsToAdd) - propertyTargetResolves.push_back(eastl::move(ta)); - } - void onVectorExtractDynamic(Op, IdResult id_result, IdResultType id_result_type, IdRef vector, IdRef index) - { + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->counterBuffer)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->counterBuffer); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->counterBuffer)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->counterBuffer); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->aliasingScopesList)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->aliasingScopesList); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + else if (is(newProp)) + { + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&as(newProp)->aliasingScopesList)}; + auto cmp = reinterpret_cast *>(&as(prop.property)->aliasingScopesList); + for (auto &&ref : propertyReferenceResolves) + { + if (ref.target == cmp) + { + refResolve.ref = ref.ref; + refsToAdd.push_back(refResolve); + break; + } + } + } + targetsToAdd.push_back(eastl::move(targetResolve)); + } + } + } + propertyReferenceResolves.insert(propertyReferenceResolves.end(), refsToAdd.begin(), refsToAdd.end()); + for (auto &&ta : targetsToAdd) + propertyTargetResolves.push_back(eastl::move(ta)); + } + void onVectorExtractDynamic(Op, IdResult id_result, IdResultType id_result_type, IdRef vector, IdRef index) + { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(vector), moduleBuilder.getNode(index)); if (currentBlock) @@ -7140,6 +7988,9 @@ struct ReaderContext info.mode = emode; }; break; + case ExecutionMode::NonCoherentColorAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentColorAttachmentReadEXT; break; + case ExecutionMode::NonCoherentDepthAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentDepthAttachmentReadEXT; break; + case ExecutionMode::NonCoherentStencilAttachmentReadEXT: info.mode = new ExecutionModeNonCoherentStencilAttachmentReadEXT; break; case ExecutionMode::SubgroupUniformControlFlowKHR: info.mode = new ExecutionModeSubgroupUniformControlFlowKHR; break; case ExecutionMode::PostDepthCoverage: info.mode = new ExecutionModePostDepthCoverage; break; case ExecutionMode::DenormPreserve: info.mode = new ExecutionModeDenormPreserve(mode.data.DenormPreserve.targetWidth); break; @@ -7151,14 +8002,79 @@ struct ReaderContext break; case ExecutionMode::RoundingModeRTE: info.mode = new ExecutionModeRoundingModeRTE(mode.data.RoundingModeRTE.targetWidth); break; case ExecutionMode::RoundingModeRTZ: info.mode = new ExecutionModeRoundingModeRTZ(mode.data.RoundingModeRTZ.targetWidth); break; + case ExecutionMode::EarlyAndLateFragmentTestsAMD: info.mode = new ExecutionModeEarlyAndLateFragmentTestsAMD; break; case ExecutionMode::StencilRefReplacingEXT: info.mode = new ExecutionModeStencilRefReplacingEXT; break; - case ExecutionMode::OutputLinesNV: info.mode = new ExecutionModeOutputLinesNV; break; - case ExecutionMode::OutputPrimitivesNV: - info.mode = new ExecutionModeOutputPrimitivesNV(mode.data.OutputPrimitivesNV.primitiveCount); - break; + case ExecutionMode::CoalescingAMDX: info.mode = new ExecutionModeCoalescingAMDX; break; + case ExecutionMode::MaxNodeRecursionAMDX: + { + auto emode = new ExecutionModeMaxNodeRecursionAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->numberOfRecursions; + refInfo.ref = mode.data.MaxNodeRecursionAMDX.numberOfRecursions; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StaticNumWorkgroupsAMDX: + { + auto emode = new ExecutionModeStaticNumWorkgroupsAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->xSize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.xSize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->ySize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.ySize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->zSize; + refInfo.ref = mode.data.StaticNumWorkgroupsAMDX.zSize; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::ShaderIndexAMDX: + { + auto emode = new ExecutionModeShaderIndexAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->shaderIndex; + refInfo.ref = mode.data.ShaderIndexAMDX.shaderIndex; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::MaxNumWorkgroupsAMDX: + { + auto emode = new ExecutionModeMaxNumWorkgroupsAMDX; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->xSize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.xSize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->ySize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.ySize; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->zSize; + refInfo.ref = mode.data.MaxNumWorkgroupsAMDX.zSize; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StencilRefUnchangedFrontAMD: info.mode = new ExecutionModeStencilRefUnchangedFrontAMD; break; + case ExecutionMode::StencilRefGreaterFrontAMD: info.mode = new ExecutionModeStencilRefGreaterFrontAMD; break; + case ExecutionMode::StencilRefLessFrontAMD: info.mode = new ExecutionModeStencilRefLessFrontAMD; break; + case ExecutionMode::StencilRefUnchangedBackAMD: info.mode = new ExecutionModeStencilRefUnchangedBackAMD; break; + case ExecutionMode::StencilRefGreaterBackAMD: info.mode = new ExecutionModeStencilRefGreaterBackAMD; break; + case ExecutionMode::StencilRefLessBackAMD: info.mode = new ExecutionModeStencilRefLessBackAMD; break; + case ExecutionMode::QuadDerivativesKHR: info.mode = new ExecutionModeQuadDerivativesKHR; break; + case ExecutionMode::RequireFullQuadsKHR: info.mode = new ExecutionModeRequireFullQuadsKHR; break; + case ExecutionMode::OutputLinesEXT: info.mode = new ExecutionModeOutputLinesEXT; break; + // duplicated OutputLinesNV = 5269 + case ExecutionMode::OutputPrimitivesEXT: + info.mode = new ExecutionModeOutputPrimitivesEXT(mode.data.OutputPrimitivesEXT.primitiveCount); + break; + // duplicated OutputPrimitivesNV = 5270 case ExecutionMode::DerivativeGroupQuadsNV: info.mode = new ExecutionModeDerivativeGroupQuadsNV; break; case ExecutionMode::DerivativeGroupLinearNV: info.mode = new ExecutionModeDerivativeGroupLinearNV; break; - case ExecutionMode::OutputTrianglesNV: info.mode = new ExecutionModeOutputTrianglesNV; break; + case ExecutionMode::OutputTrianglesEXT: info.mode = new ExecutionModeOutputTrianglesEXT; break; + // duplicated OutputTrianglesNV = 5298 case ExecutionMode::PixelInterlockOrderedEXT: info.mode = new ExecutionModePixelInterlockOrderedEXT; break; case ExecutionMode::PixelInterlockUnorderedEXT: info.mode = new ExecutionModePixelInterlockUnorderedEXT; break; case ExecutionMode::SampleInterlockOrderedEXT: info.mode = new ExecutionModeSampleInterlockOrderedEXT; break; @@ -7194,6 +8110,45 @@ struct ReaderContext case ExecutionMode::SchedulerTargetFmaxMhzINTEL: info.mode = new ExecutionModeSchedulerTargetFmaxMhzINTEL(mode.data.SchedulerTargetFmaxMhzINTEL.target_fmax); break; + case ExecutionMode::MaximallyReconvergesKHR: info.mode = new ExecutionModeMaximallyReconvergesKHR; break; + case ExecutionMode::FPFastMathDefault: + { + auto emode = new ExecutionModeFPFastMathDefault; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->targetType; + refInfo.ref = mode.data.FPFastMathDefault.targetType; + propertyReferenceResolves.push_back(refInfo); + refInfo.target = &emode->fastMathMode; + refInfo.ref = mode.data.FPFastMathDefault.fastMathMode; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::StreamingInterfaceINTEL: + info.mode = new ExecutionModeStreamingInterfaceINTEL(mode.data.StreamingInterfaceINTEL.stallFreeReturn); + break; + case ExecutionMode::RegisterMapInterfaceINTEL: + info.mode = new ExecutionModeRegisterMapInterfaceINTEL(mode.data.RegisterMapInterfaceINTEL.waitForDoneWrite); + break; + case ExecutionMode::NamedBarrierCountINTEL: + info.mode = new ExecutionModeNamedBarrierCountINTEL(mode.data.NamedBarrierCountINTEL.barrierCount); + break; + case ExecutionMode::MaximumRegistersINTEL: + info.mode = new ExecutionModeMaximumRegistersINTEL(mode.data.MaximumRegistersINTEL.numberOfRegisters); + break; + case ExecutionMode::MaximumRegistersIdINTEL: + { + auto emode = new ExecutionModeMaximumRegistersIdINTEL; + PropertyReferenceResolveInfo refInfo; + refInfo.target = &emode->numberOfRegisters; + refInfo.ref = mode.data.MaximumRegistersIdINTEL.numberOfRegisters; + propertyReferenceResolves.push_back(refInfo); + info.mode = emode; + }; + break; + case ExecutionMode::NamedMaximumRegistersINTEL: + info.mode = new ExecutionModeNamedMaximumRegistersINTEL(mode.data.NamedMaximumRegistersINTEL.namedMaximumNumberOfRegisters); + break; } executionModes.push_back(eastl::move(info)); } @@ -7527,12 +8482,63 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; propPtr.reset(newProp); break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -7558,9 +8564,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); break; } @@ -7600,6 +8606,12 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -7802,6 +8814,26 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -7840,6 +8872,55 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } case Decoration::BufferLocationINTEL: { auto newProp = new PropertyBufferLocationINTEL; @@ -7880,69 +8961,196 @@ struct ReaderContext propPtr.reset(newProp); break; } - } - PropertyTargetResolveInfo targetResolve // - {target, eastl::move(propPtr)}; - propertyTargetResolves.push_back(eastl::move(targetResolve)); - } - void onGroupNonUniformElect(Op, IdResult id_result, IdResultType id_result_type, IdScope execution) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformAll(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformAny(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformAllEqual(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformBroadcast(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value, IdRef id) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(value), moduleBuilder.getNode(id)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformBroadcastFirst(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformBallot(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformInverseBallot(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) - { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - void onGroupNonUniformBallotBitExtract(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value, - IdRef index) + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; + propPtr.reset(newProp); + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; + break; + } + case Decoration::MMHostInterfaceLatencyINTEL: + { + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; + propPtr.reset(newProp); + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; + break; + } + case Decoration::MMHostInterfaceReadWriteModeINTEL: + { + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; + propPtr.reset(newProp); + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; + break; + } + case Decoration::MMHostInterfaceMaxBurstINTEL: + { + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; + propPtr.reset(newProp); + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; + break; + } + case Decoration::MMHostInterfaceWaitRequestINTEL: + { + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; + propPtr.reset(newProp); + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; + break; + } + case Decoration::StableKernelArgumentINTEL: + { + auto newProp = new PropertyStableKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::HostAccessINTEL: + { + auto newProp = new PropertyHostAccessINTEL; + propPtr.reset(newProp); + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); + break; + } + case Decoration::InitModeINTEL: + { + auto newProp = new PropertyInitModeINTEL; + propPtr.reset(newProp); + newProp->trigger = decoration.data.InitModeINTEL.trigger; + break; + } + case Decoration::ImplementInRegisterMapINTEL: + { + auto newProp = new PropertyImplementInRegisterMapINTEL; + propPtr.reset(newProp); + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; + break; + } + case Decoration::CacheControlLoadINTEL: + { + auto newProp = new PropertyCacheControlLoadINTEL; + propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; + break; + } + case Decoration::CacheControlStoreINTEL: + { + auto newProp = new PropertyCacheControlStoreINTEL; + propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; + break; + } + } + PropertyTargetResolveInfo targetResolve // + {target, eastl::move(propPtr)}; + propertyTargetResolves.push_back(eastl::move(targetResolve)); + } + void onGroupNonUniformElect(Op, IdResult id_result, IdResultType id_result_type, IdScope execution) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformAll(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformAny(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformAllEqual(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformBroadcast(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value, IdRef id) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(value), moduleBuilder.getNode(id)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformBroadcastFirst(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformBallot(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef predicate) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(predicate)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformInverseBallot(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformBallotBitExtract(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value, + IdRef index) { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(execution), moduleBuilder.getNode(value), moduleBuilder.getNode(index)); @@ -8249,6 +9457,41 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onColorAttachmentReadEXT(Op, IdResult id_result, IdResultType id_result_type, IdRef attachment, Optional sample) + { + eastl::optional> sampleOpt; + if (sample.valid) + { + sampleOpt = moduleBuilder.getNode(sample.value); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(attachment), sampleOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onDepthAttachmentReadEXT(Op, IdResult id_result, IdResultType id_result_type, Optional sample) + { + eastl::optional> sampleOpt; + if (sample.valid) + { + sampleOpt = moduleBuilder.getNode(sample.value); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), sampleOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onStencilAttachmentReadEXT(Op, IdResult id_result, IdResultType id_result_type, Optional sample) + { + eastl::optional> sampleOpt; + if (sample.valid) + { + sampleOpt = moduleBuilder.getNode(sample.value); + } + auto node = + moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), sampleOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onTerminateInvocation(Op) { auto node = moduleBuilder.newNode(); @@ -8290,6 +9533,19 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onGroupNonUniformRotateKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, IdRef value, IdRef delta, + Optional cluster_size) + { + eastl::optional> cluster_sizeOpt; + if (cluster_size.valid) + { + cluster_sizeOpt = moduleBuilder.getNode(cluster_size.value); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), moduleBuilder.getNode(value), moduleBuilder.getNode(delta), cluster_sizeOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onSubgroupReadInvocationKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef value, IdRef index) { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), @@ -8297,6 +9553,20 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onExtInstWithForwardRefsKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef set, LiteralExtInstInteger instruction, + Multiple param_4) + { + // FIXME: use vector directly in constructor + eastl::vector> param_4Var; + while (!param_4.empty()) + { + param_4Var.push_back(moduleBuilder.getNode(param_4.consume())); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(set), instruction, param_4Var.data(), param_4Var.size()); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onTraceRayKHR(Op, IdRef accel, IdRef ray_flags, IdRef cull_mask, IdRef s_b_t_offset, IdRef s_b_t_stride, IdRef miss_index, IdRef ray_origin, IdRef ray_tmin, IdRef ray_direction, IdRef ray_tmax, IdRef payload) { @@ -8489,6 +9759,174 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onTypeCooperativeMatrixKHR(Op, IdResult id_result, IdRef component_type, IdScope scope, IdRef rows, IdRef columns, IdRef use) + { + moduleBuilder.newNode(id_result.value, moduleBuilder.getNode(component_type), + moduleBuilder.getNode(scope), moduleBuilder.getNode(rows), moduleBuilder.getNode(columns), moduleBuilder.getNode(use)); + } + void onCooperativeMatrixLoadKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef pointer, IdRef memory_layout, + Optional stride, Optional::ReadType> memory_operand) + { + eastl::optional> strideOpt; + if (stride.valid) + { + strideOpt = moduleBuilder.getNode(stride.value); + } + eastl::optional memory_operandVal; + eastl::optional memory_operand_Aligned_first; + NodePointer memory_operand_MakePointerAvailable_first; + NodePointer memory_operand_MakePointerAvailableKHR_first; + NodePointer memory_operand_MakePointerVisible_first; + NodePointer memory_operand_MakePointerVisibleKHR_first; + NodePointer memory_operand_AliasScopeINTELMask_first; + NodePointer memory_operand_NoAliasINTELMask_first; + if (memory_operand.valid) + { + memory_operandVal = memory_operand.value.value; + if ((memory_operand.value.value & MemoryAccessMask::Aligned) != MemoryAccessMask::MaskNone) + { + memory_operand_Aligned_first = memory_operand.value.data.Aligned.first; + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerAvailable) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerAvailable_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerAvailable.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerAvailableKHR) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerAvailableKHR_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerAvailableKHR.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerVisible) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerVisible_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerVisible.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerVisibleKHR) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerVisibleKHR_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerVisibleKHR.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_operand_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.AliasScopeINTELMask.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_operand_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.NoAliasINTELMask.first)); + } + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(pointer), moduleBuilder.getNode(memory_layout), strideOpt, memory_operandVal, memory_operand_Aligned_first, + memory_operand_MakePointerAvailable_first, memory_operand_MakePointerAvailableKHR_first, memory_operand_MakePointerVisible_first, + memory_operand_MakePointerVisibleKHR_first, memory_operand_AliasScopeINTELMask_first, memory_operand_NoAliasINTELMask_first); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onCooperativeMatrixStoreKHR(Op, IdRef pointer, IdRef object, IdRef memory_layout, Optional stride, + Optional::ReadType> memory_operand) + { + eastl::optional> strideOpt; + if (stride.valid) + { + strideOpt = moduleBuilder.getNode(stride.value); + } + eastl::optional memory_operandVal; + eastl::optional memory_operand_Aligned_first; + NodePointer memory_operand_MakePointerAvailable_first; + NodePointer memory_operand_MakePointerAvailableKHR_first; + NodePointer memory_operand_MakePointerVisible_first; + NodePointer memory_operand_MakePointerVisibleKHR_first; + NodePointer memory_operand_AliasScopeINTELMask_first; + NodePointer memory_operand_NoAliasINTELMask_first; + if (memory_operand.valid) + { + memory_operandVal = memory_operand.value.value; + if ((memory_operand.value.value & MemoryAccessMask::Aligned) != MemoryAccessMask::MaskNone) + { + memory_operand_Aligned_first = memory_operand.value.data.Aligned.first; + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerAvailable) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerAvailable_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerAvailable.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerAvailableKHR) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerAvailableKHR_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerAvailableKHR.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerVisible) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerVisible_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerVisible.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::MakePointerVisibleKHR) != MemoryAccessMask::MaskNone) + { + memory_operand_MakePointerVisibleKHR_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.MakePointerVisibleKHR.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_operand_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.AliasScopeINTELMask.first)); + } + if ((memory_operand.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_operand_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_operand.value.data.NoAliasINTELMask.first)); + } + } + auto node = moduleBuilder.newNode(moduleBuilder.getNode(pointer), moduleBuilder.getNode(object), + moduleBuilder.getNode(memory_layout), strideOpt, memory_operandVal, memory_operand_Aligned_first, + memory_operand_MakePointerAvailable_first, memory_operand_MakePointerAvailableKHR_first, memory_operand_MakePointerVisible_first, + memory_operand_MakePointerVisibleKHR_first, memory_operand_AliasScopeINTELMask_first, memory_operand_NoAliasINTELMask_first); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onCooperativeMatrixMulAddKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef a, IdRef b, IdRef c, + Optional cooperative_matrix_operands) + { + eastl::optional cooperative_matrix_operandsOpt; + if (cooperative_matrix_operands.valid) + { + cooperative_matrix_operandsOpt = cooperative_matrix_operands.value; + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(a), moduleBuilder.getNode(b), moduleBuilder.getNode(c), cooperative_matrix_operandsOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onCooperativeMatrixLengthKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef type) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(type)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onConstantCompositeReplicateEXT(Op, IdResult id_result, IdResultType id_result_type, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onSpecConstantCompositeReplicateEXT(Op, IdResult id_result, IdResultType id_result_type, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onCompositeConstructReplicateEXT(Op, IdResult id_result, IdResultType id_result_type, IdRef value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onTypeRayQueryKHR(Op, IdResult id_result) { moduleBuilder.newNode(id_result.value); } void onRayQueryInitializeKHR(Op, IdRef ray_query, IdRef accel, IdRef ray_flags, IdRef cull_mask, IdRef ray_origin, IdRef ray_t_min, IdRef ray_direction, IdRef ray_t_max) @@ -8532,6 +9970,74 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onImageSampleWeightedQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef texture, IdRef coordinates, IdRef weights) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(texture), moduleBuilder.getNode(coordinates), moduleBuilder.getNode(weights)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBoxFilterQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef texture, IdRef coordinates, IdRef box_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(texture), moduleBuilder.getNode(coordinates), moduleBuilder.getNode(box_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchSSDQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target, IdRef target_coordinates, + IdRef reference, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target), moduleBuilder.getNode(target_coordinates), moduleBuilder.getNode(reference), + moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchSADQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target, IdRef target_coordinates, + IdRef reference, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target), moduleBuilder.getNode(target_coordinates), moduleBuilder.getNode(reference), + moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchWindowSSDQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target_sampled_image, + IdRef target_coordinates, IdRef reference_sampled_image, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target_sampled_image), moduleBuilder.getNode(target_coordinates), + moduleBuilder.getNode(reference_sampled_image), moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchWindowSADQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target_sampled_image, + IdRef target_coordinates, IdRef reference_sampled_image, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target_sampled_image), moduleBuilder.getNode(target_coordinates), + moduleBuilder.getNode(reference_sampled_image), moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchGatherSSDQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target_sampled_image, + IdRef target_coordinates, IdRef reference_sampled_image, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target_sampled_image), moduleBuilder.getNode(target_coordinates), + moduleBuilder.getNode(reference_sampled_image), moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onImageBlockMatchGatherSADQCOM(Op, IdResult id_result, IdResultType id_result_type, IdRef target_sampled_image, + IdRef target_coordinates, IdRef reference_sampled_image, IdRef reference_coordinates, IdRef block_size) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(target_sampled_image), moduleBuilder.getNode(target_coordinates), + moduleBuilder.getNode(reference_sampled_image), moduleBuilder.getNode(reference_coordinates), moduleBuilder.getNode(block_size)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onGroupIAddNonUniformAMD(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) { @@ -8603,20 +10109,320 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } - void onFragmentFetchAMD(Op, IdResult id_result, IdResultType id_result_type, IdRef image, IdRef coordinate, IdRef fragment_index) + void onFragmentFetchAMD(Op, IdResult id_result, IdResultType id_result_type, IdRef image, IdRef coordinate, IdRef fragment_index) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(image), moduleBuilder.getNode(coordinate), moduleBuilder.getNode(fragment_index)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onReadClockKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope scope) + { + auto node = + moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(scope)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onFinalizeNodePayloadsAMDX(Op, IdRef payload_array) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(payload_array)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onFinishWritingNodePayloadAMDX(Op, IdResult id_result, IdResultType id_result_type, IdRef payload) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(payload)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onInitializeNodePayloadsAMDX(Op, IdRef payload_array, IdScope visibility, IdRef payload_count, IdRef node_index) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(payload_array), + moduleBuilder.getNode(visibility), moduleBuilder.getNode(payload_count), moduleBuilder.getNode(node_index)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformQuadAllKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef predicate) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(predicate)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupNonUniformQuadAnyKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef predicate) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(predicate)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordHitMotionNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef instance_id, IdRef primitive_id, + IdRef geometry_index, IdRef hit_kind, IdRef s_b_t_record_offset, IdRef s_b_t_record_stride, IdRef origin, IdRef t_min, + IdRef direction, IdRef t_max, IdRef current_time, IdRef hit_object_attributes) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(instance_id), moduleBuilder.getNode(primitive_id), + moduleBuilder.getNode(geometry_index), moduleBuilder.getNode(hit_kind), moduleBuilder.getNode(s_b_t_record_offset), + moduleBuilder.getNode(s_b_t_record_stride), moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), + moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), moduleBuilder.getNode(current_time), + moduleBuilder.getNode(hit_object_attributes)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordHitWithIndexMotionNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef instance_id, IdRef primitive_id, + IdRef geometry_index, IdRef hit_kind, IdRef s_b_t_record_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max, + IdRef current_time, IdRef hit_object_attributes) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(instance_id), moduleBuilder.getNode(primitive_id), + moduleBuilder.getNode(geometry_index), moduleBuilder.getNode(hit_kind), moduleBuilder.getNode(s_b_t_record_index), + moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), + moduleBuilder.getNode(current_time), moduleBuilder.getNode(hit_object_attributes)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordMissMotionNV(Op, IdRef hit_object, IdRef s_b_t_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max, + IdRef current_time) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(s_b_t_index), moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), + moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), moduleBuilder.getNode(current_time)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetWorldToObjectNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetObjectToWorldNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetObjectRayDirectionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetObjectRayOriginNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectTraceRayMotionNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef ray_flags, IdRef cullmask, + IdRef s_b_t_record_offset, IdRef s_b_t_record_stride, IdRef miss_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max, + IdRef time, IdRef payload) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(ray_flags), moduleBuilder.getNode(cullmask), + moduleBuilder.getNode(s_b_t_record_offset), moduleBuilder.getNode(s_b_t_record_stride), moduleBuilder.getNode(miss_index), + moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), + moduleBuilder.getNode(time), moduleBuilder.getNode(payload)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetShaderRecordBufferHandleNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, + moduleBuilder.getType(id_result_type), moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetShaderBindingTableRecordIndexNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, + moduleBuilder.getType(id_result_type), moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordEmptyNV(Op, IdRef hit_object) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectTraceRayNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef ray_flags, IdRef cullmask, + IdRef s_b_t_record_offset, IdRef s_b_t_record_stride, IdRef miss_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max, + IdRef payload) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(ray_flags), moduleBuilder.getNode(cullmask), + moduleBuilder.getNode(s_b_t_record_offset), moduleBuilder.getNode(s_b_t_record_stride), moduleBuilder.getNode(miss_index), + moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), + moduleBuilder.getNode(payload)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordHitNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef instance_id, IdRef primitive_id, + IdRef geometry_index, IdRef hit_kind, IdRef s_b_t_record_offset, IdRef s_b_t_record_stride, IdRef origin, IdRef t_min, + IdRef direction, IdRef t_max, IdRef hit_object_attributes) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(instance_id), moduleBuilder.getNode(primitive_id), + moduleBuilder.getNode(geometry_index), moduleBuilder.getNode(hit_kind), moduleBuilder.getNode(s_b_t_record_offset), + moduleBuilder.getNode(s_b_t_record_stride), moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), + moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), moduleBuilder.getNode(hit_object_attributes)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordHitWithIndexNV(Op, IdRef hit_object, IdRef acceleration_structure, IdRef instance_id, IdRef primitive_id, + IdRef geometry_index, IdRef hit_kind, IdRef s_b_t_record_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max, + IdRef hit_object_attributes) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(acceleration_structure), moduleBuilder.getNode(instance_id), moduleBuilder.getNode(primitive_id), + moduleBuilder.getNode(geometry_index), moduleBuilder.getNode(hit_kind), moduleBuilder.getNode(s_b_t_record_index), + moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max), + moduleBuilder.getNode(hit_object_attributes)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectRecordMissNV(Op, IdRef hit_object, IdRef s_b_t_index, IdRef origin, IdRef t_min, IdRef direction, IdRef t_max) + { + auto node = + moduleBuilder.newNode(moduleBuilder.getNode(hit_object), moduleBuilder.getNode(s_b_t_index), + moduleBuilder.getNode(origin), moduleBuilder.getNode(t_min), moduleBuilder.getNode(direction), moduleBuilder.getNode(t_max)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectExecuteShaderNV(Op, IdRef hit_object, IdRef payload) + { + auto node = + moduleBuilder.newNode(moduleBuilder.getNode(hit_object), moduleBuilder.getNode(payload)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetCurrentTimeNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetAttributesNV(Op, IdRef hit_object, IdRef hit_object_attribute) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), + moduleBuilder.getNode(hit_object_attribute)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetHitKindNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetPrimitiveIndexNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetGeometryIndexNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetInstanceIdNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetInstanceCustomIndexNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetWorldRayDirectionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetWorldRayOriginNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetRayTMaxNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectGetRayTMinNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectIsEmptyNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectIsHitNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onHitObjectIsMissNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit_object) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit_object)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onReorderThreadWithHitObjectNV(Op, IdRef hit_object, Optional hint, Optional bits) { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(image), moduleBuilder.getNode(coordinate), moduleBuilder.getNode(fragment_index)); + eastl::optional> hintOpt; + if (hint.valid) + { + hintOpt = moduleBuilder.getNode(hint.value); + } + eastl::optional> bitsOpt; + if (bits.valid) + { + bitsOpt = moduleBuilder.getNode(bits.value); + } + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hit_object), hintOpt, bitsOpt); if (currentBlock) currentBlock->instructions.push_back(node); } - void onReadClockKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope scope) + void onReorderThreadWithHintNV(Op, IdRef hint, IdRef bits) { - auto node = - moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(scope)); + auto node = moduleBuilder.newNode(moduleBuilder.getNode(hint), moduleBuilder.getNode(bits)); if (currentBlock) currentBlock->instructions.push_back(node); } + void onTypeHitObjectNV(Op, IdResult id_result) { moduleBuilder.newNode(id_result.value); } void onImageSampleFootprintNV(Op, IdResult id_result, IdResultType id_result_type, IdRef sampled_image, IdRef coordinate, IdRef granularity, IdRef coarse, Optional::ReadType> image_operands) { @@ -8706,6 +10512,25 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onEmitMeshTasksEXT(Op, IdRef group_count_x, IdRef group_count_y, IdRef group_count_z, Optional payload) + { + eastl::optional> payloadOpt; + if (payload.valid) + { + payloadOpt = moduleBuilder.getNode(payload.value); + } + auto node = moduleBuilder.newNode(moduleBuilder.getNode(group_count_x), + moduleBuilder.getNode(group_count_y), moduleBuilder.getNode(group_count_z), payloadOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onSetMeshOutputsEXT(Op, IdRef vertex_count, IdRef primitive_count) + { + auto node = + moduleBuilder.newNode(moduleBuilder.getNode(vertex_count), moduleBuilder.getNode(primitive_count)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onGroupNonUniformPartitionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef value) { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), @@ -8720,10 +10545,21 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } - void onReportIntersectionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit, IdRef hit_kind) + void onFetchMicroTriangleVertexPositionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef accel, IdRef instance_id, + IdRef geometry_index, IdRef primitive_index, IdRef barycentric) { - auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(hit), moduleBuilder.getNode(hit_kind)); + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(accel), moduleBuilder.getNode(instance_id), moduleBuilder.getNode(geometry_index), + moduleBuilder.getNode(primitive_index), moduleBuilder.getNode(barycentric)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onFetchMicroTriangleVertexBarycentricNV(Op, IdResult id_result, IdResultType id_result_type, IdRef accel, IdRef instance_id, + IdRef geometry_index, IdRef primitive_index, IdRef barycentric) + { + auto node = moduleBuilder.newNode(id_result.value, + moduleBuilder.getType(id_result_type), moduleBuilder.getNode(accel), moduleBuilder.getNode(instance_id), + moduleBuilder.getNode(geometry_index), moduleBuilder.getNode(primitive_index), moduleBuilder.getNode(barycentric)); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -8734,6 +10570,13 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onReportIntersectionNV(Op, IdResult id_result, IdResultType id_result_type, IdRef hit, IdRef hit_kind) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(hit), moduleBuilder.getNode(hit_kind)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onIgnoreIntersectionNV(Op) { auto node = moduleBuilder.newNode(); @@ -8778,14 +10621,22 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } - void onTypeAccelerationStructureNV(Op, IdResult id_result) + void onRayQueryGetIntersectionTriangleVertexPositionsKHR(Op, IdResult id_result, IdResultType id_result_type, IdRef ray_query, + IdRef intersection) { - moduleBuilder.newNode(id_result.value); + auto node = moduleBuilder.newNode(id_result.value, + moduleBuilder.getType(id_result_type), moduleBuilder.getNode(ray_query), moduleBuilder.getNode(intersection)); + if (currentBlock) + currentBlock->instructions.push_back(node); } void onTypeAccelerationStructureKHR(Op, IdResult id_result) { moduleBuilder.newNode(id_result.value); } + void onTypeAccelerationStructureNV(Op, IdResult id_result) + { + moduleBuilder.newNode(id_result.value); + } void onExecuteCallableNV(Op, IdRef s_b_t_index, IdRef callable_data_id) { auto node = @@ -8807,6 +10658,8 @@ struct ReaderContext NodePointer memory_access_MakePointerAvailableKHR_first; NodePointer memory_access_MakePointerVisible_first; NodePointer memory_access_MakePointerVisibleKHR_first; + NodePointer memory_access_AliasScopeINTELMask_first; + NodePointer memory_access_NoAliasINTELMask_first; if (memory_access.valid) { memory_accessVal = memory_access.value.value; @@ -8834,11 +10687,22 @@ struct ReaderContext memory_access_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.NoAliasINTELMask.first)); + } } auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), moduleBuilder.getNode(pointer), moduleBuilder.getNode(stride), moduleBuilder.getNode(column_major), memory_accessVal, memory_access_Aligned_first, memory_access_MakePointerAvailable_first, memory_access_MakePointerAvailableKHR_first, - memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first); + memory_access_MakePointerVisible_first, memory_access_MakePointerVisibleKHR_first, memory_access_AliasScopeINTELMask_first, + memory_access_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -8851,6 +10715,8 @@ struct ReaderContext NodePointer memory_access_MakePointerAvailableKHR_first; NodePointer memory_access_MakePointerVisible_first; NodePointer memory_access_MakePointerVisibleKHR_first; + NodePointer memory_access_AliasScopeINTELMask_first; + NodePointer memory_access_NoAliasINTELMask_first; if (memory_access.valid) { memory_accessVal = memory_access.value.value; @@ -8878,11 +10744,21 @@ struct ReaderContext memory_access_MakePointerVisibleKHR_first = NodePointer(moduleBuilder.getNode(memory_access.value.data.MakePointerVisibleKHR.first)); } + if ((memory_access.value.value & MemoryAccessMask::AliasScopeINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_AliasScopeINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.AliasScopeINTELMask.first)); + } + if ((memory_access.value.value & MemoryAccessMask::NoAliasINTELMask) != MemoryAccessMask::MaskNone) + { + memory_access_NoAliasINTELMask_first = + NodePointer(moduleBuilder.getNode(memory_access.value.data.NoAliasINTELMask.first)); + } } auto node = moduleBuilder.newNode(moduleBuilder.getNode(pointer), moduleBuilder.getNode(object), moduleBuilder.getNode(stride), moduleBuilder.getNode(column_major), memory_accessVal, memory_access_Aligned_first, memory_access_MakePointerAvailable_first, memory_access_MakePointerAvailableKHR_first, memory_access_MakePointerVisible_first, - memory_access_MakePointerVisibleKHR_first); + memory_access_MakePointerVisibleKHR_first, memory_access_AliasScopeINTELMask_first, memory_access_NoAliasINTELMask_first); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -8973,6 +10849,20 @@ struct ReaderContext currentBlock->instructions.push_back(node); } void onSamplerImageAddressingModeNV(Op, LiteralInteger bit_width) {} + void onRawAccessChainNV(Op, IdResult id_result, IdResultType id_result_type, IdRef base, IdRef byte_stride, IdRef element_index, + IdRef byte_offset, Optional raw_access_chain_operands) + { + eastl::optional raw_access_chain_operandsOpt; + if (raw_access_chain_operands.valid) + { + raw_access_chain_operandsOpt = raw_access_chain_operands.value; + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(base), moduleBuilder.getNode(byte_stride), moduleBuilder.getNode(element_index), + moduleBuilder.getNode(byte_offset), raw_access_chain_operandsOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onSubgroupShuffleINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef data, IdRef invocation_id) { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), @@ -9548,12 +11438,63 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; propPtr.reset(newProp); break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -9579,9 +11520,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); break; } @@ -9621,6 +11562,12 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -9738,167 +11685,363 @@ struct ReaderContext { auto newProp = new PropertyFunctionDenormModeINTEL; propPtr.reset(newProp); - newProp->targetWidth = decoration.data.FunctionDenormModeINTEL.targetWidth; - newProp->fpDenormMode = decoration.data.FunctionDenormModeINTEL.fpDenormMode; + newProp->targetWidth = decoration.data.FunctionDenormModeINTEL.targetWidth; + newProp->fpDenormMode = decoration.data.FunctionDenormModeINTEL.fpDenormMode; + break; + } + case Decoration::RegisterINTEL: + { + auto newProp = new PropertyRegisterINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MemoryINTEL: + { + auto newProp = new PropertyMemoryINTEL; + propPtr.reset(newProp); + newProp->memoryType = decoration.data.MemoryINTEL.memoryType.asStringObj(); + break; + } + case Decoration::NumbanksINTEL: + { + auto newProp = new PropertyNumbanksINTEL; + propPtr.reset(newProp); + newProp->banks = decoration.data.NumbanksINTEL.banks; + break; + } + case Decoration::BankwidthINTEL: + { + auto newProp = new PropertyBankwidthINTEL; + propPtr.reset(newProp); + newProp->bankWidth = decoration.data.BankwidthINTEL.bankWidth; + break; + } + case Decoration::MaxPrivateCopiesINTEL: + { + auto newProp = new PropertyMaxPrivateCopiesINTEL; + propPtr.reset(newProp); + newProp->maximumCopies = decoration.data.MaxPrivateCopiesINTEL.maximumCopies; + break; + } + case Decoration::SinglepumpINTEL: + { + auto newProp = new PropertySinglepumpINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::DoublepumpINTEL: + { + auto newProp = new PropertyDoublepumpINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MaxReplicatesINTEL: + { + auto newProp = new PropertyMaxReplicatesINTEL; + propPtr.reset(newProp); + newProp->maximumReplicates = decoration.data.MaxReplicatesINTEL.maximumReplicates; + break; + } + case Decoration::SimpleDualPortINTEL: + { + auto newProp = new PropertySimpleDualPortINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MergeINTEL: + { + auto newProp = new PropertyMergeINTEL; + propPtr.reset(newProp); + newProp->mergeKey = decoration.data.MergeINTEL.mergeKey.asStringObj(); + newProp->mergeType = decoration.data.MergeINTEL.mergeType.asStringObj(); + break; + } + case Decoration::BankBitsINTEL: + { + auto newProp = new PropertyBankBitsINTEL; + propPtr.reset(newProp); + newProp->bankBits = decoration.data.BankBitsINTEL.bankBits; + break; + } + case Decoration::ForcePow2DepthINTEL: + { + auto newProp = new PropertyForcePow2DepthINTEL; + propPtr.reset(newProp); + newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; + break; + } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::BurstCoalesceINTEL: + { + auto newProp = new PropertyBurstCoalesceINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::CacheSizeINTEL: + { + auto newProp = new PropertyCacheSizeINTEL; + propPtr.reset(newProp); + newProp->cacheSizeInBytes = decoration.data.CacheSizeINTEL.cacheSizeInBytes; + break; + } + case Decoration::DontStaticallyCoalesceINTEL: + { + auto newProp = new PropertyDontStaticallyCoalesceINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::PrefetchINTEL: + { + auto newProp = new PropertyPrefetchINTEL; + propPtr.reset(newProp); + newProp->prefetcherSizeInBytes = decoration.data.PrefetchINTEL.prefetcherSizeInBytes; + break; + } + case Decoration::StallEnableINTEL: + { + auto newProp = new PropertyStallEnableINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::FuseLoopsInFunctionINTEL: + { + auto newProp = new PropertyFuseLoopsInFunctionINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->enable = decoration.data.PipelineEnableINTEL.enable; break; } - case Decoration::RegisterINTEL: + case Decoration::BufferLocationINTEL: { - auto newProp = new PropertyRegisterINTEL; + auto newProp = new PropertyBufferLocationINTEL; propPtr.reset(newProp); + newProp->bufferLocationId = decoration.data.BufferLocationINTEL.bufferLocationId; break; } - case Decoration::MemoryINTEL: + case Decoration::IOPipeStorageINTEL: { - auto newProp = new PropertyMemoryINTEL; + auto newProp = new PropertyIOPipeStorageINTEL; propPtr.reset(newProp); - newProp->memoryType = decoration.data.MemoryINTEL.memoryType.asStringObj(); + newProp->ioPipeId = decoration.data.IOPipeStorageINTEL.ioPipeId; break; } - case Decoration::NumbanksINTEL: + case Decoration::FunctionFloatingPointModeINTEL: { - auto newProp = new PropertyNumbanksINTEL; + auto newProp = new PropertyFunctionFloatingPointModeINTEL; propPtr.reset(newProp); - newProp->banks = decoration.data.NumbanksINTEL.banks; + newProp->targetWidth = decoration.data.FunctionFloatingPointModeINTEL.targetWidth; + newProp->fpOperationMode = decoration.data.FunctionFloatingPointModeINTEL.fpOperationMode; break; } - case Decoration::BankwidthINTEL: + case Decoration::SingleElementVectorINTEL: { - auto newProp = new PropertyBankwidthINTEL; + auto newProp = new PropertySingleElementVectorINTEL; propPtr.reset(newProp); - newProp->bankWidth = decoration.data.BankwidthINTEL.bankWidth; break; } - case Decoration::MaxPrivateCopiesINTEL: + case Decoration::VectorComputeCallableFunctionINTEL: { - auto newProp = new PropertyMaxPrivateCopiesINTEL; + auto newProp = new PropertyVectorComputeCallableFunctionINTEL; propPtr.reset(newProp); - newProp->maximumCopies = decoration.data.MaxPrivateCopiesINTEL.maximumCopies; break; } - case Decoration::SinglepumpINTEL: + case Decoration::MediaBlockIOINTEL: { - auto newProp = new PropertySinglepumpINTEL; + auto newProp = new PropertyMediaBlockIOINTEL; propPtr.reset(newProp); break; } - case Decoration::DoublepumpINTEL: + case Decoration::StallFreeINTEL: { - auto newProp = new PropertyDoublepumpINTEL; + auto newProp = new PropertyStallFreeINTEL; propPtr.reset(newProp); break; } - case Decoration::MaxReplicatesINTEL: + case Decoration::FPMaxErrorDecorationINTEL: { - auto newProp = new PropertyMaxReplicatesINTEL; + auto newProp = new PropertyFPMaxErrorDecorationINTEL; propPtr.reset(newProp); - newProp->maximumReplicates = decoration.data.MaxReplicatesINTEL.maximumReplicates; + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; break; } - case Decoration::SimpleDualPortINTEL: + case Decoration::LatencyControlLabelINTEL: { - auto newProp = new PropertySimpleDualPortINTEL; + auto newProp = new PropertyLatencyControlLabelINTEL; propPtr.reset(newProp); + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; break; } - case Decoration::MergeINTEL: + case Decoration::LatencyControlConstraintINTEL: { - auto newProp = new PropertyMergeINTEL; + auto newProp = new PropertyLatencyControlConstraintINTEL; propPtr.reset(newProp); - newProp->mergeKey = decoration.data.MergeINTEL.mergeKey.asStringObj(); - newProp->mergeType = decoration.data.MergeINTEL.mergeType.asStringObj(); + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; break; } - case Decoration::BankBitsINTEL: + case Decoration::ConduitKernelArgumentINTEL: { - auto newProp = new PropertyBankBitsINTEL; + auto newProp = new PropertyConduitKernelArgumentINTEL; propPtr.reset(newProp); - newProp->bankBits = decoration.data.BankBitsINTEL.bankBits; break; } - case Decoration::ForcePow2DepthINTEL: + case Decoration::RegisterMapKernelArgumentINTEL: { - auto newProp = new PropertyForcePow2DepthINTEL; + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; propPtr.reset(newProp); - newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } - case Decoration::BurstCoalesceINTEL: + case Decoration::MMHostInterfaceAddressWidthINTEL: { - auto newProp = new PropertyBurstCoalesceINTEL; + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; propPtr.reset(newProp); + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; break; } - case Decoration::CacheSizeINTEL: + case Decoration::MMHostInterfaceDataWidthINTEL: { - auto newProp = new PropertyCacheSizeINTEL; + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; propPtr.reset(newProp); - newProp->cacheSizeInBytes = decoration.data.CacheSizeINTEL.cacheSizeInBytes; + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; break; } - case Decoration::DontStaticallyCoalesceINTEL: + case Decoration::MMHostInterfaceLatencyINTEL: { - auto newProp = new PropertyDontStaticallyCoalesceINTEL; + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; propPtr.reset(newProp); + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; break; } - case Decoration::PrefetchINTEL: + case Decoration::MMHostInterfaceReadWriteModeINTEL: { - auto newProp = new PropertyPrefetchINTEL; + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; propPtr.reset(newProp); - newProp->prefetcherSizeInBytes = decoration.data.PrefetchINTEL.prefetcherSizeInBytes; + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; break; } - case Decoration::StallEnableINTEL: + case Decoration::MMHostInterfaceMaxBurstINTEL: { - auto newProp = new PropertyStallEnableINTEL; + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; propPtr.reset(newProp); + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; break; } - case Decoration::FuseLoopsInFunctionINTEL: + case Decoration::MMHostInterfaceWaitRequestINTEL: { - auto newProp = new PropertyFuseLoopsInFunctionINTEL; + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; propPtr.reset(newProp); + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; break; } - case Decoration::BufferLocationINTEL: + case Decoration::StableKernelArgumentINTEL: { - auto newProp = new PropertyBufferLocationINTEL; + auto newProp = new PropertyStableKernelArgumentINTEL; propPtr.reset(newProp); - newProp->bufferLocationId = decoration.data.BufferLocationINTEL.bufferLocationId; break; } - case Decoration::IOPipeStorageINTEL: + case Decoration::HostAccessINTEL: { - auto newProp = new PropertyIOPipeStorageINTEL; + auto newProp = new PropertyHostAccessINTEL; propPtr.reset(newProp); - newProp->ioPipeId = decoration.data.IOPipeStorageINTEL.ioPipeId; + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); break; } - case Decoration::FunctionFloatingPointModeINTEL: + case Decoration::InitModeINTEL: { - auto newProp = new PropertyFunctionFloatingPointModeINTEL; + auto newProp = new PropertyInitModeINTEL; propPtr.reset(newProp); - newProp->targetWidth = decoration.data.FunctionFloatingPointModeINTEL.targetWidth; - newProp->fpOperationMode = decoration.data.FunctionFloatingPointModeINTEL.fpOperationMode; + newProp->trigger = decoration.data.InitModeINTEL.trigger; break; } - case Decoration::SingleElementVectorINTEL: + case Decoration::ImplementInRegisterMapINTEL: { - auto newProp = new PropertySingleElementVectorINTEL; + auto newProp = new PropertyImplementInRegisterMapINTEL; propPtr.reset(newProp); + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; break; } - case Decoration::VectorComputeCallableFunctionINTEL: + case Decoration::CacheControlLoadINTEL: { - auto newProp = new PropertyVectorComputeCallableFunctionINTEL; + auto newProp = new PropertyCacheControlLoadINTEL; propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; break; } - case Decoration::MediaBlockIOINTEL: + case Decoration::CacheControlStoreINTEL: { - auto newProp = new PropertyMediaBlockIOINTEL; + auto newProp = new PropertyCacheControlStoreINTEL; propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; break; } } @@ -10236,12 +12379,63 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; propPtr.reset(newProp); break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -10267,9 +12461,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); break; } @@ -10309,6 +12503,12 @@ struct ReaderContext propPtr.reset(newProp); break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -10511,6 +12711,26 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -10519,74 +12739,250 @@ struct ReaderContext } case Decoration::CacheSizeINTEL: { - auto newProp = new PropertyCacheSizeINTEL; + auto newProp = new PropertyCacheSizeINTEL; + propPtr.reset(newProp); + newProp->cacheSizeInBytes = decoration.data.CacheSizeINTEL.cacheSizeInBytes; + break; + } + case Decoration::DontStaticallyCoalesceINTEL: + { + auto newProp = new PropertyDontStaticallyCoalesceINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::PrefetchINTEL: + { + auto newProp = new PropertyPrefetchINTEL; + propPtr.reset(newProp); + newProp->prefetcherSizeInBytes = decoration.data.PrefetchINTEL.prefetcherSizeInBytes; + break; + } + case Decoration::StallEnableINTEL: + { + auto newProp = new PropertyStallEnableINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::FuseLoopsInFunctionINTEL: + { + auto newProp = new PropertyFuseLoopsInFunctionINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } + case Decoration::BufferLocationINTEL: + { + auto newProp = new PropertyBufferLocationINTEL; + propPtr.reset(newProp); + newProp->bufferLocationId = decoration.data.BufferLocationINTEL.bufferLocationId; + break; + } + case Decoration::IOPipeStorageINTEL: + { + auto newProp = new PropertyIOPipeStorageINTEL; + propPtr.reset(newProp); + newProp->ioPipeId = decoration.data.IOPipeStorageINTEL.ioPipeId; + break; + } + case Decoration::FunctionFloatingPointModeINTEL: + { + auto newProp = new PropertyFunctionFloatingPointModeINTEL; + propPtr.reset(newProp); + newProp->targetWidth = decoration.data.FunctionFloatingPointModeINTEL.targetWidth; + newProp->fpOperationMode = decoration.data.FunctionFloatingPointModeINTEL.fpOperationMode; + break; + } + case Decoration::SingleElementVectorINTEL: + { + auto newProp = new PropertySingleElementVectorINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::VectorComputeCallableFunctionINTEL: + { + auto newProp = new PropertyVectorComputeCallableFunctionINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MediaBlockIOINTEL: + { + auto newProp = new PropertyMediaBlockIOINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; propPtr.reset(newProp); - newProp->cacheSizeInBytes = decoration.data.CacheSizeINTEL.cacheSizeInBytes; + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; break; } - case Decoration::DontStaticallyCoalesceINTEL: + case Decoration::MMHostInterfaceLatencyINTEL: { - auto newProp = new PropertyDontStaticallyCoalesceINTEL; + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; propPtr.reset(newProp); + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; break; } - case Decoration::PrefetchINTEL: + case Decoration::MMHostInterfaceReadWriteModeINTEL: { - auto newProp = new PropertyPrefetchINTEL; + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; propPtr.reset(newProp); - newProp->prefetcherSizeInBytes = decoration.data.PrefetchINTEL.prefetcherSizeInBytes; + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; break; } - case Decoration::StallEnableINTEL: + case Decoration::MMHostInterfaceMaxBurstINTEL: { - auto newProp = new PropertyStallEnableINTEL; + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; propPtr.reset(newProp); + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; break; } - case Decoration::FuseLoopsInFunctionINTEL: + case Decoration::MMHostInterfaceWaitRequestINTEL: { - auto newProp = new PropertyFuseLoopsInFunctionINTEL; + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; propPtr.reset(newProp); + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; break; } - case Decoration::BufferLocationINTEL: + case Decoration::StableKernelArgumentINTEL: { - auto newProp = new PropertyBufferLocationINTEL; + auto newProp = new PropertyStableKernelArgumentINTEL; propPtr.reset(newProp); - newProp->bufferLocationId = decoration.data.BufferLocationINTEL.bufferLocationId; break; } - case Decoration::IOPipeStorageINTEL: + case Decoration::HostAccessINTEL: { - auto newProp = new PropertyIOPipeStorageINTEL; + auto newProp = new PropertyHostAccessINTEL; propPtr.reset(newProp); - newProp->ioPipeId = decoration.data.IOPipeStorageINTEL.ioPipeId; + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); break; } - case Decoration::FunctionFloatingPointModeINTEL: + case Decoration::InitModeINTEL: { - auto newProp = new PropertyFunctionFloatingPointModeINTEL; + auto newProp = new PropertyInitModeINTEL; propPtr.reset(newProp); - newProp->targetWidth = decoration.data.FunctionFloatingPointModeINTEL.targetWidth; - newProp->fpOperationMode = decoration.data.FunctionFloatingPointModeINTEL.fpOperationMode; + newProp->trigger = decoration.data.InitModeINTEL.trigger; break; } - case Decoration::SingleElementVectorINTEL: + case Decoration::ImplementInRegisterMapINTEL: { - auto newProp = new PropertySingleElementVectorINTEL; + auto newProp = new PropertyImplementInRegisterMapINTEL; propPtr.reset(newProp); + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; break; } - case Decoration::VectorComputeCallableFunctionINTEL: + case Decoration::CacheControlLoadINTEL: { - auto newProp = new PropertyVectorComputeCallableFunctionINTEL; + auto newProp = new PropertyCacheControlLoadINTEL; propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; break; } - case Decoration::MediaBlockIOINTEL: + case Decoration::CacheControlStoreINTEL: { - auto newProp = new PropertyMediaBlockIOINTEL; + auto newProp = new PropertyCacheControlStoreINTEL; propPtr.reset(newProp); + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; break; } } @@ -10973,6 +13369,27 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; @@ -10980,6 +13397,43 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -11009,9 +13463,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); newProp->memberIndex = member.value; break; @@ -11058,6 +13512,13 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::HitObjectShaderRecordBufferNV: + { + auto newProp = new PropertyHitObjectShaderRecordBufferNV; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::BindlessSamplerNV: { auto newProp = new PropertyBindlessSamplerNV; @@ -11290,6 +13751,29 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -11334,6 +13818,61 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } case Decoration::BufferLocationINTEL: { auto newProp = new PropertyBufferLocationINTEL; @@ -11380,6 +13919,151 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; + break; + } + case Decoration::MMHostInterfaceLatencyINTEL: + { + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; + break; + } + case Decoration::MMHostInterfaceReadWriteModeINTEL: + { + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; + break; + } + case Decoration::MMHostInterfaceMaxBurstINTEL: + { + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; + break; + } + case Decoration::MMHostInterfaceWaitRequestINTEL: + { + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; + break; + } + case Decoration::StableKernelArgumentINTEL: + { + auto newProp = new PropertyStableKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::HostAccessINTEL: + { + auto newProp = new PropertyHostAccessINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); + break; + } + case Decoration::InitModeINTEL: + { + auto newProp = new PropertyInitModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->trigger = decoration.data.InitModeINTEL.trigger; + break; + } + case Decoration::ImplementInRegisterMapINTEL: + { + auto newProp = new PropertyImplementInRegisterMapINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; + break; + } + case Decoration::CacheControlLoadINTEL: + { + auto newProp = new PropertyCacheControlLoadINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; + break; + } + case Decoration::CacheControlStoreINTEL: + { + auto newProp = new PropertyCacheControlStoreINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; + break; + } } PropertyTargetResolveInfo targetResolve // {struct_type, eastl::move(propPtr)}; @@ -11764,6 +14448,27 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::WeightTextureQCOM: + { + auto newProp = new PropertyWeightTextureQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::BlockMatchTextureQCOM: + { + auto newProp = new PropertyBlockMatchTextureQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::BlockMatchSamplerQCOM: + { + auto newProp = new PropertyBlockMatchSamplerQCOM; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::ExplicitInterpAMD: { auto newProp = new PropertyExplicitInterpAMD; @@ -11771,6 +14476,43 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::NodeSharesPayloadLimitsWithAMDX: + { + auto newProp = new PropertyNodeSharesPayloadLimitsWithAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->payloadArray), + IdRef{decoration.data.NodeSharesPayloadLimitsWithAMDX.payloadArray.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NodeMaxPayloadsAMDX: + { + auto newProp = new PropertyNodeMaxPayloadsAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->maxNumberOfPayloads), + IdRef{decoration.data.NodeMaxPayloadsAMDX.maxNumberOfPayloads.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::TrackFinishWritingAMDX: + { + auto newProp = new PropertyTrackFinishWritingAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::PayloadNodeNameAMDX: + { + auto newProp = new PropertyPayloadNodeNameAMDX; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->nodeName = decoration.data.PayloadNodeNameAMDX.nodeName.asStringObj(); + break; + } case Decoration::OverrideCoverageNV: { auto newProp = new PropertyOverrideCoverageNV; @@ -11800,9 +14542,9 @@ struct ReaderContext newProp->offset = decoration.data.SecondaryViewportRelativeNV.offset; break; } - case Decoration::PerPrimitiveNV: + case Decoration::PerPrimitiveEXT: { - auto newProp = new PropertyPerPrimitiveNV; + auto newProp = new PropertyPerPrimitiveEXT; propPtr.reset(newProp); newProp->memberIndex = member.value; break; @@ -11837,14 +14579,21 @@ struct ReaderContext } case Decoration::RestrictPointer: { - auto newProp = new PropertyRestrictPointer; + auto newProp = new PropertyRestrictPointer; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::AliasedPointer: + { + auto newProp = new PropertyAliasedPointer; propPtr.reset(newProp); newProp->memberIndex = member.value; break; } - case Decoration::AliasedPointer: + case Decoration::HitObjectShaderRecordBufferNV: { - auto newProp = new PropertyAliasedPointer; + auto newProp = new PropertyHitObjectShaderRecordBufferNV; propPtr.reset(newProp); newProp->memberIndex = member.value; break; @@ -12081,6 +14830,29 @@ struct ReaderContext newProp->forceKey = decoration.data.ForcePow2DepthINTEL.forceKey; break; } + case Decoration::StridesizeINTEL: + { + auto newProp = new PropertyStridesizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->strideSize = decoration.data.StridesizeINTEL.strideSize; + break; + } + case Decoration::WordsizeINTEL: + { + auto newProp = new PropertyWordsizeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->wordSize = decoration.data.WordsizeINTEL.wordSize; + break; + } + case Decoration::TrueDualPortINTEL: + { + auto newProp = new PropertyTrueDualPortINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } case Decoration::BurstCoalesceINTEL: { auto newProp = new PropertyBurstCoalesceINTEL; @@ -12125,6 +14897,61 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::MathOpDSPModeINTEL: + { + auto newProp = new PropertyMathOpDSPModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->mode = decoration.data.MathOpDSPModeINTEL.mode; + newProp->propagate = decoration.data.MathOpDSPModeINTEL.propagate; + break; + } + case Decoration::AliasScopeINTEL: + { + auto newProp = new PropertyAliasScopeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.AliasScopeINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::NoAliasINTEL: + { + auto newProp = new PropertyNoAliasINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + PropertyReferenceResolveInfo refResolve // + {reinterpret_cast *>(&newProp->aliasingScopesList), + IdRef{decoration.data.NoAliasINTEL.aliasingScopesList.value}}; + propertyReferenceResolves.push_back(refResolve); + break; + } + case Decoration::InitiationIntervalINTEL: + { + auto newProp = new PropertyInitiationIntervalINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cycles = decoration.data.InitiationIntervalINTEL.cycles; + break; + } + case Decoration::MaxConcurrencyINTEL: + { + auto newProp = new PropertyMaxConcurrencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->invocations = decoration.data.MaxConcurrencyINTEL.invocations; + break; + } + case Decoration::PipelineEnableINTEL: + { + auto newProp = new PropertyPipelineEnableINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->enable = decoration.data.PipelineEnableINTEL.enable; + break; + } case Decoration::BufferLocationINTEL: { auto newProp = new PropertyBufferLocationINTEL; @@ -12171,6 +14998,151 @@ struct ReaderContext newProp->memberIndex = member.value; break; } + case Decoration::StallFreeINTEL: + { + auto newProp = new PropertyStallFreeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::FPMaxErrorDecorationINTEL: + { + auto newProp = new PropertyFPMaxErrorDecorationINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxError = decoration.data.FPMaxErrorDecorationINTEL.maxError; + break; + } + case Decoration::LatencyControlLabelINTEL: + { + auto newProp = new PropertyLatencyControlLabelINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latencyLabel = decoration.data.LatencyControlLabelINTEL.latencyLabel; + break; + } + case Decoration::LatencyControlConstraintINTEL: + { + auto newProp = new PropertyLatencyControlConstraintINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->relativeTo = decoration.data.LatencyControlConstraintINTEL.relativeTo; + newProp->controlType = decoration.data.LatencyControlConstraintINTEL.controlType; + newProp->relativeCycle = decoration.data.LatencyControlConstraintINTEL.relativeCycle; + break; + } + case Decoration::ConduitKernelArgumentINTEL: + { + auto newProp = new PropertyConduitKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::RegisterMapKernelArgumentINTEL: + { + auto newProp = new PropertyRegisterMapKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::MMHostInterfaceAddressWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceAddressWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->addressWidth = decoration.data.MMHostInterfaceAddressWidthINTEL.addressWidth; + break; + } + case Decoration::MMHostInterfaceDataWidthINTEL: + { + auto newProp = new PropertyMMHostInterfaceDataWidthINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->dataWidth = decoration.data.MMHostInterfaceDataWidthINTEL.dataWidth; + break; + } + case Decoration::MMHostInterfaceLatencyINTEL: + { + auto newProp = new PropertyMMHostInterfaceLatencyINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->latency = decoration.data.MMHostInterfaceLatencyINTEL.latency; + break; + } + case Decoration::MMHostInterfaceReadWriteModeINTEL: + { + auto newProp = new PropertyMMHostInterfaceReadWriteModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->readWriteMode = decoration.data.MMHostInterfaceReadWriteModeINTEL.readWriteMode; + break; + } + case Decoration::MMHostInterfaceMaxBurstINTEL: + { + auto newProp = new PropertyMMHostInterfaceMaxBurstINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->maxBurstCount = decoration.data.MMHostInterfaceMaxBurstINTEL.maxBurstCount; + break; + } + case Decoration::MMHostInterfaceWaitRequestINTEL: + { + auto newProp = new PropertyMMHostInterfaceWaitRequestINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->waitrequest = decoration.data.MMHostInterfaceWaitRequestINTEL.waitrequest; + break; + } + case Decoration::StableKernelArgumentINTEL: + { + auto newProp = new PropertyStableKernelArgumentINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + break; + } + case Decoration::HostAccessINTEL: + { + auto newProp = new PropertyHostAccessINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->access = decoration.data.HostAccessINTEL.access; + newProp->name = decoration.data.HostAccessINTEL.name.asStringObj(); + break; + } + case Decoration::InitModeINTEL: + { + auto newProp = new PropertyInitModeINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->trigger = decoration.data.InitModeINTEL.trigger; + break; + } + case Decoration::ImplementInRegisterMapINTEL: + { + auto newProp = new PropertyImplementInRegisterMapINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->value = decoration.data.ImplementInRegisterMapINTEL.value; + break; + } + case Decoration::CacheControlLoadINTEL: + { + auto newProp = new PropertyCacheControlLoadINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlLoadINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlLoadINTEL.cacheControl; + break; + } + case Decoration::CacheControlStoreINTEL: + { + auto newProp = new PropertyCacheControlStoreINTEL; + propPtr.reset(newProp); + newProp->memberIndex = member.value; + newProp->cacheLevel = decoration.data.CacheControlStoreINTEL.cacheLevel; + newProp->cacheControl = decoration.data.CacheControlStoreINTEL.cacheControl; + break; + } } PropertyTargetResolveInfo targetResolve // {struct_type, eastl::move(propPtr)}; @@ -13039,10 +16011,10 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } - void onVariableLengthArrayINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef length) + void onVariableLengthArrayINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef lenght) { auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), - moduleBuilder.getNode(length)); + moduleBuilder.getNode(lenght)); if (currentBlock) currentBlock->instructions.push_back(node); } @@ -13396,6 +16368,41 @@ struct ReaderContext currentBlock->instructions.push_back(node); } void onLoopControlINTEL(Op, Multiple loop_control_parameters) {} + void onAliasDomainDeclINTEL(Op, IdResult id_result, Optional name) + { + eastl::optional> nameOpt; + if (name.valid) + { + nameOpt = moduleBuilder.getNode(name.value); + } + auto node = moduleBuilder.newNode(id_result.value, nameOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onAliasScopeDeclINTEL(Op, IdResult id_result, IdRef alias_domain, Optional name) + { + eastl::optional> nameOpt; + if (name.valid) + { + nameOpt = moduleBuilder.getNode(name.value); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getNode(alias_domain), nameOpt); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onAliasScopeListDeclINTEL(Op, IdResult id_result, Multiple alias_scope1_alias_scope2) + { + // FIXME: use vector directly in constructor + eastl::vector> alias_scope1_alias_scope2Var; + while (!alias_scope1_alias_scope2.empty()) + { + alias_scope1_alias_scope2Var.push_back(moduleBuilder.getNode(alias_scope1_alias_scope2.consume())); + } + auto node = moduleBuilder.newNode(id_result.value, alias_scope1_alias_scope2Var.data(), + alias_scope1_alias_scope2Var.size()); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onFixedSqrtINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef input_type, IdRef input, LiteralInteger s, LiteralInteger i, LiteralInteger r_i, LiteralInteger q, LiteralInteger o) { @@ -13693,6 +16700,118 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onCompositeConstructContinuedINTEL(Op, IdResult id_result, IdResultType id_result_type, Multiple constituents) + { + // FIXME: use vector directly in constructor + eastl::vector> constituentsVar; + while (!constituents.empty()) + { + constituentsVar.push_back(moduleBuilder.getNode(constituents.consume())); + } + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + constituentsVar.data(), constituentsVar.size()); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onConvertFToBF16INTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef float_value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(float_value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onConvertBF16ToFINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef b_float16_value) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(b_float16_value)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onControlBarrierArriveINTEL(Op, IdScope execution, IdScope memory, IdMemorySemantics semantics) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(execution), moduleBuilder.getNode(memory), + moduleBuilder.getNode(semantics)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onControlBarrierWaitINTEL(Op, IdScope execution, IdScope memory, IdMemorySemantics semantics) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(execution), moduleBuilder.getNode(memory), + moduleBuilder.getNode(semantics)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupIMulKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupFMulKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupBitwiseAndKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupBitwiseOrKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupBitwiseXorKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupLogicalAndKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupLogicalOrKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onGroupLogicalXorKHR(Op, IdResult id_result, IdResultType id_result_type, IdScope execution, GroupOperation operation, IdRef x) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(execution), operation, moduleBuilder.getNode(x)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onMaskedGatherINTEL(Op, IdResult id_result, IdResultType id_result_type, IdRef ptr_vector, LiteralInteger alignment, IdRef mask, + IdRef fill_empty) + { + auto node = moduleBuilder.newNode(id_result.value, moduleBuilder.getType(id_result_type), + moduleBuilder.getNode(ptr_vector), alignment, moduleBuilder.getNode(mask), moduleBuilder.getNode(fill_empty)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } + void onMaskedScatterINTEL(Op, IdRef input_vector, IdRef ptr_vector, LiteralInteger alignment, IdRef mask) + { + auto node = moduleBuilder.newNode(moduleBuilder.getNode(input_vector), moduleBuilder.getNode(ptr_vector), + alignment, moduleBuilder.getNode(mask)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onGLSLstd450Round(GLSLstd450, IdResult id_result, IdResultType id_result_type, IdRef x) { auto node = @@ -14310,6 +17429,14 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } + void onAMDShaderExplicitVertexParameterInterpolateAtVertex(AMDShaderExplicitVertexParameter, IdResult id_result, + IdResultType id_result_type, IdRef interpolant, IdRef vertex_idx) + { + auto node = moduleBuilder.newNode(id_result.value, + moduleBuilder.getType(id_result_type), moduleBuilder.getNode(interpolant), moduleBuilder.getNode(vertex_idx)); + if (currentBlock) + currentBlock->instructions.push_back(node); + } void onAMDShaderTrinaryMinmaxFMin3(AMDShaderTrinaryMinmax, IdResult id_result, IdResultType id_result_type, IdRef x, IdRef y, IdRef z) { @@ -14382,15 +17509,7 @@ struct ReaderContext if (currentBlock) currentBlock->instructions.push_back(node); } - void onAMDShaderExplicitVertexParameterInterpolateAtVertex(AMDShaderExplicitVertexParameter, IdResult id_result, - IdResultType id_result_type, IdRef interpolant, IdRef vertex_idx) - { - auto node = moduleBuilder.newNode(id_result.value, - moduleBuilder.getType(id_result_type), moduleBuilder.getNode(interpolant), moduleBuilder.getNode(vertex_idx)); - if (currentBlock) - currentBlock->instructions.push_back(node); - } - // 752 instructions handled + // 835 instructions handled }; struct ErrorRecorder { diff --git a/prog/gameLibs/spirv/module_writer.cpp b/prog/gameLibs/spirv/module_writer.cpp index e2e4a521d..7f68e2bc5 100644 --- a/prog/gameLibs/spirv/module_writer.cpp +++ b/prog/gameLibs/spirv/module_writer.cpp @@ -1,3 +1,5 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. + // auto generated, do not modify! #include "module_nodes.h" #include @@ -470,6 +472,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpLoad, len); writer.writeWord(value->resultType->resultId); @@ -520,6 +532,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccessAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccessNoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -572,6 +594,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpStore, len); writer.writeWord(value->pointer->resultId); @@ -621,6 +653,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccessAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccessNoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -673,6 +715,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } if (value->memoryAccess1) { @@ -719,6 +771,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpCopyMemory, len); writer.writeWord(value->target->resultId); @@ -768,6 +830,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccess0AliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccess0NoAliasINTELMask->resultId); + } } if (value->memoryAccess1) { @@ -814,6 +886,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccess1AliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccess1NoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -866,6 +948,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } if (value->memoryAccess1) { @@ -912,6 +1004,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpCopyMemorySized, len); writer.writeWord(value->target->resultId); @@ -962,6 +1064,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccess0AliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccess0NoAliasINTELMask->resultId); + } } if (value->memoryAccess1) { @@ -1008,6 +1120,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccess1AliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccess1NoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -8872,6 +8994,49 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpColorAttachmentReadEXT *value) + { + size_t len = 3; + len += value->sample ? 1 : 0; + writer.beginInstruction(Op::OpColorAttachmentReadEXT, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->attachment->resultId); + if (value->sample) + { + writer.writeWord((*value->sample)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpDepthAttachmentReadEXT *value) + { + size_t len = 2; + len += value->sample ? 1 : 0; + writer.beginInstruction(Op::OpDepthAttachmentReadEXT, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + if (value->sample) + { + writer.writeWord((*value->sample)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpStencilAttachmentReadEXT *value) + { + size_t len = 2; + len += value->sample ? 1 : 0; + writer.beginInstruction(Op::OpStencilAttachmentReadEXT, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + if (value->sample) + { + writer.writeWord((*value->sample)->resultId); + } + writer.endWrite(); + return true; + } bool operator()(NodeOpTerminateInvocation *value) { writer.beginInstruction(Op::OpTerminateInvocation, 0); @@ -8923,6 +9088,23 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpGroupNonUniformRotateKHR *value) + { + size_t len = 5; + len += value->clusterSize ? 1 : 0; + writer.beginInstruction(Op::OpGroupNonUniformRotateKHR, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(value->value->resultId); + writer.writeWord(value->delta->resultId); + if (value->clusterSize) + { + writer.writeWord((*value->clusterSize)->resultId); + } + writer.endWrite(); + return true; + } bool operator()(NodeOpSubgroupReadInvocationKHR *value) { writer.beginInstruction(Op::OpSubgroupReadInvocationKHR, 4); @@ -8933,6 +9115,22 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpExtInstWithForwardRefsKHR *value) + { + size_t len = 4; + len += value->param4.size(); + writer.beginInstruction(Op::OpExtInstWithForwardRefsKHR, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->set->resultId); + writer.writeWord(value->instruction); + for (auto &&v : value->param4) + { + writer.writeWord(v->resultId); + } + writer.endWrite(); + return true; + } bool operator()(NodeOpTraceRayKHR *value) { writer.beginInstruction(Op::OpTraceRayKHR, 11); @@ -9177,68 +9375,488 @@ struct NodeWriteVisitor writer.endWrite(); return true; } - bool operator()(NodeOpTypeRayQueryKHR *value) + bool operator()(NodeOpTypeCooperativeMatrixKHR *value) { - writer.beginInstruction(Op::OpTypeRayQueryKHR, 1); + writer.beginInstruction(Op::OpTypeCooperativeMatrixKHR, 6); writer.writeWord(value->resultId); + writer.writeWord(value->componentType->resultId); + writer.writeWord(value->scope->resultId); + writer.writeWord(value->rows->resultId); + writer.writeWord(value->columns->resultId); + writer.writeWord(value->use->resultId); writer.endWrite(); return true; } - bool operator()(NodeOpRayQueryInitializeKHR *value) - { - writer.beginInstruction(Op::OpRayQueryInitializeKHR, 8); - writer.writeWord(value->rayQuery->resultId); - writer.writeWord(value->accel->resultId); - writer.writeWord(value->rayFlags->resultId); - writer.writeWord(value->cullMask->resultId); - writer.writeWord(value->rayOrigin->resultId); - writer.writeWord(value->rayTMin->resultId); - writer.writeWord(value->rayDirection->resultId); - writer.writeWord(value->rayTMax->resultId); - writer.endWrite(); - return true; - } - bool operator()(NodeOpRayQueryTerminateKHR *value) - { - writer.beginInstruction(Op::OpRayQueryTerminateKHR, 1); - writer.writeWord(value->rayQuery->resultId); - writer.endWrite(); - return true; - } - bool operator()(NodeOpRayQueryGenerateIntersectionKHR *value) - { - writer.beginInstruction(Op::OpRayQueryGenerateIntersectionKHR, 2); - writer.writeWord(value->rayQuery->resultId); - writer.writeWord(value->hitT->resultId); - writer.endWrite(); - return true; - } - bool operator()(NodeOpRayQueryConfirmIntersectionKHR *value) - { - writer.beginInstruction(Op::OpRayQueryConfirmIntersectionKHR, 1); - writer.writeWord(value->rayQuery->resultId); - writer.endWrite(); - return true; - } - bool operator()(NodeOpRayQueryProceedKHR *value) + bool operator()(NodeOpCooperativeMatrixLoadKHR *value) { - writer.beginInstruction(Op::OpRayQueryProceedKHR, 3); + size_t len = 4; + len += value->stride ? 1 : 0; + if (value->memoryOperand) + { + ++len; + auto compare = *value->memoryOperand; + if (MemoryAccessMask::Volatile == (compare & MemoryAccessMask::Volatile)) + { + compare = compare ^ MemoryAccessMask::Volatile; + } + if (MemoryAccessMask::Aligned == (compare & MemoryAccessMask::Aligned)) + { + compare = compare ^ MemoryAccessMask::Aligned; + ++len; + } + if (MemoryAccessMask::Nontemporal == (compare & MemoryAccessMask::Nontemporal)) + { + compare = compare ^ MemoryAccessMask::Nontemporal; + } + if (MemoryAccessMask::MakePointerAvailable == (compare & MemoryAccessMask::MakePointerAvailable)) + { + compare = compare ^ MemoryAccessMask::MakePointerAvailable; + ++len; + } + if (MemoryAccessMask::MakePointerAvailableKHR == (compare & MemoryAccessMask::MakePointerAvailableKHR)) + { + compare = compare ^ MemoryAccessMask::MakePointerAvailableKHR; + ++len; + } + if (MemoryAccessMask::MakePointerVisible == (compare & MemoryAccessMask::MakePointerVisible)) + { + compare = compare ^ MemoryAccessMask::MakePointerVisible; + ++len; + } + if (MemoryAccessMask::MakePointerVisibleKHR == (compare & MemoryAccessMask::MakePointerVisibleKHR)) + { + compare = compare ^ MemoryAccessMask::MakePointerVisibleKHR; + ++len; + } + if (MemoryAccessMask::NonPrivatePointer == (compare & MemoryAccessMask::NonPrivatePointer)) + { + compare = compare ^ MemoryAccessMask::NonPrivatePointer; + } + if (MemoryAccessMask::NonPrivatePointerKHR == (compare & MemoryAccessMask::NonPrivatePointerKHR)) + { + compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; + } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } + } + writer.beginInstruction(Op::OpCooperativeMatrixLoadKHR, len); writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); - writer.writeWord(value->rayQuery->resultId); + writer.writeWord(value->pointer->resultId); + writer.writeWord(value->memoryLayout->resultId); + if (value->stride) + { + writer.writeWord((*value->stride)->resultId); + } + if (value->memoryOperand) + { + writer.writeWord(static_cast((*value->memoryOperand))); + auto compareWrite = (*value->memoryOperand); + if (MemoryAccessMask::Volatile == (compareWrite & MemoryAccessMask::Volatile)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Volatile; + } + if (MemoryAccessMask::Aligned == (compareWrite & MemoryAccessMask::Aligned)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Aligned; + writer.writeWord(static_cast(value->memoryOperandAligned.value)); + } + if (MemoryAccessMask::Nontemporal == (compareWrite & MemoryAccessMask::Nontemporal)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Nontemporal; + } + if (MemoryAccessMask::MakePointerAvailable == (compareWrite & MemoryAccessMask::MakePointerAvailable)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerAvailable; + writer.writeWord(value->memoryOperandMakePointerAvailable->resultId); + } + if (MemoryAccessMask::MakePointerAvailableKHR == (compareWrite & MemoryAccessMask::MakePointerAvailableKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerAvailableKHR; + writer.writeWord(value->memoryOperandMakePointerAvailableKHR->resultId); + } + if (MemoryAccessMask::MakePointerVisible == (compareWrite & MemoryAccessMask::MakePointerVisible)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerVisible; + writer.writeWord(value->memoryOperandMakePointerVisible->resultId); + } + if (MemoryAccessMask::MakePointerVisibleKHR == (compareWrite & MemoryAccessMask::MakePointerVisibleKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerVisibleKHR; + writer.writeWord(value->memoryOperandMakePointerVisibleKHR->resultId); + } + if (MemoryAccessMask::NonPrivatePointer == (compareWrite & MemoryAccessMask::NonPrivatePointer)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointer; + } + if (MemoryAccessMask::NonPrivatePointerKHR == (compareWrite & MemoryAccessMask::NonPrivatePointerKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; + } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryOperandAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryOperandNoAliasINTELMask->resultId); + } + } writer.endWrite(); return true; } - bool operator()(NodeOpRayQueryGetIntersectionTypeKHR *value) + bool operator()(NodeOpCooperativeMatrixStoreKHR *value) { - writer.beginInstruction(Op::OpRayQueryGetIntersectionTypeKHR, 4); - writer.writeWord(value->resultType->resultId); + size_t len = 3; + len += value->stride ? 1 : 0; + if (value->memoryOperand) + { + ++len; + auto compare = *value->memoryOperand; + if (MemoryAccessMask::Volatile == (compare & MemoryAccessMask::Volatile)) + { + compare = compare ^ MemoryAccessMask::Volatile; + } + if (MemoryAccessMask::Aligned == (compare & MemoryAccessMask::Aligned)) + { + compare = compare ^ MemoryAccessMask::Aligned; + ++len; + } + if (MemoryAccessMask::Nontemporal == (compare & MemoryAccessMask::Nontemporal)) + { + compare = compare ^ MemoryAccessMask::Nontemporal; + } + if (MemoryAccessMask::MakePointerAvailable == (compare & MemoryAccessMask::MakePointerAvailable)) + { + compare = compare ^ MemoryAccessMask::MakePointerAvailable; + ++len; + } + if (MemoryAccessMask::MakePointerAvailableKHR == (compare & MemoryAccessMask::MakePointerAvailableKHR)) + { + compare = compare ^ MemoryAccessMask::MakePointerAvailableKHR; + ++len; + } + if (MemoryAccessMask::MakePointerVisible == (compare & MemoryAccessMask::MakePointerVisible)) + { + compare = compare ^ MemoryAccessMask::MakePointerVisible; + ++len; + } + if (MemoryAccessMask::MakePointerVisibleKHR == (compare & MemoryAccessMask::MakePointerVisibleKHR)) + { + compare = compare ^ MemoryAccessMask::MakePointerVisibleKHR; + ++len; + } + if (MemoryAccessMask::NonPrivatePointer == (compare & MemoryAccessMask::NonPrivatePointer)) + { + compare = compare ^ MemoryAccessMask::NonPrivatePointer; + } + if (MemoryAccessMask::NonPrivatePointerKHR == (compare & MemoryAccessMask::NonPrivatePointerKHR)) + { + compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; + } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } + } + writer.beginInstruction(Op::OpCooperativeMatrixStoreKHR, len); + writer.writeWord(value->pointer->resultId); + writer.writeWord(value->object->resultId); + writer.writeWord(value->memoryLayout->resultId); + if (value->stride) + { + writer.writeWord((*value->stride)->resultId); + } + if (value->memoryOperand) + { + writer.writeWord(static_cast((*value->memoryOperand))); + auto compareWrite = (*value->memoryOperand); + if (MemoryAccessMask::Volatile == (compareWrite & MemoryAccessMask::Volatile)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Volatile; + } + if (MemoryAccessMask::Aligned == (compareWrite & MemoryAccessMask::Aligned)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Aligned; + writer.writeWord(static_cast(value->memoryOperandAligned.value)); + } + if (MemoryAccessMask::Nontemporal == (compareWrite & MemoryAccessMask::Nontemporal)) + { + compareWrite = compareWrite ^ MemoryAccessMask::Nontemporal; + } + if (MemoryAccessMask::MakePointerAvailable == (compareWrite & MemoryAccessMask::MakePointerAvailable)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerAvailable; + writer.writeWord(value->memoryOperandMakePointerAvailable->resultId); + } + if (MemoryAccessMask::MakePointerAvailableKHR == (compareWrite & MemoryAccessMask::MakePointerAvailableKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerAvailableKHR; + writer.writeWord(value->memoryOperandMakePointerAvailableKHR->resultId); + } + if (MemoryAccessMask::MakePointerVisible == (compareWrite & MemoryAccessMask::MakePointerVisible)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerVisible; + writer.writeWord(value->memoryOperandMakePointerVisible->resultId); + } + if (MemoryAccessMask::MakePointerVisibleKHR == (compareWrite & MemoryAccessMask::MakePointerVisibleKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::MakePointerVisibleKHR; + writer.writeWord(value->memoryOperandMakePointerVisibleKHR->resultId); + } + if (MemoryAccessMask::NonPrivatePointer == (compareWrite & MemoryAccessMask::NonPrivatePointer)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointer; + } + if (MemoryAccessMask::NonPrivatePointerKHR == (compareWrite & MemoryAccessMask::NonPrivatePointerKHR)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; + } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryOperandAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryOperandNoAliasINTELMask->resultId); + } + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpCooperativeMatrixMulAddKHR *value) + { + size_t len = 5; + len += value->cooperativeMatrixOperands ? 1 : 0; + writer.beginInstruction(Op::OpCooperativeMatrixMulAddKHR, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->a->resultId); + writer.writeWord(value->b->resultId); + writer.writeWord(value->c->resultId); + if (value->cooperativeMatrixOperands) + { + writer.writeWord(static_cast((*value->cooperativeMatrixOperands))); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpCooperativeMatrixLengthKHR *value) + { + writer.beginInstruction(Op::OpCooperativeMatrixLengthKHR, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->type->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpConstantCompositeReplicateEXT *value) + { + writer.beginInstruction(Op::OpConstantCompositeReplicateEXT, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpSpecConstantCompositeReplicateEXT *value) + { + writer.beginInstruction(Op::OpSpecConstantCompositeReplicateEXT, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpCompositeConstructReplicateEXT *value) + { + writer.beginInstruction(Op::OpCompositeConstructReplicateEXT, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpTypeRayQueryKHR *value) + { + writer.beginInstruction(Op::OpTypeRayQueryKHR, 1); + writer.writeWord(value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryInitializeKHR *value) + { + writer.beginInstruction(Op::OpRayQueryInitializeKHR, 8); + writer.writeWord(value->rayQuery->resultId); + writer.writeWord(value->accel->resultId); + writer.writeWord(value->rayFlags->resultId); + writer.writeWord(value->cullMask->resultId); + writer.writeWord(value->rayOrigin->resultId); + writer.writeWord(value->rayTMin->resultId); + writer.writeWord(value->rayDirection->resultId); + writer.writeWord(value->rayTMax->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryTerminateKHR *value) + { + writer.beginInstruction(Op::OpRayQueryTerminateKHR, 1); + writer.writeWord(value->rayQuery->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryGenerateIntersectionKHR *value) + { + writer.beginInstruction(Op::OpRayQueryGenerateIntersectionKHR, 2); + writer.writeWord(value->rayQuery->resultId); + writer.writeWord(value->hitT->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryConfirmIntersectionKHR *value) + { + writer.beginInstruction(Op::OpRayQueryConfirmIntersectionKHR, 1); + writer.writeWord(value->rayQuery->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryProceedKHR *value) + { + writer.beginInstruction(Op::OpRayQueryProceedKHR, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->rayQuery->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpRayQueryGetIntersectionTypeKHR *value) + { + writer.beginInstruction(Op::OpRayQueryGetIntersectionTypeKHR, 4); + writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); writer.writeWord(value->rayQuery->resultId); writer.writeWord(value->intersection->resultId); writer.endWrite(); return true; } + bool operator()(NodeOpImageSampleWeightedQCOM *value) + { + writer.beginInstruction(Op::OpImageSampleWeightedQCOM, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->texture->resultId); + writer.writeWord(value->coordinates->resultId); + writer.writeWord(value->weights->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBoxFilterQCOM *value) + { + writer.beginInstruction(Op::OpImageBoxFilterQCOM, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->texture->resultId); + writer.writeWord(value->coordinates->resultId); + writer.writeWord(value->boxSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchSSDQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchSSDQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->target->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->reference->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchSADQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchSADQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->target->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->reference->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchWindowSSDQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchWindowSSDQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->targetSampledImage->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->referenceSampledImage->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchWindowSADQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchWindowSADQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->targetSampledImage->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->referenceSampledImage->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchGatherSSDQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchGatherSSDQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->targetSampledImage->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->referenceSampledImage->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageBlockMatchGatherSADQCOM *value) + { + writer.beginInstruction(Op::OpImageBlockMatchGatherSADQCOM, 7); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->targetSampledImage->resultId); + writer.writeWord(value->targetCoordinates->resultId); + writer.writeWord(value->referenceSampledImage->resultId); + writer.writeWord(value->referenceCoordinates->resultId); + writer.writeWord(value->blockSize->resultId); + writer.endWrite(); + return true; + } bool operator()(NodeOpGroupIAddNonUniformAMD *value) { writer.beginInstruction(Op::OpGroupIAddNonUniformAMD, 5); @@ -9357,17 +9975,426 @@ struct NodeWriteVisitor writer.endWrite(); return true; } - bool operator()(NodeOpImageSampleFootprintNV *value) + bool operator()(NodeOpFinalizeNodePayloadsAMDX *value) { - size_t len = 6; - if (value->imageOperands) - { - ++len; - auto compare = *value->imageOperands; - if (ImageOperandsMask::Bias == (compare & ImageOperandsMask::Bias)) - { - compare = compare ^ ImageOperandsMask::Bias; - ++len; + writer.beginInstruction(Op::OpFinalizeNodePayloadsAMDX, 1); + writer.writeWord(value->payloadArray->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpFinishWritingNodePayloadAMDX *value) + { + writer.beginInstruction(Op::OpFinishWritingNodePayloadAMDX, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->payload->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpInitializeNodePayloadsAMDX *value) + { + writer.beginInstruction(Op::OpInitializeNodePayloadsAMDX, 4); + writer.writeWord(value->payloadArray->resultId); + writer.writeWord(value->visibility->resultId); + writer.writeWord(value->payloadCount->resultId); + writer.writeWord(value->nodeIndex->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupNonUniformQuadAllKHR *value) + { + writer.beginInstruction(Op::OpGroupNonUniformQuadAllKHR, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->predicate->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupNonUniformQuadAnyKHR *value) + { + writer.beginInstruction(Op::OpGroupNonUniformQuadAnyKHR, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->predicate->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordHitMotionNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordHitMotionNV, 14); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->primitiveId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->hitKind->resultId); + writer.writeWord(value->sbtRecordOffset->resultId); + writer.writeWord(value->sbtRecordStride->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->currentTime->resultId); + writer.writeWord(value->hitobjectAttributes->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordHitWithIndexMotionNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordHitWithIndexMotionNV, 13); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->primitiveId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->hitKind->resultId); + writer.writeWord(value->sbtRecordIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->currentTime->resultId); + writer.writeWord(value->hitobjectAttributes->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordMissMotionNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordMissMotionNV, 7); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->sbtIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->currentTime->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetWorldToObjectNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetWorldToObjectNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetObjectToWorldNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetObjectToWorldNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetObjectRayDirectionNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetObjectRayDirectionNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetObjectRayOriginNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetObjectRayOriginNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectTraceRayMotionNV *value) + { + writer.beginInstruction(Op::OpHitObjectTraceRayMotionNV, 13); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->rayFlags->resultId); + writer.writeWord(value->cullmask->resultId); + writer.writeWord(value->sbtRecordOffset->resultId); + writer.writeWord(value->sbtRecordStride->resultId); + writer.writeWord(value->missIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->time->resultId); + writer.writeWord(value->payload->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetShaderRecordBufferHandleNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetShaderRecordBufferHandleNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetShaderBindingTableRecordIndexNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetShaderBindingTableRecordIndexNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordEmptyNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordEmptyNV, 1); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectTraceRayNV *value) + { + writer.beginInstruction(Op::OpHitObjectTraceRayNV, 12); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->rayFlags->resultId); + writer.writeWord(value->cullmask->resultId); + writer.writeWord(value->sbtRecordOffset->resultId); + writer.writeWord(value->sbtRecordStride->resultId); + writer.writeWord(value->missIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->payload->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordHitNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordHitNV, 13); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->primitiveId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->hitKind->resultId); + writer.writeWord(value->sbtRecordOffset->resultId); + writer.writeWord(value->sbtRecordStride->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->hitobjectAttributes->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordHitWithIndexNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordHitWithIndexNV, 12); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->accelerationStructure->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->primitiveId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->hitKind->resultId); + writer.writeWord(value->sbtRecordIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.writeWord(value->hitobjectAttributes->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectRecordMissNV *value) + { + writer.beginInstruction(Op::OpHitObjectRecordMissNV, 6); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->sbtIndex->resultId); + writer.writeWord(value->origin->resultId); + writer.writeWord(value->tMin->resultId); + writer.writeWord(value->direction->resultId); + writer.writeWord(value->tMax->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectExecuteShaderNV *value) + { + writer.beginInstruction(Op::OpHitObjectExecuteShaderNV, 2); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->payload->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetCurrentTimeNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetCurrentTimeNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetAttributesNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetAttributesNV, 2); + writer.writeWord(value->hitObject->resultId); + writer.writeWord(value->hitObjectAttribute->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetHitKindNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetHitKindNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetPrimitiveIndexNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetPrimitiveIndexNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetGeometryIndexNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetGeometryIndexNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetInstanceIdNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetInstanceIdNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetInstanceCustomIndexNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetInstanceCustomIndexNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetWorldRayDirectionNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetWorldRayDirectionNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetWorldRayOriginNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetWorldRayOriginNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetRayTMaxNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetRayTMaxNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectGetRayTMinNV *value) + { + writer.beginInstruction(Op::OpHitObjectGetRayTMinNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectIsEmptyNV *value) + { + writer.beginInstruction(Op::OpHitObjectIsEmptyNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectIsHitNV *value) + { + writer.beginInstruction(Op::OpHitObjectIsHitNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpHitObjectIsMissNV *value) + { + writer.beginInstruction(Op::OpHitObjectIsMissNV, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hitObject->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpReorderThreadWithHitObjectNV *value) + { + size_t len = 1; + len += value->hint ? 1 : 0; + len += value->bits ? 1 : 0; + writer.beginInstruction(Op::OpReorderThreadWithHitObjectNV, len); + writer.writeWord(value->hitObject->resultId); + if (value->hint) + { + writer.writeWord((*value->hint)->resultId); + } + if (value->bits) + { + writer.writeWord((*value->bits)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpReorderThreadWithHintNV *value) + { + writer.beginInstruction(Op::OpReorderThreadWithHintNV, 2); + writer.writeWord(value->hint->resultId); + writer.writeWord(value->bits->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpTypeHitObjectNV *value) + { + writer.beginInstruction(Op::OpTypeHitObjectNV, 1); + writer.writeWord(value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpImageSampleFootprintNV *value) + { + size_t len = 6; + if (value->imageOperands) + { + ++len; + auto compare = *value->imageOperands; + if (ImageOperandsMask::Bias == (compare & ImageOperandsMask::Bias)) + { + compare = compare ^ ImageOperandsMask::Bias; + ++len; } if (ImageOperandsMask::Lod == (compare & ImageOperandsMask::Lod)) { @@ -9568,6 +10595,29 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpEmitMeshTasksEXT *value) + { + size_t len = 3; + len += value->payload ? 1 : 0; + writer.beginInstruction(Op::OpEmitMeshTasksEXT, len); + writer.writeWord(value->groupCountX->resultId); + writer.writeWord(value->groupCountY->resultId); + writer.writeWord(value->groupCountZ->resultId); + if (value->payload) + { + writer.writeWord((*value->payload)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpSetMeshOutputsEXT *value) + { + writer.beginInstruction(Op::OpSetMeshOutputsEXT, 2); + writer.writeWord(value->vertexCount->resultId); + writer.writeWord(value->primitiveCount->resultId); + writer.endWrite(); + return true; + } bool operator()(NodeOpGroupNonUniformPartitionNV *value) { writer.beginInstruction(Op::OpGroupNonUniformPartitionNV, 3); @@ -9585,22 +10635,48 @@ struct NodeWriteVisitor writer.endWrite(); return true; } - bool operator()(NodeOpReportIntersectionNV *value) + bool operator()(NodeOpFetchMicroTriangleVertexPositionNV *value) { - writer.beginInstruction(Op::OpReportIntersectionNV, 4); + writer.beginInstruction(Op::OpFetchMicroTriangleVertexPositionNV, 7); writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); - writer.writeWord(value->hit->resultId); - writer.writeWord(value->hitKind->resultId); + writer.writeWord(value->accel->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->primitiveIndex->resultId); + writer.writeWord(value->barycentric->resultId); writer.endWrite(); return true; } - bool operator()(NodeOpReportIntersectionKHR *value) + bool operator()(NodeOpFetchMicroTriangleVertexBarycentricNV *value) { - writer.beginInstruction(Op::OpReportIntersectionKHR, 4); + writer.beginInstruction(Op::OpFetchMicroTriangleVertexBarycentricNV, 7); writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); - writer.writeWord(value->hit->resultId); + writer.writeWord(value->accel->resultId); + writer.writeWord(value->instanceId->resultId); + writer.writeWord(value->geometryIndex->resultId); + writer.writeWord(value->primitiveIndex->resultId); + writer.writeWord(value->barycentric->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpReportIntersectionKHR *value) + { + writer.beginInstruction(Op::OpReportIntersectionKHR, 4); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hit->resultId); + writer.writeWord(value->hitKind->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpReportIntersectionNV *value) + { + writer.beginInstruction(Op::OpReportIntersectionNV, 4); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->hit->resultId); writer.writeWord(value->hitKind->resultId); writer.endWrite(); return true; @@ -9670,10 +10746,13 @@ struct NodeWriteVisitor writer.endWrite(); return true; } - bool operator()(NodeOpTypeAccelerationStructureNV *value) + bool operator()(NodeOpRayQueryGetIntersectionTriangleVertexPositionsKHR *value) { - writer.beginInstruction(Op::OpTypeAccelerationStructureNV, 1); + writer.beginInstruction(Op::OpRayQueryGetIntersectionTriangleVertexPositionsKHR, 4); + writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); + writer.writeWord(value->rayQuery->resultId); + writer.writeWord(value->intersection->resultId); writer.endWrite(); return true; } @@ -9684,6 +10763,13 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpTypeAccelerationStructureNV *value) + { + writer.beginInstruction(Op::OpTypeAccelerationStructureNV, 1); + writer.writeWord(value->resultId); + writer.endWrite(); + return true; + } bool operator()(NodeOpExecuteCallableNV *value) { writer.beginInstruction(Op::OpExecuteCallableNV, 2); @@ -9751,6 +10837,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpCooperativeMatrixLoadNV, len); writer.writeWord(value->resultType->resultId); @@ -9803,6 +10899,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccessAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccessNoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -9855,6 +10961,16 @@ struct NodeWriteVisitor { compare = compare ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compare & MemoryAccessMask::AliasScopeINTELMask)) + { + compare = compare ^ MemoryAccessMask::AliasScopeINTELMask; + ++len; + } + if (MemoryAccessMask::NoAliasINTELMask == (compare & MemoryAccessMask::NoAliasINTELMask)) + { + compare = compare ^ MemoryAccessMask::NoAliasINTELMask; + ++len; + } } writer.beginInstruction(Op::OpCooperativeMatrixStoreNV, len); writer.writeWord(value->pointer->resultId); @@ -9906,6 +11022,16 @@ struct NodeWriteVisitor { compareWrite = compareWrite ^ MemoryAccessMask::NonPrivatePointerKHR; } + if (MemoryAccessMask::AliasScopeINTELMask == (compareWrite & MemoryAccessMask::AliasScopeINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::AliasScopeINTELMask; + writer.writeWord(value->memoryAccessAliasScopeINTELMask->resultId); + } + if (MemoryAccessMask::NoAliasINTELMask == (compareWrite & MemoryAccessMask::NoAliasINTELMask)) + { + compareWrite = compareWrite ^ MemoryAccessMask::NoAliasINTELMask; + writer.writeWord(value->memoryAccessNoAliasINTELMask->resultId); + } } writer.endWrite(); return true; @@ -10016,6 +11142,24 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpRawAccessChainNV *value) + { + size_t len = 6; + len += value->rawAccessChainOperands ? 1 : 0; + writer.beginInstruction(Op::OpRawAccessChainNV, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->base->resultId); + writer.writeWord(value->byteStride->resultId); + writer.writeWord(value->elementIndex->resultId); + writer.writeWord(value->byteOffset->resultId); + if (value->rawAccessChainOperands) + { + writer.writeWord(static_cast((*value->rawAccessChainOperands))); + } + writer.endWrite(); + return true; + } bool operator()(NodeOpSubgroupShuffleINTEL *value) { writer.beginInstruction(Op::OpSubgroupShuffleINTEL, 4); @@ -11528,7 +12672,7 @@ struct NodeWriteVisitor writer.beginInstruction(Op::OpVariableLengthArrayINTEL, 3); writer.writeWord(value->resultType->resultId); writer.writeWord(value->resultId); - writer.writeWord(value->length->resultId); + writer.writeWord(value->lenght->resultId); writer.endWrite(); return true; } @@ -12128,6 +13272,46 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpAliasDomainDeclINTEL *value) + { + size_t len = 1; + len += value->name ? 1 : 0; + writer.beginInstruction(Op::OpAliasDomainDeclINTEL, len); + writer.writeWord(value->resultId); + if (value->name) + { + writer.writeWord((*value->name)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpAliasScopeDeclINTEL *value) + { + size_t len = 2; + len += value->name ? 1 : 0; + writer.beginInstruction(Op::OpAliasScopeDeclINTEL, len); + writer.writeWord(value->resultId); + writer.writeWord(value->aliasDomain->resultId); + if (value->name) + { + writer.writeWord((*value->name)->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpAliasScopeListDeclINTEL *value) + { + size_t len = 1; + len += value->aliasscope1Aliasscope2.size(); + writer.beginInstruction(Op::OpAliasScopeListDeclINTEL, len); + writer.writeWord(value->resultId); + for (auto &&v : value->aliasscope1Aliasscope2) + { + writer.writeWord(v->resultId); + } + writer.endWrite(); + return true; + } bool operator()(NodeOpFixedSqrtINTEL *value) { writer.beginInstruction(Op::OpFixedSqrtINTEL, 9); @@ -12562,6 +13746,166 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpCompositeConstructContinuedINTEL *value) + { + size_t len = 2; + len += value->constituents.size(); + writer.beginInstruction(Op::OpCompositeConstructContinuedINTEL, len); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + for (auto &&v : value->constituents) + { + writer.writeWord(v->resultId); + } + writer.endWrite(); + return true; + } + bool operator()(NodeOpConvertFToBF16INTEL *value) + { + writer.beginInstruction(Op::OpConvertFToBF16INTEL, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->floatValue->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpConvertBF16ToFINTEL *value) + { + writer.beginInstruction(Op::OpConvertBF16ToFINTEL, 3); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->bfloat16Value->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpControlBarrierArriveINTEL *value) + { + writer.beginInstruction(Op::OpControlBarrierArriveINTEL, 3); + writer.writeWord(value->execution->resultId); + writer.writeWord(value->memory->resultId); + writer.writeWord(value->semantics->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpControlBarrierWaitINTEL *value) + { + writer.beginInstruction(Op::OpControlBarrierWaitINTEL, 3); + writer.writeWord(value->execution->resultId); + writer.writeWord(value->memory->resultId); + writer.writeWord(value->semantics->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupIMulKHR *value) + { + writer.beginInstruction(Op::OpGroupIMulKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupFMulKHR *value) + { + writer.beginInstruction(Op::OpGroupFMulKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupBitwiseAndKHR *value) + { + writer.beginInstruction(Op::OpGroupBitwiseAndKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupBitwiseOrKHR *value) + { + writer.beginInstruction(Op::OpGroupBitwiseOrKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupBitwiseXorKHR *value) + { + writer.beginInstruction(Op::OpGroupBitwiseXorKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupLogicalAndKHR *value) + { + writer.beginInstruction(Op::OpGroupLogicalAndKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupLogicalOrKHR *value) + { + writer.beginInstruction(Op::OpGroupLogicalOrKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpGroupLogicalXorKHR *value) + { + writer.beginInstruction(Op::OpGroupLogicalXorKHR, 5); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->execution->resultId); + writer.writeWord(static_cast(value->operation)); + writer.writeWord(value->x->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpMaskedGatherINTEL *value) + { + writer.beginInstruction(Op::OpMaskedGatherINTEL, 6); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(value->ptrVector->resultId); + writer.writeWord(value->alignment.value); + writer.writeWord(value->mask->resultId); + writer.writeWord(value->fillEmpty->resultId); + writer.endWrite(); + return true; + } + bool operator()(NodeOpMaskedScatterINTEL *value) + { + writer.beginInstruction(Op::OpMaskedScatterINTEL, 4); + writer.writeWord(value->inputVector->resultId); + writer.writeWord(value->ptrVector->resultId); + writer.writeWord(value->alignment.value); + writer.writeWord(value->mask->resultId); + writer.endWrite(); + return true; + } bool operator()(NodeOpGLSLstd450Round *value) { writer.beginInstruction(Op::OpExtInst, 5); @@ -13572,6 +14916,18 @@ struct NodeWriteVisitor writer.endWrite(); return true; } + bool operator()(NodeOpAMDShaderExplicitVertexParameterInterpolateAtVertex *value) + { + writer.beginInstruction(Op::OpExtInst, 6); + writer.writeWord(value->resultType->resultId); + writer.writeWord(value->resultId); + writer.writeWord(builder.getExtendedGrammarIdRef(value->grammarId)); + writer.writeWord(static_cast(value->extOpCode)); + writer.writeWord(value->interpolant->resultId); + writer.writeWord(value->vertexIdx->resultId); + writer.endWrite(); + return true; + } bool operator()(NodeOpAMDShaderTrinaryMinmaxFMin3 *value) { writer.beginInstruction(Op::OpExtInst, 7); @@ -13689,18 +15045,6 @@ struct NodeWriteVisitor writer.endWrite(); return true; } - bool operator()(NodeOpAMDShaderExplicitVertexParameterInterpolateAtVertex *value) - { - writer.beginInstruction(Op::OpExtInst, 6); - writer.writeWord(value->resultType->resultId); - writer.writeWord(value->resultId); - writer.writeWord(builder.getExtendedGrammarIdRef(value->grammarId)); - writer.writeWord(static_cast(value->extOpCode)); - writer.writeWord(value->interpolant->resultId); - writer.writeWord(value->vertexIdx->resultId); - writer.endWrite(); - return true; - } // generic nodes do nothing, should never be called anyways bool operator()(Node *value) { return false; } bool operator()(NodeId *value) { return false; } @@ -13748,7 +15092,7 @@ struct CanWriteTypeCheckVisitor bool operator()(T *value) { canWrite = true; - value->visitRefs([&, this](auto node) // + value->visitRefs([&](auto node) // { if (writtenTypes.has(node->resultId)) return; @@ -14108,6 +15452,27 @@ struct ExecutionModeWriteVisitor target.writeWord(value->zSizeHint->resultId); target.endWrite(); } + void operator()(const ExecutionModeNonCoherentColorAttachmentReadEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::NonCoherentColorAttachmentReadEXT)); + target.endWrite(); + } + void operator()(const ExecutionModeNonCoherentDepthAttachmentReadEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::NonCoherentDepthAttachmentReadEXT)); + target.endWrite(); + } + void operator()(const ExecutionModeNonCoherentStencilAttachmentReadEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::NonCoherentStencilAttachmentReadEXT)); + target.endWrite(); + } void operator()(const ExecutionModeSubgroupUniformControlFlowKHR *value) { target.beginInstruction(Op::OpExecutionMode, 2); @@ -14162,18 +15527,139 @@ struct ExecutionModeWriteVisitor target.writeWord(static_cast(value->targetWidth.value)); target.endWrite(); } - void operator()(const ExecutionModeStencilRefReplacingEXT *value) + void operator()(const ExecutionModeEarlyAndLateFragmentTestsAMD *value) { target.beginInstruction(Op::OpExecutionMode, 2); target.writeWord(function->resultId); - target.writeWord(static_cast(ExecutionMode::StencilRefReplacingEXT)); + target.writeWord(static_cast(ExecutionMode::EarlyAndLateFragmentTestsAMD)); target.endWrite(); } - void operator()(const ExecutionModeOutputLinesNV *value) + void operator()(const ExecutionModeStencilRefReplacingEXT *value) { target.beginInstruction(Op::OpExecutionMode, 2); target.writeWord(function->resultId); - target.writeWord(static_cast(ExecutionMode::OutputLinesNV)); + target.writeWord(static_cast(ExecutionMode::StencilRefReplacingEXT)); + target.endWrite(); + } + void operator()(const ExecutionModeCoalescingAMDX *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::CoalescingAMDX)); + target.endWrite(); + } + void operator()(const ExecutionModeMaxNodeRecursionAMDX *value) + { + target.beginInstruction(Op::OpExecutionModeId, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::MaxNodeRecursionAMDX)); + target.writeWord(value->numberOfRecursions->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeStaticNumWorkgroupsAMDX *value) + { + target.beginInstruction(Op::OpExecutionModeId, 5); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StaticNumWorkgroupsAMDX)); + target.writeWord(value->xSize->resultId); + target.writeWord(value->ySize->resultId); + target.writeWord(value->zSize->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeShaderIndexAMDX *value) + { + target.beginInstruction(Op::OpExecutionModeId, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::ShaderIndexAMDX)); + target.writeWord(value->shaderIndex->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeMaxNumWorkgroupsAMDX *value) + { + target.beginInstruction(Op::OpExecutionModeId, 5); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::MaxNumWorkgroupsAMDX)); + target.writeWord(value->xSize->resultId); + target.writeWord(value->ySize->resultId); + target.writeWord(value->zSize->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefUnchangedFrontAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefUnchangedFrontAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefGreaterFrontAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefGreaterFrontAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefLessFrontAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefLessFrontAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefUnchangedBackAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefUnchangedBackAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefGreaterBackAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefGreaterBackAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeStencilRefLessBackAMD *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StencilRefLessBackAMD)); + target.endWrite(); + } + void operator()(const ExecutionModeQuadDerivativesKHR *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::QuadDerivativesKHR)); + target.endWrite(); + } + void operator()(const ExecutionModeRequireFullQuadsKHR *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::RequireFullQuadsKHR)); + target.endWrite(); + } + void operator()(const ExecutionModeOutputLinesEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::OutputLinesEXT)); + target.endWrite(); + } + void operator()(const ExecutionModeOutputLinesNV *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::OutputLinesNV)); + target.endWrite(); + } + void operator()(const ExecutionModeOutputPrimitivesEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::OutputPrimitivesEXT)); + target.writeWord(static_cast(value->primitiveCount.value)); target.endWrite(); } void operator()(const ExecutionModeOutputPrimitivesNV *value) @@ -14198,6 +15684,13 @@ struct ExecutionModeWriteVisitor target.writeWord(static_cast(ExecutionMode::DerivativeGroupLinearNV)); target.endWrite(); } + void operator()(const ExecutionModeOutputTrianglesEXT *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::OutputTrianglesEXT)); + target.endWrite(); + } void operator()(const ExecutionModeOutputTrianglesNV *value) { target.beginInstruction(Op::OpExecutionMode, 2); @@ -14328,6 +15821,70 @@ struct ExecutionModeWriteVisitor target.writeWord(static_cast(value->target_fmax.value)); target.endWrite(); } + void operator()(const ExecutionModeMaximallyReconvergesKHR *value) + { + target.beginInstruction(Op::OpExecutionMode, 2); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::MaximallyReconvergesKHR)); + target.endWrite(); + } + void operator()(const ExecutionModeFPFastMathDefault *value) + { + target.beginInstruction(Op::OpExecutionModeId, 4); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::FPFastMathDefault)); + target.writeWord(value->targetType->resultId); + target.writeWord(value->fastMathMode->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeStreamingInterfaceINTEL *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::StreamingInterfaceINTEL)); + target.writeWord(static_cast(value->stallFreeReturn.value)); + target.endWrite(); + } + void operator()(const ExecutionModeRegisterMapInterfaceINTEL *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::RegisterMapInterfaceINTEL)); + target.writeWord(static_cast(value->waitForDoneWrite.value)); + target.endWrite(); + } + void operator()(const ExecutionModeNamedBarrierCountINTEL *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::NamedBarrierCountINTEL)); + target.writeWord(static_cast(value->barrierCount.value)); + target.endWrite(); + } + void operator()(const ExecutionModeMaximumRegistersINTEL *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::MaximumRegistersINTEL)); + target.writeWord(static_cast(value->numberOfRegisters.value)); + target.endWrite(); + } + void operator()(const ExecutionModeMaximumRegistersIdINTEL *value) + { + target.beginInstruction(Op::OpExecutionModeId, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::MaximumRegistersIdINTEL)); + target.writeWord(value->numberOfRegisters->resultId); + target.endWrite(); + } + void operator()(const ExecutionModeNamedMaximumRegistersINTEL *value) + { + target.beginInstruction(Op::OpExecutionMode, 3); + target.writeWord(function->resultId); + target.writeWord(static_cast(ExecutionMode::NamedMaximumRegistersINTEL)); + target.writeWord((uint32_t)(value->namedMaximumNumberOfRegisters)); + target.endWrite(); + } }; void encodeExecutionMode(ModuleBuilder &module, WordWriter &writer) { @@ -14482,1769 +16039,2387 @@ struct DecorationWriteVisitor { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::BufferBlock)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::BufferBlock)); + } + target.endWrite(); + } + void operator()(const PropertyRowMajor *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::RowMajor)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::RowMajor)); + } + target.endWrite(); + } + void operator()(const PropertyColMajor *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::ColMajor)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::ColMajor)); + } + target.endWrite(); + } + void operator()(const PropertyArrayStride *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::ArrayStride)); + target.writeWord(static_cast(value->arrayStride.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::ArrayStride)); + target.writeWord(static_cast(value->arrayStride.value)); + } + target.endWrite(); + } + void operator()(const PropertyMatrixStride *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::MatrixStride)); + target.writeWord(static_cast(value->matrixStride.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::MatrixStride)); + target.writeWord(static_cast(value->matrixStride.value)); + } + target.endWrite(); + } + void operator()(const PropertyGLSLShared *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::GLSLShared)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::GLSLShared)); + } + target.endWrite(); + } + void operator()(const PropertyGLSLPacked *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::GLSLPacked)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::GLSLPacked)); + } + target.endWrite(); + } + void operator()(const PropertyCPacked *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::CPacked)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::CPacked)); + } + target.endWrite(); + } + void operator()(const PropertyBuiltIn *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::BuiltIn)); + target.writeWord(static_cast(value->builtIn)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::BuiltIn)); + target.writeWord(static_cast(value->builtIn)); + } + target.endWrite(); + } + void operator()(const PropertyNoPerspective *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::NoPerspective)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NoPerspective)); + } + target.endWrite(); + } + void operator()(const PropertyFlat *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Flat)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Flat)); + } + target.endWrite(); + } + void operator()(const PropertyPatch *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Patch)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Patch)); + } + target.endWrite(); + } + void operator()(const PropertyCentroid *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Centroid)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Centroid)); + } + target.endWrite(); + } + void operator()(const PropertySample *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Sample)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Sample)); + } + target.endWrite(); + } + void operator()(const PropertyInvariant *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Invariant)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Invariant)); + } + target.endWrite(); + } + void operator()(const PropertyRestrict *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Restrict)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Restrict)); + } + target.endWrite(); + } + void operator()(const PropertyAliased *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Aliased)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Aliased)); + } + target.endWrite(); + } + void operator()(const PropertyVolatile *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Volatile)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Volatile)); + } + target.endWrite(); + } + void operator()(const PropertyConstant *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Constant)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Constant)); + } + target.endWrite(); + } + void operator()(const PropertyCoherent *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Coherent)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Coherent)); + } + target.endWrite(); + } + void operator()(const PropertyNonWritable *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::NonWritable)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NonWritable)); + } + target.endWrite(); + } + void operator()(const PropertyNonReadable *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::NonReadable)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NonReadable)); + } + target.endWrite(); + } + void operator()(const PropertyUniform *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Uniform)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Uniform)); + } + target.endWrite(); + } + void operator()(const PropertyUniformId *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::UniformId)); + target.writeWord(value->execution->resultId); + target.endWrite(); + } + void operator()(const PropertySaturatedConversion *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::SaturatedConversion)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::SaturatedConversion)); + } + target.endWrite(); + } + void operator()(const PropertyStream *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Stream)); + target.writeWord(static_cast(value->streamNumber.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Stream)); + target.writeWord(static_cast(value->streamNumber.value)); + } + target.endWrite(); + } + void operator()(const PropertyLocation *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Location)); + target.writeWord(static_cast(value->location.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Location)); + target.writeWord(static_cast(value->location.value)); + } + target.endWrite(); + } + void operator()(const PropertyComponent *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Component)); + target.writeWord(static_cast(value->component.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Component)); + target.writeWord(static_cast(value->component.value)); + } + target.endWrite(); + } + void operator()(const PropertyIndex *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Index)); + target.writeWord(static_cast(value->index.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Index)); + target.writeWord(static_cast(value->index.value)); + } + target.endWrite(); + } + void operator()(const PropertyBinding *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::Binding)); + target.writeWord(static_cast(value->bindingPoint.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::Binding)); + target.writeWord(static_cast(value->bindingPoint.value)); + } + target.endWrite(); + } + void operator()(const PropertyDescriptorSet *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::DescriptorSet)); + target.writeWord(static_cast(value->descriptorSet.value)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::DescriptorSet)); + target.writeWord(static_cast(value->descriptorSet.value)); + } + target.endWrite(); + } + void operator()(const PropertyOffset *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BufferBlock)); + target.writeWord(static_cast(Decoration::Offset)); + target.writeWord(static_cast(value->byteOffset.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BufferBlock)); + target.writeWord(static_cast(Decoration::Offset)); + target.writeWord(static_cast(value->byteOffset.value)); } target.endWrite(); } - void operator()(const PropertyRowMajor *value) + void operator()(const PropertyXfbBuffer *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::RowMajor)); + target.writeWord(static_cast(Decoration::XfbBuffer)); + target.writeWord(static_cast(value->xfbBufferNumber.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::RowMajor)); + target.writeWord(static_cast(Decoration::XfbBuffer)); + target.writeWord(static_cast(value->xfbBufferNumber.value)); } target.endWrite(); } - void operator()(const PropertyColMajor *value) + void operator()(const PropertyXfbStride *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ColMajor)); + target.writeWord(static_cast(Decoration::XfbStride)); + target.writeWord(static_cast(value->xfbStride.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ColMajor)); + target.writeWord(static_cast(Decoration::XfbStride)); + target.writeWord(static_cast(value->xfbStride.value)); } target.endWrite(); } - void operator()(const PropertyArrayStride *value) + void operator()(const PropertyFuncParamAttr *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ArrayStride)); - target.writeWord(static_cast(value->arrayStride.value)); + target.writeWord(static_cast(Decoration::FuncParamAttr)); + target.writeWord(static_cast(value->functionParameterAttribute)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ArrayStride)); - target.writeWord(static_cast(value->arrayStride.value)); + target.writeWord(static_cast(Decoration::FuncParamAttr)); + target.writeWord(static_cast(value->functionParameterAttribute)); } target.endWrite(); } - void operator()(const PropertyMatrixStride *value) + void operator()(const PropertyFPRoundingMode *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MatrixStride)); - target.writeWord(static_cast(value->matrixStride.value)); + target.writeWord(static_cast(Decoration::FPRoundingMode)); + target.writeWord(static_cast(value->floatingPointRoundingMode)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MatrixStride)); - target.writeWord(static_cast(value->matrixStride.value)); + target.writeWord(static_cast(Decoration::FPRoundingMode)); + target.writeWord(static_cast(value->floatingPointRoundingMode)); } target.endWrite(); } - void operator()(const PropertyGLSLShared *value) + void operator()(const PropertyFPFastMathMode *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::GLSLShared)); + target.writeWord(static_cast(Decoration::FPFastMathMode)); + target.writeWord(static_cast(value->fastMathMode)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::GLSLShared)); + target.writeWord(static_cast(Decoration::FPFastMathMode)); + target.writeWord(static_cast(value->fastMathMode)); } target.endWrite(); } - void operator()(const PropertyGLSLPacked *value) + void operator()(const PropertyLinkageAttributes *value) { + size_t length = 0; + length += (value->name.length() + sizeof(unsigned)) / sizeof(unsigned); + ++length; if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::GLSLPacked)); + target.writeWord(static_cast(Decoration::LinkageAttributes)); + target.writeString(value->name.c_str()); + target.writeWord(static_cast(value->linkageType)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::GLSLPacked)); + target.writeWord(static_cast(Decoration::LinkageAttributes)); + target.writeString(value->name.c_str()); + target.writeWord(static_cast(value->linkageType)); } target.endWrite(); } - void operator()(const PropertyCPacked *value) + void operator()(const PropertyNoContraction *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::CPacked)); + target.writeWord(static_cast(Decoration::NoContraction)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::CPacked)); + target.writeWord(static_cast(Decoration::NoContraction)); } target.endWrite(); } - void operator()(const PropertyBuiltIn *value) + void operator()(const PropertyInputAttachmentIndex *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BuiltIn)); - target.writeWord(static_cast(value->builtIn)); + target.writeWord(static_cast(Decoration::InputAttachmentIndex)); + target.writeWord(static_cast(value->attachmentIndex.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BuiltIn)); - target.writeWord(static_cast(value->builtIn)); + target.writeWord(static_cast(Decoration::InputAttachmentIndex)); + target.writeWord(static_cast(value->attachmentIndex.value)); } target.endWrite(); } - void operator()(const PropertyNoPerspective *value) + void operator()(const PropertyAlignment *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NoPerspective)); + target.writeWord(static_cast(Decoration::Alignment)); + target.writeWord(static_cast(value->alignment.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NoPerspective)); + target.writeWord(static_cast(Decoration::Alignment)); + target.writeWord(static_cast(value->alignment.value)); } target.endWrite(); } - void operator()(const PropertyFlat *value) + void operator()(const PropertyMaxByteOffset *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Flat)); + target.writeWord(static_cast(Decoration::MaxByteOffset)); + target.writeWord(static_cast(value->maxByteOffset.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Flat)); + target.writeWord(static_cast(Decoration::MaxByteOffset)); + target.writeWord(static_cast(value->maxByteOffset.value)); } target.endWrite(); } - void operator()(const PropertyPatch *value) + void operator()(const PropertyAlignmentId *value) { - if (value->memberIndex) - { - target.beginInstruction(Op::OpMemberDecorate, 3); - target.writeWord(node->resultId); - target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Patch)); - } - else - { - target.beginInstruction(Op::OpDecorate, 2); - target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Patch)); - } + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::AlignmentId)); + target.writeWord(value->alignment->resultId); target.endWrite(); } - void operator()(const PropertyCentroid *value) + void operator()(const PropertyMaxByteOffsetId *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::MaxByteOffsetId)); + target.writeWord(value->maxByteOffset->resultId); + target.endWrite(); + } + void operator()(const PropertyNoSignedWrap *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Centroid)); + target.writeWord(static_cast(Decoration::NoSignedWrap)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Centroid)); + target.writeWord(static_cast(Decoration::NoSignedWrap)); } target.endWrite(); } - void operator()(const PropertySample *value) + void operator()(const PropertyNoUnsignedWrap *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Sample)); + target.writeWord(static_cast(Decoration::NoUnsignedWrap)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Sample)); + target.writeWord(static_cast(Decoration::NoUnsignedWrap)); } target.endWrite(); } - void operator()(const PropertyInvariant *value) + void operator()(const PropertyWeightTextureQCOM *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Invariant)); + target.writeWord(static_cast(Decoration::WeightTextureQCOM)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Invariant)); + target.writeWord(static_cast(Decoration::WeightTextureQCOM)); } target.endWrite(); } - void operator()(const PropertyRestrict *value) + void operator()(const PropertyBlockMatchTextureQCOM *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Restrict)); + target.writeWord(static_cast(Decoration::BlockMatchTextureQCOM)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Restrict)); + target.writeWord(static_cast(Decoration::BlockMatchTextureQCOM)); } target.endWrite(); } - void operator()(const PropertyAliased *value) + void operator()(const PropertyBlockMatchSamplerQCOM *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Aliased)); + target.writeWord(static_cast(Decoration::BlockMatchSamplerQCOM)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Aliased)); + target.writeWord(static_cast(Decoration::BlockMatchSamplerQCOM)); } target.endWrite(); } - void operator()(const PropertyVolatile *value) + void operator()(const PropertyExplicitInterpAMD *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Volatile)); + target.writeWord(static_cast(Decoration::ExplicitInterpAMD)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Volatile)); + target.writeWord(static_cast(Decoration::ExplicitInterpAMD)); } target.endWrite(); } - void operator()(const PropertyConstant *value) + void operator()(const PropertyNodeSharesPayloadLimitsWithAMDX *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NodeSharesPayloadLimitsWithAMDX)); + target.writeWord(value->payloadArray->resultId); + target.endWrite(); + } + void operator()(const PropertyNodeMaxPayloadsAMDX *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NodeMaxPayloadsAMDX)); + target.writeWord(value->maxNumberOfPayloads->resultId); + target.endWrite(); + } + void operator()(const PropertyTrackFinishWritingAMDX *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Constant)); + target.writeWord(static_cast(Decoration::TrackFinishWritingAMDX)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Constant)); + target.writeWord(static_cast(Decoration::TrackFinishWritingAMDX)); } target.endWrite(); } - void operator()(const PropertyCoherent *value) + void operator()(const PropertyPayloadNodeNameAMDX *value) { + size_t length = 0; + length += (value->nodeName.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Coherent)); + target.writeWord(static_cast(Decoration::PayloadNodeNameAMDX)); + target.writeString(value->nodeName.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Coherent)); + target.writeWord(static_cast(Decoration::PayloadNodeNameAMDX)); + target.writeString(value->nodeName.c_str()); } target.endWrite(); } - void operator()(const PropertyNonWritable *value) + void operator()(const PropertyOverrideCoverageNV *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NonWritable)); + target.writeWord(static_cast(Decoration::OverrideCoverageNV)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NonWritable)); + target.writeWord(static_cast(Decoration::OverrideCoverageNV)); } target.endWrite(); } - void operator()(const PropertyNonReadable *value) + void operator()(const PropertyPassthroughNV *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NonReadable)); + target.writeWord(static_cast(Decoration::PassthroughNV)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NonReadable)); + target.writeWord(static_cast(Decoration::PassthroughNV)); } target.endWrite(); } - void operator()(const PropertyUniform *value) + void operator()(const PropertyViewportRelativeNV *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Uniform)); + target.writeWord(static_cast(Decoration::ViewportRelativeNV)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Uniform)); + target.writeWord(static_cast(Decoration::ViewportRelativeNV)); } target.endWrite(); } - void operator()(const PropertyUniformId *value) - { - target.beginInstruction(Op::OpDecorateId, 2 + 1); - target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::UniformId)); - target.writeWord(value->execution->resultId); - target.endWrite(); - } - void operator()(const PropertySaturatedConversion *value) + void operator()(const PropertySecondaryViewportRelativeNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SaturatedConversion)); + target.writeWord(static_cast(Decoration::SecondaryViewportRelativeNV)); + target.writeWord(static_cast(value->offset.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SaturatedConversion)); + target.writeWord(static_cast(Decoration::SecondaryViewportRelativeNV)); + target.writeWord(static_cast(value->offset.value)); } target.endWrite(); } - void operator()(const PropertyStream *value) + void operator()(const PropertyPerPrimitiveEXT *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Stream)); - target.writeWord(static_cast(value->streamNumber.value)); + target.writeWord(static_cast(Decoration::PerPrimitiveEXT)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Stream)); - target.writeWord(static_cast(value->streamNumber.value)); + target.writeWord(static_cast(Decoration::PerPrimitiveEXT)); } target.endWrite(); } - void operator()(const PropertyLocation *value) + void operator()(const PropertyPerViewNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Location)); - target.writeWord(static_cast(value->location.value)); + target.writeWord(static_cast(Decoration::PerViewNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Location)); - target.writeWord(static_cast(value->location.value)); + target.writeWord(static_cast(Decoration::PerViewNV)); } target.endWrite(); } - void operator()(const PropertyComponent *value) + void operator()(const PropertyPerTaskNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Component)); - target.writeWord(static_cast(value->component.value)); + target.writeWord(static_cast(Decoration::PerTaskNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Component)); - target.writeWord(static_cast(value->component.value)); + target.writeWord(static_cast(Decoration::PerTaskNV)); } target.endWrite(); } - void operator()(const PropertyIndex *value) + void operator()(const PropertyPerVertexKHR *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Index)); - target.writeWord(static_cast(value->index.value)); + target.writeWord(static_cast(Decoration::PerVertexKHR)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Index)); - target.writeWord(static_cast(value->index.value)); + target.writeWord(static_cast(Decoration::PerVertexKHR)); } target.endWrite(); } - void operator()(const PropertyBinding *value) + void operator()(const PropertyNonUniform *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Binding)); - target.writeWord(static_cast(value->bindingPoint.value)); + target.writeWord(static_cast(Decoration::NonUniform)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Binding)); - target.writeWord(static_cast(value->bindingPoint.value)); + target.writeWord(static_cast(Decoration::NonUniform)); } target.endWrite(); } - void operator()(const PropertyDescriptorSet *value) + void operator()(const PropertyRestrictPointer *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::DescriptorSet)); - target.writeWord(static_cast(value->descriptorSet.value)); + target.writeWord(static_cast(Decoration::RestrictPointer)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::DescriptorSet)); - target.writeWord(static_cast(value->descriptorSet.value)); + target.writeWord(static_cast(Decoration::RestrictPointer)); } target.endWrite(); } - void operator()(const PropertyOffset *value) + void operator()(const PropertyAliasedPointer *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Offset)); - target.writeWord(static_cast(value->byteOffset.value)); + target.writeWord(static_cast(Decoration::AliasedPointer)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Offset)); - target.writeWord(static_cast(value->byteOffset.value)); + target.writeWord(static_cast(Decoration::AliasedPointer)); } target.endWrite(); } - void operator()(const PropertyXfbBuffer *value) + void operator()(const PropertyHitObjectShaderRecordBufferNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::XfbBuffer)); - target.writeWord(static_cast(value->xfbBufferNumber.value)); + target.writeWord(static_cast(Decoration::HitObjectShaderRecordBufferNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::XfbBuffer)); - target.writeWord(static_cast(value->xfbBufferNumber.value)); + target.writeWord(static_cast(Decoration::HitObjectShaderRecordBufferNV)); } target.endWrite(); } - void operator()(const PropertyXfbStride *value) + void operator()(const PropertyBindlessSamplerNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::XfbStride)); - target.writeWord(static_cast(value->xfbStride.value)); + target.writeWord(static_cast(Decoration::BindlessSamplerNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::XfbStride)); - target.writeWord(static_cast(value->xfbStride.value)); + target.writeWord(static_cast(Decoration::BindlessSamplerNV)); } target.endWrite(); } - void operator()(const PropertyFuncParamAttr *value) + void operator()(const PropertyBindlessImageNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FuncParamAttr)); - target.writeWord(static_cast(value->functionParameterAttribute)); + target.writeWord(static_cast(Decoration::BindlessImageNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FuncParamAttr)); - target.writeWord(static_cast(value->functionParameterAttribute)); + target.writeWord(static_cast(Decoration::BindlessImageNV)); } target.endWrite(); } - void operator()(const PropertyFPRoundingMode *value) + void operator()(const PropertyBoundSamplerNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FPRoundingMode)); - target.writeWord(static_cast(value->floatingPointRoundingMode)); + target.writeWord(static_cast(Decoration::BoundSamplerNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FPRoundingMode)); - target.writeWord(static_cast(value->floatingPointRoundingMode)); + target.writeWord(static_cast(Decoration::BoundSamplerNV)); } target.endWrite(); } - void operator()(const PropertyFPFastMathMode *value) + void operator()(const PropertyBoundImageNV *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FPFastMathMode)); - target.writeWord(static_cast(value->fastMathMode)); + target.writeWord(static_cast(Decoration::BoundImageNV)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FPFastMathMode)); - target.writeWord(static_cast(value->fastMathMode)); + target.writeWord(static_cast(Decoration::BoundImageNV)); } target.endWrite(); } - void operator()(const PropertyLinkageAttributes *value) + void operator()(const PropertySIMTCallINTEL *value) { - size_t length = 0; - length += (value->name.length() + sizeof(unsigned)) / sizeof(unsigned); - ++length; if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::LinkageAttributes)); - target.writeString(value->name.c_str()); - target.writeWord(static_cast(value->linkageType)); + target.writeWord(static_cast(Decoration::SIMTCallINTEL)); + target.writeWord(static_cast(value->n.value)); } else { - target.beginInstruction(Op::OpDecorate, 2 + length); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::LinkageAttributes)); - target.writeString(value->name.c_str()); - target.writeWord(static_cast(value->linkageType)); + target.writeWord(static_cast(Decoration::SIMTCallINTEL)); + target.writeWord(static_cast(value->n.value)); } target.endWrite(); } - void operator()(const PropertyNoContraction *value) + void operator()(const PropertyReferencedIndirectlyINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NoContraction)); + target.writeWord(static_cast(Decoration::ReferencedIndirectlyINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NoContraction)); + target.writeWord(static_cast(Decoration::ReferencedIndirectlyINTEL)); } target.endWrite(); } - void operator()(const PropertyInputAttachmentIndex *value) + void operator()(const PropertyClobberINTEL *value) { + size_t length = 0; + length += (value->_register.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::InputAttachmentIndex)); - target.writeWord(static_cast(value->attachmentIndex.value)); + target.writeWord(static_cast(Decoration::ClobberINTEL)); + target.writeString(value->_register.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::InputAttachmentIndex)); - target.writeWord(static_cast(value->attachmentIndex.value)); + target.writeWord(static_cast(Decoration::ClobberINTEL)); + target.writeString(value->_register.c_str()); } target.endWrite(); } - void operator()(const PropertyAlignment *value) + void operator()(const PropertySideEffectsINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::Alignment)); - target.writeWord(static_cast(value->alignment.value)); + target.writeWord(static_cast(Decoration::SideEffectsINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::Alignment)); - target.writeWord(static_cast(value->alignment.value)); + target.writeWord(static_cast(Decoration::SideEffectsINTEL)); } target.endWrite(); } - void operator()(const PropertyMaxByteOffset *value) + void operator()(const PropertyVectorComputeVariableINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MaxByteOffset)); - target.writeWord(static_cast(value->maxByteOffset.value)); + target.writeWord(static_cast(Decoration::VectorComputeVariableINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MaxByteOffset)); - target.writeWord(static_cast(value->maxByteOffset.value)); + target.writeWord(static_cast(Decoration::VectorComputeVariableINTEL)); } target.endWrite(); } - void operator()(const PropertyAlignmentId *value) - { - target.beginInstruction(Op::OpDecorateId, 2 + 1); - target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::AlignmentId)); - target.writeWord(value->alignment->resultId); - target.endWrite(); - } - void operator()(const PropertyMaxByteOffsetId *value) - { - target.beginInstruction(Op::OpDecorateId, 2 + 1); - target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MaxByteOffsetId)); - target.writeWord(value->maxByteOffset->resultId); - target.endWrite(); - } - void operator()(const PropertyNoSignedWrap *value) + void operator()(const PropertyFuncParamIOKindINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NoSignedWrap)); + target.writeWord(static_cast(Decoration::FuncParamIOKindINTEL)); + target.writeWord(static_cast(value->kind.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NoSignedWrap)); + target.writeWord(static_cast(Decoration::FuncParamIOKindINTEL)); + target.writeWord(static_cast(value->kind.value)); } target.endWrite(); } - void operator()(const PropertyNoUnsignedWrap *value) + void operator()(const PropertyVectorComputeFunctionINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NoUnsignedWrap)); + target.writeWord(static_cast(Decoration::VectorComputeFunctionINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NoUnsignedWrap)); + target.writeWord(static_cast(Decoration::VectorComputeFunctionINTEL)); } target.endWrite(); } - void operator()(const PropertyExplicitInterpAMD *value) + void operator()(const PropertyStackCallINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ExplicitInterpAMD)); + target.writeWord(static_cast(Decoration::StackCallINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ExplicitInterpAMD)); + target.writeWord(static_cast(Decoration::StackCallINTEL)); } target.endWrite(); } - void operator()(const PropertyOverrideCoverageNV *value) + void operator()(const PropertyGlobalVariableOffsetINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::OverrideCoverageNV)); + target.writeWord(static_cast(Decoration::GlobalVariableOffsetINTEL)); + target.writeWord(static_cast(value->offset.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::OverrideCoverageNV)); + target.writeWord(static_cast(Decoration::GlobalVariableOffsetINTEL)); + target.writeWord(static_cast(value->offset.value)); } target.endWrite(); } - void operator()(const PropertyPassthroughNV *value) + void operator()(const PropertyCounterBuffer *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::CounterBuffer)); + target.writeWord(value->counterBuffer->resultId); + target.endWrite(); + } + void operator()(const PropertyUserSemantic *value) { + size_t length = 0; + length += (value->semantic.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PassthroughNV)); + target.writeWord(static_cast(Decoration::UserSemantic)); + target.writeString(value->semantic.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PassthroughNV)); + target.writeWord(static_cast(Decoration::UserSemantic)); + target.writeString(value->semantic.c_str()); } target.endWrite(); } - void operator()(const PropertyViewportRelativeNV *value) + void operator()(const PropertyUserTypeGOOGLE *value) { + size_t length = 0; + length += (value->userType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ViewportRelativeNV)); + target.writeWord(static_cast(Decoration::UserTypeGOOGLE)); + target.writeString(value->userType.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ViewportRelativeNV)); + target.writeWord(static_cast(Decoration::UserTypeGOOGLE)); + target.writeString(value->userType.c_str()); } target.endWrite(); } - void operator()(const PropertySecondaryViewportRelativeNV *value) + void operator()(const PropertyFunctionRoundingModeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3 + 2); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SecondaryViewportRelativeNV)); - target.writeWord(static_cast(value->offset.value)); + target.writeWord(static_cast(Decoration::FunctionRoundingModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpRoundingMode)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2 + 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SecondaryViewportRelativeNV)); - target.writeWord(static_cast(value->offset.value)); + target.writeWord(static_cast(Decoration::FunctionRoundingModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpRoundingMode)); } target.endWrite(); } - void operator()(const PropertyPerPrimitiveNV *value) + void operator()(const PropertyFunctionDenormModeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 2); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PerPrimitiveNV)); + target.writeWord(static_cast(Decoration::FunctionDenormModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpDenormMode)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PerPrimitiveNV)); + target.writeWord(static_cast(Decoration::FunctionDenormModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpDenormMode)); } target.endWrite(); } - void operator()(const PropertyPerViewNV *value) + void operator()(const PropertyRegisterINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PerViewNV)); + target.writeWord(static_cast(Decoration::RegisterINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PerViewNV)); + target.writeWord(static_cast(Decoration::RegisterINTEL)); } target.endWrite(); } - void operator()(const PropertyPerTaskNV *value) + void operator()(const PropertyMemoryINTEL *value) { + size_t length = 0; + length += (value->memoryType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PerTaskNV)); + target.writeWord(static_cast(Decoration::MemoryINTEL)); + target.writeString(value->memoryType.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PerTaskNV)); + target.writeWord(static_cast(Decoration::MemoryINTEL)); + target.writeString(value->memoryType.c_str()); } target.endWrite(); } - void operator()(const PropertyPerVertexKHR *value) + void operator()(const PropertyNumbanksINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PerVertexKHR)); + target.writeWord(static_cast(Decoration::NumbanksINTEL)); + target.writeWord(static_cast(value->banks.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PerVertexKHR)); + target.writeWord(static_cast(Decoration::NumbanksINTEL)); + target.writeWord(static_cast(value->banks.value)); } target.endWrite(); } - void operator()(const PropertyNonUniform *value) + void operator()(const PropertyBankwidthINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NonUniform)); + target.writeWord(static_cast(Decoration::BankwidthINTEL)); + target.writeWord(static_cast(value->bankWidth.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NonUniform)); + target.writeWord(static_cast(Decoration::BankwidthINTEL)); + target.writeWord(static_cast(value->bankWidth.value)); } target.endWrite(); } - void operator()(const PropertyRestrictPointer *value) + void operator()(const PropertyMaxPrivateCopiesINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::RestrictPointer)); + target.writeWord(static_cast(Decoration::MaxPrivateCopiesINTEL)); + target.writeWord(static_cast(value->maximumCopies.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::RestrictPointer)); + target.writeWord(static_cast(Decoration::MaxPrivateCopiesINTEL)); + target.writeWord(static_cast(value->maximumCopies.value)); } target.endWrite(); } - void operator()(const PropertyAliasedPointer *value) + void operator()(const PropertySinglepumpINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::AliasedPointer)); + target.writeWord(static_cast(Decoration::SinglepumpINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::AliasedPointer)); + target.writeWord(static_cast(Decoration::SinglepumpINTEL)); } target.endWrite(); } - void operator()(const PropertyBindlessSamplerNV *value) + void operator()(const PropertyDoublepumpINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BindlessSamplerNV)); + target.writeWord(static_cast(Decoration::DoublepumpINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BindlessSamplerNV)); + target.writeWord(static_cast(Decoration::DoublepumpINTEL)); } target.endWrite(); } - void operator()(const PropertyBindlessImageNV *value) + void operator()(const PropertyMaxReplicatesINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BindlessImageNV)); + target.writeWord(static_cast(Decoration::MaxReplicatesINTEL)); + target.writeWord(static_cast(value->maximumReplicates.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BindlessImageNV)); + target.writeWord(static_cast(Decoration::MaxReplicatesINTEL)); + target.writeWord(static_cast(value->maximumReplicates.value)); } target.endWrite(); } - void operator()(const PropertyBoundSamplerNV *value) + void operator()(const PropertySimpleDualPortINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BoundSamplerNV)); + target.writeWord(static_cast(Decoration::SimpleDualPortINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BoundSamplerNV)); + target.writeWord(static_cast(Decoration::SimpleDualPortINTEL)); } target.endWrite(); } - void operator()(const PropertyBoundImageNV *value) + void operator()(const PropertyMergeINTEL *value) { + size_t length = 0; + length += (value->mergeKey.length() + sizeof(unsigned)) / sizeof(unsigned); + length += (value->mergeType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BoundImageNV)); + target.writeWord(static_cast(Decoration::MergeINTEL)); + target.writeString(value->mergeKey.c_str()); + target.writeString(value->mergeType.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BoundImageNV)); + target.writeWord(static_cast(Decoration::MergeINTEL)); + target.writeString(value->mergeKey.c_str()); + target.writeString(value->mergeType.c_str()); } target.endWrite(); } - void operator()(const PropertySIMTCallINTEL *value) + void operator()(const PropertyBankBitsINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SIMTCallINTEL)); - target.writeWord(static_cast(value->n.value)); + target.writeWord(static_cast(Decoration::BankBitsINTEL)); + target.writeWord(static_cast(value->bankBits.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SIMTCallINTEL)); - target.writeWord(static_cast(value->n.value)); + target.writeWord(static_cast(Decoration::BankBitsINTEL)); + target.writeWord(static_cast(value->bankBits.value)); } target.endWrite(); } - void operator()(const PropertyReferencedIndirectlyINTEL *value) + void operator()(const PropertyForcePow2DepthINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ReferencedIndirectlyINTEL)); + target.writeWord(static_cast(Decoration::ForcePow2DepthINTEL)); + target.writeWord(static_cast(value->forceKey.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ReferencedIndirectlyINTEL)); + target.writeWord(static_cast(Decoration::ForcePow2DepthINTEL)); + target.writeWord(static_cast(value->forceKey.value)); } target.endWrite(); } - void operator()(const PropertyClobberINTEL *value) + void operator()(const PropertyStridesizeINTEL *value) { - size_t length = 0; - length += (value->_register.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ClobberINTEL)); - target.writeString(value->_register.c_str()); + target.writeWord(static_cast(Decoration::StridesizeINTEL)); + target.writeWord(static_cast(value->strideSize.value)); } else { - target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ClobberINTEL)); - target.writeString(value->_register.c_str()); + target.writeWord(static_cast(Decoration::StridesizeINTEL)); + target.writeWord(static_cast(value->strideSize.value)); } target.endWrite(); } - void operator()(const PropertySideEffectsINTEL *value) + void operator()(const PropertyWordsizeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SideEffectsINTEL)); + target.writeWord(static_cast(Decoration::WordsizeINTEL)); + target.writeWord(static_cast(value->wordSize.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SideEffectsINTEL)); + target.writeWord(static_cast(Decoration::WordsizeINTEL)); + target.writeWord(static_cast(value->wordSize.value)); } target.endWrite(); } - void operator()(const PropertyVectorComputeVariableINTEL *value) + void operator()(const PropertyTrueDualPortINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::VectorComputeVariableINTEL)); + target.writeWord(static_cast(Decoration::TrueDualPortINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::VectorComputeVariableINTEL)); + target.writeWord(static_cast(Decoration::TrueDualPortINTEL)); } target.endWrite(); } - void operator()(const PropertyFuncParamIOKindINTEL *value) + void operator()(const PropertyBurstCoalesceINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FuncParamIOKindINTEL)); - target.writeWord(static_cast(value->kind.value)); + target.writeWord(static_cast(Decoration::BurstCoalesceINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FuncParamIOKindINTEL)); - target.writeWord(static_cast(value->kind.value)); + target.writeWord(static_cast(Decoration::BurstCoalesceINTEL)); } target.endWrite(); } - void operator()(const PropertyVectorComputeFunctionINTEL *value) + void operator()(const PropertyCacheSizeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::VectorComputeFunctionINTEL)); + target.writeWord(static_cast(Decoration::CacheSizeINTEL)); + target.writeWord(static_cast(value->cacheSizeInBytes.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::VectorComputeFunctionINTEL)); + target.writeWord(static_cast(Decoration::CacheSizeINTEL)); + target.writeWord(static_cast(value->cacheSizeInBytes.value)); } target.endWrite(); } - void operator()(const PropertyStackCallINTEL *value) + void operator()(const PropertyDontStaticallyCoalesceINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::StackCallINTEL)); + target.writeWord(static_cast(Decoration::DontStaticallyCoalesceINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::StackCallINTEL)); + target.writeWord(static_cast(Decoration::DontStaticallyCoalesceINTEL)); } target.endWrite(); } - void operator()(const PropertyGlobalVariableOffsetINTEL *value) + void operator()(const PropertyPrefetchINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::GlobalVariableOffsetINTEL)); - target.writeWord(static_cast(value->offset.value)); + target.writeWord(static_cast(Decoration::PrefetchINTEL)); + target.writeWord(static_cast(value->prefetcherSizeInBytes.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::GlobalVariableOffsetINTEL)); - target.writeWord(static_cast(value->offset.value)); + target.writeWord(static_cast(Decoration::PrefetchINTEL)); + target.writeWord(static_cast(value->prefetcherSizeInBytes.value)); } target.endWrite(); } - void operator()(const PropertyCounterBuffer *value) - { - target.beginInstruction(Op::OpDecorateId, 2 + 1); - target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::CounterBuffer)); - target.writeWord(value->counterBuffer->resultId); - target.endWrite(); - } - void operator()(const PropertyUserSemantic *value) + void operator()(const PropertyStallEnableINTEL *value) { - size_t length = 0; - length += (value->semantic.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::UserSemantic)); - target.writeString(value->semantic.c_str()); + target.writeWord(static_cast(Decoration::StallEnableINTEL)); } else { - target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::UserSemantic)); - target.writeString(value->semantic.c_str()); + target.writeWord(static_cast(Decoration::StallEnableINTEL)); } target.endWrite(); } - void operator()(const PropertyUserTypeGOOGLE *value) + void operator()(const PropertyFuseLoopsInFunctionINTEL *value) { - size_t length = 0; - length += (value->userType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::UserTypeGOOGLE)); - target.writeString(value->userType.c_str()); + target.writeWord(static_cast(Decoration::FuseLoopsInFunctionINTEL)); } else { - target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::UserTypeGOOGLE)); - target.writeString(value->userType.c_str()); + target.writeWord(static_cast(Decoration::FuseLoopsInFunctionINTEL)); } target.endWrite(); } - void operator()(const PropertyFunctionRoundingModeINTEL *value) + void operator()(const PropertyMathOpDSPModeINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 2); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FunctionRoundingModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpRoundingMode)); + target.writeWord(static_cast(Decoration::MathOpDSPModeINTEL)); + target.writeWord(static_cast(value->mode.value)); + target.writeWord(static_cast(value->propagate.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FunctionRoundingModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpRoundingMode)); + target.writeWord(static_cast(Decoration::MathOpDSPModeINTEL)); + target.writeWord(static_cast(value->mode.value)); + target.writeWord(static_cast(value->propagate.value)); } target.endWrite(); } - void operator()(const PropertyFunctionDenormModeINTEL *value) + void operator()(const PropertyAliasScopeINTEL *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::AliasScopeINTEL)); + target.writeWord(value->aliasingScopesList->resultId); + target.endWrite(); + } + void operator()(const PropertyNoAliasINTEL *value) + { + target.beginInstruction(Op::OpDecorateId, 2 + 1); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::NoAliasINTEL)); + target.writeWord(value->aliasingScopesList->resultId); + target.endWrite(); + } + void operator()(const PropertyInitiationIntervalINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 2); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FunctionDenormModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpDenormMode)); + target.writeWord(static_cast(Decoration::InitiationIntervalINTEL)); + target.writeWord(static_cast(value->cycles.value)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FunctionDenormModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpDenormMode)); + target.writeWord(static_cast(Decoration::InitiationIntervalINTEL)); + target.writeWord(static_cast(value->cycles.value)); } target.endWrite(); } - void operator()(const PropertyRegisterINTEL *value) + void operator()(const PropertyMaxConcurrencyINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::RegisterINTEL)); + target.writeWord(static_cast(Decoration::MaxConcurrencyINTEL)); + target.writeWord(static_cast(value->invocations.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::RegisterINTEL)); + target.writeWord(static_cast(Decoration::MaxConcurrencyINTEL)); + target.writeWord(static_cast(value->invocations.value)); } target.endWrite(); } - void operator()(const PropertyMemoryINTEL *value) + void operator()(const PropertyPipelineEnableINTEL *value) { - size_t length = 0; - length += (value->memoryType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorateStringGOOGLE, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MemoryINTEL)); - target.writeString(value->memoryType.c_str()); + target.writeWord(static_cast(Decoration::PipelineEnableINTEL)); + target.writeWord(static_cast(value->enable.value)); } else { - target.beginInstruction(Op::OpDecorateStringGOOGLE, 2 + length); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MemoryINTEL)); - target.writeString(value->memoryType.c_str()); + target.writeWord(static_cast(Decoration::PipelineEnableINTEL)); + target.writeWord(static_cast(value->enable.value)); } target.endWrite(); } - void operator()(const PropertyNumbanksINTEL *value) + void operator()(const PropertyBufferLocationINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::NumbanksINTEL)); - target.writeWord(static_cast(value->banks.value)); + target.writeWord(static_cast(Decoration::BufferLocationINTEL)); + target.writeWord(static_cast(value->bufferLocationId.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::NumbanksINTEL)); - target.writeWord(static_cast(value->banks.value)); + target.writeWord(static_cast(Decoration::BufferLocationINTEL)); + target.writeWord(static_cast(value->bufferLocationId.value)); } target.endWrite(); } - void operator()(const PropertyBankwidthINTEL *value) + void operator()(const PropertyIOPipeStorageINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BankwidthINTEL)); - target.writeWord(static_cast(value->bankWidth.value)); + target.writeWord(static_cast(Decoration::IOPipeStorageINTEL)); + target.writeWord(static_cast(value->ioPipeId.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BankwidthINTEL)); - target.writeWord(static_cast(value->bankWidth.value)); + target.writeWord(static_cast(Decoration::IOPipeStorageINTEL)); + target.writeWord(static_cast(value->ioPipeId.value)); } target.endWrite(); } - void operator()(const PropertyMaxPrivateCopiesINTEL *value) + void operator()(const PropertyFunctionFloatingPointModeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3 + 2); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MaxPrivateCopiesINTEL)); - target.writeWord(static_cast(value->maximumCopies.value)); + target.writeWord(static_cast(Decoration::FunctionFloatingPointModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpOperationMode)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2 + 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MaxPrivateCopiesINTEL)); - target.writeWord(static_cast(value->maximumCopies.value)); + target.writeWord(static_cast(Decoration::FunctionFloatingPointModeINTEL)); + target.writeWord(static_cast(value->targetWidth.value)); + target.writeWord(static_cast(value->fpOperationMode)); } target.endWrite(); } - void operator()(const PropertySinglepumpINTEL *value) + void operator()(const PropertySingleElementVectorINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SinglepumpINTEL)); + target.writeWord(static_cast(Decoration::SingleElementVectorINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SinglepumpINTEL)); + target.writeWord(static_cast(Decoration::SingleElementVectorINTEL)); } target.endWrite(); } - void operator()(const PropertyDoublepumpINTEL *value) + void operator()(const PropertyVectorComputeCallableFunctionINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::DoublepumpINTEL)); + target.writeWord(static_cast(Decoration::VectorComputeCallableFunctionINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::DoublepumpINTEL)); + target.writeWord(static_cast(Decoration::VectorComputeCallableFunctionINTEL)); } target.endWrite(); } - void operator()(const PropertyMaxReplicatesINTEL *value) + void operator()(const PropertyMediaBlockIOINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MaxReplicatesINTEL)); - target.writeWord(static_cast(value->maximumReplicates.value)); + target.writeWord(static_cast(Decoration::MediaBlockIOINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MaxReplicatesINTEL)); - target.writeWord(static_cast(value->maximumReplicates.value)); + target.writeWord(static_cast(Decoration::MediaBlockIOINTEL)); } target.endWrite(); } - void operator()(const PropertySimpleDualPortINTEL *value) + void operator()(const PropertyStallFreeINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SimpleDualPortINTEL)); + target.writeWord(static_cast(Decoration::StallFreeINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SimpleDualPortINTEL)); + target.writeWord(static_cast(Decoration::StallFreeINTEL)); } target.endWrite(); } - void operator()(const PropertyMergeINTEL *value) + void operator()(const PropertyFPMaxErrorDecorationINTEL *value) { - size_t length = 0; - length += (value->mergeKey.length() + sizeof(unsigned)) / sizeof(unsigned); - length += (value->mergeType.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + length); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MergeINTEL)); - target.writeString(value->mergeKey.c_str()); - target.writeString(value->mergeType.c_str()); + target.writeWord(static_cast(Decoration::FPMaxErrorDecorationINTEL)); + target.writeWord(static_cast(value->maxError.value)); } else { - target.beginInstruction(Op::OpDecorate, 2 + length); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MergeINTEL)); - target.writeString(value->mergeKey.c_str()); - target.writeString(value->mergeType.c_str()); + target.writeWord(static_cast(Decoration::FPMaxErrorDecorationINTEL)); + target.writeWord(static_cast(value->maxError.value)); } target.endWrite(); } - void operator()(const PropertyBankBitsINTEL *value) + void operator()(const PropertyLatencyControlLabelINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BankBitsINTEL)); - target.writeWord(static_cast(value->bankBits.value)); + target.writeWord(static_cast(Decoration::LatencyControlLabelINTEL)); + target.writeWord(static_cast(value->latencyLabel.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BankBitsINTEL)); - target.writeWord(static_cast(value->bankBits.value)); + target.writeWord(static_cast(Decoration::LatencyControlLabelINTEL)); + target.writeWord(static_cast(value->latencyLabel.value)); } target.endWrite(); } - void operator()(const PropertyForcePow2DepthINTEL *value) + void operator()(const PropertyLatencyControlConstraintINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3 + 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::ForcePow2DepthINTEL)); - target.writeWord(static_cast(value->forceKey.value)); + target.writeWord(static_cast(Decoration::LatencyControlConstraintINTEL)); + target.writeWord(static_cast(value->relativeTo.value)); + target.writeWord(static_cast(value->controlType.value)); + target.writeWord(static_cast(value->relativeCycle.value)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2 + 3); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::ForcePow2DepthINTEL)); - target.writeWord(static_cast(value->forceKey.value)); + target.writeWord(static_cast(Decoration::LatencyControlConstraintINTEL)); + target.writeWord(static_cast(value->relativeTo.value)); + target.writeWord(static_cast(value->controlType.value)); + target.writeWord(static_cast(value->relativeCycle.value)); } target.endWrite(); } - void operator()(const PropertyBurstCoalesceINTEL *value) + void operator()(const PropertyConduitKernelArgumentINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BurstCoalesceINTEL)); + target.writeWord(static_cast(Decoration::ConduitKernelArgumentINTEL)); } else { target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BurstCoalesceINTEL)); + target.writeWord(static_cast(Decoration::ConduitKernelArgumentINTEL)); } target.endWrite(); } - void operator()(const PropertyCacheSizeINTEL *value) + void operator()(const PropertyRegisterMapKernelArgumentINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 1); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::CacheSizeINTEL)); - target.writeWord(static_cast(value->cacheSizeInBytes.value)); + target.writeWord(static_cast(Decoration::RegisterMapKernelArgumentINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 1); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::CacheSizeINTEL)); - target.writeWord(static_cast(value->cacheSizeInBytes.value)); + target.writeWord(static_cast(Decoration::RegisterMapKernelArgumentINTEL)); } target.endWrite(); } - void operator()(const PropertyDontStaticallyCoalesceINTEL *value) + void operator()(const PropertyMMHostInterfaceAddressWidthINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::DontStaticallyCoalesceINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceAddressWidthINTEL)); + target.writeWord(static_cast(value->addressWidth.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::DontStaticallyCoalesceINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceAddressWidthINTEL)); + target.writeWord(static_cast(value->addressWidth.value)); } target.endWrite(); } - void operator()(const PropertyPrefetchINTEL *value) + void operator()(const PropertyMMHostInterfaceDataWidthINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::PrefetchINTEL)); - target.writeWord(static_cast(value->prefetcherSizeInBytes.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceDataWidthINTEL)); + target.writeWord(static_cast(value->dataWidth.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::PrefetchINTEL)); - target.writeWord(static_cast(value->prefetcherSizeInBytes.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceDataWidthINTEL)); + target.writeWord(static_cast(value->dataWidth.value)); } target.endWrite(); } - void operator()(const PropertyStallEnableINTEL *value) + void operator()(const PropertyMMHostInterfaceLatencyINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::StallEnableINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceLatencyINTEL)); + target.writeWord(static_cast(value->latency.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::StallEnableINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceLatencyINTEL)); + target.writeWord(static_cast(value->latency.value)); } target.endWrite(); } - void operator()(const PropertyFuseLoopsInFunctionINTEL *value) + void operator()(const PropertyMMHostInterfaceReadWriteModeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FuseLoopsInFunctionINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceReadWriteModeINTEL)); + target.writeWord(static_cast(value->readWriteMode)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FuseLoopsInFunctionINTEL)); + target.writeWord(static_cast(Decoration::MMHostInterfaceReadWriteModeINTEL)); + target.writeWord(static_cast(value->readWriteMode)); } target.endWrite(); } - void operator()(const PropertyBufferLocationINTEL *value) + void operator()(const PropertyMMHostInterfaceMaxBurstINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::BufferLocationINTEL)); - target.writeWord(static_cast(value->bufferLocationId.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceMaxBurstINTEL)); + target.writeWord(static_cast(value->maxBurstCount.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::BufferLocationINTEL)); - target.writeWord(static_cast(value->bufferLocationId.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceMaxBurstINTEL)); + target.writeWord(static_cast(value->maxBurstCount.value)); } target.endWrite(); } - void operator()(const PropertyIOPipeStorageINTEL *value) + void operator()(const PropertyMMHostInterfaceWaitRequestINTEL *value) { if (value->memberIndex) { target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::IOPipeStorageINTEL)); - target.writeWord(static_cast(value->ioPipeId.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceWaitRequestINTEL)); + target.writeWord(static_cast(value->waitrequest.value)); } else { target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::IOPipeStorageINTEL)); - target.writeWord(static_cast(value->ioPipeId.value)); + target.writeWord(static_cast(Decoration::MMHostInterfaceWaitRequestINTEL)); + target.writeWord(static_cast(value->waitrequest.value)); } target.endWrite(); } - void operator()(const PropertyFunctionFloatingPointModeINTEL *value) + void operator()(const PropertyStableKernelArgumentINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3 + 2); + target.beginInstruction(Op::OpMemberDecorate, 3); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::FunctionFloatingPointModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpOperationMode)); + target.writeWord(static_cast(Decoration::StableKernelArgumentINTEL)); } else { - target.beginInstruction(Op::OpDecorate, 2 + 2); + target.beginInstruction(Op::OpDecorate, 2); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::FunctionFloatingPointModeINTEL)); - target.writeWord(static_cast(value->targetWidth.value)); - target.writeWord(static_cast(value->fpOperationMode)); + target.writeWord(static_cast(Decoration::StableKernelArgumentINTEL)); } target.endWrite(); } - void operator()(const PropertySingleElementVectorINTEL *value) + void operator()(const PropertyHostAccessINTEL *value) { + size_t length = 0; + ++length; + length += (value->name.length() + sizeof(unsigned)) / sizeof(unsigned); if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + length); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::SingleElementVectorINTEL)); + target.writeWord(static_cast(Decoration::HostAccessINTEL)); + target.writeWord(static_cast(value->access)); + target.writeString(value->name.c_str()); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + length); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::SingleElementVectorINTEL)); + target.writeWord(static_cast(Decoration::HostAccessINTEL)); + target.writeWord(static_cast(value->access)); + target.writeString(value->name.c_str()); } target.endWrite(); } - void operator()(const PropertyVectorComputeCallableFunctionINTEL *value) + void operator()(const PropertyInitModeINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::VectorComputeCallableFunctionINTEL)); + target.writeWord(static_cast(Decoration::InitModeINTEL)); + target.writeWord(static_cast(value->trigger)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::VectorComputeCallableFunctionINTEL)); + target.writeWord(static_cast(Decoration::InitModeINTEL)); + target.writeWord(static_cast(value->trigger)); } target.endWrite(); } - void operator()(const PropertyMediaBlockIOINTEL *value) + void operator()(const PropertyImplementInRegisterMapINTEL *value) { if (value->memberIndex) { - target.beginInstruction(Op::OpMemberDecorate, 3); + target.beginInstruction(Op::OpMemberDecorate, 3 + 1); target.writeWord(node->resultId); target.writeWord(*value->memberIndex); - target.writeWord(static_cast(Decoration::MediaBlockIOINTEL)); + target.writeWord(static_cast(Decoration::ImplementInRegisterMapINTEL)); + target.writeWord(static_cast(value->value.value)); } else { - target.beginInstruction(Op::OpDecorate, 2); + target.beginInstruction(Op::OpDecorate, 2 + 1); target.writeWord(node->resultId); - target.writeWord(static_cast(Decoration::MediaBlockIOINTEL)); + target.writeWord(static_cast(Decoration::ImplementInRegisterMapINTEL)); + target.writeWord(static_cast(value->value.value)); + } + target.endWrite(); + } + void operator()(const PropertyCacheControlLoadINTEL *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 2); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::CacheControlLoadINTEL)); + target.writeWord(static_cast(value->cacheLevel.value)); + target.writeWord(static_cast(value->cacheControl)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::CacheControlLoadINTEL)); + target.writeWord(static_cast(value->cacheLevel.value)); + target.writeWord(static_cast(value->cacheControl)); + } + target.endWrite(); + } + void operator()(const PropertyCacheControlStoreINTEL *value) + { + if (value->memberIndex) + { + target.beginInstruction(Op::OpMemberDecorate, 3 + 2); + target.writeWord(node->resultId); + target.writeWord(*value->memberIndex); + target.writeWord(static_cast(Decoration::CacheControlStoreINTEL)); + target.writeWord(static_cast(value->cacheLevel.value)); + target.writeWord(static_cast(value->cacheControl)); + } + else + { + target.beginInstruction(Op::OpDecorate, 2 + 2); + target.writeWord(node->resultId); + target.writeWord(static_cast(Decoration::CacheControlStoreINTEL)); + target.writeWord(static_cast(value->cacheLevel.value)); + target.writeWord(static_cast(value->cacheControl)); } target.endWrite(); } diff --git a/prog/gameLibs/spirv/spirv_meta_data_tools.py b/prog/gameLibs/spirv/spirv_meta_data_tools.py index f14dac57f..04e90cbdf 100644 --- a/prog/gameLibs/spirv/spirv_meta_data_tools.py +++ b/prog/gameLibs/spirv/spirv_meta_data_tools.py @@ -480,10 +480,10 @@ def __init__(self, name, lang): self.cpp_op_type_name = 'Op' def load_from_json(self, json_def): - combo_v = int(str(json_def.get('version', 0)), 0) - self.major = int(str(json_def.get('major_version', combo_v / 100)), 0) - self.minor = int(str(json_def.get('minor_version', combo_v % 100)), 0) - self.rev = int(str(json_def.get('revision', 0)), 0) + combo_v = int(float(str(json_def.get('version', 0)))) + self.major = int(float(str(json_def.get('major_version', combo_v / 100)))) + self.minor = int(float(str(json_def.get('minor_version', combo_v % 100)))) + self.rev = int(float(str(json_def.get('revision', 0)))) self.instructions = [] for i in json_def.get('instructions', []): @@ -886,7 +886,7 @@ def enumerate_types(self, type_filter = None): for t in self.types: if type_filter(self.types[t].category): yield self.types[t] - elif isinstance(type_filter, basestring): + elif isinstance(type_filter, str): for t in self.types: if self.types[t].category == type_filter: yield self.types[t] diff --git a/prog/gameLibs/spirv/traits_table.cpp b/prog/gameLibs/spirv/traits_table.cpp index 3b3f58555..2db496743 100644 --- a/prog/gameLibs/spirv/traits_table.cpp +++ b/prog/gameLibs/spirv/traits_table.cpp @@ -1,39 +1,51 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +// auto generated, do not modify! #include "../publicInclude/spirv/traits_table.h" using namespace spirv; static const char *extension_name_table[] = // - {"SPV_KHR_ray_query", "SPV_KHR_multiview", "SPV_INTEL_optnone", "SPV_AMD_gcn_shader", "SPV_INTEL_fpga_reg", "SPV_NV_mesh_shader", - "SPV_NV_ray_tracing", "SPV_INTEL_io_pipes", "SPV_INTEL_loop_fuse", "SPV_KHR_ray_tracing", "SPV_INTEL_subgroups", - "SPV_NV_shading_rate", "SPV_KHR_linkonce_odr", "SPV_KHR_device_group", "SPV_GOOGLE_user_type", "SPV_KHR_8bit_storage", - "SPV_KHR_shader_clock", "SPV_KHR_subgroup_vote", "SPV_AMD_shader_ballot", "SPV_KHR_expect_assume", "SPV_KHR_16bit_storage", - "SPV_KHR_shader_ballot", "SPV_NV_viewport_array2", "SPV_INTEL_debug_module", "SPV_KHR_float_controls", "SPV_NV_bindless_texture", - "SPV_INTEL_media_block_io", "SPV_INTEL_vector_compute", "SPV_KHR_bit_instructions", "SPV_INTEL_blocking_pipes", - "SPV_INTEL_float_controls2", "SPV_INTEL_inline_assembly", "SPV_NV_shader_sm_builtins", "SPV_NV_cooperative_matrix", - "SPV_KHR_variable_pointers", "SPV_EXT_shader_image_int64", "SPV_GOOGLE_decorate_string", "SPV_EXT_descriptor_indexing", - "SPV_KHR_integer_dot_product", "SPV_INTEL_function_pointers", "SPV_KHR_vulkan_memory_model", "SPV_INTEL_kernel_attributes", - "SPV_KHR_post_depth_coverage", "SPV_INTEL_fp_fast_math_mode", "SPV_NV_stereo_view_rendering", "SPV_AMD_shader_fragment_mask", - "SPV_KHR_terminate_invocation", "SPV_INTEL_fpga_loop_controls", "SPV_KHR_fragment_shading_rate", "SPV_AMD_shader_trinary_minmax", - "SPV_EXT_shader_stencil_export", "SPV_INTEL_usm_storage_classes", "SPV_NV_shader_image_footprint", - "SPV_NV_ray_tracing_motion_blur", "SPV_INTEL_fpga_memory_accesses", "SPV_INTEL_fpga_buffer_location", - "SPV_KHR_shader_draw_parameters", "SPV_GOOGLE_hlsl_functionality1", "SPV_EXT_fragment_fully_covered", - "SPV_EXT_shader_atomic_float_add", "SPV_AMD_texture_gather_bias_lod", "SPV_INTEL_variable_length_array", - "SPV_KHR_physical_storage_buffer", "SPV_EXT_physical_storage_buffer", "SPV_INTEL_fpga_memory_attributes", - "SPV_INTEL_long_constant_composite", "SPV_INTEL_fpga_cluster_attributes", "SPV_EXT_shader_atomic_float16_add", - "SPV_NV_compute_shader_derivatives", "SPV_EXT_fragment_shader_interlock", "SPV_KHR_shader_atomic_counter_ops", - "SPV_KHR_no_integer_wrap_decoration", "SPV_NV_geometry_shader_passthrough", "SPV_NV_shader_subgroup_partitioned", - "SPV_NV_fragment_shader_barycentric", "SPV_AMD_shader_image_load_store_lod", "SPV_AMD_gpu_shader_half_float_fetch", - "SPV_EXT_demote_to_helper_invocation", "SPV_KHR_fragment_shader_barycentric", "SPV_EXT_fragment_invocation_density", - "SPV_INTEL_shader_integer_functions2", "SPV_EXT_shader_viewport_index_layer", "SPV_EXT_shader_atomic_float_min_max", - "SPV_NV_sample_mask_override_coverage", "SPV_KHR_storage_buffer_storage_class", "SPV_INTEL_unstructured_loop_controls", - "SPV_NVX_multiview_per_view_attributes", "SPV_KHR_subgroup_uniform_control_flow", "SPV_INTEL_arbitrary_precision_integers", - "SPV_KHR_workgroup_memory_explicit_layout", "SPV_AMD_shader_explicit_vertex_parameter", - "SPV_INTEL_arbitrary_precision_fixed_point", "SPV_INTEL_device_side_avc_motion_estimation", - "SPV_INTEL_arbitrary_precision_floating_point"}; + {"SPV_KHR_multiview", "SPV_KHR_ray_query", "SPV_INTEL_optnone", "SPV_NV_mesh_shader", "SPV_NV_ray_tracing", "SPV_INTEL_io_pipes", + "SPV_INTEL_fpga_reg", "SPV_AMD_gcn_shader", "SPV_EXT_mesh_shader", "SPV_KHR_ray_tracing", "SPV_NV_shading_rate", + "SPV_INTEL_subgroups", "SPV_INTEL_loop_fuse", "SPV_KHR_linkonce_odr", "SPV_GOOGLE_user_type", "SPV_KHR_device_group", + "SPV_KHR_8bit_storage", "SPV_KHR_shader_clock", "SPV_KHR_quad_control", "SPV_KHR_shader_ballot", "SPV_KHR_ray_cull_mask", + "SPV_AMD_shader_ballot", "SPV_ARM_core_builtins", "SPV_KHR_subgroup_vote", "SPV_KHR_16bit_storage", "SPV_KHR_expect_assume", + "SPV_KHR_float_controls", "SPV_NV_viewport_array2", "SPV_INTEL_debug_module", "SPV_INTEL_fp_max_error", "SPV_AMDX_shader_enqueue", + "SPV_NV_bindless_texture", "SPV_KHR_subgroup_rotate", "SPV_KHR_float_controls2", "SPV_INTEL_split_barrier", + "SPV_EXT_opacity_micromap", "SPV_NV_raw_access_chains", "SPV_INTEL_media_block_io", "SPV_INTEL_vector_compute", + "SPV_INTEL_blocking_pipes", "SPV_KHR_bit_instructions", "SPV_INTEL_cache_controls", "SPV_KHR_variable_pointers", + "SPV_QCOM_image_processing", "SPV_NV_shader_sm_builtins", "SPV_EXT_shader_tile_image", "SPV_NV_cooperative_matrix", + "SPV_INTEL_float_controls2", "SPV_INTEL_inline_assembly", "SPV_INTEL_runtime_aligned", "SPV_INTEL_long_composites", + "SPV_QCOM_image_processing2", "SPV_EXT_shader_image_int64", "SPV_INTEL_fpga_dsp_control", "SPV_KHR_cooperative_matrix", + "SPV_GOOGLE_decorate_string", "SPV_KHR_vulkan_memory_model", "SPV_KHR_post_depth_coverage", "SPV_INTEL_kernel_attributes", + "SPV_INTEL_function_pointers", "SPV_EXT_descriptor_indexing", "SPV_INTEL_fp_fast_math_mode", "SPV_KHR_integer_dot_product", + "SPV_INTEL_maximum_registers", "SPV_NV_stereo_view_rendering", "SPV_AMD_shader_fragment_mask", "SPV_NV_displacement_micromap", + "SPV_INTEL_fpga_loop_controls", "SPV_KHR_terminate_invocation", "SPV_EXT_shader_stencil_export", "SPV_KHR_maximal_reconvergence", + "SPV_INTEL_usm_storage_classes", "SPV_KHR_fragment_shading_rate", "SPV_NV_shader_image_footprint", "SPV_EXT_replicated_composites", + "SPV_INTEL_bfloat16_conversion", "SPV_AMD_shader_trinary_minmax", "SPV_GOOGLE_hlsl_functionality1", + "SPV_KHR_shader_draw_parameters", "SPV_EXT_fragment_fully_covered", "SPV_NV_ray_tracing_motion_blur", + "SPV_INTEL_fpga_memory_accesses", "SPV_INTEL_fpga_buffer_location", "SPV_INTEL_fpga_latency_control", + "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer", "SPV_AMD_texture_gather_bias_lod", + "SPV_INTEL_variable_length_array", "SPV_EXT_shader_atomic_float_add", "SPV_INTEL_masked_gather_scatter", + "SPV_INTEL_memory_access_aliasing", "SPV_INTEL_fpga_memory_attributes", "SPV_NV_shader_invocation_reorder", + "SPV_NV_shader_atomic_fp16_vector", "SPV_NV_compute_shader_derivatives", "SPV_EXT_fragment_shader_interlock", + "SPV_KHR_shader_atomic_counter_ops", "SPV_INTEL_fpga_cluster_attributes", "SPV_EXT_shader_atomic_float16_add", + "SPV_KHR_no_integer_wrap_decoration", "SPV_NV_geometry_shader_passthrough", "SPV_NV_fragment_shader_barycentric", + "SPV_NV_shader_subgroup_partitioned", "SPV_ARM_cooperative_matrix_layouts", "SPV_KHR_ray_tracing_position_fetch", + "SPV_INTEL_fpga_argument_interfaces", "SPV_KHR_uniform_group_instructions", "SPV_KHR_fragment_shader_barycentric", + "SPV_EXT_fragment_invocation_density", "SPV_AMD_gpu_shader_half_float_fetch", "SPV_AMD_shader_image_load_store_lod", + "SPV_EXT_shader_viewport_index_layer", "SPV_EXT_demote_to_helper_invocation", "SPV_INTEL_shader_integer_functions2", + "SPV_EXT_shader_atomic_float_min_max", "SPV_KHR_storage_buffer_storage_class", "SPV_NV_sample_mask_override_coverage", + "SPV_INTEL_unstructured_loop_controls", "SPV_KHR_relaxed_extended_instruction", "SPV_KHR_subgroup_uniform_control_flow", + "SPV_NVX_multiview_per_view_attributes", "SPV_INTEL_global_variable_host_access", "SPV_INTEL_arbitrary_precision_integers", + "SPV_AMD_shader_explicit_vertex_parameter", "SPV_KHR_workgroup_memory_explicit_layout", + "SPV_INTEL_arbitrary_precision_fixed_point", "SPV_INTEL_global_variable_fpga_decorations", + "SPV_INTEL_device_side_avc_motion_estimation", "SPV_AMD_shader_early_and_late_fragment_tests", + "SPV_INTEL_arbitrary_precision_floating_point", "SPV_INTEL_fpga_invocation_pipelining_attributes"}; static const size_t extension_name_table_len[] = // - {17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 23, 24, 24, 24, 24, 25, 25, 25, - 25, 25, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 32, 33, - 33, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 37, 37, 38, 40, 40, 41, 43, 44}; + {17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, + 23, 23, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, + 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33, 33, + 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 38, 40, 40, 41, 42, 43, 44, 44, 47}; Extension spirv::extension_name_to_id(const char *name, Id name_len) { for (Id i = 0; i < static_cast(Extension::Count); ++i) @@ -70,79 +82,249 @@ dag::ConstSpan spirv::extended_grammar_id_to_name(ExtendedGrammar ident) return make_span("", 16 + 13); }; -const char *spirv::name_of(SamplerFilterMode value) +const char *spirv::name_of(SourceLanguage value) { switch (value) { - case SamplerFilterMode::Nearest: return "Nearest"; - case SamplerFilterMode::Linear: return "Linear"; + case SourceLanguage::Unknown: return "Unknown"; + case SourceLanguage::ESSL: return "ESSL"; + case SourceLanguage::GLSL: return "GLSL"; + case SourceLanguage::OpenCL_C: return "OpenCL_C"; + case SourceLanguage::OpenCL_CPP: return "OpenCL_CPP"; + case SourceLanguage::HLSL: return "HLSL"; + case SourceLanguage::CPP_for_OpenCL: return "CPP_for_OpenCL"; + case SourceLanguage::SYCL: return "SYCL"; + case SourceLanguage::HERO_C: return "HERO_C"; + case SourceLanguage::NZSL: return "NZSL"; + case SourceLanguage::WGSL: return "WGSL"; + case SourceLanguage::Slang: return "Slang"; + case SourceLanguage::Zig: return "Zig"; } - return ""; + return ""; } -const char *spirv::name_of(FunctionParameterAttribute value) +const char *spirv::name_of(ExecutionModel value) { switch (value) { - case FunctionParameterAttribute::Zext: return "Zext"; - case FunctionParameterAttribute::Sext: return "Sext"; - case FunctionParameterAttribute::ByVal: return "ByVal"; - case FunctionParameterAttribute::Sret: return "Sret"; - case FunctionParameterAttribute::NoAlias: return "NoAlias"; - case FunctionParameterAttribute::NoCapture: return "NoCapture"; - case FunctionParameterAttribute::NoWrite: return "NoWrite"; - case FunctionParameterAttribute::NoReadWrite: return "NoReadWrite"; + case ExecutionModel::Vertex: return "Vertex"; + case ExecutionModel::TessellationControl: return "TessellationControl"; + case ExecutionModel::TessellationEvaluation: return "TessellationEvaluation"; + case ExecutionModel::Geometry: return "Geometry"; + case ExecutionModel::Fragment: return "Fragment"; + case ExecutionModel::GLCompute: return "GLCompute"; + case ExecutionModel::Kernel: return "Kernel"; + case ExecutionModel::TaskNV: return "TaskNV"; + case ExecutionModel::MeshNV: return "MeshNV"; + case ExecutionModel::RayGenerationKHR: return "RayGenerationKHR"; + case ExecutionModel::IntersectionKHR: return "IntersectionKHR"; + case ExecutionModel::AnyHitKHR: return "AnyHitKHR"; + case ExecutionModel::ClosestHitKHR: return "ClosestHitKHR"; + case ExecutionModel::MissKHR: return "MissKHR"; + case ExecutionModel::CallableKHR: return "CallableKHR"; + case ExecutionModel::TaskEXT: return "TaskEXT"; + case ExecutionModel::MeshEXT: return "MeshEXT"; } - return ""; + return ""; } -const char *spirv::name_of(ImageChannelOrder value) +const char *spirv::name_of(AddressingModel value) { switch (value) { - case ImageChannelOrder::R: return "R"; - case ImageChannelOrder::A: return "A"; - case ImageChannelOrder::RG: return "RG"; - case ImageChannelOrder::RA: return "RA"; - case ImageChannelOrder::RGB: return "RGB"; - case ImageChannelOrder::RGBA: return "RGBA"; - case ImageChannelOrder::BGRA: return "BGRA"; - case ImageChannelOrder::ARGB: return "ARGB"; - case ImageChannelOrder::Intensity: return "Intensity"; - case ImageChannelOrder::Luminance: return "Luminance"; - case ImageChannelOrder::Rx: return "Rx"; - case ImageChannelOrder::RGx: return "RGx"; - case ImageChannelOrder::RGBx: return "RGBx"; - case ImageChannelOrder::Depth: return "Depth"; - case ImageChannelOrder::DepthStencil: return "DepthStencil"; - case ImageChannelOrder::sRGB: return "sRGB"; - case ImageChannelOrder::sRGBx: return "sRGBx"; - case ImageChannelOrder::sRGBA: return "sRGBA"; - case ImageChannelOrder::sBGRA: return "sBGRA"; - case ImageChannelOrder::ABGR: return "ABGR"; + case AddressingModel::Logical: return "Logical"; + case AddressingModel::Physical32: return "Physical32"; + case AddressingModel::Physical64: return "Physical64"; + case AddressingModel::PhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; } - return ""; + return ""; } -const char *spirv::name_of(KernelEnqueueFlags value) +const char *spirv::name_of(MemoryModel value) { switch (value) { - case KernelEnqueueFlags::NoWait: return "NoWait"; - case KernelEnqueueFlags::WaitKernel: return "WaitKernel"; - case KernelEnqueueFlags::WaitWorkGroup: return "WaitWorkGroup"; + case MemoryModel::Simple: return "Simple"; + case MemoryModel::GLSL450: return "GLSL450"; + case MemoryModel::OpenCL: return "OpenCL"; + case MemoryModel::Vulkan: return "Vulkan"; } - return ""; + return ""; } -const char *spirv::name_of(RayQueryIntersection value) +const char *spirv::name_of(ExecutionMode value) { switch (value) { - case RayQueryIntersection::RayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; - case RayQueryIntersection::RayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; + case ExecutionMode::Invocations: return "Invocations"; + case ExecutionMode::SpacingEqual: return "SpacingEqual"; + case ExecutionMode::SpacingFractionalEven: return "SpacingFractionalEven"; + case ExecutionMode::SpacingFractionalOdd: return "SpacingFractionalOdd"; + case ExecutionMode::VertexOrderCw: return "VertexOrderCw"; + case ExecutionMode::VertexOrderCcw: return "VertexOrderCcw"; + case ExecutionMode::PixelCenterInteger: return "PixelCenterInteger"; + case ExecutionMode::OriginUpperLeft: return "OriginUpperLeft"; + case ExecutionMode::OriginLowerLeft: return "OriginLowerLeft"; + case ExecutionMode::EarlyFragmentTests: return "EarlyFragmentTests"; + case ExecutionMode::PointMode: return "PointMode"; + case ExecutionMode::Xfb: return "Xfb"; + case ExecutionMode::DepthReplacing: return "DepthReplacing"; + case ExecutionMode::DepthGreater: return "DepthGreater"; + case ExecutionMode::DepthLess: return "DepthLess"; + case ExecutionMode::DepthUnchanged: return "DepthUnchanged"; + case ExecutionMode::LocalSize: return "LocalSize"; + case ExecutionMode::LocalSizeHint: return "LocalSizeHint"; + case ExecutionMode::InputPoints: return "InputPoints"; + case ExecutionMode::InputLines: return "InputLines"; + case ExecutionMode::InputLinesAdjacency: return "InputLinesAdjacency"; + case ExecutionMode::Triangles: return "Triangles"; + case ExecutionMode::InputTrianglesAdjacency: return "InputTrianglesAdjacency"; + case ExecutionMode::Quads: return "Quads"; + case ExecutionMode::Isolines: return "Isolines"; + case ExecutionMode::OutputVertices: return "OutputVertices"; + case ExecutionMode::OutputPoints: return "OutputPoints"; + case ExecutionMode::OutputLineStrip: return "OutputLineStrip"; + case ExecutionMode::OutputTriangleStrip: return "OutputTriangleStrip"; + case ExecutionMode::VecTypeHint: return "VecTypeHint"; + case ExecutionMode::ContractionOff: return "ContractionOff"; + case ExecutionMode::Initializer: return "Initializer"; + case ExecutionMode::Finalizer: return "Finalizer"; + case ExecutionMode::SubgroupSize: return "SubgroupSize"; + case ExecutionMode::SubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; + case ExecutionMode::SubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; + case ExecutionMode::LocalSizeId: return "LocalSizeId"; + case ExecutionMode::LocalSizeHintId: return "LocalSizeHintId"; + case ExecutionMode::NonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionMode::NonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionMode::NonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionMode::SubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; + case ExecutionMode::PostDepthCoverage: return "PostDepthCoverage"; + case ExecutionMode::DenormPreserve: return "DenormPreserve"; + case ExecutionMode::DenormFlushToZero: return "DenormFlushToZero"; + case ExecutionMode::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; + case ExecutionMode::RoundingModeRTE: return "RoundingModeRTE"; + case ExecutionMode::RoundingModeRTZ: return "RoundingModeRTZ"; + case ExecutionMode::EarlyAndLateFragmentTestsAMD: return "EarlyAndLateFragmentTestsAMD"; + case ExecutionMode::StencilRefReplacingEXT: return "StencilRefReplacingEXT"; + case ExecutionMode::CoalescingAMDX: return "CoalescingAMDX"; + case ExecutionMode::MaxNodeRecursionAMDX: return "MaxNodeRecursionAMDX"; + case ExecutionMode::StaticNumWorkgroupsAMDX: return "StaticNumWorkgroupsAMDX"; + case ExecutionMode::ShaderIndexAMDX: return "ShaderIndexAMDX"; + case ExecutionMode::MaxNumWorkgroupsAMDX: return "MaxNumWorkgroupsAMDX"; + case ExecutionMode::StencilRefUnchangedFrontAMD: return "StencilRefUnchangedFrontAMD"; + case ExecutionMode::StencilRefGreaterFrontAMD: return "StencilRefGreaterFrontAMD"; + case ExecutionMode::StencilRefLessFrontAMD: return "StencilRefLessFrontAMD"; + case ExecutionMode::StencilRefUnchangedBackAMD: return "StencilRefUnchangedBackAMD"; + case ExecutionMode::StencilRefGreaterBackAMD: return "StencilRefGreaterBackAMD"; + case ExecutionMode::StencilRefLessBackAMD: return "StencilRefLessBackAMD"; + case ExecutionMode::QuadDerivativesKHR: return "QuadDerivativesKHR"; + case ExecutionMode::RequireFullQuadsKHR: return "RequireFullQuadsKHR"; + case ExecutionMode::OutputLinesEXT: return "OutputLinesEXT"; + case ExecutionMode::OutputPrimitivesEXT: return "OutputPrimitivesEXT"; + case ExecutionMode::DerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; + case ExecutionMode::DerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; + case ExecutionMode::OutputTrianglesEXT: return "OutputTrianglesEXT"; + case ExecutionMode::PixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; + case ExecutionMode::PixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; + case ExecutionMode::SampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; + case ExecutionMode::SampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; + case ExecutionMode::ShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; + case ExecutionMode::ShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; + case ExecutionMode::SharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; + case ExecutionMode::RoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; + case ExecutionMode::RoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; + case ExecutionMode::FloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; + case ExecutionMode::FloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; + case ExecutionMode::MaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; + case ExecutionMode::MaxWorkDimINTEL: return "MaxWorkDimINTEL"; + case ExecutionMode::NoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; + case ExecutionMode::NumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionMode::SchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case ExecutionMode::MaximallyReconvergesKHR: return "MaximallyReconvergesKHR"; + case ExecutionMode::FPFastMathDefault: return "FPFastMathDefault"; + case ExecutionMode::StreamingInterfaceINTEL: return "StreamingInterfaceINTEL"; + case ExecutionMode::RegisterMapInterfaceINTEL: return "RegisterMapInterfaceINTEL"; + case ExecutionMode::NamedBarrierCountINTEL: return "NamedBarrierCountINTEL"; + case ExecutionMode::MaximumRegistersINTEL: return "MaximumRegistersINTEL"; + case ExecutionMode::MaximumRegistersIdINTEL: return "MaximumRegistersIdINTEL"; + case ExecutionMode::NamedMaximumRegistersINTEL: return "NamedMaximumRegistersINTEL"; } - return ""; + return ""; +} + +const char *spirv::name_of(StorageClass value) +{ + switch (value) + { + case StorageClass::UniformConstant: return "UniformConstant"; + case StorageClass::Input: return "Input"; + case StorageClass::Uniform: return "Uniform"; + case StorageClass::Output: return "Output"; + case StorageClass::Workgroup: return "Workgroup"; + case StorageClass::CrossWorkgroup: return "CrossWorkgroup"; + case StorageClass::Private: return "Private"; + case StorageClass::Function: return "Function"; + case StorageClass::Generic: return "Generic"; + case StorageClass::PushConstant: return "PushConstant"; + case StorageClass::AtomicCounter: return "AtomicCounter"; + case StorageClass::Image: return "Image"; + case StorageClass::StorageBuffer: return "StorageBuffer"; + case StorageClass::TileImageEXT: return "TileImageEXT"; + case StorageClass::NodePayloadAMDX: return "NodePayloadAMDX"; + case StorageClass::NodeOutputPayloadAMDX: return "NodeOutputPayloadAMDX"; + case StorageClass::CallableDataKHR: return "CallableDataKHR"; + case StorageClass::IncomingCallableDataKHR: return "IncomingCallableDataKHR"; + case StorageClass::RayPayloadKHR: return "RayPayloadKHR"; + case StorageClass::HitAttributeKHR: return "HitAttributeKHR"; + case StorageClass::IncomingRayPayloadKHR: return "IncomingRayPayloadKHR"; + case StorageClass::ShaderRecordBufferKHR: return "ShaderRecordBufferKHR"; + case StorageClass::PhysicalStorageBuffer: return "PhysicalStorageBuffer"; + case StorageClass::HitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClass::TaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClass::CodeSectionINTEL: return "CodeSectionINTEL"; + case StorageClass::DeviceOnlyINTEL: return "DeviceOnlyINTEL"; + case StorageClass::HostOnlyINTEL: return "HostOnlyINTEL"; + } + return ""; +} + +const char *spirv::name_of(Dim value) +{ + switch (value) + { + case Dim::Dim1D: return "1D"; + case Dim::Dim2D: return "2D"; + case Dim::Dim3D: return "3D"; + case Dim::Cube: return "Cube"; + case Dim::Rect: return "Rect"; + case Dim::Buffer: return "Buffer"; + case Dim::SubpassData: return "SubpassData"; + case Dim::TileImageDataEXT: return "TileImageDataEXT"; + } + return ""; +} + +const char *spirv::name_of(SamplerAddressingMode value) +{ + switch (value) + { + case SamplerAddressingMode::None: return "None"; + case SamplerAddressingMode::ClampToEdge: return "ClampToEdge"; + case SamplerAddressingMode::Clamp: return "Clamp"; + case SamplerAddressingMode::Repeat: return "Repeat"; + case SamplerAddressingMode::RepeatMirrored: return "RepeatMirrored"; + } + return ""; +} + +const char *spirv::name_of(SamplerFilterMode value) +{ + switch (value) + { + case SamplerFilterMode::Nearest: return "Nearest"; + case SamplerFilterMode::Linear: return "Linear"; + } + return ""; } const char *spirv::name_of(ImageFormat value) @@ -195,30 +377,32 @@ const char *spirv::name_of(ImageFormat value) return ""; } -const char *spirv::name_of(Scope value) -{ - switch (value) - { - case Scope::CrossDevice: return "CrossDevice"; - case Scope::Device: return "Device"; - case Scope::Workgroup: return "Workgroup"; - case Scope::Subgroup: return "Subgroup"; - case Scope::Invocation: return "Invocation"; - case Scope::QueueFamily: return "QueueFamily"; - case Scope::ShaderCallKHR: return "ShaderCallKHR"; - } - return ""; -} - -const char *spirv::name_of(LinkageType value) +const char *spirv::name_of(ImageChannelOrder value) { switch (value) { - case LinkageType::Export: return "Export"; - case LinkageType::Import: return "Import"; - case LinkageType::LinkOnceODR: return "LinkOnceODR"; + case ImageChannelOrder::R: return "R"; + case ImageChannelOrder::A: return "A"; + case ImageChannelOrder::RG: return "RG"; + case ImageChannelOrder::RA: return "RA"; + case ImageChannelOrder::RGB: return "RGB"; + case ImageChannelOrder::RGBA: return "RGBA"; + case ImageChannelOrder::BGRA: return "BGRA"; + case ImageChannelOrder::ARGB: return "ARGB"; + case ImageChannelOrder::Intensity: return "Intensity"; + case ImageChannelOrder::Luminance: return "Luminance"; + case ImageChannelOrder::Rx: return "Rx"; + case ImageChannelOrder::RGx: return "RGx"; + case ImageChannelOrder::RGBx: return "RGBx"; + case ImageChannelOrder::Depth: return "Depth"; + case ImageChannelOrder::DepthStencil: return "DepthStencil"; + case ImageChannelOrder::sRGB: return "sRGB"; + case ImageChannelOrder::sRGBx: return "sRGBx"; + case ImageChannelOrder::sRGBA: return "sRGBA"; + case ImageChannelOrder::sBGRA: return "sBGRA"; + case ImageChannelOrder::ABGR: return "ABGR"; } - return ""; + return ""; } const char *spirv::name_of(ImageChannelDataType value) @@ -242,8 +426,121 @@ const char *spirv::name_of(ImageChannelDataType value) case ImageChannelDataType::Float: return "Float"; case ImageChannelDataType::UnormInt24: return "UnormInt24"; case ImageChannelDataType::UnormInt101010_2: return "UnormInt101010_2"; + case ImageChannelDataType::UnsignedIntRaw10EXT: return "UnsignedIntRaw10EXT"; + case ImageChannelDataType::UnsignedIntRaw12EXT: return "UnsignedIntRaw12EXT"; + } + return ""; +} + +const char *spirv::name_of(FPRoundingMode value) +{ + switch (value) + { + case FPRoundingMode::RTE: return "RTE"; + case FPRoundingMode::RTZ: return "RTZ"; + case FPRoundingMode::RTP: return "RTP"; + case FPRoundingMode::RTN: return "RTN"; + } + return ""; +} + +const char *spirv::name_of(FPDenormMode value) +{ + switch (value) + { + case FPDenormMode::Preserve: return "Preserve"; + case FPDenormMode::FlushToZero: return "FlushToZero"; + } + return ""; +} + +const char *spirv::name_of(QuantizationModes value) +{ + switch (value) + { + case QuantizationModes::TRN: return "TRN"; + case QuantizationModes::TRN_ZERO: return "TRN_ZERO"; + case QuantizationModes::RND: return "RND"; + case QuantizationModes::RND_ZERO: return "RND_ZERO"; + case QuantizationModes::RND_INF: return "RND_INF"; + case QuantizationModes::RND_MIN_INF: return "RND_MIN_INF"; + case QuantizationModes::RND_CONV: return "RND_CONV"; + case QuantizationModes::RND_CONV_ODD: return "RND_CONV_ODD"; + } + return ""; +} + +const char *spirv::name_of(FPOperationMode value) +{ + switch (value) + { + case FPOperationMode::IEEE: return "IEEE"; + case FPOperationMode::ALT: return "ALT"; + } + return ""; +} + +const char *spirv::name_of(OverflowModes value) +{ + switch (value) + { + case OverflowModes::WRAP: return "WRAP"; + case OverflowModes::SAT: return "SAT"; + case OverflowModes::SAT_ZERO: return "SAT_ZERO"; + case OverflowModes::SAT_SYM: return "SAT_SYM"; + } + return ""; +} + +const char *spirv::name_of(LinkageType value) +{ + switch (value) + { + case LinkageType::Export: return "Export"; + case LinkageType::Import: return "Import"; + case LinkageType::LinkOnceODR: return "LinkOnceODR"; + } + return ""; +} + +const char *spirv::name_of(AccessQualifier value) +{ + switch (value) + { + case AccessQualifier::ReadOnly: return "ReadOnly"; + case AccessQualifier::WriteOnly: return "WriteOnly"; + case AccessQualifier::ReadWrite: return "ReadWrite"; + } + return ""; +} + +const char *spirv::name_of(HostAccessQualifier value) +{ + switch (value) + { + case HostAccessQualifier::NoneINTEL: return "NoneINTEL"; + case HostAccessQualifier::ReadINTEL: return "ReadINTEL"; + case HostAccessQualifier::WriteINTEL: return "WriteINTEL"; + case HostAccessQualifier::ReadWriteINTEL: return "ReadWriteINTEL"; + } + return ""; +} + +const char *spirv::name_of(FunctionParameterAttribute value) +{ + switch (value) + { + case FunctionParameterAttribute::Zext: return "Zext"; + case FunctionParameterAttribute::Sext: return "Sext"; + case FunctionParameterAttribute::ByVal: return "ByVal"; + case FunctionParameterAttribute::Sret: return "Sret"; + case FunctionParameterAttribute::NoAlias: return "NoAlias"; + case FunctionParameterAttribute::NoCapture: return "NoCapture"; + case FunctionParameterAttribute::NoWrite: return "NoWrite"; + case FunctionParameterAttribute::NoReadWrite: return "NoReadWrite"; + case FunctionParameterAttribute::RuntimeAlignedINTEL: return "RuntimeAlignedINTEL"; } - return ""; + return ""; } const char *spirv::name_of(Decoration value) @@ -299,18 +596,26 @@ const char *spirv::name_of(Decoration value) case Decoration::MaxByteOffsetId: return "MaxByteOffsetId"; case Decoration::NoSignedWrap: return "NoSignedWrap"; case Decoration::NoUnsignedWrap: return "NoUnsignedWrap"; + case Decoration::WeightTextureQCOM: return "WeightTextureQCOM"; + case Decoration::BlockMatchTextureQCOM: return "BlockMatchTextureQCOM"; + case Decoration::BlockMatchSamplerQCOM: return "BlockMatchSamplerQCOM"; case Decoration::ExplicitInterpAMD: return "ExplicitInterpAMD"; + case Decoration::NodeSharesPayloadLimitsWithAMDX: return "NodeSharesPayloadLimitsWithAMDX"; + case Decoration::NodeMaxPayloadsAMDX: return "NodeMaxPayloadsAMDX"; + case Decoration::TrackFinishWritingAMDX: return "TrackFinishWritingAMDX"; + case Decoration::PayloadNodeNameAMDX: return "PayloadNodeNameAMDX"; case Decoration::OverrideCoverageNV: return "OverrideCoverageNV"; case Decoration::PassthroughNV: return "PassthroughNV"; case Decoration::ViewportRelativeNV: return "ViewportRelativeNV"; case Decoration::SecondaryViewportRelativeNV: return "SecondaryViewportRelativeNV"; - case Decoration::PerPrimitiveNV: return "PerPrimitiveNV"; + case Decoration::PerPrimitiveEXT: return "PerPrimitiveEXT"; case Decoration::PerViewNV: return "PerViewNV"; case Decoration::PerTaskNV: return "PerTaskNV"; case Decoration::PerVertexKHR: return "PerVertexKHR"; case Decoration::NonUniform: return "NonUniform"; case Decoration::RestrictPointer: return "RestrictPointer"; case Decoration::AliasedPointer: return "AliasedPointer"; + case Decoration::HitObjectShaderRecordBufferNV: return "HitObjectShaderRecordBufferNV"; case Decoration::BindlessSamplerNV: return "BindlessSamplerNV"; case Decoration::BindlessImageNV: return "BindlessImageNV"; case Decoration::BoundSamplerNV: return "BoundSamplerNV"; @@ -341,38 +646,49 @@ const char *spirv::name_of(Decoration value) case Decoration::MergeINTEL: return "MergeINTEL"; case Decoration::BankBitsINTEL: return "BankBitsINTEL"; case Decoration::ForcePow2DepthINTEL: return "ForcePow2DepthINTEL"; + case Decoration::StridesizeINTEL: return "StridesizeINTEL"; + case Decoration::WordsizeINTEL: return "WordsizeINTEL"; + case Decoration::TrueDualPortINTEL: return "TrueDualPortINTEL"; case Decoration::BurstCoalesceINTEL: return "BurstCoalesceINTEL"; case Decoration::CacheSizeINTEL: return "CacheSizeINTEL"; case Decoration::DontStaticallyCoalesceINTEL: return "DontStaticallyCoalesceINTEL"; case Decoration::PrefetchINTEL: return "PrefetchINTEL"; case Decoration::StallEnableINTEL: return "StallEnableINTEL"; case Decoration::FuseLoopsInFunctionINTEL: return "FuseLoopsInFunctionINTEL"; + case Decoration::MathOpDSPModeINTEL: return "MathOpDSPModeINTEL"; + case Decoration::AliasScopeINTEL: return "AliasScopeINTEL"; + case Decoration::NoAliasINTEL: return "NoAliasINTEL"; + case Decoration::InitiationIntervalINTEL: return "InitiationIntervalINTEL"; + case Decoration::MaxConcurrencyINTEL: return "MaxConcurrencyINTEL"; + case Decoration::PipelineEnableINTEL: return "PipelineEnableINTEL"; case Decoration::BufferLocationINTEL: return "BufferLocationINTEL"; case Decoration::IOPipeStorageINTEL: return "IOPipeStorageINTEL"; case Decoration::FunctionFloatingPointModeINTEL: return "FunctionFloatingPointModeINTEL"; case Decoration::SingleElementVectorINTEL: return "SingleElementVectorINTEL"; case Decoration::VectorComputeCallableFunctionINTEL: return "VectorComputeCallableFunctionINTEL"; case Decoration::MediaBlockIOINTEL: return "MediaBlockIOINTEL"; + case Decoration::StallFreeINTEL: return "StallFreeINTEL"; + case Decoration::FPMaxErrorDecorationINTEL: return "FPMaxErrorDecorationINTEL"; + case Decoration::LatencyControlLabelINTEL: return "LatencyControlLabelINTEL"; + case Decoration::LatencyControlConstraintINTEL: return "LatencyControlConstraintINTEL"; + case Decoration::ConduitKernelArgumentINTEL: return "ConduitKernelArgumentINTEL"; + case Decoration::RegisterMapKernelArgumentINTEL: return "RegisterMapKernelArgumentINTEL"; + case Decoration::MMHostInterfaceAddressWidthINTEL: return "MMHostInterfaceAddressWidthINTEL"; + case Decoration::MMHostInterfaceDataWidthINTEL: return "MMHostInterfaceDataWidthINTEL"; + case Decoration::MMHostInterfaceLatencyINTEL: return "MMHostInterfaceLatencyINTEL"; + case Decoration::MMHostInterfaceReadWriteModeINTEL: return "MMHostInterfaceReadWriteModeINTEL"; + case Decoration::MMHostInterfaceMaxBurstINTEL: return "MMHostInterfaceMaxBurstINTEL"; + case Decoration::MMHostInterfaceWaitRequestINTEL: return "MMHostInterfaceWaitRequestINTEL"; + case Decoration::StableKernelArgumentINTEL: return "StableKernelArgumentINTEL"; + case Decoration::HostAccessINTEL: return "HostAccessINTEL"; + case Decoration::InitModeINTEL: return "InitModeINTEL"; + case Decoration::ImplementInRegisterMapINTEL: return "ImplementInRegisterMapINTEL"; + case Decoration::CacheControlLoadINTEL: return "CacheControlLoadINTEL"; + case Decoration::CacheControlStoreINTEL: return "CacheControlStoreINTEL"; } return ""; } -const char *spirv::name_of(QuantizationModes value) -{ - switch (value) - { - case QuantizationModes::TRN: return "TRN"; - case QuantizationModes::TRN_ZERO: return "TRN_ZERO"; - case QuantizationModes::RND: return "RND"; - case QuantizationModes::RND_ZERO: return "RND_ZERO"; - case QuantizationModes::RND_INF: return "RND_INF"; - case QuantizationModes::RND_MIN_INF: return "RND_MIN_INF"; - case QuantizationModes::RND_CONV: return "RND_CONV"; - case QuantizationModes::RND_CONV_ODD: return "RND_CONV_ODD"; - } - return ""; -} - const char *spirv::name_of(BuiltIn value) { switch (value) @@ -418,6 +734,11 @@ const char *spirv::name_of(BuiltIn value) case BuiltIn::SubgroupLocalInvocationId: return "SubgroupLocalInvocationId"; case BuiltIn::VertexIndex: return "VertexIndex"; case BuiltIn::InstanceIndex: return "InstanceIndex"; + case BuiltIn::CoreIDARM: return "CoreIDARM"; + case BuiltIn::CoreCountARM: return "CoreCountARM"; + case BuiltIn::CoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltIn::WarpIDARM: return "WarpIDARM"; + case BuiltIn::WarpMaxIDARM: return "WarpMaxIDARM"; case BuiltIn::SubgroupEqMask: return "SubgroupEqMask"; case BuiltIn::SubgroupGeMask: return "SubgroupGeMask"; case BuiltIn::SubgroupGtMask: return "SubgroupGtMask"; @@ -438,6 +759,8 @@ const char *spirv::name_of(BuiltIn value) case BuiltIn::BaryCoordSmoothSampleAMD: return "BaryCoordSmoothSampleAMD"; case BuiltIn::BaryCoordPullModelAMD: return "BaryCoordPullModelAMD"; case BuiltIn::FragStencilRefEXT: return "FragStencilRefEXT"; + case BuiltIn::CoalescedInputCountAMDX: return "CoalescedInputCountAMDX"; + case BuiltIn::ShaderIndexAMDX: return "ShaderIndexAMDX"; case BuiltIn::ViewportMaskNV: return "ViewportMaskNV"; case BuiltIn::SecondaryPositionNV: return "SecondaryPositionNV"; case BuiltIn::SecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; @@ -456,88 +779,79 @@ const char *spirv::name_of(BuiltIn value) case BuiltIn::BaryCoordNoPerspKHR: return "BaryCoordNoPerspKHR"; case BuiltIn::FragSizeEXT: return "FragSizeEXT"; case BuiltIn::FragInvocationCountEXT: return "FragInvocationCountEXT"; - case BuiltIn::LaunchIdNV: return "LaunchIdNV"; - case BuiltIn::LaunchSizeNV: return "LaunchSizeNV"; - case BuiltIn::WorldRayOriginNV: return "WorldRayOriginNV"; - case BuiltIn::WorldRayDirectionNV: return "WorldRayDirectionNV"; - case BuiltIn::ObjectRayOriginNV: return "ObjectRayOriginNV"; - case BuiltIn::ObjectRayDirectionNV: return "ObjectRayDirectionNV"; - case BuiltIn::RayTminNV: return "RayTminNV"; - case BuiltIn::RayTmaxNV: return "RayTmaxNV"; - case BuiltIn::InstanceCustomIndexNV: return "InstanceCustomIndexNV"; - case BuiltIn::ObjectToWorldNV: return "ObjectToWorldNV"; - case BuiltIn::WorldToObjectNV: return "WorldToObjectNV"; + case BuiltIn::PrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltIn::PrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltIn::PrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltIn::CullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltIn::LaunchIdKHR: return "LaunchIdKHR"; + case BuiltIn::LaunchSizeKHR: return "LaunchSizeKHR"; + case BuiltIn::WorldRayOriginKHR: return "WorldRayOriginKHR"; + case BuiltIn::WorldRayDirectionKHR: return "WorldRayDirectionKHR"; + case BuiltIn::ObjectRayOriginKHR: return "ObjectRayOriginKHR"; + case BuiltIn::ObjectRayDirectionKHR: return "ObjectRayDirectionKHR"; + case BuiltIn::RayTminKHR: return "RayTminKHR"; + case BuiltIn::RayTmaxKHR: return "RayTmaxKHR"; + case BuiltIn::InstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; + case BuiltIn::ObjectToWorldKHR: return "ObjectToWorldKHR"; + case BuiltIn::WorldToObjectKHR: return "WorldToObjectKHR"; case BuiltIn::HitTNV: return "HitTNV"; - case BuiltIn::HitKindNV: return "HitKindNV"; + case BuiltIn::HitKindKHR: return "HitKindKHR"; case BuiltIn::CurrentRayTimeNV: return "CurrentRayTimeNV"; - case BuiltIn::IncomingRayFlagsNV: return "IncomingRayFlagsNV"; + case BuiltIn::HitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltIn::HitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltIn::HitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltIn::IncomingRayFlagsKHR: return "IncomingRayFlagsKHR"; case BuiltIn::RayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltIn::WarpsPerSMNV: return "WarpsPerSMNV"; case BuiltIn::SMCountNV: return "SMCountNV"; case BuiltIn::WarpIDNV: return "WarpIDNV"; case BuiltIn::SMIDNV: return "SMIDNV"; + case BuiltIn::HitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltIn::HitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + case BuiltIn::CullMaskKHR: return "CullMaskKHR"; } return ""; } -const char *spirv::name_of(AddressingModel value) -{ - switch (value) - { - case AddressingModel::Logical: return "Logical"; - case AddressingModel::Physical32: return "Physical32"; - case AddressingModel::Physical64: return "Physical64"; - case AddressingModel::PhysicalStorageBuffer64: return "PhysicalStorageBuffer64"; - } - return ""; -} - -const char *spirv::name_of(PackedVectorFormat value) -{ - switch (value) - { - case PackedVectorFormat::PackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; - } - return ""; -} - -const char *spirv::name_of(Dim value) +const char *spirv::name_of(Scope value) { switch (value) { - case Dim::Dim1D: return "1D"; - case Dim::Dim2D: return "2D"; - case Dim::Dim3D: return "3D"; - case Dim::Cube: return "Cube"; - case Dim::Rect: return "Rect"; - case Dim::Buffer: return "Buffer"; - case Dim::SubpassData: return "SubpassData"; + case Scope::CrossDevice: return "CrossDevice"; + case Scope::Device: return "Device"; + case Scope::Workgroup: return "Workgroup"; + case Scope::Subgroup: return "Subgroup"; + case Scope::Invocation: return "Invocation"; + case Scope::QueueFamily: return "QueueFamily"; + case Scope::ShaderCallKHR: return "ShaderCallKHR"; } - return ""; + return ""; } -const char *spirv::name_of(OverflowModes value) +const char *spirv::name_of(GroupOperation value) { switch (value) { - case OverflowModes::WRAP: return "WRAP"; - case OverflowModes::SAT: return "SAT"; - case OverflowModes::SAT_ZERO: return "SAT_ZERO"; - case OverflowModes::SAT_SYM: return "SAT_SYM"; + case GroupOperation::Reduce: return "Reduce"; + case GroupOperation::InclusiveScan: return "InclusiveScan"; + case GroupOperation::ExclusiveScan: return "ExclusiveScan"; + case GroupOperation::ClusteredReduce: return "ClusteredReduce"; + case GroupOperation::PartitionedReduceNV: return "PartitionedReduceNV"; + case GroupOperation::PartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; + case GroupOperation::PartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; } - return ""; + return ""; } -const char *spirv::name_of(FPRoundingMode value) +const char *spirv::name_of(KernelEnqueueFlags value) { switch (value) { - case FPRoundingMode::RTE: return "RTE"; - case FPRoundingMode::RTZ: return "RTZ"; - case FPRoundingMode::RTP: return "RTP"; - case FPRoundingMode::RTN: return "RTN"; + case KernelEnqueueFlags::NoWait: return "NoWait"; + case KernelEnqueueFlags::WaitKernel: return "WaitKernel"; + case KernelEnqueueFlags::WaitWorkGroup: return "WaitWorkGroup"; } - return ""; + return ""; } const char *spirv::name_of(Capability value) @@ -614,6 +928,11 @@ const char *spirv::name_of(Capability value) case Capability::ShaderLayer: return "ShaderLayer"; case Capability::ShaderViewportIndex: return "ShaderViewportIndex"; case Capability::UniformDecoration: return "UniformDecoration"; + case Capability::CoreBuiltinsARM: return "CoreBuiltinsARM"; + case Capability::TileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case Capability::TileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case Capability::TileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case Capability::CooperativeMatrixLayoutsARM: return "CooperativeMatrixLayoutsARM"; case Capability::FragmentShadingRateKHR: return "FragmentShadingRateKHR"; case Capability::SubgroupBallotKHR: return "SubgroupBallotKHR"; case Capability::DrawParameters: return "DrawParameters"; @@ -643,6 +962,10 @@ const char *spirv::name_of(Capability value) case Capability::RayQueryKHR: return "RayQueryKHR"; case Capability::RayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; case Capability::RayTracingKHR: return "RayTracingKHR"; + case Capability::TextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case Capability::TextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case Capability::TextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; + case Capability::TextureBlockMatch2QCOM: return "TextureBlockMatch2QCOM"; case Capability::Float16ImageAMD: return "Float16ImageAMD"; case Capability::ImageGatherBiasLodAMD: return "ImageGatherBiasLodAMD"; case Capability::FragmentMaskAMD: return "FragmentMaskAMD"; @@ -650,6 +973,8 @@ const char *spirv::name_of(Capability value) case Capability::ImageReadWriteLodAMD: return "ImageReadWriteLodAMD"; case Capability::Int64ImageEXT: return "Int64ImageEXT"; case Capability::ShaderClockKHR: return "ShaderClockKHR"; + case Capability::ShaderEnqueueAMDX: return "ShaderEnqueueAMDX"; + case Capability::QuadControlKHR: return "QuadControlKHR"; case Capability::SampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; case Capability::GeometryShaderPassthroughNV: return "GeometryShaderPassthroughNV"; case Capability::ShaderViewportIndexLayerEXT: return "ShaderViewportIndexLayerEXT"; @@ -659,6 +984,7 @@ const char *spirv::name_of(Capability value) case Capability::FragmentFullyCoveredEXT: return "FragmentFullyCoveredEXT"; case Capability::MeshShadingNV: return "MeshShadingNV"; case Capability::ImageFootprintNV: return "ImageFootprintNV"; + case Capability::MeshShadingEXT: return "MeshShadingEXT"; case Capability::FragmentBarycentricKHR: return "FragmentBarycentricKHR"; case Capability::ComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case Capability::FragmentDensityEXT: return "FragmentDensityEXT"; @@ -675,6 +1001,7 @@ const char *spirv::name_of(Capability value) case Capability::InputAttachmentArrayNonUniformIndexing: return "InputAttachmentArrayNonUniformIndexing"; case Capability::UniformTexelBufferArrayNonUniformIndexing: return "UniformTexelBufferArrayNonUniformIndexing"; case Capability::StorageTexelBufferArrayNonUniformIndexing: return "StorageTexelBufferArrayNonUniformIndexing"; + case Capability::RayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; case Capability::RayTracingNV: return "RayTracingNV"; case Capability::RayTracingMotionBlurNV: return "RayTracingMotionBlurNV"; case Capability::VulkanMemoryModel: return "VulkanMemoryModel"; @@ -688,7 +1015,14 @@ const char *spirv::name_of(Capability value) case Capability::ShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; case Capability::FragmentShaderPixelInterlockEXT: return "FragmentShaderPixelInterlockEXT"; case Capability::DemoteToHelperInvocation: return "DemoteToHelperInvocation"; + case Capability::DisplacementMicromapNV: return "DisplacementMicromapNV"; + case Capability::RayTracingOpacityMicromapEXT: return "RayTracingOpacityMicromapEXT"; + case Capability::ShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; case Capability::BindlessTextureNV: return "BindlessTextureNV"; + case Capability::RayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; + case Capability::AtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; + case Capability::RayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; + case Capability::RawAccessChainsNV: return "RawAccessChainsNV"; case Capability::SubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; case Capability::SubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; case Capability::SubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; @@ -721,9 +1055,13 @@ const char *spirv::name_of(Capability value) case Capability::FPGAMemoryAccessesINTEL: return "FPGAMemoryAccessesINTEL"; case Capability::FPGAClusterAttributesINTEL: return "FPGAClusterAttributesINTEL"; case Capability::LoopFuseINTEL: return "LoopFuseINTEL"; + case Capability::FPGADSPControlINTEL: return "FPGADSPControlINTEL"; + case Capability::MemoryAccessAliasingINTEL: return "MemoryAccessAliasingINTEL"; + case Capability::FPGAInvocationPipeliningAttributesINTEL: return "FPGAInvocationPipeliningAttributesINTEL"; case Capability::FPGABufferLocationINTEL: return "FPGABufferLocationINTEL"; case Capability::ArbitraryPrecisionFixedPointINTEL: return "ArbitraryPrecisionFixedPointINTEL"; case Capability::USMStorageClassesINTEL: return "USMStorageClassesINTEL"; + case Capability::RuntimeAlignedAttributeINTEL: return "RuntimeAlignedAttributeINTEL"; case Capability::IOPipesINTEL: return "IOPipesINTEL"; case Capability::BlockingPipesINTEL: return "BlockingPipesINTEL"; case Capability::FPGARegINTEL: return "FPGARegINTEL"; @@ -731,64 +1069,43 @@ const char *spirv::name_of(Capability value) case Capability::DotProductInput4x8Bit: return "DotProductInput4x8Bit"; case Capability::DotProductInput4x8BitPacked: return "DotProductInput4x8BitPacked"; case Capability::DotProduct: return "DotProduct"; + case Capability::RayCullMaskKHR: return "RayCullMaskKHR"; + case Capability::CooperativeMatrixKHR: return "CooperativeMatrixKHR"; + case Capability::ReplicatedCompositesEXT: return "ReplicatedCompositesEXT"; case Capability::BitInstructions: return "BitInstructions"; + case Capability::GroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR"; + case Capability::FloatControls2: return "FloatControls2"; case Capability::AtomicFloat32AddEXT: return "AtomicFloat32AddEXT"; case Capability::AtomicFloat64AddEXT: return "AtomicFloat64AddEXT"; - case Capability::LongConstantCompositeINTEL: return "LongConstantCompositeINTEL"; + case Capability::LongCompositesINTEL: return "LongCompositesINTEL"; case Capability::OptNoneINTEL: return "OptNoneINTEL"; case Capability::AtomicFloat16AddEXT: return "AtomicFloat16AddEXT"; case Capability::DebugInfoModuleINTEL: return "DebugInfoModuleINTEL"; + case Capability::BFloat16ConversionINTEL: return "BFloat16ConversionINTEL"; + case Capability::SplitBarrierINTEL: return "SplitBarrierINTEL"; + case Capability::FPGAClusterAttributesV2INTEL: return "FPGAClusterAttributesV2INTEL"; + case Capability::FPGAKernelAttributesv2INTEL: return "FPGAKernelAttributesv2INTEL"; + case Capability::FPMaxErrorINTEL: return "FPMaxErrorINTEL"; + case Capability::FPGALatencyControlINTEL: return "FPGALatencyControlINTEL"; + case Capability::FPGAArgumentInterfacesINTEL: return "FPGAArgumentInterfacesINTEL"; + case Capability::GlobalVariableHostAccessINTEL: return "GlobalVariableHostAccessINTEL"; + case Capability::GlobalVariableFPGADecorationsINTEL: return "GlobalVariableFPGADecorationsINTEL"; + case Capability::GroupUniformArithmeticKHR: return "GroupUniformArithmeticKHR"; + case Capability::MaskedGatherScatterINTEL: return "MaskedGatherScatterINTEL"; + case Capability::CacheControlsINTEL: return "CacheControlsINTEL"; + case Capability::RegisterLimitsINTEL: return "RegisterLimitsINTEL"; } return ""; } -const char *spirv::name_of(GroupOperation value) -{ - switch (value) - { - case GroupOperation::Reduce: return "Reduce"; - case GroupOperation::InclusiveScan: return "InclusiveScan"; - case GroupOperation::ExclusiveScan: return "ExclusiveScan"; - case GroupOperation::ClusteredReduce: return "ClusteredReduce"; - case GroupOperation::PartitionedReduceNV: return "PartitionedReduceNV"; - case GroupOperation::PartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV"; - case GroupOperation::PartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV"; - } - return ""; -} - -const char *spirv::name_of(ExecutionModel value) -{ - switch (value) - { - case ExecutionModel::Vertex: return "Vertex"; - case ExecutionModel::TessellationControl: return "TessellationControl"; - case ExecutionModel::TessellationEvaluation: return "TessellationEvaluation"; - case ExecutionModel::Geometry: return "Geometry"; - case ExecutionModel::Fragment: return "Fragment"; - case ExecutionModel::GLCompute: return "GLCompute"; - case ExecutionModel::Kernel: return "Kernel"; - case ExecutionModel::TaskNV: return "TaskNV"; - case ExecutionModel::MeshNV: return "MeshNV"; - case ExecutionModel::RayGenerationNV: return "RayGenerationNV"; - case ExecutionModel::IntersectionNV: return "IntersectionNV"; - case ExecutionModel::AnyHitNV: return "AnyHitNV"; - case ExecutionModel::ClosestHitNV: return "ClosestHitNV"; - case ExecutionModel::MissNV: return "MissNV"; - case ExecutionModel::CallableNV: return "CallableNV"; - } - return ""; -} - -const char *spirv::name_of(AccessQualifier value) +const char *spirv::name_of(RayQueryIntersection value) { switch (value) { - case AccessQualifier::ReadOnly: return "ReadOnly"; - case AccessQualifier::WriteOnly: return "WriteOnly"; - case AccessQualifier::ReadWrite: return "ReadWrite"; + case RayQueryIntersection::RayQueryCandidateIntersectionKHR: return "RayQueryCandidateIntersectionKHR"; + case RayQueryIntersection::RayQueryCommittedIntersectionKHR: return "RayQueryCommittedIntersectionKHR"; } - return ""; + return ""; } const char *spirv::name_of(RayQueryCommittedIntersectionType value) @@ -804,179 +1121,89 @@ const char *spirv::name_of(RayQueryCommittedIntersectionType value) return ""; } -const char *spirv::name_of(SourceLanguage value) +const char *spirv::name_of(RayQueryCandidateIntersectionType value) { switch (value) { - case SourceLanguage::Unknown: return "Unknown"; - case SourceLanguage::ESSL: return "ESSL"; - case SourceLanguage::GLSL: return "GLSL"; - case SourceLanguage::OpenCL_C: return "OpenCL_C"; - case SourceLanguage::OpenCL_CPP: return "OpenCL_CPP"; - case SourceLanguage::HLSL: return "HLSL"; - case SourceLanguage::CPP_for_OpenCL: return "CPP_for_OpenCL"; + case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionTriangleKHR: + return "RayQueryCandidateIntersectionTriangleKHR"; + case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; } - return ""; + return ""; } -const char *spirv::name_of(FPDenormMode value) +const char *spirv::name_of(PackedVectorFormat value) { switch (value) { - case FPDenormMode::Preserve: return "Preserve"; - case FPDenormMode::FlushToZero: return "FlushToZero"; + case PackedVectorFormat::PackedVectorFormat4x8Bit: return "PackedVectorFormat4x8Bit"; } - return ""; + return ""; } -const char *spirv::name_of(ExecutionMode value) +const char *spirv::name_of(CooperativeMatrixLayout value) { switch (value) { - case ExecutionMode::Invocations: return "Invocations"; - case ExecutionMode::SpacingEqual: return "SpacingEqual"; - case ExecutionMode::SpacingFractionalEven: return "SpacingFractionalEven"; - case ExecutionMode::SpacingFractionalOdd: return "SpacingFractionalOdd"; - case ExecutionMode::VertexOrderCw: return "VertexOrderCw"; - case ExecutionMode::VertexOrderCcw: return "VertexOrderCcw"; - case ExecutionMode::PixelCenterInteger: return "PixelCenterInteger"; - case ExecutionMode::OriginUpperLeft: return "OriginUpperLeft"; - case ExecutionMode::OriginLowerLeft: return "OriginLowerLeft"; - case ExecutionMode::EarlyFragmentTests: return "EarlyFragmentTests"; - case ExecutionMode::PointMode: return "PointMode"; - case ExecutionMode::Xfb: return "Xfb"; - case ExecutionMode::DepthReplacing: return "DepthReplacing"; - case ExecutionMode::DepthGreater: return "DepthGreater"; - case ExecutionMode::DepthLess: return "DepthLess"; - case ExecutionMode::DepthUnchanged: return "DepthUnchanged"; - case ExecutionMode::LocalSize: return "LocalSize"; - case ExecutionMode::LocalSizeHint: return "LocalSizeHint"; - case ExecutionMode::InputPoints: return "InputPoints"; - case ExecutionMode::InputLines: return "InputLines"; - case ExecutionMode::InputLinesAdjacency: return "InputLinesAdjacency"; - case ExecutionMode::Triangles: return "Triangles"; - case ExecutionMode::InputTrianglesAdjacency: return "InputTrianglesAdjacency"; - case ExecutionMode::Quads: return "Quads"; - case ExecutionMode::Isolines: return "Isolines"; - case ExecutionMode::OutputVertices: return "OutputVertices"; - case ExecutionMode::OutputPoints: return "OutputPoints"; - case ExecutionMode::OutputLineStrip: return "OutputLineStrip"; - case ExecutionMode::OutputTriangleStrip: return "OutputTriangleStrip"; - case ExecutionMode::VecTypeHint: return "VecTypeHint"; - case ExecutionMode::ContractionOff: return "ContractionOff"; - case ExecutionMode::Initializer: return "Initializer"; - case ExecutionMode::Finalizer: return "Finalizer"; - case ExecutionMode::SubgroupSize: return "SubgroupSize"; - case ExecutionMode::SubgroupsPerWorkgroup: return "SubgroupsPerWorkgroup"; - case ExecutionMode::SubgroupsPerWorkgroupId: return "SubgroupsPerWorkgroupId"; - case ExecutionMode::LocalSizeId: return "LocalSizeId"; - case ExecutionMode::LocalSizeHintId: return "LocalSizeHintId"; - case ExecutionMode::SubgroupUniformControlFlowKHR: return "SubgroupUniformControlFlowKHR"; - case ExecutionMode::PostDepthCoverage: return "PostDepthCoverage"; - case ExecutionMode::DenormPreserve: return "DenormPreserve"; - case ExecutionMode::DenormFlushToZero: return "DenormFlushToZero"; - case ExecutionMode::SignedZeroInfNanPreserve: return "SignedZeroInfNanPreserve"; - case ExecutionMode::RoundingModeRTE: return "RoundingModeRTE"; - case ExecutionMode::RoundingModeRTZ: return "RoundingModeRTZ"; - case ExecutionMode::StencilRefReplacingEXT: return "StencilRefReplacingEXT"; - case ExecutionMode::OutputLinesNV: return "OutputLinesNV"; - case ExecutionMode::OutputPrimitivesNV: return "OutputPrimitivesNV"; - case ExecutionMode::DerivativeGroupQuadsNV: return "DerivativeGroupQuadsNV"; - case ExecutionMode::DerivativeGroupLinearNV: return "DerivativeGroupLinearNV"; - case ExecutionMode::OutputTrianglesNV: return "OutputTrianglesNV"; - case ExecutionMode::PixelInterlockOrderedEXT: return "PixelInterlockOrderedEXT"; - case ExecutionMode::PixelInterlockUnorderedEXT: return "PixelInterlockUnorderedEXT"; - case ExecutionMode::SampleInterlockOrderedEXT: return "SampleInterlockOrderedEXT"; - case ExecutionMode::SampleInterlockUnorderedEXT: return "SampleInterlockUnorderedEXT"; - case ExecutionMode::ShadingRateInterlockOrderedEXT: return "ShadingRateInterlockOrderedEXT"; - case ExecutionMode::ShadingRateInterlockUnorderedEXT: return "ShadingRateInterlockUnorderedEXT"; - case ExecutionMode::SharedLocalMemorySizeINTEL: return "SharedLocalMemorySizeINTEL"; - case ExecutionMode::RoundingModeRTPINTEL: return "RoundingModeRTPINTEL"; - case ExecutionMode::RoundingModeRTNINTEL: return "RoundingModeRTNINTEL"; - case ExecutionMode::FloatingPointModeALTINTEL: return "FloatingPointModeALTINTEL"; - case ExecutionMode::FloatingPointModeIEEEINTEL: return "FloatingPointModeIEEEINTEL"; - case ExecutionMode::MaxWorkgroupSizeINTEL: return "MaxWorkgroupSizeINTEL"; - case ExecutionMode::MaxWorkDimINTEL: return "MaxWorkDimINTEL"; - case ExecutionMode::NoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; - case ExecutionMode::NumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; - case ExecutionMode::SchedulerTargetFmaxMhzINTEL: return "SchedulerTargetFmaxMhzINTEL"; + case CooperativeMatrixLayout::RowMajorKHR: return "RowMajorKHR"; + case CooperativeMatrixLayout::ColumnMajorKHR: return "ColumnMajorKHR"; + case CooperativeMatrixLayout::RowBlockedInterleavedARM: return "RowBlockedInterleavedARM"; + case CooperativeMatrixLayout::ColumnBlockedInterleavedARM: return "ColumnBlockedInterleavedARM"; } - return ""; + return ""; } -const char *spirv::name_of(FPOperationMode value) +const char *spirv::name_of(CooperativeMatrixUse value) { switch (value) { - case FPOperationMode::IEEE: return "IEEE"; - case FPOperationMode::ALT: return "ALT"; + case CooperativeMatrixUse::MatrixAKHR: return "MatrixAKHR"; + case CooperativeMatrixUse::MatrixBKHR: return "MatrixBKHR"; + case CooperativeMatrixUse::MatrixAccumulatorKHR: return "MatrixAccumulatorKHR"; } - return ""; + return ""; } -const char *spirv::name_of(RayQueryCandidateIntersectionType value) +const char *spirv::name_of(InitializationModeQualifier value) { switch (value) { - case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionTriangleKHR: - return "RayQueryCandidateIntersectionTriangleKHR"; - case RayQueryCandidateIntersectionType::RayQueryCandidateIntersectionAABBKHR: return "RayQueryCandidateIntersectionAABBKHR"; + case InitializationModeQualifier::InitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; + case InitializationModeQualifier::InitOnDeviceResetINTEL: return "InitOnDeviceResetINTEL"; } - return ""; + return ""; } -const char *spirv::name_of(MemoryModel value) +const char *spirv::name_of(LoadCacheControl value) { switch (value) { - case MemoryModel::Simple: return "Simple"; - case MemoryModel::GLSL450: return "GLSL450"; - case MemoryModel::OpenCL: return "OpenCL"; - case MemoryModel::Vulkan: return "Vulkan"; + case LoadCacheControl::UncachedINTEL: return "UncachedINTEL"; + case LoadCacheControl::CachedINTEL: return "CachedINTEL"; + case LoadCacheControl::StreamingINTEL: return "StreamingINTEL"; + case LoadCacheControl::InvalidateAfterReadINTEL: return "InvalidateAfterReadINTEL"; + case LoadCacheControl::ConstCachedINTEL: return "ConstCachedINTEL"; } - return ""; + return ""; } -const char *spirv::name_of(SamplerAddressingMode value) +const char *spirv::name_of(StoreCacheControl value) { switch (value) { - case SamplerAddressingMode::None: return "None"; - case SamplerAddressingMode::ClampToEdge: return "ClampToEdge"; - case SamplerAddressingMode::Clamp: return "Clamp"; - case SamplerAddressingMode::Repeat: return "Repeat"; - case SamplerAddressingMode::RepeatMirrored: return "RepeatMirrored"; + case StoreCacheControl::UncachedINTEL: return "UncachedINTEL"; + case StoreCacheControl::WriteThroughINTEL: return "WriteThroughINTEL"; + case StoreCacheControl::WriteBackINTEL: return "WriteBackINTEL"; + case StoreCacheControl::StreamingINTEL: return "StreamingINTEL"; } - return ""; + return ""; } -const char *spirv::name_of(StorageClass value) +const char *spirv::name_of(NamedMaximumNumberOfRegisters value) { switch (value) { - case StorageClass::UniformConstant: return "UniformConstant"; - case StorageClass::Input: return "Input"; - case StorageClass::Uniform: return "Uniform"; - case StorageClass::Output: return "Output"; - case StorageClass::Workgroup: return "Workgroup"; - case StorageClass::CrossWorkgroup: return "CrossWorkgroup"; - case StorageClass::Private: return "Private"; - case StorageClass::Function: return "Function"; - case StorageClass::Generic: return "Generic"; - case StorageClass::PushConstant: return "PushConstant"; - case StorageClass::AtomicCounter: return "AtomicCounter"; - case StorageClass::Image: return "Image"; - case StorageClass::StorageBuffer: return "StorageBuffer"; - case StorageClass::CallableDataNV: return "CallableDataNV"; - case StorageClass::IncomingCallableDataNV: return "IncomingCallableDataNV"; - case StorageClass::RayPayloadNV: return "RayPayloadNV"; - case StorageClass::HitAttributeNV: return "HitAttributeNV"; - case StorageClass::IncomingRayPayloadNV: return "IncomingRayPayloadNV"; - case StorageClass::ShaderRecordBufferNV: return "ShaderRecordBufferNV"; - case StorageClass::PhysicalStorageBuffer: return "PhysicalStorageBuffer"; - case StorageClass::CodeSectionINTEL: return "CodeSectionINTEL"; - case StorageClass::DeviceOnlyINTEL: return "DeviceOnlyINTEL"; - case StorageClass::HostOnlyINTEL: return "HostOnlyINTEL"; + case NamedMaximumNumberOfRegisters::AutoINTEL: return "AutoINTEL"; } - return ""; + return ""; } diff --git a/prog/gameLibs/spirv/update_defs.sh b/prog/gameLibs/spirv/update_defs.sh new file mode 100644 index 000000000..821b7f110 --- /dev/null +++ b/prog/gameLibs/spirv/update_defs.sh @@ -0,0 +1,13 @@ +python3 auto_extract_properties.py +python3 gen_traits.py +python3 gen_writer.py +python3 gen_decoder.py +python3 gen_nodes.py +python3 gen_reader.py + +clang-format -i -style=file ../publicInclude/spirv/traits_table.h +clang-format -i -style=file module_decoder.h +clang-format -i -style=file module_nodes.h +clang-format -i -style=file traits_table.cpp +clang-format -i -style=file module_writer.cpp +clang-format -i -style=file module_reader.cpp \ No newline at end of file diff --git a/prog/gameLibs/vr/vrHands.cpp b/prog/gameLibs/vr/vrHands.cpp index 46e96c849..0cb00bcb4 100644 --- a/prog/gameLibs/vr/vrHands.cpp +++ b/prog/gameLibs/vr/vrHands.cpp @@ -4,6 +4,7 @@ #include +#include #include #include #include @@ -58,9 +59,14 @@ void VrHands::updateAnimPhys(VrInput::Hands side, AnimV20::AnimcharBaseComponent const float POINTING_POSE_GRIP_THRESHOLD = 0.85f; const bool shouldPoint = !float_nonzero(state.indexFinger) && float_nonzero(state.thumb) && state.squeeze > POINTING_POSE_GRIP_THRESHOLD; - setAnimPhysVarVal(side, indexFingerAnimVarId[side], shouldPoint ? 1.f : state.indexFinger * 0.5f); - setAnimPhysVarVal(side, thumbAnimVarId[side], shouldPoint ? 1.f : state.thumb * 0.5f); - setAnimPhysVarVal(side, fingersAnimVarId[side], state.squeeze); + + const float indexVal = state.panel.isHoldingPanel ? 1.f : (shouldPoint ? 1.f : state.indexFinger * 0.5f); + const float thumbVal = state.panel.isHoldingPanel ? 0.41f : (shouldPoint ? 1.f : state.thumb * 0.5f); + const float squeezeVal = state.panel.isHoldingPanel ? 0.f : state.squeeze; + + setAnimPhysVarVal(side, indexFingerAnimVarId[side], indexVal); + setAnimPhysVarVal(side, thumbAnimVarId[side], thumbVal); + setAnimPhysVarVal(side, fingersAnimVarId[side], squeezeVal); animPhys[side]->update(animchar_component, *physVars[side]); } @@ -356,6 +362,87 @@ static Ellipse get_cylindrical_section(const Point3 &childPos, const Point3 &nor } +static void place_fingers_on_flat_plane(GeomNodeTree &tree, const VrHands::GeomNodeTreeJointIndices &joint_indices, + const Point3 &plane_pos, const Point3 &plane_normal, const float fingertip_length) +{ + using Joints = VrHands::Joints; + + constexpr int JOINTS_PER_FINGER = 3; + Joints fingers[4][JOINTS_PER_FINGER] = { + {Joints::VRIN_HAND_JOINT_INDEX_PROXIMAL, Joints::VRIN_HAND_JOINT_INDEX_INTERMEDIATE, Joints::VRIN_HAND_JOINT_INDEX_DISTAL}, + {Joints::VRIN_HAND_JOINT_MIDDLE_PROXIMAL, Joints::VRIN_HAND_JOINT_MIDDLE_INTERMEDIATE, Joints::VRIN_HAND_JOINT_MIDDLE_DISTAL}, + {Joints::VRIN_HAND_JOINT_RING_PROXIMAL, Joints::VRIN_HAND_JOINT_RING_INTERMEDIATE, Joints::VRIN_HAND_JOINT_RING_DISTAL}, + {Joints::VRIN_HAND_JOINT_LITTLE_PROXIMAL, Joints::VRIN_HAND_JOINT_LITTLE_INTERMEDIATE, Joints::VRIN_HAND_JOINT_LITTLE_DISTAL}}; + + for (const auto &joints : fingers) + { + float fingerLength = 0.f; + float boneLength[JOINTS_PER_FINGER]; + for (int jointIndex = 0; jointIndex < JOINTS_PER_FINGER; ++jointIndex) + { + if ((jointIndex + 1) < JOINTS_PER_FINGER) + { + // Be aware of parent scale + TMatrix parentWtm, childWtm; + tree.getNodeWtmScalar(joint_indices[joints[jointIndex]], parentWtm); + tree.getNodeWtmScalar(joint_indices[joints[jointIndex + 1]], childWtm); + boneLength[jointIndex] = length(parentWtm.getcol(3) - childWtm.getcol(3)); + } + else + boneLength[jointIndex] = fingertip_length; + fingerLength += boneLength[jointIndex]; + } + + TMatrix parentWtm; + GeomNodeTree::Index16 parentIndex = tree.getParentNodeIdx(joint_indices[joints[0]]); + tree.getNodeWtmRelScalar(parentIndex, parentWtm); + + for (int jointIndex = 0; jointIndex < JOINTS_PER_FINGER; ++jointIndex) + { + const GeomNodeTree::Index16 childIndex = joint_indices[joints[jointIndex]]; + + G_ASSERT_RETURN(parentIndex == tree.getParentNodeIdx(childIndex), ); + + mat44f &childTm = tree.getNodeTm(childIndex); + TMatrix childWtm; + v_mat_43cu_from_mat44(childWtm.array, childTm); + childWtm = parentWtm * childWtm; + const Point3 &childPos = childWtm.getcol(3); + const Point3 &oldBoneDir = -childWtm.getcol(2); + const Point3 rotationAxis = -normalize(childWtm.getcol(0)); + + constexpr float FINGER_RADIUS = 0.01f; + const Point3 attachmentPosWithOffset = plane_pos + sign((childPos - plane_pos) * plane_normal) * plane_normal * FINGER_RADIUS; + const Point3 intersectionAxis = normalize(cross(plane_normal, rotationAxis)); + + const Point3 childToIntersectionDir = normalize(cross(intersectionAxis, rotationAxis)); + + const float t = safediv(((attachmentPosWithOffset - childPos) * plane_normal), (childToIntersectionDir * plane_normal)); + const Point3 intersectionPoint = childPos + childToIntersectionDir * t; + const float childToIntersectionDist = length(childPos - intersectionPoint); + + const Point3 flatOldBoneDir = normalize(oldBoneDir - (oldBoneDir * rotationAxis) * rotationAxis); + const float fingerDirSign = sign(flatOldBoneDir * cross(rotationAxis, childToIntersectionDir)); + const float currentAngle = safe_acos(flatOldBoneDir * childToIntersectionDir) * fingerDirSign; + const float wishAngle = safe_acos(safediv(childToIntersectionDist, fingerLength)); + + const Quat rotQuat(rotationAxis, (wishAngle - currentAngle)); + const TMatrix rotTm = quat_to_matrix(rotQuat); + + const TMatrix parentWitm = inverse(parentWtm); + + TMatrix tm = parentWitm * rotTm * childWtm; + tm.setcol(3, as_point3(&childTm.col3)); + v_mat44_make_from_43cu_unsafe(childTm, tm.array); + parentWtm = parentWtm * tm; + parentIndex = childIndex; + + fingerLength -= boneLength[jointIndex]; + } + } +} + + static void place_fingers_on_attachment(GeomNodeTree &tree, VrInput::Hands hand, const VrHands::GeomNodeTreeJointIndices &joint_indices, const Point3 &attachment_pos, const Point3 &attachment_dir, const float attachment_radius, const float fingertip_length, const bool is_forced) @@ -506,6 +593,32 @@ static void place_fingers_on_attachment(GeomNodeTree &tree, VrInput::Hands hand, } +void VrHands::updatePanelAnim(VrInput::Hands side) +{ + auto &tree = animChar[side]->getNodeTree(); + auto &state = handsState[side]; + if (state.panel.isHoldingPanel && !state.attachment.isAttached) + { + auto &panelAngles = state.panel.angles; + auto &panelPosition = state.panel.position; + + Quat rotation; + euler_to_quat(panelAngles.y, panelAngles.x, panelAngles.z, rotation); + TMatrix matRotation = quat_to_matrix(rotation); + TMatrix matTranslation = TMatrix::IDENT; + matTranslation.setcol(3, panelPosition); + TMatrix handTm; + tree.getNodeWtmRelScalar(GeomNodeTree::Index16(0), handTm); + handTm.orthonormalize(); + const TMatrix panelTm = handTm * matTranslation * matRotation; + + place_fingers_on_flat_plane(tree, jointIndices[side], panelTm.getcol(3), panelTm.getcol(2), fingertipLength); + tree.invalidateWtm(); + tree.calcWtm(); + } +} + + void VrHands::updateAttachment(VrInput::Hands side, const TMatrix &ref_rot_tm, const bool is_fold_forced) { OneHandState::Attachment attachment = handsState[side].attachment; @@ -664,6 +777,7 @@ void VrHands::update(float dt, const TMatrix &local_ref_space_tm, HandsState &&h ac.act(dt, true); } updateFingerStates(side); + updatePanelAnim(side); updateAttachment(side, refRotTm, !areJointsTracked); TMatrix &fingertipRealTm = realIndexFingertipTms[side]; diff --git a/prog/gameLibs/vromfsPacker/vromfsPacker.cpp b/prog/gameLibs/vromfsPacker/vromfsPacker.cpp index 4efa7a3d8..e045cb94a 100644 --- a/prog/gameLibs/vromfsPacker/vromfsPacker.cpp +++ b/prog/gameLibs/vromfsPacker/vromfsPacker.cpp @@ -383,6 +383,44 @@ namespace dblk extern bool add_name_to_name_map(DBNameMap &nm, const char *s); } +class MultiOutputSave : public IGenSave +{ +public: + MultiOutputSave(IGenSave &out) { addOut(out); } + + void addOut(IGenSave &out) { outs.push_back(&out); } + + void write(const void *data, int sz) override + { + for (IGenSave *out : outs) + out->write(data, sz); + } + + int tell() override + { + G_ASSERTF(0, "Not supported"); + return 0; + } + const char *getTargetName() override + { + G_ASSERTF(0, "Not supported"); + return ""; + } + void flush() override { G_ASSERTF(0, "Not supported"); } + void seekto(int) override { G_ASSERTF(0, "Not supported"); } + void seektoend(int) override { G_ASSERTF(0, "Not supported"); } + void beginBlock() override { G_ASSERTF(0, "Not supported"); } + void endBlock(unsigned) override { G_ASSERTF(0, "Not supported"); } + int getBlockLevel() override + { + G_ASSERTF(0, "Not supported"); + return 0; + } + +private: + Tab outs; +}; + bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &files, Tab &dst_files, OAHashNameMap &parse_ext, bool zpack, const DataBlock &inp, bool content_sha1, const char *alt_outdir) { @@ -476,6 +514,8 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file exit(13); } bool sign_contents = READ_PROP(Bool, "signedContents", true); + bool sign_packed = READ_PROP(Bool, "signPacked", true); + bool sign_plain_data = !force_legacy_format && shared_nm && sign_contents && !sign_packed; mkbindump::BinDumpSaveCB cwr(8 << 20, targetCode, write_be); mkbindump::PatchTabRef pt_names, pt_data; @@ -505,6 +545,7 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file pt_names.reserveData(cwr, files.nameCount(), cwr.PTR_SZ); cwr.align16(); + int names_data_ofs = cwr.tell(); name_ofs.resize(files.nameCount()); int i = 0; iterate_names_in_order(sorted_fnlist, sorted_fnlist_ids, [&](int, const char *name) { @@ -514,6 +555,7 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file printf("DST: %s\n", name); i++; }); + int names_data_size = cwr.tell() - names_data_ofs; cwr.align16(); pt_data.reserveData(cwr, files.nameCount(), cwr.TAB_SZ); @@ -566,6 +608,19 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file Tab preloaded_blk; preloaded_blk.resize(files.nameCount()); mem_set_0(preloaded_blk); + + Tab file_attributes; + bool enable_file_attributes = sign_plain_data; + int file_attributes_pos = -1; + if (enable_file_attributes) + { + file_attributes.resize(files.nameCount()); + mem_set_0(file_attributes); + file_attributes_pos = cwr.tell(); + cwr.getRawWriter().writeIntP<1>(1); // attributes version + cwr.writeRaw(file_attributes.data(), data_size(file_attributes)); + } + if (shared_nm) { // first pass to gather actual shared namemap @@ -653,6 +708,10 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file cwr.align16(); data_ofs.resize(files.nameCount()); + MemorySaveCB plain_cwr(1 << 20); + plain_cwr.setMcdMinMax(1 << 20, 8 << 20); + MemorySaveCB tmp_cwr(128 << 10); + int mi = 0; for (int id : sorted_fnlist_ids) { @@ -681,11 +740,34 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file if (content_sha1) file_data_cwr = create_hash_computer_cb(HASH_SAVECB_SHA1, file_data_cwr); + MultiOutputSave mos_cwr(*file_data_cwr); + if (sign_plain_data) + mos_cwr.addOut(plain_cwr); + if (preloaded_blk[id]) { G_ASSERT(shared_nm); + + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_BLK; + if (!export_data_for_dict_dir) - preloaded_blk[id]->saveBinDumpWithSharedNamemap(*file_data_cwr, shared_nm, true, zstd_cdict); + { + if (sign_plain_data) + { + tmp_cwr.seekto(0); + preloaded_blk[id]->saveDumpToBinStream(tmp_cwr, shared_nm); + int sz = tmp_cwr.tell(); + MemoryLoadCB mcrd(tmp_cwr.getMem(), false); + dblk::pack_shared_nm_dump_to_stream(*file_data_cwr, mcrd, sz, zstd_cdict); + mcrd.seekto(0); + copy_stream_to_stream(mcrd, plain_cwr, sz); + } + else + { + preloaded_blk[id]->saveBinDumpWithSharedNamemap(*file_data_cwr, shared_nm, true, zstd_cdict); + } + } else { cwr_data_for_dict.beginBlock(); @@ -703,6 +785,9 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file MemorySaveCB mcwr(1 << 20); uint64_t names_hash; + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_SHARED_NM; + dblk::write_names(mcwr, *shared_nm, &names_hash); // write names hash file_data_cwr->write(&names_hash, sizeof(names_hash)); @@ -711,19 +796,34 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file // write shared name map MemoryLoadCB mcrd(mcwr.takeMem(), true); zstd_stream_compress_data(*file_data_cwr, mcrd, mcrd.getTargetDataSize(), ZSTD_BLK_CLEVEL); + + if (sign_plain_data) + { + plain_cwr.write(&names_hash, sizeof(names_hash)); + plain_cwr.write(zstd_dict_blake3_digest, sizeof(zstd_dict_blake3_digest)); + mcrd.seekto(0); + copy_stream_to_stream(mcrd, plain_cwr, mcrd.getTargetDataSize()); + } goto done_write; } if (write_version && force_legacy_format && strcmp(orig_fn, version_legacy_fn) == 0) { + G_ASSERT(!sign_plain_data); + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_PLAIN; String ver(0, "%d.%d.%d.%d", (write_version >> 24) & 0xFF, (write_version >> 16) & 0xFF, (write_version >> 8) & 0xFF, write_version & 0xFF); file_data_cwr->write(ver.data(), ver.length()); } else if (convert_blk) { + G_ASSERT(!sign_plain_data); DataBlock blk; + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_BLK; + { DynamicMemGeneralSaveCB memCwr(tmpmem); if (preprocess) @@ -760,9 +860,17 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file file_data_cwr->write(memCwrBin.data(), memCwrBin.size()); } else if (preprocess) - process_and_copy_file_to_stream(orig_fn, *file_data_cwr, targetString, keep_lines); + { + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_PLAIN; + process_and_copy_file_to_stream(orig_fn, mos_cwr, targetString, keep_lines); + } else - copy_file_to_stream(orig_fn, *file_data_cwr); + { + if (enable_file_attributes) + file_attributes[id] |= EVFSFA_TYPE_PLAIN; + copy_file_to_stream(orig_fn, mos_cwr); + } done_write: if (file_data_cwr != &cwr.getRawWriter()) { @@ -852,6 +960,12 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file cwr.writeRaw(file_sha1.data(), data_size(file_sha1)); } + if (enable_file_attributes) + { + cwr.seekto(file_attributes_pos + 1); + cwr.writeRaw(file_attributes.data(), data_size(file_attributes)); + } + pt_names.finishTab(cwr); pt_data.finishTab(cwr); if (!zpack || content_sha1) @@ -869,12 +983,23 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file fcwr.writeInt(targetCode); int sz = cwr.getSize(); fcwr.writeInt(mkbindump::le2be32_cond(sz, write_be)); - fcwr.writeInt(0); + fcwr.writeInt(0); // placeholder for packed size if (!force_legacy_format) // new format with extended header and version { - fcwr.writeIntP<2>(mkbindump::le2be16_cond(8, write_be)); // size of of extended header - fcwr.writeIntP<2>(mkbindump::le2be16_cond(0, write_be)); // flags - fcwr.writeInt(mkbindump::le2be32_cond(write_version, write_be)); // version + uint16_t flags = 0; + uint16_t ext_hdr_size = 8; + if (sign_plain_data) + flags |= EVFSEF_SIGN_PLAIN_DATA; + if (enable_file_attributes) + { + ext_hdr_size += 4; + flags |= EVFSEF_HAVE_FILE_ATTRIBUTES; + } + fcwr.writeIntP<2>(mkbindump::le2be16_cond(ext_hdr_size, write_be)); // size of of extended header + fcwr.writeIntP<2>(mkbindump::le2be16_cond(flags, write_be)); // flags + fcwr.writeInt(mkbindump::le2be32_cond(write_version, write_be)); // version + if (enable_file_attributes) + fcwr.writeInt(mkbindump::le2be32_cond(file_attributes_pos, write_be)); } int packed_sz = fcwr.tell(); @@ -921,7 +1046,36 @@ bool buildVromfsDump(const char *fname, unsigned targetCode, FastNameMapEx &file fcwr.close(); fflush(stdout); - return write_digital_signature(fcwr, fname, sign_contents ? cwr.getMem() : NULL, inp); + + MemoryChainedData *data_to_sign = nullptr; + if (sign_contents) + { + if (sign_plain_data) + { + // things that must be signed: + // - file data (already in plain_cwr) + // - file name pointer table + // - file name data + // - file attributes + int name_ptrs_size = files.nameCount() * cwr.PTR_SZ; + int file_attributes_size = enable_file_attributes ? 0 : (1 + data_size(file_attributes)); + MemorySaveCB &raw_cwr = cwr.getRawWriter(); + MemoryLoadCB raw_crd(raw_cwr.getMem(), false); + raw_crd.seekto(pt_names.resvDataPos); + copy_stream_to_stream(raw_crd, plain_cwr, name_ptrs_size); + raw_crd.seekto(names_data_ofs); + copy_stream_to_stream(raw_crd, plain_cwr, names_data_size); + if (file_attributes_size) + { + raw_crd.seekto(file_attributes_pos); + copy_stream_to_stream(raw_crd, plain_cwr, file_attributes_size); + } + data_to_sign = plain_cwr.getMem(); + } + else + data_to_sign = cwr.getMem(); + } + return write_digital_signature(fcwr, fname, data_to_sign, inp); } bool unpackVromfs(const char *fname, const char *dest_folder, bool txt_blk, int content_hash_fn_base, int content_hash_fn_prefix_cnt, @@ -1377,12 +1531,14 @@ static void print_usage() " -rootfiles<+|-> scan/don't scan root files, def: -rootfiles+\n" " -packBlk<+|-> pack/don't BLKs to binary format, def: -packBlk-\n" " -pack<+|-> pack/don't pack vrom contents, def: -pack+\n" + " -signPacked<+|-> sign zstd/plain content if packing, def: -signPacked+\n" " -sign: sign content with private key and SHA256 digest\n" " -verbose use verbose mode (default is -quiet for -B)\n" "\nbuild.blk format:\n" " platform:t=\"PC\" // \"PC\"=default, \"iOS\", \"and\" [multi]\n" " //rootFolder:t=\".\" // [optional] root path\n" " //pack:b=true // [optional] use ZSTD pack or not, def=true\n" + " //signPacked:b=true // [optional] sign ZSTD-packed content instead of plain, def=true\n" " //storeContentSHA1:b=false // [optional] store content-SHA1 for each file, def=false\n" " //packBlockSizeKB:i=1024 // [optional] use specific block size while packing data, def=1024 (KB)\n" " //blkUseSharedNamemap:b= // [optional] use shared namemap for all BLKs in vrom (BLK will be saved compressed), def=false\n" @@ -1671,6 +1827,8 @@ int buildVromfs(DataBlock *explicit_build_rules, dag::ConstSpan ar } else if (strnicmp("-pack", argv[i], 5) == 0) inp.setBool("pack", argv[i][5] == '+' || argv[i][5] == '\0'); + else if (strnicmp("-signPacked", argv[i], 11) == 0) + inp.setBool("signPacked", argv[i][11] == '+' || argv[i][11] == '\0'); else if (strnicmp("-sign:", argv[i], 6) == 0) { inp.setStr("sign_private_key", argv[i] + 6); @@ -1812,9 +1970,9 @@ int buildVromfs(DataBlock *explicit_build_rules, dag::ConstSpan ar ; // skip else if (simple_build_mode && (strnicmp("-dest_path:", argv[i], 11) == 0 || strnicmp("-out:", argv[i], 5) == 0 || strnicmp("-packBlk", argv[i], 8) == 0 || strnicmp("-pack", argv[i], 5) == 0 || - strnicmp("-sign:", argv[i], 6) == 0 || strnicmp("-exclude:", argv[i], 9) == 0 || - strnicmp("-subdirs", argv[i], 8) == 0 || strnicmp("-rootfiles", argv[i], 10) == 0 || - strnicmp("-include:", argv[i], 9) == 0) || + strnicmp("-signPacked", argv[i], 11) == 0 || strnicmp("-sign:", argv[i], 6) == 0 || + strnicmp("-exclude:", argv[i], 9) == 0 || strnicmp("-subdirs", argv[i], 8) == 0 || + strnicmp("-rootfiles", argv[i], 10) == 0 || strnicmp("-include:", argv[i], 9) == 0) || stricmp("-verbose", argv[i]) == 0) ; // skip else diff --git a/prog/scripts/sq/std/log.nut b/prog/scripts/sq/std/log.nut index 2a1aff940..4b9db0673 100644 --- a/prog/scripts/sq/std/log.nut +++ b/prog/scripts/sq/std/log.nut @@ -31,6 +31,7 @@ function Log(tostringfunc=null) { function dlog(...) { vlog.acall([this].extend(vargv)) log.acall([this].extend(vargv)) + dagorDebug.console_print(" ".join(vargv.map(@(v) tostring_r(v, {maxdeeplevel=DEF_MAX_DEEPLEVEL, showArrIdx=false, tostringfunc=tostringfunc})))) } function dlogsplit(...) { diff --git a/prog/scripts/sq/std/platform.nut b/prog/scripts/sq/std/platform.nut index 5a28bd634..94c1b49f3 100644 --- a/prog/scripts/sq/std/platform.nut +++ b/prog/scripts/sq/std/platform.nut @@ -65,6 +65,7 @@ return { is_windows = oneOf("win32", "win64") is_win32 = oneOf("win32") is_win64 = oneOf("win64") + is_linux = oneOf("linux64") is_ps4 = oneOf("ps4") is_ps5 = oneOf("ps5") is_sony diff --git a/prog/scripts/sq/std/string.nut b/prog/scripts/sq/std/string.nut index fa628b1c4..5a6442eef 100644 --- a/prog/scripts/sq/std/string.nut +++ b/prog/scripts/sq/std/string.nut @@ -340,7 +340,7 @@ function tostring_r(inp, params=defTostringParams) { let info = input.len.getfuncinfos() if (!info.native && info.parameters.len()==1) maxind = input.len()-1 - else if (info.native && info.typecheck.len()==1 && info.typecheck[0]==32) //this is instance + else if (info.native && info.typecheck.len()==1 && (info.typecheck[0]==32|| info.typecheck[0]==64)) //this is instance maxind = input.len()-1 } } diff --git a/prog/scripts/sq/std/version_compare.nut b/prog/scripts/sq/std/version_compare.nut index 2eac49c1d..d0b088997 100644 --- a/prog/scripts/sq/std/version_compare.nut +++ b/prog/scripts/sq/std/version_compare.nut @@ -47,7 +47,7 @@ function stripVerCondition(str) { return "" } -function check_version(vermask, game_version) { +function check_version_impl(vermask, game_version) { if (type(vermask) != "string" || type(game_version) != "string") { logerr($"Try to call check_version with not string parameters. (vermask = {vermask}, game_version = {game_version})") return false @@ -60,35 +60,52 @@ function check_version(vermask, game_version) { return checkVersion(maskVer, checkVer, cmpFn) } +function check_version(version1, version2) { + if (version1 != "" + && ("><=!".indexof(version1.slice(0, 1)) != null + || version1.indexof("X") != null + || version1.indexof("x") != null)) + return check_version_impl(version1, version2) + return check_version_impl(version2, version1) +} + function test() { - assert(check_version("1.2.3.4", "1.2.3.4")) - assert(check_version("1.2.x.4", "1.2.3.4")) - assert(check_version("1.2.3.X", "1.2.3.5")) - assert(!check_version("1.2.3.4", "1.2.2.4")) - assert(!check_version("1.2.3.X", "1.3.3.4")) - - assert(check_version(">=1.2.3.4", "1.2.3.4")) - assert(check_version(">=1.2.3.4", "1.2.4.4")) - assert(check_version(">=1.2.3.X", "1.2.3.3")) - assert(!check_version(">=1.2.3.4", "1.2.3.3")) - assert(!check_version(">=1.2.3.X", "1.2.2.4")) - - assert(check_version(">1.2.3.4", "1.2.3.5")) - assert(check_version(">1.2.3.4", "1.2.4.4")) - assert(check_version(">1.2.3.4", "1.3.3.4")) - assert(check_version(">1.2.3.4", "2.2.3.4")) - assert(!check_version(">1.2.3.4", "1.2.3.2")) - assert(!check_version(">1.2.*.4", "1.2.3.4")) - - assert(check_version("=1.2.3.4", "1.2.3.4")) - assert(check_version("=1.x.3.4", "1.2.3.4")) - assert(!check_version("=1.3.3.4", "1.2.3.4")) - assert(!check_version("=1.3.*.4", "1.2.3.5")) - - assert(check_version("!1.2.3.4", "2.2.3.4")) - assert(check_version("!x.2.3.4", "1.2.3.5")) - assert(!check_version("!1.2.3.4", "1.2.3.4")) - assert(!check_version("!X.2.3.4", "1.2.3.4")) + let testCfg = [ + ["1.2.3.4", "1.2.3.4"], + ["1.2.x.4", "1.2.3.4"], + ["1.2.3.X", "1.2.3.5"], + ["1.2.3.4", "1.2.2.4", false], + ["1.2.3.X", "1.3.3.4", false], + + ["1.2.3.4", ">=1.2.3.4"], + ["1.2.4.4", ">=1.2.3.4"], + ["1.2.3.3", ">=1.2.3.X"], + ["1.2.3.3", ">=1.2.3.4", false], + ["1.2.2.4", ">=1.2.3.X", false], + + ["1.2.3.5", ">1.2.3.4"], + ["1.2.4.4", ">1.2.3.4"], + ["1.3.3.4", ">1.2.3.4"], + ["2.2.3.4", ">1.2.3.4"], + ["1.2.3.2", ">1.2.3.4", false], + ["1.2.3.4", ">1.2.*.4", false], + + ["1.2.3.4", "=1.2.3.4"], + ["1.2.3.4", "=1.x.3.4"], + ["1.2.3.4", "=1.3.3.4", false], + ["1.2.3.5", "=1.3.*.4", false], + + ["2.2.3.4", "!1.2.3.4"], + ["1.2.3.5", "!x.2.3.4"], + ["1.2.3.4", "!1.2.3.4", false], + ["1.2.3.4", "!X.2.3.4", false], + ] + + foreach(cfg in testCfg) { + let res = cfg?[2] ?? true + assert(check_version(cfg[0], cfg[1]) == res) + assert(check_version(cfg[1], cfg[0]) == res) + } } return { diff --git a/prog/tools/ShaderCompiler2/gatherVar.cpp b/prog/tools/ShaderCompiler2/gatherVar.cpp index 405694b40..03a80dcb2 100644 --- a/prog/tools/ShaderCompiler2/gatherVar.cpp +++ b/prog/tools/ShaderCompiler2/gatherVar.cpp @@ -64,6 +64,15 @@ GatherVarShaderEvalCB::GatherVarShaderEvalCB(ShaderSyntaxParser &_parser, const if (shc::getAssumedValue("debug_mode_enabled", shname_token->text, true, value)) shaderDebugModeEnabled = (value > 0.0f); } + else + { + static DataBlock static_empty_blk; + DataBlock *blk = shc::getAssumedVarsBlock(); + if (!blk) + shc::setAssumedVarsBlock(blk = &static_empty_blk); + blk->addBlock(shname_token->text)->setReal("debug_mode_enabled", 1.0f); + } + out_shaderDebugModeEnabled = shaderDebugModeEnabled; if (!shaderDebugModeEnabled) { diff --git a/prog/tools/ShaderCompiler2/main.cpp b/prog/tools/ShaderCompiler2/main.cpp index 65fed00ed..f85f93350 100644 --- a/prog/tools/ShaderCompiler2/main.cpp +++ b/prog/tools/ShaderCompiler2/main.cpp @@ -850,6 +850,17 @@ static bool fatal_handler(const char *msg, const char *call_stack, const char *f } #endif +struct StdoutBlkErrReporter : public DataBlock::IErrorReporterPipe +{ + void reportError(const char *err, bool fat) override { fputs(String(0, "[%c] %s\n", fat ? 'F' : 'E', err).str(), stdout); } +}; +static bool load_blk_with_report(DataBlock &blk, const char *fn) +{ + StdoutBlkErrReporter rep; + DataBlock::InstallReporterRAII irep(&rep); + return dblk::load(blk, fn); +} + #if _TARGET_PC_WIN static BOOL WINAPI ctrl_break_handler(_In_ DWORD dwCtrlType) { @@ -1356,12 +1367,11 @@ int DagorWinMain(bool debugmode) AtomicPrintfMutex::init(dd_get_fname(__argv[0]), filename); // read data block with files - DataBlock blk; const String cfgDir(getDir(filename)); - if (!blk.load(filename)) + DataBlock blk; + if (!load_blk_with_report(blk, filename)) { - printf("\n[FATAL ERROR] Cannot open BLK file '%s' (file not found or syntax error, see log for details)\n", filename); - showUsage(); + printf("\n[FATAL ERROR] Cannot open BLK file '%s' (file not found or syntax error, or unresolved includes)\n", filename); return 13; } if (const DataBlock *b = blk.getBlockByName("renderStages")) diff --git a/prog/tools/ShaderCompiler2/sha1_cache_version.h b/prog/tools/ShaderCompiler2/sha1_cache_version.h index 1606a646b..b6cf84ee2 100644 --- a/prog/tools/ShaderCompiler2/sha1_cache_version.h +++ b/prog/tools/ShaderCompiler2/sha1_cache_version.h @@ -9,7 +9,7 @@ #elif _CROSS_TARGET_METAL static const uint32_t sha1_cache_version = 27; #elif _CROSS_TARGET_SPIRV -static const uint32_t sha1_cache_version = 30; +static const uint32_t sha1_cache_version = 31; #elif _CROSS_TARGET_EMPTY static const uint32_t sha1_cache_version = 4; #elif _CROSS_TARGET_DX12 diff --git a/prog/tools/ShaderCompiler2/ver_obj_spirv.cpp b/prog/tools/ShaderCompiler2/ver_obj_spirv.cpp index 9307595a8..bc93762d0 100644 --- a/prog/tools/ShaderCompiler2/ver_obj_spirv.cpp +++ b/prog/tools/ShaderCompiler2/ver_obj_spirv.cpp @@ -4,7 +4,7 @@ #include "util/dag_baseDef.h" -extern const int VER_OBJ_SPIRV_VAL = _MAKE4C('12.9'); +extern const int VER_OBJ_SPIRV_VAL = _MAKE4C('13.0'); #if _CROSS_TARGET_SPIRV #include diff --git a/prog/tools/libTools/EditorCore/ec_outliner.cpp b/prog/tools/libTools/EditorCore/ec_outliner.cpp index 8e3b20f69..3dda94b7d 100644 --- a/prog/tools/libTools/EditorCore/ec_outliner.cpp +++ b/prog/tools/libTools/EditorCore/ec_outliner.cpp @@ -257,6 +257,16 @@ int OutlinerWindow::onMenuItemClick(unsigned id) PropPanel::focus_helper.requestFocus(&addingLayerToType); } } + else if (id == (unsigned)MenuItemId::MoveToThisLayer) + { + if (outlinerModel->isLayerTargetableBySelection(contextMenuType, contextMenuPerTypeLayerIndex)) + { + dag::Vector selectedObjects = outlinerModel->getSelectedObjects(); + treeInterface->moveObjectsToLayer(make_span(selectedObjects), contextMenuType, contextMenuPerTypeLayerIndex); + + return 1; + } + } else if (id == (unsigned)MenuItemId::SelectAllTypeObjects || id == (unsigned)MenuItemId::DeselectAllTypeObjects) { const bool select = id == (unsigned)MenuItemId::SelectAllTypeObjects; @@ -276,13 +286,17 @@ int OutlinerWindow::onMenuItemClick(unsigned id) if (outlinerModel->objectTypes[typeIndex]->layers[layerIndex]->isSelected()) treeInterface->selectAllLayerObjects(typeIndex, layerIndex, select); } + LayerTreeItem *targetLayer = getContextMenuTargetLayer(); + if (targetLayer && !targetLayer->isSelected()) + treeInterface->selectAllLayerObjects(contextMenuType, contextMenuPerTypeLayerIndex, select); } else if (id == (unsigned)MenuItemId::ExpandLayerChildren || id == (unsigned)MenuItemId::CollapseLayerChildren) { const bool expand = id == (unsigned)MenuItemId::ExpandLayerChildren; + LayerTreeItem *targetLayer = getContextMenuTargetLayer(); for (ObjectTypeTreeItem *objectTypeTreeItem : outlinerModel->objectTypes) for (LayerTreeItem *layerTreeItem : objectTypeTreeItem->layers) - if (layerTreeItem->isSelected()) + if (layerTreeItem->isSelected() || layerTreeItem == targetLayer) { const int objectCount = layerTreeItem->sortedObjects.size(); for (int objectIndex = 0; objectIndex < objectCount; ++objectIndex) @@ -462,7 +476,9 @@ bool OutlinerWindow::showTypeControls(ObjectTypeTreeItem &tree_item, int type, b const ImVec2 originaCursorPos = ImGui::GetCursorScreenPos(); ImGui::SetCursorScreenPos(leftIconPos); + PropPanel::ImguiHelper::setPointSampler(); ImGui::Image(icons.getForType(type), fontSizedIconSize); + PropPanel::ImguiHelper::setDefaultSampler(); ImGui::SetCursorScreenPos(ImVec2(actionButtonsStartX, endData.textPos.y)); @@ -507,7 +523,8 @@ bool OutlinerWindow::showTypeControls(ObjectTypeTreeItem &tree_item, int type, b } bool OutlinerWindow::showLayerControls(LayerTreeItem &tree_item, int type, int per_type_layer_index, bool layer_visible, - bool layer_locked, bool dim_layer_color, int object_count, const ImVec4 &dimmed_text_color, float action_buttons_total_width) + bool layer_locked, bool dim_layer_color, int object_count, const ImVec4 &dimmed_text_color, float action_buttons_total_width, + ImGuiMultiSelectIO *multiSelectIo) { const bool selected = tree_item.isSelected(); if (selected && layerRenamer) @@ -530,6 +547,8 @@ bool OutlinerWindow::showLayerControls(LayerTreeItem &tree_item, int type, int p if (selected) layerTreeNodeFlags |= ImGuiTreeNodeFlags_Selected; + const int multiSelectRequestCount = multiSelectIo->Requests.size(); + PropPanel::ImguiHelper::TreeNodeWithSpecialHoverBehaviorEndData endData; const bool isExpanded = PropPanel::ImguiHelper::treeNodeWithSpecialHoverBehaviorStart(tree_item.getLabel(), layerTreeNodeFlags, endData); @@ -646,6 +665,13 @@ bool OutlinerWindow::showLayerControls(LayerTreeItem &tree_item, int type, int p if (isExpanded != wasExpanded) tree_item.setExpanded(isExpanded); + // Make right mouse button presses keep the selection state intact! + if (ImGui::IsMouseClicked(ImGuiMouseButton_Right)) + { + while (multiSelectRequestCount < multiSelectIo->Requests.size()) + multiSelectIo->Requests.pop_back(); + } + // Imitate Windows where the context menu comes up on mouse button release. (BeginPopupContextItem also does this.) if (endData.hovered && ImGui::IsMouseReleased(ImGuiMouseButton_Right)) createContextMenu(type, per_type_layer_index); @@ -778,7 +804,9 @@ bool OutlinerWindow::showObjectAssetNameControls(ObjectAssetNameTreeItem &tree_i const ImVec2 originaCursorPos = ImGui::GetCursorScreenPos(); ImGui::SetCursorScreenPos(leftIconPos); + PropPanel::ImguiHelper::setPointSampler(); ImGui::Image(assetTypeIcon, fontSizedIconSize); + PropPanel::ImguiHelper::setDefaultSampler(); ImGui::SetCursorScreenPos(originaCursorPos); } @@ -825,8 +853,11 @@ void OutlinerWindow::fillLayerContextMenu(int type, int per_type_layer_index) if (!treeInterface || !contextMenu) return; - if (!outlinerModel->isAnyLayerSelected()) - return; + if (outlinerModel->isLayerTargetableBySelection(type, per_type_layer_index)) + { + contextMenu->addItem(PropPanel::ROOT_MENU_ITEM, (unsigned)MenuItemId::MoveToThisLayer, "Move to this layer"); + contextMenu->addSeparator(PropPanel::ROOT_MENU_ITEM); + } const bool canChangeSelection = !treeInterface->isLayerLocked(type, per_type_layer_index); @@ -910,7 +941,7 @@ void OutlinerWindow::createContextMenu(int type, int per_type_layer_index, bool if (contextMenu) return; - contextMenu.reset(PropPanel::create_context_menu()); + resetContextMenu(PropPanel::create_context_menu(), type, per_type_layer_index); contextMenu->setEventHandler(this); if (type >= 0 && per_type_layer_index >= 0 && object_menu) @@ -947,6 +978,26 @@ void OutlinerWindow::createContextMenuByKeyboard() } } +LayerTreeItem *OutlinerWindow::getContextMenuTargetLayer() const +{ + const int typeCount = outlinerModel->objectTypes.size(); + if (0 <= contextMenuType && contextMenuType < typeCount) + { + const ObjectTypeTreeItem *objectTypeTreeItem = outlinerModel->objectTypes[contextMenuType]; + const int layerCount = objectTypeTreeItem->layers.size(); + if (0 <= contextMenuPerTypeLayerIndex && contextMenuPerTypeLayerIndex < layerCount) + return objectTypeTreeItem->layers[contextMenuPerTypeLayerIndex]; + } + return nullptr; +} + +void OutlinerWindow::resetContextMenu(PropPanel::IMenu *context_menu, int type, int per_type_layer_index) +{ + contextMenu.reset(context_menu); + contextMenuType = type; + contextMenuPerTypeLayerIndex = per_type_layer_index; +} + void OutlinerWindow::updateSelectionHead(OutlinerTreeItem &tree_item) { const bool focused = ImGui::IsItemFocused(); @@ -970,7 +1021,7 @@ void OutlinerWindow::updateSelectionHead(OutlinerTreeItem &tree_item) } } -void OutlinerWindow::fillTree() +void OutlinerWindow::fillTree(ImGuiMultiSelectIO *multiSelectIo) { G_ASSERT(treeInterface); @@ -1030,7 +1081,7 @@ void OutlinerWindow::fillTree() const int objectCount = layerTreeItem->sortedObjects.size(); const bool layerOpen = showLayerControls(*layerTreeItem, typeIndex, layerIndex, layerVisible, layerLocked, dimLayerColor, - objectCount, dimmedTextColor, actionButtonsTotalWidth); + objectCount, dimmedTextColor, actionButtonsTotalWidth, multiSelectIo); if (!layerOpen) { @@ -1507,7 +1558,9 @@ void OutlinerWindow::updateImgui() if (selectedType < 0) ImGui::BeginDisabled(); + PropPanel::ImguiHelper::setPointSampler(); const bool pressedAddLayer = ImGui::ImageButton("addLayer", icons.layerAdd, fontSizedIconSize); + PropPanel::ImguiHelper::setDefaultSampler(); PropPanel::set_previous_imgui_control_tooltip((const void *)ImGui::GetItemID(), "Add new layer"); if (selectedType < 0) @@ -1579,7 +1632,7 @@ void OutlinerWindow::updateImgui() applySelectionRequests(*multiSelectIo, startedSelecting); ImGui::PushStyleColor(ImGuiCol_Header, PropPanel::Constants::TREE_SELECTION_BACKGROUND_COLOR); - fillTree(); + fillTree(multiSelectIo); ImGui::PopStyleColor(); multiSelectIo = ImGui::EndMultiSelect(); @@ -1590,7 +1643,7 @@ void OutlinerWindow::updateImgui() treeInterface->endObjectSelection(); if (contextMenu && (contextMenu->getItemCount(PropPanel::ROOT_MENU_ITEM) == 0 || !PropPanel::render_context_menu(*contextMenu))) - contextMenu.reset(); + resetContextMenu(); } ImGui::EndChild(); diff --git a/prog/tools/libTools/EditorCore/ec_outlinerModel.h b/prog/tools/libTools/EditorCore/ec_outlinerModel.h index a2d8ecb0e..d52dc102f 100644 --- a/prog/tools/libTools/EditorCore/ec_outlinerModel.h +++ b/prog/tools/libTools/EditorCore/ec_outlinerModel.h @@ -713,6 +713,39 @@ class OutlinerModel return selected_type >= 0; } + // Returns false if no object or any object with a different type than the target layer is selected. + // Returns true if all the selected objects are of a single type and at least one of them is not on the target layer. + bool isLayerTargetableBySelection(int type, int per_type_layer_index) const + { + if (type < 0 || objectTypes.size() <= type) + return false; + + // At least one object should be selected! + const int objectSelectionCount = selectionCountPerItemType[(int)OutlinerTreeItem::ItemType::Object]; + if (objectSelectionCount == 0) + return false; + + ObjectTypeTreeItem *objectTypeTreeItem = objectTypes[type]; + G_ASSERT(!objectTypeTreeItem->isSelected()); + + const int layerCount = objectTypeTreeItem->layers.size(); + if (per_type_layer_index < 0 || layerCount <= per_type_layer_index) + return false; + + // Target cannot contain all the selected objects! + if (objectTypeTreeItem->layers[per_type_layer_index]->selectedObjectCount == objectSelectionCount) + return false; + + // All the selected objects should be of the same object type! + int perTypeObjectSelectionCount = 0; + for (int layerIndex = 0; layerIndex < layerCount; ++layerIndex) + { + LayerTreeItem *layerTreeItem = objectTypeTreeItem->layers[layerIndex]; + perTypeObjectSelectionCount += layerTreeItem->selectedObjectCount; + } + return perTypeObjectSelectionCount == objectSelectionCount; + } + bool getShowAssetNameUnderObjects() const { return showAssetNameUnderObjects; } void setShowAssetNameUnderObjects(IOutliner &tree_interface, bool show) diff --git a/prog/tools/libTools/ObjectEditor/ec_ObjectEditorBar.cpp b/prog/tools/libTools/ObjectEditor/ec_ObjectEditorBar.cpp index b13423100..c5ffe74ac 100644 --- a/prog/tools/libTools/ObjectEditor/ec_ObjectEditorBar.cpp +++ b/prog/tools/libTools/ObjectEditor/ec_ObjectEditorBar.cpp @@ -10,6 +10,13 @@ #include #include +static class DefObjectEditorPropParams +{ +public: + bool commonGroupMinimized; + DefObjectEditorPropParams() : commonGroupMinimized(false) {} +} defaultObjectEditorPropParams; + enum { ID_NAME = 10000, @@ -56,7 +63,11 @@ void ObjectEditorPropPanelBar::getObjects() void ObjectEditorPropPanelBar::onChange(int pcb_id, PropPanel::ContainerPropertyControl *panel) { - if (pcb_id == ID_NAME) + if (pcb_id == RenderableEditableObject::PID_COMMON_GROUP) + { + ::defaultObjectEditorPropParams.commonGroupMinimized = panel->getBool(pcb_id); + } + else if (pcb_id == ID_NAME) { objEd->renameObject(objEd->getSelected(0), panel->getText(pcb_id).str()); } @@ -105,17 +116,21 @@ void ObjectEditorPropPanelBar::fillPanel() propPanel->clear(); - propPanel->createEditBox(ID_NAME, "Name:", "", false); + PropPanel::ContainerPropertyControl *commonGrp = + propPanel->createGroup(RenderableEditableObject::PID_COMMON_GROUP, "Common parameters"); + commonGrp->setBoolValue(::defaultObjectEditorPropParams.commonGroupMinimized); + + commonGrp->createEditBox(ID_NAME, "Name:", "", false); if (objEd->selectedCount()) { if (objEd->selectedCount() == 1) { - propPanel->setEnabledById(ID_NAME, true); - propPanel->setText(ID_NAME, objEd->getSelected(0)->getName()); + commonGrp->setEnabledById(ID_NAME, true); + commonGrp->setText(ID_NAME, objEd->getSelected(0)->getName()); } else - propPanel->setText(ID_NAME, String(100, "%d objects selected", objEd->selectedCount())); + commonGrp->setText(ID_NAME, String(100, "%d objects selected", objEd->selectedCount())); getObjects(); @@ -130,7 +145,7 @@ void ObjectEditorPropPanelBar::fillPanel() objects[0]->fillProps(*propPanel, commonClassId, o); } else - propPanel->setEnabledById(ID_NAME, false); + commonGrp->setEnabledById(ID_NAME, false); } } diff --git a/prog/tools/libTools/propPanel/commonWindow/listDialog.cpp b/prog/tools/libTools/propPanel/commonWindow/listDialog.cpp index b17c89294..b812507c4 100644 --- a/prog/tools/libTools/propPanel/commonWindow/listDialog.cpp +++ b/prog/tools/libTools/propPanel/commonWindow/listDialog.cpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace PropPanel { @@ -15,7 +16,7 @@ enum ListDialog::ListDialog(const char *caption, const Tab &vals, hdpi::Px width, hdpi::Px height) : DialogWindow(nullptr, width, height, caption) { - PropPanel::ContainerPropertyControl *_panel = ListDialog::getPanel(); + ContainerPropertyControl *_panel = ListDialog::getPanel(); G_ASSERT(_panel && "ListDialog: No panel found!"); for (const String &val : vals) @@ -25,10 +26,10 @@ ListDialog::ListDialog(const char *caption, const Tab &vals, hdpi::Px wi } _panel->createList(ID_LIST, "", vals, -1); - _panel->getById(ID_LIST)->setHeight(height); + _panel->getById(ID_LIST)->setHeight(Constants::LISTBOX_FULL_HEIGHT); } -void ListDialog::onDoubleClick(int pcb_id, PropPanel::ContainerPropertyControl *panel) +void ListDialog::onDoubleClick(int pcb_id, ContainerPropertyControl *panel) { if (pcb_id == ID_LIST) clickDialogButton(DIALOG_ID_OK); @@ -36,20 +37,20 @@ void ListDialog::onDoubleClick(int pcb_id, PropPanel::ContainerPropertyControl * int ListDialog::getSelectedIndex() const { - PropPanel::ContainerPropertyControl *_panel = const_cast(this)->getPanel(); + ContainerPropertyControl *_panel = const_cast(this)->getPanel(); return _panel->getInt(ID_LIST); } const char *ListDialog::getSelectedText() { - PropPanel::ContainerPropertyControl *_panel = getPanel(); + ContainerPropertyControl *_panel = getPanel(); lastSelectText = _panel->getText(ID_LIST); return lastSelectText; } void ListDialog::setSelectedIndex(int index) { - PropPanel::ContainerPropertyControl *_panel = getPanel(); + ContainerPropertyControl *_panel = getPanel(); _panel->setInt(ID_LIST, index); } diff --git a/prog/tools/libTools/propPanel/control/group.h b/prog/tools/libTools/propPanel/control/group.h index 44146f5fb..dcb606b7f 100644 --- a/prog/tools/libTools/propPanel/control/group.h +++ b/prog/tools/libTools/propPanel/control/group.h @@ -114,6 +114,9 @@ class GroupPropertyControl : public ContainerPropertyControl // This is here to prevent assert in ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries(). ImGui::Dummy(ImVec2(0.0f, 0.0f)); } + + if (wasMinimized != minimized) + message_queue.sendDelayedOnWcChange(*this); } // There is getCaption but that returns with a new SimpleString, and there is getCaptionValue that copies to a buffer, diff --git a/prog/tools/libTools/propPanel/control/listBox.h b/prog/tools/libTools/propPanel/control/listBox.h index ee010edfd..cfe166e5d 100644 --- a/prog/tools/libTools/propPanel/control/listBox.h +++ b/prog/tools/libTools/propPanel/control/listBox.h @@ -13,7 +13,9 @@ class ListBoxPropertyControl : public PropertyControlBase public: ListBoxPropertyControl(ControlEventHandler *event_handler, ContainerPropertyControl *parent, int id, int x, int y, hdpi::Px w, const char caption[], const Tab &vals, int index) : - PropertyControlBase(id, event_handler, parent, x, y, w, hdpi::Px(0)), controlCaption(caption), listBox(vals, index) + PropertyControlBase(id, event_handler, parent, x, y, w, Constants::LISTBOX_DEFAULT_HEIGHT), + controlCaption(caption), + listBox(vals, index) { listBox.setEventHandler(this); } diff --git a/prog/tools/libTools/propPanel/control/listBoxStandalone.h b/prog/tools/libTools/propPanel/control/listBoxStandalone.h index 8206cbe66..91907aa8f 100644 --- a/prog/tools/libTools/propPanel/control/listBoxStandalone.h +++ b/prog/tools/libTools/propPanel/control/listBoxStandalone.h @@ -89,13 +89,17 @@ class ListBoxControlStandalone : public IListBoxInterface return *contextMenu; } - void updateImgui(float controlWidth = 0.0f, float controlHeight = 0.0f) + void updateImgui(float controlWidth = 0.0f, float controlHeight = (float)Constants::LISTBOX_DEFAULT_HEIGHT) { ScopedImguiBeginDisabled scopedDisabled(!controlEnabled); // Use full width by default. Use height that can fit ~7 items by default. const float width = controlWidth > 0.0f ? controlWidth : -FLT_MIN; - const ImVec2 size(width, controlHeight > 0.0f ? controlHeight : 0.0f); + const float height = + (controlHeight == (float)Constants::LISTBOX_DEFAULT_HEIGHT || controlHeight > (float)Constants::LISTBOX_FULL_HEIGHT) + ? controlHeight + : -FLT_MIN; + const ImVec2 size(width, height); if (ImguiHelper::beginListBoxWithWindowFlags("##lb", size, ImGuiChildFlags_FrameStyle, ImGuiWindowFlags_HorizontalScrollbar)) { diff --git a/prog/tools/libTools/propPanel/control/multiSelectListBox.h b/prog/tools/libTools/propPanel/control/multiSelectListBox.h index 8af23a7d1..3a941fc1c 100644 --- a/prog/tools/libTools/propPanel/control/multiSelectListBox.h +++ b/prog/tools/libTools/propPanel/control/multiSelectListBox.h @@ -108,7 +108,9 @@ class MultiSelectListBoxPropertyControl : public PropertyControlBase // Use full width by default. Use height that can fit ~7 items by default. const float width = mW > 0 ? min((float)mW, ImGui::GetContentRegionAvail().x) : -FLT_MIN; - const ImVec2 size(width, mH > 0 ? mH : 0.0f); + const float height = + (mH == (float)Constants::LISTBOX_DEFAULT_HEIGHT || mH > (float)Constants::LISTBOX_FULL_HEIGHT) ? mH : -FLT_MIN; + const ImVec2 size(width, height); if (ImGui::BeginListBox("##lb", size)) { diff --git a/prog/tools/libTools/propPanel/control/toolbarButton.h b/prog/tools/libTools/propPanel/control/toolbarButton.h index 52b8e5df0..fbd8504c6 100644 --- a/prog/tools/libTools/propPanel/control/toolbarButton.h +++ b/prog/tools/libTools/propPanel/control/toolbarButton.h @@ -49,7 +49,9 @@ class ToolbarButtonPropertyControl : public PropertyControlBase ImGui::PushStyleColor(ImGuiCol_Border, PropPanel::Constants::TOGGLE_BUTTON_CHECKED_BORDER_COLOR); const float size = ImGui::GetTextLineHeight(); + PropPanel::ImguiHelper::setPointSampler(); const bool clicked = ImGui::ImageButton("ib", iconId, ImVec2(size, size)); // "ib" stands for ImageButton. It could be anything. + PropPanel::ImguiHelper::setDefaultSampler(); ImGui::PopStyleColor(2); ImGui::PopStyleVar(); diff --git a/prog/tools/libTools/propPanel/control/toolbarToggleButton.h b/prog/tools/libTools/propPanel/control/toolbarToggleButton.h index f5a8558b1..a6210ec4d 100644 --- a/prog/tools/libTools/propPanel/control/toolbarToggleButton.h +++ b/prog/tools/libTools/propPanel/control/toolbarToggleButton.h @@ -62,7 +62,9 @@ class ToolbarToggleButtonPropertyControl : public PropertyControlBase ImGui::PushStyleColor(ImGuiCol_Border, PropPanel::Constants::TOGGLE_BUTTON_CHECKED_BORDER_COLOR); const float size = ImGui::GetTextLineHeight(); + PropPanel::ImguiHelper::setPointSampler(); const bool clicked = ImGui::ImageButton("ib", iconId, ImVec2(size, size)); // "ib" stands for ImageButton. It could be anything. + PropPanel::ImguiHelper::setDefaultSampler(); ImGui::PopStyleColor(2); diff --git a/prog/tools/libTools/propPanel/control/toolbarToggleButtonGroup.h b/prog/tools/libTools/propPanel/control/toolbarToggleButtonGroup.h index 377ecd11a..43080f0a7 100644 --- a/prog/tools/libTools/propPanel/control/toolbarToggleButtonGroup.h +++ b/prog/tools/libTools/propPanel/control/toolbarToggleButtonGroup.h @@ -63,7 +63,9 @@ class ToolbarToggleButtonGroupPropertyControl : public PropertyControlBase ImGui::PushStyleColor(ImGuiCol_Border, PropPanel::Constants::TOGGLE_BUTTON_CHECKED_BORDER_COLOR); const float size = ImGui::GetTextLineHeight(); + PropPanel::ImguiHelper::setPointSampler(); const bool clicked = ImGui::ImageButton("ib", iconId, ImVec2(size, size)); // "ib" stands for ImageButton. It could be anything. + PropPanel::ImguiHelper::setDefaultSampler(); ImGui::PopStyleColor(2); diff --git a/prog/tools/libTools/propPanel/imguiHelper.cpp b/prog/tools/libTools/propPanel/imguiHelper.cpp index ef9a01335..78b6e9f8b 100644 --- a/prog/tools/libTools/propPanel/imguiHelper.cpp +++ b/prog/tools/libTools/propPanel/imguiHelper.cpp @@ -10,6 +10,7 @@ #include #include #include +#include using namespace ImGui; @@ -713,7 +714,9 @@ bool ImguiHelper::imageCheckButtonWithBackground(const char *str_id, ImTextureID ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive)); ImGui::PushStyleColor(ImGuiCol_Border, Constants::TOGGLE_BUTTON_CHECKED_BORDER_COLOR); + setPointSampler(); const bool pressed = ImGui::ImageButton(str_id, texture_id, image_size); + setDefaultSampler(); ImGui::PopStyleColor(3); @@ -1189,4 +1192,18 @@ float ImguiHelper::getCursorPosYWithoutLastItemSpacing() return cursorPosYWithoutItemSpacing - window->Pos.y + window->Scroll.y; // See ImGui::GetCursorPosY(). } +void ImguiHelper::setPointSampler() +{ + d3d::SamplerInfo smpInfo; + smpInfo.filter_mode = d3d::FilterMode::Point; + static d3d::SamplerHandle smp = d3d::request_sampler(smpInfo); + ImGuiDagor::Sampler(smp); +} + +void ImguiHelper::setDefaultSampler() +{ + static d3d::SamplerHandle smp = d3d::request_sampler({}); + ImGuiDagor::Sampler(smp); +} + } // namespace PropPanel \ No newline at end of file diff --git a/prog/tools/sceneTools/assetExp/exporters/locShadersExp.cpp b/prog/tools/sceneTools/assetExp/exporters/locShadersExp.cpp index 9b77db85f..75becaa4e 100644 --- a/prog/tools/sceneTools/assetExp/exporters/locShadersExp.cpp +++ b/prog/tools/sceneTools/assetExp/exporters/locShadersExp.cpp @@ -31,6 +31,27 @@ static String nonOptionalFileName; static DataBlock nonOptionalFile; static char appBlkDir[512] = {0}; +static String find_shader_editors_path() +{ + static String foundPath; + if (!foundPath.empty()) + return foundPath; + + String path("prog/gameLibs/webui/plugins/shaderEditors"); + + for (int i = 0; i < 16; i++) + if (::dd_dir_exists(path.str())) + { + foundPath = path; + return foundPath; + } + else + path = String("../") + path; + + // error, but it gets propagated to collect_template_files with a hlsl #error + return String(""); +} + static String join_str(Tab &arr, const char *delimiter) { String res; @@ -244,7 +265,7 @@ class NodeBasedLocShaderExporter : public IDagorAssetExporter templateNames.push_back(String("../../../render/volumetricLights/shaders/volfog_shadow.hlsl")); templateNames.push_back(String("fogShadowShaderTemplateBody.hlsl")); - String editorPath = String("../../prog/gameLibs/webui/plugins/shaderEditors"); + String editorPath = find_shader_editors_path(); for (int i = 0; i < templateNames.size(); ++i) templateNames[i] = editorPath + "/" + templateNames[i]; return templateNames; diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlEntity.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlEntity.cpp index a018ffa5d..ed46599a2 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlEntity.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlEntity.cpp @@ -51,6 +51,8 @@ enum PID_PLACE_TYPE_DROPDOWN = PID_PLACE_TYPE_RADIO + LandscapeEntityObject::Props::PT_count + 1, /* +1 is "mixed" */ PID_PLACE_TYPE_OVERRIDE, + PID_ENTITY_LAYERS, + PID_ENTITY_COLLISION, PID_ENTITY_NOTES, PID_ENTITY_CASTER_GRP, @@ -71,6 +73,8 @@ enum PID_DECAL_MATERIAL_LAST = PID_DECAL_MATERIAL_FIRST + decal_material_max_count, PID_DECAL_MATERIAL_SAVE, + PID_SEED_GROUP, + PID_GENERATE_PERINST_SEED, PID_GENERATE_EQUAL_PERINST_SEED, PID_PERINST_SEED, @@ -104,9 +108,12 @@ static class DefHMLEntityParams public: int placeTypeTab; bool placeTypeMixed; + bool seedGroupMinimized; bool splitCompRecursive; - DefHMLEntityParams() : placeTypeTab(PID_PLACE_TYPE_BTN_DROPDOWN), placeTypeMixed(false), splitCompRecursive(false) {} + DefHMLEntityParams() : + placeTypeTab(PID_PLACE_TYPE_BTN_DROPDOWN), placeTypeMixed(false), seedGroupMinimized(true), splitCompRecursive(false) + {} } defaultHMLEntity; @@ -305,9 +312,12 @@ bool LandscapeEntityObject::isColliderEnabled(const IDagorEdCustomCollider *coll void LandscapeEntityObject::fillProps(PropPanel::ContainerPropertyControl &panel, DClassID for_class_id, dag::ConstSpan objects) { + PropPanel::ContainerPropertyControl *commonGrp = panel.getContainerById(PID_COMMON_GROUP); + bool one_type = true; int one_layer = -1; + bool targetLayerEnabled = true; for (int i = 0; i < objects.size(); ++i) if (LandscapeEntityObject *o = RTTI_cast(objects[i])) { @@ -320,13 +330,26 @@ void LandscapeEntityObject::fillProps(PropPanel::ContainerPropertyControl &panel { one_layer = -2; one_type = false; + targetLayerEnabled = false; break; } - if (one_layer < 0) - panel.createStatic(-1, "Edit layer: --multiple selected--"); - else - panel.createStatic(-1, String(0, "Edit layer: %s", EditLayerProps::layerProps[one_layer].name())); + int targetLayerValue = 0; + Tab targetLayers(tmpmem); + if (one_type) + { + targetLayerValue = EditLayerProps::findTypeIdx(EditLayerProps::ENT, one_layer); + getObjEditor()->getLayerNames(EditLayerProps::ENT, targetLayers); + targetLayerEnabled = targetLayers.size() > 1; + } + if (one_layer < 0 || !one_type) + { + targetLayerValue = targetLayers.size(); + targetLayers.push_back(String(place_types_full[Props::PT_count])); + } + + commonGrp->createStatic(-1, "Edit layer:"); + commonGrp->createCombo(PID_ENTITY_LAYERS, "", targetLayers, targetLayerValue, targetLayerEnabled); if (one_type) { @@ -352,7 +375,9 @@ void LandscapeEntityObject::fillProps(PropPanel::ContainerPropertyControl &panel entNotes = ""; } - panel.createEditBox(PID_ENTITY_NOTES, "Notes", entNotes); + commonGrp->createEditBox(PID_ENTITY_NOTES, "Notes", entNotes); + commonGrp->createIndent(); + commonGrp->createButton(PID_ENTITYNAME, entName); PropPanel::ContainerPropertyControl &placeContainer = *panel.createContainer(PID_PLACE_TYPE); placeContainer.setHorizontalSpaceBetweenControls(hdpi::Px(0)); @@ -392,31 +417,37 @@ void LandscapeEntityObject::fillProps(PropPanel::ContainerPropertyControl &panel } panel.createIndent(); - panel.createButton(PID_ENTITYNAME, entName); fillMaterialProps(panel); panel.createIndent(); - panel.createButton(PID_GENERATE_PERINST_SEED, "Generate individual per-inst-seed"); - panel.createButton(PID_GENERATE_EQUAL_PERINST_SEED, "Generate equal per-inst-seed"); + + PropPanel::ContainerPropertyControl *subGrp = panel.createGroup(PID_SEED_GROUP, "Seed"); + subGrp->setBoolValue(::defaultHMLEntity.seedGroupMinimized); + + subGrp->createStatic(0, "Generate per-inst seed:"); + subGrp->createButton(PID_GENERATE_PERINST_SEED, "Individual"); + subGrp->createButton(PID_GENERATE_EQUAL_PERINST_SEED, "Equal", true, false); if (entity && objects.size() == 1) if (IRandomSeedHolder *irsh = entity->queryInterface()) - panel.createTrackInt(PID_PERINST_SEED, "Per-instance seed", irsh->getPerInstanceSeed() & 0x7FFF, 0, 32767, 1); + subGrp->createTrackInt(PID_PERINST_SEED, "Per-instance seed", irsh->getPerInstanceSeed() & 0x7FFF, 0, 32767, 1); - panel.createIndent(); - panel.createButton(PID_GENERATE_SEED, "Generate individual seed"); - panel.createButton(PID_GENERATE_EQUAL_SEED, "Generate equal seed"); + subGrp->createIndent(); + + subGrp->createStatic(0, "Generate seed:"); + subGrp->createButton(PID_GENERATE_SEED, "Individual"); + subGrp->createButton(PID_GENERATE_EQUAL_SEED, "Equal", true, false); if (entity && objects.size() == 1) if (IRandomSeedHolder *irsh = entity->queryInterface()) if (irsh->isSeedSetSupported()) - panel.createTrackInt(PID_SEED, "Random seed", irsh->getSeed() & 0x7FFF, 0, 32767, 1); + subGrp->createTrackInt(PID_SEED, "Random seed", irsh->getSeed() & 0x7FFF, 0, 32767, 1); panel.createIndent(); objParam.fillParams(panel, objects); panel.createIndent(); - PropPanel::ContainerPropertyControl *subGrp = panel.createGroup(PID_ENTITY_CASTER_GRP, "Entity casters"); + subGrp = panel.createGroup(PID_ENTITY_CASTER_GRP, "Entity casters"); Tab def_place_type_nm(tmpmem); def_place_type_nm.insert(def_place_type_nm.end(), eastl::begin(place_types_full), @@ -652,6 +683,21 @@ void LandscapeEntityObject::onPPChange(int pid, bool edit_finished, PropPanel::C } DAGORED2->invalidateViewportCache(); } + else if (pid == PID_ENTITY_LAYERS) + { + int selectedLayer = panel.getInt(PID_ENTITY_LAYERS); + int layerIdx = EditLayerProps::findLayerByTypeIdx(EditLayerProps::ENT, selectedLayer); + if (layerIdx != -1) + { + dag::Vector objectsToMove; + objectsToMove.set_capacity(objects.size()); + objectsToMove.insert(objectsToMove.end(), objects.begin(), objects.end()); + HmapLandPlugin::self->moveObjectsToLayer(layerIdx, make_span(objectsToMove)); + + DAGORED2->invalidateViewportCache(); + getObjEditor()->invalidateObjectProps(); + } + } else if (((pid == PID_PLACE_TYPE_RADIO || pid == PID_PLACE_TYPE_DROPDOWN) && (panel.getInt(pid) >= 0 && panel.getInt(pid) < Props::PT_count)) || pid == PID_PLACE_TYPE_OVERRIDE) @@ -753,6 +799,8 @@ void LandscapeEntityObject::onPPChange(int pid, bool edit_finished, PropPanel::C rePlaceAllEntities(); } } + else if (pid == PID_SEED_GROUP) + ::defaultHMLEntity.seedGroupMinimized = panel.getBool(pid); else if (pid == PID_SEED && objects.size() == 1) { if (LandscapeEntityObject *p = RTTI_cast(objects[0])) diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlIGenEditorPlugin.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlIGenEditorPlugin.cpp index 253843268..e0ca3aedb 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlIGenEditorPlugin.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlIGenEditorPlugin.cpp @@ -6897,4 +6897,5 @@ void HmapLandPlugin::moveObjectsToLayer(int lidx, dag::Spanaccept(String(0, "Move objects to layer \"%s\"", EditLayerProps::layerProps[lidx].name())); + objEd.invalidateObjectProps(); } diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlLayers.h b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlLayers.h index 5bd3d14ba..eb07547de 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlLayers.h +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlLayers.h @@ -40,6 +40,30 @@ struct EditLayerProps return i; return -1; } + static int findTypeIdx(unsigned t, unsigned idx) + { + unsigned targetIdx = 0; + for (int i = 0; i < layerProps.size(); i++) + if (layerProps[i].type == t) + { + if (i == idx) + return targetIdx; + targetIdx++; + } + return -1; + } + static int findLayerByTypeIdx(unsigned t, unsigned typeIdx) + { + unsigned targetIdx = 0; + for (int i = 0; i < layerProps.size(); i++) + if (layerProps[i].type == t) + { + if (targetIdx == typeIdx) + return i; + targetIdx++; + } + return -1; + } static int findLayerOrCreate(unsigned t, unsigned nid) { int lidx = findLayer(t, nid); diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObject.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObject.cpp index 103096609..f22f38615 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObject.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObject.cpp @@ -1323,6 +1323,18 @@ void HmapLandObjectEditor::onSelectedNames(const Tab &names) } +void HmapLandObjectEditor::getLayerNames(int type, Tab &names) +{ + const int layerCount = EditLayerProps::layerProps.size(); + for (int i = 0; i < layerCount; i++) + { + auto &layerProps = EditLayerProps::layerProps[i]; + if (layerProps.type == type) + names.push_back(String(layerProps.name())); + } +} + + bool HmapLandObjectEditor::findTargetPos(IGenViewportWnd *wnd, int x, int y, Point3 &out, bool place_on_ri_collision) { Point3 dir, world; diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObjectsEditor.h b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObjectsEditor.h index c3298d049..235d0c844 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObjectsEditor.h +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlObjectsEditor.h @@ -91,6 +91,8 @@ class HmapLandObjectEditor : public ObjectEditor, public IAssetBaseViewClient, p virtual void getTypeNames(Tab &names); virtual void onSelectedNames(const Tab &names); + virtual void getLayerNames(int type, Tab &names); + void setSelectMode(int cm); int getSelectMode() { return selectMode; } diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlOutliner.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlOutliner.cpp index 407012e9a..2ee0e6599 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlOutliner.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlOutliner.cpp @@ -120,6 +120,8 @@ int HeightmapLandOutlinerInterface::addNewLayer(int type, const char *name) EditLayerProps::layerProps[layerPropsIndex].renameable = true; + objectEditor.invalidateObjectProps(); + const int perTypeLayerIndex = getPerTypeLayerIndex(type, layerPropsIndex); return perTypeLayerIndex; } diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplineObject.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplineObject.cpp index 0dcdc79bd..a67619cc1 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplineObject.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplineObject.cpp @@ -56,6 +56,8 @@ enum PID_GENBLKNAME = 1, PID_GENBLKNAME2, + PID_SPLINE_LAYERS, + PID_NOTES, PID_SPLINE_LEN, PID_TC_ALONG_MUL, @@ -635,12 +637,25 @@ void SplineObject::render(DynRenderBuffer *db, const TMatrix4 >m, const Point2 void SplineObject::fillProps(PropPanel::ContainerPropertyControl &op, DClassID for_class_id, dag::ConstSpan objects) { + PropPanel::ContainerPropertyControl *commonGrp = op.getContainerById(PID_COMMON_GROUP); + bool one_type = true; + int one_type_idx = -1; int one_layer = -1; + bool targetLayerEnabled = true; for (int i = 0; i < objects.size(); ++i) if (SplineObject *s = RTTI_cast(objects[i])) { + int type_idx = s->isPoly() ? EditLayerProps::PLG : EditLayerProps::SPL; + if (one_type_idx == type_idx || one_type_idx == -1) + one_type_idx = type_idx; + else + { + one_type_idx = -2; + targetLayerEnabled = false; + } + if (one_layer == -1) one_layer = s->getEditLayerIdx(); else if (one_layer != s->getEditLayerIdx()) @@ -650,64 +665,78 @@ void SplineObject::fillProps(PropPanel::ContainerPropertyControl &op, DClassID f { one_layer = -2; one_type = false; + one_type_idx = -2; + targetLayerEnabled = false; break; } - if (one_layer < 0) - op.createStatic(-1, "Edit layer: --multiple selected--"); - else - op.createStatic(-1, String(0, "Edit layer: %s", EditLayerProps::layerProps[one_layer].name())); + int targetLayerValue = 0; + Tab targetLayers(tmpmem); + if (one_type_idx >= 0) + { + targetLayerValue = EditLayerProps::findTypeIdx(one_type_idx, one_layer); + getObjEditor()->getLayerNames(one_type_idx, targetLayers); + targetLayerEnabled = targetLayers.size() > 1; + } + if (one_layer < 0 || one_type_idx < 0) + { + targetLayerValue = targetLayers.size(); + targetLayers.push_back(String("-- (mixed) --")); + } + + commonGrp->createStatic(-1, "Edit layer:"); + commonGrp->createCombo(PID_SPLINE_LAYERS, "", targetLayers, targetLayerValue, targetLayerEnabled); if (one_type) { - op.createStatic(PID_SPLINE_LEN, String(128, "Length: %.1f m", bezierSpline.getLength())); - op.createEditBox(PID_NOTES, "Notes", props.notes); - op.createEditFloat(PID_TC_ALONG_MUL, "Scale TC along spline", props.scaleTcAlong); + commonGrp->createStatic(PID_SPLINE_LEN, String(128, "Length: %.1f m", bezierSpline.getLength())); + commonGrp->createEditBox(PID_NOTES, "Notes", props.notes); + commonGrp->createEditFloat(PID_TC_ALONG_MUL, "Scale TC along spline", props.scaleTcAlong); Tab lorders(tmpmem); for (int i = 0; i < LAYER_ORDER_MAX; ++i) lorders.push_back(String(8, "%d", i)); - op.createCombo(PID_LAYER_ORDER, "Place layer order", lorders, props.layerOrder); + commonGrp->createCombo(PID_LAYER_ORDER, "Place layer order", lorders, props.layerOrder); String title(poly ? "Land class asset" : "Spline class asset"); - op.createIndent(); - op.createStatic(-1, title); - op.createButton(PID_GENBLKNAME, ::dd_get_fname(props.blkGenName)); + commonGrp->createIndent(); + commonGrp->createStatic(-1, title); + commonGrp->createButton(PID_GENBLKNAME, ::dd_get_fname(props.blkGenName)); if (poly) { - op.createStatic(-1, "Border spline class asset"); - op.createButton(PID_GENBLKNAME2, ::dd_get_fname(points[0]->getProps().blkGenName)); + commonGrp->createStatic(-1, "Border spline class asset"); + commonGrp->createButton(PID_GENBLKNAME2, ::dd_get_fname(points[0]->getProps().blkGenName)); } if (!poly) { - op.createIndent(); - op.createCheckBox(PID_MAY_SELF_CROSS, "Self cross allowed", props.maySelfCross); + commonGrp->createIndent(); + commonGrp->createCheckBox(PID_MAY_SELF_CROSS, "Self cross allowed", props.maySelfCross); } if (poly) { - op.createCheckBox(PID_ALT_GEOM, "Alternative geom export", polyGeom.altGeom); - op.createEditFloat(PID_BBOX_ALIGN_STEP, "geom bbox align step", polyGeom.bboxAlignStep); - op.setEnabledById(PID_BBOX_ALIGN_STEP, polyGeom.altGeom); - op.createSeparator(0); + commonGrp->createCheckBox(PID_ALT_GEOM, "Alternative geom export", polyGeom.altGeom); + commonGrp->createEditFloat(PID_BBOX_ALIGN_STEP, "geom bbox align step", polyGeom.bboxAlignStep); + commonGrp->setEnabledById(PID_BBOX_ALIGN_STEP, polyGeom.altGeom); + commonGrp->createSeparator(0); } - op.createCheckBox(PID_EXPORTABLE, "Export to game", props.exportable); + commonGrp->createCheckBox(PID_EXPORTABLE, "Export to game", props.exportable); - op.createCheckBox(PID_USE_FOR_NAVMESH, "Use for NavMesh", props.useForNavMesh); - op.createEditFloat(PID_NAVMESH_STRIPE_WIDTH, "Width", props.navMeshStripeWidth); + commonGrp->createCheckBox(PID_USE_FOR_NAVMESH, "Use for NavMesh", props.useForNavMesh); + commonGrp->createEditFloat(PID_NAVMESH_STRIPE_WIDTH, "Width", props.navMeshStripeWidth); if (objects.size() == 1) - op.createTrackInt(PID_PERINST_SEED, "Per-instance seed", props.perInstSeed, 0, 32767, 1); + commonGrp->createTrackInt(PID_PERINST_SEED, "Per-instance seed", props.perInstSeed, 0, 32767, 1); createMaterialControls(op); - PropPanel::ContainerPropertyControl &cornerGrp = *op.createRadioGroup(PID_CORNER_TYPE, "Spline knots corner type"); + PropPanel::ContainerPropertyControl &cornerGrp = *commonGrp->createRadioGroup(PID_CORNER_TYPE, "Spline knots corner type"); cornerGrp.createRadio(-1, "Corner"); cornerGrp.createRadio(0, "Smooth tangent"); cornerGrp.createRadio(1, "Smooth curvature"); - op.setInt(PID_CORNER_TYPE, props.cornerType); + commonGrp->setInt(PID_CORNER_TYPE, props.cornerType); PropPanel::ContainerPropertyControl *modGroup = op.createGroup(PID_MODIF_GRP, "Modify"); @@ -871,6 +900,37 @@ void SplineObject::onPPChange(int pid, bool edit_finished, PropPanel::ContainerP DAGORED2->invalidateViewportCache(); } + if (pid == PID_SPLINE_LAYERS) + { + int oneTypeIdx = -1; + for (int i = 0; i < objects.size(); ++i) + { + if (SplineObject *s = RTTI_cast(objects[i])) + { + int typeIdx = s->isPoly() ? EditLayerProps::PLG : EditLayerProps::SPL; + if (oneTypeIdx == typeIdx || oneTypeIdx == -1) + { + oneTypeIdx = typeIdx; + continue; + } + } + break; + } + + int selectedLayer = panel.getInt(PID_SPLINE_LAYERS); + int layerIdx = EditLayerProps::findLayerByTypeIdx(oneTypeIdx, selectedLayer); + if (layerIdx != -1) + { + dag::Vector objectsToMove; + objectsToMove.set_capacity(objects.size()); + objectsToMove.insert(objectsToMove.end(), objects.begin(), objects.end()); + HmapLandPlugin::self->moveObjectsToLayer(layerIdx, make_span(objectsToMove)); + + DAGORED2->invalidateViewportCache(); + getObjEditor()->invalidateObjectProps(); + } + } + if (pid == PID_TC_ALONG_MUL) { CHANGE_VAL_FUNC(float, props.scaleTcAlong, getFloat, invalidateSplineCurve()); diff --git a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplinePoint.cpp b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplinePoint.cpp index c029815b6..9f5cd1855 100644 --- a/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplinePoint.cpp +++ b/prog/tools/sceneTools/daEditorX/HeightmapLand/hmlSplinePoint.cpp @@ -37,6 +37,7 @@ SplinePointObject::Props *SplinePointObject::defaultProps = NULL; enum { PID_USEDEFSET = 1, + PID_SPLINE_LAYERS, PID_GENBLKNAME, PID_EFFECTIVE_ASSET, PID_FUSE_POINTS, @@ -195,92 +196,125 @@ void SplinePointObject::fillProps(PropPanel::ContainerPropertyControl &op, DClas if (!spline) return; + PropPanel::ContainerPropertyControl *commonGrp = op.getContainerById(PID_COMMON_GROUP); + bool one_type = true; + int one_type_idx = -1; int one_layer = -1; + bool targetLayerEnabled = true; for (int i = 0; i < objects.size(); ++i) if (SplinePointObject *o = RTTI_cast(objects[i])) { if (!o->spline) + { one_layer = -2; - else if (one_layer == -1) - one_layer = o->spline->getEditLayerIdx(); - else if (one_layer != o->spline->getEditLayerIdx()) - one_layer = -2; + targetLayerEnabled = false; + } + else + { + int type_idx = o->spline->isPoly() ? EditLayerProps::PLG : EditLayerProps::SPL; + if (one_type_idx == type_idx || one_type_idx == -1) + one_type_idx = type_idx; + else + { + one_type_idx = -2; + targetLayerEnabled = false; + } + + if (one_layer == -1) + one_layer = o->spline->getEditLayerIdx(); + else if (one_layer != o->spline->getEditLayerIdx()) + one_layer = -2; + } } else { one_layer = -2; one_type = false; + one_type_idx = -2; + targetLayerEnabled = false; break; } - if (one_layer < 0) - op.createStatic(-1, "Edit layer: --multiple selected--"); - else - op.createStatic(-1, String(0, "Edit layer: %s", EditLayerProps::layerProps[one_layer].name())); + int targetLayerValue = 0; + Tab targetLayers(tmpmem); + if (one_type_idx >= 0) + { + targetLayerValue = EditLayerProps::findTypeIdx(one_type_idx, one_layer); + getObjEditor()->getLayerNames(one_type_idx, targetLayers); + targetLayerEnabled = targetLayers.size() > 1; + } + if (one_layer < 0 || one_type_idx < 0) + { + targetLayerValue = targetLayers.size(); + targetLayers.push_back(String("-- (mixed) --")); + } + + commonGrp->createStatic(-1, "Edit layer:"); + commonGrp->createCombo(PID_SPLINE_LAYERS, "", targetLayers, targetLayerValue, targetLayerEnabled); if (one_type) { - op.createCheckBox(PID_USEDEFSET, "Use default spline settings", props.useDefSet); + commonGrp->createCheckBox(PID_USEDEFSET, "Use default spline settings", props.useDefSet); - op.createEditFloat(PID_SCALE_H, "Scale Height", props.attr.scale_h); - op.createEditFloat(PID_SCALE_W, "Scale Width", props.attr.scale_w); - op.createTrackFloat(PID_OPACITY, "Opacity", props.attr.opacity, 0.0f, 1.0f, 0.01f); - op.createEditFloat(PID_TC3U, "TC3.u", props.attr.tc3u); - op.createEditFloat(PID_TC3V, "TC3.v", props.attr.tc3v); + commonGrp->createEditFloat(PID_SCALE_H, "Scale Height", props.attr.scale_h); + commonGrp->createEditFloat(PID_SCALE_W, "Scale Width", props.attr.scale_w); + commonGrp->createTrackFloat(PID_OPACITY, "Opacity", props.attr.opacity, 0.0f, 1.0f, 0.01f); + commonGrp->createEditFloat(PID_TC3U, "TC3.u", props.attr.tc3u); + commonGrp->createEditFloat(PID_TC3V, "TC3.v", props.attr.tc3v); - op.setMinMaxStep(PID_SCALE_H, 0.0f, 1e6f, 0.01f); - op.setMinMaxStep(PID_SCALE_W, 0.0f, 1e6f, 0.01f); - op.setMinMaxStep(PID_OPACITY, 0.0f, 1.0f, 0.01f); + commonGrp->setMinMaxStep(PID_SCALE_H, 0.0f, 1e6f, 0.01f); + commonGrp->setMinMaxStep(PID_SCALE_W, 0.0f, 1e6f, 0.01f); + commonGrp->setMinMaxStep(PID_OPACITY, 0.0f, 1.0f, 0.01f); { - op.createIndent(); + commonGrp->createIndent(); - PropPanel::ContainerPropertyControl &followGrp = *op.createRadioGroup(PID_FOLLOW, "Follow type override"); + PropPanel::ContainerPropertyControl &followGrp = *commonGrp->createRadioGroup(PID_FOLLOW, "Follow type override"); followGrp.createRadio(-1, "Default (as in asset)"); followGrp.createRadio(0, "No follow"); followGrp.createRadio(1, "Follow hills"); followGrp.createRadio(2, "Follow hollows"); followGrp.createRadio(3, "Follow landscape"); - op.setInt(PID_FOLLOW, props.attr.followOverride); + commonGrp->setInt(PID_FOLLOW, props.attr.followOverride); - PropPanel::ContainerPropertyControl &roadGrp = *op.createRadioGroup(PID_ROADBHV, "Road behavior override"); + PropPanel::ContainerPropertyControl &roadGrp = *commonGrp->createRadioGroup(PID_ROADBHV, "Road behavior override"); roadGrp.createRadio(-1, "Default (as in asset)"); roadGrp.createRadio(0, "Not a road"); roadGrp.createRadio(1, "Follow as road"); - op.setInt(PID_ROADBHV, props.attr.roadBhvOverride); + commonGrp->setInt(PID_ROADBHV, props.attr.roadBhvOverride); - op.createIndent(); - op.createStatic(-1, "Spline class asset"); - op.createButton(PID_GENBLKNAME, ::dd_get_fname(props.blkGenName), !props.useDefSet); + commonGrp->createIndent(); + commonGrp->createStatic(-1, "Spline class asset"); + commonGrp->createButton(PID_GENBLKNAME, ::dd_get_fname(props.blkGenName), !props.useDefSet); if (props.useDefSet) { - op.createStatic(-1, "Effective spline class asset"); - op.createButton(PID_EFFECTIVE_ASSET, ::dd_get_fname(getEffectiveAsset())); + commonGrp->createStatic(-1, "Effective spline class asset"); + commonGrp->createButton(PID_EFFECTIVE_ASSET, ::dd_get_fname(getEffectiveAsset())); } else { - op.createStatic(-1, "Previous spline class asset"); - op.createButton(PID_EFFECTIVE_ASSET, ::dd_get_fname(getEffectiveAsset(-1))); + commonGrp->createStatic(-1, "Previous spline class asset"); + commonGrp->createButton(PID_EFFECTIVE_ASSET, ::dd_get_fname(getEffectiveAsset(-1))); } } - op.createSeparator(0); - PropPanel::ContainerPropertyControl &cornerGrp = *op.createRadioGroup(PID_CORNER_TYPE, "Corner type"); + commonGrp->createSeparator(0); + PropPanel::ContainerPropertyControl &cornerGrp = *commonGrp->createRadioGroup(PID_CORNER_TYPE, "Corner type"); cornerGrp.createRadio(-2, "As spline (default)"); cornerGrp.createRadio(-1, "Corner"); cornerGrp.createRadio(0, "Smooth tangent"); cornerGrp.createRadio(1, "Smooth curvature"); - op.setInt(PID_CORNER_TYPE, props.cornerType); + commonGrp->setInt(PID_CORNER_TYPE, props.cornerType); - op.createSeparator(0); - op.createButton(PID_LEVEL_TANGENTS, String(64, "Level tangents (%d points)", objects.size())); + commonGrp->createSeparator(0); + commonGrp->createButton(PID_LEVEL_TANGENTS, String(64, "Level tangents (%d points)", objects.size())); if (objects.size() > 1) { - op.createButton(PID_LEVEL_POINTS, String(64, "Level %d points (set average .y)", objects.size())); - op.createButton(PID_FUSE_POINTS, String(64, "Fuse %d points", objects.size())); + commonGrp->createButton(PID_LEVEL_POINTS, String(64, "Level %d points (set average .y)", objects.size())); + commonGrp->createButton(PID_FUSE_POINTS, String(64, "Fuse %d points", objects.size())); } } @@ -292,16 +326,16 @@ void SplinePointObject::fillProps(PropPanel::ContainerPropertyControl &op, DClas continue; if (o->props.useDefSet != props.useDefSet) - op.resetById(PID_USEDEFSET); + commonGrp->resetById(PID_USEDEFSET); if (stricmp(o->props.blkGenName, props.blkGenName)) - op.setCaption(PID_GENBLKNAME, ""); + commonGrp->setCaption(PID_GENBLKNAME, ""); if (o->props.useDefSet == props.useDefSet) if (stricmp(o->getEffectiveAsset(eff_disp), getEffectiveAsset(eff_disp))) - op.setCaption(PID_EFFECTIVE_ASSET, ""); + commonGrp->setCaption(PID_EFFECTIVE_ASSET, ""); if (o->props.cornerType != props.cornerType) - op.resetById(PID_CORNER_TYPE); + commonGrp->resetById(PID_CORNER_TYPE); } } @@ -333,6 +367,42 @@ void SplinePointObject::onPPChange(int pid, bool edit_finished, PropPanel::Conta getObjEditor()->invalidateObjectProps(); } + if (pid == PID_SPLINE_LAYERS) + { + dag::Vector objectsToMove; + objectsToMove.set_capacity(objects.size()); + int oneTypeIdx = -1; + for (int i = 0; i < objects.size(); ++i) + { + if (SplinePointObject *s = RTTI_cast(objects[i])) + { + if (s->spline) + { + if (eastl::find(objectsToMove.begin(), objectsToMove.end(), s->spline) == objectsToMove.end()) + objectsToMove.push_back(s->spline); + + int typeIdx = s->spline->isPoly() ? EditLayerProps::PLG : EditLayerProps::SPL; + if (oneTypeIdx == typeIdx || oneTypeIdx == -1) + { + oneTypeIdx = typeIdx; + continue; + } + } + } + oneTypeIdx = -2; + } + + int selectedLayer = panel.getInt(PID_SPLINE_LAYERS); + int layerIdx = EditLayerProps::findLayerByTypeIdx(oneTypeIdx, selectedLayer); + if (layerIdx != -1) + { + HmapLandPlugin::self->moveObjectsToLayer(layerIdx, make_span(objectsToMove)); + + DAGORED2->invalidateViewportCache(); + getObjEditor()->invalidateObjectProps(); + } + } + if ((pid == PID_SCALE_H) || (pid == PID_SCALE_W) || (pid == PID_OPACITY) || (pid == PID_TC3U) || (pid == PID_TC3V)) { float val = panel.getFloat(pid); diff --git a/prog/tools/sharedInclude/EditorCore/ec_ObjectEditor.h b/prog/tools/sharedInclude/EditorCore/ec_ObjectEditor.h index ce62e35e3..22f4019e6 100644 --- a/prog/tools/sharedInclude/EditorCore/ec_ObjectEditor.h +++ b/prog/tools/sharedInclude/EditorCore/ec_ObjectEditor.h @@ -138,6 +138,8 @@ class ObjectEditor : public IGizmoClient, virtual bool setUniqName(RenderableEditableObject *o, const char *n); void setSuffixDigitsCount(int c) { suffixDigitsCount = c; } + /// Get layer names for a given object type. + virtual void getLayerNames(int type, Tab &names) {} //***************************************************************** /// @name Editing objects (add, remove, render). diff --git a/prog/tools/sharedInclude/EditorCore/ec_outliner.h b/prog/tools/sharedInclude/EditorCore/ec_outliner.h index f0a2c6af8..449b2c816 100644 --- a/prog/tools/sharedInclude/EditorCore/ec_outliner.h +++ b/prog/tools/sharedInclude/EditorCore/ec_outliner.h @@ -103,6 +103,7 @@ class OutlinerWindow : public IMenuEventHandler, public PropPanel::IDelayedCallb { SelectAllTypeObjects = 1, DeselectAllTypeObjects, + MoveToThisLayer, SelectAllLayerObjects, DeselectAllLayerObjects, ExpandLayerChildren, @@ -132,7 +133,8 @@ class OutlinerWindow : public IMenuEventHandler, public PropPanel::IDelayedCallb bool showTypeControls(ObjectTypeTreeItem &tree_item, int type, bool type_visible, bool type_locked, bool dim_type_color, int layer_count, const ImVec4 &dimmed_text_color, float action_buttons_total_width); bool showLayerControls(LayerTreeItem &tree_item, int type, int per_type_layer_index, bool layer_visible, bool layer_locked, - bool dim_layer_color, int object_count, const ImVec4 &dimmed_text_color, float action_buttons_total_width); + bool dim_layer_color, int object_count, const ImVec4 &dimmed_text_color, float action_buttons_total_width, + ImGuiMultiSelectIO *multiSelectIo); const char *getObjectNoun(int type, int count) const; bool showObjectControls(ObjectTreeItem &tree_item, int type, int per_type_layer_index, int object_index, bool has_child); bool showObjectAssetNameControls(ObjectAssetNameTreeItem &tree_item, RenderableEditableObject &object); @@ -142,8 +144,10 @@ class OutlinerWindow : public IMenuEventHandler, public PropPanel::IDelayedCallb void fillObjectContextMenu(int type, int per_type_layer_index); void createContextMenu(int type, int per_type_layer_index = -1, bool object_menu = false); void createContextMenuByKeyboard(); + LayerTreeItem *getContextMenuTargetLayer() const; + void resetContextMenu(PropPanel::IMenu *context_menu = nullptr, int type = -1, int per_type_layer_index = -1); void updateSelectionHead(OutlinerTreeItem &tree_item); - void fillTree(); + void fillTree(ImGuiMultiSelectIO *multiSelectIo); bool applyRangeSelectionRequestInternal(const ImGuiSelectionRequest &request, OutlinerTreeItem &tree_item, bool &found_first); void applyRangeSelectionRequest(const ImGuiSelectionRequest &request); void applySelectionRequests(const ImGuiMultiSelectIO &multi_select_io, bool &started_selecting); @@ -166,7 +170,11 @@ class OutlinerWindow : public IMenuEventHandler, public PropPanel::IDelayedCallb bool showActionButtonExportLayer = true; dag::Vector showTypes; + // Context menu. eastl::unique_ptr contextMenu; + int contextMenuType = -1; + int contextMenuPerTypeLayerIndex = -1; + eastl::unique_ptr outlinerModel; eastl::unique_ptr layerRenamer; eastl::unique_ptr objectRenamer; diff --git a/prog/tools/sharedInclude/EditorCore/ec_rendEdObject.h b/prog/tools/sharedInclude/EditorCore/ec_rendEdObject.h index 925d43fba..1f1289799 100644 --- a/prog/tools/sharedInclude/EditorCore/ec_rendEdObject.h +++ b/prog/tools/sharedInclude/EditorCore/ec_rendEdObject.h @@ -269,6 +269,12 @@ class RenderableEditableObject : public EditableObject /// #RenderableEditableObject or derived from it, @b NullCID in other case virtual DClassID getCommonClassId(RenderableEditableObject **objects, int num); + /// Property Panel common group and property PID values + enum + { + PID_COMMON_GROUP = 100000 + }; + /// Fill Property Panel with object properties. /// Used to place object (group of objects) properties on Property Panel. /// @param[in] panel - Property Panel diff --git a/prog/tools/sharedInclude/propPanel/constants.h b/prog/tools/sharedInclude/propPanel/constants.h index 71df662ba..4e398e6c5 100644 --- a/prog/tools/sharedInclude/propPanel/constants.h +++ b/prog/tools/sharedInclude/propPanel/constants.h @@ -4,6 +4,7 @@ // #pragma once +#include #include namespace PropPanel @@ -27,6 +28,12 @@ class Constants // Vertical space between a label and a control when they are on a separate line. static constexpr int SPACE_BETWEEN_SEPARATE_LINE_LABEL_AND_CONTROL = 0.0f; + // The default height can fit ~7 items. + static constexpr hdpi::Px LISTBOX_DEFAULT_HEIGHT = (hdpi::Px)0; + + // Use all the available height. + static constexpr hdpi::Px LISTBOX_FULL_HEIGHT = (hdpi::Px)1; + // Colors for the daEditorX Classic style. // Color of the dialogs title and tab title texts. diff --git a/prog/tools/sharedInclude/propPanel/control/container.h b/prog/tools/sharedInclude/propPanel/control/container.h index d263ff250..7814dc099 100644 --- a/prog/tools/sharedInclude/propPanel/control/container.h +++ b/prog/tools/sharedInclude/propPanel/control/container.h @@ -67,7 +67,10 @@ class ContainerPropertyControl : public PropertyControlBase virtual void createList(int id, const char caption[], const Tab &vals, int index, bool enabled = true, bool new_line = true); virtual void createList(int id, const char caption[], const Tab &vals, const char *selection, bool enabled = true, bool new_line = true); + + // You can also use Constants::LISTBOX_DEFAULT_HEIGHT and Constants::LISTBOX_FULL_HEIGHT for height. virtual void createMultiSelectList(int id, const Tab &vals, hdpi::Px height, bool enabled = true, bool new_line = true); + virtual void createRadio(int id, const char caption[], bool enabled = true, bool new_line = true); virtual void createColorBox(int id, const char caption[], E3DCOLOR value = E3DCOLOR(0, 0, 0, 255), bool enabled = true, bool new_line = true); diff --git a/prog/tools/sharedInclude/propPanel/control/propertyControlBase.h b/prog/tools/sharedInclude/propPanel/control/propertyControlBase.h index 4ec750bb3..dc252544f 100644 --- a/prog/tools/sharedInclude/propPanel/control/propertyControlBase.h +++ b/prog/tools/sharedInclude/propPanel/control/propertyControlBase.h @@ -97,7 +97,10 @@ class PropertyControlBase : public WindowControlEventHandler virtual int getID() const { return mId; } virtual void setWidth(hdpi::Px w) { mW = _px(w); } + + // You can use Constants::LISTBOX_FULL_HEIGHT for list boxes here. virtual void setHeight(hdpi::Px h) { mH = _px(h); } + virtual void resize(hdpi::Px w, hdpi::Px h) { setWidth(w); diff --git a/prog/tools/sharedInclude/propPanel/imguiHelper.h b/prog/tools/sharedInclude/propPanel/imguiHelper.h index 7437e19d9..667e79ada 100644 --- a/prog/tools/sharedInclude/propPanel/imguiHelper.h +++ b/prog/tools/sharedInclude/propPanel/imguiHelper.h @@ -187,6 +187,9 @@ class ImguiHelper return ImVec2(textLineHeight, textLineHeight); } + static void setPointSampler(); + static void setDefaultSampler(); + private: static ImVec2 getImageButtonWithDownArrowSizeInternal(const ImVec2 &image_size, float &default_height, ImVec2 &arrow_half_size);